summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-07-29 12:20:02 +0300
committerGitHub <noreply@github.com>2020-07-29 12:20:02 +0300
commit52e77c66345399f7f1064b80676a2495e299bb46 (patch)
tree358b7762beb8809084c65358087d5899e4546f18
parent1803dcc873df329282adab46e1d42baa4b6ee45b (diff)
parentc649028b01984189b428d8d243016639587d5cae (diff)
Merge pull request #1 from GTAmodding/miami
Miami
-rw-r--r--.appveyor.yml2
-rw-r--r--README.md8
m---------librw0
-rw-r--r--libsndfile.32/ChangeLog (renamed from libsndfile/ChangeLog)0
-rw-r--r--libsndfile.32/NEWS (renamed from libsndfile/NEWS)0
-rw-r--r--libsndfile.32/dist/libsndfile-1.dll (renamed from libsndfile/dist/libsndfile-1.dll)bin1679360 -> 1679360 bytes
-rw-r--r--libsndfile.32/include/sndfile.h (renamed from libsndfile/include/sndfile.h)0
-rw-r--r--libsndfile.32/include/sndfile.hh (renamed from libsndfile/include/sndfile.hh)0
-rw-r--r--libsndfile.32/lib/libsndfile-1.def (renamed from libsndfile/lib/libsndfile-1.def)0
-rw-r--r--libsndfile.32/lib/libsndfile-1.lib (renamed from libsndfile/lib/libsndfile-1.lib)bin9948 -> 9948 bytes
-rw-r--r--libsndfile.32/lib/pkgconfig/sndfile.pc (renamed from libsndfile/lib/pkgconfig/sndfile.pc)0
-rw-r--r--libsndfile.64/ChangeLog9764
-rw-r--r--libsndfile.64/NEWS199
-rw-r--r--libsndfile.64/dist/libsndfile-1.dllbin0 -> 1748992 bytes
-rw-r--r--libsndfile.64/include/sndfile.h857
-rw-r--r--libsndfile.64/include/sndfile.hh446
-rw-r--r--libsndfile.64/lib/libsndfile-1.def47
-rw-r--r--libsndfile.64/lib/libsndfile-1.libbin0 -> 9760 bytes
-rw-r--r--libsndfile.64/lib/pkgconfig/sndfile.pc12
-rw-r--r--mpg123.32/dist/libmpg123.dll (renamed from mpg123/dist/libmpg123.dll)bin150528 -> 150528 bytes
-rw-r--r--mpg123.32/include/mpg123.h (renamed from mpg123/include/mpg123.h)0
-rw-r--r--mpg123.32/lib/libmpg123.lib (renamed from mpg123/lib/libmpg123.lib)bin19996 -> 19996 bytes
-rw-r--r--mpg123.64/dist/libmpg123.dllbin0 -> 345088 bytes
-rw-r--r--mpg123.64/include/fmt123.h159
-rw-r--r--mpg123.64/include/mpg123.h1697
-rw-r--r--mpg123.64/lib/libmpg123.libbin0 -> 33342 bytes
-rw-r--r--premake5.lua70
-rw-r--r--rwsdk/include/d3d8/baaplylt.c793
-rw-r--r--rwsdk/include/d3d8/rpanisot.h4
-rw-r--r--rwsdk/include/d3d8/rpanisot.rpe466
-rw-r--r--rwsdk/include/d3d8/rpcollis.h12
-rw-r--r--rwsdk/include/d3d8/rpcollis.rpe466
-rw-r--r--rwsdk/include/d3d8/rpcriter.h488
-rw-r--r--rwsdk/include/d3d8/rpdbgerr.c2
-rw-r--r--rwsdk/include/d3d8/rpdbgerr.h19
-rw-r--r--rwsdk/include/d3d8/rpdmorph.h4
-rw-r--r--rwsdk/include/d3d8/rpdmorph.rpe466
-rw-r--r--rwsdk/include/d3d8/rphanim.h756
-rw-r--r--rwsdk/include/d3d8/rphanim.rpe471
-rw-r--r--rwsdk/include/d3d8/rplodatm.h5
-rw-r--r--rwsdk/include/d3d8/rplodatm.rpe466
-rw-r--r--rwsdk/include/d3d8/rplogo.h2
-rw-r--r--rwsdk/include/d3d8/rplogo.rpe466
-rw-r--r--rwsdk/include/d3d8/rpltmap.h11
-rw-r--r--rwsdk/include/d3d8/rpltmap.rpe466
-rw-r--r--rwsdk/include/d3d8/rpmatfx.h6
-rw-r--r--rwsdk/include/d3d8/rpmatfx.rpe466
-rw-r--r--rwsdk/include/d3d8/rpmipkl.h28
-rw-r--r--rwsdk/include/d3d8/rpmipkl.rpe466
-rw-r--r--rwsdk/include/d3d8/rpmorph.h3
-rw-r--r--rwsdk/include/d3d8/rpmorph.rpe466
-rw-r--r--rwsdk/include/d3d8/rppatch.h22
-rw-r--r--rwsdk/include/d3d8/rppatch.rpe466
-rw-r--r--rwsdk/include/d3d8/rpprtstd.h153
-rw-r--r--rwsdk/include/d3d8/rpprtstd.rpe472
-rw-r--r--rwsdk/include/d3d8/rpptank.h113
-rw-r--r--rwsdk/include/d3d8/rpptank.rpe466
-rw-r--r--rwsdk/include/d3d8/rppvs.h59
-rw-r--r--rwsdk/include/d3d8/rppvs.rpe466
-rw-r--r--rwsdk/include/d3d8/rprandom.h2
-rw-r--r--rwsdk/include/d3d8/rprandom.rpe466
-rw-r--r--rwsdk/include/d3d8/rpskin.h60
-rw-r--r--rwsdk/include/d3d8/rpskin.rpe466
-rw-r--r--rwsdk/include/d3d8/rpspline.h2
-rw-r--r--rwsdk/include/d3d8/rpspline.rpe466
-rw-r--r--rwsdk/include/d3d8/rpstereo.h141
-rw-r--r--rwsdk/include/d3d8/rpstereo.rpe641
-rw-r--r--rwsdk/include/d3d8/rpusrdat.h2
-rw-r--r--rwsdk/include/d3d8/rpusrdat.rpe466
-rw-r--r--rwsdk/include/d3d8/rpworld.h775
-rw-r--r--rwsdk/include/d3d8/rt2d.h195
-rw-r--r--rwsdk/include/d3d8/rt2d.rpe467
-rw-r--r--rwsdk/include/d3d8/rt2danim.h233
-rw-r--r--rwsdk/include/d3d8/rt2danim.rpe472
-rw-r--r--rwsdk/include/d3d8/rtbary.h6
-rw-r--r--rwsdk/include/d3d8/rtbary.rpe466
-rw-r--r--rwsdk/include/d3d8/rtbezpat.h11
-rw-r--r--rwsdk/include/d3d8/rtbezpat.rpe466
-rw-r--r--rwsdk/include/d3d8/rtbmp.h2
-rw-r--r--rwsdk/include/d3d8/rtbmp.rpe466
-rw-r--r--rwsdk/include/d3d8/rtcharse.h4
-rw-r--r--rwsdk/include/d3d8/rtcharse.rpe466
-rw-r--r--rwsdk/include/d3d8/rtimport.h420
-rw-r--r--rwsdk/include/d3d8/rtimport.rpe466
-rw-r--r--rwsdk/include/d3d8/rtintel.h1206
-rw-r--r--rwsdk/include/d3d8/rtintel.rpe645
-rw-r--r--rwsdk/include/d3d8/rtintsec.h4
-rw-r--r--rwsdk/include/d3d8/rtintsec.rpe466
-rw-r--r--rwsdk/include/d3d8/rtltmap.h95
-rw-r--r--rwsdk/include/d3d8/rtltmap.rpe466
-rw-r--r--rwsdk/include/d3d8/rtmipk.h4
-rw-r--r--rwsdk/include/d3d8/rtmipk.rpe466
-rw-r--r--rwsdk/include/d3d8/rtpick.h2
-rw-r--r--rwsdk/include/d3d8/rtpick.rpe466
-rw-r--r--rwsdk/include/d3d8/rtpitexd.h2
-rw-r--r--rwsdk/include/d3d8/rtpitexd.rpe466
-rw-r--r--rwsdk/include/d3d8/rtpng.h2
-rw-r--r--rwsdk/include/d3d8/rtpng.rpe466
-rw-r--r--rwsdk/include/d3d8/rtquat.h4
-rw-r--r--rwsdk/include/d3d8/rtquat.rpe466
-rw-r--r--rwsdk/include/d3d8/rtras.h2
-rw-r--r--rwsdk/include/d3d8/rtras.rpe466
-rw-r--r--rwsdk/include/d3d8/rtray.h6
-rw-r--r--rwsdk/include/d3d8/rtray.rpe466
-rw-r--r--rwsdk/include/d3d8/rtslerp.h2
-rw-r--r--rwsdk/include/d3d8/rtslerp.rpe466
-rw-r--r--rwsdk/include/d3d8/rtsplpvs.h2
-rw-r--r--rwsdk/include/d3d8/rtsplpvs.rpe466
-rw-r--r--rwsdk/include/d3d8/rttiff.h2
-rw-r--r--rwsdk/include/d3d8/rttiff.rpe466
-rw-r--r--rwsdk/include/d3d8/rttilerd.h2
-rw-r--r--rwsdk/include/d3d8/rttilerd.rpe466
-rw-r--r--rwsdk/include/d3d8/rttoc.h47
-rw-r--r--rwsdk/include/d3d8/rttoc.rpe466
-rw-r--r--rwsdk/include/d3d8/rtvcat.rpe466
-rw-r--r--rwsdk/include/d3d8/rtworld.h2
-rw-r--r--rwsdk/include/d3d8/rtworld.rpe466
-rw-r--r--rwsdk/include/d3d8/rwcore.h715
-rw-r--r--rwsdk/include/d3d8/rwplcore.h1071
-rw-r--r--src/animation/AnimBlendClumpData.h2
-rw-r--r--src/animation/AnimManager.cpp4
-rw-r--r--src/animation/AnimationId.h1
-rw-r--r--src/animation/FrameUpdate.cpp6
-rw-r--r--src/animation/RpAnimBlend.cpp6
-rw-r--r--src/audio/AudioLogic.cpp131
-rw-r--r--src/audio/AudioManager.cpp14
-rw-r--r--src/audio/AudioManager.h4
-rw-r--r--src/audio/DMAudio.cpp66
-rw-r--r--src/audio/DMAudio.h3
-rw-r--r--src/audio/MusicManager.cpp12
-rw-r--r--src/audio/oal/aldlist.cpp3
-rw-r--r--src/audio/oal/stream.cpp21
-rw-r--r--src/audio/sampman_miles.cpp17
-rw-r--r--src/audio/sampman_oal.cpp13
-rw-r--r--src/audio/soundlist.h4
-rw-r--r--src/control/CarAI.cpp8
-rw-r--r--src/control/CarCtrl.cpp6
-rw-r--r--src/control/Darkel.cpp5
-rw-r--r--src/control/GameLogic.cpp12
-rw-r--r--src/control/Garages.cpp10
-rw-r--r--src/control/Pickups.cpp4
-rw-r--r--src/control/Record.h6
-rw-r--r--src/control/Replay.cpp10
-rw-r--r--src/control/Restart.cpp8
-rw-r--r--src/control/RoadBlocks.cpp4
-rw-r--r--src/control/Script.cpp2211
-rw-r--r--src/control/ScriptCommands.h2
-rw-r--r--src/core/Cam.cpp2
-rw-r--r--src/core/Camera.cpp14
-rw-r--r--src/core/CdStreamPosix.cpp16
-rw-r--r--src/core/Collision.cpp390
-rw-r--r--src/core/Collision.h31
-rw-r--r--src/core/ControllerConfig.cpp22
-rw-r--r--src/core/ControllerConfig.h1
-rw-r--r--src/core/Directory.cpp3
-rw-r--r--src/core/EventList.cpp6
-rw-r--r--src/core/EventList.h2
-rw-r--r--src/core/FileLoader.cpp31
-rw-r--r--src/core/FileMgr.cpp53
-rw-r--r--src/core/FileMgr.h6
-rw-r--r--src/core/Frontend.cpp1017
-rw-r--r--src/core/Frontend.h58
-rw-r--r--src/core/Game.cpp35
-rw-r--r--src/core/Game.h2
-rw-r--r--src/core/General.h2
-rw-r--r--src/core/MenuScreens.cpp (renamed from src/core/MenuScreens.h)14
-rw-r--r--src/core/Pad.cpp35
-rw-r--r--src/core/PlayerInfo.cpp2
-rw-r--r--src/core/Radar.cpp45
-rw-r--r--src/core/Radar.h10
-rw-r--r--src/core/Ropes.cpp173
-rw-r--r--src/core/Ropes.h31
-rw-r--r--src/core/Stats.cpp24
-rw-r--r--src/core/Stats.h8
-rw-r--r--src/core/Streaming.cpp48
-rw-r--r--src/core/Streaming.h10
-rw-r--r--src/core/SurfaceTable.h35
-rw-r--r--src/core/TempColModels.cpp6
-rw-r--r--src/core/User.cpp8
-rw-r--r--src/core/User.h1
-rw-r--r--src/core/Wanted.cpp2
-rw-r--r--src/core/World.cpp2
-rw-r--r--src/core/Zones.cpp10
-rw-r--r--src/core/common.h5
-rw-r--r--src/core/config.h17
-rw-r--r--src/core/main.cpp28
-rw-r--r--src/core/patcher.cpp94
-rw-r--r--src/core/patcher.h144
-rw-r--r--src/core/re3.cpp31
-rw-r--r--src/entities/Building.cpp2
-rw-r--r--src/entities/Entity.cpp57
-rw-r--r--src/entities/Entity.h4
-rw-r--r--src/entities/Physical.cpp2
-rw-r--r--src/fakerw/fake.cpp75
-rw-r--r--src/fakerw/rphanim.h12
-rw-r--r--src/math/maths.h2
-rw-r--r--src/modelinfo/PedModelInfo.cpp2
-rw-r--r--src/modelinfo/VehicleModelInfo.cpp16
-rw-r--r--src/peds/CivilianPed.cpp24
-rw-r--r--src/peds/CopPed.cpp340
-rw-r--r--src/peds/CopPed.h11
-rw-r--r--src/peds/Ped.cpp2795
-rw-r--r--src/peds/Ped.h47
-rw-r--r--src/peds/PedAttractor.cpp18
-rw-r--r--src/peds/PedAttractor.h4
-rw-r--r--src/peds/PedChat.cpp10
-rw-r--r--src/peds/PedDebug.cpp19
-rw-r--r--src/peds/PedPlacement.cpp8
-rw-r--r--src/peds/PedPlacement.h2
-rw-r--r--src/peds/PedStats.cpp2
-rw-r--r--src/peds/PedType.cpp2
-rw-r--r--src/peds/PlayerPed.cpp119
-rw-r--r--src/peds/PlayerPed.h4
-rw-r--r--src/peds/Population.cpp59
-rw-r--r--src/render/Credits.cpp148
-rw-r--r--src/render/Draw.cpp6
-rw-r--r--src/render/Fluff.cpp305
-rw-r--r--src/render/Fluff.h64
-rw-r--r--src/render/Font.cpp12
-rw-r--r--src/render/Glass.cpp16
-rw-r--r--src/render/Hud.cpp366
-rw-r--r--src/render/Hud.h2
-rw-r--r--src/render/MBlur.cpp16
-rw-r--r--src/render/Occlusion.cpp436
-rw-r--r--src/render/Occlusion.h39
-rw-r--r--src/render/Particle.h1
-rw-r--r--src/render/RenderBuffer.cpp3
-rw-r--r--src/render/RenderBuffer.h10
-rw-r--r--src/render/Renderer.cpp35
-rw-r--r--src/render/Rubbish.h2
-rw-r--r--src/render/Sprite.cpp4
-rw-r--r--src/render/Sprite2d.cpp6
-rw-r--r--src/render/WaterLevel.cpp22
-rw-r--r--src/render/Weather.cpp2
-rw-r--r--src/rw/NodeName.cpp2
-rw-r--r--src/rw/RwHelper.cpp77
-rw-r--r--src/rw/RwHelper.h4
-rw-r--r--src/rw/RwMatFX.cpp113
-rw-r--r--src/rw/VisibilityPlugins.cpp12
-rw-r--r--src/rw/VisibilityPlugins.h7
-rw-r--r--src/save/GenericGameStorage.cpp2
-rw-r--r--src/skel/crossplatform.cpp129
-rw-r--r--src/skel/crossplatform.h30
-rw-r--r--src/skel/glfw/glfw.cpp51
-rw-r--r--src/skel/platform.h6
-rw-r--r--src/skel/win/win.cpp146
-rw-r--r--src/skel/win/win.h22
-rw-r--r--src/text/Text.cpp26
-rw-r--r--src/text/Text.h14
-rw-r--r--src/vehicles/Automobile.cpp8
-rw-r--r--src/vehicles/Bike.cpp2
-rw-r--r--src/vehicles/Boat.cpp959
-rw-r--r--src/vehicles/Boat.h28
-rw-r--r--src/vehicles/CarGen.cpp17
-rw-r--r--src/vehicles/CarGen.h2
-rw-r--r--src/vehicles/Cranes.cpp6
-rw-r--r--src/vehicles/Floater.cpp177
-rw-r--r--src/vehicles/Floater.h2
-rw-r--r--src/vehicles/Heli.cpp148
-rw-r--r--src/vehicles/Heli.h9
-rw-r--r--src/vehicles/Plane.cpp273
-rw-r--r--src/vehicles/Plane.h14
-rw-r--r--src/vehicles/Vehicle.cpp18
-rw-r--r--src/vehicles/Vehicle.h2
-rw-r--r--src/weapons/Explosion.cpp2
-rw-r--r--src/weapons/Explosion.h2
-rw-r--r--src/weapons/WeaponInfo.cpp2
267 files changed, 23762 insertions, 29922 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index f4b28dd4..9e54f5ab 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -24,7 +24,7 @@ install:
- cmd: >-
git submodule update --init --recursive
- premake5 vs2019 --with-librw --glewdir=%APPVEYOR_BUILD_FOLDER%/%GLEW_BASE% --glfwdir=%APPVEYOR_BUILD_FOLDER%/%GLFW_BASE%
+ premake5 vs2019 --with-librw --glewdir=%APPVEYOR_BUILD_FOLDER%/%GLEW_BASE% --glfwdir32=%APPVEYOR_BUILD_FOLDER%/%GLFW_BASE%
build:
project: build/reVC.sln
diff --git a/README.md b/README.md
index e96afb58..d9121eff 100644
--- a/README.md
+++ b/README.md
@@ -21,8 +21,6 @@ such that we have a working game at all times.
## Preparing the environment for building
-Currently only building on VS2015/2017/2019 (Windows) and GCC (Linux) is tested.
-
- Clone the repo.
- Run `git submodule init` and `git submodule update`.
- Point GTA_III_RE_DIR environment variable to GTA3 root folder.
@@ -30,8 +28,12 @@ Currently only building on VS2015/2017/2019 (Windows) and GCC (Linux) is tested.
- On Windows: one of the `premake-vsXXXX.cmd` variants on root folder
- On Linux: proceed to [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux).
- There are various settings at the very bottom of [config.h](https://github.com/GTAmodding/re3/tree/master/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
+- **If you use 64-bit D3D9**: We don't ship 64-bit Dx9 SDK. You need to download it from Microsoft if you don't have it(although it should come pre-installed after some Windows version)
+
+
+> :information_source: **If you choose OpenAL(OAL) on Windows** You must read [Running OAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OAL-build-on-Windows).
-> :information_source: **Rendering engine** re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.
+> :information_source: **Did you notice librw?** re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.
## Contributing
diff --git a/librw b/librw
-Subproject 556f6af1b5a15d5ba1a2254a95076578cd16018
+Subproject 99c15d5ed78cc112e1055cc89452dd57df28da5
diff --git a/libsndfile/ChangeLog b/libsndfile.32/ChangeLog
index 62576177..62576177 100644
--- a/libsndfile/ChangeLog
+++ b/libsndfile.32/ChangeLog
diff --git a/libsndfile/NEWS b/libsndfile.32/NEWS
index d8f549f4..d8f549f4 100644
--- a/libsndfile/NEWS
+++ b/libsndfile.32/NEWS
diff --git a/libsndfile/dist/libsndfile-1.dll b/libsndfile.32/dist/libsndfile-1.dll
index 95ce5bd0..95ce5bd0 100644
--- a/libsndfile/dist/libsndfile-1.dll
+++ b/libsndfile.32/dist/libsndfile-1.dll
Binary files differ
diff --git a/libsndfile/include/sndfile.h b/libsndfile.32/include/sndfile.h
index 8a60fb09..8a60fb09 100644
--- a/libsndfile/include/sndfile.h
+++ b/libsndfile.32/include/sndfile.h
diff --git a/libsndfile/include/sndfile.hh b/libsndfile.32/include/sndfile.hh
index 0e1c1c20..0e1c1c20 100644
--- a/libsndfile/include/sndfile.hh
+++ b/libsndfile.32/include/sndfile.hh
diff --git a/libsndfile/lib/libsndfile-1.def b/libsndfile.32/lib/libsndfile-1.def
index 4194ff3e..4194ff3e 100644
--- a/libsndfile/lib/libsndfile-1.def
+++ b/libsndfile.32/lib/libsndfile-1.def
diff --git a/libsndfile/lib/libsndfile-1.lib b/libsndfile.32/lib/libsndfile-1.lib
index cc266ecd..cc266ecd 100644
--- a/libsndfile/lib/libsndfile-1.lib
+++ b/libsndfile.32/lib/libsndfile-1.lib
Binary files differ
diff --git a/libsndfile/lib/pkgconfig/sndfile.pc b/libsndfile.32/lib/pkgconfig/sndfile.pc
index 428d708a..428d708a 100644
--- a/libsndfile/lib/pkgconfig/sndfile.pc
+++ b/libsndfile.32/lib/pkgconfig/sndfile.pc
diff --git a/libsndfile.64/ChangeLog b/libsndfile.64/ChangeLog
new file mode 100644
index 00000000..62576177
--- /dev/null
+++ b/libsndfile.64/ChangeLog
@@ -0,0 +1,9764 @@
+2013-04-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Makefile.am
+ Make sure checkprograms are built as part of 'make test-tarball'.
+ Closes: https://github.com/erikd/libsndfile/issues/37
+
+2013-03-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/dft_cmp.c
+ Fix a buffer overflow detected using GCC 4.8's -fsantiize=address runtime
+ error checking functionality. This was a buffer overflow in libsndfile's
+ test suite, not in the actual library code.
+
+2013-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * M4/gcc_version.m4
+ Fix to work with OpenBSD's sed.
+
+2013-03-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ALAC/alac_encoder.c
+ Patch from Michael Pruett (author of libaudiofile) to add correct byte
+ swapping for the mChannelLayoutTag field.
+
+2013-03-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/bugs.html
+ Bugs should bt reported on the github issue tracker.
+
+2013-02-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Improve sanitization of FLAC_CFLAGS value.
+
+2013-02-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/Makefile.am
+ Call python interpreter instead of using '#!' in script. Thanks to Jan
+ Stary for reporting this.
+
+ * doc/index.html doc/FAQ.html
+ Make internal links relative. Patch from Jan Stary.
+
+2013-02-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_endswap.def src/test_endswap.tpl
+ Add tests for psf_put_be32() and psf_put_be64().
+
+ * src/sfendian.h src/test_endswap.(def|tpl)
+ Add functions psf_get_be(16|32|64) with tests.
+ These are needed for platforms where un-aligned accesses cause bus faults.
+
+ * src/ALAC/ag_enc.c src/ALAC/alac_decoder.c
+ Replace all un-aligned accesses with safe alternatives.
+ Closes: https://github.com/erikd/libsndfile/issues/19
+
+2013-02-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfendian.h
+ Add big endian versions of H2BE_16 and H2BE_32.
+
+2013-02-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ALAC/
+ Replace Apple endswap routines with ones from libsndfile.
+
+ * merge from libsndfile-cart repo
+ Add ability to set and get a cart chunk with WAV and RF64.
+ Orignal patch by Chris Roberts <c.roberts@csrfm.com> required a number of
+ tweaks.
+
+2013-02-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Bump SF_HEADER_LEN from 8192 to 12292, the value it was in the 1.0.25
+ release.
+
+2013-02-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/alac.c
+ Fix segfault when encoding 8 channel files.
+ Closes: https://github.com/erikd/libsndfile/issues/30
+
+2013-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ALAC/EndianPortable.c
+ Fall back to compiler's __BYTE_ORDER__ for endian-ness detection.
+
+2013-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/common.h src/ima_adpcm.c src/ms_adpcm.c src/paf.c
+ Drop tests for and #ifdef hackery for C99 struct flexible array feature.
+ libsndfile assumes the compiler supports most of the ISO C99 standard.
+
+ * src/alac.c
+ Fix valgrind invalid realloc. Reported by nu774.
+ Closes: https://github.com/erikd/libsndfile/issues/31
+
+2013-02-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/alac.c
+ The 'pakt' chunk header should now be written correctly.
+ Closes: https://github.com/erikd/libsndfile/issues/24
+
+ * configure.ac Makefile.am
+ Use PKG_INSTALLDIR when it exists. Suggestion from Christoph Thompson.
+ Closes: https://github.com/erikd/libsndfile/pull/28
+
+2013-02-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/caf.c
+ Read the ALAC 'pakt' header and stash the values.
+
+ * src/sfendian.h
+ Add functions psf_put_be64() and psf_put_be32().
+
+ * src/alac.c
+ Start work on filling on the 'pakt' chunk header.
+
+2013-02-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Add missing opening <P> tag.
+
+ * src/alac.c
+ Increase ALAC_BYTE_BUFFER_SIZE to 82000.
+
+2013-01-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Improve question #8.
+
+2013-01-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg_opus.c
+ Add skeleton implementation so someone else can run with it.
+
+2012-12-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/dwd.c src/rx2.c src/txw.c
+ Fix for compiling when configured with --enable-experimental. Thanks to
+ Eric Wong for reporting this.
+
+2012-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac programs/sndfile-play.c
+ OS X 10.8 uses a different audio API to previous versions.
+ Fix compile failure on by disabling sndfile-play on this version.
+ Someone needs to supply code for the new API.
+
+2012-11-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Octave/Makefile.am Octave/octave_test.sh
+ Fix 'make distcheck'.
+
+2012-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * M4/octave.m4
+ Relax constraints on Octave version.
+
+2012-10-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl
+ Improve compare_*_or_die() functions.
+
+ * src/command.c
+ Fix bug reported by Keiler Florian. When reading short or int data from a
+ file containing float data, and setting SFC_SET_SCALE_FLOAT_INT_READ to
+ SF_TRUE would fail 3, 5, 7 and other channels counts. Problem was that
+ psf_calc_signal_max() was not calculating the signal max correctly.
+ Calculation of the signal max was failing because it was trying to read
+ a sample count that was not an integer multiple of the channel count.
+
+ * tests/channel_test.c tests/Makefile.am tests/test_wrapper.sh.in
+ Add test for the above.
+
+2012-09-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Added a constructor to allow the use of SF_VIRTUAL_IO. Patch from
+ DannyDaemonic : https://github.com/erikd/libsndfile/pull/20
+
+2012-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/octave.html
+ Fix link to octave.sourceforge.net. Thanks to IOhannes m zmoelnig.
+
+ * src/mat5.c
+ Allow reading of mat5 files without a specified sample rate (default to
+ 44.1kHz). Thanks to IOhannes m zmoelnig.
+
+2012-08-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c
+ Error out if channel count is zero. Bug report from William ELla via
+ launchpad:
+ https://bugs.launchpad.net/ubuntu/+source/libsndfile/+bug/1036831
+
+2012-08-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac programs/sndfile-play.c
+ Patch from Ricci Adams to use OSX's AudioQueues on OSX 10.7 and greater.
+
+2012-07-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/common.c
+ Accept "ogg" as a file extention for Ogg/Vorbis files.
+
+2012-06-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Make sure any previously allocated FLAC stream encoder and stream decoder
+ objects are deleted before a new one is allocated.
+
+2012-06-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl
+ Rename gen_lowpass_noise_float() to gen_lowpass_signal_float() and add a
+ sine wave component so that different FLAC compression levels can be
+ tested.
+
+ * src/sndfile.h.in doc/command.html
+ Add SFC_SET_COMPRESSION_LEVEL and document it.
+
+ * src/sndfile.c
+ Catch SFC_SET_VBR_ENCODING_QUALITY command and implement it as the inverse
+ of SFC_SET_COMPRESSION_LEVEL.
+
+ * src/ogg_vorbis.c src/flac.c
+ Implement SFC_SET_COMPRESSION_LEVEL command.
+
+ * tests/test_wrapper.sh.in tests/compression_size_test.c
+ Use the compression_size_test on FLAC as well.
+
+2012-06-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/
+ Rename vorbis_test.c -> compression_size_test.c so it can be extended to
+ test FLAC as well.
+
+2012-06-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/broadcast.c
+ Fix a bug where a file with a 'bext' chunk with a zero length coding
+ history field would get corrupted when the file was closed.
+ Reported by Paul Davis of the Ardour project.
+
+ * src/test_broadcast_var.c
+ Add a test for the above.
+
+2012-05-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ sf_format_check: For SF_FORMAT_AIFF, reject endian-ness setttings for
+ non-PCM formats.
+
+2012-04-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix regression in handling of odd length SSND chunks.
+ Thanks Olivier Tristan for the example file.
+
+ * src/aiff.c src/wav.c
+ Exit parser loop when marker == 0.
+
+2012-04-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Fix text. Thanks to Richard Collins.
+
+2012-03-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/caf.c
+ Exit parse loop if the marker is zero. Pass jump offsets as size_t instead
+ of int.
+
+2012-03-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/alac.c
+ Fix segfault when decoding CAF/ALAC file with more than 4 channels.
+ Fixes github issue #8 reported by Charles Van Winkle.
+
+2012-03-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Change 'typedef SF_CHUNK_ITERATOR { ... } SF_CHUNK_ITERATOR' into 'struct
+ SF_CHUNK_ITERATOR { ... }' to prevent older compilers from complaining of
+ re-typedef-ing of SF_CHUNK_ITERATOR.
+
+ * configure.ac
+ Fix if test for empty $prefix.
+
+2012-03-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c tests/chunk_test.c
+ Reworking of custom chunk handling code.
+ - Memory for the iterator is now attached to the SF_PRIVATE struct and
+ freed one sf_close().
+ - Rename sf_create_chunk_iterator() -> sf_get_chunk_iterator().
+ - Each SNDFILE handle never has more than one SF_CHUNK_ITERATOR handle.
+
+ * tests/string_test.c
+ Fix un-initialised char buffer.
+
+2012-03-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c tests/chunk_test.c
+ Add improved handling of custom chunk getting and settings. Set of patches
+ from IOhannes m zmoelnig submitted via github pull request #6.
+
+ * src/alac.c
+ Fix calculated frame count for files with zero block length.
+
+2012-03-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/avr.c
+ Remove double assignment to psf->endian. Thanks Kao Dome.
+
+ * src/gsm610.c
+ Fix clearing of buffers. Thanks Kao Dome.
+
+ * src/paf.c
+ Remove duplicate code. Thanks Kao Dome.
+
+ * src/test_strncpy_crlf.c
+ Fix minor error in test. Thanks Kao Dome.
+
+ * src/common.h src/*.c
+ Fix a bunch of valgrind errors.
+
+2012-03-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix typo in error string 'Uknown' -> 'Unknown'.
+
+ * tests/fix_this.c
+ Fix potential int overflow.
+
+2012-03-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/alac.c
+ Fix decoding of last block so that the decode length is not a multiple of
+ the block length. Fixes github issue #4 reported by Charles Van Winkle.
+
+ * src/sfconfig.h src/sfendian.h
+ Fix for MinGW cross compiling. Use '#if (defined __*66__)' instead of
+ '#if __*86__' because the MinGW header use '#ifdef __x86_64__'.
+
+2012-03-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ALAC/ src/alac.c
+ Unify the interface between libsndfile and Apple ALAC codec. Regardless of
+ file bit width samples are now passed between the two as int32_t that are
+ justified towards the most significant bit. Without this modification, 16
+ conversion functions would have been needed between the libsndfile (short,
+ int, float, double) types and the ALAC types (16, 20, 24 and 32 bit). With
+ this mod, only 4 are needed.
+
+ * tests/floating_point_test.tpl tests/write_read_test.(def|tpl)
+ Add tests for 20 and 24 bit ALAC/CAF files.
+
+ * src/command.c
+ Add ALAC/CAF to the SFC_GET_FORMAT_* commands. Fixes github issue #5.
+
+ * configure.ac
+ Only use automake AM_SLIENT_RULES where supported. Thanks Dave Yeo.
+
+ * tests/pipe_test.tpl
+ Disable tests on OS/2. Thanks Dave Yeo.
+
+2012-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/sfconfig.h src/sfendian.h
+ For GCC, use inline assembler for endian swapping. This should work with
+ older versions of GCC like the one currently used in OS/2.
+
+2012-03-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/alac.c
+ Make sure temp file gets opened in binary mode.
+
+ * src/alac.c src/common.c src/common.h
+ Fix function alac_write16_d().
+
+ * tests/floating_point_test.tpl
+ Add tests for 16 bit ALAC/CAF.
+
+ * src/alac.c src/common.c src/common.h
+ Add support for 32 bit ALAC/CAF files.
+
+ * tests/floating_point_test.tpl tests/write_read_test.tpl
+ Add tests for 32 bit ALAC/CAF files.
+
+2012-03-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/
+ Refactor chunk storage so it work on big as well as little endian CPUs.
+
+ * tests/chunk_test.c
+ Clean up error messages.
+
+ * src/sfendian.h src/*.c
+ Rename endian swapping macros and add ENDSWAP_64 and BE2H_64.
+
+ * configure.ac
+ Detect presence of <x86intrin.h> header file.
+
+ * src/sfendian.h
+ Use <x86intrin.h> intrinsics (ie for MinGW) when <byteswap.h> is not
+ present.
+ Make ENDSWAP_64() work with i686-w64-mingw32 compiler.
+
+ * src/ALAC/EndianPortable.c
+ Add support for __powerpc__.
+
+ * src/sfconfig.h
+ Make sure HAVE_X86INTRIN_H is either 1 or 0.
+
+2012-03-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ALAC/*
+ Big dump of code for Apple's ALAC file format. The copyyright to this code
+ is owned by Apple who have released it under an Apache style license. A few
+ small modifications were made to allow this to be integrated into libsndfile
+ but unfortunately the history of those changes were lost because they were
+ developed in a Bzr tree and during that time libsndfile moved to Git.
+
+ * src/alac.c src/caf.c src/common.[ch] src/Makefile.am src/sndfile.h.in
+ src/sndfile.c
+ Hook new ALAC codec in.
+
+ * programs/sndfile-convert.c
+ Add support for alac codec.
+
+ * tests/write_read_test.tpl
+ Expand tests to cover ALAC.
+
+2012-03-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/wav.c
+ Fix a couple of regressions from version 1.0.25.
+
+2012-03-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/strings.c
+ Minor refactoring. Make sure that the memory allocation size if always > 0
+ to avoid undefined behaviour.
+
+2012-02-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/chunk.c
+ Fix buffer overrun introduced in recently added chunk logging. This chunk
+ logging has not yet made it to a libsndfile release version. Thanks to
+ Olivier Tristan for providing an example file.
+
+ * src/wav.c
+ Fix handling of odd sized chunks which was causing the parser to lose some
+ chunks. Thanks to Olivier Tristan for providing an example file.
+
+2012-02-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/util.tpl
+ Used gnu_printf format checking with mingw-w64 compiler.
+
+ * tests/header_test.tpl
+ Printf format fixes.
+
+2012-02-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * M4/extra_pkg.m4
+ Update PKG_CHECK_MOD_VERSION macro to add an AC_TRY_LINK step. This fix
+ allows the configure process to catch attempts to link incompatible
+ libraries. For example, linking 32 bit version of eg libFLAC to a 64 bit
+ version of libsndfile will now fail. Similarly, when cross compiling
+ libsndfile from Linux to Windows linking the Linux versions of a library
+ to the Windows version of libsndfile will now also fail.
+
+ * src/sndfile.h.in src/sndfile.c src/common.h src/create_symbols_file.py
+ Add API function sf_current_byterate().
+
+ * src/dwvw.c src/flac.c src/ogg_vorbis.c src/sds.c
+ Add codec specific handlers for current byterate.
+
+ * tests/floating_point_test.tpl
+ Add initial test for sf_current_byterate().
+
+2012-02-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.[ch]
+ Add function psf_decode_frame_count().
+
+ * src/dwvw.c
+ Fix a termnation bug that caused the decoder to go into an infinite loop.
+
+2012-02-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fix a regression in the WAV header parser. Thanks to Olivier Tristan for
+ bug report and the example file.
+
+2012-02-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Return error when SF_BROADCAST_INFO struct has bad coding_history_size.
+ Thanks to Alex Weiss for the report.
+
+2012-02-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au.c src/flac.c src/g72x.c src/ogg_vorbis.c src/wav_w64.c
+ Don't fake psf->bytewidth values.
+
+2012-02-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/string_test.c
+ Fix valgrind warnings.
+
+ * src/common.h src/sndfile.c src/strings.c
+ Make string storage dynamically allocated.
+
+ * src/sndfile.c
+ Add extra validation for custom chunk handling.
+
+2012-02-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Improve handlling unknown chunk types. Thanks to Olivier Tristan for sending
+ example files.
+
+ * src/utils.tpl
+ Add GCC specific testing for format string parameters for exit_if_true().
+
+ * tests/*.c tests/*.tpl
+ Fix all printf format warnings.
+
+ * programs/sndfile-play.c
+ Remove un-needed OSX include <Carbon.h>. Thanks jamesfmilne for github
+ issue #3.
+
+ * tests/chunk_test.c
+ Extend custom chunk test.
+
+2012-02-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Jump over some more chunk types while parsing.
+
+2012-02-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/strings.c
+ Change way strings are stored in SF_PRIVATE in preparation for dynamically
+ allocating the storage.
+
+2012-02-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src*.c
+ Improve encapsulation of string data in SF_PRIVATE.
+
+2012-02-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src*.c
+ Remove the buffer union from SF_PRIVATE. Most uses of this have been
+ replaced with a BUF_UNION that is allocated on the stack.
+
+2012-01-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src*.c
+ Rename logbuffer field of SF_PRIVATE to parselog and reduce its size.
+ Put the parselog buffer and the index inside a struct within SF_PRIVATE.
+
+2012-01-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fix typo, FLAC_CLFAGS -> FLAC_CFLAGS. Thanks to Jeremy Friesner.
+
+2012-01-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/ogg.c
+ Fix misleading error message when trying to create an SF_FORMAT_OGG file
+ with anything other than SF_FORMAT_FILE. Thanks to Charles Van Winkle for
+ the bug report. Github issue #1.
+
+2012-01-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/wav.c
+ Allow files opened in RDWR mode with string data in the tailer to be
+ extended. Thanks to Bodo for the patch.
+
+ * tests/string_test.c
+ Add tests for the above changes (patch from Bodo).
+
+2012-01-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Refactor reading of chunk size and use of psf_store_read_chunk().
+
+ * src/(caf|wav).c
+ Correct storing of chunk offset.
+
+2012-01-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/wav.c src/common.h
+ Refactor common code into src/common.h.
+
+ * src/caf.c
+ Make custom chunks work for CAF files.
+
+ * tests/chunk_test.c tests/test_wrapper.sh.in
+ Test CAF files with custom chunks.
+
+ * src/sndfile.c
+ Prevent psf->codec_close() being called more than once.
+
+2012-01-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-cmp.c
+ Catch the case where the second file has more frames than the first.
+
+2012-01-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/create_symbols_file.py
+ Add sf_set_chunk/sf_get_chunk_size/sf_get_chunk_data.
+
+2011-12-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/chunk_test.c tests/Makefile.am
+ New test for custom chunks.
+
+ * src/aiff.c src/chunk.c src/common.h src/sndfile.c
+ Make custom chunks work on AIFF files.
+
+ * src/wav.c
+ Make custom chunks work on WAV files (includes refactoring).
+
+2011-11-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/common.h src/sndfile.c
+ Start working on setting/getting chunks.
+
+2011-11-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/binheader_writef_check.py src/create_symbols_file.py
+ Make it work for Python 2 and 3. Thanks Michael.
+
+2011-11-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * libsndfile.spec.in
+ Change field name 'URL' to 'Url'.
+
+ * src/sndfile.h.in
+ Add SF_SEEK_SET/CUR/END.
+
+2011-11-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/id3.c
+ Fix a stack overflow that can occur when parsing a file with multiple
+ ID3 headers which would cause libsndfile to go into an infinite recursion
+ until it blew the stack. Thanks to Anders Svensson for supplying an example
+ file.
+
+2011-10-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/double64.c src/float32.c src/common.h
+ Make (float32|double_64)_(be|le)_read() functions const correct.
+
+2011-10-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfendian.h
+ Minor tweaking of types. Cast to ptr to correct final type rather void*.
+
+ * programs/sndfile-play.c tests/utils.tpl
+ Fix compiler warnings with latest MinGW cross compiler.
+
+2011-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Use the non-deprecated resource fork name on OSX. Thanks to Olivier Tristan.
+
+2011-10-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Jump over the 'olym' chunks when parsing.
+
+2011-10-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl
+ Remove windows only truncate() implementation.
+
+2011-09-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sd2.c src/sndfile.c
+ Make sure 23 bit PCM SD2 files are readable/writeable.
+
+ * tests/write_read_test.tpl
+ Add tests for 32 bit PCM SD2 files.
+
+2011-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Use AC_SYS_LARGEFILE instead of AC_SYS_EXTRA_LARGEFILE as suggested by
+ Jan Willies.
+
+2011-08-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac Makefile.am
+ Move ACLOCAL_AMFLAGS setup to Makefile.am.
+
+2011-07-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Merge two separate blocks of SFC_SET_VBR_ENCODING_QUALITY documentation.
+
+ * src/paf.c
+ Replace ppaf24->samplesperblock with a compile time constant.
+
+2011-07-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg_vorbis.c
+ Fix return value of SFC_SET_VBR_ENCODING_QUALITY command.
+
+ * doc/command.html
+ Document SFC_SET_VBR_ENCODING_QUALITY, SFC_GET/SET_LOOP_INFO and
+ SFC_GET_INSTRUMENT.
+
+ * NEWS README configure.ac doc/*.html
+ Updates for 1.0.25.
+
+2011-07-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfconfig.h
+ Add handling for HAVE_SYS_WAIT_H.
+
+ * Makefile.am src/Makefile.am tests/Makefile.am
+ Add 'checkprograms' target.
+
+2011-07-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/sndfile.c
+ Purge SF_ASSERT macro. Use standard C assert instead.
+
+ * src/paf.c src/common.h src/sndfile.c
+ Fix for Secunia Advisory SA45125, heap overflow (heap gets overwritten with
+ byte value of 0) due to integer overflow if PAF file handler.
+
+ * src/ima_adpcm.c src/ms_adpcm.c src/paf.c
+ Use calloc instead of malloc followed by memset.
+
+ * tests/utils.tpl
+ Clean up use of memset.
+
+2011-07-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg.c
+ Fix log message.
+
+ * tests/format_check_test.c
+ Fix compiler warnings.
+
+2011-07-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix error message for erro code SFE_ZERO_MINOR_FORMAT.
+
+ * tests/format_check_test.c
+ Add a test to for SF_FINFO format field validation.
+
+ * src/ogg.c src/ogg_vorbis.c src/ogg.h src/ogg_pcm.c src/ogg_speex.c
+ src/common.h src/Makefile.am
+ Move vorbis specific code to ogg_vorbis.c, add new files for handling PCM
+ and Speex codecs in an Ogg container. The later two are only enabled with
+ ENABLE_EXPERIMENTAL_CODE config variable.
+
+2011-06-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/strings.c
+ Clean up and refactor storage of SF_STR_SOFTWARE.
+
+2011-06-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in doc/api.html
+ Fix definition of SF_STR_LAST and update SF_STR_* related docs. Thanks to
+ Tim van der Molen for the patch.
+
+2011-06-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-interleave.c
+ Fix handling of argc. Thanks to Marius Hennecke.
+
+ * src/wav_w64.c
+ Accept broken WAV files with blockalign == 0. Thanks to Olivier Tristan for
+ providing example files.
+
+ * src/wav.c
+ Jump over 'FLLR' chunks.
+
+2011-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Fix -Wundef warning due to ENABLE_SNDFILE_WINDOWS_PROTOTYPES.
+
+ * configure.ac
+ Add -Wundef to CFLAGS.
+
+ * src/ogg.c
+ Fix -Wunder warning.
+
+2011-05-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Use int64_t instead of off_t when they are the same size.
+
+ * src/Makefile.am tests/Makefile.am
+ Use check_PROGRAMS instead of noinst_PROGRAMS where appropriate.
+
+2011-05-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Don't allow unknown and/or un-editable chunks to prevent the file from being
+ opened in SFM_RDWR mode.
+
+2011-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/format_check_test.c
+ Fix segfault in test program.
+
+2011-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/format_check_test.c
+ New test program to check to make sure that sf_open() and sf_check_format()
+ agree as to what is a valid program.
+
+ * tests/Makefile.am tests/test_wrapper.sh.in
+ Hook into build and test runner.
+
+ * src/sndfile.c
+ Fix some sf_format_check() problems. Thanks to Charles Van Winkle for the
+ notification.
+
+2011-04-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/caf.c
+ Add validation to size of 'data' chunk and fix size of written 'data'
+ chunk. Thanks to Michael Pruett for reporting this.
+
+2011-03-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/* tests/* programs/*
+ Fix a bunch of compiler warnings with gcc-4.6.
+
+2011-03-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/util.tpl
+ Add NOT macro to util.h.
+
+ * src/strings.c
+ Fix handling of SF_STR_SOFTWARE that resulted in a segfault due to calling
+ strlen() on an unterminated string. Thanks to Francois Thibaud for reporting
+ this problem.
+
+ * tests/string_test.c
+ Add test for SF_STR_SOFTWARE segfault bug.
+
+ * configure.ac
+ Sanitize FLAC_CFLAGS value supplied by pkg-config which returns a value of
+ '-I${includedir}/FLAC'. However FLAC also provides an include file
+ <assert.h> which clashes with the Standard C header of the same name. The
+ solution is strip the 'FLAC' part off the end and include all FLAC headers
+ as <FLAC/header.h>.
+
+ * configure.ac src/Makefile.am
+ Use non-recursive make in src/ directory.
+
+2011-03-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * NEWS README docs/*.html
+ Updates for 1.0.24 release.
+
+2011-03-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fix up usage of sed (should not assume GNU sed).
+
+ * M4/add_(c|cxx)flags.m4
+ Test flags in isolation.
+
+ * tests/cpp_test.cc
+ Fix a broken test (test segfaults). Report by Dave Flogeras.
+
+2011-03-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/common.[ch]
+ Add function program_name() which returns the program name minus the path
+ from argv [0].
+
+ * programs/*.c programs/Makefile.am
+ Use program_name() where appropriate. Fix build.
+
+2011-03-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ For u-law and A-law files, write an 18 byte 'fmt ' chunk instead of a 16
+ byte one. Win98 accepts files with a 16 but not 18 byte 'fmt' chunk. Later
+ version accept 18 byte but not 16 byte.
+
+2011-03-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Add examples for question 12.
+
+ * doc/libsndfile.css.in
+ Add tweaks for h4 element.
+
+ * doc/api.html
+ Add documentation for virtual I/O functionality. Thanks to Uli Franke.
+
+ * tests/util.tpl
+ Add static inline functions sf_info_clear() and sf_info_setup().
+
+ * tests/(alaw|dwvw|ulaw)_test.c
+ Use functions sf_info_clear() and sf_info_setup().
+
+2011-03-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fail more gracefully if pkg-config is missing. Suggestion from Brian
+ Willoughby.
+
+2011-02-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Use size_t instead of int for size params with varargs.
+
+2011-02-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Update supported platforms with more Debian platforms and Android.
+
+2011-01-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Add an LPCWSTR version of the SndfileHandle constructor to the SndfileHandle
+ class definition. Thanks to Eric Eizenman for pointing out this was missing.
+
+ * tests/cpp_test.cc
+ Add test for LPCWSTR version of the SndfileHandle constructor.
+
+2011-01-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-play.c
+ Remove cruft.
+
+2010-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Add methods rawHandle() and takeOwnership(). Thanks to Tim Blechmann for
+ the patch.
+
+ * tests/cpp_test.cc
+ Add tests for above two methods. Also supplied by Tim Blechmann.
+
+2010-11-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Add mention of use of sf_strerror() when sf_open() fails.
+
+2010-11-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Make TYPEOF_SF_COUNT_T int64_t where possible. This may fix problems where
+ people are compiling on a 64 bit system with the GCC -m32 flag.
+
+ * src/sndfile.h.in
+ Fix comments on sf_count_t.
+
+2010-10-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Handle non-zero offset field in SSND chunk. Thanks to Michael Chinen.
+
+2010-10-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Sed fix for FreeBSD. Thanks Tony Theodore.
+
+2010-10-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * shave.in M4/shave.m4
+ Fix shave invocation of windres compiler. Thanks Damien Lespiau (upstream
+ shave author).
+
+ * configure.ac M4/shave.m4 shave-libtool.in shave.in
+ Switch from shave to automake-1.11's AM_SILENT_RULES.
+
+2010-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * shave-libtool.in shave.in
+ Sync to upstream version.
+
+ * src/rf64.c
+ More work to make the parser more robust and accepting of mal-formed files.
+
+2010-10-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add functions psf_strlcpy() and psf_strlcat().
+
+ * src/broadcast.c src/sndfile.c src/strings.c src/test_main.c
+ src/test_main.h src/test_strncpy_crlf.c
+ Use functions psf_strlcpy() and psf_strlcat() as appropriate.
+
+ * tests/string_test.c
+ Add tests for SF_STR_GENRE and SF_STR_TRACKNUMBER.
+
+ * src/rf64.c
+ Fix size of 'ds64' chunk when writing RF64.
+
+2010-10-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/*.c
+ Add the libsndfile version to the usage message of all programs.
+
+2010-10-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/version-metadata.rc.in src/Makefile.am
+ Add version string resources to the windows DLL.
+
+ * doc/api.html
+ Update to add missing SF_FORMAT_* values. Closed Debian bug #545257.
+
+ * NEWS README configure.ac doc/*.html
+ Updates for 1.0.23 release.
+
+2010-10-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pedantic-header-test.sh.in
+ Handle unusual values of CC environment variable.
+
+ * src/rf64.c
+ Minor tweaks and additional sanity checking.
+
+ * src/Makefile.am src/binheader_writef_check.py
+ Use python 2.6.
+
+2010-10-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Add a missing 'inline' before a constructor defintion.
+
+2010-10-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add macro NOT.
+
+ * src/rf64.c
+ Minor tweaks.
+
+ * Makefile.am */Makefile.am
+ Add *~ to CLEANFILES.
+
+2010-10-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix a typo in the error string for SFE_OPEN_PIPE_RDWR. Thanks to Charles
+ Van Winkle for the report.
+
+2010-10-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c src/ogg.c src/sndfile.h.in src/strings.c src/wav.c
+ Add ability to read/write tracknumber and genre to flac/ogg/wav files.
+ Thanks to Matti Nykyri for the patch.
+
+ * src/common.h src/broadcast.c src/strings.c
+ Add function psf_safe_strncpy() and use where appropriate.
+
+2010-10-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * NEWS README configure.ac doc/*.html
+ Updates for 1.0.22 release.
+
+2010-10-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/broadcast.c src/rf64.c src/sndfile.c src/wav.c
+ Rewrite of SF_BROADCAST_INFO handling.
+
+ * src/test_broadcast_var.c tests/command_test.c
+ Tweak SF_BROADCAST_INFO tests.
+
+ * src/test_broadcast_var.c
+ Fix OSX stack check error.
+
+2010-09-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sds.c
+ Set sustain_loop_end to 0 as suggested by Brian Lewis.
+
+2010-09-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sds.c
+ Make sure the correct frame count gets written into the header.
+
+ * tests/write_read_test.tpl
+ Don't allow SDS files to have a long frame count.
+
+2010-09-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sds.c
+ Apply a pair of patches from Brian Lewis to fix the packet number location
+ and the checksum.
+
+2010-09-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/file_io.c src/ogg.c src/rf64.c src/sndfile.c
+ src/strings.c src/test_audio_detect.c src/test_strncpy_crlf.c
+ src/wav.c tests/pcm_test.tpl
+ Fix a bunch of minor issues found using static analysis.
+
+2010-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_broadcast_var.c
+ New file containing tests for broadcast_set_var().
+
+ * src/Makefile.am src/test_main.[ch]
+ Hook test_broadcast_var.c into tests.
+
+2010-08-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/broadcast.c src/common.(c|h)
+ Move function strncpy_crlf() to src/common.c so the function can be tested
+ in isolation.
+
+ * src/test_strncpy_crlf.c
+ New file.
+
+ * src/Makefile.am src/test_main.[ch]
+ Hook test_strncpy_crlf.c into tests.
+
+2010-08-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Move code around to make comments make sense.
+
+ * src/broadcast.c
+ Add debugging code that is disabled by default.
+
+2010-08-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ When the file meta data says the file has zero frames set psf->sf.frames
+ to SF_COUNT_MAX. Fixes Debian bug #590752.
+
+ * programs/sndfile-info.c
+ Print 'unknown' if frame count == SF_COUNT_MAX.
+
+2010-06-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Only support writing mono SVX files. Multichannel SVX files are not
+ interleaved and there is no support infrastructure to cache and write
+ multiple channels to create a non-interleaved file.
+
+ * src/file_io.c
+ Don't call close() on a file descriptor of -1. Thanks to Jeremy Friesner
+ for the bug report.
+
+2010-06-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add macro SF_ASSERT.
+
+ * src/sndfile.c
+ Use SF_ASSERT to ensure sizeof (sf_count_t) == 8.
+
+ * src/svx.c
+ Add support for reading and writing stereo SVX files.
+
+2010-05-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ When compiling with x86_64-w64-mingw32-gcc link with -static-libgcc flags.
+
+ * programs/common.c programs/sndfile-metadata-set.c
+ Update metadata after the audio data is copied. Other minor fixes. Patch
+ from Marius Hennecke.
+
+2010-05-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/nist.c
+ Fix a regression reported by Hugh Secker-Walker.
+
+ * src/api.html
+ Add comment about sf_open_fd() not working on Windows if the application
+ and the libsndfile DLL are linked to different versions of the Microsoft
+ C runtime DLL.
+
+2010-04-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pedantic-header-test.sh.in
+ Fix 'make distcheck'.
+
+2010-04-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pedantic-header-test.sh.in
+ New file to test whether sndfile.h can be compiled with gcc's -pedantic
+ flag.
+
+ * configure.ac tests/test_wrapper.sh.in
+ Hook pedantic-header-test into test suite.
+
+ * src/sndfile.h.in
+ Fix -pedantic warning.
+
+2010-04-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-salvage.c programs/Makefile.am
+ New program to salvage the audio data from WAV/WAVEX/AIFF files which are
+ greater than 4Gig in size.
+
+2010-04-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-convert.c
+ Fix valgrind warning.
+
+2010-04-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-cmp.c
+ When files differ in the PCM data, also print the difference offset.
+ Minor cleanup.
+
+2010-03-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Don't use the 'twos' marker for 24 and 32 bit PCM, use 'in24' and 'in32'
+ instead. Thanks to Paul Davis (Ardour) for this suggestion.
+
+2010-02-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Clean up configure report.
+
+ * tests/utils.tpl
+ Add functions test_read_raw_or_die and test_write_raw_or_die.
+
+ * tests/rdwr_test.(def|tpl) tests/Makefile.am
+ Add new test program and hook into build.
+
+ * src/sndfile.c
+ Fix minor issues with sf_read/write_raw(). Bug reported by Milan Křápek.
+
+ * tests/test_wrapper.sh.in
+ Add rdwr_test to the test wrapper script.
+
+2010-02-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Remove -fpascal-strings from OSX's OS_SPECIFIC_CFLAGS.
+
+ * programs/common.[ch] programs/sndfile-metadata-set.c
+ Apply a patch from Robin Gareus allowing the setting of the time reference
+ field of the BEXT chunk.
+
+2010-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ima_adpcm.c
+ Add a fix from Jonatan Liljedahl to handle predictor overflow when decoding
+ IMA4.
+
+2010-01-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Add a constructor which takes an existing file descriptor and then calls
+ sf_open_fd(). Patch from Sakari Bergen.
+
+2010-01-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-deinterleave.c programs/sndfile-interleave.c
+ Improve usage messages.
+
+2010-01-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/id3.c src/Makefile.am
+ Add new file src/id3.c and hook into build.
+
+ * src/sndfile.c src/common.h
+ Detect and skip and ID3 header at the start of the file.
+
+2010-01-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/common.c
+ Fix update_strings() copyright, comment, album and license are correctly
+ written. Thanks to Todd Allen for reporting this.
+
+ * man/Makefile.am
+ Change GNU makeism to something more widely supported. Thanks to Christian
+ Weisgerber for reporting this.
+
+ * configure.ac programs/Makefile.am programs/sndfile-play.c
+ Apply patch from Christian Weisgerber and Jacob Meuserto add support for
+ OpenBSD's sndio.
+
+2010-01-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Discourage the use of sf_read/write_raw().
+
+2009-12-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Test for Unix pipe() and waitpid() functions.
+
+ * src/sfconfig.h tests/pipe_test.tpl
+ Disable pipe_test if pipe() and waitpid() aren't available.
+
+2009-12-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/Makefile.am src/create_symbols_file.py
+ src/make-static-lib-hidden-privates.sh
+ Change name of generated file src/Symbols.linux to Symbols.gnu-binutils and
+ and use the same symbols file for other systems which use GNU binutils like
+ Debian's kfreebsd.
+
+ * M4/shave.m4 shave.in
+ Update shave files from upstream.
+
+2009-12-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * man/sndfile-metadata-get.1
+ Fix typo.
+
+ * man/sndfile-interleave.1 man/Makefile.am
+ New man page.
+
+2009-12-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg.c
+ When decoding to short or int, clip the decoded signal to [-1.0, 1.0] if
+ its too hot. Thanks to Dmitry Baikov for suggesting this.
+
+ * NEWS README doc/*.html
+ Updates for 1.0.21.
+
+2009-12-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-jackplay.c man/sndfile-jackplay.1
+ Remove these which will now be in found in the sndfile-tools package.
+
+ * programs/Makefile.am man/Makefile.am
+ Remove build rules for sndfile-jackplay.
+
+ * configure.ac
+ Remove detection of JACK Audio Connect Kit.
+
+ * programs/sndfile-concat.c man/sndfile-concat.1
+ Add new program with man page.
+
+ * man/Makefile.am programs/Makefile.am
+ Hook sndfile-concat into build system.
+
+2009-12-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/error_test.c
+ Don't terminate when sf_close() returns zero in error_close_test().
+ It seems that Windows 7 behaves differently from earlier versions of
+ Windows.
+
+2009-12-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac M4/*.m4
+ Rename all custom macros from AC_* to MN_*.
+
+ * programs/sndfile-interleave.c
+ Make it actually work.
+
+2009-12-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/*.html configure.ac
+ Corrections and clarifications courtesy of Robin Forder.
+
+ * programs/sndfile-convert.c programs/common.[ch]
+ Move some code from convert to common for reuse.
+
+ * programs/sndfile-interleave.c programs/sndfile-interleave.c
+ Add new programs sndfile-interleave and sndfile-deinterleave.
+
+ * programs/Makefile.am
+ Hook new programs into build.
+
+2009-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/create_symbols_file.py tests/stdio_test.c tests/win32_test.c
+ Minor OS/2 tweaks as suggested by David Yeo.
+
+ * tests/multi_file_test.c
+ Fix file creation flags on windows. Thanks to Bruce Sharpe.
+
+ * src/sf_unistd.h
+ Set all group and other file create permssions to zero.
+
+ * tests/win32_test.c
+ Add a new test.
+
+2009-11-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/print.css doc/*.html
+ Add a print stylesheet and update all HTML documents to reference it.
+ Thanks to Aditya Bhargava for suggesting this.
+
+ * doc/index.html
+ Minor corrections.
+
+2009-11-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * sndfile.pc.in
+ Add a Libs.private entry to assist with static linking.
+
+2009-11-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/make-static-lib-hidden-privates.sh src/Makefile.am
+ Add a script to hide all non-public symbols in the libsndfile.a static
+ library.
+
+2009-11-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/locale_test.c
+ Correct usage of ENABLE_SNDFILE_WINDOWS_PROTOTYPES.
+
+2009-11-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/windows.c
+ Correct usage of ENABLE_SNDFILE_WINDOWS_PROTOTYPES.
+
+2009-11-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-convert.c
+ Allow the program to read from stdin by specifying '-' on the command line
+ as the input file.
+
+ * src/sndfile.h.in
+ Hash define ENABLE_SNDFILE_WINDOWS_PROTOTYPES to 1 for greater safety.
+
+ * tests/virtual_io_test.c
+ Add a PAF/PCM_24 test and verify the file length is not negative
+ immediately after openning the file for write.
+
+2009-10-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ When writing loop lengths, adjust the end position by one to make up for
+ Microsoft's screwed up spec. Thanks to Olivier Tristan for the patch.
+
+2009-10-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Apply patch from Uli Franke allowing FLAC files to be encoded at any sample
+ rate.
+
+2009-10-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/nist.c
+ Fix parsing of odd ulaw encoded file provided by Jan Silovsky.
+
+ * configure.ac
+ Insist on libvorbis >= 1.2.3. Earlier verions have bugs that cause the
+ libsndfile test suite to fail on MIPS, PowerPC and others.
+ See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549899
+
+2009-10-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * man/sndfile-convert.1
+ Fix warning from Debian's lintian checks.
+
+ * man/sndfile-cmp.1 man/sndfile-jackplay.1 man/sndfile-metadata-get.1
+ man/Makefile.am
+ Add three new minimal manpages and hook into build.
+
+2009-10-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/test_wrapper.sh.in
+ Don't run cpp_test on x86_64-w64-mingw32.
+
+2009-09-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl
+ On windows, make sure the open() function doesn't get called with a third
+ parameter of 0 which fails for no good reason. Also make sure this third
+ parameter doesn't get called with S_IRGRP when compiling for windows because
+ Wine complains.
+
+ * src/sndfile.hh
+ Add a SndfileHandle constructor for windows that takes a 'const wchar_t *'
+ string.
+
+ * doc/FAQ.html
+ Add Q/A : I'm cross compiling libsndfile for another platform. How can I
+ run the test suite?
+
+ * src/create_symbols_file.py src/Makefile.am
+ Add Symbols.static target, a list of symbols, one per line.
+
+2009-09-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/test_wrapper.sh.in
+ Update to allow all tests to be gathered up into a testsuite tarball and
+ then be run using this script.
+
+ * build-test-tarball.mk.in
+ Add a Make script to build a tarball of all the test binaries and the test
+ wrapper script. This is useful for cross compiling; you can build the
+ binaries, build test test tarball and transfer the test tarball to the
+ target machine for testing.
+
+2009-09-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/*.c
+ Modify SF_FILE struct to allow it to carry either 8-bit or 16-bit strings
+ for the file path, directory and name. Fixes for this change throughout.
+
+ * src/windows.c src/Makefile.am
+ New file defining new windows only public function sf_wchar_open() which
+ takes a 'const wchar_t *' string (LPCWSTR) for the file name parameter.
+
+ * src/sndfile.h.in
+ Add SF_CHANNEL_MAP_ABISONIC_* entries.
+ Add windows only defintion for sf_wchar_open().
+
+ * src/create_symbols_file.py
+ Add sf_wchar_open() to the list of public symbols (windows only).
+
+ * tests/locale_test.c
+ Add a wchar_test() to test sf_wchar_open().
+
+2009-09-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/*.c
+ Split file stuff into PSF_FILE struct within the SF_PRIVATE struct.
+
+2009-09-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/voc.c
+ When a byte is needed, use unsigned char.
+
+ * src/ima_oki_adpcm.c src/broadcast.c src/test_ima_oki_adpcm.c
+ Include sfconfig.h to prevent compile errors with MinGW compilers.
+
+ * configure.ac
+ Remove AM_CONFIG_HEADER due to warnings from autoconf 2.64.
+
+ * tests/locale_test.c
+ Update to work with xx_XX.UTF-8 style locales. Refactoring.
+
+2009-09-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Set __USE_MINGW_ANSI_STDIO to 1 when compiling using MinGW compilers.
+ Remove unneeded AC_SUBST.
+ Report Host CPU/OS/vendor.
+
+2009-09-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix error message string.
+
+ * src/flac.c
+ Add 88200 to the list of supported sample rates.
+
+ * src/ogg.c
+ Fix compiler warning when using gcc-4.5.0.
+
+ * programs/sndfile-info.c tests/utils.tpl
+ Remove WIN32 snprintf #define.
+
+ * src/ima_adpcm.c
+ Fix minor bug in aiff_ima_encode_block. Thanks to Denis Fileev for finding
+ this.
+
+2009-09-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/caf.c
+ Use the correct C99 format specifier for int64_t.
+
+ * M4/endian.m4
+ Fix detection of CPU endian-ness when cross compiling. Thanks to Pierre
+ Ossman for the bug report.
+
+ * src/caf.c src/sndfile.c
+ Fix reading and writing of PEAK chunks in CAF files.
+
+ * tests/peak_chunk_test.c tests/test_wrapper.sh.in
+ Run peak_chunk_test on CAF files.
+
+2009-09-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/wav.c
+ Use the correct C99 format specifier for int64_t.
+
+2009-08-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/rf64.c src/sndfile.c src/wav.c src/wav_w64.h
+ Apply a patch (massaged slightly) from Uli Franke adding handling of the
+ BEXT chunk in RF64 files.
+
+ * tests/command_test.c
+ Update channel_map_test() function so WAV test passes.
+
+ * src/rf64.c
+ Add channel mapping and ambisonic support.
+
+ * src/sndfile.h
+ Add comments showing correspondance between libsndfile channel map
+ defintiions and those used by Apple and MS.
+
+ Add handling of reading/writing channel map info.
+
+ * tests/command_test.c tests/test_wrapper.sh.in
+ Update channel map tests.
+
+2009-07-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add function psf_isprint() a replacement for the standard C isprint()
+ function which ignores any locale settings and treats all input as ASCII.
+
+ * src/(aiff|common|rf64|sd2|strings|svx|wav).c
+ Use psf_isprint() instead of isprint().
+
+2009-07-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/command.c
+ Add string descriptions for SF_FORMAT_RF64 and SF_FORMAT_MPC2K.
+
+2009-06-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-play.c
+ Allow use of Open Sound System audio output under FreeBSD.
+
+2009-06-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add patch from Conrad Parker to add --disable-jack.
+
+2009-05-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/alaw.c src/float32.c src/htk.c src/pcm.c src/sds.c src/ulaw.c
+ Fix bugs where invalid files can cause a divide by zero error (SIGFPE).
+ Thanks to Sami Liedes for reporting this a Debian bug #530831.
+
+2009-05-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/chanmap.[ch]
+ New files for channel map decoding/encoding.
+
+2009-05-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/sndfile.h.in
+ Fix MSVC definition of sf_count_t.
+
+2009-05-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_w64.[ch]
+ Add wavex_channelmask to WAV_PRIVATE struct and add a function to convert
+ an array of SF_CHANNEL_MASK_* values into a bit mask for use in WAV files.
+
+ * src/wav.c
+ Add ability to write the channel mask.
+
+2009-05-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-info.c
+ Add -c command line option to dump the channel map information.
+
+ * src/wav_w64.c
+ Don't bail from parser if channel map bitmask is faulty.
+
+ * src/common.h src/sndfile.c
+ Remove error code SFE_W64_BAD_CHANNEL_MAP which is not needed any more.
+
+ * src/sndfile.c
+ On SFC_SET_CHANNEL_MAP_INFO pass the channel map command down to container's
+ command handler.
+
+2009-05-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/common.h src/sndfile.c src/wav_w64.c
+ Apply a patch from Lennart Poettering (PulseAudio) to allow reading of
+ channel data in WAV and W64 files.
+ Add a test for the above.
+
+2009-05-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FAQ.html
+ Update the section about pre-compiled binaries for Win64.
+
+2009-05-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/test_conversions.c
+ Be more careful when including <stdint.h> so compiling on pre-C99 platforms
+ (hello Slowlaris) might actually work.
+
+ * NEWS README doc/*.html
+ Updates for 1.0.20.
+
+2009-04-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/voc.c
+ Fix a bug whereby opening a specially crafted VOC file could result in a
+ heap overflow. Thanks to Tobias Klein (http://www.trapkit.de) for reporting
+ this issue.
+
+ * src/aiff.c
+ Fix potential (heap) buffer overflow when parsing 'MARK' chunk.
+
+2009-04-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/stdin_test.c
+ Check psf->error after opening file.
+
+ * src/file_io.c
+ Fix obscure seeking bug reported by Hugh Secker-Walker.
+
+ * tests/utils.tpl
+ Add check of sf_error to test_open_file_or_die().
+
+ * src/sndfile.c
+ Clear error if opening resource fork fails.
+
+2009-04-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/alaw_test.c tests/locale_test.c tests/ulaw_test.c
+ Cleanup output.
+
+2009-03-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float32.c
+ Fix f2s_clip_array.
+
+2009-03-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float32.c
+ In host_read_f2s call convert instead of f2s_array.
+
+ * src/ima_adpcm.c
+ Remove dead code.
+
+ * src/test_ima_oki_adpcm.c examples/generate.c tests/dither_test.c
+ tests/dwvw_test.c tests/fix_this.c tests/generate.c
+ tests/multi_file_test.c
+ Minor fixes.
+
+2009-03-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * M4/shave.m4 shave.in
+ Pulled update from upstream.
+
+2009-03-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Add pointers to example programs in source code tarball.
+
+2009-03-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Define SF_PLATFORM_S64 for non-gcc compilers with 'long long' type.
+
+ * configure.ac
+ Add documentation for --disable-external-libs and improve error handling
+ for that option.
+
+ * src/sndfile.c src/sndfile.h.in src/create_symbols_file.py
+ Add public function sf_version_string.
+
+ * tests/sfversion.c
+ Test function sf_version_string.
+
+ * M4/shave.m4 shave-libtool.in shave.in
+ Add new files from 'git clone git://git.lespiau.name/shave'.
+
+ * configure.ac
+ Enable shave.
+
+ * src/Makefile.am src/binheader_writef_check.py Octave/*
+ Shave related tweaks.
+
+2009-03-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/caf.c src/sndfile.c
+ Add SF_MAX_CHANNELS (set to 256) and use it.
+
+ * src/sndfile.h.in
+ Check for either _MSCVER or _MSC_VER being defined.
+
+2009-03-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/vorbis_test.c
+ Relax test slighly to allow test to pass on more CPUs etc.
+
+2009-03-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Detect vorbis_version_string() correctly.
+
+2009-03-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Add a 'See Also' section with a link to sndfile-tools.
+
+ * NEWS README doc/*.html
+ Updates for 1.0.19 release.
+
+ * configure.ac
+ Fix --enable-external-libs logic.
+
+2009-03-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix resource leak and potential read beyond end of buffer.
+
+ * src/nist.c
+ Fix reading of header value sample_n_bytes.
+
+ * src/sd2.c src/wav.c
+ Fix potential read beyond end of buffer.
+
+ * src/sndfile.c src/svx.c
+ Check return values of file_io functions.
+
+ * tests/win32_test.c
+ Fix resource leak.
+
+ * configure.ac
+ Detect the presence/absence of vorbis_version_string() in libvorbis.
+
+ * src/ogg.c
+ Only call vorbis_version_string() from libvorbis if present.
+
+2009-02-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/win32_test.c
+ Don't use sprintf, even on windows.
+
+ * src/aiff.c src/rf64.c src/wav.c
+ Eliminate dead code, more validation of data read from file.
+
+2009-02-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ima_adpcm.c
+ Clamp values to a valid range before indexing ima_step_size array.
+
+ * src/GSM610/*.c tests/*c programs/*.c src/audio_detect.c
+ Don't include un-needed headers.
+
+ * programs/sndfile-info.c
+ Remove dead code.
+
+ * tests/test_wrapper.sh.in
+ Add 'set -e' so the script exits on error.
+
+ * src/test_ima_oki_adpcm.c
+ Fix read beyond end of array.
+
+ * tests/win32_test.c
+ Add missing close on file descriptor.
+
+ * src/nist.c programs/sndfile-metadata-set.c
+ Fix 'unused variable' warnings.
+
+ * src/aiff.c
+ Fix potential memory leak in handling of 'MARK' chunk.
+ Remove un-needed test (unsigned > 0).
+
+ * src/sd2.c
+ Improve handling of heap allocated buffer.
+
+ * src/sndfile.c
+ Remove un-needed test (always true).
+
+ * src/wav.c src/rf64.c
+ Ifdef out dead code that will be resurected some time in the future.
+
+ * src/wav.c src/w64.c src/xi.c
+ Handle error return values from psf_ftell.
+
+ * src/wav_w64.c
+ Fix handling and error checking of MSADPCM coefficient arrays.
+
+ * regtest/*.c
+ Bunch of fixes.
+
+ * src/test_file_io.c
+ Use snprintf instead of strncpy in test program.
+
+2009-02-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sd2.c
+ Validate data before using.
+
+ * src/caf.c
+ Validate channels per frame value before using, fixing a possible integer
+ overflow bug, leading to a possible heap overflow. Found by Alin Rad Pop of
+ Secunia Research (CVE-2009-0186).
+
+2009-02-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Octave/octave_test.sh
+ Unset TERM environment variable and export LD_LIBRARY_PATH.
+
+2009-02-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ In windows code, cast LPVOID to 'char*' in printf.
+
+2009-02-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * M4/octave.m4
+ Clear the TERM environment before evaluating anything in Octave. This works
+ around problems that might occur if a users TERM settings are incorrect.
+ Thanks to Rob Til Freedmen for helping to debug this.
+
+ * src/wav.c
+ Handle four zero bytes as a marker within a LIST or INFO chunk.
+ Thanks to Rogério Brito for supplying an example file.
+
+2009-02-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/*.c
+ Use C99 snprintf everywhere.
+
+2009-02-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/test_wrapper.sh.in
+ New file to act as the template for the test wrapper script.
+
+ * configure.ac
+ Generate tests/test_wrapper.sh from the template.
+
+ * tests/Makefile.am
+ Replace all tests with a single invocation of the test wrapper script.
+
+2009-02-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg.c
+ Record vorbis library version string.
+
+ * configure.ac
+ Require libvorbis >= 1.2.2.
+
+ * M4/endian.m4
+ Fix bracketing of function for autoconf 2.63. Thanks to Richard Ash.
+
+ * M4/octave.m4 M4/mkoctfile_version.m4
+ Clean up AC_WITH_ARG usage using AC_HELP_STRING.
+
+2009-02-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Octave/Makefile.am
+ Use $(top_buildir) instead of $(builddir) which may not be defined.
+
+ * M4/octave.m4
+ Improve logic and status reporting.
+
+2009-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac AUTHORS NEWS README doc/*.html
+ Final tweaks for 1.0.18 release.
+
+2009-02-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-convert.c
+ Add 'htk' to the list of convert formats.
+
+ * programs/sndfile-info.c
+ Simplify get_signal_max using SFC_CALC_SIGNAL_MAX command.
+ Increase size of files for which signal max will be calculated.
+
+2009-01-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Fix links for SoX and WavPlay. Thanks to Daniel Griscom.
+
+2009-01-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-metadata-get.c
+ Make valgrind clean.
+ Clean up temp string array usage.
+ Error out if trying to update coding history in RDWR mode.
+
+2009-01-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Fix links to versions of the LGPL.
+
+2008-12-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/string_test.c
+ Add test for RDWR mode where the file ends up shorter than when it was
+ opened.
+
+ * src/wav.c
+ Truncate the file on close for RDWR mode where the file ends up shorter
+ than when it was opened.
+
+2008-11-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * M4/add_cflags.m4
+ Fix problem with quoting of '#include'.
+
+ * M4/add_cxxflags.m4 configure.ac
+ Add new file M4/add_cxxflags.m4 and use it in configure.ac.
+
+2008-11-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-info.c
+ Apply patch from Conrad Parker to calculate and display total duration when
+ more than one file is dumped.
+
+2008-11-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/Makefile.am
+ Tweaks to generation of Symbols files.
+
+ * tests/win32_ordinal_test.c
+ Update tests for above changes.
+
+2008-11-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/common.c
+ When merging broadcast info, make sure to clear the destination field
+ before copying in the new data.
+
+ * programs/test-sndfile-metadata-set.py
+ Add test for the above.
+
+ * src/broadcast.c
+ Fix checking of required coding_history_size.
+
+2008-10-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/command_test.c
+ Add test to detect if coding history is truncated.
+
+ * src/broadcast.c
+ Fix truncation of coding history.
+
+2008-10-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/command_test.c
+ Add broadcast_coding_history_size test.
+
+ * programs/*.[ch]
+ Use SF_BROADCAST_INFO_VAR to manipulate larger 'bext' chunks.
+
+ * src/rf64.c
+ Add code to prevent infinite loop on malformed file.
+
+ * src/common.h src/sndfile.c src/w64.c src/wav_w64.c
+ Rationalize and improve error handling when parsing 'fmt ' chunk.
+
+ * M4/octave.m4
+ Simplify and remove cruft.
+ Check for correct Octave version.
+
+ * Octave/*
+ Reduce 3 C++ files to one, fix build for octave 3.0, fix build.
+
+ * Octave/sndfile.cc Octave/PKG_ADD
+ Add Octave function sfversion which returns the libsndfile version that the
+ module is linked against.
+
+ * Octave/Makefile.am
+ Bunch of build and 'make distcheck' fixes.
+
+2008-10-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/common.c
+ Return 1 if SFC_SET_BROADCAST_INFO fails.
+
+ * programs/test-sndfile-metadata-set.py
+ Update for new programs directory, exit on any error.
+
+ * tests/error_test.c
+ Fix failure behaviour in error_number_test.
+
+ * src/common.h src/sndfile.c
+ Add error number SFE_BAD_BROADCAST_INFO_SIZE.
+
+ * src/*
+ Reimplement handling of broadcast extentioon chunk in WAV/WAVEX files.
+
+ * src/broadcast.c
+ Fix generation of added coding history.
+
+2008-10-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * programs/sndfile-metadata-get.c programs/sndfile-info.c
+ Exit with non-zero on errors.
+
+2008-10-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-to-text.c examples/Makefile.am
+ Add a new example program and hook it into the build.
+
+ * examples/ programs/
+ Add a new directory programs and move sndfile-info, sndfile-play and other
+ real programs to the new directory, leaving example programs where they
+ were.
+
+2008-10-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/Makefile.am
+ Automake 1.10 MinGW cross compiling fixes.
+
+2008-10-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Remove call to deprecated function snd_pcm_sw_params_get_xfer_align.
+ Fix gcc-4.3 compiler warnings.
+
+ * tests/command_test.c
+ Fix a valgrind warning.
+
+ * tests/error_test.c tests/multi_file_test.c tests/peak_chunk_test.c
+ tests/pipe_test.tpl tests/stdio_test.c tests/win32_test.c
+ Fix gcc-4.3 compiler warnings.
+
+2008-10-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/broadcast.c
+ Fix termination of desitination string in strncpy_crlf.
+ When copying BROADCAST_INFO chunk, make sure destination gets correct line
+ endings.
+
+ * examples/common.c
+ Fix copying of BROADCAST_INFO coding_history field.
+
+2008-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/command_test.c
+ Add test function instrument_rw_test, but don't hook it into the testing
+ yet.
+
+ * src/common.h src/command.c src/sndfile.c src/flac.c
+ Error code rationalization.
+
+ * src/common.h src/sndfile.c
+ Set psf->error to SFE_CMD_HAS_DATA when adding metadata via sf_command()
+ fails due to psf->have_written being true.
+
+ * doc/command.html
+ Document the SFC_GET/SET_BROADCAST_INFO comamnds.
+
+2008-10-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/command_test.c
+ Improve error reporting when '\0' is found in coding history.
+ Fix false failure.
+
+2008-10-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/broadcast.c
+ Convert all coding history line endings to \r\n.
+
+ * tests/command_test.c
+ Add test to make sure all line endings are converted to \r\n.
+
+2008-10-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/broadcast.c
+ Changed the order of coding history fields.
+
+ * tests/command_test.c
+ Update bextch test to cope with previous change.
+
+ * examples/common.c
+ Add extra length check when copying broadcast info data.
+
+2008-10-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl tests/pcm_test.tpl
+ Update check_file_hash_or_die to use 64 bit hash.
+
+ * tests/checksum_test.c tests/Makefile.am
+ Add new checksum_test specifically for lossy compression of headerless
+ files.
+
+2008-10-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/gsm610.c
+ Seek to psf->dataoffset before decoding first block.
+
+ * src/sndfile.c
+ Fix detection of mpc2k files on big endian systems.
+
+2008-10-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/broadcast.c
+ Use '\r\n' newlines in Coding History as required by spec.
+
+2008-10-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_conversions.c
+ Use int64_t instead of 'long long'.
+
+2008-10-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-metadata-set.c
+ Remove --bext-coding-history-append command line option because it didn't
+ really make sense.
+
+ * examples/sndfile-metadata-(get|set).c
+ Add usage messages.
+
+ * examples/test-sndfile-metadata-set.py
+ Start work on test coding history.
+
+2008-09-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * README doc/win32.html
+ Bring these up to date.
+
+ * src/aiff.c
+ Fix parsing of REX files.
+
+2008-09-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Use intptr_t instead of long for return value of _get_osfhandle.
+
+ * src/test_conversions.c src/test_endswap.tpl
+ Fix printing of int64_t values.
+
+ * examples/sndfile-play.c
+ Fix win64 issues.
+
+ * tests/win32_ordinal_test.c
+ Fix calling of GetProcAddress with ordinal under win64.
+
+ * tests/utils.tpl
+ Fix win64 issues.
+
+2008-09-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/*
+ Rename copy_data.[ch] to common.[ch]. Fix build.
+ Move code from sndfile-metadata-set.c to common.c.
+
+ * examples/Makefile.am tests/Makefile.am regtest/Makefile.am
+ Clean paths.
+
+2008-09-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/tutorial.html doc/Makefile.am
+ Add file doc/tutorial.html and hook into build/dist system.
+
+2008-09-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-metadata-set.c
+ Clean up handling of bext command line params.
+
+2008-09-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/w64.c
+ Add handling/skipping of a couple of new chunk types.
+
+2008-09-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add -funsigned-char to CFLAGS if the compiler supports it.
+
+ * examples/sndfile-metadata-(get|set).c
+ Add handling for more metadata types.
+
+2008-09-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add macros SF_CONTAINER, SF_CODEC and SF_ENDIAN useful for splitting format
+ field of SF_INFO into component parts.
+
+ * src/*.c
+ Use new macros everywhere it is appropriate.
+
+2008-09-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-bwf-set.c
+ Massive reworking.
+
+2008-08-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-bwf-set.c
+ Add --info-auto-create-date command line option.
+
+ * examples/sndfile-metadata-set.c examples/sndfile-metadata-get.c
+ examples/Makefile.am examples/test-sndfile-bwf-set.py
+ Rename sndfile-bwf-(set|get).c to sndfile-metadata-(set|get).c.
+ Change command line args.
+
+2008-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Allow 'PAD ' chunk to be modified in RDWR mode.
+
+ * src/sndfile.h.in src/sndfile.c
+ Add handling (incomplete) for SFC_SET_ADD_HEADER_PAD_CHUNK.
+
+ * tests/Makefile.am tests/write_read_test.tpl tests/header_test.tpl
+ tests/misc_test.c
+ Add tests for RF64.
+
+ * src/rf64.c
+ Fixes to make sure all tests pass.
+
+ * tests/Makefile.am tests/string_test.c
+ Add string tests (not yet passing).
+
+2008-08-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/rf64.c
+ First pass at writing RF64 now working.
+
+2008-08-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Add SF_FORMAT_RF64 to format_map.
+
+ * src/common.h src/sndfile.c
+ More RF64 support code.
+
+ * examples/sndfile-bwf-set.c
+ Fix the month number in autogenerated date string and use hypen in date
+ instead of slash.
+
+ * examples/test-sndfile-bwf-set.py
+ Update tests.
+
+ * examples/sndfile-info.c
+ When called with -i or -b option, operate on all files on command line, not
+ just the first.
+
+2008-08-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/rf64.c
+ New file to handle RF64 (WAV like format supportting > 4Gig files).
+
+ * src/sndfile.h.in src/common.h src/sndfile.c src/Makefile.am
+ Hook the above into build so hacking can begin.
+
+ * src/pcm.c
+ Improve log message when pcm_init fails.
+
+ * src/sndfile-info.c
+ Only calculate and print 'Signal Max' if file is less than 10 megabytes in
+ length.
+
+2008-08-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/string_test.c
+ Polish string_multi_set_test.
+
+ * src/wav.c
+ In RDWR mode, pad the header if necessary (ie LIST chunk has moved or
+ length has changed).
+ Minor fixes in wav_write_strings.
+ Write PAD chunk with default endian-ness, not a specific endian-ness.
+
+ * examples/test-sndfile-bwf-set.py
+ Add Python script to test sndfile-bwf-set/get.
+
+ * examples/sndfile-bwf-set.c
+ Clean up and fixes.
+
+ * src/wav.c
+ Merge function wavex_write_header into wav_write_header, deleting about 70
+ lines of code.
+
+ * src/common.h
+ Double value of SF_MAX_STRINGS.
+
+ * tests/string_test.c
+ Add string tests for WAVEX and RIFX files.
+
+ * tests/command_test.c
+ Add broadcast test for WAVEX files.
+
+2008-08-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/string_test.c
+ Add a new string_rdwr_test (currently failing for WAV).
+ Add a new string_multi_set_test (currently failing).
+
+ * tests/command_test.c
+ Add new broadcast_rdwr_test (currently failing).
+
+ * src/wav.c
+ Fix to WAV parser to allow 'bext' chunk to be updated in place.
+ In wav_write_tailer, seek to psf->dataend if its greater than zero.
+
+ * src/sndfile.c
+ Make sure psf->have_written gets set correctly in mode SFM_RDWR.
+
+ * configure.ac
+ Test for <sys/time.h> and gettimeofday.
+
+ * src/common.c
+ Use gettimeofday() to initialize psf_rand_int32.
+
+ * src/common.h src/sndfile.c
+ Add unique_id field to SF_PRIVATE struct.
+
+ * src/common.h src/sndfile.c src/wav.c src/wav_w64.[ch]
+ Move wavex_ambisonic field from SF_PRIVATE struct to WAV_PRIVATE struct.
+
+ * src/common.h src/strings.c
+ Add function psf_location_string_count.
+
+2008-08-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Test for localtime and localtime_r.
+
+ * examples/sndfile-convert.c
+ In function copy_metadata(), copy broadcast info if present.
+
+ * examples/copy_data.[ch] examples/Makefile.am
+ Break some functionality out of sndfile-convert.c so it can be used in
+ examples/sndfile-bwf-set.c.
+
+ * tests/utils.tpl
+ Add new function create_short_sndfile().
+
+ * examples/sndfile-bwf-set.c examples/sndfile-bwf-get.c
+ examples/Makefile.am
+ Add new files and hook into build.
+
+2008-08-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Fix comments. Patch from Mark Glines.
+
+2008-07-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Use zero_data_test on Ogg/Vorbis files.
+
+ * src/ogg.c
+ Fix segfault when closing an Ogg/Vorbis file that has been opened for write
+ but had no actual data written to it. Bug reported by Chinoy Gupta.
+
+ * tests/Makefile.am
+ Make sure to run mist_test on Ogg/Vorbis files.
+
+2008-07-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * regtest/Makefile.am
+ Use SQLITE3_CFLAGS to locate sqlite headers.
+
+2008-07-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html doc/FAQ.html
+ Add notes about which versions of windows libsndfile works on.
+
+2008-07-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Add a test for correct handling of Ambisonic files. Thanks to Fons
+ Adriaensen for the test.
+
+ * src/wav.c src/wav_w64.c
+ Fix handling of Ambisonic files. Thanks to Fons Adriaensen for the patch.
+
+2008-06-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fix detection/enabling of external libs.
+
+ * M4/extra_pkg.m4 M4/Makefile.am
+ Add m4 macro PKG_CHECK_MOD_VERSION which is a hacked version
+ PKG_CHECK_MODULES. The new macro prints the version number of the package
+ it is searching for.
+
+2008-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Apply a fix from Axel Röbel where if the second loop in the instrument
+ chunk is none, the loop mode is written into the first loop.
+
+2008-05-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_float.c src/test_main.(c|h) src/Makefile.am
+ Add new file to test functions float32_(le|be)_(read|write) and
+ double64_(le|be)_(read|write). Hook into build and testsuite.
+
+ * src/double64.c src/float32.c
+ Fix bugs in functions found by test added above. Thanks to Nicolas Castagne
+ for reporting this bug.
+
+ * src/sndfile.h.in
+ Change time_reference_(low|high) entries of SF_BROADCAST_INFO struct to
+ unsigned.
+
+ * examples/sndfile-info.c
+ Print out the BEXT time reference in a sensible format.
+
+2008-05-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Fuzz fixes.
+
+ * src/ogg.c
+ Add call to ogg_stream_clear to fix valgrind warning.
+
+ * src/aiff.c
+ Fix x86_64 compile issue.
+
+ * configure.ac src/Makefile.am src/flac.c src/ogg.c
+ Link to external versions of FLAC, Ogg and Vorbis.
+
+ * tests/lossy_comp_test.c tests/ogg_test.c tests/string_test.c
+ tests/vorbis_test.c tests/write_read_test.tpl
+ Fix tests when configured with --disable-external-libs.
+
+ * tests/external_libs_test.c tests/Makefile.am
+ Add new test and hook into build and test suite.
+
+ * src/command.c
+ Use HAVE_EXTERNAL_LIBS to ensure that the SFC_GET_FORMAT_* commands return
+ the right data when external libs are disabled.
+
+2008-05-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl
+ Add a test for extending a file during write by seeking past the current
+ end of file.
+
+ * src/sndfile.c
+ Allow seeking past end of file during write.
+
+2008-05-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html doc/command.html
+ Move all information about the sf_command function to command.html and add
+ a link from documentation of the sf_read/write_raw function to the
+ SFC_RAW_NEEDS_ENDSWAP command.
+
+ * doc/index.html doc/FAQ.html doc/libsndfile.css
+ Minor documentation tweaks.
+
+2008-05-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add AM_PROG_CC_C_O.
+
+2008-04-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/error_test.c
+ Add a test to make sure if file opened with sf_open_fd, and then the file
+ descriptor is closed, then sf_close will return an error code. Thanks to
+ Dave Flogeras for the bug report.
+
+ * src/sndfile.c
+ Make sf_close return an error is the file descriptor is already closed.
+
+2008-04-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Set object format to aout for OS/2. Thanks to David Yeo.
+
+ * src/mpc2k.c src/sndfile.c src/sndfile.h.in src/common.h src/Makefile.am
+ Add ability to read MPC 2000 file.
+
+ * tests/write_read_test.tpl tests/misc_test.c tests/header_test.tpl
+ tests/Makefile.am
+ Add tests for MPC 2000 file format.
+
+ * examples/sndfile-convert.c
+ Allow conversion to MPC 2000 file format.
+
+2008-04-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/VORBIS/lib/codebook.c
+ Sync from upstream SVN.
+
+ * autogen.sh configure.ac
+ Minor tweaks.
+
+2008-04-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg.c
+ Add a patch that fixes finding the length in samples of an Ogg/Vorbis file.
+ The patch as supplied segfaulted and required many hours of debugging.
+
+ * src/OGG/bitwise.c
+ Sync from upstream SVN.
+
+2008-04-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix up handling of 'APPL' chunk. Thanks to Axel Röbel for bringing up
+ this issue.
+
+2008-04-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/*.c
+ Add calls to sf_close() where needed.
+
+ * tests/utils.tpl tests/multi_file_test.c
+ Always pass 0 as the third argument to open when OS_IS_WIN32.
+
+2008-04-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_*
+ Add files test_main.[ch].
+ Collapse all tests into a single executable.
+
+2008-03-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC
+ Sync to upstream CVS.
+
+2008-03-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Make SF_MIN and SF_MAX macros MinGW friendly.
+
+ * examples/sndfile-(info|play).c
+ Use Sleep function from <windows.h> instead of _sleep.
+
+ * tests/locale_test.c
+ Disable some tests when OS_IS_WIN32.
+
+ * src/FLAC/src/share/replaygain_anal/replaygain_analysis.c
+ src/FLAC/src/share/utf8/utf8.c
+ MinGW fixes.
+
+2008-03-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Tweaks to pcm16 <-> float conversion answer.
+
+2008-02-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/OGG
+ Sync to SVN upstream.
+
+ * Makefile.am
+ Add 'DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror'.
+
+2008-02-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-jackplay.c
+ Minor tweaks to warning message printed when compiled without libjack.
+
+2008-01-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/peak_chunk_test.c
+ Improve read_write_peak_test to find more errors. Inspired by example
+ provided by Nicolas Castagne.
+
+ * src/aiff.c
+ Another SFM_RDWR fix shown up by above test.
+
+2008-01-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix reading of COMM encoding string.
+
+ * src/chunk.c src/common.h src/Makefile.am
+ New file for storing and retrieving info about header chunks. Hook into
+ build.
+
+ * src/aiff.c
+ Use new chunk logging to fix problem with AIFF in RDWR mode.
+
+2008-01-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/command.c
+ Add WVE to the list of major formats.
+
+ * tests/aiff_rw_test.c
+ Fix error reporting.
+
+2008-01-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.[ch]
+ Add internal functions str_of_major_format, str_of_minor_format,
+ str_of_open_mode and str_of_endianness.
+
+ * tests/write_read_test.tpl
+ Fix reporting of errors in new_rdwr_XXXX_test.
+
+2008-01-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Apply patch from Yair K. to fix compiles with OSS v4.
+
+ * src/common.h src/float32.c src/double64.c
+ Rename psf->float_enswap to psf->data_endswap.
+
+ * src/sndfile.h.in src/sndfile.c src/pcm.c
+ Add command SFC_RAW_NEEDS_ENDSWAP.
+
+ * tests/command.c
+ Add test for SFC_RAW_NEEDS_ENDSWAP.
+
+ * doc/command.html
+ Document SFC_RAW_NEEDS_ENDSWAP.
+
+ * tests/peak_chunk_test.c
+ Add test function read_write_peak_test. Thanks to Nicolas Castagne for the
+ bug report.
+
+2008-01-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-cmp.c
+ Add new example program contributed by Conrad Parker.
+
+ * examples/Makefile.am
+ Hook into build.
+
+ * doc/development.html
+ Change use or reconfigure.mk to autogen.sh.
+
+2008-01-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/win32_test.c
+ Add another win32 test.
+
+ * tests/util.tpl
+ Add function file_length_fd which wraps fstat.
+
+ * tests/Makefile.am
+ Run the multi_file_test on AU files.
+
+ * tests/multi_file_test.c
+ Use function file_length_fd() instead of file_length() to overcome stupid
+ win32 bug. Fscking hell Microsoft sucks so much.
+
+2008-01-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sd2.c
+ Fix a rsrc parsing bug. Example file supplied by Uli Franke.
+
+2007-12-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Allow use of either LGPL v2.1 or LGPL v3.
+
+ * tests/header_test.tpl
+ Add header_shrink_test from Axel Röbel.
+
+ * src/wav.c
+ Add fix from Axel Röbel for writing files with float data but no peak
+ chunk (ie peak chunk gets removed after the file is opened).
+
+ * src/aiff.c tests/header_test.tpl
+ Apply similar fix to above for AIFF files.
+
+ * src/wav.c tests/header_test.tpl
+ Apply similar fix to above for WAVEX files.
+
+ * src/command.c
+ Add Ogg/Vorbis to 'get format' commands.
+
+2007-12-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg.c
+ Fix seeking on multichannel Ogg Vorbis files. Reported by Bodo.
+ Set the default encoding quality to 0.4 instead of 4.0 (Bodo again).
+
+ * tests/ogg_test.c
+ Add stereo seek tests.
+
+2007-12-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/ogg_test.c
+ Add a test (currently failing) for stereo seeking on Ogg Vorbis files. Test
+ case supplied by Bodo.
+
+ * tests/utils.(def|tpl)
+ Add compare_XXX_or_die functions.
+
+2007-12-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix a bug where ignoring ssnd_fmt.offset and ssnd_fmt.blocksize caused
+ misaligned reading of 24 bit data. Thanks to Uli Franke for reporting this.
+
+2007-12-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/vox_adpcm.c src/ima_oki_adpcm.[ch] src/Makefile.am
+ Merge in code from the vox-patch branch. Thanks to Robs for the patch
+ which fixes a long standing bug in the VOX codec.
+
+2007-12-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Fix handling of -override-sample-rate=X option.
+
+2007-11-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg.c src/VORBIS
+ Merge in Ogg Vorbis support from John ffitch of the Csound project.
+
+2007-11-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Recognise files with 'vox6' extension as 6kHz OKI VOX ADPCM files. Also
+ recognise 'vox8' as and 'vox' as 8kHz files.
+
+ * configure.ac
+ Detect libjack (JACK Audio Connect Kit).
+
+ * examples/sndfile-jackplay.c examples/Makefile.am
+ Add new example program to play sound files using the JACK audio server.
+ Thanks to Jonatan Liljedahl for allowing this to be included.
+
+2007-11-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Update support table with SD2 and FLAC.
+
+2007-11-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix calculation of internal value psf->read_current when attempting to read
+ past end of audio data.
+ Remove redundant code.
+
+ * tests/lossy_comp_test.c
+ Add read_raw_test to check that raw reads do not go past the end of the
+ audio data section.
+ Clean up error output messages.
+
+ * src/sndfile.c
+ Add code to prevent sf_read_raw from reading past the end of the audio data.
+
+ * tests/Makefile.am
+ Add the wav_pcm lossy_comp_test.
+
+2007-11-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/Makefile.am src/create_symbols_file.py
+ More OS/2 fixes from David Yeo.
+
+2007-11-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c tests/utils.tpl tests/benchmark.tpl
+ Improve handling of requirements for O_BINARY as suggested by Ed Schouten.
+
+2007-11-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Fix symbol class when SF_MIN is nested inside SF_MAX or vice versa.
+
+ * src/create_symbols_file.py
+ Add support for OS/2 contributed by David Yeo.
+
+2007-11-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * M4/gcc_version.m4
+ Add macro AC_GCC_VERSION to detect GCC_MAJOR_VERSION and GCC_MINOR_VERSION.
+
+ * configure.ac
+ Use AC_GCC_VERSION to work around gcc-4.2 inline warning stupidity.
+ See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33995
+ Use -fgnu-inline to prevent stupid warnings.
+
+2007-11-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/util.tpl
+ Increase the printing width for print_test_name().
+
+ * tests/command_test.c tests/Makefile.am
+ Add tests for correct updating of broadcast WAV coding history.
+
+ * examples/sndfilehandle.cc examples/Makefile.am
+ Add example program using the C++ SndfileHandle class.
+
+2007-10-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/sndfile.c
+ Add error codes SFE_ZERO_MAJOR_FORMAT and SFE_ZERO_MINOR_FORMAT.
+
+2007-10-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sd2.c
+ Identify sample-rate/sample-size/channels by resource id.
+
+2007-10-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/broadcast.c src/common.h src/sndfile.c
+ Improvements to handling of broadcast info in WAV files. Thanks to Frederic
+ Cornu and other for their input.
+
+2007-10-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC/include/share/alloc.h
+ Mingw fix for SIZE_T_MAX from Uli Franke.
+
+2007-10-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/open_fail_test.c tests/error_test.c tests/Makefile.am
+ Move tests from open_fail_test.c to error_test.c and remove the former.
+
+2007-10-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/scale_clip_test.(def|tpl)
+ Add tests for SFC_SET_INT_FLOAT_WRITE command.
+
+ * doc/command.html
+ Add docs for SFC_SET_INT_FLOAT_WRITE command.
+
+ * examples/sndfile-play.c tests/dft_cmp.c
+ Fix gcc-4.2 warning messages.
+
+2007-10-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c
+ Add command SFC_GET_CURRENT_SF_INFO.
+
+ * src/sndfile.h.in src/sndfile.c src/create_symbols_file.py
+ Remove function sf_get_info (only ever in pre-release code).
+
+ * tests/command_test.c
+ Add test for SFC_GET_CURRENT_SF_INFO.
+
+2007-10-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Add parsing of 'exif' chunks. Originally coded by Trent Apted.
+
+ * configure.ac
+ Put config stuff in Cfg directory.
+ Remove check for inttypes.h.
+
+2007-10-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/w64.c
+ Fix writing of 'riff' chunk length and check for correct value in parser.
+
+2007-09-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Link to MP3 FAQ entry.
+
+2007-09-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Move the blocksize check to an earlier stage of flac_buffer_copy.
+
+2007-09-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC
+ Huge merge from FLAC upstream.
+
+2007-09-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/*.c
+ Change license to all example programs to BSD.
+
+2007-09-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC/include/FLAC/metadata.h
+ Include <sys/types.h> to prevent compile error on OSX.
+
+ * Octave/octave_test.sh
+ Disable test on OSX. Can't get it to work.
+
+ * src/flac.c
+ Check the blocksize returned from the FLAC decoder to prevent buffer
+ overruns. Reported by Jeremy Friesner. Thanks.
+
+2007-09-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Makefile.am M4/octave.m4
+ Fix build when Octave headers are not present.
+
+2007-08-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/development.html
+ Add note about bzr repository directory looking empty.
+
+2007-08-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac Octave/* M4/octave_*
+ Bunch of changes to add ability to build GNU Octave modules to read/write
+ sound files using libsndfile from Octave.
+
+2007-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * acinclude.m4 configure.ac ...
+ Get rid of acinclude.m4 and replace it with an M4 directory.
+
+2007-08-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Remove crufty Metrowerks compiler support. Allow header file to be compiled
+ on windows with both GCC and microsoft compiler.
+
+2007-08-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/dft_cmp.[ch] tests/floating_point_test.tpl
+ Clean up floating point tests.
+
+2007-08-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix segfault when COMM chunk length is byte swapped.
+
+2007-08-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/mat4.c src/mat5.c src/sndfile.c
+ Add a generic SFE_CHANNEL_COUNT_ZERO error, remove format specific errors.
+
+ * src/au.c
+ Fix crash on AU files with zero channel count. Reported by Ben Alison.
+
+2007-08-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/voc.c
+ Fix bug in handling file supplied by Matt Olenik.
+
+2007-07-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/OGG
+ Merge from OGG upstream sources.
+
+2007-07-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC
+ Merge from FLAC upstream sources.
+
+2007-07-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Fix memory leak; set copy parameter to FALSE in call to
+ FLAC__metadata_object_vorbiscomment_append_comment.
+
+ * src/common.[ch]
+ Add function psf_rand_int32().
+
+2007-07-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC
+ Merge from FLAC upstream sources.
+
+ * src/strings.c tests/string_test.c tests/Makefile.am
+ Make sure string tests for SF_STR_LICENSE actually works.
+
+2007-07-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/string_test.c
+ Add ability to test strings stored in metadata secion of FLAC files.
+
+ * src/string.c
+ Fix logic for testing if audio data has been written and string is added.
+ Make sure SF_STR_ALBUM actually works.
+
+ * src/flac.c
+ Finalize reading/writing string metadata. Tests pass.
+
+ * src/sndfile.h.in tests/string_test.c src/flac.c
+ Add string type SF_STR_LICENSE, update test and use for FLAC files.
+
+ * src/sndfile.h.in
+ Add definition for SFC_SET_SCALE_FLOAT_INT_WRITE command.
+
+ * src/common.h src/double64.c src/float32.c src/sndfile.c
+ Add support for SFC_SET_SCALE_FLOAT_INT_WRITE (still needs testing).
+
+2007-07-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Apply patch from Ed Schouten to read artist and title metadata from FLAC
+ files.
+ Improve reporting of FLAC metadata.
+
+ * src/sndfile.h.in tests/string_test.c src/flac.c
+ Add string type SF_STR_ALBUM, update test and use for FLAC files.
+
+2007-06-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC/*
+ Merge from upstream CVS.
+
+2007-06-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC/*
+ Update from upstream CVS.
+
+2007-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/cpp_test.cc
+ Add extra tests for when the SndfileHandle constructor fails.
+
+ * src/sndfile.hh
+ Make sure failure to open the file in the constructor does not allow later
+ calls to other methods to fail.
+
+2007-06-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/util.tpl
+ Add function write_mono_file.
+
+ * tests/generate.[ch] tests/Makefile.am
+ Add files generate.[ch] and hook into build.
+
+ * tests/write_read_test.tpl
+ Add multi_seek_test.
+
+ * src/flac.c
+ Fix buffer overflow bug. Test provided by Jeremy Friesner and fix provided
+ by David Viens.
+
+2007-06-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Minor update.
+
+ * configure.ac src/FLAC/src/libFLAC/ia32/Makefile.am src/Makefile.am
+ Apply patch from Trent Apted make it compile on Intel MacOSX. Thanks Trent.
+
+2007-05-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fix writing of MSGUID subtypes. Thanks to Bruce Sharpe.
+
+2007-05-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fix array indexing bug raised by Bruce Sharpe.
+
+2007-05-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC/src/share/getopt/getopt.c
+ Fix Mac OSX / PowerPC compile warnings.
+
+ * configure.ac
+ Make sure WORDS_BIGENDIAN gets correctly defined for FLAC code.
+
+2007-05-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Add Q/A about MP3 support.
+
+2007-05-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/new_file_type.HOWTO
+ Minor updates.
+
+2007-05-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wve.c
+ Fix a couple bad parameters with psf_log_printf.
+
+ * src/pcm.c
+ Improve error reporting.
+
+ * src/common.h src/common.c
+ Constify psf_hexdump.
+
+2007-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC
+ Ditch and re-import required FLAC code.
+
+ * configure.ac
+ Force FLAC__HAS_OGG variable to 1.
+
+ * src/FLAC/src/libFLAC/stream_encoder.c
+ Fix compiler warnings.
+
+2007-04-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac tests/win32_ordinal_test.c
+ Detect if win32 DLL is beging generated and only run win32_ordinal_test if
+ true.
+
+ * src/G72x/Makefile.am src/Makefile.am
+ Use $(EXEEXT) where possible.
+
+2007-04-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wve.c src/common.h src/sndfile.c
+ Complete definition of SfE_WVE_NO_WVE error message.
+
+ * src/wve.c
+ Fix error in files generated on big endian systems. Robustify parsing.
+
+2007-04-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/double64.c
+ Fix clipping of double to short conversions on 64 bit systems.
+
+ * src/flac.c regtest/database.c tests/cpp_test.cc
+ Fix compile warnings for 64 bit systems.
+
+2007-04-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/wav_w64.c
+ Use audio detect function when 'fmt ' chunk data is suspicious.
+
+ * configure.ac
+ Add ugly hack to remove -Werror from some Makefiles.
+
+2007-04-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/GSM610/long_term.c src/macbinary3.c tests/cpp_test.cc
+ Add patch from André Pang to clean up compiles on OSX.
+
+ * src/wve.c src/common.h src/sndfile.c src/sndfile.h.in
+ examples/sndfile-convert.c
+ Merge changes from Reuben Thomas to improve WVE support.
+
+ * tests/lossy_comp_test.c tests/Makefile.am
+ Add tests for WVE files.
+
+2007-04-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Add a static SndfileHandle::formatCheck method as suggested by Jorge
+ Jiménez.
+
+2007-04-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed a bug in sf_error() where the function itself was being compared
+ against zero. Add a check for a NULL return from peak_info_calloc. Fix a
+ possible NULL dereference.
+
+2007-04-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Turn off seekable flag when writing, return SFE_BAD_RDWR_FORMAT when
+ opening file for RDWR.
+
+ * src/sndfile.c
+ Improve error message for SFE_BAD_RDWR_FORMAT.
+
+ * src/mat4.c
+ Fix array indexing issue. Thanks to Ben Allison (Nullsoft) for alerting me.
+
+2007-03-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Add Q/A 19 on project files.
+
+2007-03-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Guard agains MacOSX universal binary compiles.
+
+ * doc/FAQ.html
+ Add Q/A 18 and clean up Q3.
+
+2007-02-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Add support for 'in24' files.
+
+2007-02-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/wav_w64.c src/wav_w64.h
+ Start work towards detecting ausio codec type from the actual audio data.
+
+ * src/audio_detect.c src/test_audio_detect.c
+ Add new file and its unit test.
+
+2007-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/cooledit-fixer.c examples/Makefile.am
+ Remove old broken example program.
+
+2007-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/sndfile.h.in src/create_symbols_file.py
+ Add function sf_get_info.
+
+2007-01-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ For ALSA, use the 'default' device instead of 'plughw:0'.
+
+2007-01-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Allow writing of WAV/WAVEX 'BEXT' chunks in SFM_RDWR mode.
+
+2007-01-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/development.html doc/embedded_files.html man/sndfile-play.1
+ Minor documentation fixes. Thanks Reuben Thomas.
+
+2006-12-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Add -override-sample-rate command line option.
+
+2006-11-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Force errno to zero at start of some tests.
+
+ * src/sndfile.c
+ Minor clean up of error handling.
+
+ * configure.ac
+ Remove an assembler test which was failing on OSX.
+
+2006-11-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Fix the definition of SF_PLATFORM_S64 for MinGW.
+
+ * src/FLAC/Makefile.am src/FLAC/share/grabbag/Makefile.am
+ Fix path problems for MinGW.
+
+2006-11-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfendian.h
+ Add include guard.
+
+ * src/Makefile.am src/flac.c
+ Clean up include paths.
+
+ * src/test_conversions.c
+ New file to test psf_binheader_readf/writef functions.
+
+ * src/Makefile.am src/test_file_io.c src/test_log_printf.c src/common.c
+ Clean up unit testing.
+
+ * src/common.c
+ Fix a bug reading/writing 64 bit header fields. Thanks to Jonathan Woithe
+ for reporting this.
+
+ * src/test_conversions.c
+ Complete unit test for above fix.
+
+2006-11-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ More refactoring to clean up psf_open_file() and vairous sf_open()
+ functions.
+
+2006-11-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Apply a patch from Jonathan Woithe to allow opening of (malformed) WAV
+ files of over 4 gigabytes.
+
+2006-11-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Refactor function psf_open_file() to provide a single return point.
+
+ * tests/misc_test.c
+ Fix permission_test to ensure that read only file can be created.
+
+2006-11-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add SF_PLATFORM_S64 macro as a platform independant way of doing signed 64
+ bit integers.
+
+ * src/aiff.c src/svx.c src/wav.c
+ Add warning in log if files are larger than 4 gigabytes in size.
+
+2006-11-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/FLAC src/OGG confgure.ac src/Makefile.am
+ Pull in all required FLAC and OGG code so external libraries are not
+ needed. This makes compiling on stupid fscking Windoze easier.
+
+2006-10-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sd2.c
+ Add workaround for switched sample rate and sample size.
+
+ * src/wav.c
+ Add workaround for excessively long coding history in the 'bext' chunk.
+
+2006-10-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c src/wav.c doc/command.html
+ Use SF_AMBISONIC_* instead of SF_TRUE/SF_FALSE.
+
+2006-10-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/wav.c src/wav_w64.c src/common.h doc/command.html
+ Apply a patch from Fons Adriaensen to allow writing on WAVEX Ambisonic
+ files. Still needs a little tweaking before its ready for release.
+
+ * src/*.c
+ Use the UNUSED macro to prevent compiler warnings.
+
+2006-10-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix a bug in parsing AIFF files with a slightly unusual 'basc' chunk. Thanks
+ to David Viens for providing two example files.
+
+ * src/common.(c|h) src/aiff.c
+ Add a function psf_sanitize_string and use it in aiff.c.
+
+2006-10-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_w64.c
+ Apply a patch from Fons Adriaensen which fixes a minor WAVEX GUID issue.
+
+2006-10-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/Makefile.am
+ Fix problem related to recent test coverage changes.
+
+2006-10-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac tests/Makefile.am
+ Add --enable-test-coverage configure option.
+
+2006-10-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Add an std::string SndfileHandle constructor.
+
+ * tests/scale_clip_test.tpl
+ Fix the 'make distcheck' target.
+
+2006-10-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/double64.c src/float32.c
+ Add optional clipping on float file data to int read data conversions.
+
+ * tests/tests/scale_clip_test.(def|tpl)
+ Add test for above new code.
+
+2006-09-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/aiff_rw_test.c
+ Add 'MARK' chunks to make sure they are parsed correctly.
+
+2006-09-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix parsing of MARK chunks. Many thanks to Sciss for generating files to
+ help debug the problem.
+
+2006-09-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Make the SF_MIN and SF_MAX macros at least partially type safe.
+
+ * tests/lossy_comp_test.c
+ Fix overflow problems when ensuring that signalis not zero.
+
+2006-08-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac docs/*.html
+ Changes for release 1.0.17.
+
+2006-08-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Remove inline from functions called by pointer. Thanks to Sampo Savolainen
+ for notifying me of this.
+
+2006-07-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Add writeSync method.
+ Add copy constructor and assignment operator (thanks Daniel Schmitt).
+ Add methods readRaw and writeRaw.
+ Make read/write/readf/writef simple overlaods instead of templates (thanks
+ to Trent Apted for suggesting this).
+
+ * tests/cpp_test.cc
+ Cleanup. Add tests.
+
+2006-07-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Templatize the read/write/readf/writef methods as suggested by Lars Luthman.
+ Prevent the potential leak of SNDFILE* pointers in the openRead/openWrite/
+ openReadWrite methods.
+ Add const to SF_INFO pointer in Sndfile constructor.
+ Make the destrictor call the close() method.
+
+ * tests/cpp_test.cc
+ Add more tests.
+
+2006-07-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/cpp_test.cc
+ Remove the generated file so "make distcheck" passes.
+
+ * src/Makefile.am
+ Add sndfile.hh to distributed header files.
+
+ * src/sndfile.hh
+ Change the license for the C++ wrapper to modified BSD.
+
+2006-07-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.hh
+ Complete it.
+
+ * tests/cpp_test.cc
+ Add more tests.
+
+2006-07-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl
+ Add extern C to generated header file.
+
+ * src/sndfile.hh
+ Work towards completing this.
+
+ * tests/cpp_test.cc tests/Makefile.am
+ Add a C++ test and hook into build.
+
+ * configure.ac
+ Add appropriate CXXFLAGS.
+
+2006-07-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Test if compiler supports -Wpointer-arith.
+
+ * src/common.c
+ Fix a warning resulting from -Wpointer-arith.
+
+2006-07-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Explicitly set endian-ness as well as setting 16 bit output.
+
+ * examples/sndfile-info.c
+ Make sure to parse info if file fails to open.
+
+ * src/sndfile.c
+ Handle parse error a little better.
+
+ * src/wav_w64.[ch]
+ Minor clean up, add detection of IPP ITU G723.1.
+
+2006-06-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Make sure psf->dataoffset gets reset to zero when openning headersless
+ files based on the file name extension.
+
+2006-06-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/(command|lossy_comp|pcm|scale_clip)_test.c tests/fix_this.c
+ tests/write_read_test.(tpl|def)
+ Fix gcc-4.1 compiler warnings about "dereferencing type-punned pointer will
+ break strict-aliasing rules".
+
+ * examples/cooledit-fixer.c
+ More fixes like above.
+
+2006-06-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Fix a windows bug where the syserr string of SF_PRIVATE was not being set
+ correctly.
+
+ * src/sndfile.c
+ Fixed a logic bug in sf_seek(). Thanks to Paul Davis for finding this.
+
+2006-06-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fixed detection of S_IRGRP.
+
+2006-05-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * sndfile-convert.c
+ Add conversion SF_INSTRUMENT data when present.
+
+2006-05-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/development.html
+ Removed references to tla on windows.
+
+ * src/common.h src/sndfile.c
+ Add separate void pointers for file containter and file codec data to
+ SF_PRIVATE struct. Still need to move all existing fdata pointers.
+
+ * tests/write_read_test.tpl
+ Change the order of some tests.
+
+ * src/aiff.c
+ When writing 'AIFC' files, make sure get an 'FVER' gets added.
+
+ * src/common.h src/(dwvw|flac|g72x|gsm610|ima_adpcm|ms_adpcm|paf|sds).c
+ src/(sndfile|voc|vox_adpcm|xi).c
+ Remove fdata field from SF_PRIVATE struct and replace it with codec_data.
+
+2006-05-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/testprog.c Win32/Makefile.am
+ Add a minimal win32 test program.
+
+ * Win32/README-precompiled-dll.txt Mingw-make-dist.sh
+ Update readme and Mingw build script.
+
+2006-05-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac acinclude.m4
+ Minor fixes for Solaris.
+
+2006-05-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_endswap.(def|tpl)
+ Fix printf formatting for int64_t on 64 bit machines.
+
+2006-05-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/binhead_check.py
+ New file to check for bad parameters passed to psf_binheader_writef().
+
+ * src/Makefile.am
+ Hook into test suite.
+
+ * src/voc.c src/caf.c src/wav.c src/mat5.c src/mat4.c
+ Fix bugs found by new test program.
+
+ * src/double64.c
+ Clean up double64_get_capability().
+
+2006-05-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_w64.c
+ Fix a bug on x86_64 where an int was being passed via stdargs and being
+ read using size_t which is 64 bits. Thenks to John ffitch for giving me a
+ login on his box.
+
+2006-05-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/caf.c src/double64.c examples/sndfile-info.c tests/virtual_io_test.c
+ tests/utils.tpl
+ Fix a couple of signed/unsigned problems.
+
+2006-05-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/command_test.c
+ Add channel map tests.
+
+ * src/common.h src/sndfile.c
+ Add a pointer to the SF_PRIVATE struct and make sure it gets freed in
+ sf_close().
+
+2006-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac doc/(command|index|api).html NEWS README
+ Updates for 1.0.16 release.
+
+ * src/sndfile.h.in
+ Define enums for channel mapping.
+
+ * examples/sndfile-info.c
+ Clean up usage of SF_INFO struct.
+
+2006-04-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/util.tpl
+ Add function testing function exit_if_true().
+
+ * tests/floating_point_test.tpl
+ Fix a problem where the test program was not exiting when the test failed.
+
+2006-04-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c src/common.h src/command.c
+ Implement new commands SFC_GET_SIGNAL_MAX and SFC_GET_MAX_ALL_CHANNELS.
+
+ * doc/commands.html
+ Document new commands. Other minor updates.
+
+ * tests/peak_chunk_test.c
+ Update tests for new commands.
+
+2006-04-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/peak_chunk_test.c
+ Add test for RIFX and WAVEX files.
+ Try and confuse the PEAK chunk writing by enabling and disabling it.
+
+ * src/sndfile.c
+ Fix a bug where enabling and disabling PEAK chunk was screwing up.
+
+2006-03-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Add the block of 190 reserved bytes into this struct to allow for
+ future expansion.
+
+ * src/wav.c src/sndfile.c src/broadcast.c
+ Significant cleanup of broadcast wave stuff.
+
+ * examples/sndfile-info.c
+ Fix print message.
+
+ * tests/command_test.c tests/Makefile.am
+ Complete bext tests, hook test in test suite.
+
+2006-03-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Make coding_history field of SF_BROADCAST_INFO struct a char array instead
+ of a char pointer.
+
+ * src/sndfile.c src/common.h src/wav.c
+ Clean up knock on effects of above chnage.
+
+ * examples/sndfile-info.c
+ Add -b command line option to usage message.
+ Clean up output of broadcast wave info.
+
+ * src/wav.c
+ Ignore and skip the 'levl' chunk.
+
+2006-03-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fix handling of --enable and --disable configure args. Thanks to Diego
+ 'Flameeyes' Pettenò who sent the patch.
+
+2006-03-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/win32.html
+ Make it really clear that although the MSVC++ cannot compile libsndfile,
+ the precompiled DLL can be used in C++ programs compiled with MSVC++.
+
+2006-03-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix bug in writing of INST chunk in AIFF files.
+ Fix potential bug in writing MARK chunks.
+
+ * src/sndfile.c
+ Make sure the instrument chunk can only be written at the start of the file.
+
+ * tests/command_test.c
+ Add check of log buffer.
+
+ * tests/utils.tpl
+ Add usage of space character to psf_binheader_writef.
+
+2006-03-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/Makefile.am tests/Makefile.am
+ Remove --source-time argument from autogen command lines.
+
+ * src/broadcast.c
+ New file for EBU Broadcast chunk in WAV files.
+
+ * src/sndfile.c src/sndfile.h.in src/wav.c src/common.h
+ Add patch from Paul Davis implementing read/write of the BEXT chunk.
+
+2006-03-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/README-precompiled-dll.txt
+ New file descibing how to use the precompiled DLL.
+
+ * Win32/Makefile.am
+ Add Win32/README-precompiled-dll.txt to EXTRA_DIST files.
+
+ * configure.ac
+ Bump version to 1.0.15.
+
+2006-03-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ On read, only add the endian flag if the file is big endian.
+
+ * src/ms_adpcm.c
+ Fixed writing of APDCM coeffs in RIFX files.
+
+ * tests/write_read_test.tpl tests/lossy_comp_test.c
+ Add tests for RIFX files.
+
+2006-03-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Mingw-make-dist.sh
+ Bunch of improvements.
+
+ * doc/win32.html
+ Update MinGW program versions.
+
+2006-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/create_symbols_file.py
+ Fix the library name in created win32 DEF file. Add correct DLL name for
+ Cygwin DLL.
+
+ * Win32/Makefile.am tests/Makefile.am
+ Remove redundant files, add win32_ordinal_test to test suite.
+
+ * tests/win32_ordinal_test.c
+ Update to do test in cygsndfile-1.dll as well.
+
+ * doc/win32.html
+ Fix typo, mention that -mno-cygwin with the Cygwin compiler does not work.
+
+ * src/wav.c src/wav_w64.c src/sndfile.c src/sndfile.h.in
+ Apply large patch from Jesse Chappell which adds support for RIFX files.
+
+2006-03-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Makefile.am
+ Add Mingw-make-dist.sh to the extra dist files.
+
+ * configure.ac
+ Fix setting SHLIB_VERSION_ARG for MinGW.
+
+ * tests/win32_ordinal_test.c
+ New test program to test that the win32 DLL ordinals agree with the DEF
+ file.
+
+2006-03-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add a static inline function to convert an int to a size_t. This will be
+ a compile to nothing on 32 bit CPUs and a sign extension on 64 bit CPUs.
+
+ * src/aiff.c src/avr.c src/common.c src/xi.c src/gsm610.c
+ Fix an ia64 problem where a varargs function was being passed an int in
+ some places and a size_t in other places.
+
+ * src/sd2.c
+ Add a workaround for situations where OSX seems to add an extra 0x52 bytes
+ to the start of the resource fork.
+
+2006-02-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Mingw-make-dist.sh
+ Add a shell script to build the windows binary/source ZIP file.
+
+ * doc/index.html
+ Add download link for windows binary/source ZIP file. Add links for GPG
+ signatures.
+
+ * doc/win32.html
+ Remove info about building using microsoft compiler.
+
+ * configure.ac
+ Bump version to 1.0.14.
+
+2006-02-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sd2.c
+ Improve logging of errors in resource fork parser.
+
+2006-01-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/Makefile.msvc
+ Replace au_g72x.* with g72x.*. Thanks to ussell Borogove.
+
+2006-01-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Make sure return values are initialised header buffer is full.
+
+ * src/wav.c
+ Add workarounds for messed up WAV files.
+
+2006-01-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/config.h
+ Undef HAVE_INTTYPES_H for win32.
+
+ * tests/command_test.c
+ Don't exit on error in instrument test for XI files.
+
+ * configure.ac
+ Bump version to 1.0.13.
+
+ * doc/*.html NEWS README
+ Update version numbers.
+
+2006-01-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/xi.c
+ Start work on add read/write of instrument chunks.
+
+ * src/command_test.c
+ Add tests for XI instrument chunk.
+
+ * tests/largefile_test.c tests/Makefile.am
+ Add new test and hook it into the build system. This test will not be run
+ automatically because it requires 3 Gig of disk space and takes 3 minutes
+ to run.
+
+2006-01-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Fix calculation of samples remaining in win32 code. Thanks Axel Röbel.
+
+ * src/common.h
+ Make sure length of header buffer can hold header plus strings. Thanks Axel
+ Röbel.
+
+2006-01-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/aiff.c src/wav.c
+ Apply a patch from John ffitch (Csound project).
+ Add detune field to SF_INSTRUMENT struct.
+ Add reading/writing instrument chunks to WAV files.
+
+ * tests/command_test.c
+ Update SF_INSTRUMENT tests.
+
+ * tests/Makefile.am
+ Hook instrument tests into test suite.
+
+2006-01-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Check for <inttypes.h> because some broken systems (like Solaris) don't have
+ <stdint.h> which is the 1999 ISO C standard file containing int64_t.
+
+ * src/sfendian.h src/common.h
+ Use <inttypes.h> if <stdint.h> is not available.
+
+2005-12-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/peak_chunk_test.c
+ Extend and clean up tests.
+
+ * src/sndfile.c
+ Fix a bug that prevented the turning off of PEAK chunks.
+
+2005-12-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/error_test.c
+ Make the test distclean correct.
+
+ * src/file_io.c
+ Fix an SD2 MacOSX bug (reported by vince schwarzinger).
+
+2005-12-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c tests/command_test.c
+ Apply a big patch from John ffitch (Csound project) to add reading and
+ writing of instrument chunks to AIFF files. Also update the test.
+
+2005-12-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/aiff_rw_test.c tests/virtual_io_test.c tests/utils.tpl
+ Move test function dump_data_to_file() to utils.tpl.
+
+ * tests/error_test.c tests/Makefile.am
+ Updates, including a new test to test that sf_error() returns a valid error
+ number.
+
+2005-12-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/list_formats.c
+ Make sure the SF_INFO struct is memset to all zero before being used.
+ Thanks to Stephen F. Booth.
+
+ * src/sndfile.c
+ Make the return value of sf_error() match the API documentation.
+
+2005-11-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Allow conversion to raw gsm610.
+
+ * src/common.h src/sndfile.c src/au.c
+ Remove au_nh_open() and all references to it (wasn't working anyway).
+
+ * tests/headerless_test.c
+ Add new test for file extension based detection.
+
+ * src/sndfile.c
+ Rejig file extension based file type detection.
+
+2005-11-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Add "gsm" as a recognised file extension when no magic number can be found.
+
+ * tests/lossy_comp_test.c tests/Makefile.am
+ Test headerless GSM610.
+
+2005-11-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Fix a minor typo and a minor error. Thanks Christoph Kobe and John Pavel.
+
+2005-10-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_w64.c
+ Add more reporting of 'fmt ' chunk for G721 encoded files.
+
+ * src/wav.c
+ Gernerate a more correct 20 byte 'fmt ' chunk rather than a 16 byte one.
+
+2005-10-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/G72x/g72x.[ch]
+ Minor cleanup of interface.
+
+2005-10-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ogg.c
+ Removed the horribly broken and non-functional OGG implementation when
+ --enable-experimental was enabled. When OGG does finally work it will be
+ merged.
+
+ * src/caf.c
+ Fix a memory leak.
+
+2005-10-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/g72x.c src/G72x/*.(c|h) src/common.h src/sndfile.c src/wav.c src/au.c
+ Add support for G721 encoded WAV files.
+
+ * doc/index.html
+ Update support matrix.
+
+ * tests/lossy_comp_test.c
+ For file formats that support it, add string data after the audio data and
+ make sure it isn't treated as audio data on read.
+
+ * src/gsm610.c
+ Add code to ensure that the container close function (ie for WAV files) gets
+ called after the codec's close function. This allows GSM610 encoded WAV files
+ to have string data following the audio data.
+ Add an AIFF specific check on psf->datalength.
+
+ * src/wav.c
+ Simplify wav_close function.
+
+ * src/aiff.c
+ Make sure the tailer data gets written at an even file offset. Pad if
+ necessary.
+
+ * src/common.h
+ Replace the close function pointer in SF_PRIVATE with separate functions
+ codec_close and container_close. The former is always called first.
+
+ * src/*.c
+ Fix knock on effects of above.
+
+2005-10-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-info.c
+ Complete dumping SF_INSTRUMENT data.
+
+ * src/dwvw.c src/ima_adpcm.c src/gsm610.c src/ms_adpcm.c
+ Add extra checks in *_init function.
+
+ * tests/lossy_comp_test.c
+ Add a string comment to the end of the files to make sure that the decoder
+ doesn't decode beyond the end of the audio data section.
+
+2005-10-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-info.c
+ Minor code cleanup.
+ Start work on dumping SF_INSTRUMENT data.
+
+2005-10-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/common.h src/common.c
+ Update definition of SF_INSTRUMENT struct and create a function to allocate
+ and initialize the struct (input from David Viens).
+ Clean up definition of SF_INSTRUMENT struct.
+
+ * src/wav.c src/wav_w64.c
+ Add support for Ambisoncs B WAVEX files (David Viens).
+
+ * src/aiff.c src/wav.c src/wav_w64.c
+ Start work on reading/writing the SF_INSTRUMENT data.
+
+ * src/sndfile.c
+ Add code to get and set SF_INSTRUMENT data.
+
+ * tests/command_test.* tests/Makefile.am
+ Add test for set and getof SF_INSTRUMENT data.
+ The file command_test.c is no longer autogen generated.
+
+2005-10-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/gsm610.c
+ Minor cleanup.
+
+2005-10-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/lossy_comp_test.c
+ Minor cleanup.
+
+2005-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Ensure sfconfig.h is included before any other header file.
+
+ * src/file_io.c
+ Add comments documenting the three sections of the file.
+
+ * src/gsm610.c
+ Make sure SF_FORMAT_WAVEX are handled correctly.
+
+2005-10-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add options to allow disabling of FLAC and ALSA. Suggested by Ben Greear.
+
+2005-09-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/locale_test.c
+ Modify the way the unicode strings were encoded so that older compilers
+ do not complain. Thanks Axel Röbel.
+
+ * configure.ac
+ Bump the version to 1.0.12 for release.
+
+ * NEWS README Win32/config.h doc/(FAQ|index.html|command|api).html
+ Update version numbers.
+
+2005-09-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Fix valgrind error and minor cleanup.
+
+2005-09-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/(au|paf|aiff|w64|wav|svx).c
+ Make sure structs are initialised.
+
+2005-09-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Make -Wdeclaration-after-statement work with --enable-gcc-werror configure
+ option.
+ Add -std=gnu99 (C99 plus posix style stuff like gmtime_r) to CFLAGS if the
+ compiler supports it.
+
+2005-09-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac acinclude.m4
+ Add -Wdeclaration-after-statement to CFLAGS if the compilers supports it.
+
+2005-09-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/util.(tpl|def)
+ Make the test_write_*_or_die() functions const safe.
+
+2005-09-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/nist.c
+ Make sure the data offset is read from the file header. Thanks to
+ David A. van Leeuwen for a patch.
+
+2005-09-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/sfconfig.h
+ Check for <locale.h> and the function setlocale().
+ Set config variables to zero if not found.
+
+ * tests/locale_test.c tests/Makefile.am
+ Add new test program and hook into build/test system.
+
+2005-09-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/file_io.c
+ On windows, use windows specific types for file handles.
+ Add functions psf_init_files() and psf_use_rsrc().
+
+ * src/sd2.c
+ Make resource fork handling independant of file desciptor/handles.
+
+ * src/sndfile.c src/test_file_io.c
+ Fix knock on effects.
+
+2005-09-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float_cast.h
+ The lrint and lrintf implementations in Cygwin are both buggy and slow.
+ Add replacements which were pulled from the Public Domain MinGW math.h
+ header file.
+
+2005-09-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/(lossy_comp_test|virtual_io_test).c
+ More Valgrind fixups.
+
+ * configure.ac
+ Simplify and correct configuring for Cygwin.
+
+ * Win32/config.h Win32/sndfile.h Win32/Makefile.msvc
+ Update build for MSVC.
+
+2005-09-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/lossy_comp_test.c
+ Make sure to close SNDFILE when exiting test when file format is not seekable.
+
+ * tests/(aiff_rw_test|virtual_io_test).c
+ Do a few valgrind fix ups.
+
+2005-09-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float32.c src/double64.c
+ Replace floating point equality comparisons with greater/less comparisons.
+ Found by John Pavel using the Intel compiler.
+
+ * src/sfconfig.h
+ New file to clean up issues surrounding autoconf generated preprocessor
+ symbols.
+
+ * src/*.(c|h) tests/*.(c|tpl) examples/*.c
+ Fixed a bunch of other stuff found by John Pavel using the Intel compiler.
+
+ * src/file_io.c
+ Remove Mac OS9 Metrowerks compiler specific hacks.
+
+2005-08-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/w64.c
+ Cast integer literal to sf_count_t in call to psf_binheader_writef() to
+ prevent Valgrind error.
+
+2005-08-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Improve documentation of SF_GET_FORMAT_SUBTYPE.
+
+2005-08-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Allow files to be converted to SD2 format.
+
+ * src/sd2.c
+ Fix a bug in reading and writing of SD2 files on little endian CPUs.
+ Thanks to Matthew Willis for finding this.
+
+2005-08-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Update Note2 to point to SFC_SET_SCALE_FLOAT_INT_READ.
+
+2005-08-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Use $host_os instead of $target_os (thanks to Mo De Jong).
+
+2005-08-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/Makefile.am
+ Apply a patch from Mo DeJong to allow building outside of the source dir.
+
+ * src/file_io.c
+ Fix psf_fsync() for win32.
+
+ * src/wav.c src/wav_w64.(c|h)
+ Move some code from wav.c to wav_w64.c to improve the log output of files of
+ type WAVE_FORMAT_EXTENSIBLE.
+
+2005-08-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/create_symbols_file.py
+ Make sure sf_write_fsync is an exported symbol.
+
+ * examples/sndfile-convert.c
+ Add support for writing VOX adpcm files.
+
+2005-07-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Document the new function sf_write_sync().
+
+ * doc/FAQ.html
+ Do you plan to support XYZ codec.
+
+2005-07-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c
+ Add function sf_write_sync() to the API.
+
+ * src/common.h src/file_io.c
+ Low level implementation (win32 not done yet).
+
+ * tests/write_read_test.tpl
+ Use the new function in the tests.
+
+2005-07-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/double64.c src/float32.c src/sndfile.c
+ Change the way PEAK chunk info is stored. Peaks now stored as an sf_count_t
+ for position and a double as the value.
+
+ * src/aiff.c src/caf.c src/wav.c
+ Fix knock on effects of above changes.
+
+ * src/caf.c
+ Implement 'peak' chunk for file wuth data in SF_FORMAT_FLOAT or
+ SF_FORMAT_DOUBLE format.
+
+2005-07-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/nist.c
+ Fix a bug where a variable was being used without being initialized.
+
+ * src/flac.c
+ Add extra debug in sf_flac_meta_callback.
+ Make a bunch of private functions static.
+
+ * src/aiff.c src/wav.c
+ Fix allocation for PEAK_CHUNK (bug found using valgrind).
+
+2005-07-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Move the peak_loc field of SF_PRIVATE to the PEAK_CHUNK struct.
+ Remove had_peak field of SF_PRIVATE, use pchunk != NULL instead.
+ Rename PEAK_CHUNK and PEAK_POS to PEAK_CHUNK_32 and PEAK_POS_32.
+
+ * src/aiff.c src/caf.c src/wav.c src/float32.c src/double64.c
+ Fix knock on effects from above.
+
+2005-07-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Prevent files with unknown chunks from being opened read/write.
+
+2005-07-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/flac.c
+ Do not use psf->end_of_file because it never gets set to anything.
+
+ * src/common.h
+ Remove unused SF_PRIVATE field end_of_file.
+
+2005-07-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Change the 'S' format specifier of psf_binheader_writef() to write AIFF
+ style strings (no terminating character).
+
+ * src/aiff.c
+ Move to new (correct) AIFF string style. Thanks to Axel Röbel for being
+ so persistent on this issue.
+
+2005-07-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Allow SFE_UNSUPPORTED_FORMAT as an error from sf_open().
+
+ * doc/api.html doc/command.html
+ Documentation updates (thanks to Kyroz for promoting these updates).
+
+ * src/mat5.c
+ Modify the way the header is written.
+
+2005-07-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/caf.c
+ Add a 'free' chunk to the written file so that the audio data starts at
+ an offset of 0x1000.
+
+ * src/sndfile.c
+ Allow SFE_UNSUPPORTED_FORMAT as an error from sf_open().
+
+2005-07-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/caf.c src/sndfile.c
+ Add support for signed 8 bit integers.
+
+ * tests/write_read_test.tpl
+ Add test for signed 8 bit integers in CAF files.
+
+ * doc/index.html
+ Update matrix for signed 8 bit integers in CAF files.
+
+2005-07-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Update sf_check_format() to support CAF.
+
+ * examples/sndfile-convert.c
+ Add support for ".caf" file extension.
+
+ * doc/index.html
+ Add Apple CAF to the support matrix.
+
+ * src/caf.c
+ Add file write support.
+
+ * src/common.c
+ Fix printing of Frames.
+
+ * tests/Makefile.am tests/write_read_test.tpl tests/lossy_comp_test.c
+ tests/header_test.tpl misc_test.c
+ Add tests for CAF files.
+
+2005-07-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Fix Q/A about reading/writing memory buffers.
+
+ * src/caf.c
+ Bunch of work to support reading of CAF files.
+
+2005-07-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/(aiff|ima_adpcm|mat4|mat5|ms_adpcm).c examples/sndfile-play.c
+ Fix sign conversion errors reported by gcc-4.0.
+
+ * src/caf.c
+ New file for Apple's Core Audio File format.
+
+ * src/sndfile.c src/common.h src/sndfile.h.in src/Makefile.am
+ Hook new file into build system.
+
+2005-06-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src_wav_w64.c
+ Fix handling of stupidly large 'fmt ' chunks. Thanks to Vadim Berezniker
+ for supplying an example file.
+
+ * src/common.h src/sndfile.c
+ Remove redundant error code SFE_WAV_FMT_TOO_BIG.
+
+2005-06-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/common.h src/sndfile.c
+ Add public error value SF_ERR_MALFORMED_FILE.
+
+ * src/sndfile.c
+ When parsing a file header fails and we don't have a system error, then set
+ the error number to SF_ERR_MALFORMED_FILE (suggested by Kyroz).
+
+ * configure.ac
+ Allow sqlite support to be disabled in configure script.
+
+ * regtest/database.c regtest/sndfile-regtest.c
+ Fix compiling when sqlite is missing.
+
+2005-06-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Fix psf_is_pipe() and return value of psf_fread() when using virtual i/o.
+
+ * src/sndfile.c
+ Fix VALIDATE_AND_ASSIGN_PSF macro for virtual i/o.
+
+ * tests/virtual_io_test.c
+ Fill in skeleton test program.
+
+ * tests/Makefile.am
+ Move virtual i/o tests to end of tests with stdio/pipe tests.
+
+ * src/(sndfile.h.in|file_io.c|common.h|sndfile.c) tests/virtual_io_test.c
+ Rename some of the virtual i/o functions and data types.
+
+2005-06-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix the return values of sf_commands : SFC_SET_NORM_DOUBLE,
+ SFC_SET_NORM_FLOAT, SFC_GET_LIB_VERSION and SFC_GET_LOG_INFO. Thanks to
+ Kyroz for pointing out these errors.
+
+ * doc/command.html
+ Correct documented return values for SFC_SET_NORM_DOUBLE and
+ SFC_SET_NORM_FLOAT. Thanks to Kyroz again.
+
+2005-05-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * regtest/*
+ Add new files for sndfile-regtest program.
+
+ * configure.ac Makefile.am
+ Hook regetest into build.
+
+ * src/wav.c src/common.c
+ Fix a regression where long ICMT chunks were causing the WAV parser
+ to exit.
+
+2005-05-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * libsndfile.spec.in
+ Add html docs to the files section as suggested by Karsten Jeppesen.
+
+ * src/aiff.c
+ Fix parsing of odd length ANNO chunks.
+
+2005-05-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Change the include guard to prevent clashes with other code.
+
+2005-05-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Improve error handling in code for playback under Linux/ALSA.
+
+2005-05-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ircam.c
+ Fix writing of IRCAM files on big endian systems (thanks to Axel Röbel).
+
+ * src/wav.c
+ Add workaround for files created by the Peak audio editor on Mac which can
+ produce files with very short LIST chunks (thanks to Jonathan Segel who
+ supplied the file).
+
+2005-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Apply a patch From David Viens to make the parsing of basc chunks more
+ robust.
+
+ * src/wav.c
+ Another patch from David Viens to write correct wavex channel masks for
+ the most common channel configurations.
+
+2005-04-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/command.c
+ Only allow FLAC in the format arrays if FLAC is enabled. Thanks to
+ Leigh Smith.
+
+2005-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add a directory field for storing the file directory to the SF_PRIVATE
+ struct.
+
+ * src/sndfile.c
+ Grab the directory name when copying the file path.
+
+ * src/file_io.c
+ Cleanup psf_open_rsrc() and also check for resource fork in
+ .AppleDouble/filename.
+
+2005-03-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/svx.c
+ Fix a bug in the printing of the channel count. Bug reported by Michael
+ Schwendt. Thanks.
+
+2005-01-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c
+ Fix a seek bug for 24 bit PAF files.
+
+ * tests/write_read_test.tpl
+ Update write_read_test to trigger the previously hidden PAF seek bug.
+
+2005-01-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/w64.c src/wav.c
+ Do not return a header parse error when the log buffer overflows.
+ Continuing parsing works even on files where the log buffer does overflow.
+ This avoids a bug on some weirdo WAV (and other) files.
+
+ * src/common.h src/sndfile.c
+ Remove SFE_LOG_OVERRIN error and its associated error message.
+
+ * src/file_io.c
+ Fix a rsrc fork problem on MacOSX.
+
+2004-12-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile-play.c
+ In the ALSA output code, added call to snd_pcm_drain() just before
+ snd_pcm_close() as suggested by Thomas Kaeding.
+ In the OSS output code, added two ioctls (SNDCTL_DSP_POST and
+ SNDCTL_DSP_SYNC) just before the close of the audio device.
+
+ * tests/virtual_io_test.c tests/Makefile.am
+ Add a new test program (currently empty) and add it to the build.
+
+2004-12-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.h src/common.h src/file_io.c
+ src/create_symbols_file.py
+ Apply patch from Steve Baker which is the beginnings of a virtual
+ I/O interface.
+
+2004-12-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c src/sndfile.h.in
+ Const-ify the write path throughout the library.
+
+2004-12-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/development.html
+ Minor improvements.
+
+2004-11-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/bugs.html
+ Minor improvements.
+
+2004-11-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Add workaround for Logic Platinum AIFF files with broken COMT chunks.
+
+2004-11-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Remove some ambiguities in the SD2 FAQ answer.
+
+2004-11-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/sndfile.h Win32/config.h MacOS9/sndfile.h MacOS9/config.h
+ Updates from autoconfig versions.
+
+2004-11-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fix parsing of COMT chunks. Store SF_STR_COMMENT data in ANNO chunks
+ instead of COMT chunk.
+
+2004-11-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c src/common.h
+ Change the ptr argument to psf_write() from "void*" to a "const void*".
+ Thanks to Tobias Gehrig for suggesting this.
+
+2004-10-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c src/common.h
+ Add functions psf_close_rsrc() and read length of resourse fork into
+ rsrclength field of SF_PRIVATE.
+
+ * src/sd2.c
+ Make sure resource fork gets closed.
+
+ * tests/util.tpl
+ Add functions to check for file descriptor leakage.
+
+ * src/write_read_test.tpl
+ Use the file descriptor leak checks.
+
+ * src/sndfile.h.in
+ Add SFC_GET_LOOP_INFO and SF_LOOP_INFO struct.
+
+ * src/common.h
+ Add SF_LOOP_INFO pointer to SF_PRIVATE.
+
+ * src/wav.c src/aiff.c
+ Improve and add parsing of 'ACID' and 'basc' chunks, filling in
+ SF_LOOP_INFO data in SF_PRIVATE.
+
+2004-10-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sd2.c
+ Further cleanup: remove printfs, change snprintf to LSF_SNPRINTF.
+
+ * Win32/config.h Win32/sndfile.h
+ Updates.
+
+ * tests/util.tpl
+ Add win32 macro for snprintf.
+
+2004-10-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfendian.h
+ Add macros : H2BE_SHORT, H2BE_INT, H2LE_SHORT and H2LE_INT.
+
+ * src/sd2.c
+ Use macros to make sure writing SD2 files on little endian machines works
+ correctly.
+
+ * tests/util.tpl
+ Add a delete_file() function which also deletes the resource fork of SD2
+ files.
+
+ * tests/write_read_test.tpl
+ Use delete_file() so that "make distcheck" works.
+
+2004-10-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/file_io.c
+ Move resource filename construction and testing to psf_open_rsrc().
+
+ * src/common.h src/sndfile.c
+ Add error SFE_SD2_FD_DISALLOWED.
+
+ * tests/util.tpl tests/*.(c|tpl)
+ Add and allow_fd parameter to test_open_file_or_die() so that use of
+ sf_open_fd() can be avoided when opening SD2 files.
+
+2004-10-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Update ACID chunk parsing.
+
+ * src/sd2.c
+ More fixes for files with large resource forks.
+
+2004-10-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/sndfile.c
+ Add error numbers and messages for sd2 files.
+
+ * src/sd2.c
+ Reading of sd2 (resource fork version) now seems to be working.
+
+2004-10-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.h
+ Update file_io.c to include win32 psf_rsrc_open().
+
+ * tests/floating_point_test.tpl
+ Remove use of __func__ in test programs (MSVC++ doesn't grok this).
+
+ * Win32/(config|sndfile).h MacOS9/(config|sndfile).h
+ Updates.
+
+2004-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfendian.h
+ Fix endswap_int64_t_(array|copy).
+
+ * src/test_endswap.(tpl|def)
+ Add tests for above and inprove all tests.
+
+2004-10-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfendian.h
+ Improve type safety, add endswap_double_array().
+
+ * src/double64.c
+ Use endswap_double_array() instead of endswap_long_array().
+
+ * src/test_endswap.(tpl|def) src/Makefile.am
+ Add preliminary endswap tests and hook into build system.
+
+2004-10-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/configure.ac src/makefile.am
+ Finally fix the bulding of DLLs on Win32/MinGW.
+
+ * tests/makefile.am
+ Fix running of tests on Win32/MinGW.
+
+2004-10-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c tests/floating_point_test.tpl
+ Rename SFC_SET_FLOAT_INT_MULTIPLIER to SFC_SET_SCALE_FLOAT_INT_READ.
+
+ * doc/command.html
+ Document SFC_SET_SCALE_FLOAT_INT_READ.
+
+2004-09-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/floating_point_test.(tpl|def)
+ Derived from floating_point_test.c.
+ Add (float|double)_(short|int)_test functions.
+
+ * tests/util.(tpl|def)
+ Make separate float and double versions of gen_windowed_sine().
+
+ * tests/write_read_test.tpl
+ Fix after changes to gen_windowed_sine().
+
+ * src/(float32|double64).c
+ Implement SFC_SET_FLOAT_INT_MULTIPPLIER.
+
+2004-09-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * acinclude.m4
+ Fix warnings from automake 1.8 and later.
+
+ * examples/sndfile-info.c
+ Add a "fflush (stdout)" after printing Win32 message.
+
+2004-09-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/Makefile.mingw.in
+ Add a "make install" target.
+
+2004-09-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/common.h src/sndfile.c src/command.c
+ Start work on adding command SFC_SET_FLOAT_INT_MULTIPLIER.
+
+2004-09-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Fix a bug converting stereo integer PCM files to float.
+
+2004-09-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Appy patch from Conrad Parker to make Mac OSX error messages more
+ consistent and informative.
+
+ * doc/api.html
+ Fix a HTML HREF which was wrong.
+
+ * doc/win32.html
+ Add information about when nmake fails.
+
+2004-09-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Another patch from Denis Cote to prevent race conditions.
+
+2004-09-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/ms_adpcm.c src/ima_adpcm.c
+ Fix alternative to ISO standard flexible struct array feature for broken
+ compilers.
+
+2004-08-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/string.c src/sndfile.c
+ Make sf_set_string() return an error if trying to set a string when in
+ read mode.
+
+2004-08-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Change the unnamed union into a named union so gcc-2.95 will compile it.
+
+ * src/*.c
+ Fixes to allow for the above change.
+
+2004-08-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Fixes for Win32. Thanks to Denis Cote.
+
+ * Win32/Win32/Makefile.(msvc|mingw.in)
+ Fix build system after removal of sfendian.h.
+ Build sndfile-convert.
+
+ * src/Makefile.am
+ Remove sfendian.c from dependancies.
+
+2004-08-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Fix typo in comments (thanks Tommi Sakari Uimonen).
+
+2004-07-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/(a|u)law_test.c
+ Minor cleanup.
+
+2004-07-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/(pcm|float|double64|ulaw|alaw|xi).c
+ Optimise read/write loops by removing a redundant variable.
+
+2004-07-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Remove call to fsync() in psf_close().
+
+2004-07-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c
+ Inline x2y_array() functions where possible.
+
+ * configure.ac
+ Detect presence of type int64_t.
+
+ * src/sfendian.c src/sfendian.h
+ Move functions in the first file to the sfendian.h as static inline
+ functions.
+ Improve endswap_long_*() where possible.
+
+2004-07-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c
+ When converting from unsigned char to float or double, subtract 128 before
+ converting to float/double rather than after to save a floating point
+ operation as suggested by Stefan Briesenick.
+
+ * src/(pcm|sfendian|alaw|ulaw|double64|float32).c
+ Optimize inner loops by changing the loop counting slightly as suggested
+ by Stefan Briesenick.
+
+ * configure.ac
+ Detect presence of <byteswap.h>.
+
+ * src/sfendian.h
+ Use <byteswap.h> if present as suggested by Stefan Briesenick.
+
+ * src/pcm.c
+ Update bytewapping.
+
+2004-07-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/*.c
+ Change the psf->buffer field of SF_PRIVATE into a more type safe union with
+ double, float, int etc elements.
+
+2004-06-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Merge slightly modifed patch from Stanko Juzbasic which allows playback of
+ mono files on MacOSX.
+
+2004-06-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Move copy_metadata() after the second sf_open().
+
+2004-06-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Fix a bug which caused the program to go into an infinite loop if the source
+ file has no meta-data. Thanks to Ron Parker for reporting this.
+
+ * src/sndfile.h.in
+ Add SF_STR_FIRST and SF_STR_LAST to allow enumeration of string types.
+
+ * Win32/sndfile.h MacOS9/sndfile.h
+ Update these as per the above file.
+
+2004-06-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/common.h src/ogg.c src/sndfile.c src/sndfile.h.in
+ src/Makefile.am
+ Apply large patch from Conrad Parker implementing Ogg Vorbis, Ogg Speex and
+ Annodex support via liboggz and libfishsound. Thanks Conrad.
+
+2004-06-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/avr.c src/ircam.c src/nist.c src/paf.c src/xi.c
+ Add cast to size_t for some parameters passed to psf_binheader_writef. This
+ is Debian bug number 253490. Thanks to Anand Kumria and Andreas Jochens.
+
+ * src/w64.c
+ Found and fixed a bug resulting from use of size_t when writing W64 'fmt '
+ chunk.
+
+2004-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Bump version to 1.0.10 ready for release.
+
+ * Makefile.am
+ Remove redundant files (check_libsndfile.py libsndfile_version_convert.py)
+ from distribution tarball.
+
+ * tests/header_test.tpl
+ Fix uninitialised variable.
+
+ * src/GSM610/short_term.c
+ Fix compiler warning on MSVC++.
+
+2004-05-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Improve record keeping of chunks seen and return an error if a file with
+ unusual chunks is opened in mode SFM_RDWR.
+
+ * src/mmreg.h
+ This file not needed so remove it.
+
+2004-05-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/header_test.tpl
+ Add extra_header_test().
+
+ * src/common.h src/sndfile.c
+ Add SFE_RDWR_BAD_HEADER error number and string.
+
+2004-05-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl tests/*.c tests/*.tpl
+ Add a line number argument to check_log_buffer_or_die() and update all
+ files that use that function.
+
+ * tests/header_test.tpl
+ Modify/update tests for files opened SFM_RDWR and SFC_UPDATE_HEADER_AUTO.
+
+ * src/aiff.c src/wav.c
+ Fix another bug in AIFF and WAV files opened in SFM_RDWR and using
+ SFC_UPDATE_HEADER_AUTO.
+
+ * src/test_file_io.c
+ Add a test for psf_ftruncate() function.
+
+2004-05-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix another weird corner case bug found by Martin Rumori. Thanks.
+
+ * tests/header_test.(tpl|def)
+ Two new files to test for the absence of the above bug and include tests
+ moved from tests/misc_test.c.
+
+ * tests/Makefile.am
+ Hook new tests into build/test system.
+
+ * tests/misc_test.c
+ Remove update_header_test() which has been moved to the new files above.
+
+2004-05-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fixed a bug reported by Martin Rumori on the LAD list. If a file created
+ with a format of SF_FORMAT_FLOAT and then closed before any data is written
+ to it, the header can get screwed up (PEAK chunk gets overwritten).
+
+ * tests/write_read_test.tpl
+ Add a test (empty_file_test) for the above bug.
+
+2004-05-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/Makefile.mingw.in
+ Added a Makefile for MinGW (needs to be processed by configure).
+
+ * src/mmsystem.h src/mmreg.h
+ Add files from the Wine project (under the LGPL) to allow build of
+ sndfile-play.exe under MinGW.
+
+2004-05-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/GSM610/gsm610_priv.h
+ Replace ugly macros with inline functions.
+
+ * src/GSM610/*.c
+ Remove temporary variables used by macros and other minor fixes required by
+ above change.
+
+2004-05-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pipe_test.tpl tests/stdio_test.c Win32/Makefile.msvc
+ Make sure these programs compile (even though they do nothing) on Win32
+ and add them to the "make check" target.
+
+ * src/sfendian.h
+ Fix warning on Sparc CPU and code cleanup.
+
+2004-05-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Fix warning messages when compiling under MinGW.
+
+2004-05-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Set HAVE_FLEXIBLE_ARRAY in src/config.h depending on whether the compiler
+ accepts the flexible array struct member as per 1999 ISO C standard.
+
+ * src/common.h src/ima_adpcm.c src/paf.c src/ms_adpcm.c
+ Added ugly #if HAVE_FLEXIBLE_ARRAY and provided a non-standards compliant
+ hack for non 1999 ISO C compliant compilers.
+
+2004-04-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/strings.c
+ If adding an SF_STR_SOFTWARE string, only append libsndfile-X.Y.Z if the
+ string does not already have libsndfile in the string. Thanks to Conrad
+ Parker.
+
+ * tests/string_test.c
+ Add test to verify the above.
+
+ * examples/sndfile-convert.c
+ Add ability to transcode meta data as well (Conrad Parker).
+
+2004-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Fix minor error. Thanks to Simon Burton.
+
+ * doc/win32.html
+ Started adding instructions for compiling libsndfile under MinGW.
+
+ * configure.ac
+ Add --enable-bow-docs to enable black text on a white background HTML docs.
+
+ * doc/libsndfile.css.in
+ This is now a template file for configure which sets the foreground and
+ background colours.
+
+2004-04-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Do some MinGW fixes.
+
+ * configure.ac doc/Makefile.am
+ Install HTML docs when doing make install.
+
+2004-04-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-info.c
+ Print out the dB level with the signal max.
+
+2004-04-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Define S_ISSOCK in src/file_io.c if required.
+
+2004-04-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Improve printout configuration summary (as suggested by Axel Röbel).
+
+ * doc/index.html
+ Add link to pre-release location.
+
+ * src/sndfile.h.in
+ Remove comma after last element of enum.
+
+ * src/float32.c src/double64.c
+ Fix read/write of float/double encoded raw files to/from pipes.
+
+ * tests/pipe_test.c tests/pipe_test.tpl tests/pipe_test.def
+ Turn pipe_test.c into an autogenerated file and add tests for reading/
+ writing floats and doubles.
+
+ * tests/Makefile.am
+ Hook tests/pipe_test.* into build system.
+
+2004-04-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac acinclude.m4
+ Rename AC_C_STRUCT_HACK macro to AC_C99_FLEXIBLE_ARRAY.
+
+2004-03-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Perform update_header_test in RDWR mode as well.
+
+ * src/aiff.c
+ Fix problems when updating header in RDWR mode.
+
+2004-03-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/w64.c src/wav_w64.c
+ Integrate code supplied by David Viens for supporting microsoft's
+ WAVEFORMATEXTENSIBLE stuff. Thanks David for supplying this.
+
+ * configure.ac doc/*.html
+ Bump version to 1.0.9.
+
+2004-03-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/command.c src/sndfile.c src/sndfile.h.in src/wav.c
+ Started work on supporting microsoft's WAVEFORMATEXTENSIBLE gunk.
+
+2004-03-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/avr.c
+ New file to handle Audio Visual Resaerch files.
+
+ * src/sndfile.h.in src/common.h src/sndfile.c src/command.c
+ Hook AVR into everything else.
+
+ * tests/Makefile.am tests/write_read_test.tpl tests/misc_test.c
+ Add testing for AVR files.
+
+2004-03-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Fix psf_set_file() for win32. Thanks to Vincent Trussart (Plogue Art et
+ Technologie) for coming up with the solution.
+
+2004-03-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl
+ Fixed a bug that was causing valgrind to report a memory leak. The bug was
+ in the test code itself, not the library.
+
+2004-03-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/generate.cs
+ An example showing how to use libsndfile from C#. Thanks to James Robson
+ for providing this.
+
+2004-03-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Fix problems with WAV files containing large chunks after the 'data'
+ chunk. Thanks to Koen Tanghe for providing a sample file.
+
+2004-03-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Detect presense of ALSA (Advanced Linux Sound Architecture).
+
+ * examples/sndfile-play.c
+ Add ALSA output support.
+
+ * examples/Makefile.am
+ Add ALSA_LIBS to link line of sndfile-play.c.
+
+2004-03-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * acinclude.m4
+ Add new macro (AC_C_STRUCT_HACK) to detect whether the C compiler allows
+ the use of the what is known as the struct hack introduced by the 1999 ISO
+ C Standard.
+
+ * configure.ac
+ The last release would not compile with gcc-2.95 due to the use of features
+ (ie struct hack) introduced by the 1999 ISO C Standard.
+ Add check to make sure compiler handles this and bomb out if it doesn't.
+
+2004-03-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl
+ Fix compiler warning on Win32.
+
+ * src/file_io.c
+ Fix use of an un-initialised variable in Win32 stuff.
+
+ * Win32/config.h examples/sndfile-play.c
+ Win32 fixes.
+
+2004-03-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fix bug which occurres when configuring for MinGW.
+ If compiler is gcc and cross compiling use -nostdinc.
+
+2004-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/aiff.c src/wav.c src/float32.c src/double64.c
+ src/sndfile.c
+ Fix a bug with PEAK chunk handling for files with more than 16 channels.
+ Thanks to Remy Bruno for finding this.
+
+2004-03-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Fix a bug which was preventing WAV files being openned correctly if the
+ file had a very large header. Thanks to Eldad Zack for finding this.
+
+2004-03-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/file_io.c
+ Fix cross-compiling from Linux to Win32 using the MinGW tools.
+
+2004-03-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/create_symbols_file.sh
+ Christian Weisgerber pointed out that the shell script did not run on a
+ real Bourne shell although it did run under Bash in Bourne shell mode.
+
+ * src/create_symbols_file.py
+ Rewrite of above in Python. Also add support for writing Win32 .def files.
+ The Python script generates Symbols.linux, Symbols.darwin and
+ libsndfile.def (Win32 version). These files get shipped with the tarball
+ so there should not be necessary to run the Python script when building
+ the code from the tarball.
+
+ * configure.ac src/Makefile.am Win32/Makefile.am
+ Hook new Python script into the build system.
+
+2004-02-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/configure.ac
+ Add --enable-gcc-werror option and move GCC specific stuff down.
+
+2004-02-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * acinclude.m4 configure.ac
+ Fix clip mode detection (tested in one of HP's testdrive Itanium II boxes).
+
+ * src/file_io.c
+ Added check for sizeof (off_t) != sizeof (sf_count_t) to prevent recurrence
+ of missing large file support on Linux and Solaris.
+
+2004-02-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Fix a MacOSX specific bug which was caused by a space being inserted in
+ the middle of a file name.
+
+ * configure.ac src/Makefile.am examples/Makefile.am
+ Fix a couple of MacOSX build issues.
+
+2004-02-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Document SFC_SET_CLIPPING and SFC_GET_CLIPPING.
+
+2004-02-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/*.html
+ Applied patch from Frank Neumann (author of lakai) which fixes many minor
+ typos in documentation. Thanks Frank.
+
+2004-02-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * ChangeLog
+ Changed my email address throughout source and docs.
+
+2004-02-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Make sure config.h is included before stdio.h to make sure large file
+ support is enabled on Linux (and Solaris).
+
+ * tests/misc_test.c
+ Disable update_header test on Win32. This should work but doesn't and
+ I'm not sure why.
+
+ * Make.bat Win32/Makefile.msvc
+ Updates.
+
+2004-01-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Changed logindex, headindex and headend files of SF_PRIVATE from unsigned
+ int to int to prevent weird arithmetic bugs.
+
+ * src/common.c src/aiff.c src/wav.c src/w64.c
+ Fixed compiler warnings resulting from above change.
+
+2004-01-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Fixed a bug in header reader for some files with data after the sample data.
+
+2003-12-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/lossy_comp_test.c tests/Makefile.am
+ Add tests for AIFF/IMA files.
+
+2003-12-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/macbinary3.c src/macos.c
+ Two new files required for handling SD2 files.
+
+ * src/common.h
+ Add prototypes for functions in above two files.
+
+ * src/Makefile.am
+ Hook new files into build system.
+
+2003-12-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add checks for mmap() and getpagesize() which might be used at some time
+ for faster file reads.
+ Add detection of MacOSX.
+
+2003-12-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Minor mods to pkg-config section.
+
+2003-12-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/create_symbols_file.sh
+ Andre Pang (also known as Ozone) pointed out that on MacOSX, all non
+ static symbols are exported causing troubles when trying to link
+ libsndfile with another library which has any of the same symbols.
+ He fixed this by supplying the MacOSX linker with a file containing
+ all the public symbols so that only they would be exported and then
+ supplied a patch for libsndfile.
+ This wasn't quite ideal, because I would have to maintain two (3 if
+ you include Win32) separate files containing the exported symbols.
+ A better solution was to create this script which can generate a
+ Symbols file for Linux, MacoSX and any other OS that supports
+ minimising the number of exported symbols.
+
+ * configure.ac src/Makefile.am
+ Hook the new script into the build process.
+
+2003-12-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Added comments about Steve Dekorte's SoundConverter scam.
+
+2003-12-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Axel Röbel pointed out that on Mac OSX a pipe is not considered a fifo
+ (S_ISFIFO (st.st_mode) is false) but a socket (S_ISSOCK (st.st_mode) is
+ true). The test has therefore been changed to is S_ISREG and anything
+ which which does not return true for S_ISREG is considered a pipe.
+
+2003-11-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Fix update_header_test to pass SDS.
+
+ * src/sds.c
+ More minor fixes.
+
+ * tests/floating_point_test.c
+ Add test for SDS files.
+
+ * src/command.c
+ Add SDS to major_formats array.
+
+2003-11-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl tests/misc_test.c
+ Add tests for SDS files.
+
+ * src/sds.c
+ Fix a bug in header update code.
+
+2003-11-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sds.c
+ Get file write working.
+
+ * src/paf.c
+ Fix a potential bug in paf24_seek().
+
+2003-11-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Add Q/A about u-law encoded WAV files.
+
+ * Win32/*.h
+ Updated so it compiles on Win32.
+
+2003-11-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Add -alaw and -ulaw command line arguments.
+
+ * configure.ac
+ Add library versioning comments.
+ Add arguments to AC_INIT.
+
+2003-10-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Ross Bencina has contributed code to replace all of the (mostly broken)
+ Win32 POSIX emulation calls with calls the native Win32 file I/O API.
+ This code still needs testing but is likely to be a huge improvemnt
+ of support for Win32. Thanks Ross.
+
+2003-10-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/dwvw.c
+ Removed filedes field from the DWVW_PRIVATE struct.
+
+ * src/file_io.c
+ Change psf_fopen() so it returns psf->error instead of the file descriptor.
+ Add new functions psf_set_stdio() and psf_set_file().
+
+ * src/sndfile.c
+ Change these to work with changed psf_fopen() return value.
+ Remove all uses of psf->filedes from sndfile, making it easier to slot native
+ Win32 API file handling functions.
+
+ * src/test_file_io.c
+ Minor changes to make it compile with new file_io.c stuff.
+
+2003-10-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/gsm610.h
+ Rename a variable from true to true_flag. As Ross Bencina points out,
+ true is defined in the C99 header <stdbool.h>.
+
+ * src/file_io.c
+ If fstat() fails, return SF_TRUE instead of -1 (Ross Bencina).
+
+2003-10-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Increase the size of SF_BUFFER_LEN and SF_HEADER_LEN.
+
+ * src/sndfile.c
+ Fix sf_read/write_raw which were dividing by psf->bytwidth and
+ psf->blockwidth which can both be zero.
+
+ * examples/sndfile-info.c
+ Increase size of BUFFER_LEN.
+
+2003-09-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add checks for <sys/wait.h> and ssize_t.
+ Other Win32/MinGW checks.
+
+ * src/aiff.c src/au_g72x.c src/file_io.c src/gsm610.c src/interleave.c
+ src/paf.c src/sds.c src/svx.c src/voc.c src/w64.c src/wav.c src/xi.c
+ Fix compiler warnings.
+
+2003-09-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/scale_clip_test.tpl
+ Add definition of M_PI if needed.
+
+2003-09-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Detect if S_IRGRP is declared in <unistd.h>.
+
+ * src/file_io.c tests/*.tpl tests/*.c
+ More fixes for Win32/MSVC++ and MinGW. MinGW does have <unistd.h> but that
+ file doesn't declare S_IRGRP.
+
+2003-10-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/config.h.in
+ Add comment stating that the sf_count_t typedef is determined when
+ libsndfile is being compiled.
+
+ * tests/utils.tpl
+ Modified so that utils.c gets one copy of the GPL and not two.
+
+
+2003-09-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/unistd.h src/sf_unistd.h
+ Move first file to the second. This will help for Win32/MSVC++ and MinGW.
+
+ * Win32/Makefile.am src/Makefile.am
+ Changed in line with above.
+
+ * Win32/Makefile.msvc
+ Removed "/I Win32" which is no longer required.
+
+ * src/file_io.c src/test_file_io.c tests/*.tpl tests/*.c
+ If HAVE_UNISTD_H include <unistd.h> else include <sf_unistd.h>. This should
+ work for Win32, MinGW and other fakes Unix-like OSes.
+
+ * src/*.c
+ Removed #include <unistd.h> from files which didn't need it.
+
+2003-09-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * libsndfile.spec.in
+ Apply fix from Andrew Schultz.
+
+2003-09-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/vox_adpcm.c
+ Only set psf->sf.samplerate if the existing value is invalid.
+
+2003-09-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Started adding support for ALSA output.
+
+2003-09-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Removed <stdlib.h> from sndfile.h.
+
+ * src/*.c examples/*.c tests/*.c tests/*.tpl
+ Added <stdlib.h> where needed.
+
+2003-09-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Added ARRAY_LEN, SF_MAX and SF_MIN macros.
+
+2003-08-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Remove statements about alternative licensing arrangements.
+
+2003-08-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * MacOS MacOS9 Makefile.am configure.ac
+ Change directory name from MacOS to MacOS9
+
+ * MacOS9/MacOS9-readme.txt
+ Change name to make it really obvious, add text to top of file to make it
+ still more obvious again.
+
+2003-08-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_log_printf.c
+ Add tests for %u conversions.
+
+ * src/common.c
+ Fix psf_log_printf() %u conversions.
+
+2003-08-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fixed a bug where opening a file with a non-trival header in SFM_RDWR mode
+ would over-write part of the header. Thanks to Axel Röbel for pointing
+ this out. Axel also provided a patch to fix this but I came up with a
+ neater and more general solution.
+ Return error when openning an AIFF file with data after the SSND chunk
+ (Thanks Axel Röbel).
+
+ * tests/aiff_rw_test.c
+ Improvements to test program which will later allow it to be generalised to
+ test WAV, SVX and others as required.
+
+2003-08-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pipe_test.c
+ Add useek_pipe_rw_test() submitted by Russell Francis.
+
+ * src/sndfile.c
+ In sf_open_fd(), check if input file descriptor is a pipe.
+
+ * src/sndfile.[ch]
+ Fix typo in variable name do_not_close_descriptor.
+
+2003-08-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_log_printf.c
+ Improve the tests for %d and %s conversions.
+
+ * src/common.c
+ Fixed a few problems in psf_log_printf() found using new tests.
+
+2003-08-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add -Wwrite-strings warning to CFLAGS if the compiler is GCC. Thanks to
+ Peter Miller (Aegis author) for suggesting this and supplying a patch.
+
+ * src/*.c examples/*.c tests/*.c
+ Fix all compiler warnings arising from the above.
+
+2003-08-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/aiff_rw_test.c tests/Makefile.am
+ New test program to check for errors re-writing the headers of AIFC files
+ opened in mode SFM_RDWR.
+
+2003-07-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Applied a patch from Tero Pelander to allow this program to run on systems
+ using devfs which used /dev/sound/dsp instead of /dev/dsp.
+
+2003-07-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/new_file_type.HOWTO
+ Updated document. Still incomplete.
+
+2003-06-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fix VALIDATE_SNDFILE_AND_ASSIGN_PSF which was returning an error rather
+ than saving it and returning zero.
+
+2003-06-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Two fixes for Mac OS9.
+ Fix all casts from sf_count_t to ssize_t (not size_t).
+
+2003-06-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fix for reading files with RIFF length of 8 and data length of 0.
+
+2003-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c tests/*.c tests/*.tpl
+ Added comments to mark code for removal when make Lite version of
+ libsndfile.
+
+2003-06-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Add extra error checking for unrecognised arguments.
+
+2003-06-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ima_adpcm.c
+ Started adding code to write IMA ADPCM encoded AIFF files.
+
+ * src/test_log_printf.c src/Makefile.am
+ New file to test psf_log_printf() function and add hooks into build system.
+
+ * src/common.c
+ Move psf_log_printf() function to top of the file and only compile the rest
+ of the file if if PSF_LOG_PRINTF_ONLY is not defined.
+
+2003-06-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/config.h Win32/sndfile.h
+ Updated with new config variables.
+
+ * Win32/unistd.h src/file_io.c
+ Added implementation of S_ISFIFO macro which Win32 seems to lack and is
+ used in src/file_io.c.
+
+ * tests/utils.tpl
+ Added #include <unitstd.h> to pull in Win32/unistd.h so it compiles for
+ Win32.
+
+ * src/Makefile.msvc
+ Added src\test_file_io.exe build target and run this as the very first
+ test.
+
+ * tests/win32_test.c
+ Add support for testing Cygwin32.
+
+ * configure.ac
+ Detect POSIX fsync() and fdatasync() functions.
+
+ * src/file_io.c
+ If compiling for Cygwin, call fsync() before calling fstat() to retrieve
+ file length.
+
+ * tests/pcm_test.tpl
+ Add a test for lrintf() function. This was required to detect a really
+ broken lrint() and lrintf() on Cygwin.
+
+ * tests/misc_test.c
+ Don't run permission test when compiling under Cygwin.
+
+ * src/float_cast.h
+ Fix fallback macro for lrint() and lrintf() to cast to long instead of int
+ to match official function prototypes.
+
+2003-06-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-convert.c
+ Modifications to improve accuracy of conversions; use double data for
+ floating point and int for everything else.
+
+ * src/ima_apdcm.c
+ Completed work on decoding IMA ADPCM encoded AIFF files. Still need to
+ get encoding working.
+
+2003-05-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/ima_adpcm.c
+ Start working on getting IMA ADPCM encoded AIFF files working.
+
+2003-05-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fixed the touch command for when the autogen program is not found (Matt
+ Flax).
+
+ * src/ulaw.c src/alaw.c
+ Made these pipe-able.
+
+2003-05-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c src/ircam.c
+ Fixed writing to pipe.
+
+ * src/wav.c src/aiff.c src/nist.c src/mat*.c src/svx.c src/w64.c
+ Return SFE_NO_PIPE_WRITE if an attempt is made to write to a pipe.
+
+2003-05-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-info.c
+ Modified to detect unknown file lengths.
+
+ * src/mat4.c
+ Fix reading from a pipe.
+
+2003-05-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pipe_test.c
+ Add more file types to tests.
+
+ * src/mat4.c
+ Removed explicit setting of psf->sf.seekable to SF_TRUE.
+
+ * tests/utils.tpl
+ Add macro for generating and check data in the stdio and pipe tests.
+
+ * tests/stdout_test.c tests/stdin_test.c
+ Use the above macro to generate known data on output and check data on
+ input.
+
+ * src/voc.c src/htk.c common.h sndfile.c
+ Disallow reading/writing VOC and HTK files from/to pipes be returning new
+ error values.
+
+ * src/w64.c
+ Fixes to allow reading from a pipe.
+
+2003-05-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac src/sndfile.h.in
+ When the configure script determines the sizeof (sf_count_t), also set the
+ value of SF_COUNT_MAX in sndfile.h.
+
+ * configure.ac
+ Remove -pedantic flag from default GCC compiler flags.
+
+ * tests/pipe_test.c
+ Add a pipe_read_test() before doing pipe_write_test().
+
+ * tests/scale_clip_test.c
+ Add test to make sure non-normalized values also clip in the right way.
+
+2003-05-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Add test to detect processor clipping capabilities.
+
+ * tests/stdin_test.c tests/stdout_test.c
+ Fix a pair of compiler warnings.
+
+ * src/common.h
+ Add new pipeoffset field to SF_PRIVATE. This will contain the current file
+ offset when operating on a pipe.
+
+ * src/common.c
+ Removed direct calls to psf_fread()/psf_fseek()/psf_fgets() etc from
+ psf_binheader_readf and redirect them to new buffered versions
+ header_read(), header_seek() and header_gets().
+ Add "G" format specifier to emulate fgets() functionality with buffering.
+ This will allow reading some file types from pipes.
+
+ * src/file_io.c
+ When the file descriptor is a pipe, manintain psf->pipeoffset.
+
+ * src/pvf.c
+ Change use of psf_fgets() to psf_binheader_readf() as required but changes to header re
+
+ * src/au.c
+ Fix reading from a pipe.
+
+2003-05-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c
+ Add clipping versions of the f2XXX_array() functions to allow option of
+ clipping data that would otherwise overflow.
+
+ * tests/scale_clip_test.tpl tests/scale_clip_test.def
+ New files test that clipping option does actually work.
+
+2003-05-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Fixed a typo ("OS(" instead of "OS9").
+
+2003-05-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/open_fail_test.c
+ Include <string.h> to prevent warning message of missing declaration of
+ memset().
+
+2003-05-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Add new "add_clipping" field to SF_PRIVATE.
+
+ * src/sndfile.h.in src/sndfile.c
+ Add command SFC_SET_CLIPPING which sets/resets add_clipping field.
+
+2003-05-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Add docs for sf_set_string() and sf_get_string().
+
+ * src/common.h src/sndfile.c
+ Add new SFE_STR_BAD_STRING error.
+
+ * tests/stdin_test.c tests/stdout_test.c
+ Removed all non-error print statements.
+
+ * tests/stdio_test.c tests/pipe_test.c tests/Makefile.am
+ Add print statements removed from two files above.
+
+2003-05-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * libsndfile.spec.in
+ Fixed a coulpe of minor errors discovered by someone calling themselves
+ Agent Smith.
+
+ * src/common.c src/common.h src/file_io.h
+ Added is_pipe field to SF_PRIVATE and declaration of psf_is_pipe()
+ function. (Axel Röbel)
+
+ * src/sndfile.c
+ Fixed determination of whether the file is a pipe. (Axel Röbel)
+
+ * src/paf.c
+ Force paf24 to start with undefined mode. (Axel Röbel)
+
+ * tests/pipe_test.c
+ Mods to make this test work and actually do the test on RAW files. (Axel
+ Röbel).
+
+2003-05-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed a potential bug where psf->sf.seekable was being set to FALSE when
+ operating on stdin or stdout but then the default initialiser was reseting
+ it to TRUE. Thanks to Axel Röbel.
+
+ * src/aiff.c
+ Fixed a bug in the header parser where it was not handling an odd length
+ COMM chunk correctly. Thanks to Axel Röbel.
+
+ * src/test_file_io.c
+ Add more tests.
+
+ * tests/win32_test.c
+ New file for showing the bugs in the Win32 implementation of the POSIX API.
+ It also runs on Linux for sanity checking.
+
+ * tests/Makefile.am Win32/Makefile.msvc
+ Hook the new test program into the build system.
+
+2003-05-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/test_file_io.c
+ New test program to test operation of functions defined in file_io.c. This
+ should make supporting win32 significantly easier.
+
+ * src/Makefile.am
+ Hook new test program into the build system.
+
+ * src/file_io.c
+ Add compile/run time check that sizeof statbuf.st_size and sf_count_t are
+ the same.
+
+ * src/common.h src/sndfile.c
+ Added new error code and error message for new check.
+
+ * tests/benchmark.tpl
+ Fix to use frames instead of samples in SF_INFO.
+
+2003-05-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ More stuffing about working around PLAIN OLD-FASHIONED **BUGS** in Win32.
+
+ * examples/sndfile-info.c
+ Applied patch from Conrad Parker to add "--help" and "-h" options as
+ well as an improved usage message.
+
+2003-05-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au.c
+ Added embedded file support.
+
+ * tests/multi_file_test.c
+ Added tests for embedded AU files.
+ Added verbose testing mode.
+
+ * src/common.h src/sndfile.c
+ Added an embedded AU specific error code and message.
+
+ * src/wav.c
+ Added patch from Conrad Parker which filled in a little more information
+ about ACIDized WAV files.
+
+2003-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Fixed Win32 version of psf_fseek() which was calling psf_get_filelen()
+ which was in turn calling psf_fseek() which in the end blew the stack.
+ Now of course this would have been easy to find on Linux, but this blow
+ up was happening in kernel32.dll and the fscking MSVC++ debugger couldn't
+ figure out what call caused this (it couldn't even tell me the stack had
+ overflowed) and was absolutley useless for this debugging exercise.
+ On top of that, the reason I got into this mess was that windoze doesn't
+ have a working fstat() function which can return file lengths > 2 Gig. It
+ HAS a fscking _fstati64() but the file length value is only updated AFTER
+ the bloody file is closed. That makes it completely useless.
+ How the hell do people stand working on this crap excuse of an OS?
+
+2003-04-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/unistd.h src/file_io.c
+ Moved definitions of S_IGRP etc from file_io.c to unistd.h so that these
+ can be used in the test programs.
+
+ * Win32/libsndfile.def
+ Added sf_open_fd.
+
+ * Win32/sndfile.h
+ Updated to match src/sndfile.h.in.
+
+ * Win32/Makefile.msvc
+ Added dither.c and htk.c to libsndfile.dll target.
+
+2003-04-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ First attempt at getting the Win32 versions of the these functions working.
+ They still need to be tested.
+
+2003-04-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/strings.c
+ Found and fixed a bug which was causing psf_store_string() to fail on
+ Motorola 68k processors. Many thanks to Joshua Haberman (Debian maintainer
+ of libsndfile) for compiling and running debug code to help me debug the
+ problem.
+
+2003-04-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/file_io.c src/wav.c src/aiff.c
+ Much hacking to get reading and writing of embedded files working (ie sound
+ files at a non-zero files offset).
+
+ * doc/embedded_files.html
+ First pass atempt at documenting reading/writing embedded files.
+
+2003-04-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Updated answer to "Why doesn't libsndfile do interleaving/de-interleaving?"
+
+2003-04-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/aiff.c
+ Fix retrieving and storing of string data from files. Need to be careful
+ about using psf->buffer for strings.
+
+2003-04-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Fix psf_fseek() for seeks withing embedded files.
+
+2003-04-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Changed the definition of SNDFILE slightly to produce warnings when it isn't
+ used correctly. This should have zero affect in code which uses the SNDFILE
+ type correctly.
+
+ * src/sndfile.c
+ Fixed a few compiler warnings cause by the changes to the SNDFILE type.
+
+2003-04-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Added question and answer to the question "How about adding the ability
+ to write/read sound files to/from memory buffers?".
+
+2003-04-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl
+ Removed un-needed enums declaring TRUE and FALSE and replaced usage of
+ these with SF_TRUE and SF_FALSE.
+
+ * tests/multi_file_test.c
+ New test program to test sf_open_fd() on files containing data other than
+ a single sound file.
+
+2003-04-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ When creating files, set the readable by others flag. This still allows
+ further restrictions to be enforced by use of the user's umask. Fix
+ suggested by Eric Lyon.
+
+2003-04-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c
+ Changed sf_open_fd(). Dropped offset parameter and added a close_desc
+ parameter. If close desc is TRUE, the file descritpor passed into the
+ library will be closed when sf_close() is called.
+
+ * tests/utils.tpl
+ Modified call to sf_open_fd() to set close_desc parameter to SF_TRUE.
+
+2003-04-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl
+ Add a string (using sf_set_string() function) before and after data section
+ of all files. This will make sure that if string data can be added, it
+ doesn't overwrite real audio data.
+
+2003-04-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Started work on supporting a non-zero offset parameter for sf_open_fd ().
+
+ * src/<file header parsers>.c
+ Removed many uses of psf_fseek (SEEK_END) which to allow for future use of
+ sf_open_fd() with non-zero offset.
+ Associated refactoring.
+
+ * src/aiff.c
+ Implemented functionality required to get sf_get_string() and
+ sf_set_string() working for AIFF files.
+
+2003-04-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl
+ Modified test_open_file_or_die() to alternately use sf_open() and
+ sf_open_fd().
+
+ * src/svx.c
+ Fixed a bug which occurred when openning an existing file for read/write
+ using sf_open_fd(). In this case, the existing NAME chunk needs to be
+ read into psf->filename.
+ Fixed printing of sf_count_t types to logbuffer.
+
+2003-03-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Added prototype for new function sf_open_fd().
+
+ * src/sndfile.c
+ Moved most of the code in sf_open() to a new function psf_open_file().
+ Created new function sf_open_fd() which also uses psf_open_file() but
+ does not currently support the offset parameter.
+
+ * doc/api.html
+ Document sf_open_fd().
+
+2003-03-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed a memory leak reported by Evgeny Karpov. Memory leak only occurred
+ when an attempt was made to read and the open() call fails.
+
+2003-03-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/open_fail_test.c
+ New test program to check for memory leaks when sf_open fails on a valid
+ file. Currently this must be run manually under valgrid.
+
+ * tests/Makefile.am
+ Hook new test program into build.
+
+2003-03-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Octave/sndfile_save.m Octave/sndfile_play.m
+ Added a -mat-binary option to the octave save command to force the output
+ to binary mode even if the user has set ascii data as the default. Found
+ by Christopher Moore.
+
+2003-02-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/dither.html
+ New file which will document the interface which allows the addition of
+ audio dither when sample word sizes are being reduced.
+
+ * src/dither.c
+ More work.
+
+2003-02-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ In update_header_test(), make HTK files a special case.
+
+ * doc/index.html
+ Added HTK to the feature matrix.
+
+2003-02-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/htk.c
+ New file for reading/writing HMM Tool Kit files.
+
+ * src/sndfile.h.in src/sndfile.c src/command.c src/Makefile.am
+ Hook in htk.c
+
+ * tests/write_read_test.tpl tests/misc_test.c tests/Makefile.am
+ Add tests for HTK files.
+
+2003-02-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed a bug where the LIST chunk length was being written incorrectly.
+
+ * tests/string_test.c
+ Added call to check_log_buffer().
+ Minor cleanups.
+
+2003-02-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_w64.h
+ Applied patch from Antoine Mathys to add extra WAV format definitions and
+ a G72x_ADPCM_WAV_FMT struct definition.
+
+ * src/wav_w64.c
+ Applied patch from Antoine Mathys which converts wav_w64_format_str() from
+ one huge inefficient switch statement to a binary search.
+
+ * tests/string_test.c
+ Dump log buffer if tests fail.
+
+2003-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/string_test.c
+ David Viens supplied some modifications to this file which showed up a bug
+ when using sf_set_string() and the sf_writef_float() functions.
+
+ * src/sndfile.c
+ Fixed the above bug.
+
+2003-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Added Q and A on how to detect libsndfile in configure.in (at the suggestion
+ of Davy Durham).
+
+2003-02-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Add enums and typedefs for dither.
+ Deprecate SFC_SET_ADD_DITHER_ON_WRITE and SFC_SET_ADD_DITHER_ON_READ, to be
+ replaced with SFC_SET_DITHER_ON_WRITE and SFC_SET_DITHER_ON_READ which will
+ allow different dither algorithms to be enabled.
+ Added SFC_GET_DITHER_INFO_COUNT and SFC_GET_DITHER_INFO.
+
+ * src/sndfile.h.in src/Version_script.in Win32/libsndfile.def.
+ Added public sf_dither_*() functions.
+
+ * src/sndfile.c
+ Implement commands above.
+
+ * src/dither.c
+ More work. Framework and external hooks into dither algorithms complete.
+
+2003-02-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/version-1.html libsndfile_version_convert.py
+ Remove redundant files.
+
+ * doc/index.html doc/api.html
+ Remove links to version-1.html.
+
+ * src/dither.c
+ New file to allow the addition of audio dither on input and output.
+
+ * src/common.h
+ Add prototype for dither_init() function.
+
+ * Makefile.am doc/Makefile.am
+ Changes for added and removed files.
+
+2003-02-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/Makefile.msvc
+ Changes to force example binaries to be placed in the top level directory
+ instead of the examples/ directory.
+ Add src/strings.c and src/xi.c to the build.
+ Add string_test to build and to tests on WAV files.
+
+ * doc/index.html
+ Added XI to support matrix.
+
+2003-01-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Added prototypes for sf_get_string() and sf_set_string() and SF_STR_*
+ enum values.
+
+ * src/sndfile.c
+ Added public interface to sf_get_string() and sf_set_string().
+
+ * src/wav.c
+ Added code for setting and getting strings in WAV files.
+
+ * tests/string_test.c
+ New test program for sf_get_string() and sf_set_string() functionality.
+
+ * tests/Makefile.am
+ Hook new test program into build and test framework.
+
+2003-01-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Added fields to SF_PRIVATE for string data needed to implement
+ sf_get_string() and sf_set_string().
+
+ * src/strings.c
+ New file for storing and retrieving strings to/from files.
+
+ * src/Makefile.am
+ Added strings.c to build.
+
+2003-01-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/xi.c
+ Read seems to be working so looking at write.
+
+ * src/sndfile.h.in
+ Added SF_FORMAT_XI, SF_FORMAT_DPCM_8 and SF_FORMAT_DPCM_16 enum values.
+
+ * tests/floating_point_test.c tests/lossy_comp_test.c tests/Makefile.am
+ Added test for 8 and 16 bit XI format files.
+
+2003-01-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Added a non-lawyer readable summary of the licensing provisions as
+ suggested by Steve Dekorte.
+
+2003-01-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed a compiler warning found by Alexander Lerch.
+
+2003-01-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Fixed the multiple linking of libm.
+
+2003-01-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/Makefile.mcvs
+ Added comments on the correct way to set up the MSVCDir environment
+ variable.
+
+ * doc/win32.html
+ Add on how to set up the MSVCDir environment variable.
+
+2003-01-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c examples/sndfile-info.c
+ When run on Win32 without any command line parameters print a message and
+ then sleep for 5 seconds. This means the when somebody double clicks on
+ these programs in explorer the user will actually see the message.
+
+2003-01-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Bypass permission test if running as root because root is allowed to open
+ a readonly file for write.
+
+2003-01-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/Makefile.msvc
+ Added pvf.c and xi.c source files to project.
+
+ * src/sndfile.h
+ Updated for PVF files.
+
+2003-01-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Modified validate_sfinfo() to force samplerate, channels and sections
+ to be >= 1.
+ In format_from_extension() replaced calls to does_extension_match()
+ with strcmp().
+
+ * src/xi.c
+ More work.
+
+2003-01-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/Makefile.am
+ Added octave.html which had been left out. Found by Jan Weil.
+
+2003-01-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pvf.c src/common.h src/sndfile.c
+ Fixed error handling for PVF files.
+
+ * src/xi.c
+ New file for handling Fasttracker 2 Extended Instrument files. Not working
+ yet and included when configured with --enable-experimental.
+
+ * src/sndfile.c src/common.h
+ Hooked in new file xi.c.
+
+2002-12-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/rx2.c
+ Added a patch from Marek Peteraj which sheds a little more light on the
+ slices within an RX2 file. Still need to find out data encoding.
+
+2002-12-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Started work on decoding 'acid' and 'strc' chunks.
+
+2002-12-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/peak_check_test.c
+ Minor cleanup.
+
+2002-12-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl
+ Added check to make sure no error was generated when an attempt was made to
+ read past the end of the file.
+
+2002-12-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/lists.html
+ Added "mailto" links for all three lists.
+
+ * src/pvf.c
+ New file for Portable Voice Format files.
+
+ * src/sndfile.h.in src/sndfile.c src/common.h src/command.c src/Makefile.am
+ Added hooks for SF_FORMAT_PVF format files.
+
+ * tests/write_read_test.tpl tests/std*.c
+ Add tests for SF_FORMAT_PVF.
+
+ * doc/index.html
+ Add PVF to the compatibility matrix.
+
+ * src/pcm.c src/alaw.c src/ulaw.c src/float32.c src/double64.c
+ Previously, attempts to read beyond the end of a file would set psf->error
+ to SFE_SHORT_ERROR. This behaviour diverged from the behaviour of the POSIX
+ read() call but has now been fixed.
+ Attempts to read beyond the end of the file will return a short read count
+ but will not longer set any error.
+
+2002-12-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Add more sanity checking when opening a RAW file for read. When format is
+ not RAW, zero out all members of the SF_INFO struct.
+
+ * tests/raw_test.c
+ Add bad_raw_test() to check for above problem.
+
+ * tests/stdin_test.c examples/sndfile-info.c
+ Set the format field of the SF_INFO struct to zero before calling
+ sf_open().
+
+ * doc/api.html
+ Add information about the need to set the format field of the SF_INFO struct
+ to zero when opening non-RAW files for read.
+
+ * configure.ac
+ Removed use of conversion script on Solaris. Not all Solaris versions
+ support it.
+
+ * doc/lists.html
+ New file containg details of the mailing lists.
+
+ * doc/index.html
+ Add a link to the above new file.
+
+2002-12-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/dft_cmp.c
+ Fixed a SIGFPE on Alpha caused by a log10 (0.0). Thanks to Joshua Haberman
+ for providing the gdb traceback.
+
+2002-11-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Added more capabilities to 'smpl' chunk parser.
+
+ * src/sndfile.c
+ Fixed some (not all) possible problems found with Flawfinder.
+
+2002-11-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed a bug in sf_seek(). This bug could only occur when an attempt was
+ made to read beyond the end and then sf_seek() was called with a whence
+ parameter of SEEK_CUR.
+
+ * src/file_io.c
+ Win32's _fstati64() does not work, it returns BS. Re-implemented
+ psf_get_filelen() in terms of psf_fseek().
+
+ * tests/write_read_test.tpl
+ Add a test to detect above bug.
+
+ * src/float_cast.h
+ Modification to prevent compiler warnings on Mac OS X.
+
+ * src/file_io.c
+ Fixes for windows (what a f**ked OS).
+
+2002-11-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.ac
+ Disable use of native lrint()/lrintf() on Mac OSX. These functions exist on
+ Mac OSX 10.2 but not on 10.1. Forcing the use of the versions in
+ src/float_cast.h means that a library compiled on 10.2 will still work on
+ 10.1.
+
+2002-11-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in configure.ac
+ Renamed configure.in to configure.ac as expected by later versions of
+ autoconf.
+ Slight hacking of configure.ac to work with version 2.54 of autoconf.
+ Changed to using -dumpversion instead of --version for determining GCC
+ version numer as suggested by Anand Kumria.
+
+ * src/G72x/Makefile.am
+ Slight hacking required for operation with automake 1.6.3.
+
+2002-11-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ In psf_binheader_readf() changed type parameter type "b" type from size_t
+ to int to prevent errors on IA64 CPU where sizeof (size_t) != sizeof (int).
+ Thanks to Enrique Robledo Arnuncio for debugging this.
+
+2002-11-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * test/command_test.tpl
+ Changed test value so test would pass on Solaris.
+
+ * src/Version_script.in
+ Modified version numbering so that later versions of 1.0.X can replace
+ earlier versions without recompilation.
+
+ * src/vox_adpcm.c
+ Fixed bug causing short reads.
+
+2002-11-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * test/floating_point_test.c
+ Code cleanup using functions from util.c.
+ Add test for IEEE replacement floats and doubles.
+
+2002-11-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed a possible divide by zero error when read the 'smpl' chunk. Thanks to
+ Serg Repalov for the example file.
+
+ * tests/pcm_test.tpl
+ Used sf_command (SFC_TEST_IEEE_FLOAT_REPLACE) to test IEEE replacement code.
+ Clean up pcm_double_test().
+
+ * src/float32.c src/double64.c
+ Force use of IEEE replacement code using psf->ieee_replace is TRUE,
+ Print message to log_buffer as well.
+ Rename all broken_read_* and broken_write* functions to replace_read_* and
+ replace_write_*.
+
+ * tests/util.tpl
+ Added string_in_log_buffer().
+
+ * tests/pcm_test.tpl
+ Use string_in_log_buffer() to ensure that IEEE replacement code has been
+ used.
+
+ * configure.in
+ Removed --enable-force-broken-float option. IEEE replacement code is now
+ always tested.
+
+2002-10-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/double64.c
+ Implement code for read/writing IEEE doubles on platforms where the native
+ double format is not IEEE.
+
+ * src/float32.c src/common.h
+ Remove float32_read() and float32_write(). Replace with float32_le_read(),
+ float32_be_read(), float32_le_write() and float32_be_write() to match stuff
+ in src/double64.c.
+
+ * src/common.c
+ Fix all usage of float32_write().
+
+ * src/sndfile.h.in
+ Added SFC_TEST_IEEE_FLOAT_REPLACE command (testing only).
+
+ * src/common.h
+ Added SF_PRIVATE field ieee_replace.
+
+ * src/sndfile.c
+ In sf_command() set/reset psf->ieee_replace.
+
+2002-10-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pcm_test.tpl
+ Fixed a problem when testing with --enable-force-broken-float. The test was
+ generating a value of negative zero and the broken float code is not able
+ to write negative zero. Removing the negative zero fixed the test.
+
+2002-10-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Added fix for Cygwin (suggested by Maros Michalik).
+
+2002-10-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Improved error detection and handling.
+
+ * src/file_io.c src/common.h
+ Removed functions psf_ferror() and psf_clearerr() which were redundant
+ after above improvements.
+
+ * src/aiff.c src/svx.c src/w64.c src/wav.c
+ Removed all use of psf_ferror() and psf_clearerr().
+
+ * src/sndfile.c
+ Removed #include of <stdio.h>, <unistd.h>, <fcntl.h> and <math.h> which
+ are no longer needed.
+
+ * tests/misc_test.c
+ Added test to make sure the correct error message is returned with an
+ existing read-only file is openned for write.
+
+2002-10-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html doc/api.html
+ Updated for OKI Dialogic ADPCM files.
+
+ * src/command.c
+ Added VOX ADPCM to sub_fomats.
+
+2002-10-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/vox_adpcm.c src/Makefile.am
+ New file for handling OKI Dialogic ADPCM files.
+
+ * src/sndfile.h
+ Add new subtype SF_FORMAT_VOX_ADPCM.
+
+ * src/sndfile.c
+ Renamed function is_au_snd_file () to format_from_extenstion () and expanded
+ its functionality to detect headerless VOX files.
+
+ * src/raw.c
+ Added hooks for SF_FORMAT_VOX_ADPCM.
+
+ * examples/sndfile-info.c
+ Print out file duration (suggested by Conrad Parker).
+
+ * libsndfile.spec.in
+ Force installation of sndfile.pc file (found by John Thompson).
+
+ * tests/Makefile.am tests/lossy_comp_test.c tests/floating_point_test.c
+ Add tests for SF_FORMAT_VOX_ADPCM.
+
+2002-10-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Add test which attempts to write to /dev/full (on Linux anyway) to check
+ for correct handling of writing to a full filesystem.
+
+ * src/sndfile.c
+ Return correct error message if the header cannot be written because the
+ filesystem is full.
+
+ * tests/util.tpl
+ Corrected printing of file mode in error reporting.
+
+ * src/mat5.c
+ Fixed a bug where a MAT5 file written by libsndfile could not be opened by
+ Octave 2.1.36.
+
+2002-10-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/file_io.c
+ All low level file I/O have been modified to be better able to report
+ system errors resulting from calling system level open/read/write etc.
+
+ * src/*.c
+ Updated for compatibility with above changes.
+
+ * examples/cooledit-fixer.c
+ New example program which fixes badly broken file created by Syntrillium's
+ Cooledit which are marked as containing PCM samples but actually contain
+ floating point data.
+
+ * examples/Makefile.am
+ Hooked cooledit-fixer into the build system.
+
+2002-10-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Document SFC_GET_FORMAT_INFO.
+
+2002-10-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/wav32_aiff24.c examples/sndfile2oct.c examples/sfhexdump.c
+ examples/sfdump.c
+ Removed these files because they weren't interesting.
+
+ * examples/sfconvert.c examples/sndfile-convert.c
+ Renamed the first to the latter.
+
+ * examples/Makefile.am
+ Added sndfile-convert to the bin_PROGRAMS, so it is installed when the lib
+ is installed.
+ Removed old programs wav32_aiff24 and sndfile2oct.
+
+ * man/sndfile-convert.1
+ New man page.
+
+ * examples/sndfile-convert.c
+ Added some gloss now that sndfile-convert.c is an installed program.
+
+ * src/sndfile.h.in src/sndfile.c src/common.h src/command.h
+ Added command SFC_GET_FORMAT_INFO.
+
+ * tests/command_test.c
+ Added tests form SFC_GET_FORMAT_INFO.
+
+2002-10-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ In sf_format_check() return error if samplerate < 0.
+
+2002-10-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fixed bug in handling of COMM chunks with a 4 byte encoding byte but no
+ encoding string.
+
+2002-10-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed repeated word in an error message.
+
+2002-10-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Improved advertising in Features section.
+
+2002-10-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Added decoding of 'labl' chunks within 'LIST' chunks.
+
+ * src/common.h
+ Added (experimental only) SF_FORMAT_OGG and SF_FORMAT_VORBIS and definition
+ of ogg_open(). This is nowhere near working yet.
+
+ * src/sndfile.c
+ Added detection of 'OggS' file marker and added call to ogg_open() to
+ switch statement.
+
+ * src/ogg.c
+ New file. Very early start of Ogg Vorbis support.
+
+ * src/wav.c
+ Added handling of brain-damaged and broken Cooledit "32 bit 24.0 float
+ type 1" files. These files are marked as being 24 bit WAVE_FORMAT_PCM with
+ a block alignment of 4 times the numbers of channels but are in fact 32 bit
+ floating point.
+
+2002-10-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Modified option --enable-experimental to set ENABLE_EXPERIMENTAL_CODE in
+ config.h to either 0 or 1.
+
+ * src/sndfile.c
+ Modify sf_command (SFC_GET_LIB_VERSION) to append "-exp" to the version
+ string if experimental code has been enabled.
+
+2002-10-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/Makefile.am
+ Added -lm to libsndfile_la_LIBADD. This means that -lm is not longer needed
+ in the link line when linking something to libsndfile.
+
+ * tests/Makefile.am examples/Makefile.am
+ Removed -lm from all link lines.
+
+ * sndfile.pc.in
+ Removed -lm from Libs line.
+
+2002-09-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Removed all perror() calls.
+
+ * src/nist.c
+ Removed calls to exit() function.
+ Added check to detect NIST files dammaged from Unix CR -> Win32 CRLF
+ conversion process.
+
+2002-09-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c
+ New function sf_strerror() which will eventually replace functions
+ sf_perror() and sf_error_str().
+ Function sf_error_number() has also been changed, but this was documented
+ as being for testing only.
+
+ * doc/api.html
+ Documented above changes.
+
+ * tests/*.c examples/*.c
+ Changed to new error functions.
+
+2002-09-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Detect GCC version, and print a warning message about writeable strings
+ it GCC major version number is less than 3.
+
+2002-09-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in doc/api.html
+ Documentation fixes.
+
+2002-09-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/Version_script.in src/Makefile.am configure.in
+ Use the version script to prevent the exporting of all non public symbols.
+ This currently only works with Linux. Will test on Solaris as well.
+
+ * src/float_cast.h
+ Added #ifndef to prevent the #warning directives killing the SGI MIPSpro
+ compiler.
+
+ * src/au_g72x.c src/double64.c src/float32.c src/gsm610.c src/ima_adpcm.c
+ src/ms_adpcm.c
+ Fix benign compiler warnings arising from previously added compiler
+ flags.
+
+2002-09-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed a bug in sf_error_str() where errnum was used as the index instead
+ of k. Found by Tim Hockin.
+
+ * examples/sndfile-play.c
+ Fixed a compiler warning resulting from a variable shadowing a previously
+ defined local.
+
+2002-09-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in src/sndfile.c
+ Added command SFC_SET_RAW_START_OFFSET.
+
+ * doc/command.html
+ Document SFC_SET_RAW_START_OFFSET.
+
+ * tests/raw_test.c tests/Makefile.am
+ Add new file for testing SF_FORMAT_RAW specific functionality.
+
+ * tests/dwvw_test.c
+ Updates.
+
+2002-09-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Modified reading of 'smpl' chunk to take account of the sampler data field.
+
+ * tests/utils.tpl tests/utils.h
+ Added function print_test_name().
+
+ * tests/misc_test.c tests/write_read_test.tpl tests/lossy_comp_test.c
+ tests/pcm_test.tpl tests/command_test.tpl tests/floating_point_test.c
+ Convert to use function print_test_name().
+
+2002-09-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/octave.html
+ Added a link to some other Octave scripts for reading and writing sound
+ files.
+
+ * src/paf.c
+ Change type of dummy data field to int. This should fix a benign compiler
+ warning on some CPUs.
+ Removed superfluous casts resulting from the above change.
+
+ * src/rx2.c
+ More hacking.
+
+2002-09-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/mat5.c src/common.c
+ Changed usage of snprintf() to LSF_SNPRINTF().
+
+ * Win32/Makefile.msvc
+ Updated to include new files and add new tests.
+
+ * Win32/config.h Win32/sndfile.h
+ Updated.
+
+ * doc/api.html
+ Added note about the possibility of "missing" features actually being
+ implemented as an sf_command().
+
+2002-09-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/misc_test.c
+ Added previously missing update_header_test and zero_data_tests for PAF,
+ MAT4 and MAT5 formats.
+
+ * src/paf.c src/mat4.c src/mat5.c
+ Fixed bugs uncovered by new tests above.
+
+ * src/mat5.c
+ Generalised parsing of name fields of MAT5 files.
+
+ * src/mat5.c src/sndfile.c
+ Added support for unsigned 8 bit PCM MAT5 files.
+
+ * tests/write_read_test.tpl
+ Added test for unsigned 8 bit PCM MAT5 files.
+
+ * doc/index.html
+ Added unsigned 8 bit PCM MAT5 to capabilities matrix.
+
+2002-09-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * test/update_header_test.c tests/misc_test.c
+ Renamed update_header_test.c to misc_test.c.
+ Added zero_data_test() to check for case where file is opened for write and
+ closed immediately. The resulting file can be left in a state where
+ libsndfile cannot open it. Problem reported by Werner Schweer, the author
+ of Muse.
+
+ * src/aiff.c
+ Removed superfluous cast.
+
+ * src/wav.c src/svx.c
+ Fixed case of file generated with no data.
+ Removed superfluous cast.
+
+ * src/sndfile.c
+ Fixed error on IA64 platform caused by incorrect termination of
+ SndfileErrors struct array. This problem was found in the Debian buildd
+ logs (http://buildd.debian.org/).
+
+ * configure.in
+ Added Octave directory.
+
+ * Octave/Makefile.ma
+ New Makfile.am for Octave directory.
+
+ * Octave/sndfile_load.m Octave/sndfile_save.m Octave/sndfile_play.m
+ New files for working with Octave.
+
+ * doc/octave.html
+ Document explaining the use of the above three Octave scripts.
+
+2002-09-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed bug in RDWR mode.
+
+2002-09-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Fixed psf_get_date_str() for systems which don't have gmtime_r() or
+ gmtime().
+
+ * src/file_io.c
+ Added #include <io.h> for Win32. Reported by Koen Tanghe.
+
+2002-09-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Added 'S' format specifier for psf_binheader_writef() which writes a C
+ string, including single null terminator to the header.
+ Added 'j' format specifier to allow jumping forwards or backwards in the
+ header.
+ Added function psf_get_date_str().
+
+ * src/mat5.c
+ Complete read and write support.
+
+ * doc/index.html
+ Added entries for MAT4 and MAT5 in capabilities matrix.
+
+2002-09-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/mat4.c
+ Completed read and write support.
+
+ * src/common.h src/sndfile.c
+ Added MAT4 and MAT5 specific error messages.
+
+ * tests/write_read_test.tpl tests/Makefile.am
+ Added tests for MAT4 and MAT5 files.
+
+ * tests/stdio_test.c tests/stdout_test.c tests/stdin_test.c
+ Added tests for MAT4 and MAT5 files.
+
+2002-09-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/command.c
+ Added elements for SF_FORMAT_MAT4 and SF_FORMAT_MAT5 to major_formats
+ array.
+
+ * examples/sfconvert.c
+ Added mat4 and mat5 output targets.
+
+2002-09-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Added check to prevent errors openning read only formats for read/write.
+
+ * src/interleave.c
+ New file for interleaving non-interleaved data. Non-interleaved data is
+ only supported on read.
+
+ * src/Makefile.am
+ Added src/interleave.c to build.
+
+2002-09-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/double64.c src/common.h
+ Added double64_be_read(), double64_le_read(), double64_be_write() and
+ double64_le_write() which replace double64_read() and double64_write().
+
+ * src/common.c
+ Cleanup of psf_binheader_readf() and add ability to read big and little
+ endian doubles (required by mat4.c and mat5.c).
+ Add ability for psf_binheader_writef() to write doubles to sound file
+ headers.
+
+2002-09-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/mat5.c
+ New file for reading Matlab (tm) version 5 data files. This is also the
+ native binary file format for version 2.1.X of GNU Octave which will be
+ used for testing.
+ Not complete yet.
+
+ * src/mat4.c
+ New file for reading Matlab (tm) version 4.2 data files. This is also the
+ native binary file format for version 2.0.X of GNU Octave which will be
+ used for testing.
+ Not complete yet.
+
+ * src/sndfile.h.in src/sndfile.c src/common.h src/command.c src/Makefile.am
+ Mods to add Matlab files.
+
+ * src/common.[ch]
+ Added readf_endian field to SF_PRIVATE struct allowing endianness to
+ remembered across calls to sf_binheader_readf().
+ Fixed bug in width_specifier behaviour for printing hex values.
+
+2002-08-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Check return value of close() call in psf_fclose().
+
+2002-08-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ms_adpcm.c
+ Commented out some code where 0x10000 was being subtracted from a short
+ and the result assigned to a short again. Andrew Zaja found this.
+
+2002-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Fixed typo found by Tommi Ilmonen.
+
+ * src/ima_adpcm.c
+ Changed type of diff from short to int to prevent errors which can occur
+ during very rare circumstances. Thanks to FUWAFUWA.
+
+2002-08-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/floating_point_test.c
+ Disable testing on machines without lrintf().
+
+ * Win32/Makefile.msvc
+ Added dwd.c and wve.c to build.
+
+ * configure.in
+ Bumped version to 1.0.0.
+
+2002-08-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Add a #include for Mac OS 9. Thanks to Stephane Letz.
+
+ * src/wav.c
+ Changed an snprintf to LSF_SNPRINTF.
+
+ * doc/Makefile.am
+ Added version-1.html.
+
+2002-08-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Bumped version to 1.0.rc6.
+
+ * src/*.c
+ Modified scaling of normalised floats and doubles to integers. Until now
+ this has been done by multiplying by 0x8000 for short output, 0x80000000
+ for 32 bit ints and so on. Unfortunately this can cause an overflow and
+ wrap around in the target value. All thes values have therefore been
+ reduced to 0x7FFF, 0x7FFFFFFF and so on. The conversion from ints to
+ normalised floats and doubles remains unchanged. This does mean that for
+ repeated conversions normalised float -> pcm16 -> normalised float would
+ result in a decrease in amplitude of 0x7FFF/0x8000 on every round trip.
+ This is undesirable but less undesireable than the wrap around I am trying
+ to avoid.
+
+ * tests/floating_point_test.c
+ Removed file hash checking because new float scaling procedure introduced
+ above prevented the ability to crate a has on both x86 and PowerPC systems.
+
+2002-08-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/txw.c
+ Completed reading of TXW files. Seek doesn't work yet.
+
+ * src/file_io.c
+ Added a MacOS 9 replacement for ftruncate().
+
+ * MacOS/sndfile.h
+ Added MacOS 9 header file. This should be copied into src/ to compile
+ libsndfile for MacOS9.
+
+2002-08-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed commands SF_SET_NORM_DOUBLE and SFC_SET_NORM_FLOAT to return their
+ values after being set. Reported by Jussi Laako.
+
+ * configure.in
+ If autogen is not found, touch all .c and .h files in tests/.
+
+ * src/common.c
+ Added format width specifier to psf_log_printf() for %u, %d, %D and %X.
+
+ * src/dwd.c
+ Completed implementation of read only access to these files.
+
+ * src/common.h src/*.c src/pcm.c
+ Removed redundant field chars from SF_PRIVATE struct and modified
+ pcm_init() to do without it.
+
+2002-08-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wve.c
+ New file implementing read of Psion Alaw files. This will be a read only
+ format. Implementation complete.
+
+ * src/dwd/c
+ Started implementation of DiamondWare Digitized files. Also read only, not
+ complete.
+
+ * src/wav.c
+ Add parsing of 'smpl' chunk.
+
+ * src/paf.c
+ Fixed reading on un-normalized doubles and floats from 24 bit PAF files.
+ This brings it into line with the reading of 8 bit files into
+ un-normalized doubles which returns values in the range [-128, 127].
+
+ * src/common.c
+ Modified psf_log_printf() to accept the %% conversion specifier to allow
+ printing of a single '%'.
+
+ * src/sds.c
+ Read only of 16 bit samples is working. Need to build a test harness for
+ this and other read only formats.
+
+2002-08-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Added --enable-experimental configure option.
+ Removed pkg-config message at the end of the configure process.
+
+ * src/sds.c src/txw.c src/rx2.c src/sd2.c
+ Moved all the code in these files inside #if ENABLE_EXPERIMENTAL_CODE
+ blocks and added new *_open() function for the case where experimental is
+ not enabled. These new functions just return SFE_UNIMPLMENTED.
+
+ * Win32/sndfile.h src/sndfile.h.in src/common.h
+ Removed un-necessary #pragma pack commands.
+
+ * src/file_io.c
+ Implemented psf_ftruncate() and much other hacking for Win32.
+
+ * Win32/Makefile.msvc
+ Updated.
+
+ * doc/win32.html
+ Updated to include the copying of the sndfile.h file from the Win32/
+ directory to the src/ directory.
+
+ * Make.bat
+ Batch file to make compiling on Wi32 a little easier. Implements "make" and
+ "make check".
+
+2002-08-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ Add place holder for ftruncate() on Win32 which doesn't have ftruncate().
+ This will need to be fixed later.
+
+ * src/sndfile.h.in
+ New file (copy of sndfile.h) with sets up @TYPEOF_SF_COUNT_T@ which will be
+ replaced by the correct type during configure.
+
+ * configure.in
+ Modified to find a good type for TYPEOF_SF_COUNT_T.
+
+ * src/aiff.c
+ Fixed a bug when reading malformed headers.
+
+ * src/common.c
+ Set read values to zero before performing read.
+
+2002-08-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Fixed some HTML tags which were not allowing jumps to links within the
+ page.
+
+ * src/sds.c
+ Massive hacking on this.
+
+ * src/wav.c
+ Added recognition of 'clm ' tag.
+
+2002-08-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Added beginning of a capabilities list beyond simple file formats which
+ can be read/written.
+
+ * src/aiff.c
+ Added parsing of INST and MARK chunks of AIFF files. At the moment this
+ data is simply recorded in the log buffer. Later it will be possible to
+ read this data from an application using sf_command().
+
+ * src/wav.c
+ Added parsing of 'cue ' chunk which contains loop information in WAV files.
+
+ * exampes/sndfile-info.c
+ Changed reporting of Samples to Frames.
+
+ * src/wav.c src/w64.c src/aiff.c src/wav_w64.h
+ Moved from a samples to a frames nomenclature to avoid confusion.
+
+ * doc/FAQ.html
+ What's the best format for storing temporary files?
+
+ * src/sds.c
+ New file for reading/writing Midi Sample Dump Standard files.
+
+ * src/Makefile.am src/sndfile.c src/common.[ch]
+ Added hooks for sds.c.
+
+ * examples/sndfile-info.c
+ Changed from using sf_perror() to using sf_error_str().
+
+2002-08-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Added explanation of mode parameter for sf_open().
+ Added explanation of usage of SFM_* values in sf_seek().
+
+ * src/sndfile.[ch] src/command.c src/file_io.c src/common.h
+ Implemented SFC_FILE_TRUNCATE to allow a file to be truncated. File
+ truncation was suggested by James McCartney.
+
+ * src/command.html
+ Documented SFC_FILE_TRUNCATE.
+
+ * tests/command_test.c
+ Add tests for SFC_FILE_TRUNCATE.
+
+ * src/sndfile.c
+ Added a thrid parameter to the VALIDATE_SNDFILE_AND_ASSIGN_PSF macro to
+ make resetting the error number optional. All uses of the macro other than
+ in error reporting functions were changed to reset the error number.
+
+ * src/pcm.c
+ Fixed a bug were sf_read_* was logging an SFE_SHORT_READ even when no error
+ occurred.
+
+ * tests/write_read_test.tpl
+ Added tests of internal error state.
+
+2002-08-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/GSM610/private.h src/GSM610/*.c src/GSM610/Makefile.am
+ Renamed private.h to gsm610_priv.h to prevent clash with other headers
+ named private.h in other directories. (Probably only a problem on MacOS 9).
+
+ * src/G72x/private.h src/G72x/*.c src/G72x/Makefile.am
+ Renamed private.h to g72x_priv.h to prevent clash with other headers
+ named private.h in other directories. (Probably only a problem on MacOS 9).
+
+ * MacOS/config.h
+ Changed values of HAVE_LRINT and HAVE_LRINTF to force use of code in
+ float_cash.h.
+
+ * src/sndfile.h
+ Changes the name of samples field of the SF_INFO to frames. The old name
+ had caused too much confusion and it simply had to be changed. There will
+ be at least one more pre-release.
+
+2002-08-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/index.html
+ Updated formats matrix to include RAW (header-less) GSM 6.10.
+ Fix specificaltion of table and spelling mistakes.
+
+ * src/sndfile.c src/command.c
+ Fixed bug in SFC_CALC_MAX_SIGNAL family and psf_calc_signal_max ().
+
+ * tests/command.c
+ Removed cruft.
+ Added test for SFC_CALC_MAX_SIGNAL and SFC_CALC_NORM_MAX_SIGNAL.
+
+ * configure.in
+ Update version to 1.0.0rc5.
+
+ * sfendian.h
+ Removed inclusion of un-necessary header.
+
+2002-08-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Minor fixes of info written to log buffer.
+
+ * src/float_cast.h
+ Add definition of HAVE_LRINT_REPLACEMENT.
+
+ * tests/floating_point_test.c
+ Fix file hash check on systems without lrint/lrintf.
+
+ * tests/dft_cmp.c
+ Limit SNR to less than -500.0dB.
+
+ * examples/sndfile2oct.c
+ Fixed compiler warnings.
+
+ * doc/api.html
+ Fixed error where last parameter of sf_error_str() was sf_count_t instead
+ of size_t.
+
+2002-08-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ Why doesn't libsndfile do interleaving/de-interleaving.
+
+ * tests/pcm_test.tpl
+ On Win32 do not perform hash check on files containing doubles.
+
+2002-08-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Defined SF_COUNT_MAX_POSITIVE() macro, a portable way of setting variables
+ of type sf_count_t to their maximum positive value.
+
+ * src/dwvw.c src/w64.c
+ Used SF_COUNT_MAX_POSITIVE().
+
+2002-07-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c
+ Fixed bug in reading/writing of 24 bit PCM PAF files on big endian systems.
+
+ * tests/floating_point_tests.c
+ Fixed hash values for 24 bit PCM PAF files.
+ Disabled file has check if lrintf() function is not available and added
+ warning.
+ Decreased level of signal from a peak of 1.0 to a value of 0.95 to prevent
+ problems on platforms without lrintf() ie Solaris.
+
+2002-07-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed a problem with two different kinds of mal-formed WAV file header. The
+ first had the 'fact' chunk before the 'fmt ' chunk, the other had an
+ incomplete 'INFO' chunk at the end of the file.
+
+ * src/w64.c
+ Added fix to allow differentiation between W64 files and ACID files.
+
+ * src/au_g72x.c src/common.h src/sndfile.c
+ Added error for G72x encoded files with more than one channel.
+
+ * tests/pcm_test.tpl tests/utils.tpl
+ Moved function check_file_hash_or_die() to utils.tpl. Function was then
+ modified to calculate the has of the whole file.
+
+ * src/wav.c
+ Fixed problem writing the 'fact' chunk on big endian systems.
+
+ * tests/sfconvert.c
+ Fixed bug where .paf files were being written as Sphere NIST.
+
+2002-07-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/voc.c
+ Fix for reading headers generated using SFC_UPDATE_HEADER_NOW.
+
+ * doc/command.html
+ Add docs for SFC_UPDATE_HEADER_NOW and SFC_SET_UPDATE_HEADER_AUTO.
+
+2002-07-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * man/sndfile-info.1 man/sndfile-play.1
+ Added manpages supplied by Joshua Haberman the Debian maintainer for
+ libsndfile. Additional tweaks by me.
+
+ * configure.in man/Makefile.am
+ Hooked manpages into autoconf/automake system.
+
+ * src/sndfile.c
+ Added hooks for SFC_SET_UPDATE_HEADER_AUTO.
+
+ * tests/update_header_test.c
+ Improved rigor of testing.
+
+ * src/*.c
+ Fixed problem with *_write_header() functions.
+
+2002-07-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/*.html
+ Updates to documentation to fix problems found by wdg-html-validator.
+
+ * src/common.h src/command.c
+ Added normalize parameter to calls to psf_calc_signal_max() and
+ psf_calc_max_all_channels().
+
+ * src/sndfile.c
+ Added handling for commands SFC_CALC_NORM_SIGNAL_MAX and
+ SFC_CALC_NORM_MAX_ALL_CHANNELS.
+
+ * doc/command.html
+ Added entry for SFC_CALC_NORM_SIGNAL_MAX and SFC_CALC_NORM_MAX_ALL_CHANNELS.
+
+2002-07-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c Win32/Makefile.msvc
+ Get sndfile-play program working on Win32. The Win32 PCM sample I/O API
+ sucks. The sndfile-play program now works on Linux, MacOSX, Solaris and
+ Win32.
+
+2002-07-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/FAQ.html
+ New file for frequently asked questsions.
+
+2002-07-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Documentation fixes.
+
+ * src/au.[ch] src/au_g72x.c src/G72x/g72x.h
+ Add support of 40kbps G723 ADPCM encoding.
+
+ * tests/lossy_comp_test.c tests/floating_point_test.c
+ Add tests for 40kbps G723 ADPCM encoding.
+
+ * doc/index.html
+ Update support matrix.
+
+2002-07-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/command.html
+ Documented SFC_GET_SIMPLE_FORMAT_COUNT, SFC_GET_SIMPLE_FORMAT,
+ SFC_GET_FORMAT_* and SFC_SET_ADD_PEAK_CHUNK.
+
+ * src/sndfile.c src/pcm.c
+ Add ability to turn on and off the addition of a PEAK chunk for floating
+ point WAV and AIFF files.
+
+ * src/sndfile.[ch] src/common.h src/command.c
+ Added sf_command SFC_CALC_MAX_ALL_CHANNELS. Implemented by Maurizio Umberto
+ Puxeddu.
+
+ * doc/command.html
+ Docs for SFC_CALC_MAX_ALL_CHANNELS (assisted by Maurizio Umberto Puxeddu).
+
+2002-07-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/gsm610.c
+ Finalised support for GSM 6.10 AIFF files and added support for GSM 6.10
+ encoded RAW (header-less) files.
+
+ * src/wav.c
+ Add support for IBM_FORMAT_MULAW and IBM_FORMAT_ALAW encodings.
+
+ * src/api.html
+ Fixed more documentation bugs.
+
+2002-07-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h src/common.h
+ Moved some yet-to-be-implelmented values for SF_FORMAT_* from the public
+ header file sndfile.h to the private header file common.h to avoid
+ confusion about the actual capabilities of libsndfile.
+
+2002-07-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/wav.c
+ Fixed file parsing for WAV and AIFF files containing non-audio data after
+ the data chunk.
+
+ * src/aiff.c src/sndfile.c
+ Add support for GSM 6.10 encoded AIFF files.
+
+ * tests/lossy_comp_test.c tests/Makefile.am
+ Add tests for GSM 6.10 encoded AIFF files.
+
+ * src/*.c
+ Fix compiler warnings.
+
+2002-07-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/command_test.c
+ For SFC_SET_NORM_* tests, change the file format from SF_FORMAT_WAV to
+ SF_FORMAT_RAW.
+
+ * src/sndfile.c
+ Added sf_command(SFC_TEST_ADD_TRAILING_DATA) to allow testing of reading
+ from AIFF and WAV files with non-audio data after the audio chunk.
+
+ * src/common.h
+ Add test commands SFC_TEST_WAV_ADD_INFO_CHUNK and
+ SFC_TEST_AIFF_ADD_INST_CHUNK. When these commands are working, they will be
+ moved to src/sndfile.h
+
+ * src/aiff.c src/wav.c
+ Begin implementation of XXXX_command() hook for sf_command().
+
+ * tests/write_read_test.tpl
+ Added sf_command (SFC_TEST_ADD_TRAILING_DATA) to ensure above new code was
+ working.
+
+2002-07-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/update_header_test.c
+ Allow read sample count == write sample count - 1 to fix problems with VOC
+ files.
+
+ * tests/write_read_test.tpl tests/pcm_test.tpl
+ Fixed some problems in the test suite discovered by using Valgrind.
+
+2002-07-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.[ch] tests/*.c
+ Renamed check_log_buffer() to check_log_buffer_or_die().
+
+ * src/sndfile.c
+ SFC_UPDATE_HEADER_NOW and SFC_SETUPDATE_HEADER_AUTO almost finished. Works
+ for all file formats other than VOC.
+
+2002-07-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.[ch] src/common.h
+ Started adding functionality to allow the file header to be updated before
+ the file is closed on files open for SFM_WRITE. This was requested by
+ Maurizio Umberto Puxeddu who is using libsndfile for file I/O in iCSound.
+
+ * tests/update_header_test.c
+ New test program to test that the above functionality is working correctly.
+
+ * tests/peak_chunk_test.c tests/floating_point_test.c
+ Cleanups.
+
+2002-07-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sfendian.[ch]
+ Changed length count parameters for all endswap_XXX() functions from
+ sf_count_t (which can be 64 bit even on 32 bit architectures) to int. These
+ functions are only called frin inside the library, are always called with
+ integer parameters and doing the actual calculation on 64 bit values is
+ slow in comparision to doing it on ints.
+
+ * examples/sndfile-play.c
+ More playback hacking for Win32.
+
+2002-07-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ In psf_log_printf(), changed %D format conversion specifier to %M (marker) and
+ added %D specifier for printing the sf_count_t type.
+
+ * src/*.c
+ Changed all usage of psf_log_printf() with %D format conversion specifiers
+ to use %M conversion instead.
+
+ * tests/pcm_test.tpl tests/pcm_test.def
+ New files to autogen pcm_test.c.
+
+ * src/pcm.c
+ Fixed bug in scaling floats and doubles to 24 bit PCM and vice versa.
+
+2002-07-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Fix setup of $ac_cv_sys_largefile_CFLAGS so that sndfile.pc gets valid
+ values for CFLAGS.
+
+ * examples/sndfile-play.c
+ Start adding playback support for Win32.
+
+2002-07-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Worked to removed compiler warnings.
+ Extensive refactoring.
+
+ * src/common.[ch]
+ Added function psf_memset() which works like the standard C function memset
+ but takes and sf_count_t as the length parameter.
+
+ * src/sndfile.c
+ Replaced calls to memset(0 with calls to psf_memset() as required.
+
+2002-07-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Added "libsndfile : " to the start of all error messages. This was suggested
+ by Conrad Parker author of Sweep ( http://sweep.sourceforge.net/ ).
+
+ * src/sfendian.[ch]
+ Added endswap_XXXX_copy() functions.
+
+ * src/pcm.c src/float32.c src/double64.c
+ Use endswap_XXXX_copy() functions and removed dead code.
+ Cleanups and optimisations.
+
+2002-07-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/sndfile.h
+ Gave values to all the SFC_* enum values to allow better control of the
+ interface as commands are added and removed.
+ Added new command SFC_SET_ADD_PEAK_CHUNK.
+
+ * src/wav.c src/aiff.c
+ Modified wav_write_header and aiff_write_header to make addition of a PEAK
+ chunk optional, even on floating point files.
+
+ * tests/benchmark.tpl
+ Added call to sf_command(SFC_SET_ADD_PEAK_CHUNK) to turn off addition of a
+ PEAK chunk for the benchmark where we are trying to miximize speed.
+
+ * src.pcm.c
+ Changed tribyte typedef to something more sensible.
+ Further conversion speed ups.
+
+2002-07-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/command.c
+ In major_formats rename "Sphere NIST" to "NIST Sphere".
+
+ * src/common.c src/sfendian.c
+ Moved all endswap_XXX_array() functions to sfendian.c. These functions will
+ be tweaked to provide maximum performance. Since maximum performance on one
+ platform does not guarantee maximum performance on another, a small set of
+ functions will be written and the optimal one chosen at compile time.
+
+ * src/common.h src/sfendian.h
+ Declarations of all endswap_XXX_array() functions moved to sfendian.h.
+
+ * src/Makefile.am
+ Add sfendian.c to build targets.
+
+2002-07-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c src/sfendian.h
+ Re-coded PCM encoders and decoders to match or better the speed of
+ libsndfile version 0.0.28.
+
+2002-06-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Add checking for WAVPACK data in standard PCM WAV file. Return error if
+ found. This WAVPACK is *WAY* broken. It uses the same PCM WAV file header
+ and then stores non-PCM data.
+
+ * tests/benchmark.tpl
+ Added more tests.
+
+2002-06-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/benchmark.tpl
+ Added conditional definition of M_PI.
+ For Win32, set WRITE_PERMS to 0777.
+
+ * Win32/Makefile.msvc
+ Added target to make generate program on Win32.
+
+ * src/samplitude.c
+ Removed handler for Samplitude RAP file format. This file type seems rarer
+ than hens teeth and is completely undocumented.
+
+ * src/common.h src/sndfile.c src/Makefile.am Win32/Makefile.msvc
+ Removed references to sampltiude RAP format.
+
+ * tests/benchmark.tpl
+ Benchmark program now prints the libsndfile version number when run. This
+ program was also backported to version 0 to compare results. Version
+ 1.0.0rc2 is faster than version 0.0.28 on most conversions but slower on
+ some. The slow ones need to be fixed before final release.
+
+2002-06-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/benchmark.def tests/benchmark.tpl
+ New files which generate tests/benchmark.c using Autogen. Added int ->
+ SF_FORMAT_PCM_24 test.
+
+ * tests/benchmark.c
+ Now and Autogen output file.
+
+ * tests/Makefile.am
+ Updated for above changes.
+
+2002-06-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/benchmark.c
+ Basic benchmark program complete. Need to convert it to Autogen.
+
+ * Win32/Makefile.msvc
+ Added benchmark.exe target.
+
+2002-06-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/generate.c
+ New program to generate a number of different output file formats from a
+ single input file. This allows testing of the created files.
+
+ * tests/benchmark.c
+ New test program to benchmark libsndfile. Nowhere near complete yet.
+
+ * examples/Makefile.am tests/Makefile.am
+ New make rules for the two new programs.
+
+2002-06-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/libsndfile.def
+ Removed definition for sf_signal_max().
+
+ * src/sndfile.c
+ Removed cruft.
+
+ * doc/index.html
+ A number of documentation bugs were fixed. Thanks to Anand Kumria.
+
+ * doc/version-1.html
+ Minor doc updates.
+
+ * configure.in
+ Bumped version to 1.0.0rc2.
+
+ * src/sf_command.h src/Makefile.am
+ Removed the header file as it was no longer being used. Thanks to Anand
+ Kunria for spotting this.
+
+ * doc/index.html
+ A number of documentation bugs were fixed. Thanks to Anand Kumria.
+
+2002-06-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Test for Win32 before testing SIZEOF_OFF_T so that it works correctly
+ on Win32..
+
+ * src/file_io.c
+ Win32 fixes to ensure O_BINARY is used for file open.
+
+ * doc/win32.html
+ New file documenting the building libsndfile on Win32.
+
+ * doc/*.html
+ Updating of documentation.
+
+2002-06-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pcm_test.c
+ Minor changes to allow easier determination of test file name.
+
+ * src/sndfile.[ch]
+ Removed function sf_signal_max().
+
+ * examples/sndfile-play.c
+ Changed call to sf_signal_max() to a call to sf_command().
+
+2002-06-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/format.c src/command.c
+ Renamed format.c to command.c which will now include code for sf_command()
+ calls to perform operations other than format commands.
+
+ * src/sndfile.c src/sndfile.h
+ Removed function sf_get_signal_max() which is replaced by commands passed
+ to sf_command().
+
+ * src/command.c
+ Implement commands SFC_CALC_SIGNAL_MAX.
+
+ * doc/command.html
+ Documented SFC_CALC_SIGNAL_MAX.
+
+2002-06-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-play.c
+ Mods to make sndfile-play work on Solaris. The program sndfile-play now
+ runs on Linux, MaxOSX and Solaris. Win32 to come.
+
+ * src/format.c
+ Added SF_FORMAT_DWVW_* to subtype_formats array.
+
+ * src/nist.c
+ Added support for 8 bit NIST Sphere files. Example file supplied by Anand
+ Kumria.
+
+2002-06-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sndfile-info.c
+ Tidy up of output format.
+
+ * examnples/sndfile-play.c
+ Mods to make sndfile-play work on MacOSX using Apple's CoreAudio API.
+
+ * configure.in
+ Add new variables OS_SPECIFIC_INCLUDES and OS_SPECIFIC_LINKS which were
+ required to supply extra include paths and link parameters to get
+ sndfile-play working on MacOSX.
+
+ * examples/Makefile.am
+ Use OS_SPOECIFIC_INCLUDES and OS_SPECIFIC_LINKS to build commands for
+ sndfile-play.
+
+2002-06-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/nist.c
+ Added ability to read/write new NIST Sphere file types (A-law, u-law).
+ Header parser was re-written from scratch. Example files supplied by Anand
+ Kumria.
+
+ * src/sndfile.c
+ Support for A-law and u-law NIST files.
+
+ * tests/Makefile.am tests/lossy_comp_test.c
+ Tests for A-law and u-law NIST files.
+
+2002-06-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.c
+ Fixed an error in error string.
+
+2002-06-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * acinclude.m4
+ Removed exit command to allow cross-compiling.
+
+ * Win32/unistd.h src/file_io.c
+ Moved contents of first file into the second file (enclosed in #ifdef).
+ Win32/unistd.h is now an empty file but still must be there for libsndfile
+ to compile on Win32.
+
+ * src/sd2.c, src/sndfile.c:
+ Fixes for Sound Designer II files on big endian systems.
+
+2002-06-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Modified to work around problems with crappy MacOSX version of sed.
+ Added sanity check for proper values for CFLAGS.
+
+2002-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Code clean up in sf_open ().
+
+ * Win32/Makefile.msvc
+ Michael Fink's contributed MSVC++ makefile was hacked to bits and put back
+ together in a new improved form.
+
+ * src/file_io.c
+ Fixes for Win32; _lseeki64() returns an invalid argument for calls like
+ _lseeki64(fd, 0, SEEK_CUR) so need to use _telli64 (fd) instead.
+
+ * src/common.h src/sndfile.c src/wav.c src/aiff.c
+ Added SFE_LOG_OVERRUN error.
+ Added termination for potential infinite loop when parsing file headers.
+
+ * src/wav.c src/w64.c
+ Fixed bug casuing incorrect header generation when opening file read/write.
+
+2002-06-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/api.html
+ Improved the documentation to make it clearer that the file read method
+ and the underlying file format are completely disconnected. Suggested
+ by Josh Green.
+
+ * doc/command.html
+ Started correcting docs to take into account changes made to the
+ operations of the sf_command () function. Not complete yet.
+
+ * src/sndfile.c
+ Reverted some changes which had broken the partially working SDII header
+ parsing. Now have access to an iBook with OS X so reading and writing SDII
+ files on all platforms should be a reality in the near future. On Mac this
+ will involve reading the resource fork via the standard MacOS API. To move
+ a file from Mac to another OS, the resource and data forks will need to be
+ combined before transfer. The combined file will be read on both Mac and
+ other OSes like any other file.
+
+2002-06-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * ltmain.sh
+ Applied a patch from http://fink.sourceforge.net/doc/porting/libtool.php
+ which allows libsndfile to compile on MacOSX 10.1. This patch should not
+ interfere with compiling on other OSes.
+
+ * src/GSM610/private.h
+ Changes to fix compile problems on MacOSX (see src/GSM610/ChangeLog).
+
+ * src/float_cast.h
+ Added MacOSX replacements for lrint() and lrintf().
+
+2002-06-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Replaced the code to print the filename to the log buffer when a file is
+ opened. This code seems to have been left out during the merge of
+ sf_open_read() and sf_open_write() to make a single functions sf_open().
+
+2002-06-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed a bug where the WAV header parser was going into an infinite loop
+ on a badly formed LIST chunk. File supplied by David Viens.
+
+2002-05-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Added a message at the end of the configuration process to warn about the
+ need for the use of pkg-config when linking programs against version 1 of
+ libsndfile.
+
+ * doc/pkg-config.html
+ New documentation file containing details of how to use pkg-config to
+ retrieve settings for CFLAGS and library locations for linking files
+ against version 1 of libsndfile.
+
+2002-05-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed minor bug in handling of so-called ACIDized WAV files.
+
+2002-05-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/libsndfile.def Win32/Makefile.msvc
+ Two new files contributed by Michael Fink (from the winLAME project)
+ which allows libsndfile to be built on windows in a MSDOS box by doing
+ "nmake -f Makefile.msvc". Way cool!
+
+2002-05-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ MacOSX is SSSOOOOOOO screwed up!!! I can't believe how hard it is to
+ generate a tarball which will configure and compile on that platform.
+ Joined the libtool mailing list to try and get some answers.
+
+2002-05-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Changed to autoconf version 2.50. MacOSX uses autoconf version 2.53 which
+ is incompatible with with version 2.13 which had been using until now.
+ The AC_SYS_LARGE_FILE macro distributed withe autoconf 2.50 is missing a
+ few features so AC_SYS_EXTRA_LARGE file was defined to replace it.
+
+ * configure.in
+ Changed to automake version 1.5 to try and make a tarball which will
+ work on MacOSX.
+
+2002-05-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_gsm610.c
+ Changed name to gsm610.c. Added reading/writing of headerless files.
+
+ * src/sndfile.c src/raw.c
+ Added ability to read/write headerless (SF_FORMAT_RAW) GSM 6.10 files.
+
+2002-05-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/lossy_comp_test.c
+ Clean up in preparation for Autogen-ing this file.
+
+ * src/GSM610/*.[ch]
+ Code cleanup and prepartion forgetting file seek working. Details in
+ src/GSM610/ChangeLog.
+
+ * sndfile.pc.in
+ Testing complete. Is sndfile.m4 still needed?
+
+2002-05-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.tpl tests/rdwr_test.tpl
+ Merged tests from these two programs into write_read_test.tpl and deleted
+ rdwr_test.tpl.
+
+2002-05-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/w64.c src/svx.c src/paf.c
+ Fixed bugs in read/write mode.
+
+2002-05-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/Makefile.am
+ Renamed sfplay.c to sndfile-play.c and sndfile_info.c to sndfile-info.c for
+ consistency when these programs become part of the Debian package
+ sndfile-programs.
+
+ * sndfile.pc.in
+ New file to replace sndfile-config.in. Libsndfile now uses the pkg-config
+ model for providing installation parameters to dependant programs.
+
+ * src/sndfile.c
+ Cleanup of code in sf_open().
+
+2002-05-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/utils.tpl tests/write_read_test.tpl
+ More conversion to Autogen fixes and enchancements.
+
+ * src/*.c
+ Read/write mode is now working for 16, 24 and 32 bit PCM as well as 32
+ bit float and 64 bit double data. More tests still required.
+
+ * src/Makefile.am
+ Added DISTCLEANFILES target to remove config.status and config.last.
+
+ * Win32/Makefile.am MacOS/Makefile.am
+ Added DISTCLEANFILES target to remove Makefile.
+
+2002-05-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.[ch] tests/rdwr_test.c
+ More verifying workings of read/write mode. Fixing bugs found.
+
+ * tests/utils.[ch]
+ Made these files Autogen generated files.
+
+ * tests/util.tpl tests/util.def
+ New Autogen files to generate utils.[ch]. Moved some generic test functions
+ into this file. Autogen is such a great tool!
+
+2002-05-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c src/float_cast.h Win32/config.h
+ Fixed a couple of Win32 specific bugs pointed out by Michael Fink
+ (maintainer of WinLAME) and David Viens.
+
+ * tests/check_log_buffer.[ch] tests/utils.[ch]
+ Moved check_log_buffer() to utils.[ch] and deleted old file.
+
+2002-05-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.[ch] src/sndfile.c
+ New function psf_default_seek() which will be the default seek function
+ for things like PCM and floating point data. This default is set for
+ both read and write in sf_open() but can be over-ridden by any codec
+ during it's initialisation.
+
+2002-05-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au.c
+ AU files use a data size value of -1 to mean unknown. Fixed au_open_read()
+ to allow opening files like this.
+
+ * tests/rdwr_test .c
+ Added more tests.
+
+ * src/sndfile.c
+ Fixed bugs in read/write mode found due to improvements in the test
+ program.
+
+2002-04-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/rdwr_test .c
+ New file for testing read/write mode.
+
+2002-04-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * m4/*
+ Removed all m4 macros from this directory as they get concatenated to form
+ the file aclocal.m4 anyway.
+
+ * sndfile.m4
+ Moved this from the m4 directory to the root directory asn this is part of
+ the distribution and is installed during "make install".
+
+2002-04-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float32.c
+ Removed logging of peaks for all file formats other than AIFF and WAV.
+
+ * tests/write_read_test.tpl tests/write_read_test.def
+ New files which autogen uses to generate write_read_test.c. Doing it this
+ way makes write_read_test.c far easier to maintain. Other test programs
+ will be converted to autogen in the near future.
+
+ * src/*.c
+ Fixed a few bugs found when testing on Sparc (bug endian) Solaris.
+
+2002-04-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * doc/*.html
+ Fixed documention versioning.
+
+ * configure.in
+ Fixed a bug in the routines which search for Large File Support on systems
+ which have large file support by defualt.
+
+2002-04-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.[ch]
+ Found and fixed an issue which can cause a bug in other software (I was
+ porting Conrad Parker's Sweep program from version 0 of the library to
+ version 1). When opening a file for write, the libsndfile code would
+ set the sfinfo.samples field to a maximum value.
+
+ * tests/write_read_test.c
+ Added tests to detect the above problem.
+
+2002-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.[ch]
+ Finished base implementation of read/write mode. Much more testing still
+ needed.
+
+ * m4/largefile.m4
+ Macro for detecting Large File Standard capabilities. This macro was ripped
+ out of the aclocal.m4 file of GNU tar-1.13.
+
+ * configure.in
+ Added detection of large file support. Files larger than 2 Gigabytes should
+ now be supported on 64 bit platforms and many 32 bit platforms including
+ Linux (2.4 kernel, glibc-2.2), *BSD, MacOS, Win32.
+
+ * libsndfile_convert_version.py
+ A Python script which attempts to autoconvert code written to use version 0
+ to version 1.
+
+2002-04-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.[ch]
+ Finished base implementation of read/write mode. Much more testing still
+ needed.
+
+ * tests/write_read_test.c
+ Preliminary tests for read/write mode added. More needed.
+
+2002-04-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.[ch]
+ Removed sf_open_read() and sf_open_write() functions,replacting them with
+ sf_open() which takes an extra mode parameter (SF_OPEN_READ, SF_OPEN_WRITE,
+ or SF_OPEN_RDWR). This new function sf_open can now be modified to allow
+ opening a file formodification (RDWR).
+
+2002-04-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Completed merging of separate xxx_open_read() and xxx_open_write()
+ functions. All tests pass.
+
+2002-04-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au.c
+ Massive refactoring required to merge au_open_read() with au_open_write()
+ to create au_open().
+
+2002-04-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Started changes required to allow a sound file to be opened in read/write
+ mode, with separate file pointers for read and write. This involves merging
+ of encoder/decoder functions like pcm_read_init() and pcm_write_init()
+ int a new function pcm_init() as well as doing something similar for all
+ the file type specific functions ie aiff_open_read() and aiff_open_write()
+ were merged to make the function aiff_open().
+
+2002-04-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/file_io.c
+ New file containing psf_fopen(), psf_fread(), psf_fwrite(), psf_fseek() and
+ psf_ftell() functions. These function will replace use of fopen/fread/fwrite
+ etc and allow access to files larger than 2 gigabytes on a number of 32 bit
+ OSes (Linux on x86, 32 bit Solaris user space apps, Win32 and MacOS).
+
+ * src/*.c
+ Replaced all instances of fopen with psf_open, fread with psd_read, fwrite
+ with psf_write and so on.
+
+2002-03-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/dwvw.c
+ Finally fixed all known problems with 12, 16 and 24 bit DWVW encoding.
+
+ * tests/floating_point_test.c
+ Added tests for 12, 16 and 24 bit DWVW encoding.
+
+2002-03-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * m4/endian.m4
+ Defines a new m4 macro AC_C_FIND_ENDIAN, for determining the endian-ness of
+ the target CPU. It first checks for the definition of BYTE_ORDER in
+ <endian.h>, then in <sys/types.h> and <sys/param.h>. If none of these work
+ and the C compiler is not a cross compiler it compiles and runs a program
+ to test for endian-ness. If the compiler is a cross compiler it makes a
+ guess based on $target_cpu.
+
+ * configure.in
+ Modified to use AC_C_FIND_ENDIAN.
+
+ * src/sfendian.h
+ Simplified.
+
+2002-02-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/floating_point_test.c
+ Tests completely rewritten using the dft_cmp function. Now able to
+ calculate a quick guesstimate of the Signal to Noise Ratio of the encoder.
+
+2002-02-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/dft_cmp.[ch]
+ New files containing functions for comparing pre and post lossily
+ compressed data using a quickly hacked DFT.
+
+ * tests/utils.[ch]
+ New files containing functions for saving pre and post encoded data in a
+ file readable by the GNU Octave package.
+
+2002-02-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * m4/lrint.m4 m4/lrintf.m4
+ Fixed m4 macros to define HAVE_LRINT and HAVE_LRINTF even when the test
+ is cached.
+
+2002-02-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/floating_point_test.c
+ Fixed improper use of strncat ().
+
+2002-02-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/headerless_test.c
+ New test program to test the ability to open and read a known file type as a
+ RAW header-less file.
+
+2002-02-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/losy_comp_test.c
+ Added a test to ensure that the data read from a file is not all zeros.
+
+ * examples/sfconvert.c
+ Added "-gsm610" encoding types.
+
+2002-01-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sfconvert.c
+ Added "-dwvw12", "-dwvw16" and "-dwvw24" encoding types.
+
+ * tests/dwvw_test.c
+ New file for testing DWVW encoder/decoder.
+
+2002-01-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/dwvw.c
+ Implemented writing of DWVW. 12 bit seems to work, 16 and 24 bit still broken.
+
+ * src/aiff.c
+ Improved reporting of encoding types.
+
+ * src/voc.c
+ Clean up.
+
+2002-01-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/dwvw.c
+ New file implementing lossless Delta Word Variable Width (DWVW) encoding.
+ Reading 12 bit DWVW is now working.
+
+ * src/aiff.c common.h sndfile.c
+ Added hooks for DWVW encoded AIFF and RAW files.
+
+2002-01-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/w64.c
+ Robustify header parsing.
+
+ * src/wav_w64.h
+ Header file wav.h was renamed to wav_w64.h to signify sharing of
+ definitions across the two file types.
+
+ * src/wav.c src/w64.c src/wav_w64.c
+ Refactoring.
+ Modified and moved functions with a high degree of similarity between
+ wav.c and w64.c to wav_w64.c.
+
+2002-01-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/w64.c
+ Completed work on getting read and write working.
+
+ * examples/sfplay.c
+ Added code to scale floating point data so it plays at a reasonable volume.
+
+ * tests/Makefile.am tests/write_read_test.c
+ Added tests for W64 files.
+
+2002-01-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Modded all code in file header writing routines to use
+ psf_new_binheader_writef().
+ Removed psf_binheader_writef() from src/common.c.
+ Globally replaced psf_new_binheader_writef with psf_binheader_writef.
+
+2002-01-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Modded all code in file parsing routines to use psf_new_binheader_readf().
+ Removed psf_binheader_readf() from src/common.c.
+ Globally replaced psf_new_binheader_readf with psf_binheader_readf.
+
+ * src/common.[ch]
+ Added new function psf_new_binheader_writef () which will soon replace
+ psf_binheader_writef (). The new function has basically the same function
+ as the original but has a more flexible and capable interface. It also
+ allows the writing of 64 bit integer values for files contains 64 bit file
+ offsets.
+
+2002-01-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/formats.c src/sndfile.c src/sndfile.h
+ Added code allowing full enumeration of supported file formats via the
+ sf_command () interface.
+ This feature will allow applications to avoid needing recompilation when
+ support for new file formats are added to libsndfile.
+
+ * tests/command_test.c
+ Added test code for the above feature.
+
+ * examples/list_formats.c
+ New file. An example of the use of the supported file enumeration
+ interface. This program lists all the major formats and for each major
+ format the supported subformats.
+
+2002-01-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.[ch] tests/*.c
+ Changed command parameter of sf_command () function from a test string to
+ an int. The valid values for the command parameter begin with SFC_ and are
+ listed in src/sndfile.h.
+
+2001-12-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/formats.c src/sndfile.c
+ Added an way of enumerating a set of common file formats using the
+ sf_command () interface. This interface was suggested by Dominic Mazzoni,
+ one of the main authors of Audacity (http://audacity.sourceforge.net/).
+
+2001-12-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Added checking of filename parameter in sf_open_read (). Previousy, if a
+ NULL pointer was passed the library would segfault.
+
+2001-12-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c src/common.h
+ Changed the len parameter of the endswap_*_array () functions from type
+ int to type long.
+
+ * src/pcm.c
+ Fixed a problem which
+
+2001-12-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Added conditional #include <sys/types.h> for EMX/gcc on OS/2. Thanks to
+ Paul Hartman for pointing this out.
+
+ * tests/lossy_comp_test.c tests/floating_point_test.c
+ Added definitions for M_PI for when it isn't defined in <math.h>.
+
+2001-11-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ircam.c
+ Re-implemented the header reader. Old version was making incorrect
+ assumptions about the endian-ness of the file from the magic number at the
+ start of the file. The new code looks at the integer which holds the
+ number of channels and determines the endian-ness from that.
+
+2001-11-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Added support for other AIFC types ('raw ', 'in32', '23ni').
+ Further work on IMA ADPCM encoding.
+
+2001-11-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ima_adpcm.c
+ Renamed from wav_ima_adpcm.c. This file will soon handle IMA ADPCM
+ encodings for both WAV and AIFF files.
+
+ * src/aiff.c
+ Started adding IMA ADPCM support.
+
+2001-11-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/double.c
+ New file for handling double precision floating point (SF_FORMAT_DOUBLE)
+ data.
+
+ * src/wav.c src/aiff.c src/au.c src/raw.c
+ Added support for SF_FORMAT_DOUBLE data.
+
+ * src/common.[ch]
+ Addition of endswap_long_array () for endian swapping 64 bit integers. This
+ function will work correctly on processors with 32 bit and 64 bit longs.
+ Optimised endswap_short_array () and endswap_int_array ().
+
+ * tests/pcm_test.c
+ Added and extra check. After the first file of each type is written to disk
+ a checksum is performed of the first 64 bytes and checked against a pre-
+ calculated value. This will work whatever the endian-ness of the host
+ machine.
+
+2001-11-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Added handling of u-law, A-law encoded AIFF files. Thanks to Tom Erbe for
+ supplying example files.
+
+ * tests/lossy_comp_test.c
+ Added tests for above.
+
+ * src/common.h src/*.c
+ Removed function typedefs from common.h and function pointer casting in all
+ the other files. This allows the compiler to perform proper type checking.
+ Hopefully this will prevernt problems like the sf_seek bug for OpenBSD,
+ BeOS etc.
+
+ * src/common.[ch]
+ Added new function psf_new_binheader_readf () which will eventually replace
+ psf_binheader_readf (). The new function has basically the same function as
+ the original but has a more flexible and capable interface. It also allows
+ the reading of 64 bit integer values for files contains 64 bit file
+ offsets.
+
+2001-11-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/voc.c
+ Completed implementation of VOC file handling. Can now handle 8 and 16 bit
+ PCM, u-law and A-law files with one or two channels.
+
+ * src/write_read_test.c tests/lossy_comp_test.c
+ Added tests for VOC files.
+
+2001-11-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float_cast.h
+ Added inline asm version of lrint/lrintf for MacOS. Solution provided by
+ Stephane Letz.
+
+ * src/voc.c
+ More work on this braindamaged format. The VOC files produced by SoX also
+ have a number of inconsistencies.
+
+2001-11-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c
+ Added support for 8 bit PCM PAF files.
+
+ * tests/write_read_test.c
+ Added tests for 8 bit PAF files.
+
+2001-11-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/pcm_test.c
+ New test program to test for correct scaling of integer values between
+ different sized integer containers (ie short -> int).
+ The new specs for libsndfile state that when the source and destination
+ containers are of a different size, the most significant bit of the source
+ value becomes the most significant bit of the destination container.
+
+ * src/pcm.c src/paf.c
+ Modified to pass the above test program.
+
+ * tests/write_read_test.c tests/lossy_comp_test.c
+ Modified to work with the new scaling rules.
+
+2001-11-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/raw.c tests/write_read_test.c tests/write_read_test.c
+ Added ability to do raw reads/writes of float, u-law and A-law files.
+
+ * src/*.[ch] examples/*.[ch] tests/*.[ch]
+ Removed dependance on pcmbitwidth field of SF_INFO struct and moved to new
+ SF_FORMAT_* types and use of SF_ENDIAN_BIG/LITTLE/CPU.
+
+2001-11-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.[ch]
+ Started implmentation of major changes documented in doc/version1.html.
+
+ Removed all usage of off_t which is not part of the ISO C standard. All
+ places which were using it are now using type long which is the type of
+ the offset parameter for the fseek function.
+ This should fix problems on BeOS, MacOS and *BSD like systems which were
+ failing "make check" because sizeof (long) != sizeof (off_t).
+
+--------------------------------------------------------------------------------
+This is the boundary between version 1 of the library above and version 0 below.
+--------------------------------------------------------------------------------
+
+2001-11-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sfplay_beos.cpp
+ Added BeOS version of sfplay.c. This needs to be compiled using a C++
+ compiler so is therefore not built by default. Thanks to Marcus Overhagen
+ for providing this.
+
+2001-11-10 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sfplay.c
+ New example file showing how libsndfile can be used to read and play a
+ sound file.
+ At the moment on Linux is supported. Others will follow in the near future.
+
+2001-11-09 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c
+ Fixed problem with normalisation code where a value of 1.0 could map to
+ a value greater than MAX_SHORT or MAX_INT. Thanks to Roger Dannenberg for
+ pointing this out.
+
+2001-11-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c
+ Fixed scaling issue when reading/writing 8 bit files using
+ sf_read/sf_write_short ().
+ On read, values are scaled so that the most significant bit in the char
+ ends up in the most significant bit of the short. On write, values are
+ scaled so that most significant bit in the short ends up as the most
+ significant bit in the char.
+
+2001-11-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au.c src/sndfile.c
+ Added support for 32 bit float data in big and little endian AU files.
+
+ * tests/write_read_test.c
+ Added tests for 32 bit float data in AU files.
+
+2001-11-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/lossy_comp_test.c
+ Finalised testing of stereo files where possible.
+
+2001-11-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_ms_adpcm.c
+ Fixed bug in writing stereo MS ADPCM WAV files. Thanks to Xu Xin for
+ pointing out this problem.
+
+2001-10-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_ms_adpcm.c
+ Modified function srate2blocksize () to handle 44k1Hz stereo files.
+
+2001-10-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/w64.c
+ Added support for Sonic Foundry 64 bit WAV format. As Linux (my main
+ development platform) does not yet support 64 bit file offsets by default,
+ current handling of this file format treats everything as 32 bit and fails
+ openning the file, if it finds anything that goes beyond 32 bit values.
+
+ * src/sndfile.[hc] src/common.h src/Makefile.am
+ Added hooks for W64 support.
+
+2001-10-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Added more warnings options to CFLAGS when the gcc compiler is detected.
+
+ * src/*.[ch] tests/*.c examples/*.c
+ Started fixing the warning messages due to the new CFLASG.
+
+ * src/voc.c
+ More work on VOC file read/writing.
+
+ * src/paf.c
+ Found that PAF files were not checking the normalisation flag when reading
+ or writing floats and doubles. Fixed it.
+
+ * tests/floating_point_test.c
+ Added specific test for the above problem.
+
+ * src/float_cast.h src/pcm.c
+ Added a section for Win32 to define lrint () and lrintf () in the header
+ and implement it in the pcm.c
+
+2001-10-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * sndfile-config.in m4/sndfile.m4
+ These files were donated by Conrad Parker who also provided instructions
+ on how to install them using autoconf/automake.
+
+ * src/float_cast.h
+ Fiddled around with this file some more. On Linux and other gcc supported
+ OSes use the C99 functions lrintf() and lrint() for casting from floating
+ point to int without incurring the huge perfromance penalty (particularly
+ on the i386 family) caused by the regular C cast from float to int.
+ These new C99 functions replace the FLOAT_TO_* and DOUBLE_TO_* macros which
+ I had been playing with.
+
+ * configure.in m4/lrint.m4 m4/lrintf.m4
+ Add detection of these functions.
+
+2001-10-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/voc.c
+ Completed code for reading VOC files containing a single audio data
+ segment.
+ Started implementing code to handle files with multiple VOC_SOUND_DATA
+ segments but couldn't be bothered finishing it. Multiple segment files can
+ have different sample rates for different sections and other nasties like
+ silence and repeat segments.
+
+2001-10-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/*.c
+ Removed SF_PRIVATE struct field fdata and replaced it with extra_data.
+
+ * src/voc.c
+ Further development of the read part of this woefult file format.
+
+2001-10-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float_cast.h
+ Implemented gcc and i386 floating point to int cast macros. Standard cast
+ will be used when not on gcc for i385.
+
+ * src/pcm.c
+ Modified all uses of FLOAT/DOUBLE_TO_INT and FLOAT/DOUBLE_TO_SHORT casts to
+ comply with macros in float_cast.h.
+
+2001-10-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/voc.c
+ Changed the TYPE_xxx enum names to VOC_TYPE_xxx to prevent name clashes
+ on MacOS with CodeWarrior 6.0.
+
+ * MacOS/MacOS-readme.txt
+ Updated the compile instructions. Probably still need work as I don't have
+ access to a Mac.
+
+2001-10-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/aiff.c common.c
+ Changed all references to snprintf to LSF_SNPRINTF and all vsnprintf to
+ LSF_VSNPRINTF. LSF_VSNPRINTF and LSF_VSNPRINTF are defined in common.h.
+
+ * src/common.h
+ Added checking of HAVE_SNPRINTF and HAVE_VSNPRINTF and defining
+ LSF_VSNPRINTF and LSF_VSNPRINTF to appropriate values.
+
+ * src/missing.c
+ New file containing a minimal implementation of snprintf and vsnprintf
+ functions named missing_snprintf and missing_vsnprintf respectively. These
+ are only compliled into the binary if snprintf and/or vsnprintf are not
+ available.
+
+2001-09-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ircam.c
+ New file to handle Berkeley/IRCAM/CARL files.
+
+ * src/sndfile.c src/common.h
+ Modified for IRCAM handling.
+
+ * tests/*.c
+ Added tests for IRCAM files.
+
+2001-09-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Apparently microsoft windows (tm) doesn't like ulaw and Alaw WAV files with
+ 20 byte format chunks (contrary to ms's own documentation). Fixed the WAV
+ header writing code to generate smaller ms compliant ulaw and Alaw WAV
+ files.
+
+2001-09-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/stdio_test.sh tests/stdio_test.c
+ Shell script was rewritten as a C program due to incompatibilities of the
+ sh shell on Linux and Solaris.
+
+2001-09-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/stdio_test.sh tests/stdout_test.c tests/stdin_test.c
+ New test programs to verify the correct operation of reading from stdin and
+ writing to stdout.
+
+ * src/sndfile.c wav.c au.c nist.c paf.c
+ Fixed a bugs uncovered by the new test programs above.
+
+2001-09-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c wav.c
+ Fixed a bug preventing reading a file from stdin. Found by T. Narita.
+
+2001-09-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Fixed a problem on OpenBSD 2.9 which was causing sf_seek() to fail on IMA
+ WAV files. Root cause was the declaration of the func_seek typedef not
+ matching the functions it was actually being used to point to. In OpenBSD
+ sizeof (off_t) != sizeof (int). Thanks to Heikki Korpela for allowing me
+ to log into his OpenBSD machine to debug this problem.
+
+2001-09-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Implemented sf_command ("norm float").
+
+ * src/*.c
+ Implemented handling of sf_command ("set-norm-float"). Float normalization
+ can now be turned on and off.
+
+ * tests/double_test.c
+ Renamed to floating_point_test.c. Modified to include tests for all scaled
+ reads and writes of floats and doubles.
+
+ * src/au_g72x.c
+ Fixed bug in normalization code found with improved floating_point_test
+ program.
+
+ * src/wav.c
+ Added code for parsing 'INFO' and 'LIST' chunks. Will be used for extract
+ text annotations from WAV files.
+
+ * src/aiff.c
+ Added code for parsing '(c) ' and 'ANNO' chunks. Will be used for extract
+ text annotations from WAV files.
+
+2001-09-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sf_info.c example/Makefile.am
+ Renamed to sndfile_info.c. The program sndfile_info will now be installed
+ when the library is installed.
+
+ * src/float_cast.h
+ New file defining floating point to short and int casts. These casts will
+ eventually replace all flot and double casts to short and int. See comments
+ at the top of the file for the reasoning.
+
+ * src/*.c
+ Changed all default float and double casts to short or int with macros
+ defined in floatcast.h. At the moment these casts do nothing. They will be
+ replaced with faster float to int cast operations in the near future.
+
+2001-08-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/command_test.c
+ New file for testing sf_command () functionality.
+
+ * src/sndfile.c
+ Revisiting of error return values of some functions.
+ Started implementing sf_command () a new function will allow on-the-fly
+ modification of library behaviour, or instance, sample value scaling.
+
+ * src/common.h
+ Added hook for format specific sf_command () calls to SNDFILE struct.
+
+ * doc/api.html
+ Updated and errors corrected.
+
+ * doc/command.html
+ New documentation file explaining new sf_command () function.
+
+2001-08-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed error return values from sf_read*() and sf_write*(). There were
+ numerous instances of -1 being returned through size_t. These now all set
+ error int the SF_PRIVATE struct and return 0. Thanks to David Viens for
+ spotting this.
+
+2001-08-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Fixed use of va_arg() calls that were causing warning messages with the
+ latest version of gcc (thanks Maurizio Umberto Puxeddu).
+
+2001-07-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c src/sfendian.h
+ Moved definition of MAKE_MARKER macro to sfendian.h
+
+2001-07-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Modified sf_get_lib_version () so that version string will be visible using
+ the Unix strings command.
+
+ * examples/Makefile.am examples/sfinfo.c
+ Renamed sfinfo program and source code to sf_info. This prevents a name
+ clash with the program included with libaudiofile.
+
+2001-07-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/read_seek_test.c tests/lossy_comp_test.c
+ Added tests for sf_read_float () and sf_readf_float ().
+
+ * src/voc.c
+ New files for handling Creative Voice files (not complete).
+
+ * src/samplitude.c
+ New files for handling Samplitude files (not complete).
+
+2001-07-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/au.c src/paf.c src/svx.c src/wav.c
+ Converted these files to using psf_binheader_readf() function. Will soon be
+ ready to attempt to make reading writing from pipes work reliably.
+
+ * src/*.[ch]
+ Added code for sf_read_float () and sf_readf_float () methods of accessing
+ file data.
+
+2001-07-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c src/wav_gsm610.c
+ Removed two printf()s which had escaped notice for some time (thanks
+ Sigbjørn Skjæret).
+
+2001-07-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_gsm610.c
+ Fixed a bug which prevented GSM 6.10 encoded WAV files generated by
+ libsndfile from being played in Windoze (thanks klay).
+
+2001-07-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.[ch]
+ Implemented psf_binheader_readf() which will do for file header reading what
+ psf_binheader_writef() did for writing headers. Will eventually allow
+ libsndfile to read and write from pipes, including named pipes.
+
+2001-07-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * MacOS/config.h Win32/config.h
+ Attempted to bring these two files uptodate with src/config.h. As I don't
+ have access to either of these systems support for them may be completely
+ broken.
+
+2001-06-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float32.c
+ Fixed bug for big endian processors that can't read 32 bit IEEE floats. Now
+ tested on Intel x86 and UltraSparc processors.
+
+2001-06-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Modified to allow REX files (from Propellorhead's Recycle and Reason
+ programs) to be read.
+ REX files are basically an AIFF file with slightly unusual sequence of
+ chunks (AIFF files are supposed to allow any sequence) and some extra
+ application specific information.
+ Not yet able to write a REX file as the details of the application specific
+ data is unknown.
+
+2001-06-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed endian bug when reading PEAK chunk on big endian machines.
+
+ * src/common.c
+ Fixed endian bug when reading PEAK chunk on big endian machines with
+ --enable-force-broken-float configure option.
+ Fix psf_binheader_writef for (FORCE_BROKEN_FLOAT ||______)
+
+2001-06-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in src/config.h.in
+ Removed old CAN_READ_WRITE_x86_IEEE configure variable now that float
+ capabilities are detected at run time.
+ Added FORCE_BROKEN_FLOAT to allow testing of broken float code on machines
+ where the processor can in fact handle floats correctly.
+
+ * src/float32.c
+ Rejigged code reading and writing of floats on broken processors.
+
+ * m4/
+ Removed this directory and all its files as they are no longer needed.
+
+2001-06-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/peak_chunk_test.c
+ New test to validate reading and writing of peak chunk.
+
+ * examples/sfconvert
+ Added -float32 option.
+
+ * src/*.c
+ Changed all error return values to negative values (ie the negative of what
+ they were).
+
+ * src/sndfile.c tests/error_test.c
+ Modified to take account of the previous change.
+
+2001-06-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/float32.c
+ File renamed from wav_float.c and renamed function to something more
+ general.
+ Added runtime detection of floating point capabilities.
+ Added recording of peaks during write for generation of PEAK chunk.
+
+ * src/wav.c src/aiff.c
+ Added handing for PEAK chunk for floating point files. PEAK is read when the
+ file headers are read and generated when the file is closed. Logic is in
+ place for adding PEAK chunk to end of file when writing to a pipe (reading
+ and writing from/to pipe to be implemented soon).
+
+ * src/sndfile.c
+ Modified sf_signal_max () to use PEAK values if present.
+
+2001-06-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Added pcm_read_init () and pcm_write_init () to src/pcm.c and removed all
+ other calls to functions in this file from the filetype specific files.
+
+ * src/*.c
+ Added alaw_read_init (), alaw_write_int (), ulaw_read_init () and
+ ulaw_write_init () and removed all other calls to functions in alaw.c and
+ ulaw.c from the filetype specific files.
+
+ * tests/write_read_test.c
+ Added tests to validate sf_seek () on all file types.
+
+ * src/raw.c
+ Implemented raw_seek () function to fix a bug where
+ sf_seek (file, 0, SEEK_SET) on a RAW file failed.
+
+ * src/paf.c
+ Fixed a bug in paf24_seek () found due to added seeks tests in
+ tests/write_read_test.c
+
+2001-06-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/read_seek_test.c
+ Fixed a couple of broken binary files.
+
+ * src/aiff.c src/wav.c
+ Added handling of PEAK chunks on file read.
+
+2001-05-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * check_libsndfile.py
+ New file for the regression testing of libsndfile.
+ check_libsndfile.py is a Python script which reads in a file containing
+ filenames of audio files. Each file is checked by running the examples/sfinfo
+ program on them and checking for error or warning messages in the libsndfile
+ log buffer.
+
+ * check_libsndfile.list
+ This is an example list of audio files for use with check_libsndfile.py
+
+ * tests/lossy_comp_test.c
+ Changed the defined value of M_PI for math header files which don't have it.
+ This fixed validation test failures on MetroWerks compilers. Thanks to Lord
+ Praetor Satanus of Acheron for bringing this to my attention.
+
+2001-05-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.[ch]
+ Removed psf_header_setf () which was no longer required after refactoring
+ and simplification of header writing.
+ Added 'z' format specifier to psf_binheader_writef () for zero filling header
+ with N bytes. Used by paf.c and nist.c
+
+ * tests/check_log_buffer.c
+ New file implementing check_log_buffer () which reads the log buffer of a
+ SNDFILE* object and searches for error and warning messages. Calls exit ()
+ if any are found.
+
+ * tests/*.c
+ Added calls to check_log_buffer () after each call to sf_open_XXX ().
+
+2001-05-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/wav_ms_adpcm.c src/wav_gsm610.c
+ Major rehack of header writing using psf_binheader_writef ().
+
+2001-05-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/wav_ima_adpcm.c
+ Major rehack of header writing using psf_binheader_writef ().
+
+2001-05-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Changed return type of get_encoding_str () to prevent compiler warnings on
+ Mac OSX.
+
+ * src/aiff.c src/au.c
+ Major rehack of header writing using psf_binheader_writef ().
+
+2001-05-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h src/common.c
+ Added comments.
+ Name of log buffer changed from strbuffer to logbuffer.
+ Name of log buffer index variable changed from strindex to logindex.
+
+ * src/*.[ch]
+ Changed name of internal logging function from psf_sprintf () to
+ psf_log_printf ().
+ Changed name of internal header generation functions from
+ psf_[ab]h_printf () to psf_asciiheader_printf () and
+ psf_binheader_writef ().
+ Changed name of internal header manipulation function psf_hsetf () to
+ psf_header_setf ().
+
+2001-05-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/nist.c
+ Fixed reading and writing of sample_byte_format header. "01" means little
+ endian and "10" means big endian regardless of bit width.
+
+ * configure.in
+ Detect Mac OSX and disable -Wall and -pedantic gcc options. Mac OSX is
+ way screwed up and spews out buckets of warning messages from the system
+ headers.
+ Added --disable-gcc-opt configure option (sets gcc optimisation to -O0 ) for
+ easier debugging.
+ Made decision to harmonise source code version number and .so library
+ version number. Future releases will stick to this rule.
+
+ * doc/new_file_type.HOWTO
+ New file to document the addition of new file types to libsndfile.
+
+2001-05-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/nist.c
+ New file for reading/writing Sphere NIST audio file format.
+ Originally requested by Elis Pomales in 1999.
+ Retrieved from unstable (and untouched for 18 months) branch of libsndfile.
+ Some vital information gleaned from the source code to Bill Schottstaedt's
+ sndlib library : ftp://ccrma-ftp.stanford.edu/pub/Lisp/sndlib.tar.gz
+ Currently reading and writing 16, 24 and 32 bit, big-endian and little
+ endian, stereo and mono files.
+
+ * src/common.h src/common.c
+ Added psf_ah_printf () function to help construction of ASCII headers (ie NIST).
+
+ * configure.in
+ Added test for vsnprintf () required by psf_ah_printf ().
+
+ * tests/write_read_test.c
+ Added tests for supported NIST files.
+
+2001-05-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.c
+ Added tests for little endian AIFC files.
+
+ * src/aiff.c
+ Minor re-working of aiff_open_write ().
+ Added write support for little endian PCM encoded AIFC files.
+
+2001-05-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Minor re-working of aiff_open_read ().
+ Added read support for little endian PCM encoded AIFC files from the Mac
+ OSX CD ripper program. Guillaume Lessard provided a couple of sample files
+ and a working patch.
+ The patch was not used as is but gave a good guide as to what to do.
+
+2001-05-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h
+ Fixed comments about endian-ness of WAV and AIFF files. Guillaume Lessard
+ pointed out the error.
+
+2001-04-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/make_sine.c
+ Re-write of this example using sample rate and required frequency in Hz.
+
+2001-02-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed bug that prevented known file types from being read as RAW PCM data.
+
+2000-12-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Added handing of COMT chunk.
+
+2000-11-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sfconvert.c
+ Fixed bug in normalisatio code. Pointed out by Johnny Wu.
+
+2000-11-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/config.h
+ Fixed the incorrect setting of HAVE_ENDIAN_H parameter. Win32 only issue.
+
+2000-10-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/Makefile.am
+ Added -lm for write_read_test_LDADD.
+
+2000-10-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/au.c
+ Fixed bug which prevented writing of G723 24kbps AU files.
+
+ * tests/lossy_comp_test.c
+ Corrrection to options for G723 tests.
+
+ * configure.in
+ Added --disable-gcc-pipe option for DJGPP compiler (gcc on MS-DOS) which
+ doesn't allow gcc -pipe option.
+
+2000-09-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/ulaw.c src/alaw.c src/wav_imaadpcm.c src/msadpcm.c src/wav_gsm610.c
+ Fixed normailsation bugs shown up by new double_test program.
+
+2000-08-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c
+ Fixed bug in normalisation code (spotted by Steve Lhomme).
+
+ * tests/double_test.c
+ New file to test scaled and unscaled sf_read_double() and sf_write_double()
+ functions.
+
+2000-08-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * COPYING
+ Changed to the LGPL COPYING file (spotted by H. S. Teoh).
+
+2000-08-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h
+ Removed prototype of unimplemented function sf_get_info(). Added prototype
+ for sf_error_number() Thanks to Sigbjørn Skjæret for spotting these.
+
+2000-08-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/newpcm.h
+ New file to contain a complete rewrite of the PCM data handling.
+
+2000-08-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed a leak of FILE* pointers in sf_open_write(). Thanks to Sigbjørn
+ Skjæret for spotting this one.
+
+2000-08-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au_g72x.c src/G72x/g72x.c
+ Added G723 encoded AU file support.
+
+ * tests/lossy_comp_test.c
+ Added tests for G721 and G723 encoded AU files.
+
+2000-08-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * all files
+ Changed the license to LGPL. Albert Faber who had copyright on
+ Win32/unistd.h gave his permission to change the license on that file. All
+ other files were either copyright erikd AT mega-nerd DOT com or copyright
+ under a GPL/LGPL compatible license.
+
+2000-08-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/lossy_comp_test.c
+ Fixed incorrect error message.
+
+ * src/au_g72x.c src/G72x/*
+ G721 encoded AU files now working.
+
+ * Win32/README-Win32.txt
+ Replaced this file with a new one which gives a full explanation
+ of how to build libsndfile under Win32. Thanks to Mike Ricos.
+
+2000-08-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.[ch]
+ Removed double leading underscores from the start of all variable and
+ function names. Identifiers with a leading underscores are reserved
+ for use by the compiler.
+
+ * src/au_g72x.c src/G72x/*
+ Continued work on G721 encoded AU files.
+
+2000-07-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/G72x/*
+ New files for reading/writing G721 and G723 ADPCM audio. These files
+ are from a Sun Microsystems reference implementation released under a
+ free software licence.
+ Extensive changes to this code to make it fit in with libsndfile.
+ See the ChangeLog in this directory for details.
+
+ * src/au_g72x.c
+ New file for G721 encoded AU files.
+
+2000-07-08 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * libsndfile.spec.in
+ Added a spec file for making RPMs. Thanks to Josh Green for supplying this.
+
+2000-06-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/sndfile.h
+ Add checking for and handling of header-less u-law encoded AU/SND files.
+ Any file with a ".au" or ".snd" file extension and without the normal
+ AU file header is treated as an 8kHz, u-law encoded file.
+
+ * src/au.h
+ New function for opening a headerless u-law encoded file for read.
+
+2000-06-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c
+ Add checking for files shorter than minimal PAF file header length.
+
+2000-06-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.c
+ Added extra sf_perror() calls when sf_write_XXXX fails.
+
+2000-05-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Modified usage of va_arg() macro to work correctly on PowerPC
+ Linux. Thanks to Kyle Wheeler for giving me ssh access to his
+ machine while I was trying to track this down.
+
+ * configure.in src/*.[ch]
+ Sorted out some endian-ness issues brought up by PowerPC Linux.
+
+ * tests/read_seek_test.c
+ Added extra debugging for when tests fail.
+
+2000-05-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Fixed bug in GSM 6.10 handling for big-endian machines. Thanks
+ to Sigbjørn Skjæret for reporting this.
+
+2000-04-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/wav.c src/wav_gsm610.c
+ Finallised writing of GSM 6.10 WAV files.
+
+ * tests/lossy_comp_test.c
+ Wrote new test code for GSM 6.10 files.
+
+ * examples/sfinfo.c
+ Fixed incorrect format in printf() statement.
+
+2000-04-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h.in
+ Fixed comments about sf_perror () and sf_error_str ().
+
+2000-03-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Fixed --enable-justsrc option.
+
+2000-03-07 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * wav.c
+ Fixed checking of bytespersec field of header. Still some weirdness
+ with some files.
+
+2000-03-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/lossy_comp_test.c
+ Added option to test PCM WAV files (sanity check).
+ Fixed bug in sf_seek() tests.
+
+2000-02-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/wav.c
+ Minor changes to allow writing of GSM 6.10 WAV files.
+
+2000-02-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in Makefile.am src/Makefile.am
+ Finally got around to figuring out how to build a single library from
+ multiple source directories.
+ Reading GSM 6.10 files now seems to work.
+
+2000-01-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Added more error reporting in read_fmt_chunk().
+
+1999-12-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sfinfo.c
+ Modified program to accept multiple filenames from the command line.
+
+1999-11-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_ima_adpcm.c
+ Moved code around in preparation to adding ability to read/write IMA ADPCM
+ encoded AIFF files.
+
+1999-11-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Fixed put_int() and put_short() macros used by _psf_hprintf() which were
+ causing seg. faults on Sparc Solaris.
+
+1999-11-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.c
+ Added string.h to includes. Thanks to Sigbjxrn Skjfret.
+
+ * src/svx.c
+ Fixed __svx_close() function to ensure FORM and BODY chunks are correctly
+ set.
+
+1999-10-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au.c
+ Fixed handling of incorrect size field in AU header on read. Thanks to
+ Christoph Lauer for finding this problem.
+
+1999-09-28 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fixed a bug with incorrect SSND chunk length being written. This also lead
+ to finding an minor error in AIFF header parsing. Thanks to Dan Timis for
+ pointing this out.
+
+1999-09-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c
+ Fixed a bug with reading and writing 24 bit stereo PAF files. This problem
+ came to light when implementing tests for the new functions which operate
+ in terms of frames rather than items.
+
+1999-09-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Modified file type detection to use first 12 bytes of file rather than
+ file name extension. Required this because NIST files use the same
+ filename extension as Microsoft WAV files.
+
+ * src/sndfile.c src/sndfile.h
+ Added short, int and double read/write functions which work in frames
+ rather than items. This was originally suggested by Maurizio Umberto
+ Puxeddu.
+
+1999-09-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/svx.c
+ Finished off implementation of write using __psf_hprintf().
+
+1999-09-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/common.h
+ Added a buffer to SF_PRIVATE for writing the header. This is required
+ to make generating headers for IFF/SVX files easier as well as making
+ it easier to do re-write the headers which will be required when
+ sf_rewrite_header() is implemented.
+
+ * src/common.c
+ Implemented __psf_hprintf() function. This is an internal function
+ which is documented briefly just above the code.
+
+1999-09-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed a bug in sf_write_raw() where it was returning incorrect values
+ (thanks to Richard Dobson for finding this one). Must put in a test
+ routine for sf_read_raw and sf_write_raw.
+
+ * src/aiff.c
+ Fixed default FORMsize in __aiff_open_write ().
+
+ * src/sndfile.c
+ Added copy of filename to internal data structure. IFF/SVX files
+ contain a NAME header chunk. Both sf_open_read() and sf_open_write()
+ copy the file name (less the leading path information) to the
+ filename field.
+
+ * src/svx.c
+ Started implementing writing of files.
+
+1999-08-04 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/svx.c
+ New file for reading/writing 8SVX and 16SVX files.
+
+ * src/sndfile.[ch] src/common.h
+ Changes for SVX files.
+
+ * src/aiff.c
+ Fixed header parsing when unknown chunk is found.
+
+1999-08-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/paf.c
+ New file for reading/writing Ensoniq PARIS audio file format.
+
+ * src/sndfile.[ch] src/common.h
+ Changes for PAF files.
+
+ * src/sndfile.[ch]
+ Added stuff for sf_get_lib_version() function.
+
+
+1999-07-31 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h MacOS/config.h
+ Fixed minor MacOS configuration issues.
+
+1999-07-30 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * MacOS/
+ Added a new directory for the MacOS config.h file and the
+ readme file.
+
+ * src/aiff.c
+ Fixed calculation of datalength when reading SSND chunk. Thanks to
+ Sigbjørn Skjæret for pointing out this error.
+
+1999-07-29 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/sndfile.h src/raw.c
+ Further fixing of #includes for MacOS.
+
+1999-07-25 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/aiff.c
+ Added call to ferror () in main header parsing loop of __XXX_open_read
+ functions. This should fix problems on platforms (MacOS, AmigaOS) where
+ fseek()ing or fread()ing beyond the end of the file puts the FILE*
+ stream in an error state until clearerr() is called.
+
+ * tests/write_read_test.c
+ Added tests for RAW header-less PCM files.
+
+ * src/common.h
+ Moved definition of struct tribyte to pcm.c which is the only place
+ which needs it.
+
+ * src/pcm.c
+ Modified all code which assumed sizeof (struct tribyte) == 3. This code
+ did not work on MacOS. Thanks to Ben "Jacobs" for pointing this out.
+
+ * src/au.c
+ Removed <sys/stat.h> from list of #includes (not being used).
+
+ * src/sndfile.c
+ Added MacOS specific #ifdef to replace <sys/stat.h>.
+
+ * src/sndfile.h
+ Added MacOS specific #ifdef to replace <sys/stat.h>.
+
+ * src/sndfile.h
+ Added MacOS specific typedef for off_t.
+
+ * MacOS-readme.txt
+ New file with instructions for building libsndfile under MacOS. Thanks
+ to Ben "Jacobs" for supplying these instructions.
+
+1999-07-24 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Removed sndfile.h from generated file list as there were no longer
+ any autoconf substitutions being made.
+
+ * src/raw.c
+ New file for handling raw header-less PCM files. In order to open these
+ for read, the user must specify format, pcmbitwidth and channels in the
+ SF_INFO struct when calling sf_open_read ().
+
+ * src/sndfile.c
+ Added support for raw header-less PCM files.
+
+1999-07-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * examples/sfinfo.c
+ Removed options so the sfinfo program always prints out all the information.
+
+1999-07-19 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/alaw.c
+ New file for A-law encoding (similar to u-law).
+
+ * tests/alaw_test.c
+ New test program to test the A-law encode/decode lookup tables.
+
+ * tests/lossy_comp_test.c
+ Added tests for a-law encoded WAV, AU and AULE files.
+
+1999-07-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c src/au.c
+ Removed second "#include <unistd.h>". Thanks to Ben "Jacobs" for pointing
+ this out.
+
+1999-07-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/ulaw_test.c
+ New test program to test the u-law encode/decode lookup tables.
+
+1999-07-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.h
+ Made corrections to comments on the return values from sf_seek ().
+
+ * src/sndfile.c
+ Fixed boundary condition checking bug and accounting bug in sf_read_raw ().
+
+1999-07-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/au.c src/ulaw.c
+ Finished implementation of u-law encoded AU files.
+
+ * src/wav.c
+ Implemented reading and writing of u-law encoded WAV files.
+
+ * tests/
+ Changed name of adpcm_test.c to lossy_comp_test.c. This test program
+ will now be used to test Ulaw and Alaw encoding as well as APDCM.
+ Added tests for Ulaw encoded WAV files.
+
+1999-07-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/adpcm_test.c
+ Initialised amp variable in gen_signal() to remove compiler warning.
+
+1999-07-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ In __aiff_open_read () prevented fseek()ing beyond end of file which
+ was causing trouble on MacOS with the MetroWerks compiler. Thanks to
+ Ben "Jacobs" for pointing this out.
+
+ *src/wav.c
+ Fixed as above in __wav_open_read ().
+
+1999-07-01 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_ms_adpcm.c
+ Implemented MS ADPCM encoding. Code cleanup of decoder.
+
+ * tests/adpcm_test.c
+ Added tests for MS ADPCM WAV files.
+
+ * src/wav_ima_adpcm.c
+ Fixed incorrect parameter in call to srate2blocksize () from
+ __ima_writer_init ().
+
+1999-06-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/read_seek_test.c
+ Added test for 8 bit AIFF files.
+
+1999-06-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.c
+ Removed test for IMA ADPCM WAV files which is now done in adpcm_test.c
+
+ * configure.in
+ Added -Wconversion to CFLAGS.
+
+ * src/*.c tests/*.c examples/*.c
+ Fixed all warnings resulting from use of -Wconversion.
+
+1999-06-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Added fact chunk handling on read and write for all non WAVE_FORMAT_PCM
+ WAV files.
+
+ * src/wav_ima.c
+ Changed block alignment to be dependant on sample rate. This should make
+ WAV files created with libsndfile compatible with the MS Windows media
+ players.
+
+ * tests/adpcm_test.c
+ Reimplemented adpcm_test_short and implemented adpcm_test_int and
+ adpcm_test_double.
+ Now have full testing of IMA ADPCM WAV file read, write and seek.
+
+1999-06-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_float.c
+ Fixed function prototype for x86f2d_array () which was causing ocassional
+ seg. faults on Sparc Solaris machines.
+
+1999-06-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c
+ Fixed bug in __aiff_close where the length fields in the header were
+ not being correctly calculated before writing.
+
+ * tests/write_read_test.c
+ Modified to detect the above bug in WAV, AIFF and AU files.
+
+1999-06-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * Win32/*
+ Added a contribution from Albert Faber to allow libsndfile to compile
+ under Win32 systems. libsndfile will now be used as part of LAME the
+ the MPEG 1 Layer 3 encoder (http://internet.roadrunner.com/~mt/mp3/).
+
+1999-06-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in
+ Changed to reflect previous changes.
+
+ * src/wav_ima_adpcm.c
+ Fixed incorrect calculation of bytespersec header field (IMA ADPCM only).
+
+ Fixed bug when writing from int or double data to IMA ADPCM file. Will need
+ to write test code for this.
+
+ Fixed bug in __ima_write () whereby the length of the current block was
+ calculated incorrectly. Thanks to Jongcheon Park for pointing this out.
+
+1999-03-27 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/*.c
+ Changed all read/write/lseek function calls to fread/fwrite/
+ fseek/ftell and added error checking of return values from
+ fread and fwrite in critical areas of the code.
+
+ * src/au.c
+ Fixed incorrect datasize element in AU header on write.
+
+ * tests/error_test.c
+ Add new test to check all error values have an associated error
+ string. This will avoid embarrassing real world core dumps.
+
+1999-03-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c src/aiff.c
+ Added handling for unknown chunk markers in the file.
+
+1999-03-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Filled in missing error strings in SndfileErrors array. Missing entries
+ can cause core dumps when calling sf_error-str (). Thanks to Sam
+ <mrsam at-sign geocities.com> for finding this problem.
+
+1999-03-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav_ima_adpcm.c
+ Work on wav_ms_adpcm.c uncovered a bug in __ima_read () when reading
+ stereo files. Caused by not adjusting offset into buffer of decoded
+ samples for 2 channels. A similar bug existed in __ima_write ().
+ Need a test for stereo ADPCM files.
+
+ * src/wav_ms_adpcm.c
+ Decoder working correctly.
+
+1999-03-18 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * configure.in Makefile.am
+ Added --enable-justsrc configuration variable sent by Sam
+ <mrsam at-sign geocities.com>.
+
+ * src/wav_ima_adpcm.c
+ Fixed bug when reading beyond end of data section due to not
+ checking pima->blockcount.
+ This uncovered __ima_seek () bug due to pima->blockcount being set
+ before calling __ima_init_block ().
+
+1999-03-17 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Started implementing MS ADPCM decoder.
+ If file is WAVE_FORMAT_ADPCM and length of data chunk is odd, this
+ encoder seems to add an extra byte. Why not just give an even data
+ length?
+
+1999-03-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Split code out of wav.c to create wav_float.c and wav_ima_adpcm.c.
+ This will make it easier to add and debug other kinds of WAV files
+ in future.
+
+1999-03-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/
+ Added adpcm_test.c which implements test functions for
+ IMA ADPCM reading/writing/seeking etc.
+
+ * src/wav.c
+ Fixed many bugs in IMA ADPCM encoder and decoder.
+
+1999-03-11 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Finished implementing IMA ADPCM encoder and decoder (what a bitch!).
+
+1999-03-03 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/wav.c
+ Started implementing IMA ADPCM decoder.
+
+1999-03-02 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/sndfile.c
+ Fixed bug where the sf_read_XXX functions were returning a
+ incorrect read count when reading past end of file.
+ Fixed bug in sf_seek () when seeking backwards from end of file.
+
+ * tests/read_seek_test.c
+ Added multiple read test to short_test(), int_test () and
+ double_test ().
+ Added extra chunk to all test WAV files to test that reading
+ stops at end of 'data' chunk.
+
+1999-02-21 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.c
+ Added tests for little DEC endian AU files.
+
+ * src/au.c
+ Add handling for DEC format little endian AU files.
+
+1999-02-20 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c src/au.c src/wav.c
+ Add __psf_sprintf calls during header parsing.
+
+ * src/sndfile.c src/common.c
+ Implement sf_header_info (sndfile.c) function and __psf_sprintf (common.c).
+
+ * tests/write_read_test.c
+ Added tests for 8 bit PCM files (WAV, AIFF and AU).
+
+ * src/au.c src/aiff.c
+ Add handling of 8 bit PCM data format.
+
+ * src/aiff.c
+ On write, set blocksize in SSND chunk to zero like everybody else.
+
+1999-02-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c:
+ Fixed bug in let2s_array (cptr was not being initialised).
+
+ * src/sndfile.c:
+ Fixed bug in sf_read_raw and sf_write_raw. sf_seek should
+ now work when using these functions.
+
+1999-02-15 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/write_read_test.c:
+ Force test_buffer array to be double aligned. Sparc Solaris
+ requires this.
+
+1999-02-14 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/pcm.c:
+ Fixed a bug which was causing errors in the reading
+ and writing of 24 bit PCM files.
+
+ * doc/api.html
+ Finished of preliminary documentaion.
+
+1999-02-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * src/aiff.c:
+ Changed reading of 'COMM' chunk to avoid reading an int
+ which overlaps an int (4 byte) boundary.
diff --git a/libsndfile.64/NEWS b/libsndfile.64/NEWS
new file mode 100644
index 00000000..d8f549f4
--- /dev/null
+++ b/libsndfile.64/NEWS
@@ -0,0 +1,199 @@
+Version 1.0.28 (2017-04-02)
+ * Fix buffer overruns in FLAC and ID3 handling code.
+ * Move to variable length header storage.
+ * Fix detection of Large File Support for 32 bit systems.
+ * Remove large stack allocations in ALAC handling code.
+ * Remove all use of Variable Length Arrays.
+ * Minor bug fixes and improvements.
+
+Version 1.0.27 (2016-06-19)
+ * Fix an SF_INFO seekable flag regression introduced in 1.0.26.
+ * Fix potential infinite loops on malformed input files.
+ * Add string metadata read/write for CAF and RF64.
+ * Add handling of CUE chunks.
+ * Fix endian-ness issues in PAF files.
+ * Minor bug fixes and improvements.
+
+Version 1.0.26 (2015-11-22)
+ * Fix for CVE-2014-9496, SD2 buffer read overflow.
+ * Fix for CVE-2014-9756, file_io.c divide by zero.
+ * Fix for CVE-2015-7805, AIFF heap write overflow.
+ * Add support for ALAC encoder in a CAF container.
+ * Add support for Cart chunks in WAV files.
+ * Minor bug fixes and improvements.
+
+Version 1.0.25 (2011-07-13)
+ * Fix for Secunia Advisory SA45125, heap overflow in PAF file handler.
+ * Accept broken WAV files with blockalign == 0.
+ * Minor bug fixes and improvements.
+
+Version 1.0.24 (2011-03-23)
+ * WAV files now have an 18 byte u-law and A-law fmt chunk.
+ * Document virtual I/O functionality.
+ * Two new methods rawHandle() and takeOwnership() in sndfile.hh.
+ * AIFF fix for non-zero offset value in SSND chunk.
+ * Minor bug fixes and improvements.
+
+Version 1.0.23 (2010-10-10)
+ * Add version metadata to Windows DLL.
+ * Add a missing 'inline' to sndfile.hh.
+ * Update docs.
+ * Minor bug fixes and improvements.
+
+Version 1.0.22 (2010-10-04)
+ * Couple of fixes for SDS file writer.
+ * Fixes arising from static analysis.
+ * Handle FLAC files with ID3 meta data at start of file.
+ * Handle FLAC files which report zero length.
+ * Other minor bug fixes and improvements.
+
+Version 1.0.21 (2009-12-13)
+ * Add a couple of new binary programs to programs/ dir.
+ * Remove sndfile-jackplay (now in sndfile-tools package).
+ * Add windows only function sf_wchar_open().
+ * Bunch of minor bug fixes.
+
+Version 1.0.20 (2009-05-14)
+ * Fix potential heap overflow in VOC file parser (Tobias Klein, http://www.trapkit.de/).
+
+Version 1.0.19 (2009-03-02)
+ * Fix for CVE-2009-0186 (Alin Rad Pop, Secunia Research).
+ * Huge number of minor bug fixes as a result of static analysis.
+
+Version 1.0.18 (2009-02-07)
+ * Add Ogg/Vorbis support (thanks to John ffitch).
+ * Remove captive FLAC library.
+ * Many new features and bug fixes.
+ * Generate Win32 and Win64 pre-compiled binaries.
+
+Version 1.0.17 (2006-08-31)
+ * Add sndfile.hh C++ wrapper.
+ * Update Win32 MinGW build instructions.
+ * Minor bug fixes and cleanups.
+
+Version 1.0.16 (2006-04-30)
+ * Add support for Broadcast (BEXT) chunks in WAV files.
+ * Implement new commands SFC_GET_SIGNAL_MAX and SFC_GET_MAX_ALL_CHANNELS.
+ * Add support for RIFX (big endian WAV variant).
+ * Fix configure script bugs.
+ * Fix bug in INST and MARK chunk writing for AIFF files.
+
+Version 1.0.15 (2006-03-16)
+ * Fix some ia64 issues.
+ * Fix precompiled DLL.
+ * Minor bug fixes.
+
+Version 1.0.14 (2006-02-19)
+ * Really fix MinGW compile problems.
+ * Minor bug fixes.
+
+Version 1.0.13 (2006-01-21)
+ * Fix for MinGW compiler problems.
+ * Allow readin/write of instrument chunks from WAV and AIFF files.
+ * Compile problem fix for Solaris compiler.
+ * Minor cleanups and bug fixes.
+
+Version 1.0.12 (2005-09-30)
+ * Add support for FLAC and Apple's Core Audio Format (CAF).
+ * Add virtual I/O interface (still needs docs).
+ * Cygwin and other Win32 fixes.
+ * Minor bug fixes and cleanups.
+
+Version 1.0.11 (2004-11-15)
+ * Add support for SD2 files.
+ * Add read support for loop info in WAV and AIFF files.
+ * Add more tests.
+ * Improve type safety.
+ * Minor optimisations and bug fixes.
+
+Version 1.0.10 (2004-06-15)
+ * Fix AIFF read/write mode bugs.
+ * Add support for compiling Win32 DLLS using MinGW.
+ * Fix problems resulting in failed compiles with gcc-2.95.
+ * Improve test suite.
+ * Minor bug fixes.
+
+Version 1.0.9 (2004-03-30)
+ * Add handling of AVR (Audio Visual Research) files.
+ * Improve handling of WAVEFORMATEXTENSIBLE WAV files.
+ * Fix for using pipes on Win32.
+
+Version 1.0.8 (2004-03-14)
+ * Correct peak chunk handing for files with > 16 tracks.
+ * Fix for WAV files with huge number of CUE chunks.
+
+Version 1.0.7 (2004-02-25)
+ * Fix clip mode detection on ia64, MIPS and other CPUs.
+ * Fix two MacOSX build problems.
+
+Version 1.0.6 (2004-02-08)
+ * Added support for native Win32 file access API (Ross Bencina).
+ * New mode to add clippling then a converting from float/double to integer
+ would otherwise wrap around.
+ * Fixed a bug in reading/writing files > 2Gig on Linux, Solaris and others.
+ * Many minor bug fixes.
+ * Other random fixes for Win32.
+
+Version 1.0.5 (2003-05-03)
+ * Added support for HTK files.
+ * Added new function sf_open_fd() to allow for secure opening of temporary
+ files as well as reading/writing sound files embedded within larger
+ container files.
+ * Added string support for AIFF files.
+ * Minor bug fixes and code cleanups.
+
+Version 1.0.4 (2003-02-02)
+ * Added suport of PVF and XI files.
+ * Added functionality for setting and retreiving strings from sound files.
+ * Minor code cleanups and bug fixes.
+
+Version 1.0.3 (2002-12-09)
+ * Minor bug fixes.
+
+Version 1.0.2 (2002-11-24)
+ * Added support for VOX ADPCM.
+ * Improved error reporting.
+ * Added version scripting on Linux and Solaris.
+ * Minor bug fixes.
+
+Version 1.0.1 (2002-09-14)
+ * Added MAT and MAT5 file formats.
+ * Minor bug fixes.
+
+Version 1.0.0 (2002-08-16)
+ * Final release for 1.0.0.
+
+Version 1.0.0rc6 (2002-08-14)
+ * Release candidate 6 for the 1.0.0 series.
+ * MacOS9 fixes.
+
+Version 1.0.0rc5 (2002-08-10)
+ * Release candidate 5 for the 1.0.0 series.
+ * Changed the definition of sf_count_t which was causing problems when
+ libsndfile was compiled with other libraries (ie WxWindows).
+ * Minor bug fixes.
+ * Documentation cleanup.
+
+Version 1.0.0rc4 (2002-08-03)
+ * Release candidate 4 for the 1.0.0 series.
+ * Minor bug fixes.
+ * Fix broken Win32 "make check".
+
+Version 1.0.0rc3 (2002-08-02)
+ * Release candidate 3 for the 1.0.0 series.
+ * Fix bug where libsndfile was reading beyond the end of the data chunk.
+ * Added on-the-fly header updates on write.
+ * Fix a couple of documentation issues.
+
+Version 1.0.0rc2 (2002-06-24)
+ * Release candidate 2 for the 1.0.0 series.
+ * Fix compile problem for Win32.
+
+Version 1.0.0rc1 (2002-06-24)
+ * Release candidate 1 for the 1.0.0 series.
+
+Version 0.0.28 (2002-04-27)
+ * Last offical release of 0.0.X series of the library.
+
+Version 0.0.8 (1999-02-16)
+ * First offical release.
diff --git a/libsndfile.64/dist/libsndfile-1.dll b/libsndfile.64/dist/libsndfile-1.dll
new file mode 100644
index 00000000..9817e8b0
--- /dev/null
+++ b/libsndfile.64/dist/libsndfile-1.dll
Binary files differ
diff --git a/libsndfile.64/include/sndfile.h b/libsndfile.64/include/sndfile.h
new file mode 100644
index 00000000..8a60fb09
--- /dev/null
+++ b/libsndfile.64/include/sndfile.h
@@ -0,0 +1,857 @@
+/*
+** Copyright (C) 1999-2016 Erik de Castro Lopo <erikd@mega-nerd.com>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU Lesser General Public License as published by
+** the Free Software Foundation; either version 2.1 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU Lesser General Public License for more details.
+**
+** You should have received a copy of the GNU Lesser General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+/*
+** sndfile.h -- system-wide definitions
+**
+** API documentation is in the doc/ directory of the source code tarball
+** and at http://www.mega-nerd.com/libsndfile/api.html.
+*/
+
+#ifndef SNDFILE_H
+#define SNDFILE_H
+
+/* This is the version 1.0.X header file. */
+#define SNDFILE_1
+
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* The following file types can be read and written.
+** A file type would consist of a major type (ie SF_FORMAT_WAV) bitwise
+** ORed with a minor type (ie SF_FORMAT_PCM). SF_FORMAT_TYPEMASK and
+** SF_FORMAT_SUBMASK can be used to separate the major and minor file
+** types.
+*/
+
+enum
+{ /* Major formats. */
+ SF_FORMAT_WAV = 0x010000, /* Microsoft WAV format (little endian default). */
+ SF_FORMAT_AIFF = 0x020000, /* Apple/SGI AIFF format (big endian). */
+ SF_FORMAT_AU = 0x030000, /* Sun/NeXT AU format (big endian). */
+ SF_FORMAT_RAW = 0x040000, /* RAW PCM data. */
+ SF_FORMAT_PAF = 0x050000, /* Ensoniq PARIS file format. */
+ SF_FORMAT_SVX = 0x060000, /* Amiga IFF / SVX8 / SV16 format. */
+ SF_FORMAT_NIST = 0x070000, /* Sphere NIST format. */
+ SF_FORMAT_VOC = 0x080000, /* VOC files. */
+ SF_FORMAT_IRCAM = 0x0A0000, /* Berkeley/IRCAM/CARL */
+ SF_FORMAT_W64 = 0x0B0000, /* Sonic Foundry's 64 bit RIFF/WAV */
+ SF_FORMAT_MAT4 = 0x0C0000, /* Matlab (tm) V4.2 / GNU Octave 2.0 */
+ SF_FORMAT_MAT5 = 0x0D0000, /* Matlab (tm) V5.0 / GNU Octave 2.1 */
+ SF_FORMAT_PVF = 0x0E0000, /* Portable Voice Format */
+ SF_FORMAT_XI = 0x0F0000, /* Fasttracker 2 Extended Instrument */
+ SF_FORMAT_HTK = 0x100000, /* HMM Tool Kit format */
+ SF_FORMAT_SDS = 0x110000, /* Midi Sample Dump Standard */
+ SF_FORMAT_AVR = 0x120000, /* Audio Visual Research */
+ SF_FORMAT_WAVEX = 0x130000, /* MS WAVE with WAVEFORMATEX */
+ SF_FORMAT_SD2 = 0x160000, /* Sound Designer 2 */
+ SF_FORMAT_FLAC = 0x170000, /* FLAC lossless file format */
+ SF_FORMAT_CAF = 0x180000, /* Core Audio File format */
+ SF_FORMAT_WVE = 0x190000, /* Psion WVE format */
+ SF_FORMAT_OGG = 0x200000, /* Xiph OGG container */
+ SF_FORMAT_MPC2K = 0x210000, /* Akai MPC 2000 sampler */
+ SF_FORMAT_RF64 = 0x220000, /* RF64 WAV file */
+
+ /* Subtypes from here on. */
+
+ SF_FORMAT_PCM_S8 = 0x0001, /* Signed 8 bit data */
+ SF_FORMAT_PCM_16 = 0x0002, /* Signed 16 bit data */
+ SF_FORMAT_PCM_24 = 0x0003, /* Signed 24 bit data */
+ SF_FORMAT_PCM_32 = 0x0004, /* Signed 32 bit data */
+
+ SF_FORMAT_PCM_U8 = 0x0005, /* Unsigned 8 bit data (WAV and RAW only) */
+
+ SF_FORMAT_FLOAT = 0x0006, /* 32 bit float data */
+ SF_FORMAT_DOUBLE = 0x0007, /* 64 bit float data */
+
+ SF_FORMAT_ULAW = 0x0010, /* U-Law encoded. */
+ SF_FORMAT_ALAW = 0x0011, /* A-Law encoded. */
+ SF_FORMAT_IMA_ADPCM = 0x0012, /* IMA ADPCM. */
+ SF_FORMAT_MS_ADPCM = 0x0013, /* Microsoft ADPCM. */
+
+ SF_FORMAT_GSM610 = 0x0020, /* GSM 6.10 encoding. */
+ SF_FORMAT_VOX_ADPCM = 0x0021, /* OKI / Dialogix ADPCM */
+
+ SF_FORMAT_G721_32 = 0x0030, /* 32kbs G721 ADPCM encoding. */
+ SF_FORMAT_G723_24 = 0x0031, /* 24kbs G723 ADPCM encoding. */
+ SF_FORMAT_G723_40 = 0x0032, /* 40kbs G723 ADPCM encoding. */
+
+ SF_FORMAT_DWVW_12 = 0x0040, /* 12 bit Delta Width Variable Word encoding. */
+ SF_FORMAT_DWVW_16 = 0x0041, /* 16 bit Delta Width Variable Word encoding. */
+ SF_FORMAT_DWVW_24 = 0x0042, /* 24 bit Delta Width Variable Word encoding. */
+ SF_FORMAT_DWVW_N = 0x0043, /* N bit Delta Width Variable Word encoding. */
+
+ SF_FORMAT_DPCM_8 = 0x0050, /* 8 bit differential PCM (XI only) */
+ SF_FORMAT_DPCM_16 = 0x0051, /* 16 bit differential PCM (XI only) */
+
+ SF_FORMAT_VORBIS = 0x0060, /* Xiph Vorbis encoding. */
+
+ SF_FORMAT_ALAC_16 = 0x0070, /* Apple Lossless Audio Codec (16 bit). */
+ SF_FORMAT_ALAC_20 = 0x0071, /* Apple Lossless Audio Codec (20 bit). */
+ SF_FORMAT_ALAC_24 = 0x0072, /* Apple Lossless Audio Codec (24 bit). */
+ SF_FORMAT_ALAC_32 = 0x0073, /* Apple Lossless Audio Codec (32 bit). */
+
+ /* Endian-ness options. */
+
+ SF_ENDIAN_FILE = 0x00000000, /* Default file endian-ness. */
+ SF_ENDIAN_LITTLE = 0x10000000, /* Force little endian-ness. */
+ SF_ENDIAN_BIG = 0x20000000, /* Force big endian-ness. */
+ SF_ENDIAN_CPU = 0x30000000, /* Force CPU endian-ness. */
+
+ SF_FORMAT_SUBMASK = 0x0000FFFF,
+ SF_FORMAT_TYPEMASK = 0x0FFF0000,
+ SF_FORMAT_ENDMASK = 0x30000000
+} ;
+
+/*
+** The following are the valid command numbers for the sf_command()
+** interface. The use of these commands is documented in the file
+** command.html in the doc directory of the source code distribution.
+*/
+
+enum
+{ SFC_GET_LIB_VERSION = 0x1000,
+ SFC_GET_LOG_INFO = 0x1001,
+ SFC_GET_CURRENT_SF_INFO = 0x1002,
+
+
+ SFC_GET_NORM_DOUBLE = 0x1010,
+ SFC_GET_NORM_FLOAT = 0x1011,
+ SFC_SET_NORM_DOUBLE = 0x1012,
+ SFC_SET_NORM_FLOAT = 0x1013,
+ SFC_SET_SCALE_FLOAT_INT_READ = 0x1014,
+ SFC_SET_SCALE_INT_FLOAT_WRITE = 0x1015,
+
+ SFC_GET_SIMPLE_FORMAT_COUNT = 0x1020,
+ SFC_GET_SIMPLE_FORMAT = 0x1021,
+
+ SFC_GET_FORMAT_INFO = 0x1028,
+
+ SFC_GET_FORMAT_MAJOR_COUNT = 0x1030,
+ SFC_GET_FORMAT_MAJOR = 0x1031,
+ SFC_GET_FORMAT_SUBTYPE_COUNT = 0x1032,
+ SFC_GET_FORMAT_SUBTYPE = 0x1033,
+
+ SFC_CALC_SIGNAL_MAX = 0x1040,
+ SFC_CALC_NORM_SIGNAL_MAX = 0x1041,
+ SFC_CALC_MAX_ALL_CHANNELS = 0x1042,
+ SFC_CALC_NORM_MAX_ALL_CHANNELS = 0x1043,
+ SFC_GET_SIGNAL_MAX = 0x1044,
+ SFC_GET_MAX_ALL_CHANNELS = 0x1045,
+
+ SFC_SET_ADD_PEAK_CHUNK = 0x1050,
+ SFC_SET_ADD_HEADER_PAD_CHUNK = 0x1051,
+
+ SFC_UPDATE_HEADER_NOW = 0x1060,
+ SFC_SET_UPDATE_HEADER_AUTO = 0x1061,
+
+ SFC_FILE_TRUNCATE = 0x1080,
+
+ SFC_SET_RAW_START_OFFSET = 0x1090,
+
+ SFC_SET_DITHER_ON_WRITE = 0x10A0,
+ SFC_SET_DITHER_ON_READ = 0x10A1,
+
+ SFC_GET_DITHER_INFO_COUNT = 0x10A2,
+ SFC_GET_DITHER_INFO = 0x10A3,
+
+ SFC_GET_EMBED_FILE_INFO = 0x10B0,
+
+ SFC_SET_CLIPPING = 0x10C0,
+ SFC_GET_CLIPPING = 0x10C1,
+
+ SFC_GET_CUE_COUNT = 0x10CD,
+ SFC_GET_CUE = 0x10CE,
+ SFC_SET_CUE = 0x10CF,
+
+ SFC_GET_INSTRUMENT = 0x10D0,
+ SFC_SET_INSTRUMENT = 0x10D1,
+
+ SFC_GET_LOOP_INFO = 0x10E0,
+
+ SFC_GET_BROADCAST_INFO = 0x10F0,
+ SFC_SET_BROADCAST_INFO = 0x10F1,
+
+ SFC_GET_CHANNEL_MAP_INFO = 0x1100,
+ SFC_SET_CHANNEL_MAP_INFO = 0x1101,
+
+ SFC_RAW_DATA_NEEDS_ENDSWAP = 0x1110,
+
+ /* Support for Wavex Ambisonics Format */
+ SFC_WAVEX_SET_AMBISONIC = 0x1200,
+ SFC_WAVEX_GET_AMBISONIC = 0x1201,
+
+ /*
+ ** RF64 files can be set so that on-close, writable files that have less
+ ** than 4GB of data in them are converted to RIFF/WAV, as per EBU
+ ** recommendations.
+ */
+ SFC_RF64_AUTO_DOWNGRADE = 0x1210,
+
+ SFC_SET_VBR_ENCODING_QUALITY = 0x1300,
+ SFC_SET_COMPRESSION_LEVEL = 0x1301,
+
+ /* Cart Chunk support */
+ SFC_SET_CART_INFO = 0x1400,
+ SFC_GET_CART_INFO = 0x1401,
+
+ /* Following commands for testing only. */
+ SFC_TEST_IEEE_FLOAT_REPLACE = 0x6001,
+
+ /*
+ ** SFC_SET_ADD_* values are deprecated and will disappear at some
+ ** time in the future. They are guaranteed to be here up to and
+ ** including version 1.0.8 to avoid breakage of existing software.
+ ** They currently do nothing and will continue to do nothing.
+ */
+ SFC_SET_ADD_DITHER_ON_WRITE = 0x1070,
+ SFC_SET_ADD_DITHER_ON_READ = 0x1071
+} ;
+
+
+/*
+** String types that can be set and read from files. Not all file types
+** support this and even the file types which support one, may not support
+** all string types.
+*/
+
+enum
+{ SF_STR_TITLE = 0x01,
+ SF_STR_COPYRIGHT = 0x02,
+ SF_STR_SOFTWARE = 0x03,
+ SF_STR_ARTIST = 0x04,
+ SF_STR_COMMENT = 0x05,
+ SF_STR_DATE = 0x06,
+ SF_STR_ALBUM = 0x07,
+ SF_STR_LICENSE = 0x08,
+ SF_STR_TRACKNUMBER = 0x09,
+ SF_STR_GENRE = 0x10
+} ;
+
+/*
+** Use the following as the start and end index when doing metadata
+** transcoding.
+*/
+
+#define SF_STR_FIRST SF_STR_TITLE
+#define SF_STR_LAST SF_STR_GENRE
+
+enum
+{ /* True and false */
+ SF_FALSE = 0,
+ SF_TRUE = 1,
+
+ /* Modes for opening files. */
+ SFM_READ = 0x10,
+ SFM_WRITE = 0x20,
+ SFM_RDWR = 0x30,
+
+ SF_AMBISONIC_NONE = 0x40,
+ SF_AMBISONIC_B_FORMAT = 0x41
+} ;
+
+/* Public error values. These are guaranteed to remain unchanged for the duration
+** of the library major version number.
+** There are also a large number of private error numbers which are internal to
+** the library which can change at any time.
+*/
+
+enum
+{ SF_ERR_NO_ERROR = 0,
+ SF_ERR_UNRECOGNISED_FORMAT = 1,
+ SF_ERR_SYSTEM = 2,
+ SF_ERR_MALFORMED_FILE = 3,
+ SF_ERR_UNSUPPORTED_ENCODING = 4
+} ;
+
+
+/* Channel map values (used with SFC_SET/GET_CHANNEL_MAP).
+*/
+
+enum
+{ SF_CHANNEL_MAP_INVALID = 0,
+ SF_CHANNEL_MAP_MONO = 1,
+ SF_CHANNEL_MAP_LEFT, /* Apple calls this 'Left' */
+ SF_CHANNEL_MAP_RIGHT, /* Apple calls this 'Right' */
+ SF_CHANNEL_MAP_CENTER, /* Apple calls this 'Center' */
+ SF_CHANNEL_MAP_FRONT_LEFT,
+ SF_CHANNEL_MAP_FRONT_RIGHT,
+ SF_CHANNEL_MAP_FRONT_CENTER,
+ SF_CHANNEL_MAP_REAR_CENTER, /* Apple calls this 'Center Surround', Msft calls this 'Back Center' */
+ SF_CHANNEL_MAP_REAR_LEFT, /* Apple calls this 'Left Surround', Msft calls this 'Back Left' */
+ SF_CHANNEL_MAP_REAR_RIGHT, /* Apple calls this 'Right Surround', Msft calls this 'Back Right' */
+ SF_CHANNEL_MAP_LFE, /* Apple calls this 'LFEScreen', Msft calls this 'Low Frequency' */
+ SF_CHANNEL_MAP_FRONT_LEFT_OF_CENTER, /* Apple calls this 'Left Center' */
+ SF_CHANNEL_MAP_FRONT_RIGHT_OF_CENTER, /* Apple calls this 'Right Center */
+ SF_CHANNEL_MAP_SIDE_LEFT, /* Apple calls this 'Left Surround Direct' */
+ SF_CHANNEL_MAP_SIDE_RIGHT, /* Apple calls this 'Right Surround Direct' */
+ SF_CHANNEL_MAP_TOP_CENTER, /* Apple calls this 'Top Center Surround' */
+ SF_CHANNEL_MAP_TOP_FRONT_LEFT, /* Apple calls this 'Vertical Height Left' */
+ SF_CHANNEL_MAP_TOP_FRONT_RIGHT, /* Apple calls this 'Vertical Height Right' */
+ SF_CHANNEL_MAP_TOP_FRONT_CENTER, /* Apple calls this 'Vertical Height Center' */
+ SF_CHANNEL_MAP_TOP_REAR_LEFT, /* Apple and MS call this 'Top Back Left' */
+ SF_CHANNEL_MAP_TOP_REAR_RIGHT, /* Apple and MS call this 'Top Back Right' */
+ SF_CHANNEL_MAP_TOP_REAR_CENTER, /* Apple and MS call this 'Top Back Center' */
+
+ SF_CHANNEL_MAP_AMBISONIC_B_W,
+ SF_CHANNEL_MAP_AMBISONIC_B_X,
+ SF_CHANNEL_MAP_AMBISONIC_B_Y,
+ SF_CHANNEL_MAP_AMBISONIC_B_Z,
+
+ SF_CHANNEL_MAP_MAX
+} ;
+
+
+/* A SNDFILE* pointer can be passed around much like stdio.h's FILE* pointer. */
+
+typedef struct SNDFILE_tag SNDFILE ;
+
+/* The following typedef is system specific and is defined when libsndfile is
+** compiled. sf_count_t will be a 64 bit value when the underlying OS allows
+** 64 bit file offsets.
+** On windows, we need to allow the same header file to be compiler by both GCC
+** and the Microsoft compiler.
+*/
+
+#if (defined (_MSCVER) || defined (_MSC_VER) && (_MSC_VER < 1310))
+typedef __int64 sf_count_t ;
+#define SF_COUNT_MAX 0x7fffffffffffffffi64
+#else
+typedef __int64 sf_count_t ;
+#define SF_COUNT_MAX 0x7FFFFFFFFFFFFFFFLL
+#endif
+
+
+/* A pointer to a SF_INFO structure is passed to sf_open () and filled in.
+** On write, the SF_INFO structure is filled in by the user and passed into
+** sf_open ().
+*/
+
+struct SF_INFO
+{ sf_count_t frames ; /* Used to be called samples. Changed to avoid confusion. */
+ int samplerate ;
+ int channels ;
+ int format ;
+ int sections ;
+ int seekable ;
+} ;
+
+typedef struct SF_INFO SF_INFO ;
+
+/* The SF_FORMAT_INFO struct is used to retrieve information about the sound
+** file formats libsndfile supports using the sf_command () interface.
+**
+** Using this interface will allow applications to support new file formats
+** and encoding types when libsndfile is upgraded, without requiring
+** re-compilation of the application.
+**
+** Please consult the libsndfile documentation (particularly the information
+** on the sf_command () interface) for examples of its use.
+*/
+
+typedef struct
+{ int format ;
+ const char *name ;
+ const char *extension ;
+} SF_FORMAT_INFO ;
+
+/*
+** Enums and typedefs for adding dither on read and write.
+** See the html documentation for sf_command(), SFC_SET_DITHER_ON_WRITE
+** and SFC_SET_DITHER_ON_READ.
+*/
+
+enum
+{ SFD_DEFAULT_LEVEL = 0,
+ SFD_CUSTOM_LEVEL = 0x40000000,
+
+ SFD_NO_DITHER = 500,
+ SFD_WHITE = 501,
+ SFD_TRIANGULAR_PDF = 502
+} ;
+
+typedef struct
+{ int type ;
+ double level ;
+ const char *name ;
+} SF_DITHER_INFO ;
+
+/* Struct used to retrieve information about a file embedded within a
+** larger file. See SFC_GET_EMBED_FILE_INFO.
+*/
+
+typedef struct
+{ sf_count_t offset ;
+ sf_count_t length ;
+} SF_EMBED_FILE_INFO ;
+
+/*
+** Struct used to retrieve cue marker information from a file
+*/
+
+typedef struct
+{ int32_t indx ;
+ uint32_t position ;
+ int32_t fcc_chunk ;
+ int32_t chunk_start ;
+ int32_t block_start ;
+ uint32_t sample_offset ;
+ char name [256] ;
+} SF_CUE_POINT ;
+
+#define SF_CUES_VAR(count) \
+ struct \
+ { uint32_t cue_count ; \
+ SF_CUE_POINT cue_points [count] ; \
+ }
+
+typedef SF_CUES_VAR (100) SF_CUES ;
+
+/*
+** Structs used to retrieve music sample information from a file.
+*/
+
+enum
+{ /*
+ ** The loop mode field in SF_INSTRUMENT will be one of the following.
+ */
+ SF_LOOP_NONE = 800,
+ SF_LOOP_FORWARD,
+ SF_LOOP_BACKWARD,
+ SF_LOOP_ALTERNATING
+} ;
+
+typedef struct
+{ int gain ;
+ char basenote, detune ;
+ char velocity_lo, velocity_hi ;
+ char key_lo, key_hi ;
+ int loop_count ;
+
+ struct
+ { int mode ;
+ uint32_t start ;
+ uint32_t end ;
+ uint32_t count ;
+ } loops [16] ; /* make variable in a sensible way */
+} SF_INSTRUMENT ;
+
+
+
+/* Struct used to retrieve loop information from a file.*/
+typedef struct
+{
+ short time_sig_num ; /* any positive integer > 0 */
+ short time_sig_den ; /* any positive power of 2 > 0 */
+ int loop_mode ; /* see SF_LOOP enum */
+
+ int num_beats ; /* this is NOT the amount of quarter notes !!!*/
+ /* a full bar of 4/4 is 4 beats */
+ /* a full bar of 7/8 is 7 beats */
+
+ float bpm ; /* suggestion, as it can be calculated using other fields:*/
+ /* file's length, file's sampleRate and our time_sig_den*/
+ /* -> bpms are always the amount of _quarter notes_ per minute */
+
+ int root_key ; /* MIDI note, or -1 for None */
+ int future [6] ;
+} SF_LOOP_INFO ;
+
+
+/* Struct used to retrieve broadcast (EBU) information from a file.
+** Strongly (!) based on EBU "bext" chunk format used in Broadcast WAVE.
+*/
+#define SF_BROADCAST_INFO_VAR(coding_hist_size) \
+ struct \
+ { char description [256] ; \
+ char originator [32] ; \
+ char originator_reference [32] ; \
+ char origination_date [10] ; \
+ char origination_time [8] ; \
+ uint32_t time_reference_low ; \
+ uint32_t time_reference_high ; \
+ short version ; \
+ char umid [64] ; \
+ char reserved [190] ; \
+ uint32_t coding_history_size ; \
+ char coding_history [coding_hist_size] ; \
+ }
+
+/* SF_BROADCAST_INFO is the above struct with coding_history field of 256 bytes. */
+typedef SF_BROADCAST_INFO_VAR (256) SF_BROADCAST_INFO ;
+
+struct SF_CART_TIMER
+{ char usage [4] ;
+ int32_t value ;
+} ;
+
+typedef struct SF_CART_TIMER SF_CART_TIMER ;
+
+#define SF_CART_INFO_VAR(p_tag_text_size) \
+ struct \
+ { char version [4] ; \
+ char title [64] ; \
+ char artist [64] ; \
+ char cut_id [64] ; \
+ char client_id [64] ; \
+ char category [64] ; \
+ char classification [64] ; \
+ char out_cue [64] ; \
+ char start_date [10] ; \
+ char start_time [8] ; \
+ char end_date [10] ; \
+ char end_time [8] ; \
+ char producer_app_id [64] ; \
+ char producer_app_version [64] ; \
+ char user_def [64] ; \
+ int32_t level_reference ; \
+ SF_CART_TIMER post_timers [8] ; \
+ char reserved [276] ; \
+ char url [1024] ; \
+ uint32_t tag_text_size ; \
+ char tag_text [p_tag_text_size] ; \
+ }
+
+typedef SF_CART_INFO_VAR (256) SF_CART_INFO ;
+
+/* Virtual I/O functionality. */
+
+typedef sf_count_t (*sf_vio_get_filelen) (void *user_data) ;
+typedef sf_count_t (*sf_vio_seek) (sf_count_t offset, int whence, void *user_data) ;
+typedef sf_count_t (*sf_vio_read) (void *ptr, sf_count_t count, void *user_data) ;
+typedef sf_count_t (*sf_vio_write) (const void *ptr, sf_count_t count, void *user_data) ;
+typedef sf_count_t (*sf_vio_tell) (void *user_data) ;
+
+struct SF_VIRTUAL_IO
+{ sf_vio_get_filelen get_filelen ;
+ sf_vio_seek seek ;
+ sf_vio_read read ;
+ sf_vio_write write ;
+ sf_vio_tell tell ;
+} ;
+
+typedef struct SF_VIRTUAL_IO SF_VIRTUAL_IO ;
+
+
+/* Open the specified file for read, write or both. On error, this will
+** return a NULL pointer. To find the error number, pass a NULL SNDFILE
+** to sf_strerror ().
+** All calls to sf_open() should be matched with a call to sf_close().
+*/
+
+SNDFILE* sf_open (const char *path, int mode, SF_INFO *sfinfo) ;
+
+
+/* Use the existing file descriptor to create a SNDFILE object. If close_desc
+** is TRUE, the file descriptor will be closed when sf_close() is called. If
+** it is FALSE, the descriptor will not be closed.
+** When passed a descriptor like this, the library will assume that the start
+** of file header is at the current file offset. This allows sound files within
+** larger container files to be read and/or written.
+** On error, this will return a NULL pointer. To find the error number, pass a
+** NULL SNDFILE to sf_strerror ().
+** All calls to sf_open_fd() should be matched with a call to sf_close().
+
+*/
+
+SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
+
+SNDFILE* sf_open_virtual (SF_VIRTUAL_IO *sfvirtual, int mode, SF_INFO *sfinfo, void *user_data) ;
+
+
+/* sf_error () returns a error number which can be translated to a text
+** string using sf_error_number().
+*/
+
+int sf_error (SNDFILE *sndfile) ;
+
+
+/* sf_strerror () returns to the caller a pointer to the current error message for
+** the given SNDFILE.
+*/
+
+const char* sf_strerror (SNDFILE *sndfile) ;
+
+
+/* sf_error_number () allows the retrieval of the error string for each internal
+** error number.
+**
+*/
+
+const char* sf_error_number (int errnum) ;
+
+
+/* The following two error functions are deprecated but they will remain in the
+** library for the foreseeable future. The function sf_strerror() should be used
+** in their place.
+*/
+
+int sf_perror (SNDFILE *sndfile) ;
+int sf_error_str (SNDFILE *sndfile, char* str, size_t len) ;
+
+
+/* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
+
+int sf_command (SNDFILE *sndfile, int command, void *data, int datasize) ;
+
+
+/* Return TRUE if fields of the SF_INFO struct are a valid combination of values. */
+
+int sf_format_check (const SF_INFO *info) ;
+
+
+/* Seek within the waveform data chunk of the SNDFILE. sf_seek () uses
+** the same values for whence (SEEK_SET, SEEK_CUR and SEEK_END) as
+** stdio.h function fseek ().
+** An offset of zero with whence set to SEEK_SET will position the
+** read / write pointer to the first data sample.
+** On success sf_seek returns the current position in (multi-channel)
+** samples from the start of the file.
+** Please see the libsndfile documentation for moving the read pointer
+** separately from the write pointer on files open in mode SFM_RDWR.
+** On error all of these functions return -1.
+*/
+
+enum
+{ SF_SEEK_SET = SEEK_SET,
+ SF_SEEK_CUR = SEEK_CUR,
+ SF_SEEK_END = SEEK_END
+} ;
+
+sf_count_t sf_seek (SNDFILE *sndfile, sf_count_t frames, int whence) ;
+
+
+/* Functions for retrieving and setting string data within sound files.
+** Not all file types support this features; AIFF and WAV do. For both
+** functions, the str_type parameter must be one of the SF_STR_* values
+** defined above.
+** On error, sf_set_string() returns non-zero while sf_get_string()
+** returns NULL.
+*/
+
+int sf_set_string (SNDFILE *sndfile, int str_type, const char* str) ;
+
+const char* sf_get_string (SNDFILE *sndfile, int str_type) ;
+
+
+/* Return the library version string. */
+
+const char * sf_version_string (void) ;
+
+/* Return the current byterate at this point in the file. The byte rate in this
+** case is the number of bytes per second of audio data. For instance, for a
+** stereo, 18 bit PCM encoded file with an 16kHz sample rate, the byte rate
+** would be 2 (stereo) * 2 (two bytes per sample) * 16000 => 64000 bytes/sec.
+** For some file formats the returned value will be accurate and exact, for some
+** it will be a close approximation, for some it will be the average bitrate for
+** the whole file and for some it will be a time varying value that was accurate
+** when the file was most recently read or written.
+** To get the bitrate, multiple this value by 8.
+** Returns -1 for unknown.
+*/
+int sf_current_byterate (SNDFILE *sndfile) ;
+
+/* Functions for reading/writing the waveform data of a sound file.
+*/
+
+sf_count_t sf_read_raw (SNDFILE *sndfile, void *ptr, sf_count_t bytes) ;
+sf_count_t sf_write_raw (SNDFILE *sndfile, const void *ptr, sf_count_t bytes) ;
+
+
+/* Functions for reading and writing the data chunk in terms of frames.
+** The number of items actually read/written = frames * number of channels.
+** sf_xxxx_raw read/writes the raw data bytes from/to the file
+** sf_xxxx_short passes data in the native short format
+** sf_xxxx_int passes data in the native int format
+** sf_xxxx_float passes data in the native float format
+** sf_xxxx_double passes data in the native double format
+** All of these read/write function return number of frames read/written.
+*/
+
+sf_count_t sf_readf_short (SNDFILE *sndfile, short *ptr, sf_count_t frames) ;
+sf_count_t sf_writef_short (SNDFILE *sndfile, const short *ptr, sf_count_t frames) ;
+
+sf_count_t sf_readf_int (SNDFILE *sndfile, int *ptr, sf_count_t frames) ;
+sf_count_t sf_writef_int (SNDFILE *sndfile, const int *ptr, sf_count_t frames) ;
+
+sf_count_t sf_readf_float (SNDFILE *sndfile, float *ptr, sf_count_t frames) ;
+sf_count_t sf_writef_float (SNDFILE *sndfile, const float *ptr, sf_count_t frames) ;
+
+sf_count_t sf_readf_double (SNDFILE *sndfile, double *ptr, sf_count_t frames) ;
+sf_count_t sf_writef_double (SNDFILE *sndfile, const double *ptr, sf_count_t frames) ;
+
+
+/* Functions for reading and writing the data chunk in terms of items.
+** Otherwise similar to above.
+** All of these read/write function return number of items read/written.
+*/
+
+sf_count_t sf_read_short (SNDFILE *sndfile, short *ptr, sf_count_t items) ;
+sf_count_t sf_write_short (SNDFILE *sndfile, const short *ptr, sf_count_t items) ;
+
+sf_count_t sf_read_int (SNDFILE *sndfile, int *ptr, sf_count_t items) ;
+sf_count_t sf_write_int (SNDFILE *sndfile, const int *ptr, sf_count_t items) ;
+
+sf_count_t sf_read_float (SNDFILE *sndfile, float *ptr, sf_count_t items) ;
+sf_count_t sf_write_float (SNDFILE *sndfile, const float *ptr, sf_count_t items) ;
+
+sf_count_t sf_read_double (SNDFILE *sndfile, double *ptr, sf_count_t items) ;
+sf_count_t sf_write_double (SNDFILE *sndfile, const double *ptr, sf_count_t items) ;
+
+
+/* Close the SNDFILE and clean up all memory allocations associated with this
+** file.
+** Returns 0 on success, or an error number.
+*/
+
+int sf_close (SNDFILE *sndfile) ;
+
+
+/* If the file is opened SFM_WRITE or SFM_RDWR, call fsync() on the file
+** to force the writing of data to disk. If the file is opened SFM_READ
+** no action is taken.
+*/
+
+void sf_write_sync (SNDFILE *sndfile) ;
+
+
+
+/* The function sf_wchar_open() is Windows Only!
+** Open a file passing in a Windows Unicode filename. Otherwise, this is
+** the same as sf_open().
+**
+** In order for this to work, you need to do the following:
+**
+** #include <windows.h>
+** #define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
+** #including <sndfile.h>
+*/
+
+#if (defined (ENABLE_SNDFILE_WINDOWS_PROTOTYPES) && ENABLE_SNDFILE_WINDOWS_PROTOTYPES)
+SNDFILE* sf_wchar_open (LPCWSTR wpath, int mode, SF_INFO *sfinfo) ;
+#endif
+
+
+
+
+/* Getting and setting of chunks from within a sound file.
+**
+** These functions allow the getting and setting of chunks within a sound file
+** (for those formats which allow it).
+**
+** These functions fail safely. Specifically, they will not allow you to overwrite
+** existing chunks or add extra versions of format specific reserved chunks but
+** should allow you to retrieve any and all chunks (may not be implemented for
+** all chunks or all file formats).
+*/
+
+struct SF_CHUNK_INFO
+{ char id [64] ; /* The chunk identifier. */
+ unsigned id_size ; /* The size of the chunk identifier. */
+ unsigned datalen ; /* The size of that data. */
+ void *data ; /* Pointer to the data. */
+} ;
+
+typedef struct SF_CHUNK_INFO SF_CHUNK_INFO ;
+
+/* Set the specified chunk info (must be done before any audio data is written
+** to the file). This will fail for format specific reserved chunks.
+** The chunk_info->data pointer must be valid until the file is closed.
+** Returns SF_ERR_NO_ERROR on success or non-zero on failure.
+*/
+int sf_set_chunk (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
+
+/*
+** An opaque structure to an iterator over the all chunks of a given id
+*/
+typedef struct SF_CHUNK_ITERATOR SF_CHUNK_ITERATOR ;
+
+/* Get an iterator for all chunks matching chunk_info.
+** The iterator will point to the first chunk matching chunk_info.
+** Chunks are matching, if (chunk_info->id) matches the first
+** (chunk_info->id_size) bytes of a chunk found in the SNDFILE* handle.
+** If chunk_info is NULL, an iterator to all chunks in the SNDFILE* handle
+** is returned.
+** The values of chunk_info->datalen and chunk_info->data are ignored.
+** If no matching chunks are found in the sndfile, NULL is returned.
+** The returned iterator will stay valid until one of the following occurs:
+** a) The sndfile is closed.
+** b) A new chunk is added using sf_set_chunk().
+** c) Another chunk iterator function is called on the same SNDFILE* handle
+** that causes the iterator to be modified.
+** The memory for the iterator belongs to the SNDFILE* handle and is freed when
+** sf_close() is called.
+*/
+SF_CHUNK_ITERATOR *
+sf_get_chunk_iterator (SNDFILE * sndfile, const SF_CHUNK_INFO * chunk_info) ;
+
+/* Iterate through chunks by incrementing the iterator.
+** Increments the iterator and returns a handle to the new one.
+** After this call, iterator will no longer be valid, and you must use the
+** newly returned handle from now on.
+** The returned handle can be used to access the next chunk matching
+** the criteria as defined in sf_get_chunk_iterator().
+** If iterator points to the last chunk, this will free all resources
+** associated with iterator and return NULL.
+** The returned iterator will stay valid until sf_get_chunk_iterator_next
+** is called again, the sndfile is closed or a new chunk us added.
+*/
+SF_CHUNK_ITERATOR *
+sf_next_chunk_iterator (SF_CHUNK_ITERATOR * iterator) ;
+
+
+/* Get the size of the specified chunk.
+** If the specified chunk exists, the size will be returned in the
+** datalen field of the SF_CHUNK_INFO struct.
+** Additionally, the id of the chunk will be copied to the id
+** field of the SF_CHUNK_INFO struct and it's id_size field will
+** be updated accordingly.
+** If the chunk doesn't exist chunk_info->datalen will be zero, and the
+** id and id_size fields will be undefined.
+** The function will return SF_ERR_NO_ERROR on success or non-zero on
+** failure.
+*/
+int
+sf_get_chunk_size (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
+
+/* Get the specified chunk data.
+** If the specified chunk exists, up to chunk_info->datalen bytes of
+** the chunk data will be copied into the chunk_info->data buffer
+** (allocated by the caller) and the chunk_info->datalen field
+** updated to reflect the size of the data. The id and id_size
+** field will be updated according to the retrieved chunk
+** If the chunk doesn't exist chunk_info->datalen will be zero, and the
+** id and id_size fields will be undefined.
+** The function will return SF_ERR_NO_ERROR on success or non-zero on
+** failure.
+*/
+int
+sf_get_chunk_data (const SF_CHUNK_ITERATOR * it, SF_CHUNK_INFO * chunk_info) ;
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* SNDFILE_H */
+
diff --git a/libsndfile.64/include/sndfile.hh b/libsndfile.64/include/sndfile.hh
new file mode 100644
index 00000000..0e1c1c20
--- /dev/null
+++ b/libsndfile.64/include/sndfile.hh
@@ -0,0 +1,446 @@
+/*
+** Copyright (C) 2005-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
+**
+** All rights reserved.
+**
+** Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the author nor the names of any contributors may be used
+** to endorse or promote products derived from this software without
+** specific prior written permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+** TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+** PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+** CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+** EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+** PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+** OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+** OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+** ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+** The above modified BSD style license (GPL and LGPL compatible) applies to
+** this file. It does not apply to libsndfile itself which is released under
+** the GNU LGPL or the libsndfile test suite which is released under the GNU
+** GPL.
+** This means that this header file can be used under this modified BSD style
+** license, but the LGPL still holds for the libsndfile library itself.
+*/
+
+/*
+** sndfile.hh -- A lightweight C++ wrapper for the libsndfile API.
+**
+** All the methods are inlines and all functionality is contained in this
+** file. There is no separate implementation file.
+**
+** API documentation is in the doc/ directory of the source code tarball
+** and at http://www.mega-nerd.com/libsndfile/api.html.
+*/
+
+#ifndef SNDFILE_HH
+#define SNDFILE_HH
+
+#include <sndfile.h>
+
+#include <string>
+#include <new> // for std::nothrow
+
+class SndfileHandle
+{ private :
+ struct SNDFILE_ref
+ { SNDFILE_ref (void) ;
+ ~SNDFILE_ref (void) ;
+
+ SNDFILE *sf ;
+ SF_INFO sfinfo ;
+ int ref ;
+ } ;
+
+ SNDFILE_ref *p ;
+
+ public :
+ /* Default constructor */
+ SndfileHandle (void) : p (NULL) {} ;
+ SndfileHandle (const char *path, int mode = SFM_READ,
+ int format = 0, int channels = 0, int samplerate = 0) ;
+ SndfileHandle (std::string const & path, int mode = SFM_READ,
+ int format = 0, int channels = 0, int samplerate = 0) ;
+ SndfileHandle (int fd, bool close_desc, int mode = SFM_READ,
+ int format = 0, int channels = 0, int samplerate = 0) ;
+ SndfileHandle (SF_VIRTUAL_IO &sfvirtual, void *user_data, int mode = SFM_READ,
+ int format = 0, int channels = 0, int samplerate = 0) ;
+
+#ifdef ENABLE_SNDFILE_WINDOWS_PROTOTYPES
+ SndfileHandle (LPCWSTR wpath, int mode = SFM_READ,
+ int format = 0, int channels = 0, int samplerate = 0) ;
+#endif
+
+ ~SndfileHandle (void) ;
+
+ SndfileHandle (const SndfileHandle &orig) ;
+ SndfileHandle & operator = (const SndfileHandle &rhs) ;
+
+ /* Mainly for debugging/testing. */
+ int refCount (void) const { return (p == NULL) ? 0 : p->ref ; }
+
+ operator bool () const { return (p != NULL) ; }
+
+ bool operator == (const SndfileHandle &rhs) const { return (p == rhs.p) ; }
+
+ sf_count_t frames (void) const { return p ? p->sfinfo.frames : 0 ; }
+ int format (void) const { return p ? p->sfinfo.format : 0 ; }
+ int channels (void) const { return p ? p->sfinfo.channels : 0 ; }
+ int samplerate (void) const { return p ? p->sfinfo.samplerate : 0 ; }
+
+ int error (void) const ;
+ const char * strError (void) const ;
+
+ int command (int cmd, void *data, int datasize) ;
+
+ sf_count_t seek (sf_count_t frames, int whence) ;
+
+ void writeSync (void) ;
+
+ int setString (int str_type, const char* str) ;
+
+ const char* getString (int str_type) const ;
+
+ static int formatCheck (int format, int channels, int samplerate) ;
+
+ sf_count_t read (short *ptr, sf_count_t items) ;
+ sf_count_t read (int *ptr, sf_count_t items) ;
+ sf_count_t read (float *ptr, sf_count_t items) ;
+ sf_count_t read (double *ptr, sf_count_t items) ;
+
+ sf_count_t write (const short *ptr, sf_count_t items) ;
+ sf_count_t write (const int *ptr, sf_count_t items) ;
+ sf_count_t write (const float *ptr, sf_count_t items) ;
+ sf_count_t write (const double *ptr, sf_count_t items) ;
+
+ sf_count_t readf (short *ptr, sf_count_t frames) ;
+ sf_count_t readf (int *ptr, sf_count_t frames) ;
+ sf_count_t readf (float *ptr, sf_count_t frames) ;
+ sf_count_t readf (double *ptr, sf_count_t frames) ;
+
+ sf_count_t writef (const short *ptr, sf_count_t frames) ;
+ sf_count_t writef (const int *ptr, sf_count_t frames) ;
+ sf_count_t writef (const float *ptr, sf_count_t frames) ;
+ sf_count_t writef (const double *ptr, sf_count_t frames) ;
+
+ sf_count_t readRaw (void *ptr, sf_count_t bytes) ;
+ sf_count_t writeRaw (const void *ptr, sf_count_t bytes) ;
+
+ /**< Raw access to the handle. SndfileHandle keeps ownership. */
+ SNDFILE * rawHandle (void) ;
+
+ /**< Take ownership of handle, if reference count is 1. */
+ SNDFILE * takeOwnership (void) ;
+} ;
+
+/*==============================================================================
+** Nothing but implementation below.
+*/
+
+inline
+SndfileHandle::SNDFILE_ref::SNDFILE_ref (void)
+: sf (NULL), sfinfo (), ref (1)
+{}
+
+inline
+SndfileHandle::SNDFILE_ref::~SNDFILE_ref (void)
+{ if (sf != NULL) sf_close (sf) ; }
+
+inline
+SndfileHandle::SndfileHandle (const char *path, int mode, int fmt, int chans, int srate)
+: p (NULL)
+{
+ p = new (std::nothrow) SNDFILE_ref () ;
+
+ if (p != NULL)
+ { p->ref = 1 ;
+
+ p->sfinfo.frames = 0 ;
+ p->sfinfo.channels = chans ;
+ p->sfinfo.format = fmt ;
+ p->sfinfo.samplerate = srate ;
+ p->sfinfo.sections = 0 ;
+ p->sfinfo.seekable = 0 ;
+
+ p->sf = sf_open (path, mode, &p->sfinfo) ;
+ } ;
+
+ return ;
+} /* SndfileHandle const char * constructor */
+
+inline
+SndfileHandle::SndfileHandle (std::string const & path, int mode, int fmt, int chans, int srate)
+: p (NULL)
+{
+ p = new (std::nothrow) SNDFILE_ref () ;
+
+ if (p != NULL)
+ { p->ref = 1 ;
+
+ p->sfinfo.frames = 0 ;
+ p->sfinfo.channels = chans ;
+ p->sfinfo.format = fmt ;
+ p->sfinfo.samplerate = srate ;
+ p->sfinfo.sections = 0 ;
+ p->sfinfo.seekable = 0 ;
+
+ p->sf = sf_open (path.c_str (), mode, &p->sfinfo) ;
+ } ;
+
+ return ;
+} /* SndfileHandle std::string constructor */
+
+inline
+SndfileHandle::SndfileHandle (int fd, bool close_desc, int mode, int fmt, int chans, int srate)
+: p (NULL)
+{
+ if (fd < 0)
+ return ;
+
+ p = new (std::nothrow) SNDFILE_ref () ;
+
+ if (p != NULL)
+ { p->ref = 1 ;
+
+ p->sfinfo.frames = 0 ;
+ p->sfinfo.channels = chans ;
+ p->sfinfo.format = fmt ;
+ p->sfinfo.samplerate = srate ;
+ p->sfinfo.sections = 0 ;
+ p->sfinfo.seekable = 0 ;
+
+ p->sf = sf_open_fd (fd, mode, &p->sfinfo, close_desc) ;
+ } ;
+
+ return ;
+} /* SndfileHandle fd constructor */
+
+inline
+SndfileHandle::SndfileHandle (SF_VIRTUAL_IO &sfvirtual, void *user_data, int mode, int fmt, int chans, int srate)
+: p (NULL)
+{
+ p = new (std::nothrow) SNDFILE_ref () ;
+
+ if (p != NULL)
+ { p->ref = 1 ;
+
+ p->sfinfo.frames = 0 ;
+ p->sfinfo.channels = chans ;
+ p->sfinfo.format = fmt ;
+ p->sfinfo.samplerate = srate ;
+ p->sfinfo.sections = 0 ;
+ p->sfinfo.seekable = 0 ;
+
+ p->sf = sf_open_virtual (&sfvirtual, mode, &p->sfinfo, user_data) ;
+ } ;
+
+ return ;
+} /* SndfileHandle std::string constructor */
+
+inline
+SndfileHandle::~SndfileHandle (void)
+{ if (p != NULL && --p->ref == 0)
+ delete p ;
+} /* SndfileHandle destructor */
+
+
+inline
+SndfileHandle::SndfileHandle (const SndfileHandle &orig)
+: p (orig.p)
+{ if (p != NULL)
+ ++p->ref ;
+} /* SndfileHandle copy constructor */
+
+inline SndfileHandle &
+SndfileHandle::operator = (const SndfileHandle &rhs)
+{
+ if (&rhs == this)
+ return *this ;
+ if (p != NULL && --p->ref == 0)
+ delete p ;
+
+ p = rhs.p ;
+ if (p != NULL)
+ ++p->ref ;
+
+ return *this ;
+} /* SndfileHandle assignment operator */
+
+inline int
+SndfileHandle::error (void) const
+{ return sf_error (p->sf) ; }
+
+inline const char *
+SndfileHandle::strError (void) const
+{ return sf_strerror (p->sf) ; }
+
+inline int
+SndfileHandle::command (int cmd, void *data, int datasize)
+{ return sf_command (p->sf, cmd, data, datasize) ; }
+
+inline sf_count_t
+SndfileHandle::seek (sf_count_t frame_count, int whence)
+{ return sf_seek (p->sf, frame_count, whence) ; }
+
+inline void
+SndfileHandle::writeSync (void)
+{ sf_write_sync (p->sf) ; }
+
+inline int
+SndfileHandle::setString (int str_type, const char* str)
+{ return sf_set_string (p->sf, str_type, str) ; }
+
+inline const char*
+SndfileHandle::getString (int str_type) const
+{ return sf_get_string (p->sf, str_type) ; }
+
+inline int
+SndfileHandle::formatCheck (int fmt, int chans, int srate)
+{
+ SF_INFO sfinfo ;
+
+ sfinfo.frames = 0 ;
+ sfinfo.channels = chans ;
+ sfinfo.format = fmt ;
+ sfinfo.samplerate = srate ;
+ sfinfo.sections = 0 ;
+ sfinfo.seekable = 0 ;
+
+ return sf_format_check (&sfinfo) ;
+}
+
+/*---------------------------------------------------------------------*/
+
+inline sf_count_t
+SndfileHandle::read (short *ptr, sf_count_t items)
+{ return sf_read_short (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::read (int *ptr, sf_count_t items)
+{ return sf_read_int (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::read (float *ptr, sf_count_t items)
+{ return sf_read_float (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::read (double *ptr, sf_count_t items)
+{ return sf_read_double (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::write (const short *ptr, sf_count_t items)
+{ return sf_write_short (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::write (const int *ptr, sf_count_t items)
+{ return sf_write_int (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::write (const float *ptr, sf_count_t items)
+{ return sf_write_float (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::write (const double *ptr, sf_count_t items)
+{ return sf_write_double (p->sf, ptr, items) ; }
+
+inline sf_count_t
+SndfileHandle::readf (short *ptr, sf_count_t frame_count)
+{ return sf_readf_short (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::readf (int *ptr, sf_count_t frame_count)
+{ return sf_readf_int (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::readf (float *ptr, sf_count_t frame_count)
+{ return sf_readf_float (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::readf (double *ptr, sf_count_t frame_count)
+{ return sf_readf_double (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::writef (const short *ptr, sf_count_t frame_count)
+{ return sf_writef_short (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::writef (const int *ptr, sf_count_t frame_count)
+{ return sf_writef_int (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::writef (const float *ptr, sf_count_t frame_count)
+{ return sf_writef_float (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::writef (const double *ptr, sf_count_t frame_count)
+{ return sf_writef_double (p->sf, ptr, frame_count) ; }
+
+inline sf_count_t
+SndfileHandle::readRaw (void *ptr, sf_count_t bytes)
+{ return sf_read_raw (p->sf, ptr, bytes) ; }
+
+inline sf_count_t
+SndfileHandle::writeRaw (const void *ptr, sf_count_t bytes)
+{ return sf_write_raw (p->sf, ptr, bytes) ; }
+
+inline SNDFILE *
+SndfileHandle::rawHandle (void)
+{ return (p ? p->sf : NULL) ; }
+
+inline SNDFILE *
+SndfileHandle::takeOwnership (void)
+{
+ if (p == NULL || (p->ref != 1))
+ return NULL ;
+
+ SNDFILE * sf = p->sf ;
+ p->sf = NULL ;
+ delete p ;
+ p = NULL ;
+ return sf ;
+}
+
+#ifdef ENABLE_SNDFILE_WINDOWS_PROTOTYPES
+
+inline
+SndfileHandle::SndfileHandle (LPCWSTR wpath, int mode, int fmt, int chans, int srate)
+: p (NULL)
+{
+ p = new (std::nothrow) SNDFILE_ref () ;
+
+ if (p != NULL)
+ { p->ref = 1 ;
+
+ p->sfinfo.frames = 0 ;
+ p->sfinfo.channels = chans ;
+ p->sfinfo.format = fmt ;
+ p->sfinfo.samplerate = srate ;
+ p->sfinfo.sections = 0 ;
+ p->sfinfo.seekable = 0 ;
+
+ p->sf = sf_wchar_open (wpath, mode, &p->sfinfo) ;
+ } ;
+
+ return ;
+} /* SndfileHandle const wchar_t * constructor */
+
+#endif
+
+#endif /* SNDFILE_HH */
+
diff --git a/libsndfile.64/lib/libsndfile-1.def b/libsndfile.64/lib/libsndfile-1.def
new file mode 100644
index 00000000..4194ff3e
--- /dev/null
+++ b/libsndfile.64/lib/libsndfile-1.def
@@ -0,0 +1,47 @@
+; Auto-generated by create_symbols_file.py
+
+LIBRARY libsndfile-1.dll
+EXPORTS
+
+sf_command @1
+sf_open @2
+sf_close @3
+sf_seek @4
+sf_error @7
+sf_perror @8
+sf_error_str @9
+sf_error_number @10
+sf_format_check @11
+sf_read_raw @16
+sf_readf_short @17
+sf_readf_int @18
+sf_readf_float @19
+sf_readf_double @20
+sf_read_short @21
+sf_read_int @22
+sf_read_float @23
+sf_read_double @24
+sf_write_raw @32
+sf_writef_short @33
+sf_writef_int @34
+sf_writef_float @35
+sf_writef_double @36
+sf_write_short @37
+sf_write_int @38
+sf_write_float @39
+sf_write_double @40
+sf_strerror @50
+sf_get_string @60
+sf_set_string @61
+sf_version_string @68
+sf_open_fd @70
+sf_wchar_open @71
+sf_open_virtual @80
+sf_write_sync @90
+sf_set_chunk @100
+sf_get_chunk_size @101
+sf_get_chunk_data @102
+sf_get_chunk_iterator @103
+sf_next_chunk_iterator @104
+sf_current_byterate @110
+
diff --git a/libsndfile.64/lib/libsndfile-1.lib b/libsndfile.64/lib/libsndfile-1.lib
new file mode 100644
index 00000000..56546a20
--- /dev/null
+++ b/libsndfile.64/lib/libsndfile-1.lib
Binary files differ
diff --git a/libsndfile.64/lib/pkgconfig/sndfile.pc b/libsndfile.64/lib/pkgconfig/sndfile.pc
new file mode 100644
index 00000000..428d708a
--- /dev/null
+++ b/libsndfile.64/lib/pkgconfig/sndfile.pc
@@ -0,0 +1,12 @@
+prefix=c:/devel/target/libsndfile
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: sndfile
+Description: A library for reading and writing audio files
+Requires:
+Version: 1.0.28
+Libs: -L${libdir} -lsndfile
+Libs.private: Ext/libflac.la Ext/libvorbis.la Ext/libogg.la
+Cflags: -I${includedir}
diff --git a/mpg123/dist/libmpg123.dll b/mpg123.32/dist/libmpg123.dll
index ccb429bf..ccb429bf 100644
--- a/mpg123/dist/libmpg123.dll
+++ b/mpg123.32/dist/libmpg123.dll
Binary files differ
diff --git a/mpg123/include/mpg123.h b/mpg123.32/include/mpg123.h
index 03cf9197..03cf9197 100644
--- a/mpg123/include/mpg123.h
+++ b/mpg123.32/include/mpg123.h
diff --git a/mpg123/lib/libmpg123.lib b/mpg123.32/lib/libmpg123.lib
index e3555655..e3555655 100644
--- a/mpg123/lib/libmpg123.lib
+++ b/mpg123.32/lib/libmpg123.lib
Binary files differ
diff --git a/mpg123.64/dist/libmpg123.dll b/mpg123.64/dist/libmpg123.dll
new file mode 100644
index 00000000..545c9de3
--- /dev/null
+++ b/mpg123.64/dist/libmpg123.dll
Binary files differ
diff --git a/mpg123.64/include/fmt123.h b/mpg123.64/include/fmt123.h
new file mode 100644
index 00000000..dcabf5e0
--- /dev/null
+++ b/mpg123.64/include/fmt123.h
@@ -0,0 +1,159 @@
+/*
+ libmpg123: MPEG Audio Decoder library
+
+ separate header just for audio format definitions not tied to
+ library code
+
+ copyright 1995-2020 by the mpg123 project
+ free software under the terms of the LGPL 2.1
+ see COPYING and AUTHORS files in distribution or http://mpg123.org
+*/
+
+#ifndef MPG123_ENC_H
+#define MPG123_ENC_H
+
+/** \file fmt123.h Audio format definitions. */
+
+/** \defgroup mpg123_enc mpg123 PCM sample encodings
+ * These are definitions for audio formats used by libmpg123 and
+ * libout123.
+ *
+ * @{
+ */
+
+/** An enum over all sample types possibly known to mpg123.
+ * The values are designed as bit flags to allow bitmasking for encoding
+ * families.
+ * This is also why the enum is not used as type for actual encoding variables,
+ * plain integers (at least 16 bit, 15 bit being used) cover the possible
+ * combinations of these flags.
+ *
+ * Note that (your build of) libmpg123 does not necessarily support all these.
+ * Usually, you can expect the 8bit encodings and signed 16 bit.
+ * Also 32bit float will be usual beginning with mpg123-1.7.0 .
+ * What you should bear in mind is that (SSE, etc) optimized routines may be
+ * absent for some formats. We do have SSE for 16, 32 bit and float, though.
+ * 24 bit integer is done via postprocessing of 32 bit output -- just cutting
+ * the last byte, no rounding, even. If you want better, do it yourself.
+ *
+ * All formats are in native byte order. If you need different endinaness, you
+ * can simply postprocess the output buffers (libmpg123 wouldn't do anything
+ * else). The macro MPG123_SAMPLESIZE() can be helpful there.
+ */
+enum mpg123_enc_enum
+{
+/* 0000 0000 0000 1111 Some 8 bit integer encoding. */
+ MPG123_ENC_8 = 0x00f
+/* 0000 0000 0100 0000 Some 16 bit integer encoding. */
+, MPG123_ENC_16 = 0x040
+/* 0100 0000 0000 0000 Some 24 bit integer encoding. */
+, MPG123_ENC_24 = 0x4000
+/* 0000 0001 0000 0000 Some 32 bit integer encoding. */
+, MPG123_ENC_32 = 0x100
+/* 0000 0000 1000 0000 Some signed integer encoding. */
+, MPG123_ENC_SIGNED = 0x080
+/* 0000 1110 0000 0000 Some float encoding. */
+, MPG123_ENC_FLOAT = 0xe00
+/* 0000 0000 1101 0000 signed 16 bit */
+, MPG123_ENC_SIGNED_16 = (MPG123_ENC_16|MPG123_ENC_SIGNED|0x10)
+/* 0000 0000 0110 0000 unsigned 16 bit */
+, MPG123_ENC_UNSIGNED_16 = (MPG123_ENC_16|0x20)
+/* 0000 0000 0000 0001 unsigned 8 bit */
+, MPG123_ENC_UNSIGNED_8 = 0x01
+/* 0000 0000 1000 0010 signed 8 bit */
+, MPG123_ENC_SIGNED_8 = (MPG123_ENC_SIGNED|0x02)
+/* 0000 0000 0000 0100 ulaw 8 bit */
+, MPG123_ENC_ULAW_8 = 0x04
+/* 0000 0000 0000 1000 alaw 8 bit */
+, MPG123_ENC_ALAW_8 = 0x08
+/* 0001 0001 1000 0000 signed 32 bit */
+, MPG123_ENC_SIGNED_32 = MPG123_ENC_32|MPG123_ENC_SIGNED|0x1000
+/* 0010 0001 0000 0000 unsigned 32 bit */
+, MPG123_ENC_UNSIGNED_32 = MPG123_ENC_32|0x2000
+/* 0101 0000 1000 0000 signed 24 bit */
+, MPG123_ENC_SIGNED_24 = MPG123_ENC_24|MPG123_ENC_SIGNED|0x1000
+/* 0110 0000 0000 0000 unsigned 24 bit */
+, MPG123_ENC_UNSIGNED_24 = MPG123_ENC_24|0x2000
+/* 0000 0010 0000 0000 32bit float */
+, MPG123_ENC_FLOAT_32 = 0x200
+/* 0000 0100 0000 0000 64bit float */
+, MPG123_ENC_FLOAT_64 = 0x400
+/* Any possibly known encoding from the list above. */
+, MPG123_ENC_ANY = ( MPG123_ENC_SIGNED_16 | MPG123_ENC_UNSIGNED_16
+ | MPG123_ENC_UNSIGNED_8 | MPG123_ENC_SIGNED_8
+ | MPG123_ENC_ULAW_8 | MPG123_ENC_ALAW_8
+ | MPG123_ENC_SIGNED_32 | MPG123_ENC_UNSIGNED_32
+ | MPG123_ENC_SIGNED_24 | MPG123_ENC_UNSIGNED_24
+ | MPG123_ENC_FLOAT_32 | MPG123_ENC_FLOAT_64 )
+};
+
+/** Get size of one PCM sample with given encoding.
+ * This is included both in libmpg123 and libout123. Both offer
+ * an API function to provide the macro results from library
+ * compile-time, not that of you application. This most likely
+ * does not matter as I do not expect any fresh PCM sample
+ * encoding to appear. But who knows? Perhaps the encoding type
+ * will be abused for funny things in future, not even plain PCM.
+ * And, by the way: Thomas really likes the ?: operator.
+ * \param enc the encoding (mpg123_enc_enum value)
+ * \return size of one sample in bytes
+ */
+#define MPG123_SAMPLESIZE(enc) ( \
+ (enc) < 1 \
+ ? 0 \
+ : ( (enc) & MPG123_ENC_8 \
+ ? 1 \
+ : ( (enc) & MPG123_ENC_16 \
+ ? 2 \
+ : ( (enc) & MPG123_ENC_24 \
+ ? 3 \
+ : ( ( (enc) & MPG123_ENC_32 \
+ || (enc) == MPG123_ENC_FLOAT_32 ) \
+ ? 4 \
+ : ( (enc) == MPG123_ENC_FLOAT_64 \
+ ? 8 \
+ : 0 \
+) ) ) ) ) )
+
+/** Representation of zero in differing encodings.
+ * This exists to define proper silence in various encodings without
+ * having to link to libsyn123 to do actual conversions at runtime.
+ * You have to handle big/little endian order yourself, though.
+ * This takes the shortcut that any signed encoding has a zero with
+ * all-zero bits. Unsigned linear encodings just have the highest bit set
+ * (2^(n-1) for n bits), while the nonlinear 8-bit ones are special.
+ * \param enc the encoding (mpg123_enc_enum value)
+ * \param siz bytes per sample (return value of MPG123_SAMPLESIZE(enc))
+ * \param off byte (octet) offset counted from LSB
+ * \return unsigned byte value for the designated octet
+ */
+#define MPG123_ZEROSAMPLE(enc, siz, off) ( \
+ (enc) == MPG123_ENC_ULAW_8 \
+ ? (off == 0 ? 0xff : 0x00) \
+ : ( (enc) == MPG123_ENC_ALAW_8 \
+ ? (off == 0 ? 0xd5 : 0x00) \
+ : ( (((enc) & (MPG123_ENC_SIGNED|MPG123_ENC_FLOAT)) || (siz) != ((off)+1)) \
+ ? 0x00 \
+ : 0x80 \
+ ) ) )
+
+/** Structure defining an audio format.
+ * Providing the members as individual function arguments to define a certain
+ * output format is easy enough. This struct makes is more comfortable to deal
+ * with a list of formats.
+ * Negative values for the members might be used to communicate use of default
+ * values.
+ */
+struct mpg123_fmt
+{
+ long rate; /**< sampling rate in Hz */
+ int channels; /**< channel count */
+ /** encoding code, can be single value or bitwise or of members of
+ * mpg123_enc_enum */
+ int encoding;
+};
+
+/* @} */
+
+#endif
+
diff --git a/mpg123.64/include/mpg123.h b/mpg123.64/include/mpg123.h
new file mode 100644
index 00000000..7b0a8495
--- /dev/null
+++ b/mpg123.64/include/mpg123.h
@@ -0,0 +1,1697 @@
+/*
+ libmpg123: MPEG Audio Decoder library (version 1.26.3)
+
+ copyright 1995-2015 by the mpg123 project
+ free software under the terms of the LGPL 2.1
+ see COPYING and AUTHORS files in distribution or http://mpg123.org
+*/
+
+#ifndef MPG123_LIB_H
+#define MPG123_LIB_H
+
+#include <fmt123.h>
+
+/** \file mpg123.h The header file for the libmpg123 MPEG Audio decoder */
+
+/** A macro to check at compile time which set of API functions to expect.
+ * This should be incremented at least each time a new symbol is added
+ * to the header.
+ */
+#define MPG123_API_VERSION 45
+
+#ifndef MPG123_EXPORT
+/** Defines needed for MS Visual Studio(tm) DLL builds.
+ * Every public function must be prefixed with MPG123_EXPORT. When building
+ * the DLL ensure to define BUILD_MPG123_DLL. This makes the function accessible
+ * for clients and includes it in the import library which is created together
+ * with the DLL. When consuming the DLL ensure to define LINK_MPG123_DLL which
+ * imports the functions from the DLL.
+ */
+#ifdef BUILD_MPG123_DLL
+/* The dll exports. */
+#define MPG123_EXPORT __declspec(dllexport)
+#else
+#ifdef LINK_MPG123_DLL
+/* The exe imports. */
+#define MPG123_EXPORT __declspec(dllimport)
+#else
+/* Nothing on normal/UNIX builds */
+#define MPG123_EXPORT
+#endif
+#endif
+#endif
+
+/* This is for Visual Studio, so this header works as distributed in the binary downloads */
+#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T)
+#define MPG123_DEF_SSIZE_T
+#include <stddef.h>
+typedef ptrdiff_t ssize_t;
+#endif
+
+#ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */
+#include <stdlib.h>
+#include <sys/types.h>
+
+/* Simplified large file handling.
+ I used to have a check here that prevents building for a library with conflicting large file setup
+ (application that uses 32 bit offsets with library that uses 64 bits).
+ While that was perfectly fine in an environment where there is one incarnation of the library,
+ it hurt GNU/Linux and Solaris systems with multilib where the distribution fails to provide the
+ correct header matching the 32 bit library (where large files need explicit support) or
+ the 64 bit library (where there is no distinction).
+
+ New approach: When the app defines _FILE_OFFSET_BITS, it wants non-default large file support,
+ and thus functions with added suffix (mpg123_open_64).
+ Any mismatch will be caught at link time because of the _FILE_OFFSET_BITS setting used when
+ building libmpg123. Plus, there's dual mode large file support in mpg123 since 1.12 now.
+ Link failure is not the expected outcome of any half-sane usage anymore.
+
+ More complication: What about client code defining _LARGEFILE64_SOURCE? It might want direct access to the _64 functions, along with the ones without suffix. Well, that's possible now via defining MPG123_NO_LARGENAME and MPG123_LARGESUFFIX, respectively, for disabling or enforcing the suffix names.
+*/
+
+/*
+ Now, the renaming of large file aware functions.
+ By default, it appends underscore _FILE_OFFSET_BITS (so, mpg123_seek_64 for mpg123_seek), if _FILE_OFFSET_BITS is defined. You can force a different suffix via MPG123_LARGESUFFIX (that must include the underscore), or you can just disable the whole mess by defining MPG123_NO_LARGENAME.
+*/
+#if (!defined MPG123_NO_LARGENAME) && ((defined _FILE_OFFSET_BITS) || (defined MPG123_LARGESUFFIX))
+
+/* Need some trickery to concatenate the value(s) of the given macro(s). */
+#define MPG123_MACROCAT_REALLY(a, b) a ## b
+#define MPG123_MACROCAT(a, b) MPG123_MACROCAT_REALLY(a, b)
+#ifndef MPG123_LARGESUFFIX
+#define MPG123_LARGESUFFIX MPG123_MACROCAT(_, _FILE_OFFSET_BITS)
+#endif
+#define MPG123_LARGENAME(func) MPG123_MACROCAT(func, MPG123_LARGESUFFIX)
+
+#define mpg123_open_fixed MPG123_LARGENAME(mpg123_open_fixed)
+#define mpg123_open MPG123_LARGENAME(mpg123_open)
+#define mpg123_open_fd MPG123_LARGENAME(mpg123_open_fd)
+#define mpg123_open_handle MPG123_LARGENAME(mpg123_open_handle)
+#define mpg123_framebyframe_decode MPG123_LARGENAME(mpg123_framebyframe_decode)
+#define mpg123_decode_frame MPG123_LARGENAME(mpg123_decode_frame)
+#define mpg123_tell MPG123_LARGENAME(mpg123_tell)
+#define mpg123_tellframe MPG123_LARGENAME(mpg123_tellframe)
+#define mpg123_tell_stream MPG123_LARGENAME(mpg123_tell_stream)
+#define mpg123_seek MPG123_LARGENAME(mpg123_seek)
+#define mpg123_feedseek MPG123_LARGENAME(mpg123_feedseek)
+#define mpg123_seek_frame MPG123_LARGENAME(mpg123_seek_frame)
+#define mpg123_timeframe MPG123_LARGENAME(mpg123_timeframe)
+#define mpg123_index MPG123_LARGENAME(mpg123_index)
+#define mpg123_set_index MPG123_LARGENAME(mpg123_set_index)
+#define mpg123_position MPG123_LARGENAME(mpg123_position)
+#define mpg123_length MPG123_LARGENAME(mpg123_length)
+#define mpg123_framelength MPG123_LARGENAME(mpg123_framelength)
+#define mpg123_set_filesize MPG123_LARGENAME(mpg123_set_filesize)
+#define mpg123_replace_reader MPG123_LARGENAME(mpg123_replace_reader)
+#define mpg123_replace_reader_handle MPG123_LARGENAME(mpg123_replace_reader_handle)
+#define mpg123_framepos MPG123_LARGENAME(mpg123_framepos)
+
+#endif /* largefile hackery */
+
+#endif /* MPG123_NO_CONFIGURE */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** \defgroup mpg123_init mpg123 library and handle setup
+ *
+ * Functions to initialise and shutdown the mpg123 library and handles.
+ * The parameters of handles have workable defaults, you only have to tune them when you want to tune something;-)
+ * Tip: Use a RVA setting...
+ *
+ * @{
+ */
+
+/** Opaque structure for the libmpg123 decoder handle. */
+struct mpg123_handle_struct;
+
+/** Opaque structure for the libmpg123 decoder handle.
+ * Most functions take a pointer to a mpg123_handle as first argument and operate on its data in an object-oriented manner.
+ */
+typedef struct mpg123_handle_struct mpg123_handle;
+
+/** Function to initialise the mpg123 library.
+ * This should be called once in a non-parallel context. It is not explicitly
+ * thread-safe, but repeated/concurrent calls still _should_ be safe as static
+ * tables are filled with the same values anyway.
+ *
+ * \return MPG123_OK if successful, otherwise an error number.
+ */
+MPG123_EXPORT int mpg123_init(void);
+
+/** Superfluous Function to close down the mpg123 library.
+ * This was created with the thought that there sometime will be cleanup code
+ * to be run after library use. This never materialized. You can forget about
+ * this function and it is only here for old programs that do call it.
+ */
+MPG123_EXPORT void mpg123_exit(void);
+
+/** Create a handle with optional choice of decoder (named by a string, see mpg123_decoders() or mpg123_supported_decoders()).
+ * and optional retrieval of an error code to feed to mpg123_plain_strerror().
+ * Optional means: Any of or both the parameters may be NULL.
+ *
+ * \param decoder optional choice of decoder variant (NULL for default)
+ * \param error optional address to store error codes
+ * \return Non-NULL pointer to fresh handle when successful.
+ */
+MPG123_EXPORT mpg123_handle *mpg123_new(const char* decoder, int *error);
+
+/** Delete handle, mh is either a valid mpg123 handle or NULL.
+ * \param mh handle
+ */
+MPG123_EXPORT void mpg123_delete(mpg123_handle *mh);
+
+/** Free plain memory allocated within libmpg123.
+ * This is for library users that are not sure to use the same underlying
+ * memory allocator as libmpg123. It is just a wrapper over free() in
+ * the underlying C library.
+ */
+MPG123_EXPORT void mpg123_free(void *ptr);
+
+/** Enumeration of the parameters types that it is possible to set/get. */
+enum mpg123_parms
+{
+ MPG123_VERBOSE = 0, /**< set verbosity value for enabling messages to stderr, >= 0 makes sense (integer) */
+ MPG123_FLAGS, /**< set all flags, p.ex val = MPG123_GAPLESS|MPG123_MONO_MIX (integer) */
+ MPG123_ADD_FLAGS, /**< add some flags (integer) */
+ MPG123_FORCE_RATE, /**< when value > 0, force output rate to that value (integer) */
+ MPG123_DOWN_SAMPLE, /**< 0=native rate, 1=half rate, 2=quarter rate (integer) */
+ MPG123_RVA, /**< one of the RVA choices above (integer) */
+ MPG123_DOWNSPEED, /**< play a frame N times (integer) */
+ MPG123_UPSPEED, /**< play every Nth frame (integer) */
+ MPG123_START_FRAME, /**< start with this frame (skip frames before that, integer) */
+ MPG123_DECODE_FRAMES, /**< decode only this number of frames (integer) */
+ MPG123_ICY_INTERVAL, /**< Stream contains ICY metadata with this interval (integer).
+ Make sure to set this _before_ opening a stream.*/
+ MPG123_OUTSCALE, /**< the scale for output samples (amplitude - integer or float according to mpg123 output format, normally integer) */
+ MPG123_TIMEOUT, /**< timeout for reading from a stream (not supported on win32, integer) */
+ MPG123_REMOVE_FLAGS, /**< remove some flags (inverse of MPG123_ADD_FLAGS, integer) */
+ MPG123_RESYNC_LIMIT, /**< Try resync on frame parsing for that many bytes or until end of stream (<0 ... integer). This can enlarge the limit for skipping junk on beginning, too (but not reduce it). */
+ MPG123_INDEX_SIZE /**< Set the frame index size (if supported). Values <0 mean that the index is allowed to grow dynamically in these steps (in positive direction, of course) -- Use this when you really want a full index with every individual frame. */
+ ,MPG123_PREFRAMES /**< Decode/ignore that many frames in advance for layer 3. This is needed to fill bit reservoir after seeking, for example (but also at least one frame in advance is needed to have all "normal" data for layer 3). Give a positive integer value, please.*/
+ ,MPG123_FEEDPOOL /**< For feeder mode, keep that many buffers in a pool to avoid frequent malloc/free. The pool is allocated on mpg123_open_feed(). If you change this parameter afterwards, you can trigger growth and shrinkage during decoding. The default value could change any time. If you care about this, then set it. (integer) */
+ ,MPG123_FEEDBUFFER /**< Minimal size of one internal feeder buffer, again, the default value is subject to change. (integer) */
+ ,MPG123_FREEFORMAT_SIZE /**< Tell the parser a free-format frame size to
+ * avoid read-ahead to get it. A value of -1 (default) means that the parser
+ * will determine it. The parameter value is applied during decoder setup
+ * for a freshly opened stream only.
+ */
+};
+
+/** Flag bits for MPG123_FLAGS, use the usual binary or to combine. */
+enum mpg123_param_flags
+{
+ MPG123_FORCE_MONO = 0x7 /**< 0111 Force some mono mode: This is a test bitmask for seeing if any mono forcing is active. */
+ ,MPG123_MONO_LEFT = 0x1 /**< 0001 Force playback of left channel only. */
+ ,MPG123_MONO_RIGHT = 0x2 /**< 0010 Force playback of right channel only. */
+ ,MPG123_MONO_MIX = 0x4 /**< 0100 Force playback of mixed mono. */
+ ,MPG123_FORCE_STEREO = 0x8 /**< 1000 Force stereo output. */
+ ,MPG123_FORCE_8BIT = 0x10 /**< 00010000 Force 8bit formats. */
+ ,MPG123_QUIET = 0x20 /**< 00100000 Suppress any printouts (overrules verbose). */
+ ,MPG123_GAPLESS = 0x40 /**< 01000000 Enable gapless decoding (default on if libmpg123 has support). */
+ ,MPG123_NO_RESYNC = 0x80 /**< 10000000 Disable resync stream after error. */
+ ,MPG123_SEEKBUFFER = 0x100 /**< 000100000000 Enable small buffer on non-seekable streams to allow some peek-ahead (for better MPEG sync). */
+ ,MPG123_FUZZY = 0x200 /**< 001000000000 Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC) */
+ ,MPG123_FORCE_FLOAT = 0x400 /**< 010000000000 Force floating point output (32 or 64 bits depends on mpg123 internal precision). */
+ ,MPG123_PLAIN_ID3TEXT = 0x800 /**< 100000000000 Do not translate ID3 text data to UTF-8. ID3 strings will contain the raw text data, with the first byte containing the ID3 encoding code. */
+ ,MPG123_IGNORE_STREAMLENGTH = 0x1000 /**< 1000000000000 Ignore any stream length information contained in the stream, which can be contained in a 'TLEN' frame of an ID3v2 tag or a Xing tag */
+ ,MPG123_SKIP_ID3V2 = 0x2000 /**< 10 0000 0000 0000 Do not parse ID3v2 tags, just skip them. */
+ ,MPG123_IGNORE_INFOFRAME = 0x4000 /**< 100 0000 0000 0000 Do not parse the LAME/Xing info frame, treat it as normal MPEG data. */
+ ,MPG123_AUTO_RESAMPLE = 0x8000 /**< 1000 0000 0000 0000 Allow automatic internal resampling of any kind (default on if supported). Especially when going lowlevel with replacing output buffer, you might want to unset this flag. Setting MPG123_DOWNSAMPLE or MPG123_FORCE_RATE will override this. */
+ ,MPG123_PICTURE = 0x10000 /**< 17th bit: Enable storage of pictures from tags (ID3v2 APIC). */
+ ,MPG123_NO_PEEK_END = 0x20000 /**< 18th bit: Do not seek to the end of
+ * the stream in order to probe
+ * the stream length and search for the id3v1 field. This also means
+ * the file size is unknown unless set using mpg123_set_filesize() and
+ * the stream is assumed as non-seekable unless overridden.
+ */
+ ,MPG123_FORCE_SEEKABLE = 0x40000 /**< 19th bit: Force the stream to be seekable. */
+ ,MPG123_STORE_RAW_ID3 = 0x80000 /**< store raw ID3 data (even if skipping) */
+ ,MPG123_FORCE_ENDIAN = 0x100000 /**< Enforce endianess of output samples.
+ * This is not reflected in the format codes. If this flag is set along with
+ * MPG123_BIG_ENDIAN, MPG123_ENC_SIGNED16 means s16be, without
+ * MPG123_BIG_ENDIAN, it means s16le. Normal operation without
+ * MPG123_FORCE_ENDIAN produces output in native byte order.
+ */
+ ,MPG123_BIG_ENDIAN = 0x200000 /**< Choose big endian instead of little. */
+ ,MPG123_NO_READAHEAD = 0x400000 /**< Disable read-ahead in parser. If
+ * you know you provide full frames to the feeder API, this enables
+ * decoder output from the first one on, instead of having to wait for
+ * the next frame to confirm that the stream is healthy. It also disables
+ * free format support unless you provide a frame size using
+ * MPG123_FREEFORMAT_SIZE.
+ */
+ ,MPG123_FLOAT_FALLBACK = 0x800000 /**< Consider floating point output encoding only after
+ * trying other (possibly downsampled) rates and encodings first. This is to
+ * support efficient playback where floating point output is only configured for
+ * an external resampler, bypassing that resampler when the desired rate can
+ * be produced directly. This is enabled by default to be closer to older versions
+ * of libmpg123 which did not enable float automatically at all. If disabled,
+ * float is considered after the 16 bit default and higher-bit integer encodings
+ * for any rate. */
+ ,MPG123_NO_FRANKENSTEIN = 0x1000000 /**< Disable support for Frankenstein streams
+ * (different MPEG streams stiched together). Do not accept serious change of MPEG
+ * header inside a single stream. With this flag, the audio output format cannot
+ * change during decoding unless you open a new stream. This also stops decoding
+ * after an announced end of stream (Info header contained a number of frames
+ * and this number has been reached). This makes your MP3 files behave more like
+ * ordinary media files with defined structure, rather than stream dumps with
+ * some sugar. */
+};
+
+/** choices for MPG123_RVA */
+enum mpg123_param_rva
+{
+ MPG123_RVA_OFF = 0 /**< RVA disabled (default). */
+ ,MPG123_RVA_MIX = 1 /**< Use mix/track/radio gain. */
+ ,MPG123_RVA_ALBUM = 2 /**< Use album/audiophile gain */
+ ,MPG123_RVA_MAX = MPG123_RVA_ALBUM /**< The maximum RVA code, may increase in future. */
+};
+
+/** Set a specific parameter, for a specific mpg123_handle, using a parameter
+ * type key chosen from the mpg123_parms enumeration, to the specified value.
+ * \param mh handle
+ * \param type parameter choice
+ * \param value integer value
+ * \param fvalue floating point value
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_param( mpg123_handle *mh
+, enum mpg123_parms type, long value, double fvalue );
+
+/** Get a specific parameter, for a specific mpg123_handle.
+ * See the mpg123_parms enumeration for a list of available parameters.
+ * \param mh handle
+ * \param type parameter choice
+ * \param value integer value return address
+ * \param fvalue floating point value return address
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_getparam( mpg123_handle *mh
+, enum mpg123_parms type, long *value, double *fvalue );
+
+/** Feature set available for query with mpg123_feature. */
+enum mpg123_feature_set
+{
+ MPG123_FEATURE_ABI_UTF8OPEN = 0 /**< mpg123 expects path names to be given in UTF-8 encoding instead of plain native. */
+ ,MPG123_FEATURE_OUTPUT_8BIT /**< 8bit output */
+ ,MPG123_FEATURE_OUTPUT_16BIT /**< 16bit output */
+ ,MPG123_FEATURE_OUTPUT_32BIT /**< 32bit output */
+ ,MPG123_FEATURE_INDEX /**< support for building a frame index for accurate seeking */
+ ,MPG123_FEATURE_PARSE_ID3V2 /**< id3v2 parsing */
+ ,MPG123_FEATURE_DECODE_LAYER1 /**< mpeg layer-1 decoder enabled */
+ ,MPG123_FEATURE_DECODE_LAYER2 /**< mpeg layer-2 decoder enabled */
+ ,MPG123_FEATURE_DECODE_LAYER3 /**< mpeg layer-3 decoder enabled */
+ ,MPG123_FEATURE_DECODE_ACCURATE /**< accurate decoder rounding */
+ ,MPG123_FEATURE_DECODE_DOWNSAMPLE /**< downsample (sample omit) */
+ ,MPG123_FEATURE_DECODE_NTOM /**< flexible rate decoding */
+ ,MPG123_FEATURE_PARSE_ICY /**< ICY support */
+ ,MPG123_FEATURE_TIMEOUT_READ /**< Reader with timeout (network). */
+ ,MPG123_FEATURE_EQUALIZER /**< tunable equalizer */
+ ,MPG123_FEATURE_MOREINFO /**< more info extraction (for frame analyzer) */
+ ,MPG123_FEATURE_OUTPUT_FLOAT32 /**< 32 bit float output */
+ ,MPG123_FEATURE_OUTPUT_FLOAT64 /**< 64 bit float output (usually never) */
+};
+
+/** Query libmpg123 features.
+ * \param key feature selection
+ * \return 1 for success, 0 for unimplemented functions
+ */
+MPG123_EXPORT int mpg123_feature(const enum mpg123_feature_set key);
+
+/** Query libmpg123 features with better ABI compatibility
+ *
+ * This is the same as mpg123_feature(), but this time not using
+ * the enum as argument. Compilers don't have to agree on the size of
+ * enums and hence they are not safe in public API.
+ *
+ * \param key feature selection
+ * \return 1 for success, 0 for unimplemented functions
+ */
+MPG123_EXPORT int mpg123_feature2(int key);
+
+/* @} */
+
+
+/** \defgroup mpg123_error mpg123 error handling
+ *
+ * Functions to get text version of the error numbers and an enumeration
+ * of the error codes returned by libmpg123.
+ *
+ * Most functions operating on a mpg123_handle simply return MPG123_OK (0)
+ * on success and MPG123_ERR (-1) on failure, setting the internal error
+ * variable of the handle to the specific error code. If there was not a valid
+ * (non-NULL) handle provided to a function operating on one, MPG123_BAD_HANDLE
+ * may be returned if this can not be confused with a valid positive return
+ * value.
+ * Meaning: A function expected to return positive integers on success will
+ * always indicate error or a special condition by returning a negative one.
+ *
+ * Decoding/seek functions may also return message codes MPG123_DONE,
+ * MPG123_NEW_FORMAT and MPG123_NEED_MORE (all negative, see below on how to
+ * react). Note that calls to those can be nested, so generally watch out
+ * for these codes after initial handle setup.
+ * Especially any function that needs information about the current stream
+ * to work will try to at least parse the beginning if that did not happen
+ * yet.
+ *
+ * On a function that is supposed to return MPG123_OK on success and
+ * MPG123_ERR on failure, make sure you check for != MPG123_OK, not
+ * == MPG123_ERR, as the error code could get more specific in future,
+ * or there is just a special message from a decoding routine as indicated
+ * above.
+ *
+ * @{
+ */
+
+/** Enumeration of the message and error codes and returned by libmpg123 functions. */
+enum mpg123_errors
+{
+ MPG123_DONE=-12, /**< Message: Track ended. Stop decoding. */
+ MPG123_NEW_FORMAT=-11, /**< Message: Output format will be different on next call. Note that some libmpg123 versions between 1.4.3 and 1.8.0 insist on you calling mpg123_getformat() after getting this message code. Newer verisons behave like advertised: You have the chance to call mpg123_getformat(), but you can also just continue decoding and get your data. */
+ MPG123_NEED_MORE=-10, /**< Message: For feed reader: "Feed me more!" (call mpg123_feed() or mpg123_decode() with some new input data). */
+ MPG123_ERR=-1, /**< Generic Error */
+ MPG123_OK=0, /**< Success */
+ MPG123_BAD_OUTFORMAT, /**< Unable to set up output format! */
+ MPG123_BAD_CHANNEL, /**< Invalid channel number specified. */
+ MPG123_BAD_RATE, /**< Invalid sample rate specified. */
+ MPG123_ERR_16TO8TABLE, /**< Unable to allocate memory for 16 to 8 converter table! */
+ MPG123_BAD_PARAM, /**< Bad parameter id! */
+ MPG123_BAD_BUFFER, /**< Bad buffer given -- invalid pointer or too small size. */
+ MPG123_OUT_OF_MEM, /**< Out of memory -- some malloc() failed. */
+ MPG123_NOT_INITIALIZED, /**< You didn't initialize the library! */
+ MPG123_BAD_DECODER, /**< Invalid decoder choice. */
+ MPG123_BAD_HANDLE, /**< Invalid mpg123 handle. */
+ MPG123_NO_BUFFERS, /**< Unable to initialize frame buffers (out of memory?). */
+ MPG123_BAD_RVA, /**< Invalid RVA mode. */
+ MPG123_NO_GAPLESS, /**< This build doesn't support gapless decoding. */
+ MPG123_NO_SPACE, /**< Not enough buffer space. */
+ MPG123_BAD_TYPES, /**< Incompatible numeric data types. */
+ MPG123_BAD_BAND, /**< Bad equalizer band. */
+ MPG123_ERR_NULL, /**< Null pointer given where valid storage address needed. */
+ MPG123_ERR_READER, /**< Error reading the stream. */
+ MPG123_NO_SEEK_FROM_END,/**< Cannot seek from end (end is not known). */
+ MPG123_BAD_WHENCE, /**< Invalid 'whence' for seek function.*/
+ MPG123_NO_TIMEOUT, /**< Build does not support stream timeouts. */
+ MPG123_BAD_FILE, /**< File access error. */
+ MPG123_NO_SEEK, /**< Seek not supported by stream. */
+ MPG123_NO_READER, /**< No stream opened. */
+ MPG123_BAD_PARS, /**< Bad parameter handle. */
+ MPG123_BAD_INDEX_PAR, /**< Bad parameters to mpg123_index() and mpg123_set_index() */
+ MPG123_OUT_OF_SYNC, /**< Lost track in bytestream and did not try to resync. */
+ MPG123_RESYNC_FAIL, /**< Resync failed to find valid MPEG data. */
+ MPG123_NO_8BIT, /**< No 8bit encoding possible. */
+ MPG123_BAD_ALIGN, /**< Stack aligmnent error */
+ MPG123_NULL_BUFFER, /**< NULL input buffer with non-zero size... */
+ MPG123_NO_RELSEEK, /**< Relative seek not possible (screwed up file offset) */
+ MPG123_NULL_POINTER, /**< You gave a null pointer somewhere where you shouldn't have. */
+ MPG123_BAD_KEY, /**< Bad key value given. */
+ MPG123_NO_INDEX, /**< No frame index in this build. */
+ MPG123_INDEX_FAIL, /**< Something with frame index went wrong. */
+ MPG123_BAD_DECODER_SETUP, /**< Something prevents a proper decoder setup */
+ MPG123_MISSING_FEATURE /**< This feature has not been built into libmpg123. */
+ ,MPG123_BAD_VALUE /**< A bad value has been given, somewhere. */
+ ,MPG123_LSEEK_FAILED /**< Low-level seek failed. */
+ ,MPG123_BAD_CUSTOM_IO /**< Custom I/O not prepared. */
+ ,MPG123_LFS_OVERFLOW /**< Offset value overflow during translation of large file API calls -- your client program cannot handle that large file. */
+ ,MPG123_INT_OVERFLOW /**< Some integer overflow. */
+};
+
+/** Look up error strings given integer code.
+ * \param errcode integer error code
+ * \return string describing what that error error code means
+ */
+MPG123_EXPORT const char* mpg123_plain_strerror(int errcode);
+
+/** Give string describing what error has occured in the context of handle mh.
+ * When a function operating on an mpg123 handle returns MPG123_ERR, you should check for the actual reason via
+ * char *errmsg = mpg123_strerror(mh)
+ * This function will catch mh == NULL and return the message for MPG123_BAD_HANDLE.
+ * \param mh handle
+ * \return error message
+ */
+MPG123_EXPORT const char* mpg123_strerror(mpg123_handle *mh);
+
+/** Return the plain errcode intead of a string.
+ * \param mh handle
+ * \return error code recorded in handle or MPG123_BAD_HANDLE
+ */
+MPG123_EXPORT int mpg123_errcode(mpg123_handle *mh);
+
+/*@}*/
+
+
+/** \defgroup mpg123_decoder mpg123 decoder selection
+ *
+ * Functions to list and select the available decoders.
+ * Perhaps the most prominent feature of mpg123: You have several (optimized) decoders to choose from (on x86 and PPC (MacOS) systems, that is).
+ *
+ * @{
+ */
+
+/** Get available decoder list.
+ * \return NULL-terminated array of generally available decoder names (plain 8bit ASCII)
+ */
+MPG123_EXPORT const char **mpg123_decoders(void);
+
+/** Get supported decoder list.
+ * \return NULL-terminated array of the decoders supported by the CPU (plain 8bit ASCII)
+ */
+MPG123_EXPORT const char **mpg123_supported_decoders(void);
+
+/** Set the active decoder.
+ * \param mh handle
+ * \param decoder_name name of decoder
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_decoder(mpg123_handle *mh, const char* decoder_name);
+
+/** Get the currently active decoder name.
+ * The active decoder engine can vary depening on output constraints,
+ * mostly non-resampling, integer output is accelerated via 3DNow & Co. but for
+ * other modes a fallback engine kicks in.
+ * Note that this can return a decoder that is only active in the hidden and not
+ * available as decoder choice from the outside.
+ * \param mh handle
+ * \return The decoder name or NULL on error.
+ */
+MPG123_EXPORT const char* mpg123_current_decoder(mpg123_handle *mh);
+
+/*@}*/
+
+
+/** \defgroup mpg123_output mpg123 output audio format
+ *
+ * Functions to get and select the format of the decoded audio.
+ *
+ * Before you dive in, please be warned that you might get confused by this.
+ * This seems to happen a lot, therefore I am trying to explain in advance.
+ * If you do feel confused and just want to decode your normal MPEG audio files that
+ * don't alter properties in the middle, just use mpg123_open_fixed() with a fixed encoding
+ * and channel count and forget about a matrix of audio formats. If you want to get funky,
+ * read ahead ...
+ *
+ * The mpg123 library decides what output format to use when encountering the first frame in a stream, or actually any frame that is still valid but differs from the frames before in the prompted output format. At such a deciding point, an internal table of allowed encodings, sampling rates and channel setups is consulted. According to this table, an output format is chosen and the decoding engine set up accordingly (including optimized routines for different output formats). This might seem unusual but it just follows from the non-existence of "MPEG audio files" with defined overall properties. There are streams, streams are concatenations of (semi) independent frames. We store streams on disk and call them "MPEG audio files", but that does not change their nature as the decoder is concerned (the LAME/Xing header for gapless decoding makes things interesting again).
+ *
+ * To get to the point: What you do with mpg123_format() and friends is to fill the internal table of allowed formats before it is used. That includes removing support for some formats or adding your forced sample rate (see MPG123_FORCE_RATE) that will be used with the crude internal resampler. Also keep in mind that the sample encoding is just a question of choice -- the MPEG frames do only indicate their native sampling rate and channel count. If you want to decode to integer or float samples, 8 or 16 bit ... that is your decision. In a "clean" world, libmpg123 would always decode to 32 bit float and let you handle any sample conversion. But there are optimized routines that work faster by directly decoding to the desired encoding / accuracy. We prefer efficiency over conceptual tidyness.
+ *
+ * People often start out thinking that mpg123_format() should change the actual decoding format on the fly. That is wrong. It only has effect on the next natural change of output format, when libmpg123 will consult its format table again. To make life easier, you might want to call mpg123_format_none() before any thing else and then just allow one desired encoding and a limited set of sample rates / channel choices that you actually intend to deal with. You can force libmpg123 to decode everything to 44100 KHz, stereo, 16 bit integer ... it will duplicate mono channels and even do resampling if needed (unless that feature is disabled in the build, same with some encodings). But I have to stress that the resampling of libmpg123 is very crude and doesn't even contain any kind of "proper" interpolation.
+ *
+ * In any case, watch out for MPG123_NEW_FORMAT as return message from decoding routines and call mpg123_getformat() to get the currently active output format.
+ *
+ * @{
+ */
+
+/** They can be combined into one number (3) to indicate mono and stereo... */
+enum mpg123_channelcount
+{
+ MPG123_MONO = 1 /**< mono */
+ ,MPG123_STEREO = 2 /**< stereo */
+};
+
+/** An array of supported standard sample rates
+ * These are possible native sample rates of MPEG audio files.
+ * You can still force mpg123 to resample to a different one, but by
+ * default you will only get audio in one of these samplings.
+ * This list is in ascending order.
+ * \param list Store a pointer to the sample rates array there.
+ * \param number Store the number of sample rates there. */
+MPG123_EXPORT void mpg123_rates(const long **list, size_t *number);
+
+/** An array of supported audio encodings.
+ * An audio encoding is one of the fully qualified members of mpg123_enc_enum (MPG123_ENC_SIGNED_16, not MPG123_SIGNED).
+ * \param list Store a pointer to the encodings array there.
+ * \param number Store the number of encodings there. */
+MPG123_EXPORT void mpg123_encodings(const int **list, size_t *number);
+
+/** Return the size (in bytes) of one mono sample of the named encoding.
+ * \param encoding The encoding value to analyze.
+ * \return positive size of encoding in bytes, 0 on invalid encoding. */
+MPG123_EXPORT int mpg123_encsize(int encoding);
+
+/** Configure a mpg123 handle to accept no output format at all,
+ * use before specifying supported formats with mpg123_format
+ * \param mh handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_format_none(mpg123_handle *mh);
+
+/** Configure mpg123 handle to accept all formats
+ * (also any custom rate you may set) -- this is default.
+ * \param mh handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_format_all(mpg123_handle *mh);
+
+/** Set the audio format support of a mpg123_handle in detail:
+ * \param mh handle
+ * \param rate The sample rate value (in Hertz).
+ * \param channels A combination of MPG123_STEREO and MPG123_MONO.
+ * \param encodings A combination of accepted encodings for rate and channels, p.ex MPG123_ENC_SIGNED16 | MPG123_ENC_ULAW_8 (or 0 for no support). Please note that some encodings may not be supported in the library build and thus will be ignored here.
+ * \return MPG123_OK on success, MPG123_ERR if there was an error. */
+MPG123_EXPORT int mpg123_format( mpg123_handle *mh
+, long rate, int channels, int encodings );
+
+/** Set the audio format support of a mpg123_handle in detail:
+ * \param mh handle
+ * \param rate The sample rate value (in Hertz). Special value 0 means
+ * all rates (the reason for this variant of mpg123_format()).
+ * \param channels A combination of MPG123_STEREO and MPG123_MONO.
+ * \param encodings A combination of accepted encodings for rate and channels,
+ * p.ex MPG123_ENC_SIGNED16 | MPG123_ENC_ULAW_8 (or 0 for no support).
+ * Please note that some encodings may not be supported in the library build
+ * and thus will be ignored here.
+ * \return MPG123_OK on success, MPG123_ERR if there was an error. */
+MPG123_EXPORT int mpg123_format2( mpg123_handle *mh
+, long rate, int channels, int encodings );
+
+/** Check to see if a specific format at a specific rate is supported
+ * by mpg123_handle.
+ * \param mh handle
+ * \param rate sampling rate
+ * \param encoding encoding
+ * \return 0 for no support (that includes invalid parameters), MPG123_STEREO,
+ * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */
+MPG123_EXPORT int mpg123_format_support( mpg123_handle *mh
+, long rate, int encoding );
+
+/** Get the current output format written to the addresses given.
+ * If the stream is freshly loaded, this will try to parse enough
+ * of it to give you the format to come. This clears the flag that
+ * would otherwise make the first decoding call return
+ * MPG123_NEW_FORMAT.
+ * \param mh handle
+ * \param rate sampling rate return address
+ * \param channels channel count return address
+ * \param encoding encoding return address
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_getformat( mpg123_handle *mh
+, long *rate, int *channels, int *encoding );
+
+/** Get the current output format written to the addresses given.
+ * This differs from plain mpg123_getformat() in that you can choose
+ * _not_ to clear the flag that would trigger the next decoding call
+ * to return MPG123_NEW_FORMAT in case of a new format arriving.
+ * \param mh handle
+ * \param rate sampling rate return address
+ * \param channels channel count return address
+ * \param encoding encoding return address
+ * \param clear_flag if true, clear internal format flag
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_getformat2( mpg123_handle *mh
+, long *rate, int *channels, int *encoding, int clear_flag );
+
+/*@}*/
+
+
+/** \defgroup mpg123_input mpg123 file input and decoding
+ *
+ * Functions for input bitstream and decoding operations.
+ * Decoding/seek functions may also return message codes MPG123_DONE, MPG123_NEW_FORMAT and MPG123_NEED_MORE (please read up on these on how to react!).
+ * @{
+ */
+
+/** Open a simple MPEG file with fixed properties.
+ *
+ * This function shall simplify the common use case of a plain MPEG
+ * file on disk that you want to decode, with one fixed sample
+ * rate and channel count, and usually a length defined by a Lame/Info/Xing
+ * tag. It will:
+ *
+ * - set the MPG123_NO_FRANKENSTEIN flag
+ * - set up format support according to given parameters,
+ * - open the file,
+ * - query audio format,
+ * - fix the audio format support table to ensure the format stays the same,
+ * - call mpg123_scan() if there is no header frame to tell the track length.
+ *
+ * From that on, you can call mpg123_getformat() for querying the sample
+ * rate (and channel count in case you allowed both) and mpg123_length()
+ * to get a pretty safe number for the duration.
+ * Only the sample rate is left open as that indeed is a fixed property of
+ * MPEG files. You could set MPG123_FORCE_RATE beforehand, but that may trigger
+ * low-quality resampling in the decoder, only do so if in dire need.
+ * The library will convert mono files to stereo for you, and vice versa.
+ * If any constraint cannot be satisified (most likely because of a non-default
+ * build of libmpg123), you get MPG123_ERR returned and can query the detailed
+ * cause from the handle. Only on MPG123_OK there will an open file that you
+ * then close using mpg123_close(), or implicitly on mpg123_delete() or the next
+ * call to open another file.
+ *
+ * So, for your usual CD rip collection, you could use
+ *
+ * mpg123_open_fixed(mh, path, MPG123_STEREO, MPG123_ENC_SIGNED_16)
+ *
+ * and be happy calling mpg123_getformat() to verify 44100 Hz rate, then just
+ * playing away with mpg123_read(). The occasional mono file, or MP2 file,
+ * will also be decoded without you really noticing. Just the speed could be
+ * wrong if you do not care about sample rate at all.
+ * \param mh handle
+ * \param path filesystem path
+ * \param channels allowed channel count, either 1 (MPG123_MONO) or
+ * 2 (MPG123_STEREO), or bitwise or of them, but then you're halfway back to
+ * calling mpg123_format() again;-)
+ * \param encoding a definite encoding from enum mpg123_enc_enum
+ * or a bitmask like for mpg123_format(), defeating the purpose somewhat
+ */
+MPG123_EXPORT int mpg123_open_fixed(mpg123_handle *mh, const char *path
+, int channels, int encoding);
+
+/** Open and prepare to decode the specified file by filesystem path.
+ * This does not open HTTP urls; libmpg123 contains no networking code.
+ * If you want to decode internet streams, use mpg123_open_fd() or mpg123_open_feed().
+ * \param mh handle
+ * \param path filesystem path
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_open(mpg123_handle *mh, const char *path);
+
+/** Use an already opened file descriptor as the bitstream input
+ * mpg123_close() will _not_ close the file descriptor.
+ * \param mh handle
+ * \param fd file descriptor
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_open_fd(mpg123_handle *mh, int fd);
+
+/** Use an opaque handle as bitstream input. This works only with the
+ * replaced I/O from mpg123_replace_reader_handle()!
+ * mpg123_close() will call the cleanup callback for your handle (if you gave one).
+ * \param mh handle
+ * \param iohandle your handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_open_handle(mpg123_handle *mh, void *iohandle);
+
+/** Open a new bitstream and prepare for direct feeding
+ * This works together with mpg123_decode(); you are responsible for reading and feeding the input bitstream.
+ * Also, you are expected to handle ICY metadata extraction yourself. This
+ * input method does not handle MPG123_ICY_INTERVAL. It does parse ID3 frames, though.
+ * \param mh handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_open_feed(mpg123_handle *mh);
+
+/** Closes the source, if libmpg123 opened it.
+ * \param mh handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_close(mpg123_handle *mh);
+
+/** Read from stream and decode up to outmemsize bytes.
+ *
+ * Note: The type of outmemory changed to a void pointer in mpg123 1.26.0
+ * (API version 45).
+ *
+ * \param mh handle
+ * \param outmemory address of output buffer to write to
+ * \param outmemsize maximum number of bytes to write
+ * \param done address to store the number of actually decoded bytes to
+ * \return MPG123_OK or error/message code
+ */
+MPG123_EXPORT int mpg123_read(mpg123_handle *mh
+, void *outmemory, size_t outmemsize, size_t *done );
+
+/** Feed data for a stream that has been opened with mpg123_open_feed().
+ * It's give and take: You provide the bytestream, mpg123 gives you the decoded samples.
+ * \param mh handle
+ * \param in input buffer
+ * \param size number of input bytes
+ * \return MPG123_OK or error/message code.
+ */
+MPG123_EXPORT int mpg123_feed( mpg123_handle *mh
+, const unsigned char *in, size_t size );
+
+/** Decode MPEG Audio from inmemory to outmemory.
+ * This is very close to a drop-in replacement for old mpglib.
+ * When you give zero-sized output buffer the input will be parsed until
+ * decoded data is available. This enables you to get MPG123_NEW_FORMAT (and query it)
+ * without taking decoded data.
+ * Think of this function being the union of mpg123_read() and mpg123_feed() (which it actually is, sort of;-).
+ * You can actually always decide if you want those specialized functions in separate steps or one call this one here.
+ *
+ * Note: The type of outmemory changed to a void pointer in mpg123 1.26.0
+ * (API version 45).
+ *
+ * \param mh handle
+ * \param inmemory input buffer
+ * \param inmemsize number of input bytes
+ * \param outmemory output buffer
+ * \param outmemsize maximum number of output bytes
+ * \param done address to store the number of actually decoded bytes to
+ * \return error/message code (watch out especially for MPG123_NEED_MORE)
+ */
+MPG123_EXPORT int mpg123_decode( mpg123_handle *mh
+, const unsigned char *inmemory, size_t inmemsize
+, void *outmemory, size_t outmemsize, size_t *done );
+
+/** Decode next MPEG frame to internal buffer
+ * or read a frame and return after setting a new format.
+ * \param mh handle
+ * \param num current frame offset gets stored there
+ * \param audio This pointer is set to the internal buffer to read the decoded audio from.
+ * \param bytes number of output bytes ready in the buffer
+ * \return MPG123_OK or error/message code
+ */
+MPG123_EXPORT int mpg123_decode_frame( mpg123_handle *mh
+, off_t *num, unsigned char **audio, size_t *bytes );
+
+/** Decode current MPEG frame to internal buffer.
+ * Warning: This is experimental API that might change in future releases!
+ * Please watch mpg123 development closely when using it.
+ * \param mh handle
+ * \param num last frame offset gets stored there
+ * \param audio this pointer is set to the internal buffer to read the decoded audio from.
+ * \param bytes number of output bytes ready in the buffer
+ * \return MPG123_OK or error/message code
+ */
+MPG123_EXPORT int mpg123_framebyframe_decode( mpg123_handle *mh
+, off_t *num, unsigned char **audio, size_t *bytes );
+
+/** Find, read and parse the next mp3 frame
+ * Warning: This is experimental API that might change in future releases!
+ * Please watch mpg123 development closely when using it.
+ * \param mh handle
+ * \return MPG123_OK or error/message code
+ */
+MPG123_EXPORT int mpg123_framebyframe_next(mpg123_handle *mh);
+
+/** Get access to the raw input data for the last parsed frame.
+ * This gives you a direct look (and write access) to the frame body data.
+ * Together with the raw header, you can reconstruct the whole raw MPEG stream without junk and meta data, or play games by actually modifying the frame body data before decoding this frame (mpg123_framebyframe_decode()).
+ * A more sane use would be to use this for CRC checking (see mpg123_info() and MPG123_CRC), the first two bytes of the body make up the CRC16 checksum, if present.
+ * You can provide NULL for a parameter pointer when you are not interested in the value.
+ *
+ * \param mh handle
+ * \param header the 4-byte MPEG header
+ * \param bodydata pointer to the frame body stored in the handle (without the header)
+ * \param bodybytes size of frame body in bytes (without the header)
+ * \return MPG123_OK if there was a yet un-decoded frame to get the
+ * data from, MPG123_BAD_HANDLE or MPG123_ERR otherwise (without further
+ * explanation, the error state of the mpg123_handle is not modified by
+ * this function).
+ */
+MPG123_EXPORT int mpg123_framedata( mpg123_handle *mh
+, unsigned long *header, unsigned char **bodydata, size_t *bodybytes );
+
+/** Get the input position (byte offset in stream) of the last parsed frame.
+ * This can be used for external seek index building, for example.
+ * It just returns the internally stored offset, regardless of validity --
+ * you ensure that a valid frame has been parsed before!
+ * \param mh handle
+ * \return byte offset in stream
+ */
+MPG123_EXPORT off_t mpg123_framepos(mpg123_handle *mh);
+
+/*@}*/
+
+
+/** \defgroup mpg123_seek mpg123 position and seeking
+ *
+ * Functions querying and manipulating position in the decoded audio bitstream.
+ * The position is measured in decoded audio samples, or MPEG frame offset for the specific functions.
+ * If gapless code is in effect, the positions are adjusted to compensate the skipped padding/delay - meaning, you should not care about that at all and just use the position defined for the samples you get out of the decoder;-)
+ * The general usage is modelled after stdlib's ftell() and fseek().
+ * Especially, the whence parameter for the seek functions has the same meaning as the one for fseek() and needs the same constants from stdlib.h:
+ * - SEEK_SET: set position to (or near to) specified offset
+ * - SEEK_CUR: change position by offset from now
+ * - SEEK_END: set position to offset from end
+ *
+ * Note that sample-accurate seek only works when gapless support has been enabled at compile time; seek is frame-accurate otherwise.
+ * Also, really sample-accurate seeking (meaning that you get the identical sample value after seeking compared to plain decoding up to the position) is only guaranteed when you do not mess with the position code by using MPG123_UPSPEED, MPG123_DOWNSPEED or MPG123_START_FRAME. The first two mainly should cause trouble with NtoM resampling, but in any case with these options in effect, you have to keep in mind that the sample offset is not the same as counting the samples you get from decoding since mpg123 counts the skipped samples, too (or the samples played twice only once)!
+ * Short: When you care about the sample position, don't mess with those parameters;-)
+ * Also, seeking is not guaranteed to work for all streams (underlying stream may not support it).
+ * And yet another caveat: If the stream is concatenated out of differing pieces (Frankenstein stream), seeking may suffer, too.
+ *
+ * @{
+ */
+
+/** Returns the current position in samples.
+ * On the next successful read, you'd get that sample.
+ * \param mh handle
+ * \return sample offset or MPG123_ERR (null handle)
+ */
+MPG123_EXPORT off_t mpg123_tell(mpg123_handle *mh);
+
+/** Returns the frame number that the next read will give you data from.
+ * \param mh handle
+ * \return frame offset or MPG123_ERR (null handle)
+ */
+MPG123_EXPORT off_t mpg123_tellframe(mpg123_handle *mh);
+
+/** Returns the current byte offset in the input stream.
+ * \param mh handle
+ * \return byte offset or MPG123_ERR (null handle)
+ */
+MPG123_EXPORT off_t mpg123_tell_stream(mpg123_handle *mh);
+
+/** Seek to a desired sample offset.
+ * Usage is modelled afer the standard lseek().
+ * \param mh handle
+ * \param sampleoff offset in PCM samples
+ * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END
+ * \return The resulting offset >= 0 or error/message code
+ */
+MPG123_EXPORT off_t mpg123_seek( mpg123_handle *mh
+, off_t sampleoff, int whence );
+
+/** Seek to a desired sample offset in data feeding mode.
+ * This just prepares things to be right only if you ensure that the next chunk of input data will be from input_offset byte position.
+ * \param mh handle
+ * \param sampleoff offset in PCM samples
+ * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END
+ * \param input_offset The position it expects to be at the
+ * next time data is fed to mpg123_decode().
+ * \return The resulting offset >= 0 or error/message code */
+MPG123_EXPORT off_t mpg123_feedseek( mpg123_handle *mh
+, off_t sampleoff, int whence, off_t *input_offset );
+
+/** Seek to a desired MPEG frame offset.
+ * Usage is modelled afer the standard lseek().
+ * \param mh handle
+ * \param frameoff offset in MPEG frames
+ * \param whence one of SEEK_SET, SEEK_CUR or SEEK_END
+ * \return The resulting offset >= 0 or error/message code */
+MPG123_EXPORT off_t mpg123_seek_frame( mpg123_handle *mh
+, off_t frameoff, int whence );
+
+/** Return a MPEG frame offset corresponding to an offset in seconds.
+ * This assumes that the samples per frame do not change in the file/stream, which is a good assumption for any sane file/stream only.
+ * \return frame offset >= 0 or error/message code */
+MPG123_EXPORT off_t mpg123_timeframe(mpg123_handle *mh, double sec);
+
+/** Give access to the frame index table that is managed for seeking.
+ * You are asked not to modify the values... Use mpg123_set_index to set the
+ * seek index
+ * \param mh handle
+ * \param offsets pointer to the index array
+ * \param step one index byte offset advances this many MPEG frames
+ * \param fill number of recorded index offsets; size of the array
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_index( mpg123_handle *mh
+, off_t **offsets, off_t *step, size_t *fill );
+
+/** Set the frame index table
+ * Setting offsets to NULL and fill > 0 will allocate fill entries. Setting offsets
+ * to NULL and fill to 0 will clear the index and free the allocated memory used by the index.
+ * \param mh handle
+ * \param offsets pointer to the index array
+ * \param step one index byte offset advances this many MPEG frames
+ * \param fill number of recorded index offsets; size of the array
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_set_index( mpg123_handle *mh
+, off_t *offsets, off_t step, size_t fill );
+
+/** An old crutch to keep old mpg123 binaries happy.
+ * WARNING: This function is there only to avoid runtime linking errors with
+ * standalone mpg123 before version 1.23.0 (if you strangely update the
+ * library but not the end-user program) and actually is broken
+ * for various cases (p.ex. 24 bit output). Do never use. It might eventually
+ * be purged from the library.
+ */
+MPG123_EXPORT int mpg123_position( mpg123_handle *mh, off_t frame_offset, off_t buffered_bytes, off_t *current_frame, off_t *frames_left, double *current_seconds, double *seconds_left);
+
+/*@}*/
+
+
+/** \defgroup mpg123_voleq mpg123 volume and equalizer
+ *
+ * @{
+ */
+
+/** another channel enumeration, for left/right choice */
+enum mpg123_channels
+{
+ MPG123_LEFT=0x1 /**< The Left Channel. */
+ ,MPG123_RIGHT=0x2 /**< The Right Channel. */
+ ,MPG123_LR=0x3 /**< Both left and right channel; same as MPG123_LEFT|MPG123_RIGHT */
+};
+
+/** Set the 32 Band Audio Equalizer settings.
+ * \param mh handle
+ * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for both.
+ * \param band The equaliser band to change (from 0 to 31)
+ * \param val The (linear) adjustment factor.
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_eq( mpg123_handle *mh
+, enum mpg123_channels channel, int band, double val );
+
+/** Get the 32 Band Audio Equalizer settings.
+ * \param mh handle
+ * \param channel Can be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for (arithmetic mean of) both.
+ * \param band The equaliser band to change (from 0 to 31)
+ * \return The (linear) adjustment factor (zero for pad parameters) */
+MPG123_EXPORT double mpg123_geteq(mpg123_handle *mh
+ , enum mpg123_channels channel, int band);
+
+/** Reset the 32 Band Audio Equalizer settings to flat
+ * \param mh handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_reset_eq(mpg123_handle *mh);
+
+/** Set the absolute output volume including the RVA setting,
+ * vol<0 just applies (a possibly changed) RVA setting.
+ * \param mh handle
+ * \param vol volume value (linear factor)
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_volume(mpg123_handle *mh, double vol);
+
+/** Adjust output volume including the RVA setting by chosen amount
+ * \param mh handle
+ * \param change volume value (linear factor increment)
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_volume_change(mpg123_handle *mh, double change);
+
+/** Return current volume setting, the actual value due to RVA, and the RVA
+ * adjustment itself. It's all as double float value to abstract the sample
+ * format. The volume values are linear factors / amplitudes (not percent)
+ * and the RVA value is in decibels.
+ * \param mh handle
+ * \param base return address for base volume (linear factor)
+ * \param really return address for actual volume (linear factor)
+ * \param rva_db return address for RVA value (decibels)
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_getvolume(mpg123_handle *mh, double *base, double *really, double *rva_db);
+
+/* TODO: Set some preamp in addition / to replace internal RVA handling? */
+
+/*@}*/
+
+
+/** \defgroup mpg123_status mpg123 status and information
+ *
+ * @{
+ */
+
+/** Enumeration of the mode types of Variable Bitrate */
+enum mpg123_vbr {
+ MPG123_CBR=0, /**< Constant Bitrate Mode (default) */
+ MPG123_VBR, /**< Variable Bitrate Mode */
+ MPG123_ABR /**< Average Bitrate Mode */
+};
+
+/** Enumeration of the MPEG Versions */
+enum mpg123_version {
+ MPG123_1_0=0, /**< MPEG Version 1.0 */
+ MPG123_2_0, /**< MPEG Version 2.0 */
+ MPG123_2_5 /**< MPEG Version 2.5 */
+};
+
+
+/** Enumeration of the MPEG Audio mode.
+ * Only the mono mode has 1 channel, the others have 2 channels. */
+enum mpg123_mode {
+ MPG123_M_STEREO=0, /**< Standard Stereo. */
+ MPG123_M_JOINT, /**< Joint Stereo. */
+ MPG123_M_DUAL, /**< Dual Channel. */
+ MPG123_M_MONO /**< Single Channel. */
+};
+
+
+/** Enumeration of the MPEG Audio flag bits */
+enum mpg123_flags {
+ MPG123_CRC=0x1, /**< The bitstream is error protected using 16-bit CRC. */
+ MPG123_COPYRIGHT=0x2, /**< The bitstream is copyrighted. */
+ MPG123_PRIVATE=0x4, /**< The private bit has been set. */
+ MPG123_ORIGINAL=0x8 /**< The bitstream is an original, not a copy. */
+};
+
+/** Data structure for storing information about a frame of MPEG Audio */
+struct mpg123_frameinfo
+{
+ enum mpg123_version version; /**< The MPEG version (1.0/2.0/2.5). */
+ int layer; /**< The MPEG Audio Layer (MP1/MP2/MP3). */
+ long rate; /**< The sampling rate in Hz. */
+ enum mpg123_mode mode; /**< The audio mode (Mono, Stereo, Joint-stero, Dual Channel). */
+ int mode_ext; /**< The mode extension bit flag. */
+ int framesize; /**< The size of the frame (in bytes, including header). */
+ enum mpg123_flags flags; /**< MPEG Audio flag bits. Just now I realize that it should be declared as int, not enum. It's a bitwise combination of the enum values. */
+ int emphasis; /**< The emphasis type. */
+ int bitrate; /**< Bitrate of the frame (kbps). */
+ int abr_rate; /**< The target average bitrate. */
+ enum mpg123_vbr vbr; /**< The VBR mode. */
+};
+
+/** Data structure for even more detailed information out of the decoder,
+ * for MPEG layer III only.
+ * This was added to support the frame analyzer by the Lame project and
+ * just follows what was used there before. You know what the fields mean
+ * if you want use this structure. */
+struct mpg123_moreinfo
+{
+ double xr[2][2][576];
+ double sfb[2][2][22]; /* [2][2][SBMAX_l] */
+ double sfb_s[2][2][3*13]; /* [2][2][3*SBMAX_s] */
+ int qss[2][2];
+ int big_values[2][2];
+ int sub_gain[2][2][3];
+ int scalefac_scale[2][2];
+ int preflag[2][2];
+ int blocktype[2][2];
+ int mixed[2][2];
+ int mainbits[2][2];
+ int sfbits[2][2];
+ int scfsi[2];
+ int maindata;
+ int padding;
+};
+
+/** Get frame information about the MPEG audio bitstream and store it in a mpg123_frameinfo structure.
+ * \param mh handle
+ * \param mi address of existing frameinfo structure to write to
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_info(mpg123_handle *mh, struct mpg123_frameinfo *mi);
+
+/** Trigger collection of additional decoder information while decoding.
+ * \param mh handle
+ * \param mi pointer to data storage (NULL to disable collection)
+ * \return MPG123_OK if the collection was enabled/disabled as desired, MPG123_ERR
+ * otherwise (e.g. if the feature is disabled)
+ */
+MPG123_EXPORT int mpg123_set_moreinfo( mpg123_handle *mh
+, struct mpg123_moreinfo *mi );
+
+/** Get the safe output buffer size for all cases
+ * (when you want to replace the internal buffer)
+ * \return safe buffer size
+ */
+MPG123_EXPORT size_t mpg123_safe_buffer(void);
+
+/** Make a full parsing scan of each frame in the file. ID3 tags are found. An
+ * accurate length value is stored. Seek index will be filled. A seek back to
+ * current position is performed. At all, this function refuses work when
+ * stream is not seekable.
+ * \param mh handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_scan(mpg123_handle *mh);
+
+/** Return, if possible, the full (expected) length of current track in
+ * MPEG frames.
+ * \param mh handle
+ * \return length >= 0 or MPG123_ERR if there is no length guess possible.
+ */
+MPG123_EXPORT off_t mpg123_framelength(mpg123_handle *mh);
+
+/** Return, if possible, the full (expected) length of current
+ * track in samples (PCM frames).
+ *
+ * This relies either on an Info frame at the beginning or a previous
+ * call to mpg123_scan() to get the real number of MPEG frames in a
+ * file. It will guess based on file size if neither Info frame nor
+ * scan data are present. In any case, there is no guarantee that the
+ * decoder will not give you more data, for example in case the open
+ * file gets appended to during decoding.
+ * \param mh handle
+ * \return length >= 0 or MPG123_ERR if there is no length guess possible.
+ */
+MPG123_EXPORT off_t mpg123_length(mpg123_handle *mh);
+
+/** Override the value for file size in bytes.
+ * Useful for getting sensible track length values in feed mode or for HTTP streams.
+ * \param mh handle
+ * \param size file size in bytes
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_set_filesize(mpg123_handle *mh, off_t size);
+
+/** Get MPEG frame duration in seconds.
+ * \param mh handle
+ * \return frame duration in seconds, <0 on error
+ */
+MPG123_EXPORT double mpg123_tpf(mpg123_handle *mh);
+
+/** Get MPEG frame duration in samples.
+ * \param mh handle
+ * \return samples per frame for the most recently parsed frame; <0 on errors
+ */
+MPG123_EXPORT int mpg123_spf(mpg123_handle *mh);
+
+/** Get and reset the clip count.
+ * \param mh handle
+ * \return count of clipped samples
+ */
+MPG123_EXPORT long mpg123_clip(mpg123_handle *mh);
+
+
+/** The key values for state information from mpg123_getstate(). */
+enum mpg123_state
+{
+ MPG123_ACCURATE = 1 /**< Query if positons are currently accurate (integer value, 0 if false, 1 if true). */
+ ,MPG123_BUFFERFILL /**< Get fill of internal (feed) input buffer as integer byte count returned as long and as double. An error is returned on integer overflow while converting to (signed) long, but the returned floating point value shold still be fine. */
+ ,MPG123_FRANKENSTEIN /**< Stream consists of carelessly stitched together files. Seeking may yield unexpected results (also with MPG123_ACCURATE, it may be confused). */
+ ,MPG123_FRESH_DECODER /**< Decoder structure has been updated, possibly indicating changed stream (integer value, 0 if false, 1 if true). Flag is cleared after retrieval. */
+ ,MPG123_ENC_DELAY /** Encoder delay read from Info tag (layer III, -1 if unknown). */
+ ,MPG123_ENC_PADDING /** Encoder padding read from Info tag (layer III, -1 if unknown). */
+ ,MPG123_DEC_DELAY /** Decoder delay (for layer III only, -1 otherwise). */
+};
+
+/** Get various current decoder/stream state information.
+ * \param mh handle
+ * \param key the key to identify the information to give.
+ * \param val the address to return (long) integer values to
+ * \param fval the address to return floating point values to
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_getstate( mpg123_handle *mh
+, enum mpg123_state key, long *val, double *fval );
+
+/*@}*/
+
+
+/** \defgroup mpg123_metadata mpg123 metadata handling
+ *
+ * Functions to retrieve the metadata from MPEG Audio files and streams.
+ * Also includes string handling functions.
+ *
+ * @{
+ */
+
+/** Data structure for storing strings in a safer way than a standard C-String.
+ * Can also hold a number of null-terminated strings. */
+typedef struct
+{
+ char* p; /**< pointer to the string data */
+ size_t size; /**< raw number of bytes allocated */
+ size_t fill; /**< number of used bytes (including closing zero byte) */
+} mpg123_string;
+
+/** Allocate and intialize a new string.
+ * \param val optional initial string value (can be NULL)
+ */
+MPG123_EXPORT mpg123_string* mpg123_new_string(const char* val);
+
+/** Free memory of contents and the string structure itself.
+ * \param sb string handle
+ */
+MPG123_EXPORT void mpg123_delete_string(mpg123_string* sb);
+
+/** Initialize an existing mpg123_string structure to {NULL, 0, 0}.
+ * If you hand in a NULL pointer here, your program should crash. The other
+ * string functions are more forgiving, but this one here is too basic.
+ * \param sb string handle (address of existing structure on your side)
+ */
+MPG123_EXPORT void mpg123_init_string(mpg123_string* sb);
+
+/** Free-up memory of the contents of an mpg123_string (not the struct itself).
+ * This also calls mpg123_init_string() and hence is safe to be called
+ * repeatedly.
+ * \param sb string handle
+ */
+MPG123_EXPORT void mpg123_free_string(mpg123_string* sb);
+
+/** Change the size of a mpg123_string
+ * \param sb string handle
+ * \param news new size in bytes
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_resize_string(mpg123_string* sb, size_t news);
+
+/** Increase size of a mpg123_string if necessary (it may stay larger).
+ * Note that the functions for adding and setting in current libmpg123
+ * use this instead of mpg123_resize_string().
+ * That way, you can preallocate memory and safely work afterwards with
+ * pieces.
+ * \param sb string handle
+ * \param news new minimum size
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_grow_string(mpg123_string* sb, size_t news);
+
+/** Copy the contents of one mpg123_string string to another.
+ * Yes the order of arguments is reversed compated to memcpy().
+ * \param from string handle
+ * \param to string handle
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_copy_string(mpg123_string* from, mpg123_string* to);
+
+/** Move the contents of one mpg123_string string to another.
+ * This frees any memory associated with the target and moves over the
+ * pointers from the source, leaving the source without content after
+ * that. The only possible error is that you hand in NULL pointers.
+ * If you handed in a valid source, its contents will be gone, even if
+ * there was no target to move to. If you hand in a valid target, its
+ * original contents will also always be gone, to be replaced with the
+ * source's contents if there was some.
+ * \param from source string handle
+ * \param to target string handle
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_move_string(mpg123_string* from, mpg123_string* to);
+
+/** Append a C-String to an mpg123_string
+ * \param sb string handle
+ * \param stuff to append
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_add_string(mpg123_string* sb, const char* stuff);
+
+/** Append a C-substring to an mpg123 string
+ * \param sb string handle
+ * \param stuff content to copy
+ * \param from offset to copy from
+ * \param count number of characters to copy (a null-byte is always appended)
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_add_substring( mpg123_string *sb
+, const char *stuff, size_t from, size_t count );
+
+/** Set the content of a mpg123_string to a C-string
+ * \param sb string handle
+ * \param stuff content to copy
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_set_string(mpg123_string* sb, const char* stuff);
+
+/** Set the content of a mpg123_string to a C-substring
+ * \param sb string handle
+ * \param stuff the future content
+ * \param from offset to copy from
+ * \param count number of characters to copy (a null-byte is always appended)
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_set_substring( mpg123_string *sb
+, const char *stuff, size_t from, size_t count );
+
+/** Count characters in a mpg123 string (non-null bytes or Unicode points).
+ * This function is of limited use, as it does just count code points
+ * encoded in an UTF-8 string, only loosely related to the count of visible
+ * characters. Get your full Unicode handling support elsewhere.
+ * \param sb string handle
+ * \param utf8 a flag to tell if the string is in utf8 encoding
+ * \return character count
+*/
+MPG123_EXPORT size_t mpg123_strlen(mpg123_string *sb, int utf8);
+
+/** Remove trailing \\r and \\n, if present.
+ * \param sb string handle
+ * \return 0 on error, 1 on success
+ */
+MPG123_EXPORT int mpg123_chomp_string(mpg123_string *sb);
+
+/** Determine if two strings contain the same data.
+ * This only returns 1 if both given handles are non-NULL and
+ * if they are filled with the same bytes.
+ * \param a first string handle
+ * \param b second string handle
+ * \return 0 for different strings, 1 for identical
+ */
+MPG123_EXPORT int mpg123_same_string(mpg123_string *a, mpg123_string *b);
+
+/** The mpg123 text encodings. This contains encodings we encounter in ID3 tags or ICY meta info. */
+enum mpg123_text_encoding
+{
+ mpg123_text_unknown = 0 /**< Unkown encoding... mpg123_id3_encoding can return that on invalid codes. */
+ ,mpg123_text_utf8 = 1 /**< UTF-8 */
+ ,mpg123_text_latin1 = 2 /**< ISO-8859-1. Note that sometimes latin1 in ID3 is abused for totally different encodings. */
+ ,mpg123_text_icy = 3 /**< ICY metadata encoding, usually CP-1252 but we take it as UTF-8 if it qualifies as such. */
+ ,mpg123_text_cp1252 = 4 /**< Really CP-1252 without any guessing. */
+ ,mpg123_text_utf16 = 5 /**< Some UTF-16 encoding. The last of a set of leading BOMs (byte order mark) rules.
+ * When there is no BOM, big endian ordering is used. Note that UCS-2 qualifies as UTF-8 when
+ * you don't mess with the reserved code points. If you want to decode little endian data
+ * without BOM you need to prepend 0xff 0xfe yourself. */
+ ,mpg123_text_utf16bom = 6 /**< Just an alias for UTF-16, ID3v2 has this as distinct code. */
+ ,mpg123_text_utf16be = 7 /**< Another alias for UTF16 from ID3v2. Note, that, because of the mess that is reality,
+ * BOMs are used if encountered. There really is not much distinction between the UTF16 types for mpg123
+ * One exception: Since this is seen in ID3v2 tags, leading null bytes are skipped for all other UTF16
+ * types (we expect a BOM before real data there), not so for utf16be!*/
+ ,mpg123_text_max = 7 /**< Placeholder for the maximum encoding value. */
+};
+
+/** The encoding byte values from ID3v2. */
+enum mpg123_id3_enc
+{
+ mpg123_id3_latin1 = 0 /**< Note: This sometimes can mean anything in practice... */
+ ,mpg123_id3_utf16bom = 1 /**< UTF16, UCS-2 ... it's all the same for practical purposes. */
+ ,mpg123_id3_utf16be = 2 /**< Big-endian UTF-16, BOM see note for mpg123_text_utf16be. */
+ ,mpg123_id3_utf8 = 3 /**< Our lovely overly ASCII-compatible 8 byte encoding for the world. */
+ ,mpg123_id3_enc_max = 3 /**< Placeholder to check valid range of encoding byte. */
+};
+
+/** Convert ID3 encoding byte to mpg123 encoding index.
+ * \param id3_enc_byte the ID3 encoding code
+ * \return the mpg123 encoding index
+ */
+
+MPG123_EXPORT enum mpg123_text_encoding mpg123_enc_from_id3(unsigned char id3_enc_byte);
+
+/** Store text data in string, after converting to UTF-8 from indicated encoding
+ * A prominent error can be that you provided an unknown encoding value, or this build of libmpg123 lacks support for certain encodings (ID3 or ICY stuff missing).
+ * Also, you might want to take a bit of care with preparing the data; for example, strip leading zeroes (I have seen that).
+ * \param sb target string
+ * \param enc mpg123 text encoding value
+ * \param source source buffer with plain unsigned bytes (you might need to cast from signed char)
+ * \param source_size number of bytes in the source buffer
+ * \return 0 on error, 1 on success (on error, mpg123_free_string is called on sb)
+ */
+MPG123_EXPORT int mpg123_store_utf8(mpg123_string *sb, enum mpg123_text_encoding enc, const unsigned char *source, size_t source_size);
+
+/** Sub data structure for ID3v2, for storing various text fields (including comments).
+ * This is for ID3v2 COMM, TXXX and all the other text fields.
+ * Only COMM, TXXX and USLT may have a description, only COMM and USLT
+ * have a language.
+ * You should consult the ID3v2 specification for the use of the various text fields
+ * ("frames" in ID3v2 documentation, I use "fields" here to separate from MPEG frames). */
+typedef struct
+{
+ char lang[3]; /**< Three-letter language code (not terminated). */
+ char id[4]; /**< The ID3v2 text field id, like TALB, TPE2, ... (4 characters, no string termination). */
+ mpg123_string description; /**< Empty for the generic comment... */
+ mpg123_string text; /**< ... */
+} mpg123_text;
+
+/** The picture type values from ID3v2. */
+enum mpg123_id3_pic_type
+{
+ mpg123_id3_pic_other = 0 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_icon = 1 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_other_icon = 2 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_front_cover = 3 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_back_cover = 4 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_leaflet = 5 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_media = 6 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_lead = 7 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_artist = 8 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_conductor = 9 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_orchestra = 10 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_composer = 11 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_lyricist = 12 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_location = 13 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_recording = 14 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_performance = 15 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_video = 16 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_fish = 17 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_illustration = 18 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_artist_logo = 19 /**< see ID3v2 docs */
+ ,mpg123_id3_pic_publisher_logo = 20 /**< see ID3v2 docs */
+};
+
+/** Sub data structure for ID3v2, for storing picture data including comment.
+ * This is for the ID3v2 APIC field. You should consult the ID3v2 specification
+ * for the use of the APIC field ("frames" in ID3v2 documentation, I use "fields"
+ * here to separate from MPEG frames). */
+typedef struct
+{
+ char type; /**< mpg123_id3_pic_type value */
+ mpg123_string description; /**< description string */
+ mpg123_string mime_type; /**< MIME type */
+ size_t size; /**< size in bytes */
+ unsigned char* data; /**< pointer to the image data */
+} mpg123_picture;
+
+/** Data structure for storing IDV3v2 tags.
+ * This structure is not a direct binary mapping with the file contents.
+ * The ID3v2 text frames are allowed to contain multiple strings.
+ * So check for null bytes until you reach the mpg123_string fill.
+ * All text is encoded in UTF-8. */
+typedef struct
+{
+ unsigned char version; /**< 3 or 4 for ID3v2.3 or ID3v2.4. */
+ mpg123_string *title; /**< Title string (pointer into text_list). */
+ mpg123_string *artist; /**< Artist string (pointer into text_list). */
+ mpg123_string *album; /**< Album string (pointer into text_list). */
+ mpg123_string *year; /**< The year as a string (pointer into text_list). */
+ mpg123_string *genre; /**< Genre String (pointer into text_list). The genre string(s) may very well need postprocessing, esp. for ID3v2.3. */
+ mpg123_string *comment; /**< Pointer to last encountered comment text with empty description. */
+ /* Encountered ID3v2 fields are appended to these lists.
+ There can be multiple occurences, the pointers above always point to the last encountered data. */
+ mpg123_text *comment_list; /**< Array of comments. */
+ size_t comments; /**< Number of comments. */
+ mpg123_text *text; /**< Array of ID3v2 text fields (including USLT) */
+ size_t texts; /**< Numer of text fields. */
+ mpg123_text *extra; /**< The array of extra (TXXX) fields. */
+ size_t extras; /**< Number of extra text (TXXX) fields. */
+ mpg123_picture *picture; /**< Array of ID3v2 pictures fields (APIC).
+ Only populated if MPG123_PICTURE flag is set! */
+ size_t pictures; /**< Number of picture (APIC) fields. */
+} mpg123_id3v2;
+
+/** Data structure for ID3v1 tags (the last 128 bytes of a file).
+ * Don't take anything for granted (like string termination)!
+ * Also note the change ID3v1.1 did: comment[28] = 0; comment[29] = track_number
+ * It is your task to support ID3v1 only or ID3v1.1 ...*/
+typedef struct
+{
+ char tag[3]; /**< Always the string "TAG", the classic intro. */
+ char title[30]; /**< Title string. */
+ char artist[30]; /**< Artist string. */
+ char album[30]; /**< Album string. */
+ char year[4]; /**< Year string. */
+ char comment[30]; /**< Comment string. */
+ unsigned char genre; /**< Genre index. */
+} mpg123_id3v1;
+
+#define MPG123_ID3 0x3 /**< 0011 There is some ID3 info. Also matches 0010 or NEW_ID3. */
+#define MPG123_NEW_ID3 0x1 /**< 0001 There is ID3 info that changed since last call to mpg123_id3. */
+#define MPG123_ICY 0xc /**< 1100 There is some ICY info. Also matches 0100 or NEW_ICY.*/
+#define MPG123_NEW_ICY 0x4 /**< 0100 There is ICY info that changed since last call to mpg123_icy. */
+
+/** Query if there is (new) meta info, be it ID3 or ICY (or something new in future).
+ * \param mh handle
+ * \return combination of flags, 0 on error (same as "nothing new")
+ */
+MPG123_EXPORT int mpg123_meta_check(mpg123_handle *mh);
+
+/** Clean up meta data storage (ID3v2 and ICY), freeing memory.
+ * \param mh handle
+ */
+MPG123_EXPORT void mpg123_meta_free(mpg123_handle *mh);
+
+/** Point v1 and v2 to existing data structures wich may change on any next read/decode function call.
+ * v1 and/or v2 can be set to NULL when there is no corresponding data.
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_id3( mpg123_handle *mh
+, mpg123_id3v1 **v1, mpg123_id3v2 **v2 );
+
+/** Return pointers to and size of stored raw ID3 data if storage has
+ * been configured with MPG123_RAW_ID3 and stream parsing passed the
+ * metadata already. Null value with zero size is a possibility!
+ * The storage can change at any next API call.
+ * \param v1 address to store pointer to v1 tag
+ * \param v1_size size of v1 data in bytes
+ * \param v2 address to store pointer to v2 tag
+ * \param v2_size size of v2 data in bytes
+ * \return MPG123_OK or MPG123_ERR. Only on MPG123_OK the output
+ * values are set.
+ */
+MPG123_EXPORT int mpg123_id3_raw( mpg123_handle *mh
+, unsigned char **v1, size_t *v1_size
+, unsigned char **v2, size_t *v2_size );
+
+/** Point icy_meta to existing data structure wich may change on any next read/decode function call.
+ * \param mh handle
+ * \param icy_meta return address for ICY meta string (set to NULL if nothing there)
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_icy(mpg123_handle *mh, char **icy_meta);
+
+/** Decode from windows-1252 (the encoding ICY metainfo used) to UTF-8.
+ * Note that this is very similar to mpg123_store_utf8(&sb, mpg123_text_icy, icy_text, strlen(icy_text+1)) .
+ * \param icy_text The input data in ICY encoding
+ * \return pointer to newly allocated buffer with UTF-8 data (You free() it!) */
+MPG123_EXPORT char* mpg123_icy2utf8(const char* icy_text);
+
+
+/* @} */
+
+
+/** \defgroup mpg123_advpar mpg123 advanced parameter API
+ *
+ * Direct access to a parameter set without full handle around it.
+ * Possible uses:
+ * - Influence behaviour of library _during_ initialization of handle (MPG123_VERBOSE).
+ * - Use one set of parameters for multiple handles.
+ *
+ * The functions for handling mpg123_pars (mpg123_par() and mpg123_fmt()
+ * family) directly return a fully qualified mpg123 error code, the ones
+ * operating on full handles normally MPG123_OK or MPG123_ERR, storing the
+ * specific error code itseld inside the handle.
+ *
+ * @{
+ */
+
+/** Opaque structure for the libmpg123 decoder parameters. */
+struct mpg123_pars_struct;
+
+/** Opaque structure for the libmpg123 decoder parameters. */
+typedef struct mpg123_pars_struct mpg123_pars;
+
+/** Create a handle with preset parameters.
+ * \param mp parameter handle
+ * \param decoder decoder choice
+ * \param error error code return address
+ * \return mpg123 handle
+ */
+MPG123_EXPORT mpg123_handle *mpg123_parnew( mpg123_pars *mp
+, const char* decoder, int *error );
+
+/** Allocate memory for and return a pointer to a new mpg123_pars
+ * \param error error code return address
+ * \return new parameter handle
+ */
+MPG123_EXPORT mpg123_pars *mpg123_new_pars(int *error);
+
+/** Delete and free up memory used by a mpg123_pars data structure
+ * \param mp parameter handle
+ */
+MPG123_EXPORT void mpg123_delete_pars(mpg123_pars* mp);
+
+/** Configure mpg123 parameters to accept no output format at all,
+ * use before specifying supported formats with mpg123_format
+ * \param mp parameter handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_fmt_none(mpg123_pars *mp);
+
+/** Configure mpg123 parameters to accept all formats
+ * (also any custom rate you may set) -- this is default.
+ * \param mp parameter handle
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_fmt_all(mpg123_pars *mp);
+
+/** Set the audio format support of a mpg123_pars in detail:
+ * \param mp parameter handle
+ * \param rate The sample rate value (in Hertz).
+ * \param channels A combination of MPG123_STEREO and MPG123_MONO.
+ * \param encodings A combination of accepted encodings for rate and channels,
+ * p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no
+ * support).
+ * \return MPG123_OK on success
+*/
+MPG123_EXPORT int mpg123_fmt(mpg123_pars *mp
+, long rate, int channels, int encodings);
+
+/** Set the audio format support of a mpg123_pars in detail:
+ * \param mp parameter handle
+ * \param rate The sample rate value (in Hertz). Special value 0 means
+ * all rates (reason for this variant of mpg123_fmt).
+ * \param channels A combination of MPG123_STEREO and MPG123_MONO.
+ * \param encodings A combination of accepted encodings for rate and channels,
+ * p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no
+ * support).
+ * \return MPG123_OK on success
+*/
+MPG123_EXPORT int mpg123_fmt2(mpg123_pars *mp
+, long rate, int channels, int encodings);
+
+/** Check to see if a specific format at a specific rate is supported
+ * by mpg123_pars.
+ * \param mp parameter handle
+ * \param rate sampling rate
+ * \param encoding encoding
+ * \return 0 for no support (that includes invalid parameters), MPG123_STEREO,
+ * MPG123_MONO or MPG123_STEREO|MPG123_MONO. */
+MPG123_EXPORT int mpg123_fmt_support(mpg123_pars *mp, long rate, int encoding);
+
+/** Set a specific parameter, for a specific mpg123_pars, using a parameter
+ * type key chosen from the mpg123_parms enumeration, to the specified value.
+ * \param mp parameter handle
+ * \param type parameter choice
+ * \param value integer value
+ * \param fvalue floating point value
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_par( mpg123_pars *mp
+, enum mpg123_parms type, long value, double fvalue );
+
+/** Get a specific parameter, for a specific mpg123_pars.
+ * See the mpg123_parms enumeration for a list of available parameters.
+ * \param mp parameter handle
+ * \param type parameter choice
+ * \param value integer value return address
+ * \param fvalue floating point value return address
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_getpar( mpg123_pars *mp
+, enum mpg123_parms type, long *value, double *fvalue);
+
+/* @} */
+
+
+/** \defgroup mpg123_lowio mpg123 low level I/O
+ * You may want to do tricky stuff with I/O that does not work with mpg123's default file access or you want to make it decode into your own pocket...
+ *
+ * @{ */
+
+/** Replace default internal buffer with user-supplied buffer.
+ * Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio.
+ * Note that the required buffer size could be bigger than expected from output
+ * encoding if libmpg123 has to convert from primary decoder output (p.ex. 32 bit
+ * storage for 24 bit output).
+ *
+ * Note: The type of data changed to a void pointer in mpg123 1.26.0
+ * (API version 45).
+ *
+ * \param mh handle
+ * \param data pointer to user buffer
+ * \param size of buffer in bytes
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_replace_buffer(mpg123_handle *mh
+, void *data, size_t size);
+
+/** The max size of one frame's decoded output with current settings.
+ * Use that to determine an appropriate minimum buffer size for decoding one frame.
+ * \param mh handle
+ * \return maximum decoded data size in bytes
+ */
+MPG123_EXPORT size_t mpg123_outblock(mpg123_handle *mh);
+
+/** Replace low-level stream access functions; read and lseek as known in POSIX.
+ * You can use this to make any fancy file opening/closing yourself,
+ * using mpg123_open_fd() to set the file descriptor for your read/lseek
+ * (doesn't need to be a "real" file descriptor...).
+ * Setting a function to NULL means that the default internal read is
+ * used (active from next mpg123_open call on).
+ * Note: As it would be troublesome to mess with this while having a file open,
+ * this implies mpg123_close().
+ * \param mh handle
+ * \param r_read callback for reading (behaviour like POSIX read)
+ * \param r_lseek callback for seeking (like POSIX lseek)
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_replace_reader( mpg123_handle *mh
+, ssize_t (*r_read) (int, void *, size_t)
+, off_t (*r_lseek)(int, off_t, int)
+);
+
+/** Replace I/O functions with your own ones operating on some kind of
+ * handle instead of integer descriptors.
+ * The handle is a void pointer, so you can pass any data you want...
+ * mpg123_open_handle() is the call you make to use the I/O defined here.
+ * There is no fallback to internal read/seek here.
+ * Note: As it would be troublesome to mess with this while having a file open,
+ * this mpg123_close() is implied here.
+ * \param mh handle
+ * \param r_read callback for reading (behaviour like POSIX read)
+ * \param r_lseek callback for seeking (like POSIX lseek)
+ * \param cleanup A callback to clean up an I/O handle on mpg123_close,
+ * can be NULL for none (you take care of cleaning your handles).
+ * \return MPG123_OK on success
+ */
+MPG123_EXPORT int mpg123_replace_reader_handle( mpg123_handle *mh
+, ssize_t (*r_read) (void *, void *, size_t)
+, off_t (*r_lseek)(void *, off_t, int)
+, void (*cleanup)(void*) );
+
+/* @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/mpg123.64/lib/libmpg123.lib b/mpg123.64/lib/libmpg123.lib
new file mode 100644
index 00000000..0b778c2b
--- /dev/null
+++ b/mpg123.64/lib/libmpg123.lib
Binary files differ
diff --git a/premake5.lua b/premake5.lua
index 6a27c5af..cdf1819e 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -6,10 +6,17 @@ newoption {
}
newoption {
- trigger = "glfwdir",
+ trigger = "glfwdir64",
value = "PATH",
description = "Directory of glfw",
- default = "glfw-3.3.2.bin.WIN32"
+ default = "glfw-3.3.2.bin.WIN64",
+}
+
+newoption {
+ trigger = "glfwdir32",
+ value = "PATH",
+ description = "Directory of glfw",
+ default = "glfw-3.3.2.bin.WIN32",
}
newoption {
@@ -48,12 +55,14 @@ workspace "reVC"
filter { "system:windows" }
platforms {
- "win-x86-RW33_d3d8-mss",
+ "win-x86-RW34_d3d8-mss",
"win-x86-librw_d3d9-mss",
"win-x86-librw_gl3_glfw-mss",
- "win-x86-RW33_d3d8-oal",
+ "win-x86-RW34_d3d8-oal",
"win-x86-librw_d3d9-oal",
"win-x86-librw_gl3_glfw-oal",
+ "win-amd64-librw_d3d9-oal",
+ "win-amd64-librw_gl3_glfw-oal",
}
filter { "system:linux" }
@@ -88,16 +97,21 @@ workspace "reVC"
filter { "platforms:*librw_d3d9*" }
defines { "RW_D3D9" }
if(not _OPTIONS["with-librw"]) then
- libdirs { path.join(Librw, "lib/win-x86-d3d9/%{cfg.buildcfg}") }
+ libdirs { path.join(Librw, "lib/win-%{getarch(cfg.architecture)}-d3d9/%{cfg.buildcfg}") }
end
filter "platforms:*librw_gl3_glfw*"
defines { "RW_GL3" }
- includedirs { path.join(_OPTIONS["glfwdir"], "include") }
includedirs { path.join(_OPTIONS["glewdir"], "include") }
if(not _OPTIONS["with-librw"]) then
libdirs { path.join(Librw, "lib/%{getsys(cfg.system)}-%{getarch(cfg.architecture)}-gl3/%{cfg.buildcfg}") }
end
+
+ filter "platforms:*x86-librw_gl3_glfw*"
+ includedirs { path.join(_OPTIONS["glfwdir32"], "include") }
+
+ filter "platforms:*amd64-librw_gl3_glfw*"
+ includedirs { path.join(_OPTIONS["glfwdir64"], "include") }
filter "platforms:win*librw_gl3_glfw*"
defines { "GLEW_STATIC" }
@@ -128,7 +142,7 @@ project "librw"
targetdir "lib/%{cfg.platform}/%{cfg.buildcfg}"
files { path.join(Librw, "src/*.*") }
files { path.join(Librw, "src/*/*.*") }
- filter "platforms:*RW33*"
+ filter "platforms:*RW34*"
flags { "ExcludeFromBuild" }
filter {}
end
@@ -206,23 +220,31 @@ project "reVC"
linkoptions "/SAFESEH:NO"
characterset ("MBCS")
targetextension ".exe"
-
- filter "platforms:win*oal"
+
+ filter "platforms:win-x86*oal"
includedirs { "openal-soft/include" }
- includedirs { "libsndfile/include" }
- includedirs { "mpg123/include" }
+ includedirs { "libsndfile.32/include" }
+ includedirs { "mpg123.32/include" }
+ libdirs { "mpg123.32/lib" }
+ libdirs { "libsndfile32/lib" }
libdirs { "openal-soft/libs/Win32" }
- libdirs { "libsndfile/lib" }
- libdirs { "mpg123/lib" }
+
+ filter "platforms:win-amd64*oal"
+ includedirs { "openal-soft/include" }
+ includedirs { "libsndfile.64/include" }
+ includedirs { "mpg123.64/include" }
+ libdirs { "mpg123.64/lib" }
+ libdirs { "libsndfile.64/lib" }
+ libdirs { "openal-soft/libs/Win64" }
filter "platforms:linux*oal"
links { "openal", "mpg123", "sndfile", "pthread" }
- filter "platforms:*RW33*"
+ filter "platforms:*RW34*"
staticruntime "on"
includedirs { "rwsdk/include/d3d8" }
libdirs { "rwsdk/lib/d3d8/release" }
- links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtcharse" }
+ links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtanim", "rtcharse", "rpanisot" }
defines { "RWLIBS" }
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"
@@ -236,16 +258,24 @@ project "reVC"
end
links { "rw" }
- filter "platforms:*d3d*"
+ filter "platforms:*d3d9*"
+ links { "d3d9" }
+
+ filter "platforms:*x86*d3d*"
includedirs { "dxsdk/include" }
libdirs { "dxsdk/lib" }
- filter "platforms:*d3d9*"
- links { "d3d9" }
+ filter "platforms:*amd64*d3d9*"
+ defines { "USE_D3D9" }
- filter "platforms:win*gl3_glfw*"
+ filter "platforms:win-x86*gl3_glfw*"
libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/Win32") }
- libdirs { path.join(_OPTIONS["glfwdir"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
+ libdirs { path.join(_OPTIONS["glfwdir32"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
+ links { "opengl32", "glew32s", "glfw3" }
+
+ filter "platforms:win-amd64*gl3_glfw*"
+ libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/x64") }
+ libdirs { path.join(_OPTIONS["glfwdir64"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
links { "opengl32", "glew32s", "glfw3" }
filter "platforms:linux*gl3_glfw*"
diff --git a/rwsdk/include/d3d8/baaplylt.c b/rwsdk/include/d3d8/baaplylt.c
deleted file mode 100644
index ad518e6a..00000000
--- a/rwsdk/include/d3d8/baaplylt.c
+++ /dev/null
@@ -1,793 +0,0 @@
-
-/* If this file is used outside of the core RW SDK,
- * the following things need to be defined
- */
-#if (!defined(RWASSERT))
-#define RWASSERT(_assertval) /* No op */
-#endif
-#if (!defined(RWFUNCTION))
-#define RWFUNCTION(_rwfunctionstring) /* No op */
-#endif
-#if (!defined(RWRETURN))
-#define RWRETURN(_rwreturnval) return(_rwreturnval)
-#endif
-#if (!defined(RWRETURNVOID))
-#define RWRETURNVOID() return
-#endif
-
-/* These are used by specular lighting,
- * sorry I have to leave them in here... IDBS
- * I'll make it neater when I have time.
- */
-#if (!defined(FALLOFFAMBIENT))
-#define FALLOFFAMBIENT() /* No op */
-#endif
-#if (!defined(FALLOFFDIRECTIONAL))
-#define FALLOFFDIRECTIONAL() /* No op */
-#endif
-#if (!defined(FALLOFFPOINT))
-#define FALLOFFPOINT() /* No op */
-#endif
-#if (!defined(FALLOFFSPOT))
-#define FALLOFFSPOT() /* No op */
-#endif
-#if (!defined(FALLOFFSOFTSPOT))
-#define FALLOFFSOFTSPOT() /* No op */
-#endif
-
-/***************************************************************************
- _rwApplyAmbientLight
-
- On entry : Instanced data
- : Light
- : Optional inverse object matrix
- : (to transform light to object space)
- : Inverse scale of object
- : Surface properties of the light
- On exit :
- */
-
-static void
-_rwApplyAmbientLight(VERTSARG,
- const void *voidLight,
- const RwMatrix * __RWUNUSED__ inverseMat,
- RwReal __RWUNUSED__ invScale,
- const RwSurfaceProperties * surfaceProps)
-{
- CAMVERTDECL;
- NUMVERTDECL;
- const RpLight *light = (const RpLight *) voidLight;
- RwReal scale;
- RwV3d vertToLight;
-
- RWFUNCTION(RWSTRING("_rwApplyAmbientLight"));
- RWASSERT(light);
- RWASSERT(surfaceProps);
-
- CAMVERTINIT();
- NUMVERTINIT();
-
- /* No directional component:
- * (this is used in CAMVERTADDRGBA in a specular lighting node) */
- vertToLight.x = 0;
- vertToLight.y = 0;
- vertToLight.z = 0;
-
- /* rpLIGHTAMBIENT - Constant illumination on all vertices
- */
- if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
- {
- scale = 255.0f * light->color.red * surfaceProps->ambient;
-
- /* Ambient light affects all vertices the same */
- while (numVert--)
- {
- RwReal lum = scale;
-
-#undef FALLOFFCALC
-#define FALLOFFCALC FALLOFFAMBIENT
- CAMVERTADDRGBA(1, 1, 1, 0);
- CAMVERTINC();
- }
- }
- else
- /* perform for coloured lights */
- {
- scale = 255.0f * surfaceProps->ambient;
-
- /* Ambient light affects all vertices the same */
- while (numVert--)
- {
- RwReal lum = scale;
-
-#undef FALLOFFCALC
-#define FALLOFFCALC FALLOFFAMBIENT
- CAMVERTADDRGBA(light->color.red, light->color.green,
- light->color.blue, 0);
- CAMVERTINC();
- }
- }
- RWRETURNVOID();
-}
-
-/***************************************************************************
- _rwApplyDirectionalLight
-
- On entry : Instanced data
- : Light
- : Optional inverse object matrix
- : (to transform light to object space)
- : Inverse scale of object
- : Surface properties of the light
- On exit :
- */
-
-static void
-_rwApplyDirectionalLight(VERTSARG,
- const void *voidLight,
- const RwMatrix * inverseMat,
- RwReal __RWUNUSED__ invScale,
- const RwSurfaceProperties * surfaceProps)
-{
- OBJCAMVERTDECL;
- NUMVERTDECL;
- const RpLight *light = (const RpLight *) voidLight;
- RwV3d vertToLight;
- RwReal scale;
- RwReal dot;
- RwFrame *lightFrame;
-
- RWFUNCTION(RWSTRING("_rwApplyDirectionalLight"));
- RWASSERT(light);
- RWASSERT(surfaceProps);
-
- OBJCAMVERTINIT();
- NUMVERTINIT();
-
- /* rpLIGHTDIRECTIONAL - Lighting scaled by dot product
- * of vertex normal and light lookAt vector.
- */
- /* This may not have a frame - we need to check */
- lightFrame = RpLightGetFrame(light);
- if (lightFrame)
- {
- vertToLight = RwFrameGetLTM(lightFrame)->at;
-
- /* Transform the light into object space if necessary */
- if (inverseMat)
- {
- RwV3dTransformVectors(&vertToLight, &vertToLight, 1, inverseMat);
- _rwV3dNormalize(&vertToLight, &vertToLight);
- }
-
- /* Vert TO light */
- RwV3dScale(&vertToLight, &vertToLight, -1);
-
- /* Optimise for grey lights? */
- if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
- {
- /* Use one of the light colour intensities as general intensity */
- /* light vector tests are to be identical to others */
- scale = 255.0f * light->color.red * surfaceProps->diffuse;
-
- /* Loop through each of the vertices */
- while (numVert--)
- {
- RwV3d objNormal;
-
- OBJVERTGETNORMAL(&objNormal);
- /* Calculate angle between vertex normal and light vector */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
-
- /* Ensure vector is facing light,
- * don't light areas not facing */
-
- if (dot > 0.0f)
- {
- RwReal lum = dot * scale;
-
-#undef FALLOFFCALC
-#define FALLOFFCALC FALLOFFDIRECTIONAL
- CAMVERTADDRGBA(1, 1, 1, 0);
- }
-
- /* Next vertex */
- OBJCAMVERTINC();
- }
- }
- else
- /* perform for coloured lights */
- {
- scale = 255.0f * surfaceProps->diffuse;
-
- /* Loop through each of the vertices */
- while (numVert--)
- {
- RwV3d objNormal;
-
- OBJVERTGETNORMAL(&objNormal);
- /* Calculate angle between vertex normal and light vector */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
-
- /* Ensure vector is facing light,
- * don't light areas not facing */
-
- if (dot > 0.0f)
- {
- RwReal lum = dot * scale;
-
-#define FALLOFFCALC FALLOFFDIRECTIONAL
- CAMVERTADDRGBA(light->color.red, light->color.green,
- light->color.blue, 0);
- }
-
- /* Next vertex */
- OBJCAMVERTINC();
- }
- }
- }
-
- RWRETURNVOID();
-}
-
-/***************************************************************************
- _rwApplyPointLight
-
- On entry : Instanced data
- : Light
- : Optional inverse object matrix
- : (to transform light to object space)
- : Inverse scale of object
- : Surface properties of the light
- On exit :
- */
-
-static void
-_rwApplyPointLight(VERTSARG, const void *voidLight,
- const RwMatrix * inverseMat,
- RwReal invScale, const RwSurfaceProperties * surfaceProps)
-{
- OBJCAMVERTDECL;
- NUMVERTDECL;
- const RpLight *light = (const RpLight *) voidLight;
- RwReal scale, recipRad;
- RwV3d lightPos, vertToLight;
- RwReal radSquared;
-
- RWFUNCTION(RWSTRING("_rwApplyPointLight"));
- RWASSERT(light);
- RWASSERT(surfaceProps);
-
- OBJCAMVERTINIT();
- NUMVERTINIT();
-
- /* rpLIGHTPOINT - Linear falloff with distance, scaled by
- * dot product of vertex normal and light to vertex vector.
- */
- lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
-
- if (inverseMat)
- {
- RwReal scaledRad;
-
- scaledRad = ((light->radius) * (invScale));
- radSquared = ((scaledRad) * (scaledRad));
- recipRad = (((RwReal) (1)) / (scaledRad));
-
- /* Transform light into object space */
- RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
- }
- else
- {
- radSquared = ((light->radius) * (light->radius));
- recipRad = (((RwReal) (1)) / (light->radius));
- }
-
- if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
- {
- /* The scale encapsulates the common elements to do
- * with light intensity and surface lighting properties
- */
- scale =
- ((((RwReal) (255)) * (light->color.red))) *
- (surfaceProps->diffuse);
-
- while (numVert--)
- {
- RwV3d objVertex, objNormal;
- RwReal dot, dist2;
-
- OBJVERTGETPOS(&objVertex);
- OBJVERTGETNORMAL(&objNormal);
-
- /* Discover the vector between vertex and light and it's length */
- RwV3dSub(&vertToLight, &lightPos, &objVertex);
-
- /* Ensure that this vertex is facing the light source */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
- if (dot > 0.0f)
- {
- /* Ensure vertex lies within the light's radius */
- dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
- if (dist2 < radSquared)
- {
- RwReal lum;
- RwReal recipDist;
- RwReal dist;
-
- rwSqrt(&dist, dist2);
- recipDist =
- (dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
-
- /*
- * The following simplifies down to:
- *
- * -scale *
- * (dot/dist) *
- * (1 - dist/lightRadius)
- *
- * Where
- * scale
- * takes care of the light intensity and
- * diffuse lighting coefficient
- * (dot/dist)
- * is a normalised dot product of
- * light->vertex vector and vertex normal
- * (1 - dist/lightRadius)
- * is a linear falloff factor
- */
- lum = scale * dot * (recipDist - recipRad);
-
- /* Calculate the luminance at vertex */
-#undef FALLOFFCALC
-#define FALLOFFCALC FALLOFFPOINT
- CAMVERTADDRGBA(1, 1, 1, 0);
- }
- }
-
- OBJCAMVERTINC();
- }
- }
- else
- {
- scale = (((RwReal) (255)) * (surfaceProps->diffuse));
-
- while (numVert--)
- {
- RwV3d objVertex, objNormal;
- RwReal dot, dist2;
-
- OBJVERTGETPOS(&objVertex);
- OBJVERTGETNORMAL(&objNormal);
-
- /* Discover the vector between vertex and light and it's length */
- RwV3dSub(&vertToLight, &lightPos, &objVertex);
-
- /* Ensure that this vertex is facing the light source */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
- if (dot > 0.0f)
- {
- dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
-
- /* Ensure vertex lies within the light's radius */
- if (dist2 < radSquared)
- {
- RwReal lum;
- RwReal recipDist;
- RwReal dist;
-
- /* Only now calculate the actual length of vector */
- rwSqrt(&dist, dist2);
- recipDist =
- (dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
-
- lum = scale * dot * (recipDist - recipRad);
- /* Alter the luminance according to light colour */
-#define FALLOFFCALC FALLOFFPOINT
- CAMVERTADDRGBA(light->color.red, light->color.green,
- light->color.blue, 0);
- }
- }
-
- /* Next point */
- OBJCAMVERTINC();
- }
- }
- RWRETURNVOID();
-}
-
-/***************************************************************************
- _rwApplySpotLight
-
- On entry : Instanced data
- : Light
- : Optional inverse object matrix
- : (to transform light to object space)
- : Inverse scale of object
- : Surface properties of the light
- On exit :
- */
-
-static void
-_rwApplySpotLight(VERTSARG,
- const void *voidLight,
- const RwMatrix * inverseMat,
- RwReal invScale, const RwSurfaceProperties * surfaceProps)
-{
- OBJCAMVERTDECL;
- NUMVERTDECL;
- const RpLight *light = (const RpLight *) voidLight;
- RwReal recipRad;
- RwReal radSquared;
- RwV3d lightPos, at;
-
- RWFUNCTION(RWSTRING("_rwApplySpotLight"));
- RWASSERT(light);
- RWASSERT(surfaceProps);
-
- OBJCAMVERTINIT();
- NUMVERTINIT();
-
- /* rpLIGHTSPOT - Linear falloff with distance, cone to restrict
- * angle that light has effect, constant intensity across cone,
- * scaled by dot product of vertex normal and light to vertex vector.
- */
-
- lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
- at = RwFrameGetLTM(RpLightGetFrame(light))->at;
-
- if (inverseMat)
- {
- RwReal scaledRad;
-
- scaledRad = ((light->radius) * (invScale));
- recipRad = (((RwReal) (1)) / (scaledRad));
- radSquared = ((scaledRad) * (scaledRad));
-
- /* Transform light into object space */
- /* The at is required to ensure within cone */
- RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
- RwV3dTransformVectors(&at, &at, 1, inverseMat);
- _rwV3dNormalize(&at, &at);
- }
- else
- {
- recipRad = (((RwReal) (1)) / (light->radius));
- radSquared = ((light->radius) * (light->radius));
- }
-
- if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
- {
- RwReal scale =
-
- ((RwReal) 255) * (light->color.red) * (surfaceProps->diffuse);
-
- while (numVert--)
- {
- RwV3d vertToLight, objVertex, objNormal;
- RwReal dot;
-
- OBJVERTGETPOS(&objVertex);
- OBJVERTGETNORMAL(&objNormal);
-
- /* Find the squared distance from light point to vertex */
- RwV3dSub(&vertToLight, &lightPos, &objVertex);
-
- /* Ensure that this vertex is facing the light source */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
- if (dot > 0.0f)
- {
- RwReal dist2;
-
- /* Ensure vertex lies within the light's radius */
- dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
- if (dist2 < radSquared)
- {
- RwReal dist;
- RwReal compare;
- RwReal proj;
-
- rwSqrt(&dist, dist2);
- compare = dist * light->minusCosAngle;
- proj = RwV3dDotProduct(&vertToLight, &at);
-
- if (proj < compare)
- {
- RwReal lum;
- RwReal recipDist;
-
- /* Get the real distance from the light
- * to the vertex (not squared) */
- recipDist =
- (dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
-
- /* This model is the same as the point source
- * inside the cone, zero outside the cone */
- lum = scale * dot * (recipDist - recipRad);
-#undef FALLOFFCALC
-#define FALLOFFCALC FALLOFFSPOT
- CAMVERTADDRGBA(1, 1, 1, 0);
- }
- }
- /* Next vertex */
- OBJCAMVERTINC();
- }
- }
- }
- else
- {
- RwReal scale =
-
- (((RwReal) (255)) * (surfaceProps->diffuse));
-
- while (numVert--)
- {
- RwV3d vertToLight, objVertex, objNormal;
- RwReal dot;
-
- OBJVERTGETPOS(&objVertex);
- OBJVERTGETNORMAL(&objNormal);
-
- /* Find the squared distance from light point to vertex */
- RwV3dSub(&vertToLight, &lightPos, &objVertex);
-
- /* Ensure that this vertex is facing the light source */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
- if (dot > 0.0f)
- {
- RwReal dist2;
-
- /* Ensure vertex lies within the light's radius */
- dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
- if (dist2 < radSquared)
- {
- RwReal dist;
- RwReal compare;
- RwReal proj;
-
- rwSqrt(&dist, dist2);
- compare = dist * light->minusCosAngle;
- proj = RwV3dDotProduct(&vertToLight, &at);
-
- if (proj < compare)
- {
- RwReal lum;
- RwReal recipDist;
-
- recipDist =
- (dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
-
- /* This model is the same as the point source
- * inside the cone, zero outside the cone */
- lum = scale * dot * (recipDist - recipRad);
-
- /* Introduce the light colours as a
- * scaling factor for luminance */
-#define FALLOFFCALC FALLOFFSPOT
- CAMVERTADDRGBA(light->color.red,
- light->color.green, light->color.blue,
- 0);
- }
- }
- }
-
- /* Next */
- OBJCAMVERTINC();
- }
- }
-
- RWRETURNVOID();
-}
-
-/***************************************************************************
- _rwApplySpotSoftLight
-
- On entry : Instanced data
- : Light
- : Optional inverse object matrix
- : (to transform light to object space)
- : Inverse scale of object
- : Surface properties of the light
- On exit :
- */
-
-static void
-_rwApplySpotSoftLight(VERTSARG, const void *voidLight,
- const RwMatrix * inverseMat, RwReal invScale,
- const RwSurfaceProperties * surfaceProps)
-{
- OBJCAMVERTDECL;
- NUMVERTDECL;
- const RpLight *light = (const RpLight *) voidLight;
- RwReal recipRad;
- RwReal radSquared;
- RwV3d lightPos, at;
-
- RWFUNCTION(RWSTRING("_rwApplySpotSoftLight"));
- RWASSERT(light);
- RWASSERT(surfaceProps);
-
- OBJCAMVERTINIT();
- NUMVERTINIT();
-
- /* rpLIGHTSPOTSOFT - Linear falloff with distance, cone to restrict
- * angle that light has effect, falloff to edge of cone, scaled by
- * dot product of vertex normal and light to vertex vector.
- */
-
- lightPos = RwFrameGetLTM(RpLightGetFrame(light))->pos;
- at = RwFrameGetLTM(RpLightGetFrame(light))->at;
-
- if (inverseMat)
- {
- RwReal scaledRad;
-
- scaledRad = ((light->radius) * (invScale));
- recipRad = (((RwReal) (1)) / (scaledRad));
- radSquared = ((scaledRad) * (scaledRad));
-
- /* Transform light into object space */
- /* The at is required to ensure within cone */
- RwV3dTransformPoints(&lightPos, &lightPos, 1, inverseMat);
- RwV3dTransformVectors(&at, &at, 1, inverseMat);
- _rwV3dNormalize(&at, &at);
- }
- else
- {
- recipRad = 1.0f / light->radius;
- radSquared = light->radius * light->radius;
- }
-
- if (rwObjectTestPrivateFlags(light, rpLIGHTPRIVATENOCHROMA))
- {
- RwReal scale =
-
- ((RwReal) 255) * (light->color.red) * (surfaceProps->diffuse);
-
- while (numVert--)
- {
- RwV3d vertToLight, objVertex, objNormal;
- RwReal dot;
-
- OBJVERTGETPOS(&objVertex);
- OBJVERTGETNORMAL(&objNormal);
-
- /* Find the squared distance from light point to vertex */
- RwV3dSub(&vertToLight, &lightPos, &objVertex);
-
- /* Ensure that this vertex is facing the light source */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
- if (dot > 0.0f)
- {
- RwReal dist2;
-
- /* Ensure vertex lies within the light's radius */
- dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
- if (dist2 < radSquared)
- {
- RwReal dist;
- RwReal compare;
- RwReal proj;
-
- rwSqrt(&dist, dist2);
- compare = dist * light->minusCosAngle;
- proj = RwV3dDotProduct(&vertToLight, &at);
-
- if (proj < compare)
- {
- RwReal lum;
- RwReal recipDist;
- RwReal normalise;
-
- recipDist =
- (dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
-
- /* This model is the same as the point source
- * inside the cone, zero outside the cone */
- lum = scale * dot * (recipDist - recipRad);
-
- /* It has an extra term for quadratic falloff
- * across the cone though */
- normalise = (dist + compare);
- RWASSERT(normalise >= 0.0f);
- if (normalise > 0.0f)
- {
- normalise = (dist + proj) / normalise;
-
- normalise *= normalise;
- lum *= (((RwReal) 1) - normalise);
- }
-
-#undef FALLOFFCALC
-#define FALLOFFCALC FALLOFFSOFTSPOT
- CAMVERTADDRGBA(1, 1, 1, 0);
- }
- }
- }
-
- /* Next */
- OBJCAMVERTINC();
- }
- }
-
- else
- {
- RwReal scale = 255.0f * surfaceProps->diffuse;
-
- while (numVert--)
- {
- RwV3d vertToLight, objVertex, objNormal;
- RwReal dot;
-
- OBJVERTGETPOS(&objVertex);
- OBJVERTGETNORMAL(&objNormal);
-
- /* Find the squared distance from light point to vertex */
- RwV3dSub(&vertToLight, &lightPos, &objVertex);
-
- /* Ensure that this vertex is facing the light source */
- dot = RwV3dDotProduct(&vertToLight, &objNormal);
- if (dot > 0.0f)
- {
- RwReal dist2;
-
- /* Ensure vertex lies within the light's radius */
- dist2 = RwV3dDotProduct(&vertToLight, &vertToLight);
- if (dist2 < radSquared)
- {
- RwReal dist;
- RwReal compare;
- RwReal proj;
-
- rwSqrt(&dist, dist2);
- compare = dist * light->minusCosAngle;
- proj = RwV3dDotProduct(&vertToLight, &at);
-
- if (proj < compare)
- {
-
- RwReal lum;
- RwReal normalise;
- RwReal recipDist;
-
- /* Get the real distance from the light
- * to the vertex (not squared) */
- recipDist =
- (dist > 0.0f) ? (((RwReal) 1) / dist) : 0.0f;
-
- /* This model is the same as the point source
- * inside the cone, zero outside the cone */
- lum = scale * dot * (recipDist - recipRad);
-
- /* It has an extra term for quadratic falloff
- * across the cone though */
- /* It has an extra term for quadratic falloff
- * across the cone though */
- normalise = (dist + compare);
- RWASSERT(normalise >= 0.0f);
- if (normalise > 0.0f)
- {
- normalise = (dist + proj) / normalise;
-
- normalise *= normalise;
- lum *= (((RwReal) 1) - normalise);
-
- }
- /* Introduce the light colours as a
- * scaling factor for luminance */
-#undef FALLOFFCALC
-#define FALLOFFCALC FALLOFFSOFTSPOT
- CAMVERTADDRGBA(light->color.red,
- light->color.green,
- light->color.blue, 0);
- }
- }
- }
-
- /* Next */
- OBJCAMVERTINC();
- }
- }
-
- RWRETURNVOID();
-}
diff --git a/rwsdk/include/d3d8/rpanisot.h b/rwsdk/include/d3d8/rpanisot.h
index 4f4445a4..323786f4 100644
--- a/rwsdk/include/d3d8/rpanisot.h
+++ b/rwsdk/include/d3d8/rpanisot.h
@@ -7,7 +7,7 @@
/**
* \defgroup rpanisot RpAnisot
- * \ingroup rpplugin
+ * \ingroup mipmapping
*
* Anisotropic Texture Sampling Plugin for RenderWare Graphics.
*/
@@ -22,7 +22,7 @@
* \li \b Plugin \b attachments: \ref RpWorldPluginAttach, \ref RpAnisotPluginAttach
*
* \subsection anisotoverview Overview
- * The RpAnisot plugin is used to extend an RwTexture with a maximum
+ * The RpAnisot plugin is used to extend an \ref RwTexture with a maximum
* anisotropy value that will be used when a particular texture is drawn.
* When textured polygons are viewed nearly edge on, for example when looking
* dowm a road or a football pitch, distant pixels are not sampled very well
diff --git a/rwsdk/include/d3d8/rpanisot.rpe b/rwsdk/include/d3d8/rpanisot.rpe
index 5216ec9c..0464081f 100644
--- a/rwsdk/include/d3d8/rpanisot.rpe
+++ b/rwsdk/include/d3d8/rpanisot.rpe
@@ -160,472 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionLabel
{
diff --git a/rwsdk/include/d3d8/rpcollis.h b/rwsdk/include/d3d8/rpcollis.h
index 908fb68e..23e67f35 100644
--- a/rwsdk/include/d3d8/rpcollis.h
+++ b/rwsdk/include/d3d8/rpcollis.h
@@ -31,7 +31,7 @@
/**
* \defgroup rpcollis RpCollision
- * \ingroup rpplugin
+ * \ingroup collisiondetection
*
* Collision Plugin for RenderWare Graphics.
*/
@@ -67,12 +67,12 @@ enum RpIntersectType
};
typedef enum RpIntersectType RpIntersectType;
+typedef union RpIntersectData RpIntersectData;
/**
* \ingroup rpcollis
* RpIntersectData, this union type is used to specify the parameters
* for an intersection primitive of the desired type (\ref RpIntersectType)
*/
-typedef union RpIntersectData RpIntersectData;
union RpIntersectData
{
RwLine line; /**<For type rpINTERSECTLINE */
@@ -144,7 +144,6 @@ struct RpCollisionBuildParam
/**
* \ingroup rpcollis
- * \typedef RpIntersectionCallBackWorldTriangle
* \ref RpIntersectionCallBackWorldTriangle represents the function called
* from \ref RpCollisionWorldForAllIntersections for all intersections between
* the specified primitive and the static geometry in a given world. This
@@ -152,6 +151,10 @@ struct RpCollisionBuildParam
* indicate success. The callback may return NULL to terminate further
* callbacks on the world.
*
+ * \note The memory pointed to by collTriangle is stored on the stack.
+ * This memory should be considered volatile. To use this data outside
+ * of the iterator, copy the contents.
+ *
* \param intersection Pointer to the intersection primitive.
* \param sector Pointer to the world sector containing the triangle.
* \param collTriangle Pointer to the \ref RpCollisionTriangle representing
@@ -181,7 +184,6 @@ typedef RpCollisionTriangle *(*RpIntersectionCallBackWorldTriangle)
/**
* \ingroup rpcollis
- * \typedef RpIntersectionCallBackAtomic
* \ref RpIntersectionCallBackAtomic represents the function called from
* \ref RpWorldForAllAtomicIntersections for all intersections between the
* specified primitive and collision atomics in a given world. This function
@@ -215,7 +217,6 @@ typedef RpAtomic *(*RpIntersectionCallBackAtomic)
/**
* \ingroup rpcollis
- * \typedef RpIntersectionCallBackWorldSector
* \ref RpIntersectionCallBackWorldSector represents the function called from
* \ref RpWorldForAllWorldSectorIntersections for all intersections between the
* specified primitive and world sectors in a given world. This function should
@@ -234,7 +235,6 @@ typedef RpWorldSector *(*RpIntersectionCallBackWorldSector)
/**
* \ingroup rpcollis
- * \typedef RpIntersectionCallBackGeometryTriangle
* \ref RpIntersectionCallBackGeometryTriangle represents the function called
* from \ref RpAtomicForAllIntersections and
* \ref RpCollisionGeometryForAllIntersections
diff --git a/rwsdk/include/d3d8/rpcollis.rpe b/rwsdk/include/d3d8/rpcollis.rpe
index 3e891755..49ad286f 100644
--- a/rwsdk/include/d3d8/rpcollis.rpe
+++ b/rwsdk/include/d3d8/rpcollis.rpe
@@ -158,472 +158,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionCollis
{
diff --git a/rwsdk/include/d3d8/rpcriter.h b/rwsdk/include/d3d8/rpcriter.h
index c1af25b8..de55389f 100644
--- a/rwsdk/include/d3d8/rpcriter.h
+++ b/rwsdk/include/d3d8/rpcriter.h
@@ -1,261 +1,6 @@
-/* Doxygen Core Library groups */
-
-/**
- * \defgroup rwcore Core Library
- *
- * Core Library
- */
-
-/**
- * \defgroup datatypes Data Types
- * \ingroup rwcore
- *
- * Basic Data Types
- */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwbbox RwBBox
- * \ingroup rwcore
- *
- * Bounding Box
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwcamera RwCamera
- * \ingroup rwcore
- *
- * Cameras define how and what things can be seen. They also define the
- * depth and width of the view by the use of clip-planes and the view
- * window.
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwcameravertex RwCameraVertex
- * \ingroup rwcore
- *
- * Camera space vertex data access
- */
-#endif /* RWPLCORE */
-
-/**
- * \defgroup rwdebug RwDebug
- * \ingroup rwcore
- *
- * Debug handling
- */
-
-/**
- * \defgroup rwengine RwEngine
- * \ingroup rwcore
- *
- * Device handling.
- */
-
-/**
- * \defgroup rwerror RwError
- * \ingroup rwcore
- *
- * Error code handling
- */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwframe RwFrame
- * \ingroup rwcore
- *
- * Frames define relationships between objects and the world
- */
-#endif /* RWPLCORE */
-
-/**
- * \defgroup rwfreelist RwFreeList
- * \ingroup rwcore
- *
- * Free lists
- */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwimage RwImage
- * \ingroup rwcore
- *
- * Image handling.
- */
-#endif /* RWPLCORE */
-
-/**
- * \defgroup rwim2d RwIm2D
- * \ingroup rwcore
- *
- * 2D immediate mode support
- */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwim2dcameravertex RwIm2DCameraVertex
- * \ingroup rwcore
- *
- * 2D Camera space vertex data access
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwim2dvertex RwIm2DVertex
- * \ingroup rwcore
- *
- * Im2D Vertex data access
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwim3d RwIm3D
- * \ingroup rwcore
- *
- * 3D immediate mode support
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwim3dvertex RwIm3DVertex
- * \ingroup rwcore
- *
- * Im3D Vertex data access
- */
-#endif /* RWPLCORE */
-
-/**
- * \defgroup rwmatrix RwMatrix
- * \ingroup rwcore
- *
- * Handling binary matrix representations.
- */
-
-/**
- * \defgroup rwmem RwMem
- * \ingroup rwcore
- *
- * Memory
- */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwobject RwObject
- * \ingroup rwcore
- *
- * object
- */
-#endif /* RWPLCORE */
-
-/**
- * \defgroup rwos RwOs
- * \ingroup rwcore
- *
- * Operating System
- */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwraster RwRaster
- * \ingroup rwcore
- *
- * Image/raster coupling handling.
- */
-#endif /* RWPLCORE */
-
-/**
- * \defgroup rwrenderstate RwRenderState
- * \ingroup rwcore
- *
- * Render states
- */
-
-/**
- * \defgroup rwresources RwResources
- * \ingroup rwcore
- *
- * Resource handling.
- * Resources are used to instance objects into.
- */
-
-
-/**
- * \defgroup rwrgba RwRGBA
- * \ingroup rwcore
- *
- * Color space functionality.
- */
-
-
-/**
- * \defgroup rwstream RwStream
- * \ingroup rwcore
- *
- * Stream
- */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwtexdict RwTexDictionary
- * \ingroup rwcore
- *
- * Texture Dictionary
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwtexture RwTexture
- * \ingroup rwcore
- *
- * Texture handling.
- * Textures are special cases of rasters that can be applied to polygons.
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwv2d RwV2d
- * \ingroup rwcore
- *
- * 2D Vector mathematics.
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwv3d RwV3d
- * \ingroup rwcore
- *
- * 3D Vector mathematics.
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwcorepowerpipe PowerPipe
- * \ingroup rwcore
- *
- * PowerPipe
- */
-#endif /* RWPLCORE */
-
-#ifndef RWPLCORE
-/**
- * \defgroup rwcoregeneric Generic
- * \ingroup rwcorepowerpipe
- *
- * Generic Pipeline
- *
- */
-#endif /* RWPLCORE */
+#ifdef DOXYGEN
+#include "doxygen.h"
+#endif /* DOXYGEN */
/* These are plugins */
#define rwID_METRICSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x01)
@@ -306,137 +51,10 @@
#define rwID_MULTITEXPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2c)
#define rwID_CHAINPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2d)
#define rwID_TOONPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2e)
-#define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f)
-
-#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30)
-
-
-/********************************************************/
-
-/* Doxygen plugin groups. */
-
-#ifndef RWPLCORE
-
-/**
- * \defgroup rpplugin Plugins
- *
- * API Plugins
- *
- */
-
-/**
- * \defgroup rpworld RpWorld
- * \ingroup rpplugin
- *
- * World handling Plugin
- *
- * Gives objects context,
- * and provides a mechanism for efficient static object rendering.
- */
-
-/********************************************************/
-
-/**
- * \defgroup rpworlddatatypes Data Types
- * \ingroup rpworld
- *
- * RpWorld Data types
- */
-
-/**
- * \defgroup rpatomic RpAtomic
- * \ingroup rpworld
- *
- * Atomics
- */
-
-/**
- * \defgroup rpclump RpClump
- * \ingroup rpworld
- *
- * Clumps
- */
-
-/**
- * \defgroup rpgeometry RpGeometry
- * \ingroup rpworld
- *
- * Handling atomic's geometry
- */
-
-
-/**
- * \defgroup rpinterpolator RpInterpolator
- * \ingroup rpworld
- *
- * Interpolators
- */
-
-/**
- * \defgroup rplight RpLight
- * \ingroup rpworld
- *
- * Lighting 3D objects.
- * Lights are used to illuminate atomics and worlds
- */
-
-/**
- * \defgroup rpmaterial RpMaterial
- * \ingroup rpworld
- *
- * Handling surface materials
- * Materials describe how things are to appear when rendered
- */
-
-/**
- * \defgroup rpmesh RpMesh
- * \ingroup rpworld
- *
- * Provide construction and enumeration facilities for meshes.
- */
-
-/**
- * \defgroup rpmorphtarget RpMorphTarget
- * \ingroup rpworld
- *
- * Morph Targets
- */
-
-/**
- * \defgroup rpworldsub RpWorld
- * \ingroup rpworld
- *
- * RpWorld sub group
- */
-
-/**
- * \defgroup rpworldsector RpWorldSector
- * \ingroup rpworld
- *
- * Handling atomic sectors
- */
-
-/**
- * \defgroup rpworldrwcamera RwCamera
- * \ingroup rpworld
- *
- * Cameras
- */
-
-/**
- * \defgroup rpworldpowerpipe PowerPipe
- * \ingroup rpworld
- *
- * PowerPipe
- */
-
-/**
- * \defgroup rpworldp2generic Generic
- * \ingroup rpworldpowerpipe
- *
- * Generic
- */
-#endif /* RWPLCORE */
+#define rwID_PTANKPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x2f)
+#define rwID_PRTSTDPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x30)
+#define rwID_PDSPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x31)
+#define rwID_PRTADVPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x32)
/* These are toolkits */
#define rwID_CHARSEPLUGIN MAKECHUNKID(rwVENDORID_CRITERIONTK, 0x80)
@@ -480,93 +98,9 @@
#define rwID_BARYCENTRIC MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb2)
#define rwID_PITEXDICTIONARYTK MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb3)
#define rwID_TOCTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb4)
-
-/**********************************************************************/
-
-/* Doxygen Toolkit groups */
-
-/**
- * \defgroup rttool Toolkits
- *
- * API Toolkits
- */
-
-/**
- * \defgroup fxpack FXPack
- *
- * FXPack component group
- */
-
-/**********************************************************************/
-
-/**
- * \defgroup platformspecific Platform Specific
- *
- * Links to all platform specific information in the API Reference can
- * be found in this folder.
- */
-
-/**********************************************************************/
-
-/* Index Page definition for API Reference. Don't mess with it unless you know what you're doing. */
+#define rwID_TPLTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb5)
+#define rwID_ALTPIPETOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb6)
+#define rwID_ANIMTOOLKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb7)
+#define rwID_SKINSPLITTOOKIT MAKECHUNKID(rwVENDORID_CRITERIONTK, 0xb8)
-/**
- * \mainpage RenderWare Graphics API Reference
- *
- * \image html rwglogo.jpg
- *
- * This document provides an API Reference for release 3.3 of the RenderWare
- * Graphics SDK.
- *
- * You do not have to wait for a major release to obtain a current API
- * Reference. An up-to-date API Reference is compiled every week and goes out
- * with the weekly build. The footer declares when it was generated.
- *
- * \section otherdocs Documentation Available
- * RenderWare Graphics is supplied with:
- *
- * - A top-level README.PDF -- If you read nothing else, at least read this!
- * - this API Reference
- * - the User Guide
- * - Artist's documentation (if installed)
- * - Examples documentation
- * - Maestro documentation
- * - Tools documentation
- * - White Papers
- * - readme.txt files for each of the supplied Examples
- *
- * \section contactus Contact Us
- *
- * \subsection csl Criterion Software Ltd.
- * For general information about RenderWare e-mail info@csl.com.
- *
- * \subsection devrels Developer Relations
- *
- * For information regarding Support please email devrels@csl.com
- *
- * \subsection sales Sales
- *
- * For sales information contact: rw-sales@csl.com
- *
- * \section copyright Copyright Notice
- *
- * The information in this document is subject to change without notice and does not represent
- * a commitment on the part of Criterion Software Ltd. The software described in this document is
- * furnished under a license agreement or a non-disclosure agreement. The software may be used or
- * copied only in accordance with the terms of the agreement. It is against the law to copy the
- * software on any medium except as specifically allowed in the license or non-disclosure agreement.
- *
- * No part of this documentation may be reproduced or transmitted in any form or by any means for any
- * purpose without the express written permis­sion of Criterion Software Ltd.
- *
- * Copyright © 1993 - 2002 Criterion Software Ltd. All rights reserved.
- *
- * Canon and RenderWare are registered trademarks of Canon Inc. Nintendo is a registered trademark
- * and NINTENDO GAMECUBE a trademark of Nintendo Co., Ltd. Microsoft is a registered trademark and
- * Xbox is a trademark of Microsoft Corporation. PlayStation is a registered trademark of Sony Computer
- * Entertainment Inc.
- *
- * All other trademarks mentioned herein are the property of their respective companies.
- *
- */
diff --git a/rwsdk/include/d3d8/rpdbgerr.c b/rwsdk/include/d3d8/rpdbgerr.c
index 0c83c04e..70bc941d 100644
--- a/rwsdk/include/d3d8/rpdbgerr.c
+++ b/rwsdk/include/d3d8/rpdbgerr.c
@@ -31,7 +31,7 @@
#include <rwcore.h>
#include <rpdbgerr.h>
-static const char rcsid[] __RWUNUSED__ = "@@(#)$Id: //RenderWare/RW33Active/dev/rwsdk/src/plcore/rpdbgerr.c#1 $";
+static const char rcsid[] __RWUNUSED__ = "@@(#)$Id: rpdbgerr.c,v 1.2 2004/08/31 17:40:34 gtristram Exp $";
#ifdef RWDEBUG
diff --git a/rwsdk/include/d3d8/rpdbgerr.h b/rwsdk/include/d3d8/rpdbgerr.h
index 6918469a..e0500057 100644
--- a/rwsdk/include/d3d8/rpdbgerr.h
+++ b/rwsdk/include/d3d8/rpdbgerr.h
@@ -16,8 +16,6 @@
/* Pick up _ASSERTE macro */
#ifdef _XBOX
#include <xtl.h>
-#else /* _XBOX */
-#include <windows.h>
#endif /* _XBOX */
#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC))
#define _CRTDBG_MAP_ALLOC
@@ -235,6 +233,22 @@ do \
} \
while (0)
+#define RWASSERTM(condition, messageArgs) \
+do \
+{ \
+ if (!(condition)) \
+ { \
+ RwDebugSendMessage(rwDEBUGASSERT, \
+ __dbFunctionName, \
+ RWSTRING(#condition)); \
+ RwDebugSendMessage(rwDEBUGMESSAGE, \
+ __dbFunctionName, \
+ _rwdbsprintf messageArgs); \
+ } \
+ RWASSERTE(condition); \
+} \
+while (0)
+
#else /* RWDEBUG */
#define RWRETURN(value) return(value)
@@ -253,6 +267,7 @@ while (0)
#define RWFUNCTION(name)
#define RWAPIFUNCTION(name)
#define RWASSERT(condition)
+#define RWASSERTM(condition, messageArgs)
#define RWMESSAGE(args)
#endif
diff --git a/rwsdk/include/d3d8/rpdmorph.h b/rwsdk/include/d3d8/rpdmorph.h
index 1494bf3d..89c51b31 100644
--- a/rwsdk/include/d3d8/rpdmorph.h
+++ b/rwsdk/include/d3d8/rpdmorph.h
@@ -28,7 +28,7 @@
/**
* \defgroup rpdmorph RpDMorph
- * \ingroup rpplugin
+ * \ingroup deltamorphing
* \file rpdmorph.h
*
* Delta Morphing Plugin for RenderWare Graphics.
@@ -153,7 +153,7 @@ RpDMorphTargetGetFlags( RpDMorphTarget *dMorphTarget );
* These functions work at the DMorphAtomic level.
*/
extern RpAtomic *
-RpDMorphAtomicInitalize( RpAtomic *atomic );
+RpDMorphAtomicInitialize( RpAtomic *atomic );
extern RwReal *
RpDMorphAtomicGetDMorphValues( RpAtomic *atomic );
diff --git a/rwsdk/include/d3d8/rpdmorph.rpe b/rwsdk/include/d3d8/rpdmorph.rpe
index a5202425..b35acc4e 100644
--- a/rwsdk/include/d3d8/rpdmorph.rpe
+++ b/rwsdk/include/d3d8/rpdmorph.rpe
@@ -160,472 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionDMorph
{
diff --git a/rwsdk/include/d3d8/rphanim.h b/rwsdk/include/d3d8/rphanim.h
index a9b0438a..0d1bba7a 100644
--- a/rwsdk/include/d3d8/rphanim.h
+++ b/rwsdk/include/d3d8/rphanim.h
@@ -26,7 +26,6 @@
* Purpose : Hierarchical animation *
* *
**************************************************************************/
-
#ifndef RPHANIM_H
#define RPHANIM_H
@@ -38,7 +37,7 @@
/**
* \defgroup rphanim RpHAnim
- * \ingroup rpplugin
+ * \ingroup objectframehanim
*
* Hierarchical Animation Plugin for RenderWare Graphics.
*/
@@ -66,45 +65,26 @@
*/
#include <rphanim.rpe> /* automatically generated header file */
#include <rtquat.h>
+#include <rtanim.h>
#define rpHANIMSTREAMCURRENTVERSION 0x100
-/**
- * \ingroup rphanim
- * \ref RpHAnimAtomicGlobalVars typedef for struct RpHAnimAtomicGlobalVars
- */
+#if (!defined(DOXYGEN))
+
typedef struct RpHAnimAtomicGlobalVars RpHAnimAtomicGlobalVars;
-/**
- * \ingroup rphanim
- * \struct RpHAnimAtomicGlobalVars
- */
struct RpHAnimAtomicGlobalVars
{
- RwInt32 engineOffset ; /* Offset into global data */
+ RwInt32 engineOffset;
RwFreeList *HAnimFreeList;
- RwFreeList *HAnimAnimationFreeList;
};
-extern RpHAnimAtomicGlobalVars RpHAnimAtomicGlobals;
+#endif /* (!defined(DOXYGEN)) */
-#define rpHANIMSTDKEYFRAMESIZE sizeof(RpHAnimStdKeyFrame)
+#define rpHANIMSTDKEYFRAMESIZE sizeof(RpHAnimKeyFrame)
#define rpHANIMSTDKEYFRAMETYPEID 0x1
-#define RwAnimMalloc() \
- RwFreeListAlloc(RpHAnimAtomicGlobals.HAnimFreeList)
-
-#define RwAnimFree(_anim) \
- RwFreeListFree(RpHAnimAtomicGlobals.HAnimFreeList, (_anim))
-
-#define RwAnimAnimationMalloc() \
- RwFreeListAlloc(RpHAnimAtomicGlobals.HAnimAnimationFreeList)
-
-#define RwAnimAnimationFree(_animAnimation) \
- RwFreeListFree(RpHAnimAtomicGlobals.HAnimAnimationFreeList, \
- (_animAnimation))
-
-#define RpV3dInterpolate(o, a, s, b) \
+#define RpV3dInterpolate(o,a,s,b) \
MACRO_START \
{ \
(o)->x = (((a)->x) + ((s)) * (((b)->x) - ((a)->x))); \
@@ -113,223 +93,57 @@ MACRO_START \
} \
MACRO_STOP
-/**
- * \ingroup rphanim
- * \ref RpHAnimHierarchy typedef for struct RpHAnimHierarchy
- */
-typedef struct RpHAnimHierarchy RpHAnimHierarchy;
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimAnimation typedef for struct RpHAnimAnimation
- */
-typedef struct RpHAnimAnimation RpHAnimAnimation;
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimHierarchyCallBack
- * This typedef defines a callback function for use with the
- * \ref RpHAnimHierarchySetAnimCallBack and
- * \ref RpHAnimHierarchySetAnimLoopCallBack functions.
- *
- * \param hierarchy
- * A pointer to the AnimHierarchy structure.
- *
- * \param data User-defined data.
- * You can use this to pass your own data
- * structure(s) to the callback function.
- *
- * \see RpHAnimHierarchySetAnimCallBack
- * \see RpHAnimHierarchySetAnimLoopCallBack
- *
- */
-
-typedef RpHAnimHierarchy * (*RpHAnimHierarchyCallBack) (RpHAnimHierarchy *hierarchy,
- void *data);
-
-/*
- * The following CallBacks are needed for each overloaded interpolation
- * scheme. See RpHAnimInterpolatorInfo.
- */
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameToMatrixCallBack
- * This typedef defines a callback function for converting
- * an animation keyframe into a modeling matrix. The output matrix will be
- * used to construct the array of world or local space matrices for the
- * hierarchy as obtained with \ref RpHAnimHierarchyGetMatrixArray, and
- * possibly used for updating an external \ref RwFrame hierarchy.
- *
- * \param matrix This is the matrix to store the output of the conversion
- * \param voidIFrame This is a void pointer to the keyframe and should be cast
- * to the keyframe type this callback is for.
- */
-typedef void (*RpHAnimKeyFrameToMatrixCallBack) (RwMatrix *matrix, void *voidIFrame);
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameBlendCallBack
- * This typedef defines a callback function for blending between two animation
- * keyframes by the given blend factor.
- *
- * \param voidOut This is the void pointer for the output of the blend
- * \param voidIn1 First input keyframe
- * \param voidIn2 Second input keyframe
- * \param alpha Blend factor
- */
-typedef void (*RpHAnimKeyFrameBlendCallBack) (void *voidOut, void *voidIn1,
- void *voidIn2, RwReal alpha);
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameInterpolateCallBack
- * This typedef defines a callback function for interpolating between two
- * animation keyframes according to the given time.
- *
- * \param voidOut This is the void pointer for the output of the
- * interpolation
- * \param voidIn1 First input keyframe
- * \param voidIn2 Second input keyframe
- * \param time Time at which to interpolate
- */
-typedef void (*RpHAnimKeyFrameInterpolateCallBack) (void *voidOut, void *voidIn1,
- void *voidIn2, RwReal time);
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameAddCallBack
- * This typedef defines a callback function for adding together two animation
- * keyframes. One of the keyframes would usually be a delta.
- *
- * \param voidOut This is the void pointer for the output summed keyframe
- * \param voidIn1 First input keyframe
- * \param voidIn2 Second input keyframe
- */
-typedef void (*RpHAnimKeyFrameAddCallBack) (void *voidOut, void *voidIn1,
- void *voidIn2);
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameMulRecipCallBack
- * This typedef defines a callback function for multiplying a keyframe
- * by the inverse of another keyframe
- *
- * \param voidFrame This is the void pointer for the keyframe to be modified
- * \param voidStart First start keyframe to take the reciprocal of.
- */
-typedef void (*RpHAnimKeyFrameMulRecipCallBack) (void *voidFrame, void *voidStart);
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameStreamReadCallBack
- * This typedef defines a callback function for reading in keyframes
- * from an \ref RwStream for the given animation.
- *
- * \param stream The stream to read the keyframes from
- * \param animation The animation to read the keyframes into
- *
- * \return Pointer to the animation.
- */
-typedef RpHAnimAnimation * (*RpHAnimKeyFrameStreamReadCallBack) (RwStream *stream, RpHAnimAnimation *animation);
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameStreamWriteCallBack
- * This typedef defines a callback function for writing keyframes from the
- * given animation to an \ref RwStream.
- *
- * \param animation The animation to write out from
- * \param stream The stream to write the keyframes to
- *
- * \return TRUE if successful.
- */
-typedef RwBool (*RpHAnimKeyFrameStreamWriteCallBack) (RpHAnimAnimation *animation, RwStream *stream);
-
-/**
- * \ingroup rphanim
- * \ref RpHAnimKeyFrameStreamGetSizeCallBack
- * This typedef defines a callback function for calculating the binary stream
- * size of keyframe data within an animation.
- *
- * \param animation The animation to calculate sizes of
- *
- * \return Size in bytes of the keyframe data.
- */
-typedef RwInt32 (*RpHAnimKeyFrameStreamGetSizeCallBack) (RpHAnimAnimation *animation);
/**
* \ingroup rphanim
- * \ref RpHAnimInterpolatorInfo
- * typedef for struct \ref RpHAnimInterpolatorInfo
+ * \ref RpHAnimKeyFrame
+ * typedef for struct RpHAnimKeyFrame. Based on \ref RtAnimKeyFrameHeader.
*/
-typedef struct RpHAnimInterpolatorInfo RpHAnimInterpolatorInfo;
+typedef struct RpHAnimKeyFrame RpHAnimKeyFrame;
/**
* \ingroup rphanim
- * \struct RpHAnimInterpolatorInfo
- * This is used to hold information for a keyframe interpolation scheme.
- *
- * \see RpHAnimRegisterInterpolationScheme
- * \see RpHAnimGetInterpolatorInfo
+ * \struct RpHAnimKeyFrame
+ * A structure representing the standard keyframe data. Sequences of
+ * such keyframes in an \ref RtAnimAnimation defines the animation of each
+ * node in a hierarchy.
*/
-struct RpHAnimInterpolatorInfo
+struct RpHAnimKeyFrame
{
- RwInt32 typeID; /**< The ID of the interpolation scheme */
- RwInt32 keyFrameSize; /**< Size in bytes of the keyframe structure */
- RpHAnimKeyFrameToMatrixCallBack keyFrameToMatrixCB; /**< Pointer to a function that converts a keyframe to a matrix */
- RpHAnimKeyFrameBlendCallBack keyFrameBlendCB; /**< Pointer to a function that blends between a pair of keyframes for a given delta value */
- RpHAnimKeyFrameInterpolateCallBack keyFrameInterpolateCB; /**< Pointer to a function that interpolates between two keyframes for a given time in between */
- RpHAnimKeyFrameAddCallBack keyFrameAddCB; /**< Pointer to a function that adds two keyframes (one of which may be a delta) */
- RpHAnimKeyFrameMulRecipCallBack keyFrameMulRecipCB; /**< Pointer to a function that multiplies a keyframe by the reciprocal of another */
- RpHAnimKeyFrameStreamReadCallBack keyFrameStreamReadCB; /**< Pointer to a function that reads the keyframes from a stream for a given animation */
- RpHAnimKeyFrameStreamWriteCallBack keyFrameStreamWriteCB; /**< Pointer to a function that writes the keyframes to a stream for a given animation */
- RpHAnimKeyFrameStreamGetSizeCallBack keyFrameStreamGetSizeCB; /**< Pointer to a function that returns the binary stream size of the keyframes for a given animation */
+ RpHAnimKeyFrame *prevFrame; /**< Pointer to the previous keyframe */
+ RwReal time; /**< Time at keyframe */
+ RtQuat q; /**< Quaternion rotation at keyframe */
+ RwV3d t; /**< Translation at keyframe */
};
/**
* \ingroup rphanim
- * \ref RpHAnimKeyFrameHeader
- * typedef for struct RpHAnimKeyFrameHeader
+ * \ref RpHAnimInterpFrame
+ * typedef for struct RpHAnimInterpFrame. Based on \ref RtAnimInterpFrameHeader.
*/
-typedef struct RpHAnimKeyFrameHeader RpHAnimKeyFrameHeader;
+typedef struct RpHAnimInterpFrame RpHAnimInterpFrame;
/**
* \ingroup rphanim
- * \struct RpHAnimKeyFrameHeader
- * Holds header information for a keyframe. All keyframe structures used with
- * the overloadable interpolation system should start with this data.
- *
- * \see RpHAnimStdKeyFrame
- * \see RpHAnimRegisterInterpolationScheme
+ * \struct RpHAnimInterpFrame
+ * A structure representing an interpolated keyframe. The initial part of the
+ * structure matches \ref RtAnimInterpFrameHeader.
*/
-struct RpHAnimKeyFrameHeader
+struct RpHAnimInterpFrame
{
- void *prevFrame; /**< Previous keyframe for particular hierarchy node */
- RwReal time; /**< Time at keyframe */
+ RpHAnimKeyFrame *keyFrame1;
+ /**< Pointer to 1st keyframe of current interpolation pair */
+ RpHAnimKeyFrame *keyFrame2;
+ /**< Pointer to 2nd keyframe of current interpolation pair */
+ RtQuat q; /**< Quaternion rotation */
+ RwV3d t; /**< Translation */
};
/**
* \ingroup rphanim
- * \ref RpHAnimStdKeyFrame
- * typedef for struct RpHAnimStdKeyFrame
- */
-typedef struct RpHAnimStdKeyFrame RpHAnimStdKeyFrame;
-
-/**
- * \ingroup rphanim
- * \struct RpHAnimStdKeyFrame
- * A structure representing the standard keyframe data. Sequences of
- * such keyframes in an \ref RpHAnimAnimation defines the animation of each
- * node in a hierarchy.
+ * \ref RpHAnimHierarchy typedef for struct RpHAnimHierarchy
*/
-struct RpHAnimStdKeyFrame
-{
- RpHAnimStdKeyFrame *prevFrame; /**< Previous keyframe for particular hierarchy node */
- RwReal time; /**< Time at keyframe */
- RtQuat q; /**< Quaternion rotation at keyframe */
- RwV3d t; /**< Translation at keyframe */
-};
+typedef struct RpHAnimHierarchy RpHAnimHierarchy;
/* Flags for FrameInfos */
@@ -347,54 +161,23 @@ typedef struct RpHAnimNodeInfo RpHAnimNodeInfo;
* \ingroup rphanim
* \struct RpHAnimNodeInfo
*
+ * Used to describe a hierarchy toplogy.
+ * It holds flags representing its position in the
+ * hierarchy as well as a pointer to the matching \ref RwFrame if the
+ * hierarchy has been attached to a \ref RwFrame hierarchy.
+ *
*/
struct RpHAnimNodeInfo
{
- RwInt32 nodeID; /**< User defined ID for this node */
- RwInt32 nodeIndex; /**< Array index of node */
+ RwInt32 nodeID; /**< User defined ID for this node */
+ RwInt32 nodeIndex; /**< Array index of node */
RwInt32 flags; /**< Matrix push/pop flags */
RwFrame * pFrame; /**< Pointer to an attached RwFrame (see \ref RpHAnimHierarchyAttach) */
};
/**
* \ingroup rphanim
- * \struct RpHAnimAnimation
- * A hierarchical animation consists of an array of keyframe structures,
- * along with some flags and a duration.
- *
- * The keyframes should be presented in the order they are needed
- * to animate forwards through time. Pointers link all of the keyframes
- * for a particular node backwards through time in a list.
- *
- * For example, a 3 node animation, with keyframes at the following times:
- *
- * Node 1: 0.0, 1.0, 2.0, 3.0
- * Node 2: 0.0, 3.0
- * Node 3: 0.0, 2.0, 2.5, 3.0
- *
- * should be formatted in an RpHAnimAnimation animation like this:
- *
- * B1,0.0 B2,0.0 B3,0.0 B1,1.0, B2,3.0, B3,2.0, B1,2.0, B1,3.0, B3,2.5 B3,3.0
- *
- * Each node MUST start at time = 0.0, and each node must terminate with a keyframe
- * at time = duration of animation.
- *
- * \see RpHAnimAnimationCreate
- */
-struct RpHAnimAnimation
-{
- RpHAnimInterpolatorInfo *interpInfo; /**< Pointer to interpolation scheme information */
- RwInt32 numFrames; /**< Number of keyframes in the animation */
- RwInt32 flags; /**< Specifies details about animation, relative translation modes etc */
- RwReal duration; /**< Duration of animation in seconds */
- void *pFrames; /**< Pointer to the animation keyframes */
-};
-
-/**
- * \ingroup rphanim
* \ref RpHAnimHierarchyFlag defines type and update modes in HAnimHierarchies
- *
- * \see RpAnimHierarchyFlag
*/
enum RpHAnimHierarchyFlag
{
@@ -411,9 +194,7 @@ enum RpHAnimHierarchyFlag
rpHANIMHIERARCHYFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
-/**
- * \ingroup rphanim
- * \typedef RpHAnimHierarchyFlag
+/*
* These flags are used to control the creation and
* update status of the hierarchy
*/
@@ -422,13 +203,7 @@ typedef enum RpHAnimHierarchyFlag RpHAnimHierarchyFlag;
/**
* \ingroup rphanim
* \struct RpHAnimHierarchy
- * An RpHAnimHierarchy is used to "play back" an animation - it holds the
- * interpolated keyframe data for the current state of an animation
- * concatenated on the end of the structure.
- *
- * The rpHANIMHIERARCHYGETINTERPFRAME() macro can be used to access the current
- * interpolated data, for the current time or to write to this data to override
- * it with procedural animation.
+ * An RpHAnimHierarchy is used to "play back" an animation.
*
* The structure of a hierarchy is defined by an array
* of \ref RpHAnimNodeInfo structures.
@@ -443,48 +218,18 @@ struct RpHAnimHierarchy
{
RwInt32 flags; /**< Flags for the hierarchy */
RwInt32 numNodes; /**< Number of nodes in the hierarchy */
- RpHAnimAnimation *pCurrentAnim; /**< Current animation applied to hierarchy */
- RwReal currentTime; /**< Current animation time */
- void *pNextFrame; /**< Next animation keyframe to be played */
- RpHAnimHierarchyCallBack pAnimCallBack; /**< Animation callback function pointer */
- void *pAnimCallBackData; /**< Animation callback function user data */
- RwReal animCallBackTime; /**< Trigger time for callback function */
- RpHAnimHierarchyCallBack pAnimLoopCallBack; /**< Animation loop callback function pointer */
- void *pAnimLoopCallBackData; /**< Animation loop callback function data */
+
RwMatrix *pMatrixArray; /**< Pointer to node matrices*/
void *pMatrixArrayUnaligned; /**< Pointer to memory used for node matrices
* from which the aligned pMatrixArray is allocated */
RpHAnimNodeInfo *pNodeInfo; /**< Array of node information (push/pop flags etc) */
RwFrame *parentFrame; /**< Pointer to the Root RwFrame of the hierarchy this
* RpHAnimHierarchy represents */
- RwInt32 maxKeyFrameSize; /**< Maximum size of keyframes usable on this hierarhcy
- * (set at creation time) */
- RwInt32 currentKeyFrameSize; /**< Size of keyframes in the current animation */
- RpHAnimKeyFrameToMatrixCallBack keyFrameToMatrixCB; /**< Internal use */
- RpHAnimKeyFrameBlendCallBack keyFrameBlendCB; /**< Internal use */
- RpHAnimKeyFrameInterpolateCallBack keyFrameInterpolateCB; /**< Internal use */
- RpHAnimKeyFrameAddCallBack keyFrameAddCB; /**< Internal use */
RpHAnimHierarchy *parentHierarchy; /**< Internal use */
- RwInt32 offsetInParent; /**< Internal use */
RwInt32 rootParentOffset; /**< Internal use */
-};
-#define rpHANIMHIERARCHYGETINTERPFRAME( hierarchy, nodeIndex ) \
- ( (void *)( ( (RwUInt8 *)&(hierarchy[1]) + \
- ((nodeIndex) * \
- hierarchy->currentKeyFrameSize) ) ) )
-
-#define rpHANIMHIERARCHYGETINTERPFRAME1( hierarchy, nodeIndex ) \
- ( (void *)( ( (RwUInt8 *)&(hierarchy[1]) + \
- ((hierarchy->numNodes + \
- (nodeIndex)) * \
- hierarchy->currentKeyFrameSize) ) ) )
-
-#define rpHANIMHIERARCHYGETINTERPFRAME2( hierarchy, nodeIndex ) \
- ( (void *)( ( (RwUInt8 *)&(hierarchy[1]) + \
- ((hierarchy->numNodes * 2 + \
- (nodeIndex)) * \
- hierarchy->currentKeyFrameSize) ) ) )
+ RtAnimInterpolator *currentAnim; /**< Internal use */
+};
/**
* \ingroup rphanim
@@ -496,36 +241,40 @@ typedef struct RpHAnimFrameExtension RpHAnimFrameExtension;
/**
* \ingroup rphanim
* \struct RpHAnimFrameExtension
+ *
+ * Used to extend \ref RwFrame objects, and thus
+ * allow the mapping between animation hierarchy node ID and \ref RwFrame.
+ *
*/
struct RpHAnimFrameExtension
{
- RwInt32 id; /**< ID given to this RwFrame (default of -1) */
+ RwInt32 id; /**< ID given to this RwFrame (default of -1) */
RpHAnimHierarchy *hierarchy; /**< Pointer to Animation hierarchy attached to this RwFrame */
};
/*--- Plugin API Functions ---*/
-#define RpHAnimHierarchySetFlagsMacro(hierarchy, _flags) \
+#define RpHAnimHierarchySetFlagsMacro(hierarchy,_flags) \
MACRO_START \
{ \
- (hierarchy)->flags = _flags; \
+ (hierarchy)->flags = _flags; \
} \
MACRO_STOP
#define RpHAnimHierarchyGetFlagsMacro(hierarchy) \
((hierarchy)->flags)
-#define RpHAnimStdKeyFrameToMatrixMacro(_matrix, _voidIFrame) \
+#define RpHAnimKeyFrameToMatrixMacro(_matrix,_voidIFrame) \
MACRO_START \
{ \
- RpHAnimStdKeyFrame * iFrame = (RpHAnimStdKeyFrame *)(_voidIFrame); \
+ RpHAnimInterpFrame * iFrame = (RpHAnimInterpFrame *)(_voidIFrame); \
\
/* \
* RpHAnim uses the same types of quaternion as RtQuat \
* hence no conjugate call as in RpSkin \
*/ \
\
- RtQuatUnitConvertToMatrix(&iFrame->q, (_matrix)); \
+ RtQuatUnitConvertToMatrix(&iFrame->q,(_matrix)); \
\
(_matrix)->pos.x = iFrame->t.x; \
(_matrix)->pos.y = iFrame->t.y; \
@@ -534,14 +283,14 @@ MACRO_START \
MACRO_STOP
+
#if (! defined(RWDEBUG))
-#define RpHAnimHierarchySetFlags(hierarchy, _flags) \
- RpHAnimHierarchySetFlagsMacro(hierarchy, _flags)
+#define RpHAnimHierarchySetFlags(hierarchy,_flags) \
+ RpHAnimHierarchySetFlagsMacro(hierarchy,_flags)
#define RpHAnimHierarchyGetFlags(hierarchy) \
(RpHAnimHierarchyFlag)RpHAnimHierarchyGetFlagsMacro(hierarchy)
-
#endif /* (! defined(RWDEBUG)) */
#ifdef __cplusplus
@@ -549,6 +298,8 @@ extern "C"
{
#endif /* __cplusplus */
+extern RpHAnimAtomicGlobalVars RpHAnimAtomicGlobals;
+
#if (defined(RWDEBUG))
extern RpHAnimHierarchy *
@@ -560,15 +311,9 @@ RpHAnimHierarchyGetFlags(RpHAnimHierarchy *hierarchy);
#endif /* (defined(RWDEBUG)) */
-/* Keyframe Interpolator Types */
-
-extern RwBool
-RpHAnimRegisterInterpolationScheme(RpHAnimInterpolatorInfo *interpolatorInfo);
-
-extern RpHAnimInterpolatorInfo *
-RpHAnimGetInterpolatorInfo(RwInt32 typeID);
-
/* Animation hierarchy creation */
+extern void
+RpHAnimHierarchySetFreeListCreateParams(RwInt32 blockSize,RwInt32 numBlocksToPrealloc);
extern RpHAnimHierarchy *
RpHAnimHierarchyCreate(RwInt32 numNodes,
@@ -613,45 +358,10 @@ extern RpHAnimHierarchy *
RpHAnimFrameGetHierarchy(RwFrame *frame);
/* Macros for legacy support of old function names */
-#define RpHAnimSetHierarchy(frame, hierarchy) \
- RpHAnimFrameSetHierarchy(frame, hierarchy)
+#define RpHAnimSetHierarchy(frame,hierarchy) \
+ RpHAnimFrameSetHierarchy(frame,hierarchy)
#define RpHAnimGetHierarchy(frame) RpHAnimFrameGetHierarchy(frame)
-extern RwBool
-RpHAnimHierarchySetKeyFrameCallBacks(RpHAnimHierarchy *hierarchy,
- RwInt32 keyFrameTypeID);
-
-extern RwBool
-RpHAnimHierarchySetCurrentAnim(RpHAnimHierarchy *hierarchy,
- RpHAnimAnimation *anim);
-
-extern RwBool
-RpHAnimHierarchySetCurrentAnimTime(RpHAnimHierarchy *hierarchy,
- RwReal time);
-
-extern RwBool
-RpHAnimHierarchySubAnimTime(RpHAnimHierarchy *hierarchy,
- RwReal time);
-
-extern RwBool
-RpHAnimHierarchyStdKeyFrameAddAnimTime(RpHAnimHierarchy *hierarchy,
- RwReal time);
-
-extern RwBool
-RpHAnimHierarchyAddAnimTime(RpHAnimHierarchy *hierarchy,
- RwReal time);
-
-extern RpHAnimHierarchy *
-RpHAnimHierarchySetAnimCallBack(RpHAnimHierarchy *hierarchy,
- RpHAnimHierarchyCallBack callBack,
- RwReal time,
- void *data );
-
-extern RpHAnimHierarchy *
-RpHAnimHierarchySetAnimLoopCallBack(RpHAnimHierarchy *hierarchy,
- RpHAnimHierarchyCallBack callBack,
- void *data );
-
extern RwMatrix *
RpHAnimHierarchyGetMatrixArray(RpHAnimHierarchy *hierarchy);
@@ -665,209 +375,267 @@ extern RwInt32
RpHAnimIDGetIndex(RpHAnimHierarchy *hierarchy,
RwInt32 ID);
-/* Animations */
-
-extern RpHAnimAnimation *
-RpHAnimAnimationCreate(RwInt32 typeID,
- RwInt32 numFrames,
- RwInt32 flags,
- RwReal duration);
-
-extern RpHAnimAnimation *
-RpHAnimAnimationDestroy(RpHAnimAnimation *animation);
+/* Plugin support */
-#ifdef RWDEBUG
+extern RwBool
+RpHAnimPluginAttach(void);
-extern RwInt32
-RpHAnimAnimationGetTypeID(RpHAnimAnimation *animation);
+/* Hanim keyframe functions */
-#else /* RWDEBUG */
+extern void
+RpHAnimKeyFrameApply(void *matrix,
+ void *voidIFrame);
-#define RpHAnimAnimationGetTypeID(animation) \
- (animation->interpInfo->typeID)
+extern void
+RpHAnimKeyFrameBlend(void *voidOut,
+ void *voidIn1,
+ void *voidIn2,
+ RwReal alpha);
-#endif /* RWDEBUG */
+extern void
+RpHAnimKeyFrameInterpolate(void *voidOut,
+ void *voidIn1,
+ void *voidIn2,
+ RwReal time);
-extern RpHAnimAnimation *
-RpHAnimAnimationRead(const RwChar * filename);
+extern void
+RpHAnimKeyFrameAdd(void *voidOut,
+ void *voidIn1,
+ void *voidIn2);
-extern RwBool
-RpHAnimAnimationWrite(RpHAnimAnimation *animation,
- const RwChar * filename);
+extern void
+RpHAnimKeyFrameMulRecip(void *voidFrame,
+ void *voidStart);
-extern RpHAnimAnimation *
-RpHAnimAnimationStreamRead(RwStream *stream);
+extern RtAnimAnimation *
+RpHAnimKeyFrameStreamRead(RwStream *stream,
+ RtAnimAnimation *animation);
extern RwBool
-RpHAnimAnimationStreamWrite(RpHAnimAnimation *animation,
- RwStream *stream);
+RpHAnimKeyFrameStreamWrite(RtAnimAnimation *animation,
+ RwStream *stream);
extern RwInt32
-RpHAnimAnimationStreamGetSize(RpHAnimAnimation *animation);
+RpHAnimKeyFrameStreamGetSize(RtAnimAnimation *animation);
-extern RwBool
-RpHAnimAnimationMakeDelta(RpHAnimAnimation *animation,
- RwInt32 numNodes,
- RwReal time);
-
-/* Plugin support */
+/* Access to RwFrame ID's */
extern RwBool
-RpHAnimPluginAttach(void);
+RpHAnimFrameSetID(RwFrame *frame,
+ RwInt32 id);
-/* Overloadable keyframe functions */
+extern RwInt32
+RpHAnimFrameGetID(RwFrame *frame);
-#define RpHAnimFrameToMatrixMacro(hierarchy, matrix, iFrame) \
-MACRO_START \
-{ \
- const RpHAnimKeyFrameToMatrixCallBack keyFrameToMatrixCB = \
- (hierarchy)->keyFrameToMatrixCB; \
- \
- if (RpHAnimStdKeyFrameToMatrix == keyFrameToMatrixCB) \
- { \
- RpHAnimStdKeyFrameToMatrixMacro((matrix), (iFrame)); \
- } \
- else \
- { \
- keyFrameToMatrixCB((matrix), (iFrame)); \
- } \
-} \
-MACRO_STOP
+/*
+ * Utility Functions
+ */
+#define RpHAnimHierarchySetCurrentAnimMacro(hierarchy,anim)\
+ RtAnimInterpolatorSetCurrentAnim((hierarchy)->currentAnim,anim)
-#define RpHAnimFrameInterpolateMacro(hierarchy, out, in1, in2, time) \
-MACRO_START \
-{ \
- (hierarchy)->keyFrameInterpolateCB((out), (in1), (in2), (time)); \
-} \
-MACRO_STOP
+#define RpHAnimHierarchyGetCurrentAnimMacro(hierarchy)\
+ RtAnimInterpolatorGetCurrentAnim((hierarchy)->currentAnim)
-#define RpHAnimFrameBlendMacro(hierarchy, out, in1, in2, fAlpha) \
-MACRO_START \
-{ \
- (hierarchy)->keyFrameBlendCB((out), (in1), (in2), (fAlpha)); \
-} \
-MACRO_STOP
+#define RpHAnimHierarchySetCurrentAnimTimeMacro(hierarchy,time)\
+ RtAnimInterpolatorSetCurrentTime((hierarchy)->currentAnim,time)
-#define RpHAnimFrameAddTogetherMacro(hierarchy, out, in1, in2) \
-MACRO_START \
-{ \
- (hierarchy)->keyFrameAddCB((out), (in1), (in2)); \
-} \
-MACRO_STOP
+#define RpHAnimHierarchyAddAnimTimeMacro(hierarchy,time)\
+ RtAnimInterpolatorAddAnimTime((hierarchy)->currentAnim,time)
-#ifdef RWDEBUG
-void
-RpHAnimFrameInterpolate(RpHAnimHierarchy *hierarchy,
- void *out, void *in1,
- void *in2, RwReal time);
+#define RpHAnimHierarchySubAnimTimeMacro(hierarchy,time)\
+ RtAnimInterpolatorSubAnimTime((hierarchy)->currentAnim,time)
-void
-RpHAnimFrameBlend(RpHAnimHierarchy *hierarchy,
- void *out,
- void *in1,
- void *in2,
- RwReal alpha);
+#define RpHAnimHierarchySetKeyFrameCallBacksMacro(hierarchy,keyFrameTypeID) \
+ RtAnimInterpolatorSetKeyFrameCallBacks((hierarchy)->currentAnim,\
+ keyFrameTypeID)
-void
-RpHAnimFrameToMatrix(RpHAnimHierarchy *hierarchy,
- RwMatrix *matrix, void *iFrame);
+#define RpHAnimHierarchyBlendMacro(outHierarchy,inHierarchy1,inHierarchy2,alpha)\
+ RtAnimInterpolatorBlend((outHierarchy)->currentAnim,\
+ (inHierarchy1)->currentAnim,\
+ (inHierarchy2)->currentAnim,\
+ alpha)
-void
-RpHAnimFrameAddTogether(RpHAnimHierarchy *hierarchy,
- void *out, void *in1, void *in2);
+#define RpHAnimHierarchyAddTogetherMacro(outHierarchy,inHierarchy1,inHierarchy2)\
+ RtAnimInterpolatorAddTogether((outHierarchy)->currentAnim,\
+ (inHierarchy1)->currentAnim,\
+ (inHierarchy2)->currentAnim)
-#else /* RWDEBUG */
-#define RpHAnimFrameToMatrix(hierarchy, matrix, iFrame) \
- RpHAnimFrameToMatrixMacro(hierarchy, matrix, iFrame)
+#define RpHAnimHierarchySetAnimCallBackMacro(hierarchy,callBack,time,data)\
+ RtAnimInterpolatorSetAnimCallBack((hierarchy)->currentAnim,callBack,time,data)
-#define RpHAnimFrameInterpolate(hierarchy, out, in1, in2, time) \
- RpHAnimFrameInterpolateMacro(hierarchy, out, in1, in2, time)
+#define RpHAnimHierarchySetAnimLoopCallBackMacro(hierarchy,callBack,data)\
+ RtAnimInterpolatorSetAnimLoopCallBack((hierarchy)->currentAnim,callBack,data)
-#define RpHAnimFrameBlend(hierarchy, out, in1, in2, alpha) \
- RpHAnimFrameBlendMacro(hierarchy, out, in1, in2, alpha)
+#define RpHAnimHierarchyBlendSubHierarchyMacro(outHierarchy,inHierarchy1,inHierarchy2,alpha)\
+ RtAnimInterpolatorBlendSubInterpolator((outHierarchy)->currentAnim,(inHierarchy1)->currentAnim,(inHierarchy2)->currentAnim,alpha)
-#define RpHAnimFrameAddTogether(hierarchy, out, in1, in2) \
- RpHAnimFrameAddTogetherMacro(hierarchy, out, in1, in2)
+#define RpHAnimHierarchyAddSubHierarchyMacro(outHierarchy,mainHierarchy,subHierarchy)\
+ RtAnimInterpolatorAddSubInterpolator((outHierarchy)->currentAnim,(mainHierarchy)->currentAnim,(subHierarchy)->currentAnim)
-#endif /* RWDEBUG */
-
-/* Standard keyframe functions */
+#define RpHAnimHierarchyCopyMacro(outHierarchy,inHierarchy)\
+ RtAnimInterpolatorCopy((outHierarchy)->currentAnim,(inHierarchy)->currentAnim)
-extern void
-RpHAnimStdKeyFrameToMatrix(RwMatrix *matrix,
- void * voidIFrame);
-extern void
-RpHAnimStdKeyFrameBlend(void *voidOut,
- void *voidIn1,
- void *voidIn2,
- RwReal alpha);
-extern void
-RpHAnimStdKeyFrameInterpolate(void *voidOut,
- void *voidIn1,
- void *voidIn2,
- RwReal time);
+#ifdef RWDEBUG
+extern RwBool
+RpHAnimHierarchySetCurrentAnim(RpHAnimHierarchy *hierarchy,
+ RtAnimAnimation *anim);
-extern void
-RpHAnimStdKeyFrameAdd(void *voidOut,
- void *voidIn1,
- void *voidIn2);
+extern RtAnimAnimation *
+RpHAnimHierarchyGetCurrentAnim(RpHAnimHierarchy *hierarchy);
-extern void
-RpHAnimStdKeyFrameMulRecip(void *voidFrame,
- void *voidStart);
+extern RwBool
+RpHAnimHierarchySetCurrentAnimTime(RpHAnimHierarchy *hierarchy,
+ RwReal time);
-extern RpHAnimAnimation *
-RpHAnimStdKeyFrameStreamRead(RwStream *stream,
- RpHAnimAnimation *animation);
+extern RwBool
+RpHAnimHierarchyAddAnimTime(RpHAnimHierarchy *hierarchy,
+ RwReal time);
extern RwBool
-RpHAnimStdKeyFrameStreamWrite(RpHAnimAnimation *animation,
- RwStream *stream);
+RpHAnimHierarchySubAnimTime(RpHAnimHierarchy *hierarchy,
+ RwReal time);
-extern RwInt32
-RpHAnimStdKeyFrameStreamGetSize(RpHAnimAnimation *animation);
+extern RwBool
+RpHAnimHierarchySetKeyFrameCallBacks(RpHAnimHierarchy *hierarchy,
+ RwInt32 keyFrameTypeID);
-/* Hierarchy blending/combination functions */
+extern void
+RpHAnimHierarchySetAnimCallBack(RpHAnimHierarchy *hierarchy,
+ RtAnimCallBack callBack,
+ RwReal time,
+ void *data);
extern RwBool
RpHAnimHierarchyBlend(RpHAnimHierarchy *outHierarchy,
RpHAnimHierarchy *inHierarchy1,
RpHAnimHierarchy *inHierarchy2,
RwReal alpha);
+
extern RwBool
RpHAnimHierarchyAddTogether(RpHAnimHierarchy *outHierarchy,
RpHAnimHierarchy *inHierarchy1,
RpHAnimHierarchy *inHierarchy2);
+extern void
+RpHAnimHierarchySetAnimLoopCallBack(RpHAnimHierarchy *hierarchy,
+ RtAnimCallBack callBack,
+ void *data);
extern RwBool
RpHAnimHierarchyBlendSubHierarchy(RpHAnimHierarchy *outHierarchy,
- RpHAnimHierarchy *inHierarchy1,
- RpHAnimHierarchy *inHierarchy2,
- RwReal alpha);
+ RpHAnimHierarchy *inHierarchy1,
+ RpHAnimHierarchy *inHierarchy2,
+ RwReal alpha);
extern RwBool
RpHAnimHierarchyAddSubHierarchy(RpHAnimHierarchy *outHierarchy,
- RpHAnimHierarchy *mainHierarchy,
- RpHAnimHierarchy *subHierarchy);
-
+ RpHAnimHierarchy *mainHierarchy1,
+ RpHAnimHierarchy *subHierarchy2);
extern RwBool
RpHAnimHierarchyCopy(RpHAnimHierarchy *outHierarchy,
RpHAnimHierarchy *inHierarchy);
-/* Access to RwFrame ID's */
+#else
-extern RwBool
-RpHAnimFrameSetID(RwFrame *frame,
- RwInt32 id);
+#define RpHAnimHierarchySetCurrentAnim(hierarchy,anim) \
+ RpHAnimHierarchySetCurrentAnimMacro((hierarchy),(anim))
-extern RwInt32
-RpHAnimFrameGetID(RwFrame *frame);
+#define RpHAnimHierarchyGetCurrentAnim(hierarchy) \
+ RpHAnimHierarchyGetCurrentAnimMacro((hierarchy))
+
+#define RpHAnimHierarchySetCurrentAnimTime(hierarchy,time) \
+ RpHAnimHierarchySetCurrentAnimTimeMacro((hierarchy),(time))
+
+#define RpHAnimHierarchyAddAnimTime(hierarchy,time) \
+ RpHAnimHierarchyAddAnimTimeMacro((hierarchy),(time))
+
+#define RpHAnimHierarchySubAnimTime(hierarchy,time) \
+ RpHAnimHierarchySubAnimTimeMacro((hierarchy),(time))
+
+#define RpHAnimHierarchySetKeyFrameCallBacks(hierarchy,keyFrameTypeID) \
+ RpHAnimHierarchySetKeyFrameCallBacksMacro((hierarchy),(keyFrameTypeID))
+
+#define RpHAnimHierarchyBlend(outHierarchy,inHierarchy1,inHierarchy2,alpha) \
+ RpHAnimHierarchyBlendMacro((outHierarchy),(inHierarchy1),(inHierarchy2),(alpha))
+
+#define RpHAnimHierarchyAddTogether(outHierarchy,inHierarchy1,inHierarchy2) \
+ RpHAnimHierarchyAddTogetherMacro((outHierarchy),(inHierarchy1),(inHierarchy2))
+
+#define RpHAnimHierarchySetAnimCallBack(hierarchy,callBack,time,data)\
+ RpHAnimHierarchySetAnimCallBackMacro((hierarchy),(callBack),(time),(data))
+
+#define RpHAnimHierarchySetAnimLoopCallBack(hierarchy,callBack,data)\
+ RpHAnimHierarchySetAnimLoopCallBackMacro((hierarchy),(callBack),(data))
+
+#define RpHAnimHierarchyBlendSubHierarchy(outHierarchy,inHierarchy1,inHierarchy2,alpha)\
+ RpHAnimHierarchyBlendSubHierarchyMacro((outHierarchy),(inHierarchy1),(inHierarchy2),(alpha))
+
+#define RpHAnimHierarchyAddSubHierarchy(outHierarchy,mainHierarchy,subHierarchy)\
+ RpHAnimHierarchyAddSubHierarchyMacro((outHierarchy),(mainHierarchy),(subHierarchy))
+
+#define RpHAnimHierarchyCopy(outHierarchy,inHierarchy)\
+ RpHAnimHierarchyCopyMacro((outHierarchy),(inHierarchy))
+
+#endif /* RWDEBUG */
#ifdef __cplusplus
}
#endif /* __cplusplus */
+/* Legacy TypeDef */
+
+
+typedef RtAnimAnimation RpHAnimAnimation;
+typedef RpHAnimKeyFrame RpHAnimStdKeyFrame;
+
+/* Legacy Macros */
+
+
+/* Animations */
+
+
+#define RpHAnimAnimationCreate(typeID,numFrames,flags,duration)\
+ RtAnimAnimationCreate((typeID),(numFrames),(flags),(duration))
+
+
+#define RpHAnimAnimationDestroy(animation)\
+ RtAnimAnimationDestroy((animation))
+
+#define RpHAnimAnimationGetTypeID(animation)\
+ RtAnimAnimationGetTypeID((animation))
+
+
+#define RpHAnimAnimationRead(filename)\
+ RtAnimAnimationRead((filename))
+
+
+#define RpHAnimAnimationWrite(animation,filename)\
+ RtAnimAnimationWrite((animation),(filename))
+
+
+#define RpHAnimAnimationStreamRead(stream)\
+ RtAnimAnimationStreamRead((stream))
+
+
+#define RpHAnimAnimationStreamWrite(animation,stream)\
+ RtAnimAnimationStreamWrite((animation),(stream))
+
+
+#define RpHAnimAnimationStreamGetSize(animation)\
+ RtAnimAnimationStreamGetSize((animation))
+
+
+#define RpHAnimAnimationMakeDelta(animation,numNodes,time)\
+ RtAnimAnimationMakeDelta((animation),(numNodes),(time))
+
+
+/* Animation Interpolator */
+
+#define RpHAnimHierarchyStdKeyFrameAddAnimTime(hierarchy,time)\
+ RpHAnimHierarchyHAnimKeyFrameAddAnimTime((hierarchy),(time))
+
+#define RpHAnimHierarchyHAnimKeyFrameAddAnimTime(hierarchy,time)\
+ RpHAnimHierarchyAddAnimTime((hierarchy),(time))
#endif /* RPHANIM_H */
diff --git a/rwsdk/include/d3d8/rphanim.rpe b/rwsdk/include/d3d8/rphanim.rpe
index c60f8591..1c05d0e9 100644
--- a/rwsdk/include/d3d8/rphanim.rpe
+++ b/rwsdk/include/d3d8/rphanim.rpe
@@ -160,481 +160,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionHANIM
{
-E_RP_HANIM_INTERP_IDINUSE,
-
-E_RP_HANIM_INTERP_BLOCKFULL,
-
-E_RP_HANIM_INTERP_IDUNKNOWN,
e_rwdb_CriterionHANIMLAST = RWFORCEENUMSIZEINT
};
diff --git a/rwsdk/include/d3d8/rplodatm.h b/rwsdk/include/d3d8/rplodatm.h
index d4583338..4e9c8648 100644
--- a/rwsdk/include/d3d8/rplodatm.h
+++ b/rwsdk/include/d3d8/rplodatm.h
@@ -34,7 +34,7 @@
/**
* \defgroup rplodatm RpLODAtomic
- * \ingroup rpplugin
+ * \ingroup scenemanagement
*
* Level of Detail Management Plugin for RenderWare Graphics.
*/
@@ -72,6 +72,9 @@ extern "C"
{
#endif /* __cplusplus */
+ extern void
+ RpLODAtomicCacheSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwBool
RpLODAtomicPluginAttach( void );
diff --git a/rwsdk/include/d3d8/rplodatm.rpe b/rwsdk/include/d3d8/rplodatm.rpe
index 649bc3bc..a5764cfc 100644
--- a/rwsdk/include/d3d8/rplodatm.rpe
+++ b/rwsdk/include/d3d8/rplodatm.rpe
@@ -163,472 +163,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionLODATM
{
diff --git a/rwsdk/include/d3d8/rplogo.h b/rwsdk/include/d3d8/rplogo.h
index ed527a29..a46823ac 100644
--- a/rwsdk/include/d3d8/rplogo.h
+++ b/rwsdk/include/d3d8/rplogo.h
@@ -33,7 +33,7 @@
/**
* \defgroup rplogo RpLogo
- * \ingroup rpplugin
+ * \ingroup 2dtools
*
* Logo Plugin for RenderWare Graphics.
*/
diff --git a/rwsdk/include/d3d8/rplogo.rpe b/rwsdk/include/d3d8/rplogo.rpe
index f37b6920..a7f66565 100644
--- a/rwsdk/include/d3d8/rplogo.rpe
+++ b/rwsdk/include/d3d8/rplogo.rpe
@@ -160,472 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionLogo
{
diff --git a/rwsdk/include/d3d8/rpltmap.h b/rwsdk/include/d3d8/rpltmap.h
index 5add9a26..18c91955 100644
--- a/rwsdk/include/d3d8/rpltmap.h
+++ b/rwsdk/include/d3d8/rpltmap.h
@@ -1,7 +1,7 @@
/**
* \defgroup rpltmap RpLtMap
- * \ingroup rpplugin
+ * \ingroup lighting
*
* Lightmap Plugin for RenderWare Graphics.
*/
@@ -17,6 +17,15 @@
#include "rpworld.h"
+/* Used during lightmap illumination (sliver triangles are skipped
+ * (their texels should be filled by dilate()), because their normals
+ * can't be accurately calculated) */
+#define rpLTMAPDEFAULTSLIVERAREATHRESHOLD (0.001f)
+
+/* Used during lightmap UV calculation (polySets may be
+ * joined on the basis of vertices with equal positions) */
+#define rpLTMAPDEFAULTVERTEXWELDTHRESHOLD (0.1f)
+
#define rpLTMAPDEFAULTLIGHTMAPSIZE 128
#define rpLTMAPMINLIGHTMAPSIZE 16
#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/
diff --git a/rwsdk/include/d3d8/rpltmap.rpe b/rwsdk/include/d3d8/rpltmap.rpe
index 413caf4c..6e58b62b 100644
--- a/rwsdk/include/d3d8/rpltmap.rpe
+++ b/rwsdk/include/d3d8/rpltmap.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionLTMAP
{
diff --git a/rwsdk/include/d3d8/rpmatfx.h b/rwsdk/include/d3d8/rpmatfx.h
index 9b091dd8..fb7ade45 100644
--- a/rwsdk/include/d3d8/rpmatfx.h
+++ b/rwsdk/include/d3d8/rpmatfx.h
@@ -17,7 +17,7 @@
/**
* \defgroup rpmatfx RpMatFX
- * \ingroup rpplugin
+ * \ingroup materials
*
* Material Effects Plugin for RenderWare Graphics.
*/
@@ -58,6 +58,10 @@ extern "C"
#endif /* __cplusplus */
/*--- Plugin functions ------------------------------------------------------*/
+extern void
+RpMatFXMaterialDataSetFreeListCreateParams( RwInt32 blockSize,
+ RwInt32 numBlocksToPrealloc );
+
extern RwBool
RpMatFXPluginAttach( void );
diff --git a/rwsdk/include/d3d8/rpmatfx.rpe b/rwsdk/include/d3d8/rpmatfx.rpe
index bbc588e3..ba83d96a 100644
--- a/rwsdk/include/d3d8/rpmatfx.rpe
+++ b/rwsdk/include/d3d8/rpmatfx.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionMATERIALEFFECTS
{
diff --git a/rwsdk/include/d3d8/rpmipkl.h b/rwsdk/include/d3d8/rpmipkl.h
index 5b8f7e51..82ad7f03 100644
--- a/rwsdk/include/d3d8/rpmipkl.h
+++ b/rwsdk/include/d3d8/rpmipkl.h
@@ -7,9 +7,9 @@
/**
* \defgroup rpmipkl RpMipmapKL
- * \ingroup rpplugin
+ * \ingroup mipmapping
*
- * PS2/MipMap KL Value Plugin for RenderWare Graphics.
+ * PlayStation 2 / MipMap KL Value Plugin for RenderWare Graphics.
*/
#include <rwcore.h>
@@ -19,6 +19,28 @@ extern "C"
{
#endif
+#if (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H))
+
+#define RpMipmapKLTextureSetDefaultK RpSkyTextureSetDefaultMipmapK
+
+#define RpMipmapKLTextureSetDefaultL RpSkyTextureSetDefaultMipmapL
+
+#define RpMipmapKLTextureGetDefaultK RpSkyTextureGetDefaultMipmapK
+
+#define RpMipmapKLTextureGetDefaultL RpSkyTextureGetDefaultMipmapL
+
+#define RpMipmapKLTextureSetK RpSkyTextureSetMipmapK
+
+#define RpMipmapKLTextureSetL RpSkyTextureSetMipmapL
+
+#define RpMipmapKLTextureGetK RpSkyTextureGetMipmapK
+
+#define RpMipmapKLTextureGetL RpSkyTextureGetMipmapL
+
+#define RpMipmapKLPluginAttach() (TRUE)
+
+#else /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */
+
extern RwReal RpMipmapKLTextureSetDefaultK(RwReal val);
extern RwUInt32 RpMipmapKLTextureSetDefaultL(RwUInt32 val);
extern RwReal RpMipmapKLTextureGetDefaultK(void);
@@ -31,6 +53,8 @@ extern RwUInt32 RpMipmapKLTextureGetL(RwTexture *tex);
extern RwBool RpMipmapKLPluginAttach(void);
+#endif /* (defined(SKY2_DRVMODEL_H)) || (defined(NULLSKY_DRVMODEL_H)) */
+
#ifdef __cplusplus
}
#endif
diff --git a/rwsdk/include/d3d8/rpmipkl.rpe b/rwsdk/include/d3d8/rpmipkl.rpe
index 5216ec9c..0464081f 100644
--- a/rwsdk/include/d3d8/rpmipkl.rpe
+++ b/rwsdk/include/d3d8/rpmipkl.rpe
@@ -160,472 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionLabel
{
diff --git a/rwsdk/include/d3d8/rpmorph.h b/rwsdk/include/d3d8/rpmorph.h
index 4177fba8..52ea70df 100644
--- a/rwsdk/include/d3d8/rpmorph.h
+++ b/rwsdk/include/d3d8/rpmorph.h
@@ -38,7 +38,7 @@
/**
* \defgroup rpmorph RpMorph
- * \ingroup rpplugin
+ * \ingroup morphing
*
* Morphing Plugin for RenderWare Graphics.
*/
@@ -76,7 +76,6 @@ struct RpMorphInterpolator
/**
* \ingroup rpmorph
- * \typedef RpMorphGeometryCallBack
* This is the callback function supplied to \ref RpMorphGeometrySetCallBack
* and returned from \ref RpMorphGeometryGetCallBack.
* The supplied function will be passed a pointer to the geometry's parent atomic,
diff --git a/rwsdk/include/d3d8/rpmorph.rpe b/rwsdk/include/d3d8/rpmorph.rpe
index 14b13076..47834a81 100644
--- a/rwsdk/include/d3d8/rpmorph.rpe
+++ b/rwsdk/include/d3d8/rpmorph.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionMorph
{
diff --git a/rwsdk/include/d3d8/rppatch.h b/rwsdk/include/d3d8/rppatch.h
index eb80663f..0b54fb1b 100644
--- a/rwsdk/include/d3d8/rppatch.h
+++ b/rwsdk/include/d3d8/rppatch.h
@@ -4,7 +4,7 @@
/**
* \defgroup rppatch RpPatch
- * \ingroup rpplugin
+ * \ingroup bezierpatches
*
* Bezier patch library
*
@@ -124,7 +124,7 @@
* \ingroup rppatch
* \ref RpPatchMeshFlag
* When creating a \ref RpPatchMesh, these flags can be OR'ed together to
- * specify the format along with the \ref rpPATCHMESHTEXCOORDSETS (n) macro
+ * specify the format along with the \ref rpPATCHMESHTEXCOORDSETS(num) macro
* to specify the number of texture coordinate sets required.
*
* \see RpPatchMeshCreate
@@ -220,7 +220,7 @@ typedef struct RpPatchMesh RpPatchMesh;
* The patch mesh should be unlocked with \ref RpPatchMeshUnlock before it is
* added to an \ref RpAtomic with \ref RpPatchAtomicSetPatchMesh.
*
- * \see RpPatchMesDefinition
+ * \see RpPatchMeshDefinition
*/
struct RpPatchMesh
{
@@ -278,7 +278,7 @@ struct RpPatchLODRange
/**
* \ingroup rppatch
- * \typedef RpPatchLODUserData
+ * \ref RpPatchLODUserData
* typedef for the user data passed to the \ref RpPatchLODCallBack
* function which calculates the atomics' LOD.
*
@@ -289,9 +289,14 @@ typedef void *RpPatchLODUserData;
/**
* \ingroup rppatch
- * \typedef RpPatchLODCallBack
+ * \ref RpPatchLODCallBack
* typedef for the patch atomic LOD calculation function.
*
+ * \param atomic
+ * \param userData
+ *
+ * \return
+ *
* \see RpPatchAtomicSetPatchLODCallBack
* \see RpPatchAtomicGetPatchLODCallBack
*/
@@ -309,6 +314,13 @@ extern "C"
/*---------------------------------------------------------------------------*
*- Plugin functions -*
*---------------------------------------------------------------------------*/
+extern void
+RpPatchGeometrySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+extern void
+RpPatchAtomicSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+
extern RwBool
RpPatchPluginAttach(void);
diff --git a/rwsdk/include/d3d8/rppatch.rpe b/rwsdk/include/d3d8/rppatch.rpe
index 6d433990..85dca470 100644
--- a/rwsdk/include/d3d8/rppatch.rpe
+++ b/rwsdk/include/d3d8/rppatch.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionPATCH
{
diff --git a/rwsdk/include/d3d8/rpprtstd.h b/rwsdk/include/d3d8/rpprtstd.h
index ad1b87f7..ba0bf1d6 100644
--- a/rwsdk/include/d3d8/rpprtstd.h
+++ b/rwsdk/include/d3d8/rpprtstd.h
@@ -28,7 +28,7 @@
/**
* \defgroup rpprtstd RpPrtStd
- * \ingroup rpplugin
+ * \ingroup particles
*
* Particle Animation Plugin for RenderWare Graphics.
*/
@@ -52,7 +52,7 @@
-#define PRTSTD_RSRAND2(_seed) (((RwReal)((RwReal) (_seed) * PRTSTD_SRAND_IMAX) * \
+#define PRTSTD_2RSRAND2(_seed) (((RwReal)((RwReal) (_seed) * PRTSTD_SRAND_IMAX) * \
(RwReal)1.0))
/**
@@ -84,6 +84,8 @@ enum RpPrtStdEmitterFlags
rpPRTSTDEMITTERFLAGUPDATEPARTICLE = 0x00000020, /**< This indicated if the emitter's particles are updated. */
rpPRTSTDEMITTERFLAGRENDER = 0x00000040, /**< This indicates if the emitter is rendered. */
rpPRTSTDEMITTERFLAGRENDERPARTICLE = 0x00000080, /**< This indicates if the emitter's particles are rendered. */
+ rpPRTSTDEMITTERFLAGNOBUFFERSWAP = 0x00000100, /**< Internal usage */
+ rpPRTSTDEMITTERFLAGSTREAMREAD = 0x00000200, /**< Internal usage */
rpPRTSTDEMITTERFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
@@ -109,15 +111,12 @@ enum RpPrtStdParticleCallBackCode
rpPRTSTDPARTICLECALLBACKRENDER, /**< Particle render callback */
rpPRTSTDPARTICLECALLBACKCREATE, /**< Particle create callback */
rpPRTSTDPARTICLECALLBACKDESTROY, /**< Particle destroy callback */
- rpPRTSTDPARTICLECALLBACKSTREAMREAD, /**< Particle stream input callback */
- rpPRTSTDPARTICLECALLBACKSTREAMWRITE, /**< Particle stream outout callback */
- rpPRTSTDPARTICLECALLBACKSTREAMGETSIZE, /**< Particle stream get size callback */
rpPRTSTDPARTICLECALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpPrtStdParticleCallBackCode RpPrtStdParticleCallBackCode;
-#define rpPRTSTDEMITTERCALLBACKMAX 10
+#define rpPRTSTDEMITTERCALLBACKMAX 11
/**
* \ingroup rpprtstd
@@ -137,6 +136,7 @@ enum RpPrtStdEmitterCallBackCode
rpPRTSTDEMITTERCALLBACKSTREAMREAD, /**< Emitter stream input callback */
rpPRTSTDEMITTERCALLBACKSTREAMWRITE, /**< Emitter stream output callback */
rpPRTSTDEMITTERCALLBACKSTREAMGETSIZE, /**< Emitter stream get size callback */
+ rpPRTSTDEMITTERCALLBACKCLONE, /**< Emitter clone callback */
rpPRTSTDEMITTERCALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
@@ -154,7 +154,7 @@ typedef struct RpPrtStdEmitter RWALIGN(RpPrtStdEmitter, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
- * \typedef RpPrtStdEmitterCallBack
+ * \ref RpPrtStdEmitterCallBack
* \ref RpPrtStdEmitterCallBack represents the function called for processing
* a \ref RpPrtStdEmitter. There can several types of the functions, each performing a
* specific task defined by \ref RpPrtStdEmitterCallBackCode.
@@ -172,7 +172,6 @@ typedef RpPrtStdEmitter *
typedef struct RpPrtStdParticleBatch RWALIGN(RpPrtStdParticleBatch, rwMATRIXALIGNMENT);
/**
* \ingroup rpprtstd
- * \typedef RpPrtStdParticleCallBack
* \ref RpPrtStdParticleCallBack represents the function called for processing
* a \ref RpPrtStdParticleBatch. There can be several types of the functions, each
* performing a specific task defined by \ref RpPrtStdParticleCallBackCode.
@@ -189,7 +188,6 @@ typedef RpPrtStdParticleBatch *
/**
* \ingroup rpprtstd
- * \typedef RpPrtStdEmitterCallBackArray
* \ref RpPrtStdEmitterCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdEmitter. All the functions are of the type \ref
* RpPrtStdEmitterCallBack.
@@ -201,7 +199,6 @@ typedef RpPrtStdEmitterCallBack
/**
* \ingroup rpprtstd
- * \typedef RpPrtStdParticleCallBackArray
* \ref RpPrtStdParticleCallBackArray represents a set of callback functions for
* processing a \ref RpPrtStdParticleBatch. All the functions are of the type \ref
* RpPrtStdParticleCallBack.
@@ -221,7 +218,6 @@ typedef RpPrtStdParticleCallBack
typedef struct RpPrtStdEmitterClass RpPrtStdEmitterClass;
/**
* \ingroup rpprtstd
- * \typedef RpPrtStdEClassSetupCallBack
* \ref RpPrtStdEClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in.
@@ -237,7 +233,6 @@ typedef RpPrtStdEmitterClass *
typedef struct RpPrtStdParticleClass RpPrtStdParticleClass;
/**
* \ingroup rpprtstd
- * \typedef RpPrtStdPClassSetupCallBack
* \ref RpPrtStdPClassSetupCallBack represents the function called for setting up an
* emitter class's set of callback function. The callback function is called
* after an emitter class is streamed in.
@@ -273,6 +268,7 @@ struct RpPrtStdPropertyTable
RpPrtStdPropertyTable *next; /**< Internal usage */
RwInt32 id; /**< Property table's id */
+ RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 numProp; /**< Number of properties in the table */
RwInt32 maxProp; /**< Internal usage */
@@ -295,6 +291,7 @@ struct RpPrtStdEmitterClass
RpPrtStdEmitterClass *next; /**< Internal usage */
RwInt32 id; /**< Emitter class's id */
+ RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of the emitter */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of emitter properties */
@@ -316,6 +313,7 @@ struct RpPrtStdParticleClass
RpPrtStdParticleClass *next; /**< Internal usage */
RwInt32 id; /**< Particle class's id */
+ RwInt32 refCount; /**< Reference count. Internal usage */
RwInt32 objSize; /**< Size of a particle */
RpPrtStdPropertyTable *propTab; /**< Reference to a table of particle properties */
@@ -403,7 +401,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDPROPERTYCODEEMITTERSTANDARD 1
#define rpPRTSTDPROPERTYCODEEMITTERPRTCOLOR 2
#define rpPRTSTDPROPERTYCODEEMITTERPRTTEXCOORDS 3
-#define rpPRTSTDPROPERTYCODEEMITTERPRTANIMFRAME 4
#define rpPRTSTDPROPERTYCODEEMITTERPRTSIZE 5
#define rpPRTSTDPROPERTYCODEEMITTERPTANK 6
#define rpPRTSTDPROPERTYCODEEMITTERPRTVELOCITY 7
@@ -414,7 +411,6 @@ struct RpPrtStdEmitter
#define rpPRTSTDEMITTERDATAFLAGSTANDARD 0x00000001
#define rpPRTSTDEMITTERDATAFLAGPRTCOLOR 0x00000002
#define rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS 0x00000004
-#define rpPRTSTDEMITTERDATAFLAGPRTANIMFRAME 0x00000008
#define rpPRTSTDEMITTERDATAFLAGPRTSIZE 0x00000010
#define rpPRTSTDEMITTERDATAFLAGPTANK 0x00000020
#define rpPRTSTDEMITTERDATAFLAGPRTMATRIX 0x00000040
@@ -436,7 +432,7 @@ typedef struct RpPrtStdEmitterStandard RpPrtStdEmitterStandard;
* particles. Once an emitter has reached its maximum number of particles, no further particles are
* emitted until some of the existing particles have died.
*
- * Most properties have a bias value to vary the property value. This uses the seed field
+ * Most properties have a bias value to vary the property's value. This uses the seed field
* to give a degreee of randomness.
*/
struct RpPrtStdEmitterStandard
@@ -522,15 +518,6 @@ struct RpPrtStdEmitterPrtTexCoords
prtEndUV1Bias; /**< Particle end bottom right texcoords bias */
};
-typedef struct RpPrtStdEmitterPrtAnimFrame RpPrtStdEmitterPrtAnimFrame;
-
-struct RpPrtStdEmitterPrtAnimFrame
-{
- RwInt32 prtNumFrames;
-
- RwTexCoords *prtAnimFrameTexCoords;
-};
-
typedef struct RpPrtStdEmitterPrtSize RpPrtStdEmitterPrtSize;
/**
@@ -550,18 +537,47 @@ struct RpPrtStdEmitterPrtSize
prtEndSizeBias; /**< Particle end size bias */
};
+
+/**
+ * \ingroup rpprtstd
+ * A set of flag settings for use in the \ref RpPrtStdEmitterPrtMatrix flag
+ */
+enum RpPrtStdEmitterPrtMatrixFlags
+{
+ rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX = 0x00000001, /**< Apply the prtCnsMtx matrix to
+ * each particle if set */
+ RPPRTSTDEMITTERPRTMTXFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
+};
+
+typedef enum RpPrtStdEmitterPrtMatrixFlags RpPrtStdEmitterPrtMatrixFlags;
+
typedef struct RpPrtStdEmitterPrtMatrix RWALIGN(RpPrtStdEmitterPrtMatrix, rwMATRIXALIGNMENT);
+/**
+ * \ingroup rpprtstd
+ * \struct RpPrtStdEmitterPrtMatrix
+ *
+ * An optional structure to construct a matrix for each particle during emissions. A particle
+ * can be represented as a single matrix. This gives the particles an orientation rather than
+ * just a simple position.
+ *
+ * This allows transformation to be applied to the particles, such as rotation. If
+ * \ref rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX is set in the flag, then the prtCnsMatrix is applied to each
+ * particle during particle update.
+ *
+ * If this structure is not present, then it assumes the particles will have just a position
+ * property.
+ */
struct RpPrtStdEmitterPrtMatrix
{
- RwMatrix prtCnsMtx;
+ RwMatrix prtCnsMtx; /**< Transformation matrix to be applied to each particle */
- RwV3d prtPosMtxAt,
- prtPosMtxAtBias;
- RwV3d prtPosMtxUp,
- prtPosMtxUpBias;
+ RwV3d prtPosMtxAt, /**< Particle initial look at vector */
+ prtPosMtxAtBias; /**< Particle initial look at vector bias */
+ RwV3d prtPosMtxUp, /**< Particle initial up vector. */
+ prtPosMtxUpBias; /**< Particle initial up vector bias */
- RwInt32 flags;
+ RwInt32 flags; /**< Particle matrix flag. See \ref RpPrtStdEmitterPrtMatrixFlags */
};
/************************************************************************
@@ -584,18 +600,42 @@ enum RpPrtStdPTankPropertyCode
typedef enum RpPrtStdPTankPropertyCode RpPrtStdPTankPropertyCode;
typedef struct RpPrtStdEmitterPTank RpPrtStdEmitterPTank;
+
+/**
+ * \ingroup rpprtstd
+ * \struct RpPrtStdEmitterPTank
+ *
+ * A structure for storing the data required to create a RpPTank for use
+ * with the emitter. The structure allows the user to create a RpPTank
+ * manually.
+ */
struct RpPrtStdEmitterPTank
{
- RwUInt32 dataFlags,
- platFlags,
- numPrt,
- maxPrt,
- updateFlags,
- emitFlags;
- RpAtomic *pTank;
- RwChar **dataInPtrs,
- **dataOutPtrs;
- RwInt32 *dataStride;
+ RwUInt32 dataFlags, /**< Data flag used in RpPTank creation. See
+ * \ref RpPTankAtomicCreate */
+ platFlags, /**< Platform flag used in RpPTank creation. See
+ * \ref RpPTankAtomicCreate */
+ numPrt, /**< An integer representing the current number of active
+ * particles */
+ maxPrt, /**< An integer representing the maxiumum number of particles
+ * stored in the RpPTank */
+ updateFlags, /**< A flag representing the properties to be updated by
+ * the particle emiiter during update. A user may select to
+ * update some properties manually by unsetting the relevant
+ * bits in the flag.
+ * The flag settings are the same as \ref RpPTankDataFlags */
+ emitFlags; /**< A flag representing the properties to be initialised
+ * by the particle emitter during particles emission. A user
+ * may select to initialise some properties manually by
+ * unsetting the relevant bits in the flag.
+ * The flag settings are the same as \ref RpPTankDataFlags */
+ RpAtomic *pTank; /**< Pointer to the RpPTank */
+ RwChar **dataInPtrs, /**< Internal usage */
+ **dataOutPtrs; /**< Internal usage */
+ RwInt32 *dataStride; /**< Internal usage */
+ RwUInt32 strSrcBlend; /**< Internal usage */
+ RwUInt32 strDstBlend; /**< Internal usage */
+ RwBool strVtxABlend; /**< Internal usage */
};
/************************************************************************
@@ -608,7 +648,6 @@ struct RpPrtStdEmitterPTank
#define rpPRTSTDPROPERTYCODEPARTICLEPOSITION 1
#define rpPRTSTDPROPERTYCODEPARTICLECOLOR 2
#define rpPRTSTDPROPERTYCODEPARTICLETEXCOORDS 3
-#define rpPRTSTDPROPERTYCODEPARTICLEANIMFRAME 4
#define rpPRTSTDPROPERTYCODEPARTICLESIZE 5
#define rpPRTSTDPROPERTYCODEPARTICLEVELOCITY 6
#define rpPRTSTDPROPERTYCODEPARTICLEMATRIX 7
@@ -619,7 +658,6 @@ struct RpPrtStdEmitterPTank
#define rpPRTSTDPARTICLEDATAFLAGPOSITION 0x00000002
#define rpPRTSTDPARTICLEDATAFLAGCOLOR 0x00000004
#define rpPRTSTDPARTICLEDATAFLAGTEXCOORDS 0x00000008
-#define rpPRTSTDPARTICLEDATAFLAGANIMFRAME 0x00000010
#define rpPRTSTDPARTICLEDATAFLAGSIZE 0x00000020
#define rpPRTSTDPARTICLEDATAFLAGVELOCITY 0x00000040
#define rpPRTSTDPARTICLEDATAFLAGMATRIX 0x00000080
@@ -675,15 +713,6 @@ struct RpPrtStdParticleTexCoords
deltaUV1; /**< Particle's bottom right texcoords rate of change */
};
-typedef struct RpPrtStdParticleAnimFrame RpPrtStdParticleAnimFrame;
-
-struct RpPrtStdParticleAnimFrame
-{
- RwInt32 frame;
-
- RwReal delta;
-};
-
typedef struct RpPrtStdParticleSize RpPrtStdParticleSize;
/**
@@ -714,10 +743,13 @@ extern "C"
/************************************************************************/
extern RwBool
-RpParticleStandardPluginAttach( void );
+RpPrtStdPluginAttach( void );
/************************************************************************/
+extern RwBool
+RpAtomicIsParticleEmitter(RpAtomic *atomic);
+
extern RpAtomic *
RpPrtStdAtomicCreate(RpPrtStdEmitterClass *eClass, void *data);
@@ -750,6 +782,9 @@ extern RwBool
RpPrtStdEmitterDestroy(RpPrtStdEmitter *emt);
extern RpPrtStdEmitter *
+RpPrtStdEmitterClone(RpPrtStdEmitter *emt);
+
+extern RpPrtStdEmitter *
RpPrtStdEmitterForAllParticleBatch(RpPrtStdEmitter *emt,
RpPrtStdParticleCallBack callback,
void * data);
@@ -835,7 +870,6 @@ RpPrtStdPropTabStreamWrite(RpPrtStdPropertyTable *eClass,
extern RwInt32
RpPrtStdPropTabStreamGetSize(RpPrtStdPropertyTable *eClass);
-
/************************************************************************/
extern RwBool
@@ -941,6 +975,11 @@ RpPrtStdGlobalDataStreamWrite(RwStream *stream);
extern RwInt32
RpPrtStdGlobalDataStreamGetSize( void );
+extern void
+RpPrtStdGlobalDataSetStreamEmbedded( RwBool embedded );
+
+extern RwBool
+RpPrtStdGlobalDataGetStreamEmbedded( void );
/************************************************************************/
@@ -964,10 +1003,18 @@ RpPrtStdEmitterStdEmitCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
+RpPrtStdEmitterStdCloneCB(RpAtomic *atomic,
+ RpPrtStdEmitter *emt, void *data);
+
+extern RpPrtStdEmitter *
RpPrtStdEmitterStdCreateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
extern RpPrtStdEmitter *
+RpPrtStdEmitterStdDestroyCB(RpAtomic *atomic,
+ RpPrtStdEmitter *emt, void *data);
+
+extern RpPrtStdEmitter *
RpPrtStdEmitterStdBeginUpdateCB(RpAtomic *atomic,
RpPrtStdEmitter *emt, void *data);
diff --git a/rwsdk/include/d3d8/rpprtstd.rpe b/rwsdk/include/d3d8/rpprtstd.rpe
index df860d45..d628c6c0 100644
--- a/rwsdk/include/d3d8/rpprtstd.rpe
+++ b/rwsdk/include/d3d8/rpprtstd.rpe
@@ -160,480 +160,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-enum e_rwdb_CriterionParticleStandard
+enum e_rwdb_CriterionPrtStandard
{
- e_rwdb_CriterionParticleStandardLAST = RWFORCEENUMSIZEINT
+ e_rwdb_CriterionPrtStandardLAST = RWFORCEENUMSIZEINT
};
-typedef enum e_rwdb_CriterionParticleStandard e_rwdb_CriterionParticleStandard;
+typedef enum e_rwdb_CriterionPrtStandard e_rwdb_CriterionPrtStandard;
diff --git a/rwsdk/include/d3d8/rpptank.h b/rwsdk/include/d3d8/rpptank.h
index 20931f21..d4c1116d 100644
--- a/rwsdk/include/d3d8/rpptank.h
+++ b/rwsdk/include/d3d8/rpptank.h
@@ -13,12 +13,13 @@
/**
* \defgroup rpptank RpPTank
- * \ingroup rpplugin
+ * \ingroup particles
*
* PTank Plugin for RenderWare.
*/
/*--- Include files ---*/
+
#include <string.h>
#include "rwcore.h"
@@ -139,7 +140,7 @@ enum RpPTankInstanceFlags
rpPTANKIFLAGCENTER = ((int)0x01000000), /**<Center position changed*/
/* free = ((int)0x04000000), */
/* free = ((int)0x08000000), */
-/* free = ((int)0x10000000), */
+ rpPTANKIFLAGALPHABLENDING = ((int)0x10000000), /**<Internal Use*/
rpPTANKIFLAGALL = ((int)0xFFFFFFFF),
RPPTANKINSTANCEFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
@@ -244,20 +245,22 @@ extern const RwInt32 datasize[];
/**
* \ingroup rpptank
- * \typedef rpptankAllocCallBack
+ * \ref RpPTankAllocCallBack
+ *
* ...
*/
-typedef void *(* rpPTankAllocCallBack)(RpPTankData *ptankGlobal,
+typedef void *(* RpPTankAllocCallBack)(RpPTankData *ptankGlobal,
RwInt32 maxPCount,
RwUInt32 dataFlags,
RwUInt32 platFlags);
/**
* \ingroup rpptank
- * \typedef rpPTankCreateCallBack
+ * \ref RpPTankCreateCallBack
+ *
* ...
*/
-typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic,
+typedef RwBool (* RpPTankCreateCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 maxPCount,
RwUInt32 dataFlags,
@@ -265,37 +268,37 @@ typedef RwBool (* rpPTankCreateCallBack)(RpAtomic *atomic,
/**
* \ingroup rpptank
- * \typedef rpPTankInstanceCallBack
+ * \ref RpPTankInstanceCallBack
* ...
*/
-typedef RwBool (* rpPTankInstanceCallBack)(RpAtomic *atomic,
+typedef RwBool (* RpPTankInstanceCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
RwUInt32 instFlags);
/**
* \ingroup rpptank
- * \typedef rpPTankRenderCallBack
+ * \ref RpPTankRenderCallBack
* ...
*/
-typedef RwBool (* rpPTankRenderCallBack)(RpAtomic *atomic,
+typedef RwBool (* RpPTankRenderCallBack)(RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount);
-typedef struct rpPTankCallBacks rpPTankCallBacks;
+typedef struct RpPTankCallBacks RpPTankCallBacks;
-struct rpPTankCallBacks
+struct RpPTankCallBacks
{
- rpPTankAllocCallBack alloc;
- rpPTankCreateCallBack create;
- rpPTankInstanceCallBack instance;
- rpPTankRenderCallBack render;
+ RpPTankAllocCallBack alloc;
+ RpPTankCreateCallBack create;
+ RpPTankInstanceCallBack instance;
+ RpPTankRenderCallBack render;
};
/* private typedefs */
-typedef struct rpPTANKInstanceSetupData rpPTANKInstanceSetupData;
+typedef struct RpPTANKInstanceSetupData RpPTANKInstanceSetupData;
-struct rpPTANKInstanceSetupData
+struct RpPTANKInstanceSetupData
{
RwBool instancePositions;
RwBool instanceUVs;
@@ -312,27 +315,27 @@ struct rpPTANKInstanceSetupData
};
-typedef void (* rpPTankGENInstancePosCallback)(
+typedef void (* RpPTankGENInstancePosCallback)(
RpPTankLockStruct *dstCluster,
RwV3d *right,
RwV3d *up,
RwInt32 pCount,
RpPTankData *ptankGlobal);
-typedef void (* rpPTankGENInstanceCallback)(
+typedef void (* RpPTankGENInstanceCallback)(
RpPTankLockStruct *dstCluster,
RwInt32 pCount,
RpPTankData *ptankGlobal);
-typedef void (* rpPTankGENInstanceSetupCallback)(
- rpPTANKInstanceSetupData *data,
+typedef void (* RpPTankGENInstanceSetupCallback)(
+ RpPTANKInstanceSetupData *data,
RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
RwUInt32 instFlags);
-typedef void (* rpPTankGENInstanceEndingCallback)(
- rpPTANKInstanceSetupData *data,
+typedef void (* RpPTankGENInstanceEndingCallback)(
+ RpPTANKInstanceSetupData *data,
RpAtomic *atomic,
RpPTankData *ptankGlobal,
RwInt32 actPCount,
@@ -351,15 +354,15 @@ struct RpPTankAtomicExtPrv
/* Rendering callback */
RpAtomicCallBackRender defaultRenderCB;
- rpPTankCallBacks ptankCallBacks;
+ RpPTankCallBacks ptankCallBacks;
/* Instancing CallBacks */
- rpPTankGENInstanceSetupCallback insSetupCB;
- rpPTankGENInstancePosCallback insPosCB;
- rpPTankGENInstanceCallback insUVCB;
- rpPTankGENInstanceCallback insColorsCB;
- rpPTankGENInstanceCallback insNormalsCB;
- rpPTankGENInstanceEndingCallback insEndingCB;
+ RpPTankGENInstanceSetupCallback insSetupCB;
+ RpPTankGENInstancePosCallback insPosCB;
+ RpPTankGENInstanceCallback insUVCB;
+ RpPTankGENInstanceCallback insColorsCB;
+ RpPTankGENInstanceCallback insNormalsCB;
+ RpPTankGENInstanceEndingCallback insEndingCB;
RwUInt32 lockFlags;
RwUInt32 instFlags;
@@ -390,7 +393,6 @@ extern RwInt32 _rpPTankGlobalsOffset; /* Offset in RwEngine */
#endif
-
extern RwBool
RpPTankPluginAttach(void);
@@ -523,7 +525,7 @@ MACRO_START\
RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor = *col_;\
if( RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0) )\
{\
- RpMaterialSetColor(\
+ (void)RpMaterialSetColor(\
RpGeometryGetMaterial(RpAtomicGetGeometry(atm_),0),\
&RPATOMICPTANKPLUGINDATA(atm_)->publicData.cColor);\
}\
@@ -759,6 +761,14 @@ extern RpAtomic *
RpPTankAtomicUnlock(RpAtomic *atomic);
+/*
+ * Stealth functions *********************************************************
+ */
+RpAtomic*
+_rpPTankAtomicCreateCustom(RwInt32 maxParticleNum,
+ RwUInt32 dataFlags, RwUInt32 platFlags,
+ RpPTankCallBacks *callbacks);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -767,6 +777,41 @@ RpPTankAtomicUnlock(RpAtomic *atomic);
/*---- start: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/
+/**
+ * \defgroup rpptankd3d8 D3D8
+ * \ingroup rpptank
+ *
+ * D3D8 specific documentation.
+ */
+
+/**
+ * \ingroup rpptankd3d8
+ * \par D3D8 specific data flags
+ *
+ * <ul>
+ * <li> rpPTANKD3D8FLAGSUSEPOINTSPRITES selects the D3D8 optimized pipeline. At the
+ * moment, this pipeline use point sprites when the hardware supports them,
+ * which don't allow use of all the PTank flags. Only the following flags are
+ * supported when using the D3D8 optimized pipes:
+ *
+ * <ul>
+ * <li> rpPTANKDFLAGPOSITION
+ * <li> rpPTANKDFLAGNORMAL
+ * <li> rpPTANKDFLAGSIZE (if the hardware supports the D3DFVF_PSIZE vertex format flag)
+ * <li> rpPTANKDFLAGCOLOR
+ * <li> rpPTANKDFLAGUSECENTER
+ * <li> rpPTANKDFLAGARRAY
+ * <li> rpPTANKDFLAGSTRUCTURE
+ * </ul>
+ *
+ * The texture coordinates are generated by the hardware and can't be specified.
+ * </ul>
+ *
+ * If the hardware does not support point sprites, the default pipeline is used
+ * instead.
+ *
+ */
+
enum RpPTankD3D8Flags
{
rpPTANKD3D8FLAGSUSEPOINTSPRITES = 0x00000001,
@@ -774,6 +819,8 @@ enum RpPTankD3D8Flags
rpPTANKD3D8FLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
+typedef enum RpPTankD3D8Flags RpPTankD3D8Flags;
+
/*---- end: c:/daily/rwsdk/plugin/ptank/d3d8/ptankplatform.h----*/
#endif /* RPPTANK_H */
diff --git a/rwsdk/include/d3d8/rpptank.rpe b/rwsdk/include/d3d8/rpptank.rpe
index 485b5dd8..2a9b45d3 100644
--- a/rwsdk/include/d3d8/rpptank.rpe
+++ b/rwsdk/include/d3d8/rpptank.rpe
@@ -146,472 +146,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/rwsdk/include/d3d8/rppvs.h b/rwsdk/include/d3d8/rppvs.h
index 29fc2343..08738933 100644
--- a/rwsdk/include/d3d8/rppvs.h
+++ b/rwsdk/include/d3d8/rppvs.h
@@ -32,7 +32,7 @@
/**
* \defgroup rppvs RpPVS
- * \ingroup rpplugin
+ * \ingroup pvs
*
* Geometric Potentially Visible Set Plugin for RenderWare Graphics.
*/
@@ -122,11 +122,14 @@ typedef RpWorldSector *(*RpPVSCallBack) (RpWorldSector * worldSector,
#define RpPVSCallback RpPVSCallBack
typedef struct _RpPVSCallBack _RpPVSCallBack;
+
+#if (!defined(DOXYGEN))
struct _RpPVSCallBack
{
RpPVSCallBack callback;
void *data;
};
+#endif /* (!defined(DOXYGEN)) */
enum _rpPVSPartitionId
{
@@ -145,6 +148,7 @@ typedef struct _rpPVSPolyList *_rpPVSPolyListPtr;
typedef struct _rpPVSPoly _rpPVSPoly;
typedef struct _rpPVSPoly *_rpPVSPolyPtr;
+#if (!defined(DOXYGEN))
typedef struct _rpPVSPlaneEq _rpPVSPlaneEq;
struct _rpPVSPlaneEq
{
@@ -158,12 +162,13 @@ struct _rpPVSPlaneEq
_rpPVSPartitionId lastresult; /* temp: stores result of last polygon wrt this plane */
};
-typedef struct
+typedef struct RwV3i RwV3i;
+struct RwV3i
{
RwInt32 x;
RwInt32 y;
RwInt32 z;
-}RwV3i;
+};
typedef struct _rpPVSPolyRecord _rpPVSPolyRecord;
struct _rpPVSPolyRecord
@@ -205,47 +210,45 @@ struct _rpPVSPolyList
};
typedef struct RpPVS RpPVS;
+
struct RpPVS
{
- RwInt32 sectorID; /* Id of the sector */
- RwInt32 vismaplength; /* Length of vismap */
- RwInt32 sampleKey; /* Currently unused, for future use */
+ RwInt32 sectorID;
+ RwInt32 vismaplength;
+ RwInt32 sampleKey;
RpPVSVisMap *vismap;
- _rpPVSPolyListPtr sectailpoly; /* Pointer to last polygon in polygons list that is in this sector */
+ _rpPVSPolyListPtr sectailpoly;
+ _rpPVSPartitionId potential;
- _rpPVSPartitionId potential; /* temp: is sector in out or split from current shadow volume - for heirarchical clip */
RwUInt32 numpols;
- RwBBox sbox; /* Bounding box of the sector */
- RwBBox gbox; /* Bounding box of the geometry of the sector */
- RwReal diagonal; /* Diagonal size of bounding box of the sector */
- RwV3d centre; /* Centre of the sector */
- RwInt32 axessig[3]; /* sampling significance of the axes of the gbox */
+ RwBBox sbox;
+ RwBBox gbox;
+ RwReal diagonal;
+ RwV3d centre;
+ RwInt32 axessig[3];
};
typedef struct RpPVSCache RpPVSCache;
struct RpPVSCache
{
- RwBool processed; /* flag to indicate exisiting PVS data for the world */
- RwBool formatted; /* flag to indicate exisiting intermediate polygonal data for PVS generation */
+ RwBool processed;
+ RwBool formatted;
+ RwInt32 NumWorldSectors;
- /* stats collection */
RwInt32 ptotal;
RwInt32 paccept;
- /* pipeline hooking */
RwBool hooked;
- /* used during vismap allocation */
RwUInt32 nextID;
RwInt32 viscount;
- /* Used during construction */
RpPVSProgressCallBack progressCallBack;
- _rpPVSPolyListPtr polygons; /* A copy of the input data set of all world polygons */
+ _rpPVSPolyListPtr polygons;
RpWorldSectorCallBackRender renderCallBack;
};
@@ -255,23 +258,23 @@ struct RpPVSGlobalVars
{
RpWorld *World;
- RwInt32 worldOffset; /* Offset into global data */
- RwInt32 sectorOffset; /* Offset into global data */
+ RwInt32 worldOffset;
+ RwInt32 sectorOffset;
- RwBool collis; /* Collision detection */
- RwBool bfc; /* Backface culling */
+ RwBool collis;
+ RwBool bfc;
- RwInt32 NumWorldSectors;
RwInt32 progress_count;
RwReal diagonal;
RwReal gran;
- RwInt32 InSector; /* Current sector id */
- RwV3d ViewPos; /* Current view pos */
- RpPVS *CurrPVS; /* Current PVS sector */
+ RwInt32 InSector;
+ RwV3d ViewPos;
+ RpPVS *CurrPVS;
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
diff --git a/rwsdk/include/d3d8/rppvs.rpe b/rwsdk/include/d3d8/rppvs.rpe
index dc060cff..62c983b0 100644
--- a/rwsdk/include/d3d8/rppvs.rpe
+++ b/rwsdk/include/d3d8/rppvs.rpe
@@ -161,472 +161,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionGPVS
{
diff --git a/rwsdk/include/d3d8/rprandom.h b/rwsdk/include/d3d8/rprandom.h
index 8690c69a..aebbfed9 100644
--- a/rwsdk/include/d3d8/rprandom.h
+++ b/rwsdk/include/d3d8/rprandom.h
@@ -28,7 +28,7 @@
/**
* \defgroup rprandom RpRandom
- * \ingroup rpplugin
+ * \ingroup mathtools
*
* Random Number Generation Plugin for RenderWare Graphics.
*/
diff --git a/rwsdk/include/d3d8/rprandom.rpe b/rwsdk/include/d3d8/rprandom.rpe
index 8e267eee..d3fe964b 100644
--- a/rwsdk/include/d3d8/rprandom.rpe
+++ b/rwsdk/include/d3d8/rprandom.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionRandom
{
diff --git a/rwsdk/include/d3d8/rpskin.h b/rwsdk/include/d3d8/rpskin.h
index df446c1b..8a6ea204 100644
--- a/rwsdk/include/d3d8/rpskin.h
+++ b/rwsdk/include/d3d8/rpskin.h
@@ -4,7 +4,7 @@
/**
* \defgroup rpskin RpSkin
- * \ingroup rpplugin
+ * \ingroup skinning
*
* Skin Plugin for RenderWare Graphics.
*/
@@ -48,7 +48,7 @@ struct RwMatrixWeights
/**
* \ingroup rpskin
- * \typedef RpSkin
+ * \struct RpSkin
*
* Skin object. This should be considered an opaque type.
* Use the RpSkin API functions to access.
@@ -69,6 +69,9 @@ extern "C"
/*---------------------------------------------------------------------------*
*- Plugin functions -*
*---------------------------------------------------------------------------*/
+extern void RpSkinSetFreeListCreateParams(
+ RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwBool
RpSkinPluginAttach(void);
@@ -114,6 +117,9 @@ RpSkinGetVertexBoneIndices( RpSkin *skin );
extern const RwMatrix *
RpSkinGetSkinToBoneMatrices( RpSkin *skin );
+extern RwBool
+RpSkinIsSplit( RpSkin *skin );
+
/*---------------------------------------------------------------------------*
*- Skin pipeline -*
*---------------------------------------------------------------------------*/
@@ -131,7 +137,6 @@ enum RpSkinType
rpSKINTYPEGENERIC = 1, /**<Generic skin rendering. */
rpSKINTYPEMATFX = 2, /**<Material effects skin rendering. */
rpSKINTYPETOON = 3, /**<Toon skin rendering. */
- rpSKINTYPEMATFXTOON = 4, /**<Note Toon + MatFX on same object NOT currently supported */
rpSKINTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RpSkinType RpSkinType;
@@ -143,6 +148,32 @@ RpSkinAtomicSetType( RpAtomic *atomic,
extern RpSkinType
RpSkinAtomicGetType( RpAtomic *atomic );
+/*---------------------------------------------------------------------------*
+ *- Internal API -*
+ *---------------------------------------------------------------------------*/
+extern RpGeometry *
+_rpSkinInitialize(RpGeometry *geometry);
+
+extern RpGeometry *
+_rpSkinDeinitialize(RpGeometry *geometry);
+
+extern RwUInt8 *
+_rpSkinGetMeshBoneRemapIndices( RpSkin *skin );
+
+extern RwUInt8 *
+_rpSkinGetMeshBoneRLECount( RpSkin *skin );
+
+extern RwUInt8 *
+_rpSkinGetMeshBoneRLE( RpSkin *skin );
+
+extern RpSkin *
+_rpSkinSplitDataCreate( RpSkin *skin, RwUInt32 boneLimit,
+ RwUInt32 numMatrices, RwUInt32 numMeshes,
+ RwUInt32 numRLE );
+
+extern RwBool
+_rpSkinSplitDataDestroy( RpSkin *skin );
+
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
@@ -167,6 +198,29 @@ RpSkinAtomicGetType( RpAtomic *atomic );
* D3D8 skin pipeline extension.
*/
+/**
+ * \defgroup rpskind3d8features Features
+ * \ingroup rpskind3d8
+ *
+ * D3D8 skin pipeline features.
+ */
+
+/**
+ * \defgroup rpskind3d8restrictions Restrictions
+ * \ingroup rpskind3d8
+ *
+ * D3D8 skin pipeline restrictions.
+ */
+
+/**
+ * \defgroup rpskinbonelimit Bone limit
+ * \ingroup rpskind3d8restrictions
+ *
+ * \par Bone limit
+ * The bone limit is 256 as skinning is performed on the CPU.
+ *
+ */
+
/*===========================================================================*
*--- D3D8 Defines -----------------------------------------------------------*
diff --git a/rwsdk/include/d3d8/rpskin.rpe b/rwsdk/include/d3d8/rpskin.rpe
index 57cecd5e..02d7e162 100644
--- a/rwsdk/include/d3d8/rpskin.rpe
+++ b/rwsdk/include/d3d8/rpskin.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionSKIN
{
diff --git a/rwsdk/include/d3d8/rpspline.h b/rwsdk/include/d3d8/rpspline.h
index 53fd8484..df3a21d9 100644
--- a/rwsdk/include/d3d8/rpspline.h
+++ b/rwsdk/include/d3d8/rpspline.h
@@ -39,7 +39,7 @@
/**
* \defgroup rpspline RpSpline
- * \ingroup rpplugin
+ * \ingroup mathtools
*
* Spline Plugin for RenderWare Graphics.
*/
diff --git a/rwsdk/include/d3d8/rpspline.rpe b/rwsdk/include/d3d8/rpspline.rpe
index 27670751..55748bdd 100644
--- a/rwsdk/include/d3d8/rpspline.rpe
+++ b/rwsdk/include/d3d8/rpspline.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionSpline
{
diff --git a/rwsdk/include/d3d8/rpstereo.h b/rwsdk/include/d3d8/rpstereo.h
deleted file mode 100644
index 5a8db912..00000000
--- a/rwsdk/include/d3d8/rpstereo.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Stereo camera plugin
- */
-
-/**********************************************************************
- *
- * File : rpstereo.h
- *
- * Abstract : Add Stereo Camera support to RenderWare
- *
- **********************************************************************
- *
- * This file is a product of Criterion Software Ltd.
- *
- * This file is provided as is with no warranties of any kind and is
- * provided without any obligation on Criterion Software Ltd. or
- * Canon Inc. to assist in its use or modification.
- *
- * Criterion Software Ltd. will not, under any
- * circumstances, be liable for any lost revenue or other damages arising
- * from the use of this file.
- *
- * Copyright (c) 1998 Criterion Software Ltd.
- * All Rights Reserved.
- *
- * RenderWare is a trademark of Canon Inc.
- *
- ************************************************************************/
-
-#ifndef RPSTEREO_H
-#define RPSTEREO_H
-
-/**
- * \defgroup rpstereo RpStereo
- * \ingroup rpplugin
- *
- * Stereo Camera Plugin for RenderWare Graphics.
- */
-
-/*--- Include files ---*/
-#include <rwcore.h>
-#include <rpworld.h>
-
-#include "rpstereo.rpe" /* automatically generated header file */
-
-/*--- Global Structures ---*/
-
-/* Supported Stereo Modes */
-
-/**
- * \ingroup rpstereo
- * \ref RpStereoCameraMode
- * Stereo camera mode enumeration.
- */
-enum RpStereoCameraMode
-{
- rpNASTEREOMODE = 0,
- rpSTEREOMONO, /**< Render as Mono camera - single
- * image
- */
- rpSTEREOLEFTRIGHT, /**< Vertical split screen. Left eye
- * image on left of screen. Right eye
- * image on right of screen.
- */
- rpSTEREORIGHTLEFT, /**< Vertical split screen. Right eye
- * image on left of screen. Left eye image
- * on right of screen.
- */
-
- rpSTEREOROTATE90, /**< As for rpSTEREOLEFTRIGHT - with
- * the images rotated inwards by 90 degrees
- */
- rpSTEREOINTERLACEDLEFTRIGHT, /**< Left and right eye images on
- * alternate scanlines. The left eye image
- * on the topmost line of the display.
- */
-
- rpSTEREOINTERLACEDRIGHTLEFT, /**< Left and right eye images on
- * alternate scanlines. The right eye
- * image is on the topmost line of the
- * display.
- */
- rpSTEREOLASTMODE,
- rpSTEREOCAMERAMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
-};
-
-/*
- * typedef for stereo camera mode enumeration.
- */
-typedef enum RpStereoCameraMode RpStereoCameraMode;
-
-/*--- Constants ---*/
-
-/* These may be used to quickly adapt an existing application to a
- * stereo version.
- */
-
-#ifdef RPSTEREO_OVERLOAD
-#define RwCameraBeginUpdate RpStereoCameraBeginUpdate
-#define RwCameraEndUpdate RpStereoCameraEndUpdate
-#undef RpWorldRender
-#define RpWorldRender RpStereoWorldRender
-#undef RpClumpRender
-#define RpClumpRender RpStereoClumpRender
-#undef RpAtomicRender
-#define RpAtomicRender RpStereoAtomicRender
-#undef RpWorldSectorRender
-#define RpWorldSectorRender RpStereoWorldSectorRender
-#endif
-
-/*--- Plugin API Functions ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-RwBool RpStereoPluginAttach(void);
-
-RpWorld *RpStereoWorldRender(RpWorld *world);
-RpClump *RpStereoClumpRender(RpClump *clump);
-RpAtomic *RpStereoAtomicRender(RpAtomic *atomic);
-RpWorldSector *RpStereoWorldSectorRender(RpWorldSector *sector);
-
-RwCamera *RpStereoCameraBeginUpdate(RwCamera *camera);
-RwCamera *RpStereoCameraEndUpdate(RwCamera *stereoCam);
-
-RwReal RpStereoCameraGetSeparation(RwCamera *stereoCam);
-RwReal RpStereoCameraGetFocal(RwCamera *stereoCam);
-RpStereoCameraMode RpStereoCameraGetMode(RwCamera *stereoCam);
-
-RwCamera *RpStereoCameraSetSeparation(RwCamera *stereoCam, RwReal dist);
-RwCamera *RpStereoCameraSetFocal(RwCamera *stereoCam, RwReal focal);
-RwCamera *RpStereoCameraSetMode(RwCamera *stereoCam, RpStereoCameraMode newMode);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* RPSTEREO_H */
-
diff --git a/rwsdk/include/d3d8/rpstereo.rpe b/rwsdk/include/d3d8/rpstereo.rpe
deleted file mode 100644
index b89dde2e..00000000
--- a/rwsdk/include/d3d8/rpstereo.rpe
+++ /dev/null
@@ -1,641 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-enum e_rwdb_CriterionStereo
-{
-
-
-E_RP_STEREO_INVMODE,
-
-E_RP_STEREO_INVFOCAL,
-
- e_rwdb_CriterionStereoLAST = RWFORCEENUMSIZEINT
-};
-
-typedef enum e_rwdb_CriterionStereo e_rwdb_CriterionStereo;
-
-
diff --git a/rwsdk/include/d3d8/rpusrdat.h b/rwsdk/include/d3d8/rpusrdat.h
index 3665e064..92a56e31 100644
--- a/rwsdk/include/d3d8/rpusrdat.h
+++ b/rwsdk/include/d3d8/rpusrdat.h
@@ -3,7 +3,7 @@
/**
* \defgroup rpuserdata RpUserData
- * \ingroup rpplugin
+ * \ingroup scenemanagement
*
* User Data Plugin for RenderWare Graphics.
*/
diff --git a/rwsdk/include/d3d8/rpusrdat.rpe b/rwsdk/include/d3d8/rpusrdat.rpe
index 31c37fd1..f5879a00 100644
--- a/rwsdk/include/d3d8/rpusrdat.rpe
+++ b/rwsdk/include/d3d8/rpusrdat.rpe
@@ -160,472 +160,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionUserData
{
diff --git a/rwsdk/include/d3d8/rpworld.h b/rwsdk/include/d3d8/rpworld.h
index 21fdc31b..0d0489ce 100644
--- a/rwsdk/include/d3d8/rpworld.h
+++ b/rwsdk/include/d3d8/rpworld.h
@@ -22,7 +22,7 @@
/*************************************************************************
*
* Filename: <C:/daily/rwsdk/include/d3d8/rpworld.h>
- * Automatically Generated on: Wed Jul 10 10:45:01 2002
+ * Automatically Generated on: Thu Jan 23 11:06:24 2003
*
************************************************************************/
@@ -75,135 +75,32 @@ extern RxNodeDefinition *RxNodeDefinitionGetD3D8AtomicAllInOne(void);
extern "C"
{
#endif /* __cplusplus */
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeWorldSectorInstance.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetWorldSectorInstance(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeWorldSectorEnumerateLights.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetWorldSectorEnumerateLights(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodePreLight.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetPreLight(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodePostLight.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetPostLight(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeMaterialScatter.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetMaterialScatter(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeLight.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetLight(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeFastPathSplitter.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetFastPathSplitter(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+extern void RwD3D8VertexBufferManagerChangeDefaultSize(RwUInt32 defaultSize);
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeAtomicInstance.h ---*/
+extern RwBool _rxD3D8VertexBufferManagerCreate(RwUInt32 fvf,
+ RwUInt32 size,
+ void **vertexBuffer,
+ RwUInt32 *baseIndex);
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetAtomicInstance(void);
+extern void _rxD3D8VertexBufferManagerDestroy(RwUInt32 fvf,
+ RwUInt32 size,
+ void *vertexBuffer,
+ RwUInt32 baseIndex);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/nodeAtomicEnumerateLights.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern RwBool _rxD3D8VertexBufferManagerCreateNoFVF(RwUInt32 stride,
+ RwUInt32 size,
+ void **vertexBuffer,
+ RwUInt32 *baseIndex);
-extern RxNodeDefinition *RxNodeDefinitionGetAtomicEnumerateLights(void);
+extern void _rxD3D8VertexBufferManagerDestroyNoFVF(RwUInt32 stride,
+ RwUInt32 size,
+ void *vertexBuffer,
+ RwUInt32 baseIndex);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
-
+#endif /* __cplusplus */
/*--- Automatically derived from: c:/daily/rwsdk/world/bamateri.h ---*/
@@ -222,15 +119,17 @@ extern RxNodeDefinition *RxNodeDefinitionGetAtomicEnumerateLights(void);
typedef struct RpMaterialChunkInfo RpMaterialChunkInfo;
typedef struct RpMaterialChunkInfo _rpMaterial;
+#if (!defined(DOXYGEN))
struct RpMaterialChunkInfo
{
- RwInt32 flags; /**< Material flags - unused currently -
- for future expansion */
- RwRGBA color; /**< Colour of material. */
- RwInt32 unused; /**< Not used */
- RwBool textured; /**< Are we textured? */
- RwSurfaceProperties surfaceProps; /**< Surface properties */
+ RwInt32 flags; /* Material flags - unused currently -
+ * for future expansion */
+ RwRGBA color; /* Color of material. */
+ RwInt32 unused; /* Not used */
+ RwBool textured; /* Are we textured? */
+ RwSurfaceProperties surfaceProps;/* Surface properties */
};
+#endif /* (!defined(DOXYGEN)) */
#if (!defined(RwMaterialAssign))
#define RwMaterialAssign(_target, _source) \
@@ -238,8 +137,8 @@ struct RpMaterialChunkInfo
#endif /* (!defined(RwMaterialAssign)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpMaterial
+ * \ingroup rpmaterial
+ * \struct RpMaterial
* Material object. This should be
* considered an opaque type. Use the RpMaterial API functions to access.
*/
@@ -258,9 +157,8 @@ struct RpMaterial
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpMaterialCallBack
- \ref RpMaterialCallBack
+ * \ingroup rpmaterial
+ * \ref RpMaterialCallBack
* represents the function called from \ref RpGeometryForAllMaterials and
* \ref RpWorldForAllMaterials for all materials referenced by polygons in a
* given geometry. This function should return a pointer to the current
@@ -268,7 +166,7 @@ struct RpMaterial
* further callbacks on the materials.
*
* \param material Pointer to the current material
- * \param data Pointer to developer-defined data structure.
+ * \param data Pointer to developer-defined data structure.
*
* \return Pointer to the current material.
*/
@@ -346,6 +244,9 @@ extern "C"
#endif /* __cplusplus */
+extern void RpMaterialSetFreeListCreateParams( RwInt32 blockSize,
+ RwInt32 numBlocksToPrealloc );
+
/* Creating, destroying and referencing materials */
extern RpMaterial *RpMaterialCreate(void);
extern RwBool RpMaterialDestroy(RpMaterial *material);
@@ -388,6 +289,8 @@ extern RwInt32 RpMaterialRegisterPluginStream(RwUInt32 pluginID,
extern RwInt32 RpMaterialSetStreamAlwaysCallBack(
RwUInt32 pluginID,
RwPluginDataChunkAlwaysCallBack alwaysCB);
+extern RwInt32 RpMaterialSetStreamRightsCallBack(RwUInt32 pluginID,
+ RwPluginDataChunkRightsCallBack rightsCB);
extern RwInt32 RpMaterialGetPluginOffset(RwUInt32 pluginID);
extern RwBool RpMaterialValidatePlugins(const RpMaterial *material);
@@ -414,12 +317,15 @@ _rpMaterialChunkInfoRead(RwStream *stream,
*/
typedef struct RpMaterialList RpMaterialList;
+
+#if (!defined(DOXYGEN))
struct RpMaterialList
{
RpMaterial **materials;
RwInt32 numMaterials;
RwInt32 space;
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
Function prototypes
@@ -531,16 +437,14 @@ extern RwModuleInfo meshModule;
Global types
*/
-/**
- * \ingroup rpworlddatatypes
- * \typedef RpMeshHeader
+/*
* typedef for header structure listing all meshes
* constituting a single RpGeometry or RpWorldSector
*/
typedef struct RpMeshHeader RpMeshHeader;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpmesh
* \ref RpMeshHeaderFlags
* represents the different types of mesh.
* \see RpMeshHeader
@@ -549,18 +453,18 @@ enum RpMeshHeaderFlags
{
/* NOTE: trilists are denoted by absence of any other
* primtype flags, so be careful that you test:
- * (triListFlag == flags&triListFlag)
+ * (triListFlag == (flags&triListFlag))
* or:
- * (0 == flags&rpMESHHEADERPRIMMASK)
+ * (0 == (flags&rpMESHHEADERPRIMMASK))
* and not:
* (flags&triListFlag)
*/
rpMESHHEADERTRISTRIP = 0x0001, /**< Render as tristrips */
- rpMESHHEADERTRIFAN = 0x0002, /**< On PS2 these will be converted to trilists */
+ rpMESHHEADERTRIFAN = 0x0002, /**< On PlayStation 2 these will be converted to trilists */
rpMESHHEADERLINELIST = 0x0004, /**< Render as linelists */
- rpMESHHEADERPOLYLINE = 0x0008, /**< On PS2 these will be converted to linelists */
+ rpMESHHEADERPOLYLINE = 0x0008, /**< On PlayStation 2 these will be converted to linelists */
rpMESHHEADERPOINTLIST = 0x0010, /**< Pointlists are supported only if rendered by
- * custom pipelines; there is no default RenderWare
+ * custom pipelines; there is no default RenderWare
* way to render pointlists. */
rpMESHHEADERPRIMMASK = 0x00FF, /**< All bits reserved for specifying primitive type */
@@ -576,6 +480,8 @@ enum RpMeshHeaderFlags
typedef enum RpMeshHeaderFlags RpMeshHeaderFlags;
typedef struct rpMeshGlobals rpMeshGlobals;
+
+#if (!defined(DOXYGEN))
struct rpMeshGlobals
{
RwInt16 nextSerialNum;
@@ -583,11 +489,12 @@ struct rpMeshGlobals
RwUInt8 meshFlagsToPrimType[rpMESHHEADERPRIMTYPEOR];
RwUInt8 primTypeToMeshFlags[rwPRIMTYPEOR];
};
+#endif /* (!defined(DOXYGEN)) */
typedef struct RpBuildMeshTriangle RpBuildMeshTriangle;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpmesh
* \struct RpBuildMeshTriangle
* This type represents an array of indices into
* the object vertex array. Used during the construction
@@ -613,7 +520,7 @@ struct RpBuildMeshTriangle
typedef struct RpBuildMesh RpBuildMesh;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpmesh
* \struct RpBuildMesh
* This type represents a mesh ready for tri stripping.
*
@@ -640,7 +547,7 @@ struct RpBuildMesh
typedef struct RpMesh RpMesh;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpmesh
* \struct RpMesh
* This type represents a single polygon mesh.
* A mesh is defined as a collection of triangles derived from an RpGeometry
@@ -659,7 +566,7 @@ struct RpMesh
};
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpmesh
* \struct RpMeshHeader
* Header for all meshes that constitute a single RpGeometry or RpWorldSector
*/
@@ -679,9 +586,8 @@ struct RpMeshHeader
};
/**
- * \ingroup rpworlddatatypes
- * \typedef RpMeshCallBack
- * \ref RpMeshCallBack is the callback
+ * \ingroup rpmesh
+ * \ref RpMeshCallBack is the callback
* function supplied to \ref RpGeometryForAllMeshes and
* \ref RpWorldSectorForAllMeshes for all meshes in a given geometry.
*
@@ -689,14 +595,13 @@ struct RpMeshHeader
* success. The callback may return NULL to terminate further callbacks
* on the meshes.
*
- * \param mesh Pointer to the current mesh, supplied by
- * iterator.
- * \param meshHeader Pointer to the meshes header
- * \param data Pointer to developer-defined data structure.
+ * \param mesh Pointer to the current mesh, supplied by
+ * iterator.
+ * \param meshHeader Pointer to the meshes header
+ * \param data Pointer to developer-defined data structure.
*
- * \return
- * Returns a pointer to the current mesh if successful or NULL if an error
- * occurred.
+ * \return Returns a pointer to the current mesh if successful or NULL
+ * if an error occurred.
*/
typedef RpMesh *(*RpMeshCallBack) (RpMesh * mesh,
RpMeshHeader * meshHeader,
@@ -823,29 +728,29 @@ extern RpMeshHeader * _rpMeshHeaderCreate(RwUInt32 size);
naTmp[1] = RwRealToFixed((v).y); \
naTmp[2] = RwRealToFixed((v).z); \
\
- if (naTmp[0] >= RwFixedCast(1)) \
+ if (naTmp[0] >= RwIntToFixed(1)) \
{ \
- naTmp[0] = RwFixedCast(1)-1; \
+ naTmp[0] = RwIntToFixed(1)-1; \
} \
- if (naTmp[0] <= RwFixedCast(-1)) \
+ if (naTmp[0] <= RwIntToFixed(-1)) \
{ \
- naTmp[0] = RwFixedCast(-1)+1; \
+ naTmp[0] = RwIntToFixed(-1)+1; \
} \
- if (naTmp[1] >= RwFixedCast(1)) \
+ if (naTmp[1] >= RwIntToFixed(1)) \
{ \
- naTmp[1] = RwFixedCast(1)-1; \
+ naTmp[1] = RwIntToFixed(1)-1; \
} \
- if (naTmp[1] <= RwFixedCast(-1)) \
+ if (naTmp[1] <= RwIntToFixed(-1)) \
{ \
- naTmp[1] = RwFixedCast(-1)+1; \
+ naTmp[1] = RwIntToFixed(-1)+1; \
} \
- if (naTmp[2] >= RwFixedCast(1)) \
+ if (naTmp[2] >= RwIntToFixed(1)) \
{ \
- naTmp[2] = RwFixedCast(1)-1; \
+ naTmp[2] = RwIntToFixed(1)-1; \
} \
- if (naTmp[2] <= RwFixedCast(-1)) \
+ if (naTmp[2] <= RwIntToFixed(-1)) \
{ \
- naTmp[2] = RwFixedCast(-1)+1; \
+ naTmp[2] = RwIntToFixed(-1)+1; \
} \
\
(n).x = (RwInt8)(naTmp[0]>>9); \
@@ -853,37 +758,13 @@ extern RpMeshHeader * _rpMeshHeaderCreate(RwUInt32 size);
(n).z = (RwInt8)(naTmp[2]>>9); \
}
-/* RpCollSector access macros - for pre v304 data */
-#define RWCOLLSECTORGETTYPE(sect) \
- ((sect).cType&0x80)
-
-#define RWCOLLSECTORGETPLANE(sect) \
- ((((sect).cType)>>3)&0xc)
-
-#define RWCOLLSECTORGETON(sect) \
- (((sect).cType)&0x1f)
-
-#define RWCOLLSECTORGETVERTEX(sect) \
- (sect).vertex
-
-#define RWCOLLSECTORGETSTART(sect) \
- (sect).start
-
-#define RWCOLLSECTORGETNOPOLYS(sect) \
- (sect).cType
-
-#define RWCOLLSECTORSETPOLYGONS(sect,no,st) \
- (sect).cType = (RwUInt8)(no); \
- (sect).start = (RwUInt8)(st)
-
-#define rwMAXCOLLISIONCUTS 7
-
/****************************************************************************
Global types
*/
typedef struct RpVertexNormal RpVertexNormal;
+#if (!defined(DOXYGEN))
struct RpVertexNormal
{
RwInt8 x;
@@ -899,28 +780,11 @@ struct RpPolygon
RwUInt16 matIndex;
RwUInt16 vertIndex[3];
};
-
-/* RpCollSector - for pre v304 data */
-#define RWCOLLSECTORSETPLANE(sect,plane,vert,no,st) \
- (sect).cType = (RwUInt8)(0x80|((plane)<<3)|(no)); \
- (sect).vertex = (RwUInt8)(vert); \
- (sect).start = (RwUInt8)(st)
-
-typedef struct RpCollSector RpCollSector;
-
-struct RpCollSector
-{
- RwUInt8 cType; /* Bit 7 - 1 plane */
- /* 0 polygons */
- /* Bit 6-5 - plane */
- /* Bit 4-0 - amount ON plane */
- RwUInt8 vertex; /* Vertex index used for the split */
- RwUInt8 start; /* Starting polygon */
-};
+#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpWorldSector
+ * \ingroup rpworldsector
+ * \struct RpWorldSector
* World Sector object. This should be
* considered an opaque type. Use the RpWorldSector API functions to access.
*/
@@ -958,9 +822,6 @@ struct RpWorldSector
/* Bounding box tightly enclosing geometry */
RwBBox tightBoundingBox;
- /* The root of the bsp collision tree for pre v304 data */
- RpCollSector *colSectorRoot;
-
/* The mesh which groups same material polygons together */
RpMeshHeader *mesh;
@@ -981,9 +842,8 @@ struct RpWorldSector
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpWorldSectorCallBack
- \ref RpWorldSectorCallBack
+ * \ingroup rpworldsector
+ * \ref RpWorldSectorCallBack
* represents the function called from \ref RpWorldForAllWorldSectors,
* \ref RpAtomicForAllWorldSectors and \ref RpLightForAllWorldSectors for all
* world sectors in a given world or world sectors a given atomic or light lies
@@ -991,15 +851,17 @@ struct RpWorldSector
* indicate success. The callback may return NULL to terminate further
* callbacks on the atomic or light.
*
+ * \param sector Pointer to the current world sector
+ * \param data Pointer to developer-defined data structure.
+ *
* \return Pointer to the current world sector.
*
- * \param sector Pointer to the current world sector
- * \param data Pointer to developer-defined data structure.
*/
typedef RpWorldSector *(*RpWorldSectorCallBack)(RpWorldSector *worldSector, void *data);
typedef struct RpSector RpSector;
+#if (!defined(DOXYGEN))
struct RpSector
{
RwInt32 type;
@@ -1022,7 +884,7 @@ struct RpPlaneSector
RwReal leftValue;
RwReal rightValue;
};
-
+#endif /* (!defined(DOXYGEN)) */
#ifdef __cplusplus
extern "C"
@@ -1101,15 +963,16 @@ extern RwBool RpWorldSectorValidatePlugins(const RpWorldSector *sector);
Defines
*/
+#define RPTRISTRIPPOLYGONMAXEDGES 3
+
/**
- * \ingroup rpworlddatatypes
- * \typedef RpTriStripMeshCallBack
+ * \ingroup rpmesh
* \ref RpTriStripMeshCallBack is the callback to generate triangle strips
* when the triangle stripped geometries or world sectors are unlocked.
*
* \param buildMesh pointer to the mesh which the triangle strip will be
- * generated from.
- * \param data pointer to user-supplied data to pass to the callback
+ * generated from.
+ * \param data pointer to user-supplied data to pass to the callback
* function.
*
* \return a pointer to the constructed mesh header.
@@ -1119,10 +982,156 @@ typedef RpMeshHeader *
(*RpTriStripMeshCallBack) (RpBuildMesh *buildMesh, void *data);
+
/****************************************************************************
Global types
*/
+typedef struct RpTriStripEdge RpTriStripEdge;
+
+typedef struct RpTriStripPolygon RpTriStripPolygon;
+/**
+ * \ingroup rpmesh
+ * \struct RpTriStripPolygon
+ * This type represents a polygon.
+ *
+ * \see RpTriStripPolygonFollowStrip
+ * \see RpBuildMeshGenerateTriStrip
+ * \see RpTriStripMeshTunnel
+ */
+struct RpTriStripPolygon
+{
+ RwLLLink inEndLink; /**< link for list of polygons joined by fewer than
+ 2 strip edges */
+ RwLLLink inUsedLink; /**< link for list of used polygons */
+ RwLLLink inFreeLink; /**< link for list of free polygons */
+ RwUInt32 numEdges; /**< number of edges */
+ RpTriStripEdge *edges[RPTRISTRIPPOLYGONMAXEDGES]; /**< polygon edges */
+ RxVertexIndex vertIndex[RPTRISTRIPPOLYGONMAXEDGES]; /**< polygon vertex
+ indices */
+ RwUInt32 testFrame; /**< used to prevent a tri-strip being counted by
+ the cost function more than once */
+};
+
+/**
+ * \ingroup rpmesh
+ * \struct RpTriStripEdge
+ * This type represents a polygon edge which may be part of a tri-strip.
+ *
+ * \see RpTriStripPolygonFollowStrip
+ * \see RpBuildMeshGenerateTriStrip
+ * \see RpTriStripMeshTunnel
+ */
+struct RpTriStripEdge
+{
+ RwLLLink inUsedLink; /**< link for list of used edges */
+ RwLLLink inFreeLink; /**< link for list of free edges */
+ RpTriStripPolygon *poly1; /**< first polygon including this edge */
+ RpTriStripPolygon *poly2; /**< second polygon including this edge or NULL
+ if this edge is only included in one */
+ RxVertexIndex vert1; /**< index of first vertex of edge */
+ RxVertexIndex vert2; /**< index of second vertex of edge */
+ RwBool strip; /**< TRUE if the edge is part of a tri-strip */
+};
+
+typedef struct RpTriStripMesh RpTriStripMesh;
+/**
+ * \ingroup rpmesh
+ * \struct RpTriStripMesh
+ * This type represents a mesh and the tri-strips it contains.
+ *
+ * \see RpBuildMeshGenerateTriStrip
+ * \see RpTriStripMeshTunnel
+ */
+struct RpTriStripMesh
+{
+ RwUInt32 numPolygons; /**< the number of polygons in the mesh */
+ RwLinkList polygonEndList; /**< linked list of polygons joined by fewer
+ than 2 strip edges. */
+ RwLinkList polygonUsedList; /**< linked list of used polygons */
+ RwLinkList polygonFreeList; /**< linked list of free polygons */
+ RwLinkList edgeUsedList; /**< linked list of used edges */
+ RwLinkList edgeFreeList; /**< linked list of free edges */
+};
+
+/**
+ * \ingroup rpmesh
+ * \ref RpTriStripMeshStripCallBack represents the callback function to
+ * tri-strip a mesh.
+ *
+ * \param mesh Pointer to the mesh to tri-strip.
+ * \param data Pointer to user-supplied data.
+ *
+ * \return Returns a pointer to the current mesh if successful or NULL if an
+ * error occurred.
+ */
+typedef RpTriStripMesh *
+(*RpTriStripMeshStripCallBack) (RpTriStripMesh *mesh, void *data);
+
+typedef struct RpTriStripData RpTriStripData;
+/**
+ * \ingroup rpmesh
+ * \struct RpTriStripData
+ * This type represents the data required by the
+ * \ref RpBuildMeshGenerateTriStrip function to tri-strip a mesh. This data must
+ * be the user-supplied data passed into RpMeshSetTriStripMethod when using
+ * \ref RpBuildMeshGenerateTriStrip.
+ *
+ * \see RpMeshGetTriStripMethod
+ * \see RpMeshSetTriStripMethod
+ * \see RpBuildMeshGenerateTriStrip
+ * \see RpTriStripMeshTunnel
+ */
+struct RpTriStripData
+{
+ RwBool ignoreWinding; /**< TRUE to ignore winding order */
+ RpTriStripMeshStripCallBack stripCB; /**< callback to tri-strip mesh */
+ void *data; /**< data to supply to callback */
+};
+
+/**
+ * \ingroup rpmesh
+ * \ref RpTriStripCostCallBack represents the callback function used by the
+ * tunnelling tri-stripper to determine the cost of a tri-strip.
+ *
+ * \param startPolygon Pointer to polygon at the start of the tri-strip.
+ * \param testFrame Value that must be written to the testFrame of all
+ * polygons in the tri-strip
+ * \param data Pointer to user-supplied data.
+ *
+ * \return Returns the cost of the tri-strip.
+ */
+typedef RwUInt32
+(*RpTriStripCostCallBack) (RpTriStripPolygon *startPolygon, RwUInt32 testFrame, void *data);
+
+typedef struct RpTriStripTunnelData RpTriStripTunnelData;
+/**
+ * \ingroup rpmesh
+ * \struct RpTriStripTunnelData
+ * This type represents the data required by the
+ * \ref RpTriStripMeshTunnel function to tri-strip a mesh. This data must
+ * be the user-supplied data in the RpTriStripData structure passed into
+ * \ref RpMeshSetTriStripMethod as the user-supplied data when using
+ * \ref RpTriStripMeshTunnel.
+ *
+ * \see RpMeshGetTriStripMethod
+ * \see RpMeshSetTriStripMethod
+ * \see RpBuildMeshGenerateTriStrip
+ * \see RpTriStripMeshTunnel
+ * \see RpTriStripDefaultCost
+ */
+struct RpTriStripTunnelData
+{
+ RwReal quality; /**< the higher the value the better the
+ output but the longer it will take;
+ values greater than 1 are unlikely to
+ be useful */
+ RwUInt32 lengthLimit; /**< the maximum tunnel length to use */
+ RpTriStripCostCallBack costCB; /**< callback to determine tri-strip cost */
+ void *data; /**< data to supply to callbacks */
+};
+
+
/****************************************************************************
Global Variables
@@ -1138,8 +1147,27 @@ extern "C"
{
#endif /* __cplusplus */
+/* Tri-strip manipulating functions */
+extern RpTriStripPolygon *
+RpTriStripPolygonFollowStrip(RpTriStripPolygon *curr, RpTriStripPolygon *prev);
+
+/* Callback strip costing functions */
+extern RwUInt32
+RpTriStripDefaultCost(RpTriStripPolygon *startPolygon, RwUInt32 testFrame,
+ void *data);
+
+/* Callback mesh stripping functions */
+extern RpTriStripMesh *
+RpTriStripMeshTunnel(RpTriStripMesh *mesh, void *data);
-/* Callback mesh generating functions */
+extern RpTriStripMesh *
+RpTriStripMeshQuick(RpTriStripMesh *mesh, void *data);
+
+/* New callback mesh generating function */
+extern RpMeshHeader *
+RpBuildMeshGenerateTriStrip(RpBuildMesh *buildMesh, void *data);
+
+/* Old callback mesh generating functions. Probably obsolete */
extern RpMeshHeader *
RpBuildMeshGenerateTrivialTriStrip(RpBuildMesh *buildMesh, void *data);
@@ -1164,7 +1192,7 @@ extern RpMeshHeader *
RpBuildMeshGenerateExhaustiveIgnoreWindingTriStrip(RpBuildMesh *buildmesh,
void *data);
-/* Functions to set and get the global mesh tristrip algorithm */
+/* Functions to set and get the global mesh tri-strip algorithm */
extern RwBool
RpMeshSetTriStripMethod(RpTriStripMeshCallBack callback, void *data);
@@ -1225,6 +1253,7 @@ _rpMeshOptimise(RpBuildMesh *buildmesh, RwUInt32 flags);
typedef struct RpLightChunkInfo RpLightChunkInfo;
typedef struct RpLightChunkInfo _rpLight;
+#if (!defined(DOXYGEN))
struct RpLightChunkInfo
{
RwReal radius; /**< radius */
@@ -1234,6 +1263,7 @@ struct RpLightChunkInfo
RwReal minusCosAngle; /**< minusCosAngle */
RwUInt32 typeAndFlags; /**< typeAndFlags */
};
+#endif /* (!defined(DOXYGEN)) */
/* Type ID */
#define rpLIGHT 3
@@ -1242,7 +1272,7 @@ struct RpLightChunkInfo
#define rpLIGHTPOSITIONINGSTART 0x80
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rplight
* \ref RpLightType are
* light sub types. This type represents the different
* types of light source that can be created using the API function \ref RpLightCreate.
@@ -1265,12 +1295,17 @@ enum RpLightType
typedef enum RpLightType RpLightType;
#define rpLIGHTMINCONEANGLE ((RwReal)0.0f)
-#if ((defined(XBOX_DRVMODEL_H)) || (defined(OPENGL_DRVMODEL_H)) || (defined(GCN_DRVMODEL_H)))
-/* XBox has Micro$oft-penned drivers, no wonder it crashes... */
-/* OpenGL and GCN clamp to 90 internally, so we mirror that behaviour */
-#define rpLIGHTMAXCONEANGLE ((RwReal)89.9999f)
+
+#if (defined(XBOX_DRVMODEL_H))
+#define rpLIGHTMAXCONEANGLE (rwPIOVER2)
+#elif (defined(OPENGL_DRVMODEL_H))
+#define rpLIGHTMAXCONEANGLE (rwPIOVER2)
+#elif (defined(GCN_DRVMODEL_H))
+#define rpLIGHTMAXCONEANGLE (rwPIOVER2)
+#elif (defined(D3D8_DRVMODEL_H))
+#define rpLIGHTMAXCONEANGLE (rwPIOVER2)
#else
-#define rpLIGHTMAXCONEANGLE ((RwReal)180.0f)
+#define rpLIGHTMAXCONEANGLE (rwPI)
#endif
/*************/
@@ -1280,7 +1315,7 @@ typedef enum RpLightType RpLightType;
/*************/
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rplight
* \ref RpLightFlag defines what geometry is influenced by the light.
* The bit-field RpLightFlag specifies the options available for controlling the scope
* of a light source (see API function \ref RpLightSetFlags):*/
@@ -1327,10 +1362,10 @@ MACRO_STOP
/**
- * \ingroup rpworlddatatypes
- * \typedef RpLight
- * Light. This should be
- * considered an opaque type. User the RpLight API functions to access.
+ * \ingroup rplight
+ * \struct RpLight
+ * Light object. This should be
+ * considered an opaque type. Use the RpLight API functions to access.
*/
typedef struct RpLight RpLight;
@@ -1349,8 +1384,7 @@ struct RpLight
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpLightCallBack
+ * \ingroup rplight
* \ref RpLightCallBack
* represents the function called from \ref RpWorldForAllLights and
* \ref RpWorld SectorForAllLights for all lights in a given world or world
@@ -1358,25 +1392,34 @@ struct RpLight
* indicate success. The callback may return NULL to terminate further
* callbacks on the world sector.
*
+ * \param light Pointer to the current light in the world
+ * sector.
+ * \param data Pointer to developer-defined data structure.
+ *
* \return Pointer to the current light.
- *
- * \param light Pointer to the current light in the world
- * sector.
- * \param data Pointer to developer-defined data structure.
*/
typedef RpLight *(*RpLightCallBack) (RpLight * light, void *data);
typedef struct RpLightTie RpLightTie;
+/**
+ * \ingroup rplight
+ * \struct RpLightTie
+ *
+ * RpLightTie is a linked list of lights inside world sectors. These are
+ * created when frame hierarchies are updated as part of an \ref RwCameraBeginUpdate.
+ * This is used for determining which lights influence a world sector and the atomics inside it.
+ * Creation and destruction of RpLightTies is internal to the world plugin.
+ */
struct RpLightTie
{
/* Information for an atomic sector */
- RwLLLink lightInWorldSector; /* Lights IN this ATOMIC SECTOR */
- RpLight *light;
+ RwLLLink lightInWorldSector; /**< Lights IN this ATOMIC SECTOR */
+ RpLight *light; /**< A pointer to a light */
/* Information for a atomic */
- RwLLLink WorldSectorInLight; /* Atomic sectors HOLDING this Light */
- RpWorldSector *sect;
+ RwLLLink WorldSectorInLight; /**< Atomic sectors HOLDING this Light */
+ RpWorldSector *sect; /**< A pointer to a world sector */
};
@@ -1453,6 +1496,7 @@ extern RwUInt32 RpLightGetFlags(const RpLight *light);
#endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */
/* API Functions */
+extern void RpLightSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
extern RpLight *RpLightCreate(RwInt32 type);
extern RwBool RpLightDestroy(RpLight *light);
extern RpLight *RpLightSetRadius(RpLight *light, RwReal radius);
@@ -1491,9 +1535,7 @@ extern RwBool RpLightValidatePlugins(const RpLight * light);
/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/d3d8/D3D8lights.h ---*/
-/**
- * \ingroup rplightd3d8
- * \typedef RpD3D8AttenuationParams
+/*
* typedef for struct RpD3D8AttenuationParams
*/
typedef struct RpD3D8AttenuationParams RpD3D8AttenuationParams;
@@ -1546,21 +1588,6 @@ _rwD3D8LightsClose(void);
#endif /* __cplusplus */
-/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/p2stdclsw.h ---*/
-typedef RpLight *RxLight;
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxClusterDefinition RxClLights; /* Uses the RxLight type (see above) */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-
/*--- Automatically derived from: c:/daily/rwsdk/world/bageomet.h ---*/
/*
@@ -1579,7 +1606,7 @@ extern RxClusterDefinition RxClLights; /* Uses the RxLight type (see above) */
#define rpGEOMETRY 8
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpgeometry
* RpGeometryFlag
* Geometry type flags
*
@@ -1630,7 +1657,7 @@ typedef enum RpGeometryFlag RpGeometryFlag;
#define rpGEOMETRYTEXCOORDSETS(_num) ((_num & 0xff) << 16)
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpgeometry
* RpGeometryLockMode
* Geometry lock flags
*/
@@ -1665,22 +1692,25 @@ typedef enum RpGeometryLockMode RpGeometryLockMode;
*/
typedef struct rpGeometryGlobals rpGeometryGlobals;
+
+#if (!defined(DOXYGEN))
struct rpGeometryGlobals
{
RwFreeList *geomFreeList;
};
+#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpGeometry
+ * \ingroup rpgeometry
+ * \struct RpGeometry
* Geometry object. This should be considered an opaque type.
* Use the RpGeometry API functions to access.
*/
typedef struct RpGeometry RpGeometry;
/**
- * \ingroup rpworlddatatypes
- * \typedef RpMorphTarget
+ * \ingroup rpmorphtarget
+ * \struct RpMorphTarget
* Morph target -- vertex positions and normals.
* This should be considered an opaque type.
* Use RpMorphTarget API functions to access.
@@ -1700,7 +1730,7 @@ struct RpMorphTarget
typedef struct RpTriangle RpTriangle;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpgeometry
* \struct RpTriangle
* This type represents a triangle in a geometry specified
* by three indices into the geometry's vertex list (vertIndex)
@@ -1736,18 +1766,12 @@ struct RpGeometry
RwTexCoords *texCoords[rwMAXTEXTURECOORDS]; /* Texture coordinates */
- RwSurfaceProperties ignoredSurfaceProps; /* Not used in pp rendering, but present
- * so if pipe1 files are read and written these
- * values are not lost
- */
-
RpMeshHeader *mesh; /* The mesh - groups polys of the same material */
RwResEntry *repEntry; /* Information for an instance */
RpMorphTarget *morphTarget; /* The Morph Target */
};
-#endif /* (!defined(DOXYGEN)) */
typedef struct RpGeometryChunkInfo RpGeometryChunkInfo;
typedef struct RpGeometryChunkInfo _rpGeometry;
@@ -1760,27 +1784,27 @@ struct RpGeometryChunkInfo
RwInt32 numVertices;
RwInt32 numMorphTargets;
-
- RwSurfaceProperties ignoredSurfaceProps;
};
+#endif /* (!defined(DOXYGEN)) */
/* Callbacks */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpGeometryCallBack
+ * \ingroup rpgeometry
* \ref RpGeometryCallBack represents the simple callback function for the \ref RpGeometry object.
* The callback may return NULL to terminate further callbacks on
* the geometry.
*
* \param geometry Pointer to the current geometry, supplied by iterator.
- * \param data Pointer to developer-defined data structure.
+ * \param data Pointer to developer-defined data structure.
+ *
+ * \return
*/
typedef RpGeometry *(*RpGeometryCallBack)(RpGeometry *geometry, void *data);
/**
- * \ingroup rpworlddatatypes
- * \typedef RpGeometrySortByMaterialCallBack
+ * \ingroup rpgeometry
+ * \ref RpGeometrySortByMaterialCallBack
* \ref RpGeometrySortByMaterialCallBack is used by
* \ref RpGeometrySortByMaterial in order to preserve the validity of plugin
* data when the vertices in an \ref RpGeometry are sorted (and some possibly
@@ -1790,11 +1814,11 @@ typedef RpGeometry *(*RpGeometryCallBack)(RpGeometry *geometry, void *data);
* vertex in the new geometry, the index of the corresponding vertex in the
* original geometry.
*
- * \param oldGeom Pointer to the source geometry.
- * \param newGeom Pointer to the new, sorted geometry.
- * \param remapTable pointer to the vertex map table
+ * \param oldGeom Pointer to the source geometry.
+ * \param newGeom Pointer to the new, sorted geometry.
+ * \param remapTable Pointer to the vertex map table
* \param numberOfEntries Number of vertices in the new
- * geometry (size of the map table)
+ * geometry (size of the map table)
*/
typedef void (*RpGeometrySortByMaterialCallBack)(const RpGeometry *oldGeom,
RpGeometry *newGeom,
@@ -2106,25 +2130,10 @@ RpGeometrySetFlags(RpGeometry *geometry,
#endif
-/* Lighting characteristics */
-
-extern const RwSurfaceProperties *
-_rpGeometryGetSurfaceProperties(const RpGeometry *geometry);
-
-extern RpGeometry *
-_rpGeometrySetSurfaceProperties(RpGeometry *geometry,
- const RwSurfaceProperties *surfaceProperties);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
-#define RpGeometryGetSurfaceProperties(_geometry) \
- _rpGeometryGetSurfaceProperties(_geometry)
-
-#define RpGeometrySetSurfaceProperties(_geometry, _surfaceProperties) \
- _rpGeometrySetSurfaceProperties(_geometry, _surfaceProperties)
-
#define rpGeometryAddRef(_geometry) \
_rpGeometryAddRef(_geometry)
@@ -2164,7 +2173,7 @@ enum RpInterpolatorFlag
typedef enum RpInterpolatorFlag rpInterpolatorFlag;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpatomic
* The bit-field type RpAtomicFlag specifies the options available for
* controlling the behavior of atomics. See API function \ref RpAtomicSetFlags.
*
@@ -2188,7 +2197,7 @@ enum RpAtomicFlag
typedef enum RpAtomicFlag RpAtomicFlag;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpatomic
* \ref RpAtomicSetGeomFlag defines how an atomic references a new geometry
*
* \see RpAtomicSetGeometry
@@ -2214,16 +2223,16 @@ typedef enum RpAtomicPrivateFlag rpAtomicPrivateFlag;
/**
- * \ingroup rpworlddatatypes
- * \typedef RpAtomic
+ * \ingroup rpatomic
+ * \struct RpAtomic
* Atomic Geometry object. This should be
* considered an opaque type. Use the RpAtomic API functions to access.
*/
typedef struct RpAtomic RpAtomic;
/**
- * \ingroup rpworlddatatypes
- * \typedef RpInterpolator
+ * \ingroup rpinterpolator
+ * \struct RpInterpolator
* Morph Target Interpolator.
* This should be considered an opaque type.
* Use the RpInterpolator API functions to access.
@@ -2245,16 +2254,15 @@ struct RpInterpolator
/* More callbacks */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpClump
+ * \ingroup rpclump
+ * \struct RpClump
* Clump Geometry object. This should be
* considered an opaque type. Use the RpClump API functions to access.
*/
typedef struct RpClump RpClump;
/**
- * \ingroup rpworlddatatypes
- * \typedef RpClumpCallBack
+ * \ingroup rpclump
* \ref RpClumpCallBack represents the
* function called from \ref RwCameraForAllClumpsInFrustum and
* \ref RwCameraForAllClumpsNotInFrustum when a clump lies inside the current camera's
@@ -2263,8 +2271,8 @@ typedef struct RpClump RpClump;
* NULL to terminate further callbacks on the clumps.
*
* \param clump Pointer to the current clump, supplied by
- * iterator.
- * \param data Pointer to developer-defined data structure.
+ * iterator.
+ * \param data Pointer to developer-defined data structure.
*
* \return Pointer to the current clump.
*
@@ -2303,8 +2311,7 @@ struct RpClump
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpAtomicCallBackRender
+ * \ingroup rpatomic
* \ref RpAtomicCallBackRender represents the function called from
* \ref RpAtomicRender when the specified atomic
* lies inside the current camera's view frustum. The default callback
@@ -2312,10 +2319,13 @@ struct RpClump
* return a pointer to the atomic to indicate success.
*
* \param atomic Pointer to the current atomic, supplied by
- * iterator.
+ * iterator.
+ *
+ * \return Returns a pointer to the atomic to indicate success.
*
* \see RpAtomicRender
*/
+
typedef RpAtomic *(*RpAtomicCallBackRender) (RpAtomic * atomic);
#if (!defined(DOXYGEN))
@@ -2356,8 +2366,7 @@ struct RpAtomic
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rpworlddatatypes
- * \typedef RpAtomicCallBack
+ * \ingroup rpatomic
* \ref RpAtomicCallBack represents the function called from \ref RpWorldSectorForAllAtomics and
* \ref RpClumpForAllAtomics for all atomics in a given world sector or clump.
* This function should return a pointer to the current atomic to indicate
@@ -2365,28 +2374,40 @@ struct RpAtomic
* the world sector.
*
* \param atomic Pointer to the current atomic, supplied by
- * iterator.
- * \param data Pointer to developer-defined data structure.
+ * iterator.
+ * \param data Pointer to developer-defined data structure.
+ *
+ * \return Returns a pointer to the current atomic
*/
typedef RpAtomic *(*RpAtomicCallBack) (RpAtomic * atomic, void *data);
typedef struct RpTie RpTie;
+/**
+ * \ingroup rpatomic
+ * \struct RpTie
+ *
+ * RpTie is a linked list of atomics inside world sectors. These are
+ * created when frame hierarchies are updated as part of an \ref RwCameraBeginUpdate.
+ * This is used for frustum culling atomics by world sector.
+ * Creation and destruction of RpTies is internal to the world plugin.
+ */
struct RpTie
{
/* Information for an atomic sector */
- RwLLLink lAtomicInWorldSector; /* Atomics IN this ATOMIC SECTOR */
- RpAtomic *apAtom;
+ RwLLLink lAtomicInWorldSector; /**< Atomics IN this ATOMIC SECTOR */
+ RpAtomic *apAtom; /**< An atomic */
/* Information for a atomic */
- RwLLLink lWorldSectorInAtomic; /* Atomic sectors HOLDING this atomic */
- RpWorldSector *worldSector;
+ RwLLLink lWorldSectorInAtomic; /**< Atomic sectors HOLDING this atomic */
+ RpWorldSector *worldSector; /**< A world sector */
};
typedef struct RpClumpChunkInfo RpClumpChunkInfo;
typedef struct RpClumpChunkInfo _rpClump;
typedef struct RpClumpChunkInfo33000 _rpClump33000;
+#if (!defined(DOXYGEN))
struct RpClumpChunkInfo
{
RwInt32 numAtomics;
@@ -2398,6 +2419,7 @@ struct RpClumpChunkInfo33000
{
RwInt32 numAtomics;
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
<macro/inline functionality
@@ -2608,6 +2630,12 @@ extern "C"
#endif /* __cplusplus */
+extern void
+RpAtomicSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+extern void
+RpClumpSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
/* Macro version of RpAtomicSetRenderCallBack needs this */
extern RpAtomic *
AtomicDefaultRenderCallBack(RpAtomic * atomic);
@@ -2918,7 +2946,7 @@ enum RpWorldPrivateFlag
typedef enum RpWorldPrivateFlag RpWorldPrivateFlag;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpworldsub
* The bit-field type \ref RpWorldFlag specifies the options available
* for creating the static geometry component of a world (see API function \ref RpWorldSetFlags):
*/
@@ -3027,7 +3055,7 @@ typedef enum RpWorldFlag RpWorldFlag;
/**
- * \ingroup rpworlddatatypes
+ * \ingroup rpworldsub
* \ref RpWorldRenderOrder
* represents the options available for
* the rendering order of world sectors in the camera's view frustum (see
@@ -3043,25 +3071,25 @@ enum RpWorldRenderOrder
typedef enum RpWorldRenderOrder RpWorldRenderOrder;
/**
- * \ingroup rpworlddatatypes
- * \typedef RpWorldSectorCallBackRender
+ * \ingroup rpworldsector
* \ref RpWorldSectorCallBackRender represents the function called from
* \ref RpWorldSectorRender when the specified world sector lies inside the
* current camera's view frustum. The default callback initiates execution of
* the world sector rendering pipeline. This function should return a pointer
* to the world sector to indicate success
*
+ * \param worldSector Pointer to the world sector to be
+ * rendered
+ *
* \return Pointer to the world sector.
*
- * \param worldSector Pointer to the world sector to be
- * rendered
*/
typedef RpWorldSector *(*RpWorldSectorCallBackRender) (RpWorldSector *
worldSector);
/**
- * \ingroup rpworlddatatypes
- * \typedef RpWorld
+ * \ingroup rpworldsub
+ * \struct RpWorld
* World object. This should be considered an opaque type.
* Use the RpWorld API functions to access.
*/
@@ -3104,9 +3132,6 @@ struct RpWorld
/* Bounding box around the whole world */
RwBBox boundingBox;
- /* Surface properties */
- RwSurfaceProperties surfaceProps;
-
/* The callbacks functions */
RpWorldSectorCallBackRender renderCallBack;
@@ -3191,13 +3216,6 @@ extern RwBool RpWorldDestroy(RpWorld * world);
extern RpWorld *RpWorldCreate(RwBBox * boundingBox);
extern RwBool RpWorldInstance(RpWorld *world);
-/* Getting/setting */
-extern RpWorld *_rpWorldSetSurfaceProperties(RpWorld * world,
- const RwSurfaceProperties
- * surface);
-extern const RwSurfaceProperties *
- _rpWorldGetSurfaceProperties(const RpWorld *world);
-
/* Sector callbacks */
extern RpWorld *RpWorldSetSectorRenderCallBack(RpWorld * world,
RpWorldSectorCallBackRender
@@ -3260,12 +3278,6 @@ extern RwUInt32 RpWorldGetFlags(const RpWorld *world);
}
#endif /* __cplusplus */
-#define RpWorldSetSurfaceProperties(_world, _surface) \
- _rpWorldSetSurfaceProperties(_world, _surface)
-
-#define RpWorldGetSurfaceProperties(_world) \
- _rpWorldGetSurfaceProperties(_world)
-
#define rpWorldFindBBox(_world, _boundingBox) \
_rpWorldFindBBox(_world, _boundingBox)
@@ -3292,7 +3304,7 @@ extern RwUInt32 RpWorldGetFlags(const RpWorld *world);
typedef struct RxD3D8ResEntryHeader RxD3D8ResEntryHeader;
/**
- * \ingroup rpworldd3d8
+ * \ingroup worldextensionsd3d8
* \struct RxD3D8ResEntryHeader
* This structure contains D3D8 resource specific components.
*/
@@ -3305,7 +3317,7 @@ struct RxD3D8ResEntryHeader
/* This is what I keep in memory as part of the instance data setup */
typedef struct RxD3D8InstanceData RxD3D8InstanceData;
/**
- * \ingroup rpworldd3d8
+ * \ingroup worldextensionsd3d8
* \struct RxD3D8InstanceData
* This structure contains D3D8 resource specific components.
*/
@@ -3337,7 +3349,7 @@ struct RxD3D8InstanceData
};
/**
- * \ingroup rpworldd3d8
+ * \ingroup worldextensionsd3d8
* \ref RxD3D8AllInOneInstanceCallBack callback function.
*
* \param object Pointer to the object.
@@ -3354,7 +3366,7 @@ typedef RwBool (*RxD3D8AllInOneInstanceCallBack)(void *object,
RwBool reinstance);
/**
- * \ingroup rpworldd3d8
+ * \ingroup worldextensionsd3d8
* \ref RxD3D8AllInOneReinstanceCallBack callback function.
*
* \param object Pointer to the object.
@@ -3373,7 +3385,7 @@ typedef RwBool (*RxD3D8AllInOneReinstanceCallBack)(void *object,
RxD3D8AllInOneInstanceCallBack instanceCallback);
/**
- * \ingroup rpworldd3d8
+ * \ingroup worldextensionsd3d8
* \ref RxD3D8AllInOneLightingCallBack callback function.
*
* \param object Void pointer to the object.
@@ -3386,7 +3398,7 @@ typedef RwBool (*RxD3D8AllInOneReinstanceCallBack)(void *object,
typedef void (*RxD3D8AllInOneLightingCallBack)(void *object);
/**
- * \ingroup rpworldd3d8
+ * \ingroup worldextensionsd3d8
* \ref RxD3D8AllInOneRenderCallBack callback function.
*
* \param repEntry Pointer to a resource entry.
@@ -3443,9 +3455,6 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node);
/*--- Automatically derived from: C:/daily/rwsdk/world/pipe/p2/bapipew.h ---*/
-#define RpWorldGetGenericSectorPipelineMacro() \
- (RXPIPELINEGLOBAL(genericWorldSectorPipeline))
-
#define RpWorldGetDefaultSectorPipelineMacro() \
(RXPIPELINEGLOBAL(currentWorldSectorPipeline))
@@ -3461,9 +3470,6 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node);
#define RpWorldSectorGetPipelineMacro(_sector, _pipeline) \
( (*(_pipeline) = (_sector)->pipeline), _sector )
-#define RpAtomicGetGenericPipelineMacro() \
- (RXPIPELINEGLOBAL(genericAtomicPipeline))
-
#define RpAtomicGetDefaultPipelineMacro() \
(RXPIPELINEGLOBAL(currentAtomicPipeline))
@@ -3473,9 +3479,6 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node);
#define RpAtomicGetPipelineMacro(_atomic, _pipeline) \
( (*(_pipeline) = (_atomic)->pipeline), _atomic )
-#define RpMaterialGetGenericPipelineMacro() \
- (RXPIPELINEGLOBAL(genericMaterialPipeline))
-
#define RpMaterialGetDefaultPipelineMacro() \
(RXPIPELINEGLOBAL(currentMaterialPipeline))
@@ -3488,19 +3491,16 @@ RxD3D8AllInOneGetRenderCallBack(RxPipelineNode *node);
#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE))
-#define RpWorldGetGenericSectorPipeline RpWorldGetGenericSectorPipelineMacro
#define RpWorldGetDefaultSectorPipeline RpWorldGetDefaultSectorPipelineMacro
#define RpWorldSetSectorPipeline RpWorldSetSectorPipelineMacro
#define RpWorldGetSectorPipeline RpWorldGetSectorPipelineMacro
#define RpWorldSectorSetPipeline RpWorldSectorSetPipelineMacro
#define RpWorldSectorGetPipeline RpWorldSectorGetPipelineMacro
-#define RpAtomicGetGenericPipeline RpAtomicGetGenericPipelineMacro
#define RpAtomicGetDefaultPipeline RpAtomicGetDefaultPipelineMacro
#define RpAtomicSetPipeline RpAtomicSetPipelineMacro
#define RpAtomicGetPipeline RpAtomicGetPipelineMacro
-#define RpMaterialGetGenericPipeline RpMaterialGetGenericPipelineMacro
#define RpMaterialGetDefaultPipeline RpMaterialGetDefaultPipelineMacro
#define RpMaterialSetPipeline RpMaterialSetPipelineMacro
#define RpMaterialGetPipeline RpMaterialGetPipelineMacro
@@ -3556,7 +3556,6 @@ extern RpGeometry *RpGeometrySortByMaterial(const RpGeometry * geometry,
#endif /* __cplusplus */
/* LEGACY-SUPPORT macros */
-#define RpWorldGetGenericSectorInstancePipeline RpWorldGetGenericSectorPipeline
#define RpWorldSetDefaultSectorInstancePipeline RpWorldSetDefaultSectorPipeline
#define RpWorldGetDefaultSectorInstancePipeline RpWorldGetDefaultSectorPipeline
#define RpWorldSetSectorInstancePipeline RpWorldSetSectorPipeline
@@ -3564,13 +3563,11 @@ extern RpGeometry *RpGeometrySortByMaterial(const RpGeometry * geometry,
#define RpWorldSectorSetInstancePipeline RpWorldSectorSetPipeline
#define RpWorldSectorGetInstancePipeline RpWorldSectorGetPipeline
-#define RpAtomicGetGenericInstancePipeline RpAtomicGetGenericPipeline
#define RpAtomicGetDefaultInstancePipeline RpAtomicGetDefaultPipeline
#define RpAtomicSetDefaultInstancePipeline RpAtomicSetDefaultPipeline
#define RpAtomicSetInstancePipeline RpAtomicSetPipeline
#define RpAtomicGetInstancePipeline RpAtomicGetPipeline
-#define RpMaterialGetGenericRenderPipeline RpMaterialGetGenericPipeline
#define RpMaterialSetDefaultRenderPipeline RpMaterialSetDefaultPipeline
#define RpMaterialGetDefaultRenderPipeline RpMaterialGetDefaultPipeline
#define RpMaterialSetRenderPipeline RpMaterialSetPipeline
@@ -3587,6 +3584,9 @@ extern "C"
{
#endif /* __cplusplus */
+extern void RpTieSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+extern void RpLightTieSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
/* Adding and removing cameras to/from the world */
extern RpWorld *RpWorldRemoveCamera(RpWorld *world, RwCamera *camera);
extern RpWorld *RpWorldAddCamera(RpWorld *world, RwCamera *camera);
@@ -3648,6 +3648,7 @@ extern RpWorldSector *RpWorldSectorForAllLights(RpWorldSector *sector,
typedef struct RpWorldChunkInfoSector RpWorldSectorChunkInfo;
typedef struct RpWorldChunkInfoSector _rpWorldSector;
+#if (!defined(DOXYGEN))
struct RpWorldChunkInfoSector
{
RwInt32 matListWindowBase;
@@ -3655,10 +3656,11 @@ struct RpWorldChunkInfoSector
RwInt32 numVertices;
RwV3d inf;
RwV3d sup;
- RwBool collSectorPresent;
+ RwBool collSectorPresent; /* unused but retains same struct size */
RwBool unused;
};
+
typedef struct RpPlaneSectorChunkInfo RpPlaneSectorChunkInfo;
typedef struct RpPlaneSectorChunkInfo _rpPlaneSector;
@@ -3681,6 +3683,26 @@ struct RpWorldChunkInfo
RwV3d invWorldOrigin;
+ RwInt32 numPolygons;
+ RwInt32 numVertices;
+ RwInt32 numPlaneSectors;
+ RwInt32 numWorldSectors;
+ RwInt32 colSectorSize;
+
+ RwInt32 format; /* Flags about the world */
+
+ /* Added in 34003 */
+ RwBBox boundingBox;
+};
+
+typedef struct rpWorldChunkInfo34000 rpWorldChunkInfo34000;
+
+struct rpWorldChunkInfo34000
+{
+ RwBool rootIsWorldSector;
+
+ RwV3d invWorldOrigin;
+
RwSurfaceProperties surfaceProps;
RwInt32 numPolygons;
@@ -3691,6 +3713,7 @@ struct RpWorldChunkInfo
RwInt32 format; /* Flags about the world */
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
Function prototypes
diff --git a/rwsdk/include/d3d8/rt2d.h b/rwsdk/include/d3d8/rt2d.h
index 5bf1faea..0584d3a5 100644
--- a/rwsdk/include/d3d8/rt2d.h
+++ b/rwsdk/include/d3d8/rt2d.h
@@ -17,7 +17,7 @@
/**
* \defgroup rt2d Rt2d
- * \ingroup rttool
+ * \ingroup 2dtools
*
* 2D Rendering Toolkit for RenderWare.
*/
@@ -117,6 +117,7 @@
Includes
*/
+#include "rpworld.h"
#include "rt2d.rpe" /* automatically generated header file */
/****************************************************************************
@@ -132,6 +133,13 @@
#define Rt2dCTMReadMacro(_result) \
(RwMatrixCopy((_result), _rt2dCTMGet()), (_result))
+#if defined (GCN_DRVMODEL_H)
+ #define VERTEXCACHESIZE 64
+#else
+ #define VERTEXCACHESIZE 256
+#endif
+
+
/****************************************************************************
Global Types
*/
@@ -152,16 +160,21 @@ typedef struct rt2dShadeParameters rt2dShadeParameters;
* rt2dShadeParameters
* describes Shade Parameters
*/
+
+#if (!defined(DOXYGEN))
struct rt2dShadeParameters
{
RwRGBAReal col; /* col */
RwV2d uv; /* uv */
};
+#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rt2ddatatypes
- * \typedef Rt2dBrush
- * typedef for a structure describing a Brush (opaque)
+ * \struct Rt2dBrush
+ * Brush object.
+ * This should be considered an opaque type.
+ * Use Rt2dBrush API functions to access.
*/
typedef struct Rt2dBrush Rt2dBrush;
@@ -169,35 +182,37 @@ typedef struct Rt2dBrush Rt2dBrush;
* Rt2dBrush
* structure describing a Brush
*/
-#if defined (GCN_DRVMODEL_H)
- #define VERTEXCACHESIZE 64
-#else
- #define VERTEXCACHESIZE 256
-#endif
-
+#if (!defined(DOXYGEN))
struct Rt2dBrush
{
- RWIM3DVERTEX vertex[VERTEXCACHESIZE];
rt2dShadeParameters top;
rt2dShadeParameters dtop;
rt2dShadeParameters bottom;
rt2dShadeParameters dbottom;
- RwInt32 calcFields;
+ RwRGBA colorCache;
+ RwInt32 flag;
RwTexture *texture;
+ RpMaterial *material;
RwReal halfwidth;
+ RwInt32 refCount;
};
+#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rt2ddatatypes
- * \typedef Rt2dPath
- * typedef for a structure describing a Path (opaque)
+ * \struct Rt2dPath
+ * Path object.
+ * This should be considered an opaque type.
+ * Use Rt2dPath API functions to access.
*/
typedef struct Rt2dPath Rt2dPath;
/**
* \ingroup rt2ddatatypes
- * \typedef Rt2dFont
- * typedef for a structure describing a Font (opaque)
+ * \struct Rt2dFont
+ * Font object.
+ * This should be considered an opaque type.
+ * Use Rt2dFont API functions to access.
*/
typedef struct Rt2dFont Rt2dFont;
@@ -206,11 +221,6 @@ typedef struct Rt2dFont Rt2dFont;
*/
typedef struct _rt2dFontDictionaryNode _rt2dFontDictionaryNode;
-/**
- * \ingroup rt2ddatatypes
- * \typedef Rt2dBBox
- * typedef for a structure describing a Bounding Box
- */
typedef struct Rt2dBBox Rt2dBBox;
/**
@@ -228,8 +238,8 @@ struct Rt2dBBox
/**
* \ingroup rt2ddatatypes
- * \typedef Rt2dObject
- * typedef for a structure describing a 2d Object
+ * \struct Rt2dObject
+ * Structure describing a 2d Object
* This should be considered an opaque type.
* Use Rt2dObject, Rt2dScene, Rt2dShape, Rt2dPickRegion or Rt2dObjectString
* API functions to access.
@@ -246,6 +256,7 @@ typedef struct _rt2dScene _rt2dScene;
*/
typedef struct _rt2dDepthOfObject _rt2dDepthOfObject;
+#if (!defined(DOXYGEN))
/*
* typedef for a structure describing the depth of an object
*/
@@ -265,15 +276,47 @@ struct _rt2dScene
RwSList *depths; /* depths for depthsort */
RwBool isDirtyDepths; /* depthsort needs updating */
};
+#endif /* (!defined(DOXYGEN)) */
/*
* typedef for a structure describing a shape (opaque)
*/
typedef struct _rt2dShape _rt2dShape;
+#if (!defined(DOXYGEN))
+typedef struct _rt2dShapeRep _rt2dShapeRep;
+struct _rt2dShapeRep
+{
+ RwSList *nodes; /* individual stroked/filled regions of the shape */
+ RwUInt32 refCount; /* number of shapes referencing this rep */
+ RpGeometry *geometry; /* Shareable geometry */
+};
+
+extern _rt2dShapeRep *
+ _rt2dShapeRepCreate();
+
+extern RwBool
+_rt2dShapeRepDestroy(_rt2dShapeRep *);
+
+extern RwUInt32
+_rt2dShapeRepAddRef(_rt2dShapeRep *);
+
+typedef struct _rt2dSceneResourcePool _rt2dSceneResourcePool;
+struct _rt2dSceneResourcePool
+{
+ _rt2dShapeRep **shapeReps;
+ RwUInt32 numShapeReps;
+};
+
+extern RwBool
+_rt2dSceneResourcePoolFindShapeRep(const _rt2dSceneResourcePool * pool,
+ const _rt2dShapeRep * rep, RwInt32 * npIndex);
+
struct _rt2dShape
{
- RwSList *nodes; /* individual stroked/filled regions of the shape */
+ _rt2dShapeRep *rep;
+ RwRGBA *colorCache; /* Shape's color cache */
+ RpAtomic *atomic; /* Atomic repn */
};
/*
@@ -295,6 +338,7 @@ struct _rt2dPickRegion
/*
* structure describing a renderable text string
*/
+
struct _rt2dObjectString
{
RwChar *textString; /* Text string to be rendered */
@@ -303,6 +347,7 @@ struct _rt2dObjectString
RwReal height; /* Font rendering Height */
_rt2dFontDictionaryNode *font; /* Dictionary node identifying font to be used */
};
+#endif /* (!defined(DOXYGEN)) */
/*
* typedef for a renderable string
@@ -324,6 +369,7 @@ enum Rt2dObjectTypeEnum {
typedef union _rt2dObjectdata _rt2dObjectdata;
+#if (!defined(DOXYGEN))
union _rt2dObjectdata
{
_rt2dShape shape;
@@ -335,11 +381,13 @@ union _rt2dObjectdata
/*
* A base structure for forming a hierarchy of 2D shapes
*/
-#if (!defined(DOXYGEN))
-#define Rt2dObjectIsLocked 0x00000001
-#define Rt2dObjectDirtyLTM 0x00000002
-#define Rt2dObjectVisible 0x00000004
+#define Rt2dObjectIsLocked 0x00000001
+#define Rt2dObjectDirtyLTM 0x00000002
+#define Rt2dObjectVisible 0x00000004
+#define Rt2dObjectDirtyColor 0x00000008
+
+#define Rt2dObjectStringGotNoFonts 0x01000000
struct Rt2dObject
{
@@ -357,13 +405,37 @@ struct Rt2dObject
/**
* \ingroup rt2ddatatypes
- * \typedef Rt2dObjectCallBack
- * typedef for a callback on an object
+ * \ref Rt2dObjectCallBack
+ * typedef for a callback on an object in a collection
+ *
+ * \param object is a specific object
+ * \param parent is the containing scene
+ * \param data is user data
+ *
+ * \return return value is ignored
*/
typedef Rt2dObject *(* Rt2dObjectCallBack)(Rt2dObject *object, Rt2dObject *parent, void *data);
/**
* \ingroup rt2ddatatypes
+ * \ref Rt2dFontCallBackRead
+ * Rt2dFontCallBackRead represents the function used by Rt2dFontRead to read
+ * the specified font from a disk file. This function should return a
+ * pointer to the font to indicate success. The returned font is owned by
+ * the Rt2d internal font dictionary, and is destroyed on calling
+ * \ref Rt2dClose
+ *
+ * \param name is the name of the font to read
+ *
+ * \return return the font if successful, NULL otherwise
+ *
+ * \see Rt2dFontSetReadCallBack
+ * \see Rt2dFontGetReadCallBack
+ */
+typedef Rt2dFont*(* Rt2dFontCallBackRead)(const RwChar *name);
+
+/**
+ * \ingroup rt2ddatatypes
* \ref Rt2dJustificationType
* enumeration describing Justification
*/
@@ -381,6 +453,20 @@ enum Rt2dJustificationType
*/
typedef enum Rt2dJustificationType Rt2dJustificationType;
+/**
+ * \ingroup rt2ddatatypes
+ * \ref Rt2dShapeNodeFlag
+ * Passed to \ref Rt2dShapeAddNode, these flags specify
+ * the type and properties of the path.
+ */
+enum Rt2dShapeNodeFlag
+{
+ rt2dSHAPENODEFLAGNONE = 0x0000,
+ rt2dSHAPENODEFLAGSOLID = 0x0001, /**< Shape's node is a solid, not outline */
+ rt2dSHAPENODEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT /* Ensure sizeof(enum) == sizeof(RwInt32) */
+};
+
+
#if (! ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ))
#define Rt2dBrushSetWidth(_brush, _width) \
@@ -397,7 +483,20 @@ typedef enum Rt2dJustificationType Rt2dJustificationType;
/****************************************************************************
Function prototypes
*/
+extern void
+Rt2dBrushSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+extern void
+Rt2dFontSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+extern void
+Rt2dFontDictNodeSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+extern void
+Rt2dObjectSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+extern void
+Rt2dPathSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
/*
* INITIALIZE
@@ -407,6 +506,13 @@ Rt2dOpen(RwCamera *cam);
extern void
Rt2dClose(void);
+
+extern void
+Rt2dTriVertSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+extern void
+Rt2dTriPolySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
/*
* PATHS
*/
@@ -518,6 +624,12 @@ Rt2dFontSetPath(const RwChar *path);
extern Rt2dFont *
Rt2dFontRead(const RwChar *name);
+extern RwBool
+Rt2dFontSetReadCallBack(Rt2dFontCallBackRead fpCallBack);
+
+extern Rt2dFontCallBackRead
+Rt2dFontGetReadCallBack (void);
+
extern RwUInt32
_rt2dFontStreamGetSize(Rt2dFont *font);
@@ -695,6 +807,10 @@ Rt2dObjectIsObjectString(Rt2dObject *object);
extern Rt2dObject *
Rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
+/* in-place dst version, destruction not req */
+extern Rt2dObject *
+_rt2dObjectCopy(Rt2dObject *dst, Rt2dObject *src);
+
/*
* HIERARCHICAL SCENE FUNCTIONS - SCENE
*/
@@ -766,14 +882,8 @@ Rt2dShapeCreate(void);
extern RwBool
Rt2dShapeDestroy(Rt2dObject * shape);
-extern Rt2dBrush *
-Rt2dShapeGetNewBrush(Rt2dObject *shape);
-
-extern Rt2dPath *
-Rt2dShapeGetNewPath(Rt2dObject *shape);
-
extern Rt2dObject *
-Rt2dShapeAddNode(Rt2dObject *shape, Rt2dPath *path, Rt2dBrush *fill, Rt2dBrush *stroke );
+Rt2dShapeAddNode(Rt2dObject *shape, RwUInt32 flag, Rt2dPath *path, Rt2dBrush *brush );
extern RwInt32
Rt2dShapeGetNodeCount(Rt2dObject *shape);
@@ -792,9 +902,15 @@ Rt2dShapeRender(Rt2dObject *object);
extern Rt2dObject *
Rt2dShapeMorph(Rt2dObject *result,
- Rt2dObject *source,
- Rt2dObject *destination,
- RwReal alpha);
+ Rt2dObject *source,
+ Rt2dObject *destination,
+ RwReal alpha);
+
+extern Rt2dObject *
+Rt2dShapeLock(Rt2dObject * shape);
+
+extern Rt2dObject *
+Rt2dShapeUnlock(Rt2dObject * shape);
/*
* HIERARCHICAL SCENE FUNCTIONS - PICK REGION
@@ -895,6 +1011,7 @@ Rt2dCTMRead(RwMatrix * result);
#endif /* ( defined(RWDEBUG) || defined(RWSUPPRESSINLINE) ) */
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/rwsdk/include/d3d8/rt2d.rpe b/rwsdk/include/d3d8/rt2d.rpe
index 1f9f8881..b18db155 100644
--- a/rwsdk/include/d3d8/rt2d.rpe
+++ b/rwsdk/include/d3d8/rt2d.rpe
@@ -150,476 +150,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_Criterion2D
{
+E_RW_FONTNOTFOUND,
e_rwdb_Criterion2DLAST = RWFORCEENUMSIZEINT
};
diff --git a/rwsdk/include/d3d8/rt2danim.h b/rwsdk/include/d3d8/rt2danim.h
index cd593a8e..996262af 100644
--- a/rwsdk/include/d3d8/rt2danim.h
+++ b/rwsdk/include/d3d8/rt2danim.h
@@ -10,8 +10,8 @@
#define RT2DANIM_H
/**
- * \defgroup rt2danim Rt2dAnim
- * \ingroup rttool
+ * \defgroup rt2danim Rt2dAnim (inc. Maestro)
+ * \ingroup 2dtools
*
* A toolkit to coordinate the display, storage and manipulation of 2D
* animations.
@@ -166,101 +166,132 @@ typedef enum Rt2dStringLabelType Rt2dStringLabelType;
/**
* \ingroup rt2danimsub
- * \typedef Rt2dAnimProps
- * typedef for a structure describing the current state of a scene (opaque)
+ * \struct Rt2dAnimProps
+ * Structure describing the current state of a scene.
+ * This should be considered an opaque type. Use the
+ * Rt2dAnim API functions to access.
*/
typedef struct Rt2dAnimProps Rt2dAnimProps;
/**
* \ingroup rt2danimsub
- * \typedef Rt2dKeyFrameList
- * typedef for a structure describing a list of keyframes
+ * \struct Rt2dKeyFrameList
+ * Structure describing an entire list of keyframes
+ * This should be considered an opaque type. Use the
+ * Rt2dKeyFrameList API functions to access.
*/
typedef struct Rt2dKeyFrameList Rt2dKeyFrameList;
/**
* \ingroup rt2danimsub
- * \typedef Rt2dAnimObjectUpdate
- * typedef for a structure describing a set of changes to a 2d object (opaque)
+ * \struct Rt2dKeyFrameSet
+ * structure describing a set of keyframe actions to be applied to a 2D object.
+ * This should be considered an opaque type. Use the
+ * Rt2dAnim API functions to access.
*/
-typedef struct Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate;
+typedef struct Rt2dKeyFrameSet Rt2dKeyFrameSet;
/**
* \ingroup rt2danimsub
- * \typedef Rt2dKeyFrameTransform
- * typedef for a structure describing a transform change to a 2d object (opaque)
+ * \struct Rt2dAnimObjectUpdate
+ * Structure describing an unoptimized update to an object
+ * This should be considered an opaque type. Use the
+ * Rt2dAnim API functions to access.
*/
-typedef struct Rt2dKeyFrameTransform Rt2dKeyFrameTransform;
+typedef struct Rt2dAnimObjectUpdate Rt2dAnimObjectUpdate;
/**
* \ingroup rt2danimsub
- * \typedef Rt2dKeyFrameColor
- * typedef for a structure describing a color change to a 2d object (opaque)
+ * \struct Rt2dKeyFrameTransform
+ * Structure describing a transform change to a 2d object.
+ * This should be considered an opaque type. Use the
+ * Rt2dAnim API functions to access.
+ */
+typedef struct Rt2dKeyFrameTransform Rt2dKeyFrameTransform;
+
+/*
+ * Typedef for struct Rt2dKeyFrameColor describing a color
+ * change to a 2d object.
*/
typedef struct Rt2dKeyFrameColor Rt2dKeyFrameColor;
-/**
- * \ingroup rt2danimsub
- * \typedef Rt2dKeyFrameShow
- * typedef for a structure describing a displayable or depth change to a 2d object (opaque)
+/*
+ * Structure describing a displayable or depth change to a 2d object.
*/
typedef struct Rt2dKeyFrameShow Rt2dKeyFrameShow;
-/**
- * \ingroup rt2danimsub
- * \typedef Rt2dKeyFrameMorph
- * typedef for a structure describing a morph change to a 2d object (opaque)
+/*
+ * Structure describing a morph change to a 2d object.
*/
typedef struct Rt2dKeyFrameMorph Rt2dKeyFrameMorph;
/**
* \ingroup rt2danimsub
- * \typedef Rt2dAnim
- * typedef for a structure describing a 2d animation (opaque)
+ * \struct Rt2dAnim
+ * Structure describing a 2d animation.
+ * This should be considered an opaque type. Use the
+ * Rt2dAnim API functions to access.
*/
typedef struct Rt2dAnim Rt2dAnim;
/**
* \ingroup rt2dbutton
- * \typedef Rt2dButton
- * typedef for a structure describing a button (opaque)
+ * \struct Rt2dButton
+ * Structure describing a button.
+ * This should be considered an opaque type. Use the
+ * Rt2dButton API functions to access.
*/
typedef struct Rt2dButton Rt2dButton;
/**
* \ingroup rt2dcel
- * \typedef Rt2dCel
- * typedef for a structure describing a cel (opaque)
+ * \struct Rt2dCel
+ * Structure describing a cel.
+ * This should be considered an opaque type. Use the
+ * Rt2dCel API functions to access.
*/
typedef struct Rt2dCel Rt2dCel;
/**
* \ingroup rt2dcel
- * \typedef Rt2dCelList
- * typedef for a structure describing a cel list (opaque)
+ * \struct Rt2dCelList
+ * Structure describing a cel list.
+ * This should be considered an opaque type. Use the
+ * Rt2dCel API functions to access.
*/
typedef struct Rt2dCelList Rt2dCelList;
/**
* \ingroup rt2dmaestro
- * \typedef Rt2dMaestro
- * typedef for a structure describing a maestro (opaque)
+ * \struct Rt2dMaestro
+ * Structure describing a maestro.
+ * This should be considered an opaque type. Use the
+ * Rt2dMaestro API functions to access.
*/
typedef struct Rt2dMaestro Rt2dMaestro;
-/**
- * \ingroup rt2dmessage
- * \typedef Rt2dMessage
- * typedef for a structure describing a message (opaque)
+/*
+ * Structure describing a message.
*/
typedef struct Rt2dMessage Rt2dMessage;
+/**
+ * \ingroup rt2dmessage
+ * \struct Rt2dMessageList
+ * Structure describing a message.
+ * This should be considered an opaque type. Use the
+ * Rt2dMessage API functions to access.
+ */
typedef struct Rt2dMessageList Rt2dMessageList;
/**
* \ingroup rt2dstringlabel
- * \typedef Rt2dStringLabel
- * typedef for a structure describing a string label (opaque)
+ * \struct Rt2dStringLabel
+ * Structure used to store and access named data, either internal or user.
+ * A type and a name may be used to access internal and user data.
+ *
+ * This should be considered an opaque type. Use the
+ * Rt2dStringLabel API functions to access.
*/
typedef struct Rt2dStringLabel Rt2dStringLabel;
@@ -277,7 +308,8 @@ struct Rt2dKeyFrameTransform
/**
* \ingroup rt2danimsub
* \struct Rt2dKeyFrameColor
- * structure describing a color setting action
+ * Structure describing a color
+ * change to a 2d object.
*/
struct Rt2dKeyFrameColor
{
@@ -287,7 +319,7 @@ struct Rt2dKeyFrameColor
/**
* \ingroup rt2danimsub
* \struct Rt2dKeyFrameShow
- * structure describing a show/hide action
+ * Structure describing a show/hide change and a depth change to a 2d object.
*/
struct Rt2dKeyFrameShow
{
@@ -299,7 +331,7 @@ struct Rt2dKeyFrameShow
/**
* \ingroup rt2danimsub
* \struct Rt2dKeyFrameMorph
- * structure describing a morph action
+ * Structure describing a morph change to a 2d object.
*/
struct Rt2dKeyFrameMorph
{
@@ -355,69 +387,73 @@ MACRO_START \
} \
MACRO_STOP
-/**
- * \ingroup rt2dstringlabel
- * \struct Rt2dStringLabel
- * structure containing label information. The enitityType identifies the type
+/*
+ * structure containing label information. The entityType identifies the type
* of the label. The label's name is stored as an index
* in common storage area. The entityType and name of the label are used as keys
* during a search. Additional internal and user data can be stored with the
* label.
*/
+
+#if (!defined(DOXYGEN))
struct Rt2dStringLabel
{
- RwUInt32 entityType; /**< type of the label
- (\ref Rt2dStringLabelType) */
- RwInt32 nameIndex; /**< index of name in internal data
+ RwUInt32 entityType; /* type of the label
+ (see Rt2dStringLabelType) */
+ RwInt32 nameIndex; /* index of name in internal data
area */
- void *internalData; /**< internal data */
- void *userData; /**< customizable data */
+ void *internalData; /* internal data */
+ void *userData; /* customizable data */
};
+#endif /* (!defined(DOXYGEN)) */
+
#define _rt2dStringLabelGetStringLabelTypeMacro(_strLabel) \
- ((_strLabel)->entityType);
+ ((_strLabel)->entityType)
#define _rt2dStringLabelSetStringLabelTypeMacro(_strLabel, _entityType) \
- ((_strLabel)->entityType = (_entityType));
+ ((_strLabel)->entityType = (_entityType))
#define _rt2dStringLabelGetNameIndexMacro(_strLabel) \
- ((_strLabel)->nameIndex);
+ ((_strLabel)->nameIndex)
#define _rt2dStringLabelSetNameIndexMacro(_strLabel, _index) \
- ((_strLabel)->nameIndex = (_index));
+ ((_strLabel)->nameIndex = (_index))
#define _rt2dStringLabelGetInternalDataMacro(_strLabel) \
- ((_strLabel)->internalData);
+ ((_strLabel)->internalData)
#define _rt2dStringLabelSetInternalDataMacro(_strLabel, _internalData) \
- ((_strLabel)->internalData = (_internalData));
+ ((_strLabel)->internalData = (_internalData))
#define _rt2dStringLabelGetUserDataMacro(_strLabel) \
- ((_strLabel)->userData);
+ ((_strLabel)->userData)
#define _rt2dStringLabelSetUserDataMacro(_strLabel, _userData) \
- ((_strLabel)->userData = (_userData));
+ ((_strLabel)->userData = (_userData))
-/**
- * \ingroup rt2dcel
- * \struct Rt2dCel
+/*
* structure containing cel information. The name of the cel is stored as an
* index into a label table. The buttons in the cel are stored as indices. These
- * reference a list of buttons held by the cel's parent maestro. Any messages
+ * reference a list of buttons held by the cel's parent maestro. Any messages
* to be process when the cel is active is stored as index into the parent's
* maestro's message storage area.
*/
+
+#if (!defined(DOXYGEN))
struct Rt2dCel
{
- RwInt32 strLabelIndex; /**< Frame label */
- RwInt32 celIndex; /**< Frame number */
- RwSList *buttonIndices; /**< List of buttons active in
- this frame */
- RwInt32 messageListIndex; /**< Messages to be posted after
- displaying this frame */
+ RwInt32 strLabelIndex; /* Frame label */
+ RwInt32 celIndex; /* Frame number */
+ RwSList *buttonIndices; /* List of buttons active in
+ this frame */
+ RwInt32 messageListIndex; /* Messages to be posted after
+ displaying this frame */
};
+#endif /* (!defined(DOXYGEN)) */
+
#define _rt2dCelGetStringLabelIndexMacro(_cel) \
((_cel)->strLabelIndex);
@@ -443,14 +479,16 @@ typedef Rt2dAnim *(*Rt2dAnimCallBack)(Rt2dAnim *object,
void *data);
/**
* \ingroup rt2danimsub
- * \typedef Rt2dKeyFrameListCallBack
+ * \ref Rt2dKeyFrameListCallBack
* This typedef defines a callback function to apply to a frame list.
*
- * \param anim Pointer to the animation
- * \param props Pointer to the props that the animation acts upon
- * \param keyframeList The key frame list
+ * \param anim Pointer to the animation
+ * \param props Pointer to the props that the animation acts upon
+ * \param keyframeList The key frame list
* \param keyframeListTime The key frame list time
- * \param data User defined data
+ * \param data User defined data
+ *
+ * \return return value is ignored
*/
typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)(
Rt2dAnim *anim,
@@ -461,12 +499,14 @@ typedef Rt2dKeyFrameList *(Rt2dKeyFrameListCallBack)(
/**
* \ingroup rt2danimsub
- * \typedef Rt2dAnimOnEndReachedCallBack
+ * \ref Rt2dAnimOnEndReachedCallBack
* This typedef defines a callback function called at the end of an animation.
*
- * \param anim Pointer to the animation ending
- * \param props Pointer to the props that the animation acts upon
+ * \param anim Pointer to the animation ending
+ * \param props Pointer to the props that the animation acts upon
* \param remainingDeltaTime Remaining time
+ *
+ * \return return value is ignored
*/
typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim,
Rt2dAnimProps *props,
@@ -474,14 +514,14 @@ typedef Rt2dAnim *(*Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim,
/**
* \ingroup rt2dmaestro
- * \typedef Rt2dMaestroAnimationsCallBack
+ * \ref Rt2dMaestroAnimationsCallBack
* \ref Rt2dMaestroAnimationsCallBack represents the function called from
* \ref Rt2dMaestroForAllAnimations for all animations in the maestro.
* This function
* should return the current maestro to indicate success. The callback may
* return NULL to terminate further callbacks on the maestro.
*
- * \param maestro Pointer to parent maestro.
+ * \param maestro Pointer to parent maestro.
* \param anim Pointer to the animation.
* \param props Pointer to the anim's props.
* \param pData Pointer to private data.
@@ -494,7 +534,6 @@ typedef Rt2dMaestro *(*Rt2dMaestroAnimationsCallBack)
/**
* \ingroup rt2dmessage
- * \typedef Rt2dMessageHandlerCallBack
* \ref Rt2dMessageHandlerCallBack represents the function called from
* \ref Rt2dMaestroProcessMessages for all messages in the maestro's
* process message queue. The maestro does not filter any messages. The
@@ -504,7 +543,7 @@ typedef Rt2dMaestro *(*Rt2dMaestroAnimationsCallBack)
* callback may return NULL to terminate further callbacks on the maestro.
*
* \param maestro Pointer to parent maestro.
- * \param message Pointer to the message.
+ * \param message Pointer to the message.
*
* \return Pointer to the message.
*/
@@ -531,6 +570,18 @@ typedef Rt2dMessage *
*/
/*
+ * Toolkit-level initialization / finalization
+ */
+/*
+ * INITIALIZE
+ */
+extern void
+Rt2dAnimOpen(void);
+
+extern void
+Rt2dAnimClose(void);
+
+/*
* Rt2dAnim
*/
@@ -747,7 +798,7 @@ Rt2dMaestroAddButton(Rt2dMaestro *maestro, RwInt32 strLabelIdx, RwInt32 objectId
extern Rt2dCel *
Rt2dCelCreate(Rt2dMaestro *maestro,
- RwChar *name,
+ const RwChar *name,
RwInt32 celIndex, RwInt32 messageListIndex);
extern Rt2dCelList *
@@ -966,7 +1017,7 @@ Rt2dMessageHandlerDefaultCallBack(Rt2dMaestro *maestro, Rt2dMessage *message);
*/
extern Rt2dStringLabel *
Rt2dMaestroFindStringLabel(Rt2dMaestro *maestro,
- Rt2dStringLabelType entityType, RwChar *lookupName,
+ Rt2dStringLabelType entityType, const RwChar *lookupName,
RwInt32 *index);
extern Rt2dStringLabel *
@@ -974,7 +1025,7 @@ Rt2dMaestroGetStringLabelByIndex(Rt2dMaestro *maestro, RwInt32 index);
extern Rt2dMaestro *
Rt2dMaestroAddStringLabel(Rt2dMaestro *maestro,
- Rt2dStringLabelType entityType, RwChar *name,
+ Rt2dStringLabelType entityType, const RwChar *name,
void *internalData, RwInt32 *index);
extern const RwChar *
@@ -985,28 +1036,28 @@ Rt2dMaestroGetStringLabelName(Rt2dMaestro *maestro,
#if !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE))
#define Rt2dStringLabelGetStringLabelType(_strLabel) \
- _rt2dStringLabelGetStringLabelTypeMacro((_strLabel));
+ _rt2dStringLabelGetStringLabelTypeMacro((_strLabel))
#define Rt2dStringLabelSetStringLabelType(_strLabel, _entityType) \
- _rt2dStringLabelSetStringLabelTypeMacro((_strLabel), (_entityType));
+ _rt2dStringLabelSetStringLabelTypeMacro((_strLabel), (_entityType))
#define Rt2dStringLabelGetNameIndex(_strLabel) \
- _rt2dStringLabelGetNameIndexMacro((_strLabel));
+ _rt2dStringLabelGetNameIndexMacro((_strLabel))
#define Rt2dStringLabelSetNameIndex(_strLabel, _index) \
- _rt2dStringLabelSetNameIndexMacro((_strLabel), (_index));
+ _rt2dStringLabelSetNameIndexMacro((_strLabel), (_index))
#define Rt2dStringLabelGetInternalData(_strLabel) \
- _rt2dStringLabelGetInternalDataMacro((_strLabel));
+ _rt2dStringLabelGetInternalDataMacro((_strLabel))
#define Rt2dStringLabelSetInternalData(_strLabel, _internalData) \
- _rt2dStringLabelSetInternalDataMacro((_strLabel), (_internalData));
+ _rt2dStringLabelSetInternalDataMacro((_strLabel), (_internalData))
#define Rt2dStringLabelGetUserData(_strLabel) \
- _rt2dStringLabelGetUserDataMacro((_strLabel));
+ _rt2dStringLabelGetUserDataMacro((_strLabel))
#define Rt2dStringLabelSetUserData(_strLabel, _userData) \
- _rt2dStringLabelSetUserDataMacro((_strLabel), (_userData));
+ _rt2dStringLabelSetUserDataMacro((_strLabel), (_userData))
#else /* !(defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */
diff --git a/rwsdk/include/d3d8/rt2danim.rpe b/rwsdk/include/d3d8/rt2danim.rpe
index 82a9dac9..0e61ec5c 100644
--- a/rwsdk/include/d3d8/rt2danim.rpe
+++ b/rwsdk/include/d3d8/rt2danim.rpe
@@ -150,480 +150,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-enum rwPLUGIN_ERRENUM
+enum e_rwdb_Criterion2DAnim
{
- rwPLUGIN_ERRENUMLAST = RWFORCEENUMSIZEINT
+ e_rwdb_Criterion2DAnimLAST = RWFORCEENUMSIZEINT
};
-typedef enum rwPLUGIN_ERRENUM rwPLUGIN_ERRENUM;
+typedef enum e_rwdb_Criterion2DAnim e_rwdb_Criterion2DAnim;
diff --git a/rwsdk/include/d3d8/rtbary.h b/rwsdk/include/d3d8/rtbary.h
index 61c39b07..2531914d 100644
--- a/rwsdk/include/d3d8/rtbary.h
+++ b/rwsdk/include/d3d8/rtbary.h
@@ -11,7 +11,7 @@
/**
* \defgroup rtbary RtBary
- * \ingroup rttool
+ * \ingroup mathtools
*
* Barycentric Toolkit for RenderWare.
*/
@@ -32,7 +32,7 @@
/**
* \ingroup rtbary
- * \typedef RtBaryV4d
+ * \ref RtBaryV4d
* typedef for the 4 element homogeneous row of a transform matrix mapping
* a point from Cartesian space to the barycentric space defined by a triangle.
*/
@@ -40,7 +40,7 @@ typedef RwReal RtBaryV4d[4];
/**
* \ingroup rtbary
- * \typedef RtBaryTransform
+ * \ref RtBaryTransform
* typedef for the 4x4 homogeneous transform matrix mapping a point
* from Cartesian space to the barycentric space defined by a triangle.
*/
diff --git a/rwsdk/include/d3d8/rtbary.rpe b/rwsdk/include/d3d8/rtbary.rpe
index fdfe3afe..0fec6a77 100644
--- a/rwsdk/include/d3d8/rtbary.rpe
+++ b/rwsdk/include/d3d8/rtbary.rpe
@@ -166,472 +166,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionBary
{
diff --git a/rwsdk/include/d3d8/rtbezpat.h b/rwsdk/include/d3d8/rtbezpat.h
index 8a5960cb..f25f5ce9 100644
--- a/rwsdk/include/d3d8/rtbezpat.h
+++ b/rwsdk/include/d3d8/rtbezpat.h
@@ -8,17 +8,12 @@
/**
* \defgroup rtbezpatch RtBezPat
- * \ingroup rttool
+ * \ingroup mathtools
*
* The Bezier Patch Toolkit is a group of functions that support the way
* RenderWare processes patches.
*/
-/**
- * \ingroup rtbezpatch
- * \typedef RtBezierV4d
- * typedef for struct RtBezierV4d.
- */
typedef struct RtBezierV4d RtBezierV4d;
/**
@@ -42,7 +37,7 @@ struct RtBezierV4d
/**
* \ingroup rtbezpatch
- * \typedef RtBezierRow
+ * \ref RtBezierRow
* typedef for a row of vectors.
* RtBezierRow is an array of 4 vectors
*/
@@ -50,7 +45,7 @@ typedef RtBezierV4d RtBezierRow[4];
/**
* \ingroup rtbezpatch
- * \typedef RtBezierMatrix
+ * \ref RtBezierMatrix
* typedef for a matrix of 4*4 vectors.
* RtBezierMatrix is an array of 4 rows.
*/
diff --git a/rwsdk/include/d3d8/rtbezpat.rpe b/rwsdk/include/d3d8/rtbezpat.rpe
index e49b65b4..0f6dc700 100644
--- a/rwsdk/include/d3d8/rtbezpat.rpe
+++ b/rwsdk/include/d3d8/rtbezpat.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionBEZPATCH
{
diff --git a/rwsdk/include/d3d8/rtbmp.h b/rwsdk/include/d3d8/rtbmp.h
index 37b5c97b..c3bb5c95 100644
--- a/rwsdk/include/d3d8/rtbmp.h
+++ b/rwsdk/include/d3d8/rtbmp.h
@@ -12,7 +12,7 @@
/**
* \defgroup rtbmp RtBMP
- * \ingroup rttool
+ * \ingroup imageconversiontools
*
* BMP Image Format Toolkit for RenderWare.
*
diff --git a/rwsdk/include/d3d8/rtbmp.rpe b/rwsdk/include/d3d8/rtbmp.rpe
index 29dad089..37c546f9 100644
--- a/rwsdk/include/d3d8/rtbmp.rpe
+++ b/rwsdk/include/d3d8/rtbmp.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionBMP
{
diff --git a/rwsdk/include/d3d8/rtcharse.h b/rwsdk/include/d3d8/rtcharse.h
index 4fdc2568..6c7a3902 100644
--- a/rwsdk/include/d3d8/rtcharse.h
+++ b/rwsdk/include/d3d8/rtcharse.h
@@ -16,7 +16,7 @@
/**
* \defgroup rtcharset RtCharset
- * \ingroup rttool
+ * \ingroup 2dtools
*
* Character Set/Foot Toolkit for RenderWare.
*/
@@ -61,7 +61,7 @@ struct RtCharsetDesc
/**
* \ingroup rtcharset
- * \typedef RtCharset
+ * \ref RtCharset
* typedef for a structure defining a character set (opaque).
* \see RtCharsetCreate
*/
diff --git a/rwsdk/include/d3d8/rtcharse.rpe b/rwsdk/include/d3d8/rtcharse.rpe
index 39c37312..30c5ff4d 100644
--- a/rwsdk/include/d3d8/rtcharse.rpe
+++ b/rwsdk/include/d3d8/rtcharse.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionCharset
{
diff --git a/rwsdk/include/d3d8/rtimport.h b/rwsdk/include/d3d8/rtimport.h
index cf4e6283..2cc6383b 100644
--- a/rwsdk/include/d3d8/rtimport.h
+++ b/rwsdk/include/d3d8/rtimport.h
@@ -10,15 +10,15 @@
#define RTIMPORT_H
/**
- * \defgroup rtimport RtWorldImport
- * \ingroup rttool
+ * \defgroup rtworldimport RtWorldImport
+ * \ingroup basicgeometry
*
- * World Import Toolkit for Renderware.
+ * World Import Toolkit for RenderWare.
*/
/**
* \defgroup selectors RtWorldImportPartitionSelectors
- * \ingroup rtimport
+ * \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionSelectors:
* Selects a good partition by calling one of the
@@ -29,7 +29,7 @@
/**
* \defgroup iterators RtWorldImportPartitionIterators
- * \ingroup rtimport
+ * \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionIterators:
* Iterates through a set of candidate partitions, possibly
@@ -39,7 +39,7 @@
/**
* \defgroup evaluators RtWorldImportPartitionEvaluators
- * \ingroup rtimport
+ * \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionEvaluators:
* Uses a combination of statistics, build sector, build status, and
@@ -51,7 +51,7 @@
/**
* \defgroup terminators RtWorldImportPartitionTerminators
- * \ingroup rtimport
+ * \ingroup rtworldimport
*
* The set of provided RtWorldImportPartitionTerminators:
* Checks given criteria about the statistics, build sector, build status, and
@@ -61,7 +61,7 @@
/**
* \defgroup kd RtWorldImportGuideKD
- * \ingroup rtimport
+ * \ingroup rtworldimport
*
* Tools to manipulate the \ref RtWorldImportGuideKDTree that is used to
* manually build the sectors of a world.
@@ -69,7 +69,7 @@
/**
* \defgroup hints RtWorldImportHints
- * \ingroup rtimport
+ * \ingroup rtworldimport
*
* Tools to aid the build process by giving hints as to what geometry should
* not be split, and what geometry makes for a good partitioning guide.
@@ -96,7 +96,7 @@
#define rtWORLDIMPORTPROGRESSBSPCOMPRESSEND 5
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \def rtWORLDIMPORTINVALIDPARTITION
*
* This value means that no partition was found, or that the partition was
@@ -104,51 +104,61 @@
*/
#define rtWORLDIMPORTINVALIDPARTITION RwRealMAXVAL
-/****************************************************************************
- Global types
- */
-
-/**
- * Internal use only
- */
-typedef union RtWorldImportVertexState RtWorldImportVertexState;
+/* maintained in Bin-tree */
+#define CONGRUENTVERTEXCHILDREN 2
+/* maintained in Quad-tree */
+#define WELDVERTEXCHILDREN 4
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportVertex
- *
- * typedef for struct \ref RtWorldImportVertex
+/****************************************************************************
+ Global types
*/
+#if (!defined(DOXYGEN))
typedef struct RtWorldImportVertex RtWorldImportVertex;
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportWeldVertex
- *
- * typedef for struct \ref RtWorldImportWeldVertex
- */
typedef struct RtWorldImportWeldVertex RtWorldImportWeldVertex;
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportBuildVertex
- *
- * typedef for struct \ref RtWorldImportBuildVertex
- */
typedef struct RtWorldImportBuildVertex RtWorldImportBuildVertex;
+/* Internal use only */
+typedef union RtWorldImportVertexState RtWorldImportVertexState;
+/* Internal use only */
+union RtWorldImportVertexState
+{
+ /* clipFlags, two types, first is based on partition only, 2nd is
+ * also based on partition, but takes overlaps into consideration. i.e.
+ * number splits is usually higher in clipFlags[0] than [1] */
+ RwInt32 clipFlags[2]; /* Internal use only */
+ RwInt32 forwardingAddress; /* Internal use only */
+ RtWorldImportVertex *vpVert; /* Internal use only */
+ RtWorldImportWeldVertex *vpWeldVert; /* Internal use only */
+ RtWorldImportBuildVertex *vpBuildVert; /* Internal use only */
+ RwSList *slist; /* Internal use only */
+};
+#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup rtimport
- * \typedef RtWorldImportBuildPolyInfo
+ * \ingroup rtworldimport
+ * \struct RtWorldImportVertex
+ * Holds data for each vertex in the import world.
*
- * typedef for struct \ref RtWorldImportBuildPolyInfo
*/
+struct RtWorldImportVertex
+{
+ RwV3d OC; /**< World space vertex position */
+ RwV3d normal; /**< World space vertex normal */
+ RwRGBA preLitCol; /**< Vertex Prelight color */
+ RwTexCoords texCoords[rwMAXTEXTURECOORDS];
+ /**< Vertex texture coordinates */
+ RtWorldImportVertexState state; /**< Internal use only */
+ RwInt32 matIndex; /**< Vertex material index */
+ void *pUserdata; /**< Pointer to unspecified per vertex user data */
+};
+
typedef struct RtWorldImportBuildPolyInfo RtWorldImportBuildPolyInfo;
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportBuildPolyInfo
*
* Information about a polygon
@@ -167,7 +177,7 @@ struct RtWorldImportBuildPolyInfo
typedef union RtWorldImportBuildVertexMode RtWorldImportBuildVertexMode;
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportBuildVertexMode
*
* Mode of the vertex.
@@ -182,7 +192,7 @@ union RtWorldImportBuildVertexMode
};
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportBuildVertex
*
* A list of polygons as a list of vertices where the end of poly boundary
@@ -198,30 +208,16 @@ struct RtWorldImportBuildVertex
/**< we store some poly info in the end marker of a boundary */
};
-
-
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportGuideKDTree
- *
- * typedef for struct \ref RtWorldImportGuideKDTree
- */
-typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
-
/* NB Merged RtWorldImportPartition with RtWorldImportBuildClipStatistics because
* there was a unique one-to-one relationship between them, and it made things easier
* just updating one stucture, without having to update both in sequence...
*/
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportBuildClipStatistics
- *
- * typedef for struct \ref RtWorldImportBuildClipStatistics
- */
+
typedef struct RtWorldImportBuildClipStatistics RtWorldImportBuildClipStatistics;
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportBuildClipStatistics
*
* Holds statistics about a partition or candidate partition during
@@ -231,15 +227,15 @@ struct RtWorldImportBuildClipStatistics
{
RwInt32 numPotentialSplit;
/**< The number of polygons split by the partition,
- * disgregarding overlaps */
+ * disregarding overlaps */
RwInt32 numPotentialLeft;
/**< The number of potential polygons and fragments on the
- * left of the partition, disgregarding overlaps */
+ * left of the partition, disregarding overlaps */
RwInt32 numPotentialRight;
/**< The number of potential polygons and fragments on the
- * right of the partition, disgregarding overlaps */
+ * right of the partition, disregarding overlaps */
RwInt32 numActualSplit;
@@ -276,15 +272,13 @@ struct RtWorldImportBuildClipStatistics
/**< The actual, relative size of the overlap on the right of the partition */
};
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportPartition
- *
- * typedef for struct \ref RtWorldImportPartition
+/*
+ * typedef for struct RtWorldImportPartition
*/
typedef struct RtWorldImportPartition RtWorldImportPartition;
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportPartition
*
* A partitioning plane.
@@ -311,8 +305,14 @@ struct RtWorldImportPartition
/**< The statistics for the partition */
};
+/*
+ * typedef for struct \ref RtWorldImportGuideKDTree
+ */
+typedef struct RtWorldImportGuideKDTree RtWorldImportGuideKDTree;
+
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportGuideKDTree
* Represents the structure of a binary tree with
* no contents per se. It is used to build a BSP in a user specified
@@ -342,6 +342,7 @@ struct RtWorldImportGuideKDTree
typedef struct _rtWorldImportGuideKDStackElement _rtWorldImportGuideKDStackElement;
+#if (!defined(DOXYGEN))
struct _rtWorldImportGuideKDStackElement
{
RwBool terminal;
@@ -357,16 +358,15 @@ struct _rtWorldImportGuideKDStack
_rtWorldImportGuideKDStackElement *current;
_rtWorldImportGuideKDStackElement *bottom;
};
+#endif /* (!defined(DOXYGEN)) */
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportBuildSector
- *
- * typedef for struct \ref RtWorldImportBuildSector
+/*
+ * typedef for struct RtWorldImportBuildSector
*/
typedef struct RtWorldImportBuildSector RtWorldImportBuildSector;
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportBuildSector
*
* Holds information about the sector that is being subdivided
@@ -401,15 +401,13 @@ struct RtWorldImportBuildSector
/**< Maximum number of materials in the in the world */
};
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportBuildStatus
- *
- * typedef for struct \ref RtWorldImportBuildStatus
+/*
+ * typedef for struct RtWorldImportBuildStatus
*/
typedef struct RtWorldImportBuildStatus RtWorldImportBuildStatus;
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportBuildStatus
* World Import Build Status Structure
* Used to store the current tree's build status
@@ -419,50 +417,41 @@ struct RtWorldImportBuildStatus
RwInt32 depth; /**< current depth in the tree */
};
-/**
- * Internal use only
- */
-union RtWorldImportVertexState
+typedef struct RwRGBAUInt32 RwRGBAUInt32;
+
+#if (!defined(DOXYGEN))
+struct RwRGBAUInt32
{
- /* clipFlags, two types, first is based on partition only, 2nd is
- * also based on partition, but takes overlaps into consideration. i.e.
- * number splits is usually higher in clipFlags[0] than [1] */
- RwInt32 clipFlags[2]; /**< Internal use only */
- RwInt32 forwardingAddress; /**< Internal use only */
- RtWorldImportVertex *vpVert; /**< Internal use only */
- RtWorldImportWeldVertex *vpWeldVert; /**< Internal use only */
- RtWorldImportBuildVertex *vpBuildVert; /**< Internal use only */
- RwSList *slist; /**< Internal use only */
+ RwUInt32 red, green, blue, alpha;
};
-/**
- * \ingroup rtimport
- * \struct RtWorldImportVertex
- * Holds data for each vertex in the import world.
- *
- */
-struct RtWorldImportVertex
+typedef struct RtWorldImportCongruentVertex RtWorldImportCongruentVertex;
+
+struct RtWorldImportCongruentVertex
{
- RwV3d OC; /**< World space vertex position */
- RwV3d normal; /**< World space vertex normal */
- RwRGBA preLitCol; /**< Vertex Prelight color */
- RwTexCoords texCoords[rwMAXTEXTURECOORDS];
- /**< Vertex texture coordinates */
- RtWorldImportVertexState state; /**< Internal use only */
- RwInt32 matIndex; /**< Vertex material index */
- void *pUserdata; /**< Pointer to unspecified per vertex user data */
+ RwInt32 destIdx;
+ RtWorldImportVertex vertex;
+ RtWorldImportVertex Mean;
+ RwRGBAUInt32 preLitMean;
+ RwInt32 refCount;
+ RtWorldImportCongruentVertex *child[CONGRUENTVERTEXCHILDREN];
};
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportTriangle
+struct RtWorldImportWeldVertex
+{
+ RtWorldImportVertex *sourcePtr;
+ RtWorldImportCongruentVertex *CongruentVertex;
+ RtWorldImportWeldVertex *child[WELDVERTEXCHILDREN];
+};
+#endif /* (!defined(DOXYGEN)) */
+
+/*
* Holds data for each triangle in the import world.
- *
- * \see RtWorldImportTriangle
*/
typedef struct RtWorldImportTriangle RtWorldImportTriangle;
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportTriangle
* Holds data for each triangle in the import world.
*
@@ -476,38 +465,69 @@ struct RtWorldImportTriangle
};
+
+
+/*
+ * typedef for struct RtWorldImportBBoxHintDesc
+ */
+typedef struct RtWorldImportBBoxHintDesc RtWorldImportBBoxHintDesc;
/**
- * \ingroup rtimport
- * \typedef RtWorldImportHints
- *
- * typedef for struct \ref RtWorldImportHints
+ * \ingroup rtworldimport
+ * \struct RtWorldImportBBoxHintDesc
+ * Bounding box hints and (priority) values used to control the world
+ * sectorization process.
+ */
+struct RtWorldImportBBoxHintDesc
+{
+ RwBBox bBox; /**< The (necessarily orthogonal) bounding box */
+ RwReal value; /**< The value or priority of the hint (highest is most important) */
+};
+
+/*
+ * typedef for struct RtWorldImportHints
*/
typedef struct RtWorldImportHints RtWorldImportHints;
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportHints
* Bounding box hints used to control the world sectorization process.
* \see RtWorldImportHintsSet
*/
struct RtWorldImportHints
{
- /** The bounding box hints */
- RwBBox *boundingBoxes;
- /** The number of bounding box hints */
- RwInt32 numBoundingBoxes;
+ RtWorldImportBBoxHintDesc *boundingBoxes; /**< The bounding box hints */
+ RwInt32 numBoundingBoxes; /**< The number of bounding box hints */
};
+
/**
- * \ingroup rtimport
- * \typedef RtWorldImportParameters
+ * \ingroup rtworldimport
+ * \ref RtWorldImportHintGroup
*
+ * An enumeration that can be passed to
+ * \ref RtWorldImportHintsSetGroup and \ref RtWorldImportHintsGetGroup to determine
+ * whether hints will contribute towards the shield hint group or partition hint group
+ */
+typedef enum
+{
+ rtWORLDIMPORTSHIELDHINT = 0,
+ rtWORLDIMPORTPARTITIONHINT,
+
+ rtWORLDIMPORTFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
+}
+RtWorldImportHintGroup;
+
+
+
+
+/*
* typedef for struct \ref RtWorldImportParameters
*/
typedef struct RtWorldImportParameters RtWorldImportParameters;
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportParameters
* Parameters used with \ref RtWorldImportCreateWorld.
* They are initialized to default values using \ref RtWorldImportParametersInit.
@@ -563,15 +583,13 @@ struct RtWorldImportParameters
/**< If TRUE the world will be checked for validity during the build process. */
};
-/**
- * \ingroup rtimport
- * \typedef RtWorldImport
- *
- * typedef for struct \ref RtWorldImport
+/*
+ * typedef for struct RtWorldImport
*/
typedef struct RtWorldImport RtWorldImport;
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImport
* World Import State Structure
*/
@@ -583,14 +601,10 @@ struct RtWorldImport
RtWorldImportTriangle *polygons; /**< Triangle array */
RwInt32 numPolygons; /**< Triangle count */
-
-
- RwSurfaceProperties surfaceProps; /**< The world's surface
- lighting properties */
};
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \ref RtWorldImportProgressCallBack is the type for the callback function supplied to
* \ref RtWorldImportSetProgressCallBack.
*
@@ -626,65 +640,102 @@ struct RtWorldImport
typedef RwBool (*RtWorldImportProgressCallBack)(RwInt32 msg, RwReal value);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportDestroyVertexUserdataCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportDestroyVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex destruction.
+ *
+ * \param pUserdata
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportDestroyVertexUserdataCallBack)(void **pUserdata);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportCloneVertexUserdataCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportCloneVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex cloning.
+ *
+ * \param pUserdataDst
+ * \param pUserdataSrc
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportCloneVertexUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportInterpVertexUserdataCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportInterpVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* vertex interpolation.
+ *
+ * \param pUserdataDst
+ * \param pUserdata1
+ * \param pUserdata2
+ * \param delta
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportInterpVertexUserdataCallBack)(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportDestroyPolygonUserdataCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportDestroyPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* polygon destruction.
+ *
+ * \param pUserdata
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportDestroyPolygonUserdataCallBack)(void **pUserdata);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportSplitPolygonUserdataCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportSplitPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* polygon division.
+ *
+ * \param pUserdataDst
+ * \param pUserdataSrc
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportSplitPolygonUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportSectorSetVertexUserdataCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportSectorSetVertexUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* the setting of the vertex user data.
+ *
+ * \param pUserdata
+ * \param sector
+ * \param index
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportSectorSetVertexUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportSectorSetPolygonUserdataCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportSectorSetPolygonUserdataCallBack
*
* A pointer to the CallBack function that will be called during
* the setting of the polygon user data.
+ *
+ * \param pUserdata
+ * \param sector
+ * \param index
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index);
@@ -692,12 +743,18 @@ typedef RwBool (*RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata
/**
- * \ingroup rtimport
- * \typedef RtWorldImportTerminationBuildCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportTerminationBuildCallBack
*
* A pointer to the function that will be called during the
* build process to determine whether the current sector should
* be subdivided further, or terminated.
+ *
+ * \param buildSector
+ * \param buildStatus
+ * \param pData
+ *
+ * \return
*/
typedef RwBool (*RtWorldImportTerminationBuildCallBack)
(RtWorldImportBuildSector *buildSector,
@@ -705,11 +762,17 @@ typedef RwBool (*RtWorldImportTerminationBuildCallBack)
void *pData);
/**
- * \ingroup rtimport
- * \typedef RtWorldImportPartitionBuildCallBack
+ * \ingroup rtworldimport
+ * \ref RtWorldImportPartitionBuildCallBack
*
* A pointer to the function that will be called during the
* build process to select a suitable sector partition.
+ *
+ * \param buildSector
+ * \param buildStatus
+ * \param partition
+ *
+ * \return
*/
typedef RwReal (*RtWorldImportPartitionBuildCallBack)
(RtWorldImportBuildSector *buildSector,
@@ -717,15 +780,13 @@ typedef RwReal (*RtWorldImportPartitionBuildCallBack)
RtWorldImportPartition *partition,
void *pData);
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportBuildCallBacks
- *
+/*
* typedef for struct \ref RtWorldImportBuildCallBacks
*/
typedef struct RtWorldImportBuildCallBacks RtWorldImportBuildCallBacks; /* MAYBE: rename to SectorCallBacks ?*/
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportBuildCallBacks
* Sectorization callbacks
*/
@@ -741,15 +802,13 @@ struct RtWorldImportBuildCallBacks
/**< Termination callback user data */
};
-/**
- * \ingroup rtimport
- * \typedef RtWorldImportUserdataCallBacks
- *
+/*
* typedef for struct \ref RtWorldImportUserdataCallBacks
*/
typedef struct RtWorldImportUserdataCallBacks RtWorldImportUserdataCallBacks;
+
/**
- * \ingroup rtimport
+ * \ingroup rtworldimport
* \struct RtWorldImportUserdataCallBacks
* Bundle of callbacks
*/
@@ -772,8 +831,8 @@ struct RtWorldImportUserdataCallBacks
};
/**
- * \ingroup rtimport
- * \typedef RtWorldImportBuildPartitionSelector
+ * \ingroup rtworldimport
+ * \ref RtWorldImportBuildPartitionSelector
*
* An enumeration that can be passed to
* \ref RtWorldImportSetStandardBuildPartitionSelector to determine
@@ -821,8 +880,6 @@ extern "C"
extern RwBool
_rtImportBuildSectorFindBBox(RtWorldImportBuildSector *buildSector, RwBBox *bbpOut);
-/* TODO: decide where these scheme functions are going and which ones are public and
- whether _rt or RT should be used */
extern void
_rtWorldImportGuideKDCopy(RtWorldImportGuideKDTree *KD, RpSector *spSector, RwInt32 depth);
extern void _rtWorldImportGuideKDStackDestroy(_rtWorldImportGuideKDStack *stack);
@@ -862,6 +919,12 @@ RtWorldImportMaterialSeparatePartitionSelector(RtWorldImportBuildSector *buildSe
RtWorldImportBuildStatus *buildStatus,
RtWorldImportPartition *partition,
void *userData);
+extern RwReal
+RtWorldImportPartitionHintPartitionSelector(RtWorldImportBuildSector *buildSector,
+ RtWorldImportBuildStatus *buildStatus,
+ RtWorldImportPartition *partition,
+ void * __RWUNUSED__ userData);
+
extern RwReal
RtWorldImportMaximumOccluderPartitionSelector(RtWorldImportBuildSector *buildSector,
@@ -1109,14 +1172,13 @@ RtWorldImportSectorAspectSizePartitionTerminator(RtWorldImportBuildSector * buil
-/* END TODO */
/* WorldImport hints */
extern void
-RtWorldImportHintsSet(RtWorldImportHints *hints);
+RtWorldImportHintsSetGroup(RtWorldImportHints *hints, RtWorldImportHintGroup group);
extern RtWorldImportHints *
-RtWorldImportHintsGet(void);
+RtWorldImportHintsGetGroup(RtWorldImportHintGroup group);
extern RtWorldImportHints *
RtWorldImportHintsCreate(void);
@@ -1175,14 +1237,6 @@ extern RwInt32 RtWorldImportGetNumTriangles(RtWorldImport * nohsworld);
extern RtWorldImportTriangle *
RtWorldImportGetTriangles(RtWorldImport * nohsworld);
-/* Surface lighting characteristics */
-extern RtWorldImport *
-RtWorldImportSetSurfaceProperties(RtWorldImport * world,
- RwSurfaceProperties *
- surface);
-
-extern RwSurfaceProperties *
-RtWorldImportGetSurfaceProperties(RtWorldImport * world);
/* Progress callbacks */
extern void
@@ -1254,6 +1308,12 @@ RtWorldImportSetStandardBuildPartitionSelector(RtWorldImportBuildPartitionSelect
#define RtWorldImportParametersInitialize(_paramsPtr) \
*(_paramsPtr) = *RtWorldImportParametersInit();
+/* Back compatibility with former hints which only permitted type zero (shield) hints... */
+#define RtWorldImportHintsSet(_hints) \
+RtWorldImportHintsSetGroup(_hints, rtWORLDIMPORTSHIELDHINT);
+
+#define RtWorldImportHintsGet() \
+RtWorldImportHintsGetGroup(rtWORLDIMPORTSHIELDHINT);
#endif /* RTIMPORT_H */
diff --git a/rwsdk/include/d3d8/rtimport.rpe b/rwsdk/include/d3d8/rtimport.rpe
index d4b7ad2b..ff8d3d5c 100644
--- a/rwsdk/include/d3d8/rtimport.rpe
+++ b/rwsdk/include/d3d8/rtimport.rpe
@@ -149,472 +149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionNoHSWorld
{
diff --git a/rwsdk/include/d3d8/rtintel.h b/rwsdk/include/d3d8/rtintel.h
deleted file mode 100644
index c11329df..00000000
--- a/rwsdk/include/d3d8/rtintel.h
+++ /dev/null
@@ -1,1206 +0,0 @@
-/**
- * Intel specific support toolkit
- */
-
-/**********************************************************************
- *
- * File : rtintel.h
- *
- * Abstract : Intel specific support/emulation
- *
- **********************************************************************
- *
- * This file is a product of Criterion Software Ltd.
- *
- * This file is provided as is with no warranties of any kind and is
- * provided without any obligation on Criterion Software Ltd. or
- * Canon Inc. to assist in its use or modification.
- *
- * Criterion Software Ltd. will not, under any
- * circumstances, be liable for any lost revenue or other damages arising
- * from the use of this file.
- *
- * Copyright (c) 1998 Criterion Software Ltd.
- * All Rights Reserved.
- *
- * RenderWare is a trademark of Canon Inc.
- *
- ************************************************************************/
-
-#ifndef RTINTEL_H
-#define RTINTEL_H
-
-/**
- * \defgroup rtintel RtIntel
- * \ingroup rttool
- *
- * Intel CPU Toolkit for RenderWare.
- */
-
-/****************************************************************************
- Include files
- */
-
-/*
- * Pick up
- * typedef struct _rwResEntryTag RwResEntry;
- * from baresour.h (internal) / rwcore.h (external)
- */
-
-/****************************************************************************
- Global Types
- */
-
-#include "rtintel.rpe" /* automatically generated header file */
-
-#if (!defined(RW_FIXED_64))
-typedef struct RwFixed64 RwFixed64;
-struct RwFixed64
-{
- RwInt32 msb;
- RwUInt32 lsb;
-};
-
-#define RW_FIXED_64
-#endif /* (!defined(RW_FIXED_64)) */
-
-#define doubleFromRwFixed64(x) \
- ( ((double)((x).msb))*((double)(1<<16))*((double)(1<<16)) \
- + ((double)((x).lsb)) )
-
-#if (!defined(RPINTELTIMEFUNCTION))
-typedef RwBool(*RtIntelTimeFunction) (void *data);
-
-#define RPINTELTIMEFUNCTION
-#endif /* (!defined(RPINTELTIMEFUNCTION)) */
-
-typedef struct RtIntelOverload RtIntelOverload;
-
-typedef void (*RwTransformFunction) (RwResEntry * repEntry);
-
-struct RtIntelOverload
-{
- rwMatrixMultFn MatrixMultiplyFunction;
- rwVectorMultFn VectorMultPointFunction;
- rwVectorMultFn VectorMultVectorFunction;
- RwTransformFunction TransformFunction;
-};
-
-#if (defined(__ICL))
-#define DEFINED__ICL " __ICL"
-#define UNDEFINED__ICL ""
-#else /* (defined(__ICL)) */
-#define DEFINED__ICL ""
-#define UNDEFINED__ICL " __ICL"
-#endif /* (defined(__ICL)) */
-
-#if (defined(_MSC_VER))
-
-# pragma comment ( user, "comment:" __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : " "DEFINED " DEFINED__ICL " ; UNDEFINED " UNDEFINED__ICL )
-/* # pragma message (__FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : " "DEFINED " DEFINED__ICL " ; UNDEFINED " UNDEFINED__ICL ) */
-/* # pragma comment ( user, "comment:" __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : " "DEFINED " DEFINED__ICL " ; UNDEFINED " UNDEFINED__ICL ) */
-#if (! (defined(__ICL) || defined(XBOX_DRVMODEL_H)) )
-#pragma message (__DATE__ " " __TIME__ " " __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : No MMX intrinsics - defaulting to software emulation")
-#pragma message (__DATE__ " " __TIME__ " " __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : No SSE intrinsics - defaulting to software emulation")
-#pragma comment ( user, "comment:" __FILE__ "(" RW_STRINGIFY_EXPANDED(__LINE__) ") : No MMX intrinsics - defaulting to software emulation")
-#endif /* (! (defined(__ICL) || defined(XBOX_DRVMODEL_H)) ) */
-#endif /* (defined(_MSC_VER)) */
-
-/*
- * MMX
- */
-
-#if (defined(__ICL))
-
-#if (!defined(MMINTRIN_H))
-#include "mmintrin.h"
-#define MMINTRIN_H
-#endif /* (!defined(MMINTRIN_H)) */
-
-#else /* (defined(__ICL)) */
-
-#if (defined(_MSC_VER))
-
-#if (!defined(__M64))
-typedef __int64 Rt_m64;
-
-#define __M64
-#endif /* (!defined(__M64)) */
-
-#else /* (defined(_MSC_VER)) -- e.g. __GNUC__ */
-
-#if (!defined(__M64))
-
-typedef RwInt64 Rt_m64;
-
-#define __M64
-
-#endif /* (!defined(__M64)) */
-
-#endif /* (defined(_MSC_VER)) */
-
-#endif /* (defined(__ICL)) */
-
-/*
- * SSE
- */
-
-/*
- * From
- * ccomp.pdf
- * 12 Intel C/C++ Compiler User's Guide
- * for Win32 Systems With Katmai New Instruction Support
- * --------------------------------------------------------
- * Functionality Intrinsics Usage
- * You need only define one preprocessor symbol and include the header file
- * xmmintrin.h in your application to use the following functionality
- * intrinsics:
- * #define _MM_FUNCTIONALITY
- * #include "xmmintrin.h"
- * To encourage the compiler to inline the functionality intrinsic functions for
- * better performance, consider using the -Qip and -Qipo compiler switches.
- */
-
-#if (defined(__ICL))
-
-/* #define _MM2_FUNCTIONALITY */
-
-/* #define _MM_FUNCTIONALITY */
-
-/* #define _MM_NO_ABORT */
-
-/* #define _MM_NO_ACCURACY */
-
-/* #define _MM_NO_ALIGN_CHECK */
-
-/* #define _MM_NO_INLINE */
-
-/*
- * Undefine "or", since this is valid assembler; e.g. in
- * SDK10/include/xmm_func.h
- * _asm {
- * push eax
- * fld f
- * fstcw saved_cw
- * mov eax, saved_cw
- * or eax, 3072
- * mov new_cw, eax
- * fldcw new_cw
- * fistp ret
- * fldcw saved_cw
- * pop eax
- * }
- */
-
-#if (!defined(XMMINTRIN_H))
-#include "xmmintrin.h"
-#define XMMINTRIN_H
-#endif /* (!defined(XMMINTRIN_H)) */
-
-typedef __m64 Rt_m64;
-typedef __m128 Rt_m128;
-
-#if (450 <= __ICL)
-#if (!defined(EMMINTRIN_H))
-#include "emmintrin.h"
-#define EMMINTRIN_H
-typedef __m128d Rt_m128d;
-typedef __m128i Rt_m128i;
-#endif /* (!defined(EMMINTRIN_H)) */
-#else /* (450 <= __ICL) */
-typedef __m128 Rt_m128d;
-typedef __m128 Rt_m128i;
-#endif /* (450 <= __ICL) */
-
-/*
- * Report SSE options as compiler messages and object file comments
- */
-
-#ifdef _MM2_FUNCTIONALITY
-#define DEFINED__MM2_FUNCTIONALITY " _MM2_FUNCTIONALITY"
-#define UNDEFINED__MM2_FUNCTIONALITY ""
-#else /* _MM2_FUNCTIONALITY */
-#define DEFINED__MM2_FUNCTIONALITY ""
-#define UNDEFINED__MM2_FUNCTIONALITY " _MM2_FUNCTIONALITY"
-#endif /* _MM2_FUNCTIONALITY */
-
-#ifdef _MM_FUNCTIONALITY
-#define DEFINED__MM_FUNCTIONALITY DEFINED__MM2_FUNCTIONALITY ## " _MM_FUNCTIONALITY"
-#define UNDEFINED__MM_FUNCTIONALITY UNDEFINED__MM2_FUNCTIONALITY
-#else /* _MM_FUNCTIONALITY */
-#define DEFINED__MM_FUNCTIONALITY DEFINED__MM2_FUNCTIONALITY
-#define UNDEFINED__MM_FUNCTIONALITY UNDEFINED__MM2_FUNCTIONALITY ## " _MM_FUNCTIONALITY"
-#endif /* _MM_FUNCTIONALITY */
-
-#ifdef _MM_NO_ABORT
-#define DEFINED__MM_NO_ABORT DEFINED__MM_FUNCTIONALITY ## " _MM_NO_ABORT"
-#define UNDEFINED__MM_NO_ABORT UNDEFINED__MM_FUNCTIONALITY
-#else /* _MM_NO_ABORT */
-#define DEFINED__MM_NO_ABORT DEFINED__MM_FUNCTIONALITY
-#define UNDEFINED__MM_NO_ABORT UNDEFINED__MM_FUNCTIONALITY ## " _MM_NO_ABORT"
-#endif /* _MM_NO_ABORT */
-
-#ifdef _MM_NO_ACCURACY
-#define DEFINED__MM_NO_ACCURACY DEFINED__MM_NO_ABORT ## " _MM_NO_ACCURACY"
-#define UNDEFINED__MM_NO_ACCURACY UNDEFINED__MM_NO_ABORT
-#else /* _MM_NO_ACCURACY */
-#define DEFINED__MM_NO_ACCURACY DEFINED__MM_NO_ABORT
-#define UNDEFINED__MM_NO_ACCURACY UNDEFINED__MM_NO_ABORT ## " _MM_NO_ACCURACY"
-#endif /* _MM_NO_ACCURACY */
-
-#ifdef _MM_NO_ALIGN_CHECK
-#define DEFINED__MM_NO_ALIGN_CHECK DEFINED__MM_NO_ACCURACY ## " _MM_NO_ALIGN_CHECK"
-#define UNDEFINED__MM_NO_ALIGN_CHECK UNDEFINED__MM_NO_ACCURACY
-#else /* _MM_NO_ALIGN_CHECK */
-#define DEFINED__MM_NO_ALIGN_CHECK DEFINED__MM_NO_ACCURACY
-#define UNDEFINED__MM_NO_ALIGN_CHECK UNDEFINED__MM_NO_ACCURACY ## " _MM_NO_ALIGN_CHECK"
-#endif /* _MM_NO_ALIGN_CHECK */
-
-#ifdef _MM_NO_INLINE
-#define DEFINED__MM_NO_INLINE DEFINED__MM_NO_ALIGN_CHECK ## " _MM_NO_INLINE"
-#define UNDEFINED__MM_NO_INLINE UNDEFINED__MM_NO_ALIGN_CHECK
-#else /* _MM_NO_INLINE */
-#define DEFINED__MM_NO_INLINE DEFINED__MM_NO_ALIGN_CHECK
-#define UNDEFINED__MM_NO_INLINE UNDEFINED__MM_NO_ALIGN_CHECK ## " _MM_NO_INLINE"
-#endif /* _MM_NO_INLINE */
-
-#pragma comment ( user, "comment:" __DATE__" " __TIME__ " - " __FILE__ ":" RW_STRINGIFY_EXPANDED(__LINE__) )
-#pragma comment ( user, "comment:" "DEFINED :" DEFINED__MM_NO_INLINE )
-#pragma comment ( user, "comment:" "UNDEFINED:" UNDEFINED__MM_NO_INLINE )
-
-#pragma message (__DATE__" " __TIME__ " - " __FILE__ ":" RW_STRINGIFY_EXPANDED(__LINE__) )
-#pragma message ("DEFINED :" DEFINED__MM_NO_INLINE )
-#pragma message ("UNDEFINED:" UNDEFINED__MM_NO_INLINE )
-
-#else /* (defined(__ICL)) */
-
-#define _MM_HINT_T0 1
-#define _MM_HINT_T1 2
-#define _MM_HINT_T2 3
-#define _MM_HINT_NTA 0
-
-#if (defined(__R5900__))
-typedef RwInt128 Rt_m128;
-#else /* (defined(__R5900__)) */
-#if (!defined(_PAIR__M64))
-struct Rt_m128
-{
- Rt_m64 lo;
- Rt_m64 hi;
-};
-#define _PAIR__M64
-typedef struct Rt_m128 Rt_m128;
-#endif /* (!defined(_PAIR__M64)) */
-#endif /* (defined(__R5900__)) */
-
-typedef Rt_m128 Rt_m128d;
-typedef Rt_m128 Rt_m128i;
-#endif /* (defined(__ICL)) */
-
-typedef struct RtIntelV4d RtIntelV4d;
-struct RtIntelV4d
-{
- RwReal w;
- RwV3d v3d;
-};
-
-typedef union _RpSSEOverlayM128 RpSSEOverlayM128;
-
-union _RpSSEOverlayM128
-{
- float _f[4];
- RwInt32 _d[4];
- RwUInt32 ud[4];
- RwInt16 _w[8];
- RwUInt16 uw[8];
- RwInt8 _b[16];
- RwUInt8 ub[16];
- Rt_m64 m64[2];
- Rt_m128 m128;
- RtIntelV4d v4d;
- RwSplitBits bits[4];
-};
-
-typedef RpSSEOverlayM128 RpWNIOverlayM128;
-
-typedef union _RpWNIOverlayM128d RpWNIOverlayM128d;
-
-union _RpWNIOverlayM128d
-{
- double df[2];
- float _f[4];
- RwInt32 _d[4];
- RwUInt32 ud[4];
- RwInt16 _w[8];
- RwUInt16 uw[8];
- RwInt8 _b[16];
- RwUInt8 ub[16];
- Rt_m64 m64[2];
- Rt_m128d m128d;
- RtIntelV4d v4d;
- RwSplitBits bits[4];
-};
-
-typedef union _RpWNIOverlayM128i RpWNIOverlayM128i;
-
-union _RpWNIOverlayM128i
-{
- double df[2];
- float _f[4];
- RwInt32 _d[4];
- RwUInt32 ud[4];
- RwInt16 _w[8];
- RwUInt16 uw[8];
- RwInt8 _b[16];
- RwUInt8 ub[16];
- Rt_m64 m64[2];
- Rt_m128i m128i;
- RtIntelV4d v4d;
- RwSplitBits bits[4];
-};
-
-#define RWUNALIGNED16BYTE(ptr) (0x0000000FUL & ((RwUInt32)(ptr)))
-
-/*--- Plugin API Functions ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-/*
- * MMX
- */
-
-/* General support intrinsics */
-extern void Rt_m_empty(void);
-extern Rt_m64 Rt_m_from_int(int i);
-extern int Rt_m_to_int(Rt_m64 m);
-extern Rt_m64 Rt_m_packsswb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_packssdw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_packuswb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_punpckhbw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_punpckhwd(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_punpckhdq(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_punpcklbw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_punpcklwd(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_punpckldq(Rt_m64 m1, Rt_m64 m2);
-
-/* Packed arithmetic intrinsics */
-extern Rt_m64 Rt_m_paddb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_paddw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_paddd(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_paddsb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_paddsw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_paddusb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_paddusw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_psubb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_psubw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_psubd(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_psubsb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_psubsw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_psubusb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_psubusw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pmaddwd(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pmulhw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pmullw(Rt_m64 m1, Rt_m64 m2);
-
-/* Shift intrinsics */
-extern Rt_m64 Rt_m_psllw(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_psllwi(Rt_m64 m, int count);
-extern Rt_m64 Rt_m_pslld(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_pslldi(Rt_m64 m, int count);
-extern Rt_m64 Rt_m_psllq(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_psllqi(Rt_m64 m, int count);
-extern Rt_m64 Rt_m_psraw(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_psrawi(Rt_m64 m, int count);
-extern Rt_m64 Rt_m_psrad(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_psradi(Rt_m64 m, int count);
-extern Rt_m64 Rt_m_psrlw(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_psrlwi(Rt_m64 m, int count);
-extern Rt_m64 Rt_m_psrld(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_psrldi(Rt_m64 m, int count);
-extern Rt_m64 Rt_m_psrlq(Rt_m64 m, Rt_m64 count);
-extern Rt_m64 Rt_m_psrlqi(Rt_m64 m, int count);
-
-/* Logical intrinsics */
-extern Rt_m64 Rt_m_pand(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pandn(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_por(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pxor(Rt_m64 m1, Rt_m64 m2);
-
-/* Comparision intrinsics */
-extern Rt_m64 Rt_m_pcmpeqb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pcmpeqw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pcmpeqd(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pcmpgtb(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pcmpgtw(Rt_m64 m1, Rt_m64 m2);
-extern Rt_m64 Rt_m_pcmpgtd(Rt_m64 m1, Rt_m64 m2);
-
-/*
- * SSE
- */
-
-/*
- * Arithmetic Operations
- */
-
-extern Rt_m128 Rt_mm_add_ss(Rt_m128 a, Rt_m128 b) /* ADDSS */ ;
-extern Rt_m128 Rt_mm_add_ps(Rt_m128 a, Rt_m128 b) /* ADDPS */ ;
-extern Rt_m128 Rt_mm_sub_ss(Rt_m128 a, Rt_m128 b) /* SUBSS */ ;
-extern Rt_m128 Rt_mm_sub_ps(Rt_m128 a, Rt_m128 b) /* SUBPS */ ;
-extern Rt_m128 Rt_mm_mul_ss(Rt_m128 a, Rt_m128 b) /* MULSS */ ;
-extern Rt_m128 Rt_mm_mul_ps(Rt_m128 a, Rt_m128 b) /* MULPS */ ;
-extern Rt_m128 Rt_mm_div_ss(Rt_m128 a, Rt_m128 b) /* DIVSS */ ;
-extern Rt_m128 Rt_mm_div_ps(Rt_m128 a, Rt_m128 b) /* DIVPS */ ;
-extern Rt_m128 Rt_mm_sqrt_ss(Rt_m128 a) /* SQRTSS */ ;
-extern Rt_m128 Rt_mm_sqrt_ps(Rt_m128 a) /* SQRTPS */ ;
-extern Rt_m128 Rt_mm_rcp_ss(Rt_m128 a) /* RCPSS */ ;
-extern Rt_m128 Rt_mm_rcp_ps(Rt_m128 a) /* RCPPS */ ;
-extern Rt_m128 Rt_mm_rsqrt_ss(Rt_m128 a) /* RSQRTSS */ ;
-extern Rt_m128 Rt_mm_rsqrt_ps(Rt_m128 a) /* RSQRTPS */ ;
-extern Rt_m128 Rt_mm_min_ss(Rt_m128 a, Rt_m128 b) /* MINSS */ ;
-extern Rt_m128 Rt_mm_min_ps(Rt_m128 a, Rt_m128 b) /* MINPS */ ;
-extern Rt_m128 Rt_mm_max_ss(Rt_m128 a, Rt_m128 b) /* MAXSS */ ;
-extern Rt_m128 Rt_mm_max_ps(Rt_m128 a, Rt_m128 b) /* MAXPS */ ;
-
-/*
- * Logical Operations
- */
-
-extern Rt_m128 Rt_mm_and_ps(Rt_m128 a, Rt_m128 b) /* ANDPS */ ;
-extern Rt_m128 Rt_mm_andnot_ps(Rt_m128 a,
- Rt_m128 b) /* ANDNPS */ ;
-extern Rt_m128 Rt_mm_or_ps(Rt_m128 a, Rt_m128 b) /* ORPS */ ;
-extern Rt_m128 Rt_mm_xor_ps(Rt_m128 a, Rt_m128 b) /* XORPS */ ;
-
-/*
- * Comparisons
- */
-
-extern Rt_m128 Rt_mm_cmpeq_ss(Rt_m128 a,
- Rt_m128 b) /* CMPEQSS */ ;
-extern Rt_m128 Rt_mm_cmpeq_ps(Rt_m128 a,
- Rt_m128 b) /* CMPEQPS */ ;
-extern Rt_m128 Rt_mm_cmplt_ss(Rt_m128 a,
- Rt_m128 b) /* CMPLTSS */ ;
-extern Rt_m128 Rt_mm_cmplt_ps(Rt_m128 a,
- Rt_m128 b) /* CMPLTPS */ ;
-extern Rt_m128 Rt_mm_cmple_ss(Rt_m128 a,
- Rt_m128 b) /* CMPLESS */ ;
-extern Rt_m128 Rt_mm_cmple_ps(Rt_m128 a,
- Rt_m128 b) /* CMPLEPS */ ;
-extern Rt_m128 Rt_mm_cmpgt_ss(Rt_m128 a, Rt_m128 b) /* CMPLTSS r */
- ;
-extern Rt_m128 Rt_mm_cmpgt_ps(Rt_m128 a, Rt_m128 b) /* CMPLTPS r */
- ;
-extern Rt_m128 Rt_mm_cmpge_ss(Rt_m128 a, Rt_m128 b) /* CMPLESS r */
- ;
-extern Rt_m128 Rt_mm_cmpge_ps(Rt_m128 a, Rt_m128 b) /* CMPLEPS r */
- ;
-extern Rt_m128 Rt_mm_cmpneq_ss(Rt_m128 a,
- Rt_m128 b) /* CMPNEQSS */ ;
-extern Rt_m128 Rt_mm_cmpneq_ps(Rt_m128 a,
- Rt_m128 b) /* CMPNEQPS */ ;
-extern Rt_m128 Rt_mm_cmpnlt_ss(Rt_m128 a,
- Rt_m128 b) /* CMPNLTSS */ ;
-extern Rt_m128 Rt_mm_cmpnlt_ps(Rt_m128 a,
- Rt_m128 b) /* CMPNLTPS */ ;
-extern Rt_m128 Rt_mm_cmpnle_ss(Rt_m128 a,
- Rt_m128 b) /* CMPNLESS */ ;
-extern Rt_m128 Rt_mm_cmpnle_ps(Rt_m128 a,
- Rt_m128 b) /* CMPNLEPS */ ;
-extern Rt_m128 Rt_mm_cmpngt_ss(Rt_m128 a, Rt_m128 b)
- /* CMPNLTSS r */ ;
-extern Rt_m128 Rt_mm_cmpngt_ps(Rt_m128 a, Rt_m128 b)
- /* CMPNLTPS r */ ;
-extern Rt_m128 Rt_mm_cmpnge_ss(Rt_m128 a, Rt_m128 b)
- /* CMPNLESS r */ ;
-extern Rt_m128 Rt_mm_cmpnge_ps(Rt_m128 a, Rt_m128 b)
- /* CMPNLEPS r */ ;
-extern Rt_m128 Rt_mm_cmpord_ss(Rt_m128 a,
- Rt_m128 b) /* CMPORDSS */ ;
-extern Rt_m128 Rt_mm_cmpord_ps(Rt_m128 a,
- Rt_m128 b) /* CMPORDPS */ ;
-extern Rt_m128 Rt_mm_cmpunord_ss(Rt_m128 a,
- Rt_m128 b) /* CMPUNORDSS */ ;
-extern Rt_m128 Rt_mm_cmpunord_ps(Rt_m128 a,
- Rt_m128 b) /* CMPUNORDPS */ ;
-extern int Rt_mm_comieq_ss(Rt_m128 a,
- Rt_m128 b) /* COMISS */ ;
-extern int Rt_mm_comilt_ss(Rt_m128 a,
- Rt_m128 b) /* COMISS */ ;
-extern int Rt_mm_comile_ss(Rt_m128 a,
- Rt_m128 b) /* COMISS */ ;
-extern int Rt_mm_comigt_ss(Rt_m128 a,
- Rt_m128 b) /* COMISS */ ;
-extern int Rt_mm_comige_ss(Rt_m128 a,
- Rt_m128 b) /* COMISS */ ;
-extern int Rt_mm_comineq_ss(Rt_m128 a,
- Rt_m128 b) /* COMISS */ ;
-extern int Rt_mm_ucomieq_ss(Rt_m128 a,
- Rt_m128 b) /* UCOMISS */ ;
-extern int Rt_mm_ucomilt_ss(Rt_m128 a,
- Rt_m128 b) /* UCOMISS */ ;
-extern int Rt_mm_ucomile_ss(Rt_m128 a,
- Rt_m128 b) /* UCOMISS */ ;
-extern int Rt_mm_ucomigt_ss(Rt_m128 a,
- Rt_m128 b) /* UCOMISS */ ;
-extern int Rt_mm_ucomige_ss(Rt_m128 a,
- Rt_m128 b) /* UCOMISS */ ;
-extern int Rt_mm_ucomineq_ss(Rt_m128 a,
- Rt_m128 b) /* UCOMISS */ ;
-
-/*
- * Conversion Operations
- */
-
-extern int Rt_mm_cvt_ss2si(Rt_m128 a) /* CVTSS2SI */ ;
-extern Rt_m64 Rt_mm_cvt_ps2pi(Rt_m128 a) /* CVTPS2PI */ ;
-extern int Rt_mm_cvtt_ss2si(Rt_m128 a) /* CVTTSS2SI */ ;
-extern Rt_m64 Rt_mm_cvtt_ps2pi(Rt_m128 a) /* CVTTPS2PI */ ;
-extern Rt_m128 Rt_mm_cvt_si2ss(Rt_m128 a,
- int b) /* CVTSI2SS */ ;
-extern Rt_m128 Rt_mm_cvt_pi2ps(Rt_m128 a,
- Rt_m64 b) /* CVTPI2PS */ ;
-
-/*
- * Miscellaneous
- */
-
-extern Rt_m128 Rt_mm_shuffle_ps(Rt_m128 a, Rt_m128 b,
- int i) /* SHUFPS */ ;
-extern Rt_m128 Rt_mm_unpackhi_ps(Rt_m128 a,
- Rt_m128 b) /* UNPCKHPS */ ;
-extern Rt_m128 Rt_mm_unpacklo_ps(Rt_m128 a,
- Rt_m128 b) /* UNPCKLPS */ ;
-extern Rt_m128 Rt_mm_loadh_pi(Rt_m128 a, Rt_m64 * p) /* MOVHPS reg, mem */
- ;
-extern void Rt_mm_storeh_pi(Rt_m64 * p, Rt_m128 a) /* MOVHPS mem, reg */
- ;
-extern Rt_m128 Rt_mm_movehl_ps(Rt_m128 a,
- Rt_m128 b) /* MOVHLPS */ ;
-extern Rt_m128 Rt_mm_movelh_ps(Rt_m128 a,
- Rt_m128 b) /* MOVLHPS */ ;
-extern Rt_m128 Rt_mm_loadl_pi(Rt_m128 a, Rt_m64 * p)
- /* MOVLPS reg, mem */ ;
-extern void Rt_mm_storel_pi(Rt_m64 * p, Rt_m128 a) /* MOVLPS mem, reg */
- ;
-extern int Rt_mm_movemask_ps(Rt_m128 a) /* MOVMSKPS */ ;
-extern unsigned int Rt_mm_getcsr(void) /* STMXCSR */ ;
-extern void Rt_mm_setcsr(unsigned int i) /* LDMXCSR */ ;
-
-/*
- * Load Operations
- */
-
-extern Rt_m128 Rt_mm_load_ss(float *p) /* MOVSS */ ;
-extern Rt_m128 Rt_mm_load_ps1(float *p) /* MOVSS + shuffling */
- ;
-extern Rt_m128 Rt_mm_load_ps(float *p) /* MOVAPS */ ;
-extern Rt_m128 Rt_mm_loadu_ps(float *p) /* MOVUPS */ ;
-extern Rt_m128 Rt_mm_loadr_ps(float *p)
- /* MOVAPS + shuffling */ ;
-
-/*
- * Set Operations
- */
-
-extern Rt_m128 Rt_mm_set_ss(float w) /* (composite) */ ;
-extern Rt_m128 Rt_mm_set_ps1(float w) /* (composite) */ ;
-extern Rt_m128 Rt_mm_set_ps(float z, float y, float x,
- float w) /* (composite) */ ;
-extern Rt_m128 Rt_mm_setr_ps(float z, float y, float x,
- float w) /* (composite) */ ;
-extern Rt_m128 Rt_mm_setzero_ps(void) /* (composite) */ ;
-
-/*
- * Store Operations
- */
-
-extern void Rt_mm_store_ss(float *p,
- Rt_m128 a) /* MOVSS */ ;
-extern void Rt_mm_store_ps1(float *p, Rt_m128 a)
- /* MOVSS + shuffling */ ;
-extern void Rt_mm_store_ps(float *p,
- Rt_m128 a) /* MOVAPS */ ;
-extern void Rt_mm_storeu_ps(float *p,
- Rt_m128 a) /* MOVUPS */ ;
-extern void Rt_mm_storer_ps(float *p, Rt_m128 a)
- /* MOVAPS + shuffling */ ;
-extern Rt_m128 Rt_mm_move_ss(Rt_m128 a,
- Rt_m128 b) /* MOVSS */ ;
-
-/*
- * Integer Intrinsics
- */
-
-extern int Rt_m_pextrw(Rt_m64 a, int n) /* PEXTRW */ ;
-extern Rt_m64 Rt_m_pinsrw(Rt_m64 a, int d,
- int n) /* PINSRW */ ;
-extern Rt_m64 Rt_m_pmaxsw(Rt_m64 a, Rt_m64 b) /* PMAXSW */ ;
-extern Rt_m64 Rt_m_pmaxub(Rt_m64 a, Rt_m64 b) /* PMAXUB */ ;
-extern Rt_m64 Rt_m_pminsw(Rt_m64 a, Rt_m64 b) /* PMINSW */ ;
-extern Rt_m64 Rt_m_pminub(Rt_m64 a, Rt_m64 b) /* PMINUB */ ;
-extern int Rt_m_pmovmskb(Rt_m64 a) /* PMOVMSKB */ ;
-extern Rt_m64 Rt_m_pmulhuw(Rt_m64 a, Rt_m64 b) /* PMULHUW */ ;
-extern Rt_m64 Rt_m_pshufw(Rt_m64 a, int n) /* PSHUFW */ ;
-extern void Rt_m_lwmaskmovq(Rt_m64 d, Rt_m64 n,
- char *p) /* MASKMOVQ */ ;
-
-/*
- * Cacheability Support
- */
-
-extern void Rt_mm_prefetch(char *p, int i) /* PREFETCH */ ;
-extern void Rt_mm_stream_pi(Rt_m64 * p,
- Rt_m64 a) /* MOVNTQ */ ;
-extern void Rt_mm_stream_ps(float *p,
- Rt_m128 a) /* MOVNTPS */ ;
-extern void Rt_mm_sfence(void) /* SFENCE */ ;
-
-/*
- * WNI
- */
-
-/* Arithmetic Operations */
-
-extern Rt_m128d Rt_mm_add_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_add_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_div_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_div_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_max_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_max_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_min_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_min_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_mul_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_mul_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_sqrt_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_sqrt_pd(Rt_m128d a);
-extern Rt_m128d Rt_mm_sub_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_sub_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_andnot_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_and_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_or_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_xor_pd(Rt_m128d a, Rt_m128d b);
-
-/* Comparisons */
-
-extern Rt_m128d Rt_mm_cmpeq_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmplt_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmple_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpgt_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpge_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpord_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpunord_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpneq_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpnlt_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpnle_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpngt_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpnge_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpeq_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmplt_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmple_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpgt_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpge_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpord_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpunord_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpneq_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpnlt_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpnle_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpngt_sd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cmpnge_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_comieq_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_comilt_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_comile_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_comigt_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_comige_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_comineq_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_ucomieq_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_ucomilt_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_ucomile_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_ucomigt_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_ucomige_sd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_ucomineq_sd(Rt_m128d a, Rt_m128d b);
-
-/* Conversion Operations */
-
-extern Rt_m128 Rt_mm_cvtpd_ps(Rt_m128d a);
-extern Rt_m128d Rt_mm_cvtps_pd(Rt_m128 a);
-extern Rt_m128d Rt_mm_cvtepi32_pd(Rt_m128i a);
-extern Rt_m128i Rt_mm_cvtpd_epi32(Rt_m128d a);
-extern int Rt_mm_cvtsd_si32(Rt_m128d a);
-extern Rt_m128 Rt_mm_cvtsd_ss(Rt_m128 a, Rt_m128d b);
-extern Rt_m128d Rt_mm_cvtsi32_sd(Rt_m128d a, int b);
-extern Rt_m128d Rt_mm_cvtss_sd(Rt_m128d a, Rt_m128 b);
-extern Rt_m128i Rt_mm_cvttpd_epi32(Rt_m128d a);
-extern int Rt_mm_cvttsd_si32(Rt_m128d a);
-extern Rt_m128 Rt_mm_cvtepi32_ps(Rt_m128i a);
-extern Rt_m128i Rt_mm_cvtps_epi32(Rt_m128 a);
-extern Rt_m128i Rt_mm_cvttps_epi32(Rt_m128 a);
-extern Rt_m64 Rt_mm_cvtpd_pi32(Rt_m128d a);
-extern Rt_m64 Rt_mm_cvttpd_pi32(Rt_m128d a);
-extern Rt_m128d Rt_mm_cvtpi32_pd(Rt_m64 a);
-
-/* Miscellaneous Operations */
-
-extern Rt_m128d Rt_mm_unpackhi_pd(Rt_m128d a, Rt_m128d b);
-extern Rt_m128d Rt_mm_unpacklo_pd(Rt_m128d a, Rt_m128d b);
-extern int Rt_mm_movemask_pd(Rt_m128d a);
-extern Rt_m128d Rt_mm_shuffle_pd(Rt_m128d a, Rt_m128d b, int i);
-extern Rt_m128d Rt_mm_load_pd(const double *p);
-extern Rt_m128d Rt_mm_load1_pd(const double *p);
-extern Rt_m128d Rt_mm_loadr_pd(const double *p);
-extern Rt_m128d Rt_mm_loadu_pd(const double *p);
-extern Rt_m128d Rt_mm_load_sd(const double *p);
-extern Rt_m128d Rt_mm_loadh_pd(Rt_m128d a, const double *p);
-extern Rt_m128d Rt_mm_loadl_pd(Rt_m128d a, const double *p);
-extern Rt_m128d Rt_mm_set_sd(double w);
-extern Rt_m128d Rt_mm_set1_pd(double w);
-extern Rt_m128d Rt_mm_set_pd(double w, double x);
-extern Rt_m128d Rt_mm_setr_pd(double w, double x);
-extern Rt_m128d Rt_mm_setzero_pd(void);
-extern Rt_m128d Rt_mm_move_sd(Rt_m128d a, Rt_m128d b);
-extern void Rt_mm_stream_pd(double *p, Rt_m128d a);
-extern void Rt_mm_store_sd(double *p, Rt_m128d a);
-extern void Rt_mm_store1_pd(double *p, Rt_m128d a);
-extern void Rt_mm_store_pd(double *p, Rt_m128d a);
-extern void Rt_mm_storeu_pd(double *p, Rt_m128d a);
-extern void Rt_mm_storer_pd(double *p, Rt_m128d a);
-extern void Rt_mm_storeh_pd(double *p, Rt_m128d a);
-extern void Rt_mm_storel_pd(double *p, Rt_m128d a);
-extern Rt_m128i Rt_mm_add_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_add_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_add_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m64 Rt_mm_add_si64(Rt_m64 a, Rt_m64 b);
-extern Rt_m128i Rt_mm_add_epi64(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_adds_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_adds_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_adds_epu8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_adds_epu16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_avg_epu8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_avg_epu16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_madd_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_max_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_max_epu8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_min_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_min_epu8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_mulhi_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_mulhi_epu16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_mullo_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m64 Rt_mm_mul_su32(Rt_m64 a, Rt_m64 b);
-extern Rt_m128i Rt_mm_mul_epu32(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_sad_epu8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_sub_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_sub_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_sub_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m64 Rt_mm_sub_si64(Rt_m64 a, Rt_m64 b);
-extern Rt_m128i Rt_mm_sub_epi64(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_subs_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_subs_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_subs_epu8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_subs_epu16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_and_si128(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_andnot_si128(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_or_si128(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_xor_si128(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_slli_si128(Rt_m128i a, int imm);
-extern Rt_m128i Rt_mm_slli_epi16(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_sll_epi16(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_slli_epi32(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_sll_epi32(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_slli_epi64(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_sll_epi64(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_srai_epi16(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_sra_epi16(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_srai_epi32(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_sra_epi32(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_srli_si128(Rt_m128i a, int imm);
-extern Rt_m128i Rt_mm_srli_epi16(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_srl_epi16(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_srli_epi32(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_srl_epi32(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_srli_epi64(Rt_m128i a, int count);
-extern Rt_m128i Rt_mm_srl_epi64(Rt_m128i a, Rt_m128i count);
-extern Rt_m128i Rt_mm_cmpeq_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmpeq_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmpeq_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmpgt_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmpgt_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmpgt_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmplt_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmplt_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cmplt_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_cvtsi32_si128(int a);
-extern int Rt_mm_cvtsi128_si32(Rt_m128i a);
-
-/* Miscellaneous Operations */
-
-extern Rt_m64 Rt_mm_movepi64_pi64(Rt_m128i a);
-extern Rt_m128i Rt_mm_movpi64_epi64(Rt_m64 a);
-extern Rt_m128i Rt_mm_move_epi64(Rt_m128i a);
-extern Rt_m128i Rt_mm_packs_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_packs_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_packus_epi16(Rt_m128i a, Rt_m128i b);
-extern int Rt_mm_extract_epi16(Rt_m128i a, int imm);
-extern Rt_m128i Rt_mm_insert_epi16(Rt_m128i a, int b, int imm);
-extern int Rt_mm_movemask_epi8(Rt_m128i a);
-extern Rt_m128i Rt_mm_shuffle_epi32(Rt_m128i a, int imm);
-extern Rt_m128i Rt_mm_shufflehi_epi16(Rt_m128i a, int imm);
-extern Rt_m128i Rt_mm_shufflelo_epi16(Rt_m128i a, int imm);
-extern Rt_m128i Rt_mm_unpackhi_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_unpackhi_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_unpackhi_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_unpackhi_epi64(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_unpacklo_epi8(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_unpacklo_epi16(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_unpacklo_epi32(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_unpacklo_epi64(Rt_m128i a, Rt_m128i b);
-extern Rt_m128i Rt_mm_loadl_epi64(Rt_m128i const *p);
-extern Rt_m128i Rt_mm_load_si128(const Rt_m128i * p);
-extern Rt_m128i Rt_mm_loadu_si128(const Rt_m128i * p);
-extern Rt_m128i Rt_mm_set_epi64(Rt_m64 q1, Rt_m64 q0);
-extern Rt_m128i Rt_mm_set_epi32(int i3, int i2, int i1, int i0);
-extern Rt_m128i
- Rt_mm_set_epi16(short w7, short w6,
- short w5, short w4, short w3, short w2,
- short w1, short w0);
-extern Rt_m128i Rt_mm_set_epi8(char b15, char b14,
- char b13, char b12,
- char b11, char b10,
- char b9, char b8,
- char b7, char b6,
- char b5, char b4,
- char b3, char b2,
- char b1, char b0);
-extern Rt_m128i Rt_mm_set1_epi64(Rt_m64 q);
-extern Rt_m128i Rt_mm_set1_epi32(int i);
-extern Rt_m128i Rt_mm_set1_epi16(short w);
-extern Rt_m128i Rt_mm_set1_epi8(char b);
-extern Rt_m128i Rt_mm_setr_epi64(Rt_m64 q0, Rt_m64 q1);
-extern Rt_m128i Rt_mm_setr_epi32(int i0, int i1, int i2,
- int i3);
-extern Rt_m128i Rt_mm_setr_epi16(short w0, short w1,
- short w2, short w3,
- short w4, short w5,
- short w6, short w7);
-extern Rt_m128i Rt_mm_setr_epi8(char b0, char b1,
- char b2, char b3,
- char b4, char b5,
- char b6, char b7,
- char b8, char b9,
- char b10, char b11,
- char b12, char b13,
- char b14, char b15);
-extern Rt_m128i Rt_mm_setzero_si128(void);
-
-/* Store Operations */
-
-extern void Rt_mm_store_si128(Rt_m128i * p, Rt_m128i a);
-extern void Rt_mm_storeu_si128(Rt_m128i * p, Rt_m128i a);
-extern void Rt_mm_maskmoveu_si128(Rt_m128i s, Rt_m128i n,
- char *p);
-extern void Rt_mm_storel_epi64(Rt_m128i * p, Rt_m128i a);
-extern void Rt_mm_stream_si128(Rt_m128i * p, Rt_m128i a);
-extern void Rt_mm_stream_si32(int *p, int a);
-extern void Rt_mm_clflush(void const *p);
-extern void Rt_mm_lfence(void);
-extern void Rt_mm_mfence(void);
-
-/*
- * API
- */
-extern RwUInt32 RtIntelRDTSC(void);
-extern RwUInt32 RtIntelToggleEFLAGS(int mask);
-extern RwUInt32 RtIntelCPUID(RwUInt32 level,
- void *pb, void *pc, void *pd);
-extern RwUInt32 RtIntelHaveCPUID(void);
-extern RwUInt32 RtIntelHaveRDTSC(void);
-extern RwUInt32 RtIntelHaveMMX(void);
-extern RwUInt32 RtIntelHaveSSE(void);
-extern RwUInt32 RtIntelHaveWNI(void);
-extern RwUInt32 RtIntelCpuType(void);
-
-extern RwBool RtIntelStartTiming(void * data);
-extern RwBool RtIntelStopTiming(void *data);
-extern RwBool RtIntelTime(RwFixed64 * result,
- RtIntelTimeFunction func,
- void *data);
-
-extern RwBool RtIntelPluginAttach(void);
-
-extern RtIntelOverload *_rtIntelOverloadGetHandle(void);
-
-extern RxNodeDefinition *RxNodeDefinitionGetSSETransformCSL(void);
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-/*
- * LEGACY-SUPPORT -- e.g.
- * rwsdk/driver/d3d/baintd3d.c
- * is locked at time of writing
- */
-
-#define RpIntelRDTSC() RtIntelRDTSC()
-#define RpIntelToggleEFLAGS(_mask) RtIntelToggleEFLAGS(_mask)
-#define RpIntelCPUID(_level, _pb, _pc, _pd) \
- RtIntelCPUID(_level, _pb, _pc, _pd)
-#define RpIntelHaveCPUID() RtIntelHaveCPUID()
-#define RpIntelHaveRDTSC() RtIntelHaveRDTSC()
-#define RpIntelHaveMMX() RtIntelHaveMMX()
-#define RpIntelHaveSSE() RtIntelHaveSSE()
-#define RpIntelHaveWNI() RtIntelHaveWNI()
-#define RpIntelCpuType() RtIntelCpuType()
-#define RpIntelStartTiming(_data) RtIntelStartTiming(_data)
-#define RpIntelStopTiming(_data) RtIntelStopTiming(_data)
-#define RpIntelTime(_result, _func, _data) \
- RtIntelTime(_result, _func, _data)
-#define RpIntelPluginAttach() RtIntelPluginAttach()
-#define RpNodeDefinitionGetSSETransformCSL() \
- RxNodeDefinitionGetSSETransformCSL()
-
-typedef RtIntelOverload RwIntelOverload;
-typedef RtIntelOverload RpIntelOverload;
-
-#define _rwIntelOverloadGetHandle() _rtIntelOverloadGetHandle()
-#define _rpIntelOverloadGetHandle() _rtIntelOverloadGetHandle()
-#define RwIntelHaveSSE() RtIntelHaveSSE()
-#define RpIntelHaveSSE() RtIntelHaveSSE()
-
-#if (defined(RWEMULATEINTELSIMD) || !defined(__ICL))
-
-/*
- * MMX
- */
-
-/* General support intrinsics */
-#define _m_empty() Rt_m_empty()
-#define _m_from_int(i) Rt_m_from_int(i)
-#define _m_to_int(m) Rt_m_to_int(m)
-#define _m_packsswb(m1, m2) Rt_m_packsswb(m1, m2)
-#define _m_packssdw(m1, m2) Rt_m_packssdw(m1, m2)
-#define _m_packuswb(m1, m2) Rt_m_packuswb(m1, m2)
-#define _m_punpckhbw(m1, m2) Rt_m_punpckhbw(m1, m2)
-#define _m_punpckhwd(m1, m2) Rt_m_punpckhwd(m1, m2)
-#define _m_punpckhdq(m1, m2) Rt_m_punpckhdq(m1, m2)
-#define _m_punpcklbw(m1, m2) Rt_m_punpcklbw(m1, m2)
-#define _m_punpcklwd(m1, m2) Rt_m_punpcklwd(m1, m2)
-#define _m_punpckldq(m1, m2) Rt_m_punpckldq(m1, m2)
-
-/* Packed arithmetic intrinsics */
-#define _m_paddb(m1, m2) Rt_m_paddb(m1, m2)
-#define _m_paddw(m1, m2) Rt_m_paddw(m1, m2)
-#define _m_paddd(m1, m2) Rt_m_paddd(m1, m2)
-#define _m_paddsb(m1, m2) Rt_m_paddsb(m1, m2)
-#define _m_paddsw(m1, m2) Rt_m_paddsw(m1, m2)
-#define _m_paddusb(m1, m2) Rt_m_paddusb(m1, m2)
-#define _m_paddusw(m1, m2) Rt_m_paddusw(m1, m2)
-#define _m_psubb(m1, m2) Rt_m_psubb(m1, m2)
-#define _m_psubw(m1, m2) Rt_m_psubw(m1, m2)
-#define _m_psubd(m1, m2) Rt_m_psubd(m1, m2)
-#define _m_psubsb(m1, m2) Rt_m_psubsb(m1, m2)
-#define _m_psubsw(m1, m2) Rt_m_psubsw(m1, m2)
-#define _m_psubusb(m1, m2) Rt_m_psubusb(m1, m2)
-#define _m_psubusw(m1, m2) Rt_m_psubusw(m1, m2)
-#define _m_pmaddwd(m1, m2) Rt_m_pmaddwd(m1, m2)
-#define _m_pmulhw(m1, m2) Rt_m_pmulhw(m1, m2)
-#define _m_pmullw(m1, m2) Rt_m_pmullw(m1, m2)
-
-/* Shift intrinsics */
-#define _m_psllw(m, count) Rt_m_psllw(m, count)
-#define _m_psllwi(m, count) Rt_m_psllwi(m, count)
-#define _m_pslld(m, count) Rt_m_pslld(m, count)
-#define _m_pslldi(m, count) Rt_m_pslldi(m, count)
-#define _m_psllq(m, count) Rt_m_psllq(m, count)
-#define _m_psllqi(m, count) Rt_m_psllqi(m, count)
-#define _m_psraw(m, count) Rt_m_psraw(m, count)
-#define _m_psrawi(m, count) Rt_m_psrawi(m, count)
-#define _m_psrad(m, count) Rt_m_psrad(m, count)
-#define _m_psradi(m, count) Rt_m_psradi(m, count)
-#define _m_psrlw(m, count) Rt_m_psrlw(m, count)
-#define _m_psrlwi(m, count) Rt_m_psrlwi(m, count)
-#define _m_psrld(m, count) Rt_m_psrld(m, count)
-#define _m_psrldi(m, count) Rt_m_psrldi(m, count)
-#define _m_psrlq(m, count) Rt_m_psrlq(m, count)
-#define _m_psrlqi(m, count) Rt_m_psrlqi(m, count)
-
-/* Logical intrinsics */
-#define _m_pand(m1, m2) Rt_m_pand(m1, m2)
-#define _m_pandn(m1, m2) Rt_m_pandn(m1, m2)
-#define _m_por(m1, m2) Rt_m_por(m1, m2)
-#define _m_pxor(m1, m2) Rt_m_pxor(m1, m2)
-
-/* Comparison intrinsics */
-#define _m_pcmpeqb(m1, m2) Rt_m_pcmpeqb(m1, m2)
-#define _m_pcmpeqw(m1, m2) Rt_m_pcmpeqw(m1, m2)
-#define _m_pcmpeqd(m1, m2) Rt_m_pcmpeqd(m1, m2)
-#define _m_pcmpgtb(m1, m2) Rt_m_pcmpgtb(m1, m2)
-#define _m_pcmpgtw(m1, m2) Rt_m_pcmpgtw(m1, m2)
-#define _m_pcmpgtd(m1, m2) Rt_m_pcmpgtd(m1, m2)
-
-/*
- * SSE
- */
-
-/*
- * Arithmetic Operations
- */
-
-#define _mm_add_ss(a, b) Rt_mm_add_ss(a, b)
-#define _mm_add_ps(a, b) Rt_mm_add_ps(a, b)
-#define _mm_sub_ss(a, b) Rt_mm_sub_ss(a, b)
-#define _mm_sub_ps(a, b) Rt_mm_sub_ps(a, b)
-#define _mm_mul_ss(a, b) Rt_mm_mul_ss(a, b)
-#define _mm_mul_ps(a, b) Rt_mm_mul_ps(a, b)
-#define _mm_div_ss(a, b) Rt_mm_div_ss(a, b)
-#define _mm_div_ps(a, b) Rt_mm_div_ps(a, b)
-#define _mm_sqrt_ss(a) Rt_mm_sqrt_ss(a)
-#define _mm_sqrt_ps(a) Rt_mm_sqrt_ps(a)
-#define _mm_rcp_ss(a) Rt_mm_rcp_ss(a)
-#define _mm_rcp_ps(a) Rt_mm_rcp_ps(a)
-#define _mm_rsqrt_ss(a) Rt_mm_rsqrt_ss(a)
-#define _mm_rsqrt_ps(a) Rt_mm_rsqrt_ps(a)
-#define _mm_min_ss(a, b) Rt_mm_min_ss(a, b)
-#define _mm_min_ps(a, b) Rt_mm_min_ps(a, b)
-#define _mm_max_ss(a, b) Rt_mm_max_ss(a, b)
-#define _mm_max_ps(a, b) Rt_mm_max_ps(a, b)
-
-/*
- * Logical Operations
- */
-
-#define _mm_and_ps(a, b) Rt_mm_and_ps(a, b)
-#define _mm_andnot_ps(a, b) Rt_mm_andnot_ps(a, b)
-#define _mm_or_ps(a, b) Rt_mm_or_ps(a, b)
-#define _mm_xor_ps(a, b) Rt_mm_xor_ps(a, b)
-
-/*
- * Comparisons
- */
-
-#define _mm_cmpeq_ss(a, b) Rt_mm_cmpeq_ss(a, b)
-#define _mm_cmpeq_ps(a, b) Rt_mm_cmpeq_ps(a, b)
-#define _mm_cmplt_ss(a, b) Rt_mm_cmplt_ss(a, b)
-#define _mm_cmplt_ps(a, b) Rt_mm_cmplt_ps(a, b)
-#define _mm_cmple_ss(a, b) Rt_mm_cmple_ss(a, b)
-#define _mm_cmple_ps(a, b) Rt_mm_cmple_ps(a, b)
-#define _mm_cmpgt_ss(a, b) Rt_mm_cmpgt_ss(a, b)
-#define _mm_cmpgt_ps(a, b) Rt_mm_cmpgt_ps(a, b)
-#define _mm_cmpge_ss(a, b) Rt_mm_cmpge_ss(a, b)
-#define _mm_cmpge_ps(a, b) Rt_mm_cmpge_ps(a, b)
-#define _mm_cmpneq_ss(a, b) Rt_mm_cmpneq_ss(a, b)
-#define _mm_cmpneq_ps(a, b) Rt_mm_cmpneq_ps(a, b)
-#define _mm_cmpnlt_ss(a, b) Rt_mm_cmpnlt_ss(a, b)
-#define _mm_cmpnlt_ps(a, b) Rt_mm_cmpnlt_ps(a, b)
-#define _mm_cmpnle_ss(a, b) Rt_mm_cmpnle_ss(a, b)
-#define _mm_cmpnle_ps(a, b) Rt_mm_cmpnle_ps(a, b)
-#define _mm_cmpngt_ss(a, b) Rt_mm_cmpngt_ss(a, b)
-#define _mm_cmpngt_ps(a, b) Rt_mm_cmpngt_ps(a, b)
-#define _mm_cmpnge_ss(a, b) Rt_mm_cmpnge_ss(a, b)
-#define _mm_cmpnge_ps(a, b) Rt_mm_cmpnge_ps(a, b)
-#define _mm_cmpord_ss(a, b) Rt_mm_cmpord_ss(a, b)
-#define _mm_cmpord_ps(a, b) Rt_mm_cmpord_ps(a, b)
-#define _mm_cmpunord_ss(a, b) Rt_mm_cmpunord_ss(a, b)
-#define _mm_cmpunord_ps(a, b) Rt_mm_cmpunord_ps(a, b)
-#define _mm_comieq_ss(a, b) Rt_mm_comieq_ss(a, b)
-#define _mm_comilt_ss(a, b) Rt_mm_comilt_ss(a, b)
-#define _mm_comile_ss(a, b) Rt_mm_comile_ss(a, b)
-#define _mm_comigt_ss(a, b) Rt_mm_comigt_ss(a, b)
-#define _mm_comige_ss(a, b) Rt_mm_comige_ss(a, b)
-#define _mm_comineq_ss(a, b) Rt_mm_comineq_ss(a, b)
-#define _mm_ucomieq_ss(a, b) Rt_mm_ucomieq_ss(a, b)
-#define _mm_ucomilt_ss(a, b) Rt_mm_ucomilt_ss(a, b)
-#define _mm_ucomile_ss(a, b) Rt_mm_ucomile_ss(a, b)
-#define _mm_ucomigt_ss(a, b) Rt_mm_ucomigt_ss(a, b)
-#define _mm_ucomige_ss(a, b) Rt_mm_ucomige_ss(a, b)
-#define _mm_ucomineq_ss(a, b) Rt_mm_ucomineq_ss(a, b)
-
-/*
- * Conversion Operations
- */
-
-#define _mm_cvt_ss2si(a) Rt_mm_cvt_ss2si(a)
-#define _mm_cvt_ps2pi(a) Rt_mm_cvt_ps2pi(a)
-#define _mm_cvtt_ss2si(a) Rt_mm_cvtt_ss2si(a)
-#define _mm_cvtt_ps2pi(a) Rt_mm_cvtt_ps2pi(a)
-#define _mm_cvt_si2ss(a, b) Rt_mm_cvt_si2ss(a, b)
-#define _mm_cvt_pi2ps(a, b) Rt_mm_cvt_pi2ps(a, b)
-
-/*
- * Miscellaneous
- */
-
-#define _mm_shuffle_ps(a, b, i) Rt_mm_shuffle_ps(a, b, i)
-#define _mm_unpackhi_ps(a, b) Rt_mm_unpackhi_ps(a, b)
-#define _mm_unpacklo_ps(a, b) Rt_mm_unpacklo_ps(a, b)
-#define _mm_loadh_pi(a, p) Rt_mm_loadh_pi(a, p)
-#define _mm_storeh_pi(p, a) Rt_mm_storeh_pi(p, a)
-#define _mm_movehl_ps(a, b) Rt_mm_movehl_ps(a, b)
-#define _mm_movelh_ps(a, b) Rt_mm_movelh_ps(a, b)
-#define _mm_loadl_pi(a, p) Rt_mm_loadl_pi(a, p)
-#define _mm_storel_pi(p, a) Rt_mm_storel_pi(p, a)
-#define _mm_movemask_ps(a) Rt_mm_movemask_ps(a)
-#define _mm_getcsr() Rt_mm_getcsr()
-#define _mm_setcsr(i) Rt_mm_setcsr(i)
-
-/*
- *Load Operations
- */
-
-#define _mm_load_ss(p) Rt_mm_load_ss(p)
-#define _mm_load_ps1(p) Rt_mm_load_ps1(p)
-#define _mm_load_ps(p) Rt_mm_load_ps(p)
-#define _mm_loadu_ps(p) Rt_mm_loadu_ps(p)
-#define _mm_loadr_ps(p) Rt_mm_loadr_ps(p)
-
-/*
- * Set Operations
- */
-
-#define _mm_set_ss(w) Rt_mm_set_ss(w)
-#define _mm_set_ps1(w) Rt_mm_set_ps1(w)
-#define _mm_set_ps(z, y, x, w) Rt_mm_set_ps(z, y, x, w)
-#define _mm_setr_ps(z, y, x, w) Rt_mm_setr_ps(z, y, x, w)
-#define _mm_setzero_ps() Rt_mm_setzero_ps()
-
-/*
- * Store Operations
- */
-
-#define _mm_store_ss(p, a) Rt_mm_store_ss(p, a)
-#define _mm_store_ps1(p, a) Rt_mm_store_ps1(p, a)
-#define _mm_store_ps(p, a) Rt_mm_store_ps(p, a)
-#define _mm_storeu_ps(p, a) Rt_mm_storeu_ps(p, a)
-#define _mm_storer_ps(p, a) Rt_mm_storer_ps(p, a)
-#define _mm_move_ss(a, b) Rt_mm_move_ss(a, b)
-
-/*
- * Integer Intrinsics
- */
-
-#define _m_pextrw(a, n) Rt_m_pextrw(a, n)
-#define _m_pinsrw(a, d, n) Rt_m_pinsrw(a, d, n)
-#define _m_pmaxsw(a, b) Rt_m_pmaxsw(a, b)
-#define _m_pmaxub(a, b) Rt_m_pmaxub(a, b)
-#define _m_pminsw(a, b) Rt_m_pminsw(a, b)
-#define _m_pminub(a, b) Rt_m_pminub(a, b)
-#define _m_pmovmskb(a) Rt_m_pmovmskb(a)
-#define _m_pmulhuw(a, b) Rt_m_pmulhuw(a, b)
-#define _m_pshufw(a, n) Rt_m_pshufw(a, n)
-#define _m_lwmaskmovq(d, n, p) Rt_m_lwmaskmovq(d, n, p)
-
-/*
- * Cacheability Support
- */
-
-#define _mm_prefetch(p, i) Rt_mm_prefetch(p, i)
-#define _mm_stream_pi(p, a) Rt_mm_stream_pi(p, a)
-#define _mm_stream_ps(p, a) Rt_mm_stream_ps(p, a)
-#define _mm_sfence() Rt_mm_sfence()
-
-#endif /* (defined(RWEMULATEINTELSIMD) || !defined(__ICL)) */
-
-#endif /* RTINTEL_H */
diff --git a/rwsdk/include/d3d8/rtintel.rpe b/rwsdk/include/d3d8/rtintel.rpe
deleted file mode 100644
index bf297ca0..00000000
--- a/rwsdk/include/d3d8/rtintel.rpe
+++ /dev/null
@@ -1,645 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-enum e_rwdb_CriterionIntel
-{
-
-
-
- e_rwdb_CriterionIntelLAST = RWFORCEENUMSIZEINT
-};
-
-typedef enum e_rwdb_CriterionIntel e_rwdb_CriterionIntel;
-
-
diff --git a/rwsdk/include/d3d8/rtintsec.h b/rwsdk/include/d3d8/rtintsec.h
index cb482b17..a2e4c3d6 100644
--- a/rwsdk/include/d3d8/rtintsec.h
+++ b/rwsdk/include/d3d8/rtintsec.h
@@ -10,8 +10,8 @@
#define RTINTSEC_H
/**
- * \defgroup rtintersect RtIntersection
- * \ingroup rttool
+ * \defgroup rtintersection RtIntersection
+ * \ingroup mathtools
*
* Object Intersection Toolkit for RenderWare.
*/
diff --git a/rwsdk/include/d3d8/rtintsec.rpe b/rwsdk/include/d3d8/rtintsec.rpe
index 7b2ce6e1..3c7f7bf3 100644
--- a/rwsdk/include/d3d8/rtintsec.rpe
+++ b/rwsdk/include/d3d8/rtintsec.rpe
@@ -149,472 +149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionIntsec
{
diff --git a/rwsdk/include/d3d8/rtltmap.h b/rwsdk/include/d3d8/rtltmap.h
index 1a53b185..8ee15a43 100644
--- a/rwsdk/include/d3d8/rtltmap.h
+++ b/rwsdk/include/d3d8/rtltmap.h
@@ -1,7 +1,7 @@
/**
* \defgroup rtltmap RtLtMap
- * \ingroup rttool
+ * \ingroup lighting
*
* Lightmap Generation Toolkit for RenderWare.
*/
@@ -21,7 +21,6 @@
/**
* \ingroup rtltmap
- * \typedef RtLtMapIlluminateSampleCallBack
* \ref RtLtMapIlluminateSampleCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, for groups of samples in the objects
* currently being illuminated.
@@ -32,7 +31,7 @@
*
* This callback will receive an array of color values to fill in, each
* representing one sample in the current object - this may correspond to
- * a texel in the current object's lightmap or the prelight colour of a
+ * a texel in the current object's lightmap or the prelight color of a
* vertex, depending on whether the object is lightmapped and/or vertex-lit.
* It will receive positions (in world-space) for each sample and the normal
* vector (again, in world-space) of each sample (normals are interpolated
@@ -44,7 +43,7 @@
* The barycentric coordinates may be used, for example, to allow a callback
* to easily import existing lighting data (e.g from previously generated
* lightmaps in a different format, or from an art package with lighting
- * functionality).
+ * functionality).
*
* NOTE: The alpha channel of the RwRGBA results array must NOT be modified.
* These values are used internally and their modification may result in
@@ -82,7 +81,6 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
/**
* \ingroup rtltmap
- * \typedef RtLtMapIlluminateVisCallBack
* \ref RtLtMapIlluminateVisCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to determine the visibility between a
* sample and a light.
@@ -94,7 +92,7 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
* Each sample may represent a texel in the current object's lightmap
* or the prelight color of a vertex, depending on whether the object
* is lightmapped and/or vertex-lit (see \ref RtLtMapObjectFlags).
- *
+ *
* The callback will receive a pointer to the world of the current
* \ref RtLtMapLightingSession (this may be used to perform intersection
* tests), the world-space position of the sample, the world-space
@@ -111,15 +109,15 @@ typedef RwRGBA *(*RtLtMapIlluminateSampleCallBack)(RwRGBA *results,
* expressed by modifying the RwRGBAReal value. This defaults to bright
* white but may be reduced to signify that the light from the light
* source should be attenuated. This could be used to take into account
- * light-filtering objects in the scene (such as coloured glass or fog).
+ * light-filtering objects in the scene (such as colored glass or fog).
*
* The default RtLtMapIlluminateVisCallBack supplied with RtLtMap is
* \ref RtLtMapDefaultVisCallBack. This callback performs visibility
- * tests using the line-intersection tests from \ref rtintersect. It tests
+ * tests using the line-intersection tests from \ref rtintersection. It tests
* for occlusion by RpWorldSectors and RpAtomics and it respects the
* relevant \ref RtLtMapObjectFlags and \ref RtLtMapMaterialFlags but it
* does not filter light; visibility is determined to be either one or zero.
- *
+ *
* \param world The world of the current RtLtMapLightingSession
* \param result An RwRGBAReal value to attentuate this light's
* contribution to the current sample
@@ -141,7 +139,6 @@ typedef RwBool (*RtLtMapIlluminateVisCallBack)(RpWorld *world,
/**
* \ingroup rtltmap
- * \typedef RtLtMapIlluminateProgressCallBack
* \ref RtLtMapIlluminateProgressCallBack is the callback to be called, from
* within \ref RtLtMapIlluminate, to allow a user to track lighting progress.
*
@@ -214,17 +211,17 @@ typedef enum RtLtMapProgressMessage RtLtMapProgressMessage;
typedef struct RtLtMapLightingSession RtLtMapLightingSession;
/**
* \ingroup rtltmap
- * \typedef RtLtMapLightingSession
- * The \ref RtLtMapLightingSession structure holds information to be passed to
+ * \struct RtLtMapLightingSession
+ * The RtLtMapLightingSession structure holds information to be passed to
* \ref RtLtMapIlluminate. It is used to parameterize the lighting process.
*
- * The \ref RtLtMapLightingSession structure encapsulates a set of objects and
+ * The RtLtMapLightingSession structure encapsulates a set of objects and
* keeps track of the proportion of samples, within that set, that have already
* been lit by calls to \ref RtLtMapIlluminate. Each call performs lighting for
* one 'slice' of the whole 'session'. If the camera member is non-NULL, it is
* important that the camera is not moved between lighting slices.
*
- * The \ref RtLtMapLightingSession is also passed to
+ * The RtLtMapLightingSession is also passed to
* \ref RtLtMapLightMapsCreate, \ref RtLtMapLightMapsClear,
* \ref RtLtMapLightMapsDestroy and \ref RtLtMapAreaLightGroupCreate,
* though not all of the session structure's member will be used in
@@ -327,7 +324,7 @@ typedef enum RtLtMapMaterialFlags RtLtMapMaterialFlags;
/**
* \ingroup rtltmap
- * \ref RtLtMapObjectFlags is an enumerated type specifying the different
+ * RtLtMapObjectFlags is an enumerated type specifying the different
* lightmap-related flags which may be applied to world sectors and
* atomics. These values will be taken into consideration within
* \ref RtLtMapLightMapsCreate and \ref RtLtMapIlluminate.
@@ -345,11 +342,11 @@ enum RtLtMapObjectFlags
rtLTMAPOBJECTNAFLAG = 0,
rtLTMAPOBJECTLIGHTMAP = 1, /**< This object is to be lightmapped */
- rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colours should
- * be lit within \ref RtLtMapIlluminate. */
+ rtLTMAPOBJECTVERTEXLIGHT = 2, /**< This object's vertex prelight colors should
+ be lit within \ref RtLtMapIlluminate. */
rtLTMAPOBJECTNOSHADOW = 4, /**< This object does not cast shadows (useful, for
- * example, for moving objects for which dynamic
- * shadows are to be rendered - such as doors) */
+ example, for moving objects for which dynamic
+ shadows are to be rendered - such as doors) */
rtLTMAPOBJECTFLAGFORCEENUMSIZEINT = 0x7FFFFFFF
};
@@ -358,10 +355,13 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
/* Area-lighting stuff:*
***********************/
+
+typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
+
/**
* \ingroup rtltmap
- * \typedef RtLtMapAreaLightGroup
- * \ref RtLtMapAreaLightGroup is a structure which acts as a container
+ * \struct RtLtMapAreaLightGroup
+ * RtLtMapAreaLightGroup is a structure which acts as a container
* for area lights created by a call to \ref RtLtMapAreaLightGroupCreate.
* The containers may be chained and passed to \ref RtLtMapIlluminate.
* Each container has an optional pointer to a RwFrame which is used to
@@ -376,7 +376,6 @@ typedef enum RtLtMapObjectFlags RtLtMapObjectFlags;
* \see RtLtMapIlluminate
* \see RtLtMapIlluminateVisCallBack
*/
-typedef struct RtLtMapAreaLightGroup RtLtMapAreaLightGroup;
struct RtLtMapAreaLightGroup
{
RwSList *meshes; /**< A list of hierarchically-grouped area lights */
@@ -388,13 +387,15 @@ struct RtLtMapAreaLightGroup
/* Area light triangles are grouped by source mesh (this may change) */
typedef struct LtMapAreaLightMesh LtMapAreaLightMesh;
+
+#if (!defined(DOXYGEN))
struct LtMapAreaLightMesh
{
RwUInt32 flags; /* To hold hierarchical visibility culling flags,
* relevant to the object/triangle *currently* being lit. */
- RpMaterial *material; /* The emitter material, containing colour, etc */
+ RpMaterial *material; /* The emitter material, containing color, etc */
RwSphere sphere; /* Each mesh has an associated center and radius */
- RwReal ROI; /* Centred on the above sphere, the R.O.I. of the
+ RwReal ROI; /* Centered on the above sphere, the R.O.I. of the
* samples in this mesh (a conservative estimate) */
RwSList *triangles; /* A list of the area light triangles in this mesh */
};
@@ -412,6 +413,37 @@ struct LtMapAreaLight
* not worth storing 3 points, coarse culling is fine) */
RwV3d *lights; /* Array of area light sample positions (in world-space) */
};
+#endif /* (!defined(DOXYGEN)) */
+
+#if (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H))
+
+/**
+ * \ingroup rtltmapps2
+ * \ref RtLtMapSkyLumCalcCallBack is the callback to be called, from
+ * within \ref RtLtMapSkyBaseTextureProcess, to allow a user to select the
+ * function to process the textures for rendering on the PlayStation 2.
+ *
+ * The function is called for each span of a full color image, or for the
+ * CLUT in a palettised image, to compute the luminance and stores it in
+ * the alpha component of the texel.
+ *
+ * \param scanline A pointer to a scanline of \ref RwRGBA data.
+ * \param width Width of the scanline, in pixels.
+ *
+ * \return A pointer to the scanline on success, NULL otherwise.
+ *
+ * \see RtLtMapSkyBaseTextureProcess
+ * \see RtLtMapSkyLightingSessionBaseTexturesProcess
+ * \see RtLtMapSkyLightMapMakeDarkMap
+ * \see RtLtMapSkyLumCalcMaxCallBack
+ * \see RtLtMapSkyLumCalcSigmaCallBack
+ * \see RtLtMapSkySetLumCalcCallBack
+ * \see RtLtMapSkyGetLumCalcCallBack
+ */
+typedef RwRGBA *(*RtLtMapSkyLumCalcCallBack)(RwRGBA *scanline,
+ RwUInt32 width );
+
+#endif /* (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) */
#ifdef __cplusplus
@@ -487,6 +519,12 @@ RtLtMapDefaultVisCallBack(RpWorld *world,
RwV3d *lightPos,
RpLight __RWUNUSED__ *light);
+extern void
+RtLtMapSetVisCallBackCollisionScalar(RwReal scalar);
+
+extern RwReal
+RtLtMapGetVisCallBackCollisionScalar(void);
+
extern RtLtMapLightingSession *
RtLtMapLightingSessionInitialize(RtLtMapLightingSession *session,
RpWorld *world);
@@ -562,7 +600,6 @@ extern RwBool
RtLtMapSetAreaLightErrorCutoff(RwReal tolerance);
-
/* Texture-saving functionality: */
extern RwTexDictionary *
RtLtMapTexDictionaryCreate(RtLtMapLightingSession *session);
@@ -588,7 +625,13 @@ extern RpAtomic *RtLtMapSkyAtomicBaseTexturesProcess(RpAtomic *atomic);
extern RpWorldSector *
RtLtMapSkyWorldSectorBaseTexturesProcess(RpWorldSector *sector);
extern RtLtMapLightingSession *
-RtLtMapSkyBaseTexturesProcess(RtLtMapLightingSession *session);
+RtLtMapSkyLightingSessionBaseTexturesProcess(RtLtMapLightingSession *session);
+
+extern RwRGBA *RtLtMapSkyLumCalcMaxCallBack( RwRGBA *scanline, RwUInt32 width );
+extern RwRGBA *RtLtMapSkyLumCalcSigmaCallBack( RwRGBA *scanline, RwUInt32 width );
+
+extern RwBool RtLtMapSkySetLumCalcCallBack(RtLtMapSkyLumCalcCallBack cback);
+extern RtLtMapSkyLumCalcCallBack RtLtMapSkyGetLumCalcCallBack( void );
#endif /* (defined(SKY2_DRVMODEL_H) || defined(NULLSKY_DRVMODEL_H)) */
diff --git a/rwsdk/include/d3d8/rtltmap.rpe b/rwsdk/include/d3d8/rtltmap.rpe
index e510d78b..fb171c51 100644
--- a/rwsdk/include/d3d8/rtltmap.rpe
+++ b/rwsdk/include/d3d8/rtltmap.rpe
@@ -159,472 +159,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionLTMAPTOOL
{
diff --git a/rwsdk/include/d3d8/rtmipk.h b/rwsdk/include/d3d8/rtmipk.h
index c06a3879..6c777b41 100644
--- a/rwsdk/include/d3d8/rtmipk.h
+++ b/rwsdk/include/d3d8/rtmipk.h
@@ -15,9 +15,9 @@
/**
* \defgroup rtmipk RtMipmapK
- * \ingroup rttool
+ * \ingroup mipmapping
*
- * Ps2/Mipmap K Value Toolkit for RenderWare.
+ * PlayStation 2 / Mipmap K Value Toolkit for RenderWare.
*/
/****************************************************************************
diff --git a/rwsdk/include/d3d8/rtmipk.rpe b/rwsdk/include/d3d8/rtmipk.rpe
index 24e1fd33..04500e1d 100644
--- a/rwsdk/include/d3d8/rtmipk.rpe
+++ b/rwsdk/include/d3d8/rtmipk.rpe
@@ -149,472 +149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionMipmapK
{
diff --git a/rwsdk/include/d3d8/rtpick.h b/rwsdk/include/d3d8/rtpick.h
index 5ea78058..62f564a3 100644
--- a/rwsdk/include/d3d8/rtpick.h
+++ b/rwsdk/include/d3d8/rtpick.h
@@ -11,7 +11,7 @@
/**
* \defgroup rtpick RtPick
- * \ingroup rttool
+ * \ingroup collisiondetection
*
* Picking Toolkit for RenderWare.
*/
diff --git a/rwsdk/include/d3d8/rtpick.rpe b/rwsdk/include/d3d8/rtpick.rpe
index 055ea9ff..779e2f9a 100644
--- a/rwsdk/include/d3d8/rtpick.rpe
+++ b/rwsdk/include/d3d8/rtpick.rpe
@@ -149,472 +149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionPick
{
diff --git a/rwsdk/include/d3d8/rtpitexd.h b/rwsdk/include/d3d8/rtpitexd.h
index 39287bcd..602c608a 100644
--- a/rwsdk/include/d3d8/rtpitexd.h
+++ b/rwsdk/include/d3d8/rtpitexd.h
@@ -11,7 +11,7 @@
/**
* \defgroup rtpitexd RtPITexD
- * \ingroup rttool
+ * \ingroup texturedictionaries
*
* Platform Independent Texture Dictionaries
*
diff --git a/rwsdk/include/d3d8/rtpitexd.rpe b/rwsdk/include/d3d8/rtpitexd.rpe
index 0650ea5c..290ac864 100644
--- a/rwsdk/include/d3d8/rtpitexd.rpe
+++ b/rwsdk/include/d3d8/rtpitexd.rpe
@@ -203,472 +203,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionPITexDict
{
diff --git a/rwsdk/include/d3d8/rtpng.h b/rwsdk/include/d3d8/rtpng.h
index 694c8400..4ba8cf0f 100644
--- a/rwsdk/include/d3d8/rtpng.h
+++ b/rwsdk/include/d3d8/rtpng.h
@@ -12,7 +12,7 @@
/**
* \defgroup rtpng RtPNG
- * \ingroup rttool
+ * \ingroup imageconversiontools
*
* PNG/Portable Network Graphics Image Format Toolkit for RenderWare.
*
diff --git a/rwsdk/include/d3d8/rtpng.rpe b/rwsdk/include/d3d8/rtpng.rpe
index 7a6b6cc2..e3f6f0d7 100644
--- a/rwsdk/include/d3d8/rtpng.rpe
+++ b/rwsdk/include/d3d8/rtpng.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionPNG
{
diff --git a/rwsdk/include/d3d8/rtquat.h b/rwsdk/include/d3d8/rtquat.h
index 05e971d0..a0a6e89d 100644
--- a/rwsdk/include/d3d8/rtquat.h
+++ b/rwsdk/include/d3d8/rtquat.h
@@ -10,7 +10,7 @@
/**
* \defgroup rtquat RtQuat
- * \ingroup rttool
+ * \ingroup mathtools
*
* Quaternion Toolkit for RenderWare.
*
@@ -392,7 +392,7 @@ MACRO_START \
\
/* Matrix is orthogonal */ \
rwMatrixSetFlags((mpMatrix), \
- (rwMATRIXTYPEORTHOGANAL & \
+ (rwMATRIXTYPEORTHOGONAL & \
~rwMATRIXINTERNALIDENTITY) ); \
\
} \
diff --git a/rwsdk/include/d3d8/rtquat.rpe b/rwsdk/include/d3d8/rtquat.rpe
index e43bb50c..b239aba0 100644
--- a/rwsdk/include/d3d8/rtquat.rpe
+++ b/rwsdk/include/d3d8/rtquat.rpe
@@ -166,472 +166,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionQuat
{
diff --git a/rwsdk/include/d3d8/rtras.h b/rwsdk/include/d3d8/rtras.h
index 0a9064a8..957e21e6 100644
--- a/rwsdk/include/d3d8/rtras.h
+++ b/rwsdk/include/d3d8/rtras.h
@@ -11,7 +11,7 @@
/**
* \defgroup rtras RtRAS
- * \ingroup rttool
+ * \ingroup imageconversiontools
*
* RAS/Sun Raster Fule Format Image Format Toolkit for RenderWare.
*
diff --git a/rwsdk/include/d3d8/rtras.rpe b/rwsdk/include/d3d8/rtras.rpe
index 3398c3cc..a242ef49 100644
--- a/rwsdk/include/d3d8/rtras.rpe
+++ b/rwsdk/include/d3d8/rtras.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionRAS
{
diff --git a/rwsdk/include/d3d8/rtray.h b/rwsdk/include/d3d8/rtray.h
index 4bf0a343..b2f3d4bc 100644
--- a/rwsdk/include/d3d8/rtray.h
+++ b/rwsdk/include/d3d8/rtray.h
@@ -11,7 +11,7 @@
/**
* \defgroup rtray RtRay
- * \ingroup rttool
+ * \ingroup mathtools
*
* Line Toolkit for RenderWare.
*/
@@ -46,7 +46,9 @@ extern "C"
/* Line intersections */
extern RwReal RtLineTriangleIntersectionTest(RwLine *line, RwV3d *normal,
RwV3d *v0, RwV3d *v1, RwV3d *v2);
-extern RwReal RtLineSphereIntersectionTest(RwLine *line, RwSphere *sphere);
+extern RwBool RtLineSphereIntersectionTest(RwLine *line,
+ RwSphere *sphere,
+ RwReal *centerDist);
/* Line clipping */
extern RwLine *RtLineClipPlane(RwLine *line, RwPlane *plane);
diff --git a/rwsdk/include/d3d8/rtray.rpe b/rwsdk/include/d3d8/rtray.rpe
index 27788d94..c1ff4458 100644
--- a/rwsdk/include/d3d8/rtray.rpe
+++ b/rwsdk/include/d3d8/rtray.rpe
@@ -149,472 +149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionRay
{
diff --git a/rwsdk/include/d3d8/rtslerp.h b/rwsdk/include/d3d8/rtslerp.h
index ec41752c..4262b894 100644
--- a/rwsdk/include/d3d8/rtslerp.h
+++ b/rwsdk/include/d3d8/rtslerp.h
@@ -18,7 +18,7 @@
/**
* \defgroup rtslerp RtSlerp
- * \ingroup rttool
+ * \ingroup mathtools
*
* Slerp/Spherical Linear Interpolations Toolkit for RenderWare.
*
diff --git a/rwsdk/include/d3d8/rtslerp.rpe b/rwsdk/include/d3d8/rtslerp.rpe
index 847ccb00..64bd7571 100644
--- a/rwsdk/include/d3d8/rtslerp.rpe
+++ b/rwsdk/include/d3d8/rtslerp.rpe
@@ -167,472 +167,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionSlerp
{
diff --git a/rwsdk/include/d3d8/rtsplpvs.h b/rwsdk/include/d3d8/rtsplpvs.h
index 38ae118f..419717a1 100644
--- a/rwsdk/include/d3d8/rtsplpvs.h
+++ b/rwsdk/include/d3d8/rtsplpvs.h
@@ -12,7 +12,7 @@
/**
* \defgroup rtsplinepvs RtSplinePVS
- * \ingroup rttool
+ * \ingroup pvs
*
* Spline PVS Toolkit for RenderWare.
*/
diff --git a/rwsdk/include/d3d8/rtsplpvs.rpe b/rwsdk/include/d3d8/rtsplpvs.rpe
index d436b610..9736cbbc 100644
--- a/rwsdk/include/d3d8/rtsplpvs.rpe
+++ b/rwsdk/include/d3d8/rtsplpvs.rpe
@@ -149,472 +149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionSplinePVS
{
diff --git a/rwsdk/include/d3d8/rttiff.h b/rwsdk/include/d3d8/rttiff.h
index 9dbf22c8..b5d0ec00 100644
--- a/rwsdk/include/d3d8/rttiff.h
+++ b/rwsdk/include/d3d8/rttiff.h
@@ -11,7 +11,7 @@
/**
* \defgroup rttiff RtTIFF
- * \ingroup rttool
+ * \ingroup imageconversiontools
*
* TIFF/Tag Image File Format Image Format Toolkit for RenderWare.
*
diff --git a/rwsdk/include/d3d8/rttiff.rpe b/rwsdk/include/d3d8/rttiff.rpe
index f82c7d82..260b2329 100644
--- a/rwsdk/include/d3d8/rttiff.rpe
+++ b/rwsdk/include/d3d8/rttiff.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionTIFF
{
diff --git a/rwsdk/include/d3d8/rttilerd.h b/rwsdk/include/d3d8/rttilerd.h
index f11b703b..7cb8f887 100644
--- a/rwsdk/include/d3d8/rttilerd.h
+++ b/rwsdk/include/d3d8/rttilerd.h
@@ -11,7 +11,7 @@
/**
* \defgroup rttilerender RtTileRender
- * \ingroup rttool
+ * \ingroup cameras
*
* Tile renderer - e.g. grabbing screen shots - Toolkit for RenderWare.
*/
diff --git a/rwsdk/include/d3d8/rttilerd.rpe b/rwsdk/include/d3d8/rttilerd.rpe
index 78222d06..15c929f9 100644
--- a/rwsdk/include/d3d8/rttilerd.rpe
+++ b/rwsdk/include/d3d8/rttilerd.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionTileRend
{
diff --git a/rwsdk/include/d3d8/rttoc.h b/rwsdk/include/d3d8/rttoc.h
index 02893aa8..88926062 100644
--- a/rwsdk/include/d3d8/rttoc.h
+++ b/rwsdk/include/d3d8/rttoc.h
@@ -1,37 +1,38 @@
-/***************************************************************************
- * *
- * Module : rttoc.h *
- * *
- * Purpose : Table Of Contents (TOC) *
- * *
- **************************************************************************/
+/******************************************************************************
+ * *
+ * Module : rttoc.h *
+ * *
+ * Purpose : Table Of Contents (TOC) *
+ * *
+ ******************************************************************************/
#ifndef RTTOC_H
#define RTTOC_H
/**
* \defgroup rttoc RtTOC
- * \ingroup rttool
+ * \ingroup streaming
*
- * Table Of Contents (TOC) - e.g. creating a TOC for a RwStream.
+ * Table Of Contents (TOC) - creating a TOC for a stream.
*/
-/****************************************************************************
+/******************************************************************************
Includes
*/
#include "rwcore.h"
#include "rpcriter.h"
-/****************************************************************************
+/******************************************************************************
Defines
*/
-/****************************************************************************
+/******************************************************************************
Global Types
*/
typedef struct _rtTOCGUID _rtTOCGUID;
+#if (!defined(DOXYGEN))
struct _rtTOCGUID
{
RwUInt32 data1;
@@ -39,20 +40,22 @@ struct _rtTOCGUID
RwUInt16 data3;
RwUInt8 data4[8];
};
+#endif /* (!defined(DOXYGEN)) */
typedef struct RtTOCEntry RtTOCEntry;
/**
* \ingroup rttoc
* \struct RtTOCEntry
*
- * BLAH
+ * A Table Of Contents (TOC) entry structure.
*/
struct RtTOCEntry
{
- RwCorePluginID id; /**< Chunk ID */
- RwUInt32 offset;/**< Offset of chunk from the start of the file
- * including TOC */
- _rtTOCGUID guid; /**< GUID */
+ RwCorePluginID id; /**< Chunk ID */
+ RwUInt32 gid; /**< Game ID */
+ RwUInt32 offset; /**< Offset of chunk from the start of the file
+ including TOC */
+ _rtTOCGUID guid; /**< GUID */
};
typedef struct RtTOC RtTOC;
@@ -60,16 +63,16 @@ typedef struct RtTOC RtTOC;
/**
* \ingroup rttoc
* \struct RtTOC
- *
- * BLAH
+ *
+ * Table Of Contents (TOC) structure.
*/
struct RtTOC
{
- RwInt32 numEntries; /**< Number of entries*/
- RtTOCEntry entry[1]; /**< Entry*/
+ RwInt32 numEntries; /**< Number of entries */
+ RtTOCEntry entry[1]; /**< Entry */
};
-/****************************************************************************
+/******************************************************************************
Function prototypes
*/
diff --git a/rwsdk/include/d3d8/rttoc.rpe b/rwsdk/include/d3d8/rttoc.rpe
index 796f8de5..706372f2 100644
--- a/rwsdk/include/d3d8/rttoc.rpe
+++ b/rwsdk/include/d3d8/rttoc.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionTOC
{
diff --git a/rwsdk/include/d3d8/rtvcat.rpe b/rwsdk/include/d3d8/rtvcat.rpe
index 464ca886..ef5e286e 100644
--- a/rwsdk/include/d3d8/rtvcat.rpe
+++ b/rwsdk/include/d3d8/rtvcat.rpe
@@ -150,472 +150,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionVextexCacheStrip
{
diff --git a/rwsdk/include/d3d8/rtworld.h b/rwsdk/include/d3d8/rtworld.h
index fef3e17c..727d8122 100644
--- a/rwsdk/include/d3d8/rtworld.h
+++ b/rwsdk/include/d3d8/rtworld.h
@@ -14,7 +14,7 @@
/**
* \defgroup rtworld RtWorld
- * \ingroup rttool
+ * \ingroup basicgeometry
*
* World Import Toolkit for RenderWare.
*/
diff --git a/rwsdk/include/d3d8/rtworld.rpe b/rwsdk/include/d3d8/rtworld.rpe
index bc20947e..83449720 100644
--- a/rwsdk/include/d3d8/rtworld.rpe
+++ b/rwsdk/include/d3d8/rtworld.rpe
@@ -149,472 +149,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
enum e_rwdb_CriterionTlWorld
{
diff --git a/rwsdk/include/d3d8/rwcore.h b/rwsdk/include/d3d8/rwcore.h
index b9214c63..583de35f 100644
--- a/rwsdk/include/d3d8/rwcore.h
+++ b/rwsdk/include/d3d8/rwcore.h
@@ -22,7 +22,7 @@
/*************************************************************************
*
* Filename: <C:/daily/rwsdk/include/d3d8/rwcore.h>
- * Automatically Generated on: Wed Jul 10 10:45:00 2002
+ * Automatically Generated on: Thu Jan 23 11:06:24 2003
*
************************************************************************/
@@ -94,6 +94,7 @@ typedef struct rxHeapSuperBlockDescriptor rxHeapSuperBlockDescriptor;
typedef struct RxHeap RxHeap;
typedef struct rxHeapBlockHeader rxHeapBlockHeader;
+#if (!defined(DOXYGEN))
struct rxHeapFreeBlock
{
RwUInt32 size;
@@ -106,6 +107,7 @@ struct rxHeapSuperBlockDescriptor
RwUInt32 size;
rxHeapSuperBlockDescriptor *next;
};
+#endif /* (!defined(DOXYGEN)) */
/**
* \ingroup rwcoregeneric
@@ -124,6 +126,7 @@ struct RxHeap
* the heap needs resetting or not. */
};
+#if (!defined(DOXYGEN))
struct rxHeapBlockHeader
{
/* present in all blocks (used & unused) */
@@ -132,6 +135,7 @@ struct rxHeapBlockHeader
rxHeapFreeBlock *freeEntry; /* (or null) */
RwUInt32 pad[4]; /* alignment padding to 32 bytes */
};
+#endif /* (!defined(DOXYGEN)) */
/* This wrapper cheaply early-outs when a heap doesn't *need* resetting */
#define RxHeapReset(heap) \
@@ -356,8 +360,7 @@ struct RxIoSpec
/**
* \ingroup rwcoregeneric
- * \typedef RxNodeBodyFn
- * is the callback to be
+ * \ref RxNodeBodyFn is the callback to be
* called during pipeline execution -- and, typically, process
* \ref RxPacket's -- for the owning pipeline node.
*
@@ -373,7 +376,7 @@ typedef RwBool (*RxNodeBodyFn) (RxPipelineNode * self,
/**
* \ingroup rwcoregeneric
- * \typedef RxNodeInitFn
+ * \ref RxNodeInitFn
* is the callback to be called,
* for the owning node definition, the first time an \ref RxPipeline
* referencing that node definition is unlocked.
@@ -388,7 +391,7 @@ typedef RwBool (*RxNodeInitFn) (RxNodeDefinition * self);
/**
* \ingroup rwcoregeneric
- * \typedef RxNodeTermFn
+ * \ref RxNodeTermFn
* is the callback to be called,
* for the owning node definition, the last time an \ref RxPipeline
* referencing that node definition is destroyed or locked.
@@ -403,7 +406,7 @@ typedef void (*RxNodeTermFn) (RxNodeDefinition * self);
/**
* \ingroup rwcoregeneric
- * \typedef RxPipelineNodeInitFn
+ * \ref RxPipelineNodeInitFn
* is the callback to be called, for the owning pipeline node, whenever a
* \ref RxPipeline containing that that pipeline node is unlocked.
*
@@ -417,7 +420,7 @@ typedef RwBool (*RxPipelineNodeInitFn) (RxPipelineNode * self);
/**
* \ingroup rwcoregeneric
- * \typedef RxPipelineNodeTermFn
+ * \ref RxPipelineNodeTermFn
* is the callback to be called, for the owning pipeline node, whenever a
* \ref RxPipeline containing that that pipeline node is locked or
* destroyed.
@@ -432,14 +435,14 @@ typedef void (*RxPipelineNodeTermFn) (RxPipelineNode * self);
/**
* \ingroup rwcoregeneric
- * \typedef RxPipelineNodeConfigFn
+ * \ref RxPipelineNodeConfigFn
* is the callback to be called, for the owning pipeline node, whenever a
* \ref RxPipeline containing that that pipeline node is unlocked,
* *after* all \ref RxPipelineNodeInitFn's have been called for the
* pipeline in question. This func is to be used as described in
* RxPipelineNodeSendConfigMsg.
*
- * \param self A pointer to the pipeline node
+ * \param self A pointer to the pipeline node
* \param pipeline A pointer to the containing pipeline
*
* \return TRUE on success, FALSE otherwise.
@@ -449,21 +452,22 @@ typedef void (*RxPipelineNodeTermFn) (RxPipelineNode * self);
typedef RwBool (*RxPipelineNodeConfigFn) (RxPipelineNode * self,
RxPipeline * pipeline);
-/* - removed from the API Reference January 2002 -
- typedef RxConfigMsgHandlerFn
- is the callback to be called, for the owning pipeline node, whenever
- a message is sent to it by the ref RxPipelineNodeConfigFn of another
- pipeline node in the same pipeline. See ref RxPipelineNodeSendConfigMsg.
-
- param self A pointer to the pipeline node
- param msg Message ID
- param intparam Meaning is message-specific
- param ptrparam Meaning is message-specific
-
- return A RwInt32 value, 0: unserviced; -ve: error; +ve: informative success
-
- see RxNodeMethods
- */
+/**
+ * \ingroup rwcoregeneric
+ * \ref RxConfigMsgHandlerFn
+ * is the callback to be called, for the owning pipeline node, whenever
+ * a message is sent to it by the \ref RxPipelineNodeConfigFn of another
+ * pipeline node in the same pipeline. See \ref RxPipelineNodeSendConfigMsg.
+ *
+ * \param self A pointer to the pipeline node
+ * \param msg Message ID
+ * \param intparam Meaning is message-specific
+ * \param ptrparam Meaning is message-specific
+ *
+ * \return A RwInt32 value, 0: unserviced; -ve: error; +ve: informative success
+ *
+ * \see RxNodeMethods
+ */
typedef RwUInt32 (*RxConfigMsgHandlerFn) (RxPipelineNode * self,
RwUInt32 msg,
RwUInt32 intparam,
@@ -706,7 +710,7 @@ struct RxPipeline
/**
* \ingroup rwcoregeneric
- * \typedef RxPipelineNodeOutputCallBack
+ * \ref RxPipelineNodeOutputCallBack
* is the callback function supplied
* to \ref RxPipelineNodeForAllConnectedOutputs.
*
@@ -716,11 +720,11 @@ struct RxPipeline
* data structure (callbackdata). If no such structure was specified, this
* will be NULL.
*
- * \param node A pointer to the pipeline node whose outputs
- * are being traversed
+ * \param node A pointer to the pipeline node whose outputs
+ * are being traversed
* \param outputnode A pointer to the current output
- * pipeline node
- * \param callbackdata A pointer to optional user-supplied data
+ * pipeline node
+ * \param callbackdata A pointer to optional user-supplied data
*
* \return Returns a pointer to the \ref RxPipelineNode whose outputs are being
* traversed, or NULL to terminate traversal
@@ -744,6 +748,9 @@ extern "C"
{
#endif /* __cplusplus */
+extern void
+RxPipelineSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwBool
_rxPipelineOpen(void);
@@ -988,19 +995,19 @@ MACRO_STOP
/**
* \ingroup rwcoregeneric
- * \typedef RxNodeOutput
+ * \ref RxNodeOutput
* typedef for a reference to an output of a pipeline node */
typedef RwUInt32 *RxNodeOutput;
/**
* \ingroup rwcoregeneric
- * \typedef RxNodeInput
+ * \ref RxNodeInput
* typedef for a reference to the input of a pipeline node */
typedef RxPipelineNode *RxNodeInput;
/**
* \ingroup rwcoregeneric
- * \typedef RxLockedPipe
+ * \ref RxLockedPipe
* typedef for a reference to a locked pipeline
*/
typedef RxPipeline RxLockedPipe;
@@ -1119,275 +1126,6 @@ RxPipelineInsertDebugNode(RxPipeline *pipeline,
/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2altmdl.h ---*/
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeTransform.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetTransform(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeSubmitTriangle.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetSubmitTriangle(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeSubmitLine.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetSubmitLine(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeScatter.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetScatter(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeClone.h ---*/
-
-typedef struct RxPacketCacheCluster RxPacketCacheCluster;
-
-/**
- * \ingroup rwcoregeneric
- * \struct RxPacketCacheCluster
- * structure containing a cache of an \ref RxCluster's
- * within an \ref RxPacketCache
- */
-struct RxPacketCacheCluster
-{
- RwUInt32 slot; /**< A \ref RwUInt32 index into the \ref RxPacketCache's
- * array of RxPacketCacheCluster's */
- RwUInt16 flags; /**< A cache of the original cluster's flags */
- RwUInt16 stride; /**< A cache of the original cluster's stride */
- void *data; /**< A cache of the original cluster's data */
- RwUInt32 numAlloced; /**< A cache of the original cluster's numAlloced */
- RwUInt32 numUsed; /**< A cache of the original cluster's numUsed */
- RxPipelineCluster *clusterRef; /**< A cache of the original cluster's \ref RxPipelineCluster */
-};
-typedef struct RxPacketCache RxPacketCache;
-
-/**
- * \ingroup rwcoregeneric
- * \struct RxPacketCache
- * structure containing a cache of a \ref RxPacket */
-struct RxPacketCache
-{
- RwUInt16 packetFlags; /**< A cache of the original packet's flags */
- RwUInt16 pad[1]; /**< Alignment padding */
- RwUInt32 numClusters; /**< The number of present clusters in the
- * original packet when it was cloned */
- RwBool lastCloneDone;/**< Once the cache has been cloned by \ref RxPacketCacheClone
- * with (lastClone == TRUE), it should not be used again! */
- RwUInt32 pad2[1]; /**< Alignment padding */
- RxPacketCacheCluster clusters[1]; /**< An array of \ref RxPacketCacheCluster's,
- * extending beyond 1 element */
-};
-
-
-typedef struct RxNodeCloneInitData RxNodeCloneInitData;
-/**
- * \ingroup rwcoregeneric
- * \struct RxNodeCloneInitData
- * structure with which to initialize
- * clone a \ref RxNodeDefinition,
- * through \ref RxNodeDefinitionCloneCreate and
- * set up cloned \ref RxPipelineNode modes, through
- * \ref RxPipelineNodeCloneDefineModes */
-struct RxNodeCloneInitData
-{
- RwUInt32 numModes; /**< Specifies the number of modes in
- which the node should operate */
- RwUInt32 numOutputs; /**< Specifies the number of outputs of this
- Clone node, which is also the maximum
- number of outputs to which any one mode
- may dispatch packets */
- RwUInt32 *modeSizes; /**< Specifies the number of outputs to which
- each mode dispatches packets */
- RwUInt32 **modes; /**< An array of numModes pointers to arrays
- (of length numOutputs) specifying the
- outputs, in order, to which each mode
- should dispatch packets (output zero is
- the first output) */
-};
-
-/**
- * \ingroup rwcoregeneric
- * \struct RxNodeCloneData
- * structure which is the private
- * data of Clone nodes \ref RxPipelineNode */
-typedef struct RxNodeCloneData RxNodeCloneData;
-struct RxNodeCloneData
-{
- RwBool optimized; /**< \ref RwBool specifying whether \ref RxPipelineNodeCloneOptimize
- * has been run on this \ref RxPipelineNode yet */
- RwUInt32 currentMode; /**< \ref RwUInt32 The current mode of operation */
- RxNodeCloneInitData *data;/**< A pointer to \ref RxNodeCloneInitData data
- * specifying the modes of operation */
-};
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionCloneCreate(RxNodeCloneInitData *data);
-extern RwBool RxPipelineNodeCloneDefineModes(
- RxPipeline *pipeline,
- RxPipelineNode *node,
- RxNodeCloneInitData *data);
-extern RwBool RxNodeDefinitionCloneDestroy(RxNodeDefinition *def);
-extern RwBool RxPipelineNodeCloneOptimize(RxPipeline *pipeline,
- RxPipelineNode *node);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmStash.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetImmStash(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmRenderSetup.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetImmRenderSetup(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmMangleTriangleIndices.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetImmMangleTriangleIndices(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmMangleLineIndices.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetImmMangleLineIndices(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeImmInstance.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetImmInstance(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeCullTriangle.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetCullTriangle(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeClipTriangle.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetClipTriangle(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeClipLine.h ---*/
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetClipLine(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8texdic.h ---*/
/*--- Automatically derived from: C:/daily/rwsdk/driver/d3d8/d3d8rendst.h ---*/
@@ -1415,7 +1153,7 @@ extern RxNodeDefinition *RxNodeDefinitionGetClipLine(void);
*/
/**
- * \ingroup datatypes
+ * \ingroup rwraster
* \ref RwRasterLockMode represents the options available for locking
* a raster so that it may be modified (see API function \ref RwRasterLock). An
* application may wish to write to the raster, read from the raster or
@@ -1445,7 +1183,7 @@ enum RwRasterLockMode
typedef enum RwRasterLockMode RwRasterLockMode;
/**
- * \ingroup datatypes
+ * \ingroup rwraster
* \ref RwRasterFlipMode represents
* raster flip modes */
enum RwRasterFlipMode
@@ -1457,7 +1195,7 @@ enum RwRasterFlipMode
typedef enum RwRasterFlipMode RwRasterFlipMode;
/**
- * \ingroup datatypes
+ * \ingroup rwraster
* RwRasterType
* This type represents the options available for creating a new
* raster (se API function \ref RwRasterCreate)*/
@@ -1476,7 +1214,7 @@ enum RwRasterType
typedef enum RwRasterType RwRasterType;
/**
- * \ingroup datatypes
+ * \ingroup rwraster
* \ref RwRasterFormat is a set of values and flags which may be combined to
* specify a raster format. The format chosen for a particular raster depends
* on the hardware device and the raster type specified at creation time
@@ -1569,8 +1307,8 @@ typedef enum RwRasterPrivateFlag RwRasterPrivateFlag;
*/
/**
- * \ingroup datatypes
- * \typedef RwRaster
+ * \ingroup rwraster
+ * \struct RwRaster
* Raster containing device-dependent pixels.
* This should be considered an opaque type.
* Use the RwRaster API functions to access.
@@ -1661,6 +1399,8 @@ extern "C"
#endif /* __cplusplus */
/* Creating destroying rasters */
+extern void RwRasterSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwRaster *RwRasterCreate(RwInt32 width, RwInt32 height,
RwInt32 depth, RwInt32 flags);
extern RwBool RwRasterDestroy(RwRaster * raster);
@@ -1743,8 +1483,6 @@ extern RwBool RwRasterValidatePlugins(const RwRaster * raster);
#endif /* (defined(__ICL)) */
-#include <windows.h>
-
#if (defined(RWDEBUG))
#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC))
#define _CRTDBG_MAP_ALLOC
@@ -1837,48 +1575,16 @@ MACRO_START \
} \
MACRO_STOP
-/* LEGACY-SUPPORT macros */
-#define RWIM2DVERTEXSetCameraX(vert, camx) RwIm2DVertexSetCameraX(vert, camx)
-#define RWIM2DVERTEXSetCameraY(vert, camy) RwIm2DVertexSetCameraY(vert, camy)
-#define RWIM2DVERTEXSetCameraZ(vert, camz) RwIm2DVertexSetCameraZ(vert, camz)
-#define RWIM2DVERTEXSetRecipCameraZ(vert, recipz) \
- RwIm2DVertexSetRecipCameraZ(vert, recipz)
-#define RWIM2DVERTEXGetCameraX(vert) RwIm2DVertexGetCameraX(vert)
-#define RWIM2DVERTEXGetCameraY(vert) RwIm2DVertexGetCameraY(vert)
-#define RWIM2DVERTEXGetCameraZ(vert) RwIm2DVertexGetCameraZ(vert)
-#define RWIM2DVERTEXGetRecipCameraZ(vert) RwIm2DVertexGetRecipCameraZ(vert)
-#define RWIM2DVERTEXSetScreenX(vert, scrnx) RwIm2DVertexSetScreenX(vert, scrnx)
-#define RWIM2DVERTEXSetScreenY(vert, scrny) RwIm2DVertexSetScreenY(vert, scrny)
-#define RWIM2DVERTEXSetScreenZ(vert, scrnz) RwIm2DVertexSetScreenZ(vert, scrnz)
-#define RWIM2DVERTEXGetScreenX(vert) RwIm2DVertexGetScreenX(vert)
-#define RWIM2DVERTEXGetScreenY(vert) RwIm2DVertexGetScreenY(vert)
-#define RWIM2DVERTEXGetScreenZ(vert) RwIm2DVertexGetScreenZ(vert)
-#define RWIM2DVERTEXSetU(vert, u, recipz) RwIm2DVertexSetU(vert, u, recipz)
-#define RWIM2DVERTEXSetV(vert, v, recipz) RwIm2DVertexSetV(vert, v, recipz)
-#define RWIM2DVERTEXGetU(vert) RwIm2DVertexGetU(vert)
-#define RWIM2DVERTEXGetV(vert) RwIm2DVertexGetV(vert)
-#define RWIM2DVERTEXSetRealRGBA(vert, red, green, blue, alpha) \
- RwIm2DVertexSetRealRGBA(vert, red, green, blue, alpha)
-#define RWIM2DVERTEXSetIntRGBA(vert, red, green, blue, alpha) \
- RwIm2DVertexSetIntRGBA(vert, red, green, blue, alpha)
-#define RWIM2DVERTEXGetRed(vert) RwIm2DVertexGetRed(vert)
-#define RWIM2DVERTEXGetGreen(vert) RwIm2DVertexGetGreen(vert)
-#define RWIM2DVERTEXGetBlue(vert) RwIm2DVertexGetBlue(vert)
-#define RWIM2DVERTEXGetAlpha(vert) RwIm2DVertexGetAlpha(vert)
-#define RWIM2DVERTEXCopyRGBA(dst, src) RwIm2DVertexCopyRGBA(dst, src)
-#define RWIM2DVERTEXClipRGBA(o, i, n, f) RwIm2DVertexClipRGBA(o, i, n, f)
-
/****************************************************************************
Global Types
*/
/* We use RwD3D8Vertex to drive the hardware in 2D mode */
-/**
- * \ingroup rwcoredriverd3d8
- * \typedef RwD3D8Vertex
+/*
* D3D8 vertex structure definition for 2D geometry
*/
+#if !defined(RWADOXYGENEXTERNAL)
typedef struct RwD3D8Vertex RwD3D8Vertex;
/**
* \ingroup rwcoredriverd3d8
@@ -1897,47 +1603,41 @@ struct RwD3D8Vertex
RwReal u; /**< Texture coordinate U */
RwReal v; /**< Texture coordinate V */
};
+#endif /* !defined(RWADOXYGENEXTERNAL) */
/* Define types used */
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
- * \typedef RwIm2DVertex
+ * \ref RwIm2DVertex
* Typedef for a RenderWare Graphics Immediate Mode 2D Vertex
*/
typedef RwD3D8Vertex RwIm2DVertex;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
-/* LEGACY-SUPPORT macro */
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
- * \def RWIM2DVERTEX
- * RWIM2DVERTEX is a legacy macro for RwIm2DVertex
- */
-#define RWIM2DVERTEX RwIm2DVertex
-
-/**
- * \ingroup rwcoredriverd3d8
- * \typedef RxVertexIndex
+ * \ref RxVertexIndex
*
* Typedef for a RenderWare Graphics PowerPipe Immediate
* Mode Vertex
*/
typedef RwUInt16 RxVertexIndex;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
+
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
- * \typedef RwImVertexIndex
+ * \ref RwImVertexIndex
* Typedef for a RenderWare Graphics Immediate Mode Vertex.
*/
typedef RxVertexIndex RwImVertexIndex;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
-/* LEGACY-SUPPORT macro */
-/**
- * \ingroup rwcoredriverd3d8
- * \def RWIMVERTEXINDEX
- * RWIMVERTEXINDEX is a legacy macro for RwImVertexIndex
- */
-#define RWIMVERTEXINDEX RwImVertexIndex
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
@@ -1950,8 +1650,10 @@ typedef struct
RwUInt32 numTextureStageStateChanges; /**< Number of Texture Stage States changed */
RwUInt32 numMaterialChanges; /**< Number of Material changes */
RwUInt32 numLightsChanged; /**< Number of Lights changed */
+ RwUInt32 numVBSwitches; /**< Number of Vertex Buffer switches */
}
RwD3D8Metrics;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
#endif /* D3D8_DRVMODEL_H */
@@ -1973,15 +1675,13 @@ RwD3D8Metrics;
/* We use D3D8 formats for the instanced versions, to allow hardware T&L */
-/**
- * \ingroup corep2d3d8
- * \typedef RxObjSpace3DVertex
+/*
* Typedef for an RxObjSpace3DVertex.
*/
typedef struct RxObjSpace3DVertex RxObjSpace3DVertex;
/**
- * \ingroup corep2d3d8
+ * \ingroup cored3d8
* \struct RxObjSpace3DVertex
* Structure representing object space vertex.
*/
@@ -2000,21 +1700,25 @@ struct RxObjSpace3DVertex
#define RxObjSpace3DVertexFullSize (sizeof(RxObjSpace3DVertex))
/**
- * \ingroup corep2d3d8
- * \typedef RxObjSpace3DLitVertex
+ * \ingroup cored3d8
+ * \ref RxObjSpace3DLitVertex
* Typedef for an RxObjSpace3DLitVertex.
*/
typedef RxObjSpace3DVertex RxObjSpace3DLitVertex;
/**
- * \ingroup corep2d3d8
- * \typedef RwIm3DVertex
+ * \ingroup cored3d8
+ * \ref RwIm3DVertex
* Typedef for an RwIm3DVertex.
*/
typedef RxObjSpace3DLitVertex RwIm3DVertex;
/* LEGACY-SUPPORT macro */
-#define RWIM3DVERTEX RwIm3DVertex
+/**
+ * \ingroup cored3d8
+ * \ref RxScrSpace2DVertex
+ * Typedef for an RxScrSpace2DVertex structure
+ */
typedef RwIm2DVertex RxScrSpace2DVertex;
/****************************************************************************
@@ -2161,55 +1865,6 @@ MACRO_STOP
#define RwIm3DVertexCopyRGBA(_dst, _src) (((_dst)->color) = ((_src)->color))
-/* LEGACY-SUPPORT macros */
-#define RWIM2DCAMERAVERTEXSetU(_devvert, _camvert, _u, _recipz) \
- RwIm2DCameraVertexSetU(_devvert, _camvert, _u, _recipz)
-#define RWIM2DCAMERAVERTEXSetV(_devvert, _camvert, _v, _recipz) \
- RwIm2DCameraVertexSetV(_devvert, _camvert, _v, _recipz)
-#define RWIM3DVERTEXGetNext(vert) RwIm3DVertexGetNext(vert)
-#define RWIM3DVERTEXSetPos(vert, imx, imy, imz) RwIm3DVertexSetPos(vert, imx, imy, imz)
-#define RWIM3DVERTEXGetPos(vert) RwIm3DVertexGetPos(vert)
-#define RWIM3DVERTEXSetU(vert, imu) RwIm3DVertexSetU(vert, imu)
-#define RWIM3DVERTEXSetV(vert, imv) RwIm3DVertexSetV(vert, imv)
-#define RWIM3DVERTEXSetRGBA(vert, r, g, b, a) RwIm3DVertexSetRGBA(vert, r, g, b, a)
-#define RWIM3DVERTEXSetNormal(vert, imx, imy, imz) RwIm3DVertexSetNormal(vert, imx, imy, imz)
-#define RWIM3DVERTEXCopyRGBA(dst,src) RwIm3DVertexCopyRGBA(dst,src)
-#define RXOBJSPACE3DVERTEXGetPos(_vert, _pos) \
- RxObjSpace3DVertexGetPos(_vert, _pos)
-#define RXOBJSPACE3DVERTEXSetPos(_vert, _pos) \
- RxObjSpace3DVertexSetPos(_vert, _pos)
-#define RXOBJSPACE3DVERTEXGetPreLitColor(_vert, _col) \
- RxObjSpace3DVertexGetPreLitColor(_vert, _col)
-#define RXOBJSPACE3DVERTEXSetPreLitColor(_vert, _col) \
- RxObjSpace3DVertexSetPreLitColor(_vert, _col)
-#define RXOBJSPACE3DVERTEXGetColor RxObjSpace3DVertexGetColor
-#define RXOBJSPACE3DVERTEXGetNormal(_vert, _normal) \
- RxObjSpace3DVertexGetNormal(_vert, _normal)
-#define RXOBJSPACE3DVERTEXSetNormal(_vert, _normal) \
- RxObjSpace3DVertexSetNormal(_vert, _normal)
-#define RXOBJSPACE3DVERTEXGetU(_vert) RxObjSpace3DVertexGetU(_vert)
-#define RXOBJSPACE3DVERTEXGetV(_vert) RxObjSpace3DVertexGetV(_vert)
-#define RXOBJSPACE3DVERTEXSetU(_vert, _imu) \
- RxObjSpace3DVertexSetU(_vert, _imu)
-#define RXOBJSPACE3DVERTEXSetV(_vert, _imv) \
- RxObjSpace3DVertexSetV(_vert, _imv)
-#define RXOBJSPACE3DLITVERTEXGetPos(vert, pos) \
- RxObjSpace3DLitVertexGetPos(vert, pos)
-#define RXOBJSPACE3DLITVERTEXSetPos(vert, pos) \
- RxObjSpace3DLitVertexSetPos(vert, pos)
-#define RXOBJSPACE3DLITVERTEXGetColor(vert, col) \
- RxObjSpace3DLitVertexGetColor(vert, col)
-#define RXOBJSPACE3DLITVERTEXSetColor(vert, col) \
- RxObjSpace3DLitVertexSetColor(vert, col)
-#define RXOBJSPACE3DLITVERTEXGetU(vert) \
- RxObjSpace3DLitVertexGetU(vert)
-#define RXOBJSPACE3DLITVERTEXGetV(vert) \
- RxObjSpace3DLitVertexGetV(vert)
-#define RXOBJSPACE3DLITVERTEXSetU(vert, imu) \
- RxObjSpace3DLitVertexSetU(vert, imu)
-#define RXOBJSPACE3DLITVERTEXSetV(vert, imv) \
- RxObjSpace3DLitVertexSetV(vert, imv)
-
/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2renderstate.h ---*/
@@ -2224,7 +1879,6 @@ enum RxRenderStateFlag
rxRENDERSTATEFLAG_ZWRITEENABLE = 0x00000004, /**<Z-Buffer writing is to be enabled */
rxRENDERSTATEFLAG_VERTEXALPHAENABLE = 0x00000008, /**<Vertex alpha is to be enabled */
rxRENDERSTATEFLAG_FOGENABLE = 0x00000010, /**<Fog is to be enabled */
- rxRENDERSTATEFLAG_ALPHAPRIMITIVEBUFFER = 0x00000020, /**<Alpha primitive buffering is to be enabled */
rxRENDERSTATEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RxRenderStateFlag RxRenderStateFlag;
@@ -2248,7 +1902,6 @@ struct RxRenderStateVector
RwRGBA BorderColor; /**< Border color for texturing address mode border */
RwFogType FogType; /**< Select the type of fogging to use */
RwRGBA FogColor; /**< Color used for fogging */
- RwUInt8 *FogTable; /**< A 256 entry fog table */
};
#if (!defined(RxRenderStateVectorAssign))
@@ -2274,52 +1927,6 @@ extern RxRenderStateVector *RxRenderStateVectorLoadDriverState(RxRenderSta
#endif /* __cplusplus */
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/p2clpcom.h ---*/
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeRGBAInterp.h ---*/
-
-struct NodeRGBAInterpData
-{
- RwBool rgbaInterpOn;
- RxRenderStateVector state;
-};
-typedef struct NodeRGBAInterpData NodeRGBAInterpData;
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition *RxNodeDefinitionGetRGBAInterp(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/nodeUVInterp.h ---*/
-
-typedef struct RxNodeUVInterpSettings RxNodeUVInterpSettings;
-struct RxNodeUVInterpSettings
-{
- RwBool uvInterpOn;
- RxRenderStateVector state;
-};
-
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern RxNodeDefinition * RxNodeDefinitionGetUVInterp(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
/*--- Automatically derived from: C:/daily/rwsdk/src/baimage.h ---*/
/****************************************************************************
@@ -2342,8 +1949,8 @@ typedef enum RwImageFlag RwImageFlag;
*/
/**
- * \ingroup datatypes
- * \typedef RwImage
+ * \ingroup rwimage
+ * \struct RwImage
* Image containing device-independent pixels.
* This should be considered an opaque type.
* Use the RwImage API functions to access.
@@ -2367,7 +1974,7 @@ struct RwImage
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup datatypes
+ * \ingroup rwimage
* \ref RwImageCallBackRead
* is the function registered with \ref RwImageRegisterImageFormat that is used,
* for example by \ref RwImageRead and \ref RwImageReadMaskedImage,
@@ -2375,13 +1982,15 @@ struct RwImage
*
* \param imageName Pointer to a string containing the file name of the image.
*
+ * \return Returns a pointer to the image read.
+ *
* \see RwImageRegisterImageFormat
*
*/
typedef RwImage *(*RwImageCallBackRead)(const RwChar * imageName);
/**
- * \ingroup datatypes
+ * \ingroup rwimage
* \ref RwImageCallBackWrite
* is the function registered with \ref RwImageRegisterImageFormat that is used,
* for example by \ref RwImageWrite,
@@ -2474,6 +2083,11 @@ extern "C"
#endif /* __cplusplus */
/* Creating and destroying */
+
+extern void RwImageSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
+extern void RwImageFormatSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwImage *RwImageCreate(RwInt32 width, RwInt32 height,
RwInt32 depth);
extern RwBool RwImageDestroy(RwImage * image);
@@ -2505,6 +2119,8 @@ extern RwImage *RwImageWrite(RwImage * image,
/* Setting and getting the default path for images */
extern RwChar *RwImageGetPath(void);
extern const RwChar *RwImageSetPath(const RwChar * path);
+ /* Fast image path change */
+extern void _rwImageSwapPath(RwChar **path, RwInt32 *size);
/* Setting */
#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE))
@@ -2593,8 +2209,8 @@ extern const RwImage *RwImageStreamWrite(const RwImage * image,
*/
/**
- * \ingroup datatypes
- * \typedef RwTexDictionary
+ * \ingroup rwtexdict
+ * \struct RwTexDictionary
* is a texture dictionary containing textures.
* This should be considered an opaque type.
* Use the RwTexDictionary API functions to access.
@@ -2615,8 +2231,8 @@ struct RwTexDictionary
/* Parent is the dictionary */
/**
- * \ingroup datatypes
- * \typedef RwTexture
+ * \ingroup rwtexture
+ * \struct RwTexture
* is a texture object.
* This should be considered an opaque type.
* Use the RwTexture API functions to access.
@@ -2641,7 +2257,7 @@ struct RwTexture
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup datatypes
+ * \ingroup rwtexture
* \ref RwTextureCallBackRead
* represents the function used by \ref RwTextureRead to read the specified
* texture from a disk file. This function should return a pointer to the
@@ -2662,7 +2278,7 @@ typedef RwTexture *(*RwTextureCallBackRead)(const RwChar *name,
const RwChar *maskName);
/**
- * \ingroup datatypes
+ * \ingroup rwtexture
* \ref RwTextureCallBack
* represents the function called from \ref RwTexDictionaryForAllTextures
* for all textures in a given texture dictionary. This function should
@@ -2681,7 +2297,7 @@ typedef RwTexture *(*RwTextureCallBack)(RwTexture *texture, void *pData);
/**
- * \ingroup datatypes
+ * \ingroup rwtexdict
* \ref RwTexDictionaryCallBack
* represents the function called from \ref RwTexDictionaryForAllTexDictionaries
* for all texture dictionaries that currently exist. This function should
@@ -2702,7 +2318,7 @@ typedef RwTexDictionary *(*RwTexDictionaryCallBack)(RwTexDictionary *dict, void
/**
- * \ingroup datatypes
+ * \ingroup rwtexture
* \ref RwTextureCallBackMipmapGeneration
* is the callback function supplied to \ref RwTextureSetMipmapGenerationCallBack
* and returned from \ref RwTextureGetMipmapGenerationCallBack.
@@ -2726,7 +2342,7 @@ typedef RwRaster *(*RwTextureCallBackMipmapGeneration)(RwRaster * raster,
RwImage * image);
/**
- * \ingroup datatypes
+ * \ingroup rwtexture
* \ref RwTextureCallBackMipmapName
* is the callback function supplied to \ref RwTextureSetMipmapNameCallBack and
* returned from \ref RwTextureGetMipmapNameCallBack.
@@ -2926,10 +2542,14 @@ extern RwTexture *RwTextureSetMaskName(RwTexture * texture,
const RwChar * maskName);
/* Creating/destroying dictionaries */
+extern void RwTexDictionarySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwTexDictionary *RwTexDictionaryCreate(void);
extern RwBool RwTexDictionaryDestroy(RwTexDictionary * dict);
/* Textures */
+void RwTextureSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwTexture *RwTextureCreate(RwRaster * raster);
extern RwBool RwTextureDestroy(RwTexture * texture);
@@ -3071,13 +2691,11 @@ enum RwClipFlag
rwCLIPFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
-typedef enum RwClipFlag RwClipFlag;
-
-/**
- * \ingroup rwcoregeneric
- * \typedef RwClipFlag
+/*
* Typedef for RwClipFlag enumeration specifying the clipping status of a vertex
*/
+typedef enum RwClipFlag RwClipFlag;
+
typedef struct RxCamSpace3DVertex RxCamSpace3DVertex;
@@ -3094,8 +2712,8 @@ struct RxCamSpace3DVertex
/* Clip flags on this vertex */
RwUInt8 clipFlags; /**< Clip flags for the vertex generated during transformation into camera-space, see \ref RwClipFlag */
RwUInt8 pad[3]; /**< Alignment padding */
- /* Lit colour */
- RwRGBAReal col; /**< Accumulated \ref RwReal light values (initialized to zero or prelight colours) */
+ /* Lit color */
+ RwRGBAReal col; /**< Accumulated \ref RwReal light values (initialized to zero or prelight colors) */
/* Only used by the clipper */
RwReal u; /**< Texture U coordinate */
RwReal v; /**< Texture V coordinate */
@@ -3103,8 +2721,8 @@ struct RxCamSpace3DVertex
/* Supports pipeline1 apps: */
/**
- * \ingroup datatypes
- * \typedef RwCameraVertex
+ * \ingroup rwcoregeneric
+ * \ref RwCameraVertex
* typedef for a structure describing a camera-space 3D vertex.
*/
typedef RxCamSpace3DVertex RwCameraVertex;
@@ -3159,9 +2777,7 @@ enum RxGeometryFlag
rxGEOMETRYFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
-/**
- * \ingroup rwcoregeneric
- * \typedef RxGeometryFlag
+/*
* Typedef for RxGeometryFlag enumeration describing geometry properties
*/
typedef enum RxGeometryFlag RxGeometryFlag;
@@ -3186,7 +2802,7 @@ struct RxMeshStateVector
/* We can't necessarily reference an RpMaterial in here (i.e with Im3D),
* because RpMaterials are defined in RpWorld not RwCore */
RwTexture *Texture; /**< A pointer to a \ref RwTexture */
- RwRGBA MatCol; /**< \ref RwRGBA material colour */
+ RwRGBA MatCol; /**< \ref RwRGBA material color */
RxPipeline *Pipeline; /**< A pointer to the material pipeline where appropriate */
/* rwPRIMTYPETRILIST/TRIFAN/TRISTRIP/LINELIST/POLYLINE */
RwPrimitiveType PrimType; /**< \ref RwPrimitiveType primitive type */
@@ -3295,7 +2911,7 @@ struct RxVStep
/* CamNorms.csl */
/**
* \ingroup rwcoregeneric
- * \typedef RxCamNorm
+ * \ref RxCamNorm
* typedef for \ref RwV3d used by the RxClVStep cluster */
typedef RwV3d RxCamNorm;
@@ -3342,7 +2958,7 @@ extern RxClusterDefinition RxClTriPlanes;
/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/baim3d.h ---*/
/**
- * \ingroup datatypes
+ * \ingroup rwim3d
* RwIm3DTransformFlags
* The bit-field type RwIm3DTransformFlags
* specifies options available for controlling execution of the 3D immediate
@@ -3373,6 +2989,8 @@ typedef struct rwIm3DVertexCache RwIm3DVertexCache;
#endif /* (0&& defined(SKY2)) */
/* complete information to reconstruct post-transform Im3D "mesh" packet */
+
+#if (!defined(DOXYGEN))
struct _rwIm3DPoolStash
{
RwUInt32 flags; /* rwIM3D_VERTEXUV, rwIM3D_ALLOPAQUE, rwIM3D_NOCLIP etc */
@@ -3413,14 +3031,11 @@ struct rwIm3DRenderPipelines
struct rwImmediGlobals
{
- RxPipeline *genericIm3DTransformPipeline;
- rwIm3DRenderPipelines genericIm3DRenderPipelines;
-
RxPipeline *im3DTransformPipeline;
rwIm3DRenderPipelines im3DRenderPipelines;
/* Platforms that have their own non-generic pipelines
- * (OPENGL, D3D7, SKY2, KAMUI2, DOLPHIN) put them here: */
+ * (OPENGL, D3D8, SKY2, KAMUI2, DOLPHIN) put them here: */
RxPipeline *platformIm3DTransformPipeline;
rwIm3DRenderPipelines platformIm3DRenderPipelines;
@@ -3431,12 +3046,11 @@ struct rwImmediGlobals
/* The line PS2All render pipe automatically
* calls this PS2AllMat pipeline: */
RxPipeline *ps2AllMatIm3DLinePipeline;
- /* PS2Manager pipelines */
- RxPipeline *ps2ManagerIm3DRenderPipeline;
#endif /* (defined(SKY2_DRVMODEL_H)) */
rwIm3DPool curPool; /* The current cache of transformed vertices */
};
+#endif /* (!defined(DOXYGEN)) */
#ifdef __cplusplus
@@ -3458,9 +3072,6 @@ extern RwBool RwIm3DRenderIndexedPrimitive(RwPrimitiveType primType,
RwInt32 numIndices);
extern RwBool RwIm3DRenderPrimitive(RwPrimitiveType primType);
-extern RxPipeline *RwIm3DGetGenericTransformPipeline(void);
-extern RxPipeline *RwIm3DGetGenericRenderPipeline(RwPrimitiveType primType);
-
extern RxPipeline *RwIm3DGetTransformPipeline(void);
extern RxPipeline *RwIm3DGetRenderPipeline( RwPrimitiveType primType);
extern RxPipeline *RwIm3DSetTransformPipeline(RxPipeline *pipeline);
@@ -3670,8 +3281,23 @@ extern RwBool RwD3D8CameraIsBBoxFullyInsideFrustum(const void *camera, const voi
* Cheking the CPU capabilities
*/
-extern RwBool _rwIntelSSEsupported(void);
+#if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE))
extern RwBool _rwIntelMMXsupported(void);
+extern RwBool _rwIntelSSEsupported(void);
+extern RwBool _rwIntelSSE2supported(void);
+extern RwBool _rwAMD3DNowSupported(void);
+
+#else
+extern RwBool _rwD3D8CPUSupportsMMX;
+extern RwBool _rwD3D8CPUSupportsSSE;
+extern RwBool _rwD3D8CPUSupportsSSE2;
+extern RwBool _rwD3D8CPUSupports3DNow;
+
+#define _rwIntelMMXsupported() _rwD3D8CPUSupportsMMX
+#define _rwIntelSSEsupported() _rwD3D8CPUSupportsSSE
+#define _rwIntelSSE2supported() _rwD3D8CPUSupportsSSE2
+#define _rwAMD3DNowSupported() _rwD3D8CPUSupports3DNow
+#endif
/*
* Enabling texture format conversions when loading textures from a texture
@@ -3680,6 +3306,8 @@ extern RwBool _rwIntelMMXsupported(void);
extern void
_rwD3D8TexDictionaryEnableRasterFormatConversion(RwBool enable);
+/* Called from RwEngineInit to give the driver a chance to register plugins */
+extern RwBool _rwDeviceRegisterPlugin(void);
#ifdef __cplusplus
}
@@ -3689,7 +3317,7 @@ _rwD3D8TexDictionaryEnableRasterFormatConversion(RwBool enable);
/* LEGACY-MACRO */
/**
* \ingroup rwcoredriverd3d8
- * \ref RwD3DLoadNativeTexture is a legacy macro for compatability with
+ * \ref RwD3DLoadNativeTexture is a legacy macro for compatibility with
* RWD3D7 applications that can be used to read a compressed texture from
* the specified DDS file on disk.
*
@@ -3820,17 +3448,16 @@ struct RwFrame
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup datatypes
- * \typedef RwFrame
- Frame for defining object position and orientation.
+ * \ingroup rwframe
+ * \struct RwFrame
+ * Frame for defining object position and orientation.
* This should be considered an opaque type.
* Use the RwFrame API functions to access.
*/
typedef struct RwFrame RWALIGN(RwFrame, rwFRAMEALIGNMENT);
/**
- * \ingroup datatypes
- * \typedef RwFrameCallBack
+ * \ingroup rwframe
* \ref RwFrameCallBack type represents the function
* called from \ref RwFrameForAllChildren for all child frames linked to a given frame.
* This function should return a pointer to the current frame to indicate success.
@@ -3840,6 +3467,8 @@ typedef struct RwFrame RWALIGN(RwFrame, rwFRAMEALIGNMENT);
* iterator.
* \param data Pointer to developer-defined data structure.
*
+ * \return
+ *
* \see RwFrameForAllChildren
*
*/
@@ -3867,6 +3496,9 @@ extern "C"
{
#endif /* __cplusplus */
+extern void RwFrameSetFreeListCreateParams(RwInt32 blockSize,
+ RwInt32 numBlocksToPrealloc );
+
/* Finding what is attached to a frame */
extern RwFrame *
RwFrameForAllObjects(RwFrame * frame,
@@ -3945,6 +3577,9 @@ extern RwFrame *
RwFrameUpdateObjects(RwFrame * frame);
/* Creating destroying frames */
+extern void
+RwFrameSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwFrame *
RwFrameCreate(void);
@@ -4030,12 +3665,15 @@ _rwFramePurgeClone(RwFrame *root);
typedef struct RwObjectHasFrame RwObjectHasFrame;
typedef RwObjectHasFrame * (*RwObjectHasFrameSyncFunction)(RwObjectHasFrame *object);
+
+#if (!defined(DOXYGEN))
struct RwObjectHasFrame
{
RwObject object;
RwLLLink lFrame;
RwObjectHasFrameSyncFunction sync;
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
Function prototypes
@@ -4082,12 +3720,15 @@ MACRO_STOP
Global types
*/
typedef struct rpTextureChunkInfo RwTextureChunkInfo;
+
+#if (!defined(DOXYGEN))
struct rpTextureChunkInfo
{
RwTextureFilterMode filtering;
RwTextureAddressMode addressingU;
RwTextureAddressMode addressingV;
};
+#endif /* (!defined(DOXYGEN)) */
/* Bit flags defining properties of textures when stream */
enum RwTextureStreamFlags
@@ -4169,11 +3810,14 @@ _rwTextureChunkInfoRead(RwStream *stream,
*/
typedef struct rwFrameList rwFrameList;
+
+#if (!defined(DOXYGEN))
struct rwFrameList
{
RwFrame **frames;
RwInt32 numFrames;
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
Global Variables
@@ -4257,7 +3901,7 @@ _rwFrameListStreamWrite(const rwFrameList *frameList,
typedef struct RwBBox RwBBox;
/**
- * \ingroup datatypes
+ * \ingroup rwbbox
* \struct RwBBox
* This type represents a 3D axis-aligned bounding-box
* specified by the positions of two corners which lie on a diagonal.
@@ -4442,7 +4086,7 @@ MACRO_STOP
*/
/**
- * \ingroup datatypes
+ * \ingroup rwcamera
* RwCameraClearMode
* Camera clear flags */
enum RwCameraClearMode
@@ -4458,7 +4102,7 @@ enum RwCameraClearMode
typedef enum RwCameraClearMode RwCameraClearMode;
/**
- * \ingroup datatypes
+ * \ingroup rwcamera
* RwCameraProjection
* This type represents the options available for
* setting the camera projection model, either perspective projection or
@@ -4473,7 +4117,7 @@ enum RwCameraProjection
typedef enum RwCameraProjection RwCameraProjection;
/**
- * \ingroup datatypes
+ * \ingroup rwcamera
* RwFrustumTestResult
* This type represents the results from a
* camera frustum test on a given sphere (see API function
@@ -4489,8 +4133,8 @@ typedef enum RwFrustumTestResult RwFrustumTestResult;
/**
- * \ingroup datatypes
- * \typedef RwCamera
+ * \ingroup rwcamera
+ * \struct RwCamera
* Camera object for rendering a view.
* This should be considered an opaque type.
* Use the RwCamera API functions to access.
@@ -4502,6 +4146,8 @@ typedef RwCamera *(*RwCameraBeginUpdateFunc) (RwCamera * camera);
typedef RwCamera *(*RwCameraEndUpdateFunc) (RwCamera * camera);
typedef struct RwFrustumPlane RwFrustumPlane;
+
+#if (!defined(DOXYGEN))
/*
* Structure describing a frustrum plane.
*/
@@ -4514,7 +4160,7 @@ struct RwFrustumPlane
RwUInt8 pad;
};
-#if (!defined(DOXYGEN))
+
struct RwCamera
{
RwObjectHasFrame object;
@@ -4560,8 +4206,7 @@ struct RwCamera
#endif /* (!defined(DOXYGEN)) */
/**
- * \ingroup datatypes
- * \typedef RwCameraCallBack
+ * \ingroup rwcamera
* \ref RwCameraCallBack type represents a function called from any camera
* iterator that may be implemented in plugins. This function should return a
* pointer to the current camera to indicate success. The callback may return
@@ -4569,6 +4214,8 @@ struct RwCamera
*
* \param camera Pointer to the current camera, supplied by iterator.
* \param data Pointer to developer-defined data structure.
+ *
+ * \return
*/
typedef RwCamera *(*RwCameraCallBack)(RwCamera *camera, void *data);
@@ -4594,6 +4241,8 @@ extern RwCamera *RwCameraShowRaster(RwCamera * camera, void *pDev,
RwUInt32 flags);
/* Creation and destruction */
+extern void RwCameraSetFreeListCreateParams( RwInt32 blockSize,
+ RwInt32 numBlocksToPrealloc );
extern RwBool RwCameraDestroy(RwCamera * camera);
extern RwCamera *RwCameraCreate(void);
extern RwCamera *RwCameraClone(RwCamera * camera);
@@ -4669,10 +4318,9 @@ extern RwFrame *RwCameraGetFrame(const RwCamera *camera);
/*--- Automatically derived from: C:/daily/rwsdk/driver/common/barwtyp.h ---*/
-/*--- Automatically derived from: C:/daily/rwsdk/src/bacamval.h ---*/
-
/*--- Automatically derived from: C:/daily/rwsdk/src/pipe/p2/bapipe.h ---*/
+#if (!defined(DOXYGEN))
struct rwPipeGlobals
{
RwFreeList *pipesFreeList; /* Save mallocs, use a freelist */
@@ -4695,24 +4343,12 @@ struct rwPipeGlobals
RxPipeline *genericWorldSectorPipeline;
RxPipeline *genericMaterialPipeline;
/* Platforms that have their own non-generic pipelines
- * (OPENGL, D3D7, SKY2, KAMUI2, DOLPHIN) put them here: */
+ * (OPENGL, D3D8, SKY2, KAMUI2, DOLPHIN) put them here: */
RxPipeline *platformAtomicPipeline;
RxPipeline *platformWorldSectorPipeline;
RxPipeline *platformMaterialPipeline;
-#if (defined(SKY2_DRVMODEL_H))
- /* We have extra flavours of pipe under SKY2.
- * PS2All and PS2AllMat are the defaults.
- * - see RpWorldSectorSkyGetPS2AllPipeline, etc */
- RxPipeline *ps2ManagerAtomicPipeline;
- RxPipeline *allInOneAtomicPipeline;
- RxPipeline *vanillaAtomicPipeline;
- RxPipeline *ps2ManagerWorldSectorPipeline;
- RxPipeline *allInOneWorldSectorPipeline;
- RxPipeline *vanillaWorldSectorPipeline;
- RxPipeline *vanillaMaterialPipeline;
-#endif /* (SKY2_DRVMODEL_H) */
-
};
+#endif /* (!defined(DOXYGEN)) */
typedef struct rwPipeGlobals rwPipeGlobals;
@@ -4740,9 +4376,7 @@ extern RwInt32 _rxPipelineGlobalsOffset;
/* Camera stream format */
/**
- * \ingroup datatypes
- * \typedef RwCameraChunkInfo
- *
+ * \ingroup rwcamera
* \ref RwCameraChunkInfo is typedef'd to a structure that holds camera
* data. This should be considered an opaque type. Use the RwCamera
* API functions to access it.
@@ -4750,6 +4384,8 @@ extern RwInt32 _rxPipelineGlobalsOffset;
typedef struct rwStreamCamera RwCameraChunkInfo;
typedef struct rwStreamCamera rwStreamCamera;
+
+#if (!defined(DOXYGEN))
struct rwStreamCamera
{
RwV2d viewWindow;
@@ -4758,6 +4394,7 @@ struct rwStreamCamera
RwReal fogPlane;
RwUInt32 projection;
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
Function prototypes
diff --git a/rwsdk/include/d3d8/rwplcore.h b/rwsdk/include/d3d8/rwplcore.h
index b0ff7dfa..3740ae60 100644
--- a/rwsdk/include/d3d8/rwplcore.h
+++ b/rwsdk/include/d3d8/rwplcore.h
@@ -22,7 +22,7 @@
/*************************************************************************
*
* Filename: <C:/daily/rwsdk/include/d3d8/rwplcore.h>
- * Automatically Generated on: Wed Jul 10 10:45:00 2002
+ * Automatically Generated on: Thu Jan 23 11:06:23 2003
*
************************************************************************/
@@ -68,6 +68,7 @@ typedef struct _RwUInt64 RwUInt64;
typedef struct _RwInt64 RwInt64;
/* We'll do it with structures (can't do maths on these, but OK for allocation): */
+#if (!defined(DOXYGEN))
#ifdef rwBIGENDIAN
struct _RwUInt64
{
@@ -99,6 +100,7 @@ struct _RwInt64
#error "ENDIAN-ness undefined!"
#endif /* rwLITTLEENDIAN */
#endif /* rwBIGENDIAN */
+#endif /* (!defined(DOXYGEN)) */
#define RWZERO64 { (RwUInt32)0, (RwUInt32)0 }
#endif /* _MSC_VER */
@@ -108,7 +110,8 @@ typedef struct _RwInt128 RwInt128;
/* We'll do it with structures
* (can't do maths on these, but OK for allocation): */
-#ifdef rwBIGENDIAN
+#if (!defined(DOXYGEN))
+#ifdef rwBIGENDIAN
struct _RwUInt128
{
RwUInt64 top;
@@ -139,6 +142,7 @@ struct _RwInt128
#error "ENDIAN-ness undefined!"
#endif /* rwLITTLEENDIAN */
#endif /* rwBIGENDIAN */
+#endif /* (!defined(DOXYGEN)) */
#define RWZERO128 { RWZERO64, RWZERO64 }
@@ -160,6 +164,10 @@ struct _RwInt128
#define rwFRAMEALIGNMENT sizeof(RwUInt32)
#define rwV4DALIGNMENT sizeof(RwUInt32)
+#if (!defined(rwMALLOCALIGNMENT))
+#define rwMALLOCALIGNMENT sizeof(RwUInt32)
+#endif /* (!defined(rwMALLOCALIGNMENT) */
+
#if (defined(_MSC_VER))
#if (defined(RWVERBOSE))
@@ -501,7 +509,7 @@ int32fromreal(RwReal x)
#if (!defined(NOASM))
static __inline RwUInt32
-RwFastRealToUInt32(RwReal x)
+RwFastRealToUInt32Inline(RwReal x)
{
RwUInt32 res;
@@ -510,6 +518,9 @@ RwFastRealToUInt32(RwReal x)
return(res);
}
+
+#define RwFastRealToUInt32 RwFastRealToUInt32Inline
+
#endif /* (defined(NOASM)) */
#endif /* (defined(_MSC_VER)) */
@@ -627,11 +638,14 @@ do \
while(0)
typedef union _rwIEEEFloatShapeType _rwIEEEFloatShapeType;
+
+#if (!defined(DOXYGEN))
union _rwIEEEFloatShapeType
{
float value;
unsigned int word;
};
+#endif /* (!defined(DOXYGEN)) */
#define _RW_GET_FLOAT_WORD(i,d) \
do { \
@@ -949,13 +963,13 @@ while(0)
#if (!defined(rwSqrt))
/* NOTE: this is overloaded in drvmodel.h for some targets (SKY2 and XBOX atm)
* [we do in fact do overload w/ sqrtf there, if RW_USE_SPF,
- * for D3D7, D3D8, OpenGL and SoftRas] */
+ * for D3D8, OpenGL and SoftRas] */
#define rwSqrt(_result, _x) rwSqrtMacro(_result, _x)
#endif /* (!defined(rwSqrt)) */
#if (!defined(rwInvSqrt))
/* NOTE: this is overloaded in drvmodel.h for some targets (SKY2 and XBOX atm)
* [we do in fact do overload w/ (1 / sqrtf) there, if RW_USE_SPF,
- * for D3D7, D3D8, OpenGL and SoftRas] */
+ * for D3D8, OpenGL and SoftRas] */
#define rwInvSqrt(_recip, _x) rwInvSqrtMacro(_recip, _x)
#endif /* (!defined(rwInvSqrt)) */
#if (!defined(RwTan))
@@ -977,7 +991,22 @@ while(0)
/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/batypes.h ---*/
#define rwLIBRARYBASEVERSION 0x31000
-#define rwLIBRARYCURRENTVERSION 0x33002
+#define rwLIBRARYCURRENTVERSION 0x34005
+
+#define rwLIBRARYVERSION31000 0x31000
+#if (rwLIBRARYVERSION31000 < rwLIBRARYBASEVERSION)
+#error "Time to remove all rwLIBRARYVERSION31000 code"
+#endif
+
+#define rwLIBRARYVERSION34001 0x34001
+#if (rwLIBRARYVERSION34001 < rwLIBRARYBASEVERSION)
+#error "Time to remove all rwLIBRARYVERSION34001 code"
+#endif
+
+#define rwLIBRARYVERSION34002 0x34002
+#if (rwLIBRARYVERSION34002 < rwLIBRARYBASEVERSION)
+#error "Time to remove all rwLIBRARYVERSION34002 code"
+#endif
/*
* RWBUILDNUMBER
@@ -993,14 +1022,16 @@ while(0)
* The following Doxygen comment MUST be copied into RwCore.h,
* so don't move it from here. */
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup rwcore
- * \page rwcoreoverview Core Library Overview
+ * \ingroup fundamentaltypes
+ * \page fundtypesoverview Fundamental Types Overview
*
- * LIBRARY: rwcore.lib
- * HEADER: rwcore.h
+ * \par Requirements
+ * \li \b Headers: rwcore.h
+ * \li \b Libraries: rwcore.lib
*
- * This library provides the fundamental RenderWare features.
+ * The rwcore.lib library provides the fundamental RenderWare features.
*
* When creating a RenderWare application, this library must always be
* linked.
@@ -1024,7 +1055,7 @@ while(0)
* supplied User Guide. The RenderWare Engine \ref rwengine API is
* usually the starting point for new developers.
*/
-
+#endif /* RWADOXYGENEXTERNAL */
#if (!defined(RWFORCEENUMSIZEINT))
#define RWFORCEENUMSIZEINT ((RwInt32)((~((RwUInt32)0))>>1))
@@ -1157,7 +1188,6 @@ while(0)
#if (defined(RWDEBUG) && defined(RWVERBOSE))
-/* #include <windows.h> */
#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC))
#define _CRTDBG_MAP_ALLOC
#endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */
@@ -1189,6 +1219,8 @@ while(0)
/* NB volatile keyword required for VC5.0 to ensure a reload - AMB */
typedef union RwSplitBits RwSplitBits;
+
+#if (!defined(DOXYGEN))
union RwSplitBits
{
RwReal nReal;
@@ -1219,6 +1251,7 @@ struct RwSplitFixed
#endif /* rwBIGENDIAN */
typedef union RwUnionReal RwUnionReal;
+
union RwUnionReal /* MSB is sign bit in any circumstance */
{
RwReal real; /* 4 bytes interpreted as RwReal */
@@ -1226,6 +1259,7 @@ union RwUnionReal /* MSB is sign bit in any circumstance */
RwFixed fixed; /* 4 bytes interpreted as 16:16 fixed */
RwSplitFixed splitfixed; /* 4 bytes interpreted as 16:16 fixed */
};
+#endif /* (!defined(DOXYGEN)) */
/*****************/
@@ -1233,14 +1267,9 @@ union RwUnionReal /* MSB is sign bit in any circumstance */
/*****************/
-/**
- * \ingroup datatypes
- * \typedef RwV2d
- * typedef for struct RwV2d
- */
typedef struct RwV2d RwV2d;
/**
- * \ingroup datatypes
+ * \ingroup rwv2d
* \struct RwV2d
* This type represents points in a 2D space, such as device
* space, specified by the (x, y) coordinates of the point.
@@ -1251,14 +1280,9 @@ struct RwV2d
RwReal y; /**< Y vlaue */
};
-/**
- * \ingroup datatypes
- * \typedef RwV3d
- * typedef for struct RwV3d
- */
typedef struct RwV3d RwV3d;
/**
- * \ingroup datatypes
+ * \ingroup rwv3d
* \struct RwV3d
* This type represents 3D points and vectors specified by
* the (x, y, z) coordinates of a 3D point or the (x, y, z) components of a
@@ -1274,13 +1298,16 @@ struct RwV3d
#define RWV4DALIGNMENT(_v4d) \
(! (((rwV4DALIGNMENT)-1) & ((RwUInt32)(_v4d))))
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwv4d
* \struct RwV4d
* This type represents 4D points and vectors specified by
* the (x, y, z, w) coordinates of a 4D point or the (x, y, z, w) components of a
* 4D vector.
*/
+#endif /* RWADOXYGENEXTERNAL */
+
struct RwV4d
{
RwReal x; /**< X value */
@@ -1289,27 +1316,21 @@ struct RwV4d
RwReal w; /**< W value */
};
-/**
- * \ingroup datatypes
- * \typedef RwV4d
- * typedef for struct RwV4d
- */
typedef struct RwV4d RWALIGN(RwV4d, rwV4DALIGNMENT);
-/**
- * \ingroup datatypes
- * \typedef RwRect
- * typedef for struct RwRect
- */
typedef struct RwRect RwRect;
+
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup geometricaltypes
* \struct RwRect
* This type represents a 2D device space rectangle specified
* by the position of the top-left corner (the offset x, y) and its width (w)
* and height (h).
*/
+#endif /* RWADOXYGENEXTERNAL */
+
struct RwRect
{
RwInt32 x; /**< X value of the top-left corner */
@@ -1318,18 +1339,15 @@ struct RwRect
RwInt32 h; /**< Height of the rectangle */
};
-/**
- * \ingroup datatypes
- * \typedef RwSphere
- * typedef for struct RwSphere
- */
typedef struct RwSphere RwSphere;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup geometricaltypes
* \struct RwSphere
* This type represents a sphere specified by the position
* of its center and its radius
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwSphere
{
RwV3d center; /**< Sphere center */
@@ -1341,18 +1359,16 @@ struct RwSphere
( *(_target) = *(_source) )
#endif /* (!defined(RwSphereAssign)) */
-/**
- * \ingroup datatypes
- * \typedef RwLine
- * typedef for struct RwLine
- */
typedef struct RwLine RwLine;
+
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup geometricaltypes
* \struct RwLine
* This type represents a 3D line specified by the position
* of its start and end points.
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwLine
{
RwV3d start; /**< Line start */
@@ -1367,11 +1383,13 @@ struct RwLine
/* The maximum number of texture coordinates */
#define rwMAXTEXTURECOORDS 8
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup fundtypesdatatypes
* RwTextureCoordinateIndex
* This type represents the index for texture coordinates.
*/
+#endif /* RWADOXYGENEXTERNAL */
enum RwTextureCoordinateIndex
{
rwNARWTEXTURECOORDINATEINDEX = 0,
@@ -1387,18 +1405,16 @@ enum RwTextureCoordinateIndex
};
typedef enum RwTextureCoordinateIndex RwTextureCoordinateIndex;
-/**
- * \ingroup datatypes
- * \typedef RwTexCoords
- * typedef for struct RwTexCoords
- */
typedef struct RwTexCoords RwTexCoords;
+
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup fundtypesdatatypes
* \struct RwTexCoords
* This type represents the the u and v texture
* coordinates of a particular vertex.
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwTexCoords
{
RwReal u; /**< U value */
@@ -1409,10 +1425,13 @@ struct RwTexCoords
/* Singley linked list macros. End marked as NULL */
typedef struct RwSLLink RwSLLink; /*** RwSLLink ***/
+
+#if (!defined(DOXYGEN))
struct RwSLLink
{
RwSLLink *next;
};
+#endif /* (!defined(DOXYGEN)) */
#define rwSLLinkGetData(link,type,entry) \
((type *)(((RwUInt8 *)(link))-offsetof(type,entry)))
@@ -1427,10 +1446,13 @@ struct RwSLLink
((linkvar)->next)
typedef struct RwSingleList RwSingleList;
+
+#if (!defined(DOXYGEN))
struct RwSingleList
{
RwSLLink link;
};
+#endif /* (!defined(DOXYGEN)) */
#define rwSingleListInitialize(list) \
(list)->link.next= NULL;
@@ -1446,11 +1468,14 @@ struct RwSingleList
/* Doubly linked list. End marked as start (its a ring) */
typedef struct RwLLLink RwLLLink; /*** RwLLLink ***/
+
+#if (!defined(DOXYGEN))
struct RwLLLink
{
RwLLLink *next;
RwLLLink *prev;
};
+#endif /* (!defined(DOXYGEN)) */
#define rwLLLinkGetData(linkvar,type,entry) \
((type *)(((RwUInt8 *)(linkvar))-offsetof(type,entry)))
@@ -1472,10 +1497,13 @@ struct RwLLLink
((linkvar)->next)
typedef struct RwLinkList RwLinkList;
+
+#if (!defined(DOXYGEN))
struct RwLinkList
{
RwLLLink link;
};
+#endif /* (!defined(DOXYGEN)) */
#define rwLinkListInitialize(list) \
( (list)->link.next = ((RwLLLink *)(list)), \
@@ -1497,19 +1525,17 @@ struct RwLinkList
#define rwLinkListGetTerminator(list) \
(&((list)->link))
-/**
- * \ingroup datatypes
- * \typedef RwSurfaceProperties
- * typedef for struct RwSurfaceProperties
- */
typedef struct RwSurfaceProperties RwSurfaceProperties;
+
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup fundtypesdatatypes
* \struct RwSurfaceProperties
* This type represents the ambient, diffuse and
* specular reflection coefficients of a particular geometry. Each coefficient
* is specified in the range 0.0 (no reflection) to 1.0 (maximum reflection).
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwSurfaceProperties
{
RwReal ambient; /**< ambient reflection coefficient */
@@ -1541,10 +1567,10 @@ struct RwSurfaceProperties
*/
#define RWFIX_MIN (1)
#define RWFIX_MAX (0x7fffffff)
-#define RwFixedCast(A) (RwInt32FromRealMacro((A) * 65536.0f))
-#define RwFixedToInt(A) ((A) >> 16)
-#define RwFixedToFloat(A) ((float)(((float)(A)) * (1.0f / 65536.0f)))
+#define RwFixedToInt(a) ((a) >> 16)
+#define RwFixedToFloat(a) ((float)(((float)(a)) * (1.0f / 65536.0f)))
#define RwFixedToReal(a) ((RwReal)(((RwReal)(a)) * (1.0f / 65536.0f)))
+#define RwIntToFixed(a) ((a) << 16)
#define RwRealToFixed(a) (RwInt32FromRealMacro((a) * 65536.0f))
#define RwRealAbs(a) ((RwReal)((a) >= (RwReal)(0.0) ? (a) : (-(a))))
#define RwRealMin2(a,b) ((RwReal)( ((a) <= (b)) ? (a) : (b)))
@@ -1555,7 +1581,6 @@ struct RwSurfaceProperties
#ifndef NORWREALSHORTCUT
#define RToFixed RwRealToFixed
#define RAbs RwRealAbs
-#define FxCast RwFixedCast
#define FxToInt RwFixedToInt
#define FxToFloat RwFixedToFloat
#define FxToReal RwFixedToFloat
@@ -1580,6 +1605,8 @@ struct RwSurfaceProperties
* typedef for struct RwPlane
*/
typedef struct RwPlane RwPlane;
+
+#if (!defined(DOXYGEN))
/*
* This type represents a plane
*/
@@ -1588,7 +1615,7 @@ struct RwPlane
RwV3d normal; /**< Normal to the plane */
RwReal distance; /**< Distance to plane from origin in normal direction*/
};
-
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
Defines
@@ -1613,7 +1640,7 @@ typedef enum RwPlaneType RwPlaneType;
(*(const RwReal *)(((const RwUInt8 *)(&((vect).x)))+(RwInt32)(y)))
#define SETCOORD(vect,y,value) \
(((*(RwReal *)(((RwUInt8 *)(&((vect).x)))+(RwInt32)(y))))=(value))
-#define SETCONTCOORD(vect,y,value) \
+#define SETCONSTCOORD(vect,y,value) \
(((*(const RwReal *) \
(((const RwUInt8 *) \
(&((vect).x)))+(RwInt32)(y))))=(value))
@@ -1624,7 +1651,7 @@ typedef enum RwPlaneType RwPlaneType;
/**
- * \ingroup rwcore
+ * \ingroup integertypes
* \page inttypes Integer Types
*
* RenderWare supports a number of integer types:
@@ -1661,7 +1688,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup realtypes
* \typedef RwReal
*
* RenderWare supports a single RwReal floating-point type to aid portability
@@ -1683,7 +1710,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup realtypes
* \typedef RwFixed
*
* RenderWare supports a single RwFixed fixed-point type.
@@ -1696,15 +1723,15 @@ typedef enum RwPlaneType RwPlaneType;
* RWFIX_MAX and RWFIX_MIN respectively.
*
* The following macros are provided to help you work with RwFixed datatypes:
- * \li RwFixedCast(x) Cast the integer portion of an RwFixed to another type.
* \li RwFixedToInt(x) Convert an RwFixed to an integer. (The fractional portion is lost.)
* \li RwFixedToFloat(x) Convert an RwFixed to a float.
* \li RwFixedToReal(x) Convert an RwFixed to an RwReal.
* \li RwRealToFixed(x) Convert an RwReal to an RwFixed. (Some precision may be lost.)
+ * \li RwIntToFixed(x) Convert an RwInt32 to an RwFixed. (Some precision may be lost.)
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwInt8
*
* Signed 8 bit integer type.
@@ -1712,7 +1739,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwUInt8
*
* Unsigned 8bit integer type.
@@ -1720,7 +1747,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwChar
*
* Character type.
@@ -1728,7 +1755,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwInt16
*
* Signed 16 bit integer type.
@@ -1736,7 +1763,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwUInt16
*
* Unsigned 16 bit integer type.
@@ -1744,7 +1771,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwInt32
*
* Signed 32 bit integer type.
@@ -1752,7 +1779,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwUInt32
*
* Unsigned 32 bit integer type.
@@ -1760,7 +1787,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwInt64
*
* Signed 64 bit integer type.
@@ -1768,7 +1795,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwUInt64
*
* Unsigned 64 bit integer type.
@@ -1776,7 +1803,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwInt128
*
* Signed 128 bit integer type.
@@ -1784,7 +1811,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwUInt128
*
* Unsigned 128 bit integer type.
@@ -1792,7 +1819,7 @@ typedef enum RwPlaneType RwPlaneType;
*/
/**
- * \ingroup datatypes
+ * \ingroup integertypes
* \typedef RwBool
*
* Boolean type.
@@ -1894,8 +1921,10 @@ enum RwCorePluginID
rwID_PITEXDICTIONARY = 0x23,
rwID_TOC = 0x24,
rwID_PRTSTDGLOBALDATA = 0x25,
+ rwID_ALTPIPE = 0x26,
+ rwID_PIPEDS = 0x27,
/* Insert before MAX and increment MAX */
- rwID_COREPLUGINIDMAX = 0x26,
+ rwID_COREPLUGINIDMAX = 0x28,
rwCOREPLUGINIDFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RwCorePluginID RwCorePluginID ;
@@ -1944,12 +1973,15 @@ typedef enum RwPlatformID RwPlatformID;
*/
typedef struct RwObject RwObject;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwobject
* \struct RwObject
* This should be considered an opaque type. Use
* the RwObject API functions to access.
*/
+#endif /* RWADOXYGENEXTERNAL */
+
struct RwObject
{
RwUInt8 type; /**< Internal Use */
@@ -1960,20 +1992,23 @@ struct RwObject
/* Often a Frame */
};
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * \typedef RwObjectCallBack
+ * \ingroup rwobject
+ * \ref RwObjectCallBack
* callback function supplied for object callback functions.
*
- * \return Pointer to the current object
- *
* \param object Pointer to the current object, supplied by
- * iterator.
- * \param data Pointer to developer-defined data structure.
+ * iterator.
+ * \param data Pointer to developer-defined data structure.
+ *
+ * \return Pointer to the current object
*
* \see RwFrameForAllObjects
*
*/
+#endif /* RWADOXYGENEXTERNAL */
+
typedef RwObject *(*RwObjectCallBack)(RwObject *object, void *data);
/****************************************************************************
@@ -2128,6 +2163,8 @@ typedef int (*vecSscanfFunc)(const RwChar *buffer,
...) /* __RWFORMAT__(scanf, 2, 3) */;
typedef struct RwStringFunctions RwStringFunctions;
+
+#if (!defined(DOXYGEN))
struct RwStringFunctions
{
vecSprintfFunc vecSprintf ;
@@ -2147,6 +2184,7 @@ struct RwStringFunctions
vecStrtokFunc vecStrtok;
vecSscanfFunc vecSscanf;
};
+#endif /* (!defined(DOXYGEN)) */
/*--- Automatically derived from: C:/daily/rwsdk/src/plcore/rwdbgerr.h ---*/
@@ -2203,32 +2241,32 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore;
#endif /* (!defined(rwFREELISTCLEANLANDFILL)) */
#define RWFREELISTALIGNED(_pData, _freelist) \
- (! (((RwUInt32)(_pData)) & ((_freelist)->alignmentMinusOne)) )
+ (! (((RwUInt32)(_pData)) & ((_freelist)->alignment - 1)) )
/*****************************
* REGULAR MEMORY ALLOCATION *
*****************************/
/**
- * \ingroup rwmem
+ * \ingroup memoryfileinterface
* \def RwMalloc
* RwMalloc(_s) is a macro for malloc(_s).
*/
/**
- * \ingroup rwmem
+ * \ingroup memoryfileinterface
* \def RwFree
* RwFree(_p) is a macro for free(_p).
*/
/**
- * \ingroup rwmem
+ * \ingroup memoryfileinterface
* \def RwCalloc
* RwCalloc(_n, _s) is a macro for calloc(_n, _s).
*/
/**
- * \ingroup rwmem
+ * \ingroup memoryfileinterface
* \def RwRealloc
* RwRealloc(_p, _s) is a macro for realloc(_p, _s).
*/
@@ -2252,8 +2290,6 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore;
# if (defined(_MSC_VER))
# if ((_MSC_VER>=1000) && defined(_DEBUG))
-/* Pick up _ASSERTE() macro */
-/* #include <windows.h> */
#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC))
#define _CRTDBG_MAP_ALLOC
#endif /* defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC)) */
@@ -2556,12 +2592,12 @@ typedef enum RwErrorCodePlugin_errcore RwErrorCodePlugin_errcore;
typedef struct RwMemoryFunctions RwMemoryFunctions;
/**
- * \ingroup datatypes
+ * \ingroup memoryfileinterface
* \struct RwMemoryFunctions
* This type represents the memory functions used
* by RenderWare. By default, the standard ANSI functions are used. The
* application may install an alternative interface providing that it is ANSI
- * compliant (see API function \ref RwEngineInit):
+ * compliant (in RenderWare Graphics see API function RwEngineInit):
*/
struct RwMemoryFunctions
{
@@ -2574,60 +2610,44 @@ struct RwMemoryFunctions
void *(*rwcalloc)(size_t numObj, size_t sizeObj); /**< calloc calloc */
};
-typedef struct RwFreeBlock RwFreeBlock;
-/*
- * Freelists -- from Page 131
- * Advanced Animation and Rendering Techniques
- * Alan Watt and Mark Watt
- * Addison-Wesley 1993,
- * ISBN 0-201-54412-1:
+ /**
+ * \ingroup rwfreelist
+ * The free list was statically allocated
*
- * "Lastly, on a more general note concerning speedups for renderers, the
- * implementor should be aware that a lot of suggestions for improving
- * efficiency fall into the category of ingenious, but complex,
- * algorithms for very specific contexts that may save a few microseconds
- * but which make your code unreadable. A more general computer science
- * perspective that takes a `global view' of the renderer can be more
- * fruitful. For example, the renderer devotes a lot of time to
- * allocating and deallocating chunks of memory for storing data. A lot
- * of these chunks are always the same size - such as those that are
- * continually required to store the data structure for fragment lists.
- * Using memory management techniques that recognize this fact can yield
- * considerable dividends. One such scheme would be to hold a series of
- * empty lists in memory for all the commonly used data structures. An
- * empty list for fragments, say, would contain a list of previously
- * allocated, but no longer needed, fragment structures. When the
- * renderer needs memory for a new fragment, it looks first at this empty
- * list. If there is nothing there it allocates space directly,
- * otherwise it takes a fragments off the end of the list and uses that.
- * Conversely, when the renderer no longer needs a fragment, instead of
- * freeing it, it goes onto the end of the empty list. In the authors'
- * experience, replacing the naive allocate/deallocate scheme with this
- * way of managing memory can result in 100% speedup. "
- */
-struct RwFreeBlock
-{
- RwFreeBlock *nextBlock;
-};
-
-typedef struct RwFreeList RwFreeList;
-struct RwFreeList
-{
- void **freeListStack; /* Stack of unused entries */
- void **freeListStackTop; /* Pointer to the top of the stack */
+ * \see RwFreeListSetFlags
+ */
+#define rwFREELISTFLAG_STATIC 0x00000001
- RwFreeBlock *firstBlock; /* Data start */
+/**
+ * \ingroup rwfreelist
+ * \hideinitializer
+ * Free blocks as soon as they are empty
+ *
+ * \see RwFreeListSetFlags
+ */
+#define rwFREELISTFLAG_FREEBLOCKS 0x00000002
- RwInt32 blockSize; /* Size of block in bytes */
- RwInt32 entrySize; /* Entry size */
- RwInt32 alignmentMinusOne; /* Entry alignment minus 1 */
- RwInt32 entriesPerBlock; /* Amount of space in a block */
- RwInt32 entriesAllocated; /* Total slots allocated
- * (but not necessarily being used */
+typedef struct RwFreeList RwFreeList;
- /* All freelists */
- RwLLLink lFreeList;
+/**
+ * \ingroup rwfreelist
+ * Holds free list info, should be considered opaque. Use API functions to access.
+ */
+struct RwFreeList
+{
+ RwUInt32 entrySize; /**<size of an entry in the free list */
+#if (defined(RWDEBUG) && !defined(DOXYGEN))
+ RwUInt32 nonAlignedEntrySize;
+#endif /* (defined(RWDEBUG) && !defined(DOXYGEN)) */
+ RwUInt32 entriesPerBlock; /**<number of entries per free list block */
+ RwUInt32 heapSize; /**<size of the heap */
+ RwUInt32 alignment; /**<alignment of a free list entry */
+ RwLinkList blockList; /**<list of data blocks */
+ RwUInt32 flags; /**<flags which affect the behavior of the
+ free list <BR>
+ rwFREELISTFLAG_FREEBLOCKS */
+ RwLLLink link; /**<link to the free list linked list */
#if (defined(RWDEBUG) && !defined(DOXYGEN))
const RwChar *fileCreate;
@@ -2635,8 +2655,9 @@ struct RwFreeList
#endif /* (defined(RWDEBUG) && !defined(DOXYGEN)) */
};
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwfreelist
* \ref RwFreeListCallBack represents
* the function called from \ref RwFreeListForAllUsed for all used entries in a
* given free list.
@@ -2648,6 +2669,8 @@ struct RwFreeList
* \see RwFreeListForAllUsed
*
*/
+#endif /* RWADOXYGENEXTERNAL */
+
typedef void (*RwFreeListCallBack) (void *pMem, void *pData);
typedef void *(*RwMemoryAllocFn) (RwFreeList * fl);
typedef RwFreeList *(*RwMemoryFreeFn) (RwFreeList * fl, void *pData);
@@ -2684,12 +2707,25 @@ extern RwFreeList *_rwFreeListCreate(RwInt32 entrySize,
__LINE__)
#else /* (defined(RWDEBUG) && !defined(DOXYGEN)) */
+/* legacy freelist create */
+
extern RwFreeList *RwFreeListCreate(RwInt32 entrySize,
RwInt32 entriesPerBlock,
RwInt32 alignment);
#endif /* (defined(RWDEBUG) && !defined(DOXYGEN)) */
+extern RwFreeList*
+RwFreeListCreateAndPreallocateSpace(RwInt32 entrySize,
+ RwInt32 entriesPerBlock,
+ RwInt32 alignment,
+ RwInt32 numBlocksToPreallocate,
+ RwFreeList *inPlaceSpaceForFreeListStruct );
+
extern RwBool RwFreeListDestroy(RwFreeList * freelist);
+
+extern void RwFreeListSetFlags( RwFreeList *freeList, RwUInt32 flags );
+extern RwUInt32 RwFreeListGetFlags( RwFreeList *freeList );
+
/* Garbage collection/enumeration */
extern RwInt32 RwFreeListPurge(RwFreeList * freelist);
extern RwFreeList *RwFreeListForAllUsed(RwFreeList * freelist,
@@ -2712,7 +2748,7 @@ extern RwInt32 RwFreeListPurgeAllFreeLists(void);
#include <rtdbmalloc.h>
#define RwFreeListAlloc(_f) \
- memalign((1 + (_f)->alignmentMinusOne), (_f)->entrySize)
+ memalign(((_f)->alignment), (_f)->entrySize)
#else /* ((defined(__MWERKS__) || defined(__GNUC__)) && defined(__R5900__)) */
@@ -2750,7 +2786,7 @@ extern RwInt32 RwFreeListPurgeAllFreeLists(void);
*/
/**
- * \ingroup datatypes
+ * \ingroup rwstream
* \ref RwStreamType
* This type represents the different types of stream that
* can be used.
@@ -2768,7 +2804,7 @@ enum RwStreamType
typedef enum RwStreamType RwStreamType;
/**
- * \ingroup datatypes
+ * \ingroup rwstream
* \ref RwStreamAccessType
* This type represents the options available for
* accessing a stream when it is opened.
@@ -2785,8 +2821,8 @@ typedef enum RwStreamAccessType RwStreamAccessType;
/* Memory stream */
/**
- * \ingroup datatypes
- * \typedef RwStreamMemory
+ * \ingroup rwstream
+ * \struct RwStreamMemory
* This should be considered an opaque type.
* Use the RwStream API functions to access.
*/
@@ -2803,7 +2839,7 @@ struct RwStreamMemory
typedef union RwStreamFile RwStreamFile;
/**
- * \ingroup datatypes
+ * \ingroup rwstream
* \union RwStreamFile
* This type is used to represent a file pointer for
* accessing data on disk through the stream mechanism.
@@ -2829,8 +2865,8 @@ typedef RwBool(*rwCustomStreamFnSkip) (void *data,
/* Custom stream */
/**
- * \ingroup datatypes
- * \typedef RwStreamCustom
+ * \ingroup rwstream
+ * \struct RwStreamCustom
* This should be considered an opaque type.
* Use the RwStream API functions to access.
*/
@@ -2850,7 +2886,7 @@ struct RwStreamCustom
typedef union RwStreamUnion RwStreamUnion;
/**
- * \ingroup datatypes
+ * \ingroup rwstream
* \union RwStreamUnion
* The union of all supported stream types
*/
@@ -2862,8 +2898,8 @@ union RwStreamUnion
};
/**
- * \ingroup datatypes
- * \typedef RwStream
+ * \ingroup rwstream
+ * \struct RwStream
* Binary stream for reading or writing object data.
* This should be considered an opaque type.
* Use the RwStream API functions to access.
@@ -2883,7 +2919,7 @@ struct RwStream
typedef struct RwMemory RwMemory;
/**
- * \ingroup datatypes
+ * \ingroup rwstream
* \struct RwMemory
* This type represents a block of allocated memory.
* It is used to specify an area of memory connected to a stream of type
@@ -2905,6 +2941,9 @@ extern "C"
{
#endif /* __cplusplus */
+extern void
+RwStreamSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
/* Open/Close streams */
extern RwStream *
@@ -2953,8 +2992,9 @@ RwStreamSkip(RwStream * stream,
Global Types
*/
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginDataChunkWriteCallBack represents the function
* registered by \ref RwCameraRegisterPluginStream, etc. as the function that
* writes extension data to a binary stream.
@@ -2979,7 +3019,7 @@ RwStreamSkip(RwStream * stream,
typedef RwStream *(*RwPluginDataChunkWriteCallBack)(RwStream *stream, RwInt32 binaryLength, const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject);
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginDataChunkReadCallBack represents the function
* registered by \ref RwCameraRegisterPluginStream, etc. as the function that
* reads extension data from a binary stream.
@@ -3004,7 +3044,7 @@ typedef RwStream *(*RwPluginDataChunkWriteCallBack)(RwStream *stream, RwInt32 bi
typedef RwStream *(*RwPluginDataChunkReadCallBack)(RwStream *stream, RwInt32 binaryLength, void *object, RwInt32 offsetInObject, RwInt32 sizeInObject);
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginDataChunkGetSizeCallBack represents the callback
* registered by \ref RwCameraRegisterPluginStream, etc. as the function that
* determines the binary size of the extension data.
@@ -3022,7 +3062,7 @@ typedef RwStream *(*RwPluginDataChunkReadCallBack)(RwStream *stream, RwInt32 bin
typedef RwInt32(*RwPluginDataChunkGetSizeCallBack)(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject);
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginDataChunkAlwaysCallBack represents the callback
* registered by \ref RwCameraSetStreamAlwaysCallBack, etc. as the
* function that is called after the reading of plugin stream data is
@@ -3037,11 +3077,13 @@ typedef RwInt32(*RwPluginDataChunkGetSizeCallBack)(const void *object, RwInt32 o
*
* \param sizeInObject A RwInt32 value equal to the size
* (in bytes) of the extension data.
+ *
+ * \return Returns TRUE if successful, FALSE otherwise.
*/
typedef RwBool(*RwPluginDataChunkAlwaysCallBack)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject);
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginDataChunkRightsCallBack represents the callback
* registered by RwCameraSetStreamRightsCallBack, etc. as the
* function that is called after the reading of plugin stream data is
@@ -3058,11 +3100,13 @@ typedef RwBool(*RwPluginDataChunkAlwaysCallBack)(void *object, RwInt32 offsetInO
* (in bytes) of the extension data.
*
* \param extraData An RwUInt32 writen with the plugin id.
+ *
+ * \return Returns TRUE if successful, FALSE otherwise.
*/
typedef RwBool(*RwPluginDataChunkRightsCallBack)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject, RwUInt32 extraData);
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginObjectConstructor represents the callback
* registered by \ref RwEngineRegisterPlugin, \ref RwCameraRegisterPlugin, etc.
* as the function that initializes either the global extension data (in the
@@ -3083,7 +3127,7 @@ typedef RwBool(*RwPluginDataChunkRightsCallBack)(void *object, RwInt32 offsetInO
typedef void *(*RwPluginObjectConstructor)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject);
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginObjectCopy represents the callback registered by
* \ref RwCameraRegisterPlugin, etc. as the function that copies the object
* extension data when an object is duplicated.
@@ -3105,7 +3149,7 @@ typedef void *(*RwPluginObjectConstructor)(void *object, RwInt32 offsetInObject,
typedef void *(*RwPluginObjectCopy)(void *dstObject, const void *srcObject, RwInt32 offsetInObject, RwInt32 sizeInObject);
/**
- * \ingroup datatypes
+ * \ingroup rwplugin
* \ref RwPluginObjectDestructor represents the callback registered
* by \ref RwEngineRegisterPlugin, \ref RwCameraRegisterPlugin, etc. as the
* function that destroys either the global extension data (in the case of
@@ -3123,6 +3167,8 @@ typedef void *(*RwPluginObjectCopy)(void *dstObject, const void *srcObject, RwIn
*
* \return Pointer to the object.
*/
+#endif /* RWADOXYGENEXTERNAL */
+
typedef void *(*RwPluginObjectDestructor)(void *object, RwInt32 offsetInObject, RwInt32 sizeInObject);
typedef void *(*RwPluginErrorStrCallBack)(void *);
@@ -3130,6 +3176,7 @@ typedef void *(*RwPluginErrorStrCallBack)(void *);
typedef struct RwPluginRegistry RwPluginRegistry;
typedef struct RwPluginRegEntry RwPluginRegEntry;
+#if (!defined(DOXYGEN))
struct RwPluginRegistry
{
RwInt32 sizeOfStruct;
@@ -3158,6 +3205,7 @@ struct RwPluginRegEntry
RwPluginRegEntry *prevRegEntry;
RwPluginRegistry *parentRegistry;
};
+#endif /* (!defined(DOXYGEN)) */
@@ -3172,6 +3220,9 @@ extern "C"
/* Registering toolkits and allocating memory */
+extern void
+RwPluginRegistrySetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwBool
_rwPluginRegistrySetStaticPluginsSize(RwPluginRegistry * reg,
RwInt32 size);
@@ -3355,14 +3406,17 @@ MACRO_STOP
#define RWMATRIXPRINT(_matrix) /* No op */
#endif /* (!(defined(RWMATRIXPRINT))) */
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwmatrix
* enum RwOpCombineType
* This type represents a combination operator which
* can be applied to frames and matrices.
* The operator determines the order
* in which one object is combined with another
*/
+#endif /* RWADOXYGENEXTERNAL */
+
enum RwOpCombineType
{
rwCOMBINEREPLACE = 0, /**<Replace -
@@ -3376,9 +3430,8 @@ enum RwOpCombineType
rwOPCOMBINETYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
-/**
- * \ingroup datatypes
- * \typedef RwOpCombineType typedef for enum RwOpCombineType
+/*
+ * RwOpCombineType typedef for enum RwOpCombineType
*/
typedef enum RwOpCombineType RwOpCombineType;
@@ -3388,7 +3441,7 @@ typedef enum RwOpCombineType RwOpCombineType;
enum RwMatrixType
{
rwMATRIXTYPENORMAL = 0x00000001,
- rwMATRIXTYPEORTHOGANAL = 0x00000002,
+ rwMATRIXTYPEORTHOGONAL = 0x00000002,
rwMATRIXTYPEORTHONORMAL = 0x00000003,
rwMATRIXTYPEMASK = 0x00000003,
rwMATRIXTYPEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
@@ -3442,8 +3495,8 @@ typedef struct RwMatrixTag RWALIGN(RwMatrix, rwMATRIXALIGNMENT);
*/
/**
- * \ingroup datatypes
- * \typedef RwMatrix
+ * \ingroup rwmatrix
+ * \struct RwMatrix
* Matrix to define transformations.
* This should be considered an opaque type.
* Use the RwMatrix API functions to access.
@@ -3476,18 +3529,15 @@ typedef void (RWASMCALL * rwMatrixMultFn) (RwMatrix * dstMat,
const RwMatrix * matA,
const RwMatrix * matB);
-/*
- * \ingroup datatypes
- * \typedef RwMatrixTolerance
- * Typedef for RwMatrixTolerance structure
- */
typedef struct RwMatrixTolerance RwMatrixTolerance;
-/*
- * \ingroup datatypes
+#ifndef RWADOXYGENEXTERNAL
+/**
+ * \ingroup rwmatrix
* \struct RwMatrixTolerance
* Holds tolerances for matrix optimizations with \ref RwMatrixOptimize
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwMatrixTolerance
{
RwReal Normal;
@@ -3522,6 +3572,9 @@ RwEngineSetMatrixTolerances(const RwMatrixTolerance * const tolerance);
#define rwMatrixTestFlags(m, flagsbit) ((m)->flags & (RwInt32)(flagsbit))
/* Creation/destruction */
+extern void
+RwMatrixSetFreeListCreateParams( RwInt32 blockSize, RwInt32 numBlocksToPrealloc );
+
extern RwBool
RwMatrixDestroy(RwMatrix * mpMat);
@@ -3693,7 +3746,7 @@ MACRO_STOP
rwMATRIXTYPENORMAL) ) || /* ... or actually is */ \
rwMatrixIsNormal(_matrix, _epsilon)) && \
( ( !( rwMatrixGetFlags(_matrix) & /* not flagged as orthogonal */ \
- rwMATRIXTYPEORTHOGANAL) ) || /* ... or actually is */ \
+ rwMATRIXTYPEORTHOGONAL) ) || /* ... or actually is */ \
rwMatrixIsOrthogonal(_matrix, _epsilon)) )
#define rwMat01Det(_mAA) \
@@ -3906,8 +3959,6 @@ MACRO_STOP
#pragma warning( disable : 344 )
#endif /* (defined(__ICL)) */
-//nobody needed that - AAP
-//#include <windows.h>
#if (defined(RWDEBUG))
#if (defined(RWMEMDEBUG) && !defined(_CRTDBG_MAP_ALLOC))
@@ -4001,48 +4052,16 @@ MACRO_START \
} \
MACRO_STOP
-/* LEGACY-SUPPORT macros */
-#define RWIM2DVERTEXSetCameraX(vert, camx) RwIm2DVertexSetCameraX(vert, camx)
-#define RWIM2DVERTEXSetCameraY(vert, camy) RwIm2DVertexSetCameraY(vert, camy)
-#define RWIM2DVERTEXSetCameraZ(vert, camz) RwIm2DVertexSetCameraZ(vert, camz)
-#define RWIM2DVERTEXSetRecipCameraZ(vert, recipz) \
- RwIm2DVertexSetRecipCameraZ(vert, recipz)
-#define RWIM2DVERTEXGetCameraX(vert) RwIm2DVertexGetCameraX(vert)
-#define RWIM2DVERTEXGetCameraY(vert) RwIm2DVertexGetCameraY(vert)
-#define RWIM2DVERTEXGetCameraZ(vert) RwIm2DVertexGetCameraZ(vert)
-#define RWIM2DVERTEXGetRecipCameraZ(vert) RwIm2DVertexGetRecipCameraZ(vert)
-#define RWIM2DVERTEXSetScreenX(vert, scrnx) RwIm2DVertexSetScreenX(vert, scrnx)
-#define RWIM2DVERTEXSetScreenY(vert, scrny) RwIm2DVertexSetScreenY(vert, scrny)
-#define RWIM2DVERTEXSetScreenZ(vert, scrnz) RwIm2DVertexSetScreenZ(vert, scrnz)
-#define RWIM2DVERTEXGetScreenX(vert) RwIm2DVertexGetScreenX(vert)
-#define RWIM2DVERTEXGetScreenY(vert) RwIm2DVertexGetScreenY(vert)
-#define RWIM2DVERTEXGetScreenZ(vert) RwIm2DVertexGetScreenZ(vert)
-#define RWIM2DVERTEXSetU(vert, u, recipz) RwIm2DVertexSetU(vert, u, recipz)
-#define RWIM2DVERTEXSetV(vert, v, recipz) RwIm2DVertexSetV(vert, v, recipz)
-#define RWIM2DVERTEXGetU(vert) RwIm2DVertexGetU(vert)
-#define RWIM2DVERTEXGetV(vert) RwIm2DVertexGetV(vert)
-#define RWIM2DVERTEXSetRealRGBA(vert, red, green, blue, alpha) \
- RwIm2DVertexSetRealRGBA(vert, red, green, blue, alpha)
-#define RWIM2DVERTEXSetIntRGBA(vert, red, green, blue, alpha) \
- RwIm2DVertexSetIntRGBA(vert, red, green, blue, alpha)
-#define RWIM2DVERTEXGetRed(vert) RwIm2DVertexGetRed(vert)
-#define RWIM2DVERTEXGetGreen(vert) RwIm2DVertexGetGreen(vert)
-#define RWIM2DVERTEXGetBlue(vert) RwIm2DVertexGetBlue(vert)
-#define RWIM2DVERTEXGetAlpha(vert) RwIm2DVertexGetAlpha(vert)
-#define RWIM2DVERTEXCopyRGBA(dst, src) RwIm2DVertexCopyRGBA(dst, src)
-#define RWIM2DVERTEXClipRGBA(o, i, n, f) RwIm2DVertexClipRGBA(o, i, n, f)
-
/****************************************************************************
Global Types
*/
/* We use RwD3D8Vertex to drive the hardware in 2D mode */
-/**
- * \ingroup rwcoredriverd3d8
- * \typedef RwD3D8Vertex
+/*
* D3D8 vertex structure definition for 2D geometry
*/
+#if !defined(RWADOXYGENEXTERNAL)
typedef struct RwD3D8Vertex RwD3D8Vertex;
/**
* \ingroup rwcoredriverd3d8
@@ -4061,47 +4080,41 @@ struct RwD3D8Vertex
RwReal u; /**< Texture coordinate U */
RwReal v; /**< Texture coordinate V */
};
+#endif /* !defined(RWADOXYGENEXTERNAL) */
/* Define types used */
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
- * \typedef RwIm2DVertex
+ * \ref RwIm2DVertex
* Typedef for a RenderWare Graphics Immediate Mode 2D Vertex
*/
typedef RwD3D8Vertex RwIm2DVertex;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
-/* LEGACY-SUPPORT macro */
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
- * \def RWIM2DVERTEX
- * RWIM2DVERTEX is a legacy macro for RwIm2DVertex
- */
-#define RWIM2DVERTEX RwIm2DVertex
-
-/**
- * \ingroup rwcoredriverd3d8
- * \typedef RxVertexIndex
+ * \ref RxVertexIndex
*
* Typedef for a RenderWare Graphics PowerPipe Immediate
* Mode Vertex
*/
typedef RwUInt16 RxVertexIndex;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
+
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
- * \typedef RwImVertexIndex
+ * \ref RwImVertexIndex
* Typedef for a RenderWare Graphics Immediate Mode Vertex.
*/
typedef RxVertexIndex RwImVertexIndex;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
-/* LEGACY-SUPPORT macro */
-/**
- * \ingroup rwcoredriverd3d8
- * \def RWIMVERTEXINDEX
- * RWIMVERTEXINDEX is a legacy macro for RwImVertexIndex
- */
-#define RWIMVERTEXINDEX RwImVertexIndex
+#if !defined(RWADOXYGENEXTERNAL)
/**
* \ingroup rwcoredriverd3d8
@@ -4114,8 +4127,10 @@ typedef struct
RwUInt32 numTextureStageStateChanges; /**< Number of Texture Stage States changed */
RwUInt32 numMaterialChanges; /**< Number of Material changes */
RwUInt32 numLightsChanged; /**< Number of Lights changed */
+ RwUInt32 numVBSwitches; /**< Number of Vertex Buffer switches */
}
RwD3D8Metrics;
+#endif /* !defined(RWADOXYGENEXTERNAL) */
#endif /* D3D8_DRVMODEL_H */
@@ -4125,7 +4140,7 @@ RwD3D8Metrics;
* Typedef for pointer to Vector multiplication by Matrix function
*/
-typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut,
+typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut,
const RwV3d * pointsIn,
RwInt32 numPoints,
const RwMatrix * matrix);
@@ -4136,7 +4151,7 @@ typedef RwV3d *(*rwVectorMultFn) (RwV3d * pointsOut,
* currently applies to SKY2 and XBOX - IDBS [2/11/2001]
* [and, if using the intel compiler version 400 or above,
* we will use the single-precision float "sqrtf" under
- * D3D7, D3D8, OpenGL or SoftRas] */
+ * D3D8, OpenGL or SoftRas] */
#if (defined(rwSqrtMacro))
#define RWNOSQRTTABLE
#endif /* (defined(rwSqrtMacro)) */
@@ -4198,7 +4213,7 @@ MACRO_STOP
#define RwV2dDotProductMacro(a,b) \
(( ((((a)->x) * ( (b)->x))) + \
- ( (((a)->y) * ( (b)->y))))) \
+ ( (((a)->y) * ( (b)->y)))))
#define _rwV2dNormalizeMacro(_result, _out, _in) \
MACRO_START \
@@ -4303,7 +4318,7 @@ MACRO_STOP
#define RwV3dDotProductMacro(a, b) \
((((( (((a)->x) * ((b)->x))) + \
( (((a)->y) * ((b)->y))))) + \
- ( (((a)->z) * ((b)->z))))) \
+ ( (((a)->z) * ((b)->z)))))
#define RwV3dCrossProductMacro(o, a, b) \
MACRO_START \
@@ -4375,7 +4390,7 @@ MACRO_STOP
#endif /* (!defined(rw4OVERPISQ)) */
#if (!defined(rwPI3))
-#define rwPI3 (rwPI * (RwReal)3)
+#define rwPI3 (rwPI * (RwReal)3)
#endif /* (!defined(rwPI3)) */
#if (!defined(rwPI3OVER2))
@@ -4463,7 +4478,7 @@ extern void RwV3dSub(RwV3d * out,
const RwV3d * ina, const RwV3d * inb);
extern void RwV3dScale(RwV3d * out,
const RwV3d * in, RwReal scalar);
-extern void RwV3dIncrementScaled(RwV3d * out,
+extern void RwV3dIncrementScaled(RwV3d * out,
const RwV3d * in, RwReal scalar);
extern void RwV3dNegate(RwV3d * out, const RwV3d * in);
extern RwReal RwV3dDotProduct(const RwV3d * ina, const RwV3d * inb);
@@ -4513,6 +4528,8 @@ extern RwReal _rwV3dNormalize(RwV3d * out, const RwV3d * in);
*/
typedef struct RwSList RwSList;
+
+#if (!defined(DOXYGEN))
struct RwSList
{
RwUInt8 *listElements;
@@ -4520,7 +4537,7 @@ struct RwSList
RwInt32 numElementsAlloced;
RwInt32 entrySize;
};
-
+#endif /* (!defined(DOXYGEN) */
/****************************************************************************
@@ -4595,99 +4612,169 @@ extern void *_rwSListToArray(RwSList *sList);
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwRenderState
- * This type represents the various render states that
- * can be set using the API function \ref RwRenderStateSet. This function also
- * takes a render state value or pointer to an object depending on the type.
- * For render states that are toggles, the value should be TRUE to switch the
- * state on and FALSE to turn it off.
+ * \ingroup rwrenderstate
+ * RwRenderState represents the global state variables that control
+ * rendering. These may be set and queried using the
+ * \ref RwRenderStateSet and \ref RwRenderStateGet functions respectively.
+ *
+ * Refer to the \ref rwrenderstateoverview for an overview of this system.
*
- * Note that many of these render states may not be supported on certain
- * platforms. The \ref RwRenderStateSet functions will return FALSE in such cases.
+ * \note The texture render states (raster, address & filter modes) would
+ * normally just be used when rendering in immediate mode and should be
+ * specificied completely every time a texture is used. Retained mode
+ * pipelines will frequently set theses states internally, usually based on
+ * \ref RwTexture objects.
*/
+#endif /* RWADOXYGENEXTERNAL */
enum RwRenderState
{
rwRENDERSTATENARENDERSTATE = 0,
- rwRENDERSTATETEXTURERASTER, /**<Raster to texture with. \ref RwRenderStateSet
- * takes a pointer to an \ref RwRaster */
- rwRENDERSTATETEXTUREADDRESS, /**<\ref RwTextureAddressMode: wrap, clamp, mirror or border */
- rwRENDERSTATETEXTUREADDRESSU, /**<\ref RwTextureAddressMode in u only */
- rwRENDERSTATETEXTUREADDRESSV, /**<\ref RwTextureAddressMode in v only */
- rwRENDERSTATETEXTUREPERSPECTIVE, /**<Perspective correction on/off */
- rwRENDERSTATEZTESTENABLE, /**<Z-buffer test on/off */
- rwRENDERSTATESHADEMODE, /**<\ref RwShadeMode: flat or gouraud shading */
- rwRENDERSTATEZWRITEENABLE, /**<Z-buffer write on/off */
- rwRENDERSTATETEXTUREFILTER, /**<\ref RwTextureFilterMode: point sample, bilinear, trilinear, etc */
- rwRENDERSTATESRCBLEND, /**<Source alpha \ref RwBlendFunction: src alpha, 1-src alpha, etc */
- rwRENDERSTATEDESTBLEND, /**<Destination alpha \ref RwBlendFunction */
- rwRENDERSTATEVERTEXALPHAENABLE, /**<Vertex alpha transparency on/off */
- rwRENDERSTATEBORDERCOLOR, /**<Border color for \ref RwTextureAddressMode rwTEXTUREADDRESSBORDER.
- * The value should be a packed RwUInt32 in ARGB form. The macro
- * RWRGBALONG(r, g, b, a) may be used to construct this using 8-bit
- * color components. */
- rwRENDERSTATEFOGENABLE, /**<Fogging on/off (all polygons will be fogged) */
- rwRENDERSTATEFOGCOLOR, /**<Color used for fogging. The value should be a packed RwUInt32
- * in ARGB form. The macro RWRGBALONG(r, g, b, a) may be used to
- * construct this using 8-bit color components */
- rwRENDERSTATEFOGTYPE, /**<Sets \ref RwFogType, the type of fogging to use */
- rwRENDERSTATEFOGDENSITY, /**<Select the fog density for \ref RwFogType of rwFOGTYPEEXPONENTIAL
- * or rwFOGTYPEEXPONENTIAL2. The value should be a pointer to
- * an RwReal in the range 0 to 1. */
- rwRENDERSTATEFOGTABLE, /**<Install a 256 entry fog table placed between fog distance and far
- * clip-plane */
- rwRENDERSTATEALPHAPRIMITIVEBUFFER, /**<Render transparent alpha polygons last - on/off. \e Not \e supported
- * \e on \e any \e platform.*/
- rwRENDERSTATECULLMODE, /**<Sets \ref RwCullMode, for selecting face culling. */
- rwRENDERSTATESTENCILENABLE, /**< TRUE to enable stenciling, or FALSE to disable stenciling.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only. */
- rwRENDERSTATESTENCILFAIL, /**< Stencil test operator for the fail case.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */
- rwRENDERSTATESTENCILZFAIL, /**< Stencil operation to perform if the stencil test passes
- * and the depth test (z-test) fails.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */
- rwRENDERSTATESTENCILPASS, /**< Stencil operation to perform if both the stencil and the
- * depth (z) tests pass.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */
- rwRENDERSTATESTENCILFUNCTION, /**< Comparison function for the stencil test.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */
- rwRENDERSTATESTENCILFUNCTIONREF, /**< Integer reference value for the stencil test.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */
- rwRENDERSTATESTENCILFUNCTIONMASK, /**< Mask applied to the reference value and each stencil buffer
- * entry to determine the significant bits for the stencil test.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */
- rwRENDERSTATESTENCILFUNCTIONWRITEMASK, /**< Write mask applied to values written into the stencil buffer.
- * \e Supported \e on \e Xbox, \e D3D8, \e and \e OpenGL \e only */
+
+ rwRENDERSTATETEXTURERASTER,
+ /**<Raster used for texturing (normally used in immediate mode).
+ * The value is a pointer to an \ref RwRaster.
+ */
+ rwRENDERSTATETEXTUREADDRESS,
+ /**<\ref RwTextureAddressMode: wrap, clamp, mirror or border.
+ */
+ rwRENDERSTATETEXTUREADDRESSU,
+ /**<\ref RwTextureAddressMode in u only.
+ */
+ rwRENDERSTATETEXTUREADDRESSV,
+ /**<\ref RwTextureAddressMode in v only.
+ */
+ rwRENDERSTATETEXTUREPERSPECTIVE,
+ /**<Perspective correction on/off (always enabled on many platforms).
+ */
+ rwRENDERSTATEZTESTENABLE,
+ /**<Z-buffer test on/off.
+ */
+ rwRENDERSTATESHADEMODE,
+ /**<\ref RwShadeMode: flat or gouraud shading.
+ */
+ rwRENDERSTATEZWRITEENABLE,
+ /**<Z-buffer write on/off.
+ */
+ rwRENDERSTATETEXTUREFILTER,
+ /**<\ref RwTextureFilterMode: point sample, bilinear, trilinear, etc.
+ */
+ rwRENDERSTATESRCBLEND,
+ /**<\ref RwBlendFunction used to modulate the source pixel color
+ * when blending to the frame buffer.
+ */
+ rwRENDERSTATEDESTBLEND,
+ /**<\ref RwBlendFunction used to modulate the destination pixel
+ * color in the frame buffer when blending. The resulting pixel
+ * color is given by the formula
+ * (SRCBLEND * srcColor + DESTBLEND * destColor) for each RGB
+ * component. For a particular platform, not all combinations
+ * of blend function are allowed (see platform specific
+ * restrictions).
+ */
+ rwRENDERSTATEVERTEXALPHAENABLE,
+ /**<Alpha blending on/off (always enabled on some platforms).
+ * This is normally used in immediate mode to enable alpha blending
+ * when vertex colors or texture rasters have transparency. Retained
+ * mode pipelines will usually set this state based on material colors
+ * and textures.
+ */
+ rwRENDERSTATEBORDERCOLOR,
+ /**<Border color for \ref RwTextureAddressMode
+ * \ref rwTEXTUREADDRESSBORDER. The value should be a packed
+ * RwUInt32 in a platform specific format. The macro
+ * RWRGBALONG(r, g, b, a) may be used to construct this using
+ * 8-bit color components.
+ */
+ rwRENDERSTATEFOGENABLE,
+ /**<Fogging on/off (all polygons will be fogged).
+ */
+ rwRENDERSTATEFOGCOLOR,
+ /**<Color used for fogging. The value should be a packed RwUInt32
+ * in a platform specific format. The macro RWRGBALONG(r, g, b, a)
+ * may be used to construct this using 8-bit color components.
+ */
+ rwRENDERSTATEFOGTYPE,
+ /**<\ref RwFogType, the type of fogging to use.
+ */
+ rwRENDERSTATEFOGDENSITY,
+ /**<Fog density for \ref RwFogType of
+ * \ref rwFOGTYPEEXPONENTIAL or \ref rwFOGTYPEEXPONENTIAL2.
+ * The value should be a pointer to an RwReal in the
+ * range 0 to 1.
+ */
+ rwRENDERSTATECULLMODE = 20,
+ /**<\ref RwCullMode, for selecting front/back face culling, or
+ * no culling.
+ */
+ rwRENDERSTATESTENCILENABLE,
+ /**<Stenciling on/off.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
+ rwRENDERSTATESTENCILFAIL,
+ /**<\ref RwStencilOperation used when the stencil test passes.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
+ rwRENDERSTATESTENCILZFAIL,
+ /**<\ref RwStencilOperation used when the stencil test passes and
+ * the depth test (z-test) fails.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
+ rwRENDERSTATESTENCILPASS,
+ /**<Stencil operation used when both the stencil and the depth
+ * (z) tests pass.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
+ rwRENDERSTATESTENCILFUNCTION,
+ /**<\ref RwStencilFunction for the stencil test.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
+ rwRENDERSTATESTENCILFUNCTIONREF,
+ /**<Integer reference value for the stencil test.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
+ rwRENDERSTATESTENCILFUNCTIONMASK,
+ /**<Mask applied to the reference value and each stencil buffer
+ * entry to determine the significant bits for the stencil test.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
+ rwRENDERSTATESTENCILFUNCTIONWRITEMASK,
+ /**<Write mask applied to values written into the stencil buffer.
+ * <i> Supported on Xbox, D3D8, and OpenGL only. </i>
+ */
rwRENDERSTATEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RwRenderState RwRenderState;
-
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwShadeMode
- * This type represents the options available for setting the
- * rwRENDERSTATESHADEMODE render state */
+ * \ingroup rwrenderstate
+ * RwShadeMode represents the available shading modes that may be
+ * set using the \ref RwRenderState \ref rwRENDERSTATESHADEMODE.
+ */
+#endif /* RWADOXYGENEXTERNAL */
enum RwShadeMode
{
- rwSHADEMODENASHADEMODE = 0, /**<Invalid shading mode */
+ rwSHADEMODENASHADEMODE = 0,
rwSHADEMODEFLAT, /**<Flat shading */
rwSHADEMODEGOURAUD, /**<Gouraud shading */
rwSHADEMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RwShadeMode RwShadeMode;
-
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwTextureFilterMode
- * This type represents the options available for texture
- * filtering (see API functions \ref RwTextureSetFilterMode and \ref RwRenderStateSet)*/
+ * \ingroup rwrenderstate
+ * RwTextureFilterMode represents the texture filtering modes that may
+ * be set using the \ref RwRenderState \ref rwRENDERSTATETEXTUREFILTER in
+ * immediate mode, or \ref RwTextureSetFilterMode in retained mode.
+ */
+#endif /* RWADOXYGENEXTERNAL */
enum RwTextureFilterMode
{
- rwFILTERNAFILTERMODE = 0, /**<Invalid filter mode */
+ rwFILTERNAFILTERMODE = 0,
rwFILTERNEAREST, /**<Point sampled */
rwFILTERLINEAR, /**<Bilinear */
rwFILTERMIPNEAREST, /**<Point sampled per pixel mip map */
@@ -4698,15 +4785,18 @@ enum RwTextureFilterMode
};
typedef enum RwTextureFilterMode RwTextureFilterMode;
-
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwFogType
- * This type represents the options available to the
- * rwRENDERSTATEFOGTYPE render state (see \ref RwRenderState);*/
+ * \ingroup rwrenderstate
+ * RwFogType represents the fog modes available when setting the
+ * \ref RwRenderState \ref rwRENDERSTATEFOGTYPE. Note that a particular
+ * platform may not support all of these modes (see platform specific
+ * restrictions).
+ */
+#endif /* RWADOXYGENEXTERNAL */
enum RwFogType
{
- rwFOGTYPENAFOGTYPE = 0, /**<Invalid fog type */
+ rwFOGTYPENAFOGTYPE = 0,
rwFOGTYPELINEAR, /**<Linear fog */
rwFOGTYPEEXPONENTIAL, /**<Exponential fog */
rwFOGTYPEEXPONENTIAL2, /**<Exponential^2 fog */
@@ -4714,18 +4804,28 @@ enum RwFogType
};
typedef enum RwFogType RwFogType;
-
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwBlendFunction
- * This type represents the options available
- * to the rwRENDERSTATESRCBLEND and rwRENDERSTATEDESTBLEND render states
- * (see \ref RwRenderState). In the following description,
- * a subscript s refers to a source value while subscript d refers to a
- * destination value.*/
+ * \ingroup rwrenderstate
+ * RwBlendFunction represents the options available when changing the
+ * \ref RwRenderState setting for \ref rwRENDERSTATESRCBLEND and
+ * \ref rwRENDERSTATEDESTBLEND. The values are factors used to modulate
+ * either the source or destination pixel color when blending to
+ * the frame buffer. Note the some combinations are not allowed on
+ * certain platforms (see platform specific restrictions).
+ *
+ * In the following list, the factors applied to each color component are
+ * listed explicitly. A subscript s refers to a source value while a subscript
+ * d refers to a destination value. Note that blending in the alpha channel is
+ * only applicable when the frame buffer actually contains alpha, and that
+ * the precise operation is platform specific. For instance, the
+ * source alpha value might simply be written to the alpha channel with
+ * no blending.
+ */
+#endif /* RWADOXYGENEXTERNAL */
enum RwBlendFunction
{
- rwBLENDNABLEND = 0, /**<Invalid blend mode */
+ rwBLENDNABLEND = 0,
rwBLENDZERO, /**<(0, 0, 0, 0 ) */
rwBLENDONE, /**<(1, 1, 1, 1 ) */
rwBLENDSRCCOLOR, /**<(Rs, Gs, Bs, As ) */
@@ -4741,93 +4841,139 @@ enum RwBlendFunction
};
typedef enum RwBlendFunction RwBlendFunction;
-
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwTextureAddressMode
- * This type represents the options available for
- * applying textures to polygons (see API functions \ref RwTextureSetAddressing
- * and \ref RwRenderStateSet, and the \ref RwRenderState type) */
+ * \ingroup rwrenderstate
+ * RwTextureAddressMode represents the addressing modes available
+ * when mapping textures to polygons using UV texture coordinates.
+ * This may be set in immediate mode via the \ref RwRenderState
+ * \ref rwRENDERSTATETEXTUREADDRESS, or via \ref RwTextureSetAddressing
+ * for an \ref RwTexture object.
+ */
+#endif /* RWADOXYGENEXTERNAL */
enum RwTextureAddressMode
{
- rwTEXTUREADDRESSNATEXTUREADDRESS = 0, /**<Invalid addressing mode */
- rwTEXTUREADDRESSWRAP, /**<UV wraps (tiles) */
- rwTEXTUREADDRESSMIRROR, /**<Alternate UV is flipped */
- rwTEXTUREADDRESSCLAMP, /**<UV is clamped to 0-1 */
- rwTEXTUREADDRESSBORDER, /**<Border colour takes effect outside of 0-1 */
+ rwTEXTUREADDRESSNATEXTUREADDRESS = 0,
+ rwTEXTUREADDRESSWRAP, /**<UV wraps (tiles) */
+ rwTEXTUREADDRESSMIRROR, /**<Alternate UV is flipped */
+ rwTEXTUREADDRESSCLAMP, /**<UV is clamped to 0-1 */
+ rwTEXTUREADDRESSBORDER, /**<Border color takes effect outside of 0-1 */
rwTEXTUREADDRESSMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RwTextureAddressMode RwTextureAddressMode;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwStencilOperation
- * This type represents the stencil operations to perform
- * based on the results of the
- * \ref rwRENDERSTATESTENCILFAIL, \ref rwRENDERSTATESTENCILZFAIL
- * and \ref rwRENDERSTATESTENCILPASS tests.
+ * \ingroup rwrenderstate
+ * RwStencilOperation represents the stencil operations that may be
+ * performed depending on the results of stencil/z-buffer tests.
+ * The operation may be set for the various tests
+ * via the \ref RwRenderState settings \ref rwRENDERSTATESTENCILFAIL,
+ * \ref rwRENDERSTATESTENCILZFAIL and \ref rwRENDERSTATESTENCILPASS.
*/
+#endif /* RWADOXYGENEXTERNAL */
enum RwStencilOperation
{
rwSTENCILOPERATIONNASTENCILOPERATION = 0,
- rwSTENCILOPERATIONKEEP, /* Do not update the entry in the stencil buffer */
- rwSTENCILOPERATIONZERO, /* Set the stencil-buffer entry to 0 */
- rwSTENCILOPERATIONREPLACE, /* Replace the stencil-buffer entry with reference value */
- rwSTENCILOPERATIONINCRSAT, /* Increment the stencil-buffer entry, clamping to the maximum value */
- rwSTENCILOPERATIONDECRSAT, /* Decrement the stencil-buffer entry, clamping to zero */
- rwSTENCILOPERATIONINVERT, /* Invert the bits in the stencil-buffer entry */
- rwSTENCILOPERATIONINCR, /* Increment the stencil-buffer entry, wrapping to zero if the new value exceeds the maximum value */
- rwSTENCILOPERATIONDECR, /* Decrement the stencil-buffer entry, wrapping to the maximum value if the new value is less than zero */
+
+ rwSTENCILOPERATIONKEEP,
+ /**<Do not update the entry in the stencil buffer */
+ rwSTENCILOPERATIONZERO,
+ /**<Set the stencil-buffer entry to 0 */
+ rwSTENCILOPERATIONREPLACE,
+ /**<Replace the stencil-buffer entry with reference value */
+ rwSTENCILOPERATIONINCRSAT,
+ /**<Increment the stencil-buffer entry, clamping to the
+ * maximum value */
+ rwSTENCILOPERATIONDECRSAT,
+ /**<Decrement the stencil-buffer entry, clamping to zero */
+ rwSTENCILOPERATIONINVERT,
+ /**<Invert the bits in the stencil-buffer entry */
+ rwSTENCILOPERATIONINCR,
+ /**<Increment the stencil-buffer entry, wrapping to zero if
+ * the new value exceeds the maximum value */
+ rwSTENCILOPERATIONDECR,
+ /**<Decrement the stencil-buffer entry, wrapping to the maximum
+ * value if the new value is less than zero */
+
rwSTENCILOPERATIONFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RwStencilOperation RwStencilOperation;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwStencilFunction
- * This type represents the options available for
- * the comparison function for the stencil test \ref rwRENDERSTATESTENCILFUNCTION.
+ * \ingroup rwrenderstate
+ * RwStencilFunction represents the comparison functions available for
+ * a stencil test. The function may be selected via the
+ * \ref RwRenderState setting \ref rwRENDERSTATESTENCILFUNCTION.
*/
+#endif /* RWADOXYGENEXTERNAL */
enum RwStencilFunction
{
rwSTENCILFUNCTIONNASTENCILFUNCTION = 0,
- rwSTENCILFUNCTIONNEVER, /* Always fail the test */
- rwSTENCILFUNCTIONLESS, /* Accept the new pixel if its value is less than the value of the current pixel */
- rwSTENCILFUNCTIONEQUAL, /* Accept the new pixel if its value equals the value of the current pixel */
- rwSTENCILFUNCTIONLESSEQUAL, /* Accept the new pixel if its value is less than or equal to the value of the current pixel */
- rwSTENCILFUNCTIONGREATER, /* Accept the new pixel if its value is greater than the value of the current pixel */
- rwSTENCILFUNCTIONNOTEQUAL, /* Accept the new pixel if its value does not equal the value of the current pixel */
- rwSTENCILFUNCTIONGREATEREQUAL, /* Accept the new pixel if its value is greater than or equal to the value of the current pixel */
- rwSTENCILFUNCTIONALWAYS, /* Always pass the test */
+
+ rwSTENCILFUNCTIONNEVER,
+ /**<Always fail the test */
+ rwSTENCILFUNCTIONLESS,
+ /**<Accept the new pixel if its value is less than the value of
+ * the current pixel */
+ rwSTENCILFUNCTIONEQUAL,
+ /**<Accept the new pixel if its value equals the value of the
+ * current pixel */
+ rwSTENCILFUNCTIONLESSEQUAL,
+ /**<Accept the new pixel if its value is less than or equal to
+ * the value of the current pixel */
+ rwSTENCILFUNCTIONGREATER,
+ /**<Accept the new pixel if its value is greater than the value
+ * of the current pixel */
+ rwSTENCILFUNCTIONNOTEQUAL,
+ /**<Accept the new pixel if its value does not equal the value of
+ * the current pixel */
+ rwSTENCILFUNCTIONGREATEREQUAL,
+ /**<Accept the new pixel if its value is greater than or equal
+ * to the value of the current pixel */
+ rwSTENCILFUNCTIONALWAYS,
+ /**<Always pass the test */
+
rwSTENCILFUNCTIONFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RwStencilFunction RwStencilFunction;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * RwCullMode
- * This type represents the options available for culling polygons during rendering.
- * and \ref RwRenderStateSet, and the \ref RwRenderState type) */
+ * \ingroup rwrenderstate
+ * RwCullMode represents the options available for culling polygons
+ * during rendering. The cull mode may be set via the \ref RwRenderState
+ * setting \ref rwRENDERSTATECULLMODE.
+ */
+#endif /* RWADOXYGENEXTERNAL */
enum RwCullMode
{
rwCULLMODENACULLMODE = 0,
- rwCULLMODECULLNONE, /**< Both front and back-facing triangles are drawn. */
- rwCULLMODECULLBACK, /**< Just front-facing triangles are drawn */
- rwCULLMODECULLFRONT, /**< Just rear-facing triangles are drawn */
+
+ rwCULLMODECULLNONE,
+ /**<Both front and back-facing triangles are drawn. */
+ rwCULLMODECULLBACK,
+ /**<Only front-facing triangles are drawn */
+ rwCULLMODECULLFRONT,
+ /**<Only back-facing triangles are drawn */
rwCULLMODEFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
};
typedef enum RwCullMode RwCullMode;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup immediatemodedatatypes
* RwPrimitiveType
* This type represents the different types of indexed
* line and indexed triangle primitives that are available when rendering 2D
* and 3D immediate mode objects (see API functions \ref RwIm2DRenderIndexedPrimitive,
* \ref RwIm2DRenderPrimitive, \ref RwIm3DRenderIndexedPrimitive and \ref RwIm3DRenderPrimitive).
* Indices are into a vertex list and must be defined in a counter-clockwise order
- * (as seen from the camera) to be visible.*/
+ * (as seen from the camera) to be visible.
+ */
+#endif /* RWADOXYGENEXTERNAL */
enum RwPrimitiveType
{
rwPRIMTYPENAPRIMTYPE = 0, /**<Invalid primative type */
@@ -4994,8 +5140,9 @@ typedef RwBool (*RwStandardFunc)(void *pOut,void *pInOut,RwInt32 nI);
typedef struct RwEngineOpenParams RwEngineOpenParams;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwengine
* \struct RwEngineOpenParams
* This type is used to specify device dependent parameters
* for use by the API function \ref RwEngineOpen.
@@ -5003,6 +5150,7 @@ typedef struct RwEngineOpenParams RwEngineOpenParams;
* should be set to the window's handle (of type HWND).
* For NULL and sky libraries displayID=0:
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwEngineOpenParams
{
void *displayID; /**< Display Identifier */
@@ -5066,37 +5214,41 @@ typedef RwBool
typedef struct RwDevice RwDevice;
-/**
- * \ingroup datatypes
- * \struct RwDevice
+
+#if (!defined(DOXYGEN))
+/*
+ * struct RwDevice
* Structure describing a display device
*/
struct RwDevice
{
- RwReal gammaCorrection; /**<Gamma correction */
- RwSystemFunc fpSystem; /**< System handler */
- RwReal zBufferNear; /**< Near Z buffer value */
- RwReal zBufferFar; /**< Far Z buffer value */
+ RwReal gammaCorrection; /* Gamma correction */
+ RwSystemFunc fpSystem; /* System handler */
+ RwReal zBufferNear; /* Near Z buffer value */
+ RwReal zBufferFar; /* Far Z buffer value */
/* Immediate mode functions */
- RwRenderStateSetFunction fpRenderStateSet; /**< Internal Use */
- RwRenderStateGetFunction fpRenderStateGet; /**< Internal Use */
+ RwRenderStateSetFunction fpRenderStateSet; /* Internal Use */
+ RwRenderStateGetFunction fpRenderStateGet; /* Internal Use */
/* Render functions */
- RwIm2DRenderLineFunction fpIm2DRenderLine; /**< Internal Use */
- RwIm2DRenderTriangleFunction fpIm2DRenderTriangle; /**< Internal Use */
- RwIm2DRenderPrimitiveFunction fpIm2DRenderPrimitive; /**< Internal Use */
- RwIm2DRenderIndexedPrimitiveFunction fpIm2DRenderIndexedPrimitive; /**< Internal Use */
-
- RwIm3DRenderLineFunction fpIm3DRenderLine; /**< Internal Use */
- RwIm3DRenderTriangleFunction fpIm3DRenderTriangle; /**< Internal Use */
- RwIm3DRenderPrimitiveFunction fpIm3DRenderPrimitive; /**< Internal Use */
- RwIm3DRenderIndexedPrimitiveFunction fpIm3DRenderIndexedPrimitive; /**< Internal Use */
+ RwIm2DRenderLineFunction fpIm2DRenderLine; /* Internal Use */
+ RwIm2DRenderTriangleFunction fpIm2DRenderTriangle; /* Internal Use */
+ RwIm2DRenderPrimitiveFunction fpIm2DRenderPrimitive; /* Internal Use */
+ RwIm2DRenderIndexedPrimitiveFunction fpIm2DRenderIndexedPrimitive; /* Internal Use */
+
+ RwIm3DRenderLineFunction fpIm3DRenderLine; /* Internal Use */
+ RwIm3DRenderTriangleFunction fpIm3DRenderTriangle; /* Internal Use */
+ RwIm3DRenderPrimitiveFunction fpIm3DRenderPrimitive; /* Internal Use */
+ RwIm3DRenderIndexedPrimitiveFunction fpIm3DRenderIndexedPrimitive; /* Internal Use */
};
+#endif /* (!defined(DOXYGEN)) */
+
typedef struct RwMetrics RwMetrics;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwengine
* \struct RwMetrics
* This structure provides information about the performance
* of the application. The metrics are recorded only in the metrics
@@ -5109,6 +5261,7 @@ typedef struct RwMetrics RwMetrics;
* be considered as bad news and will indicate a significantly
* reduced rendering performance.
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwMetrics
{
RwUInt32 numTriangles; /**< Number of triangles processed */
@@ -5123,13 +5276,15 @@ struct RwMetrics
#define SUBSYSTEMNAME_MAXLEN 80
typedef struct RwSubSystemInfo RwSubSystemInfo;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwengine
* \struct RwSubSystemInfo
* This type is used to represent information about a device.
* The only available field specifies a character string
* which identifies the subsystem
* (see API function \ref RwEngineGetSubSystemInfo). */
+#endif /* RWADOXYGENEXTERNAL */
struct RwSubSystemInfo
{
RwChar name[SUBSYSTEMNAME_MAXLEN]; /**< Sub system string */
@@ -5139,13 +5294,15 @@ struct RwSubSystemInfo
/* Video modes */
/* These are flag bits which may be ORd */
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwengine
* RwVideoModeFlag
* These flags specify the type of display that RenderWare
* will use. The flags may be OR'd together to build composite modes.
* Note that not all modes are supported on all platforms.
*/
+#endif /* RWADOXYGENEXTERNAL */
enum RwVideoModeFlag
{
rwVIDEOMODEEXCLUSIVE = 0x1, /**<Exclusive (i.e. full-screen) */
@@ -5162,13 +5319,16 @@ enum RwVideoModeFlag
typedef enum RwVideoModeFlag RwVideoModeFlag;
typedef struct RwVideoMode RwVideoMode;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwengine
* \struct RwVideoMode
* This type represents a video mode available on a device specified
* by the frame buffer resolution (width and height) and depth,
* and a flag indicating whether the device has exclusive use of
- * the mode (see API function \ref RwEngineGetVideoModeInfo): */
+ * the mode (see API function \ref RwEngineGetVideoModeInfo):
+ */
+#endif /* RWADOXYGENEXTERNAL */
struct RwVideoMode
{
RwInt32 width; /**< Width */
@@ -5177,8 +5337,9 @@ struct RwVideoMode
RwVideoModeFlag flags; /**< Flags */
};
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwengine
* RwEngineInitFlag
* Engine initialization flags. An application can use
* these to control the memory manager that RenderWare uses for dynamic
@@ -5190,6 +5351,7 @@ struct RwVideoMode
* RwMalloc and RwFree. This will result in more memory management
* related calls.
*/
+#endif /* RWADOXYGENEXTERNAL */
enum RwEngineInitFlag
{
rwENGINEINITFREELISTS = 0, /**<Use Freelists */
@@ -5211,7 +5373,9 @@ extern "C"
extern RwInt32 RwEngineGetVersion(void);
/* Sequence of events to get RenderWare up and running */
-extern RwBool RwEngineInit(RwMemoryFunctions *memFuncs, RwUInt32 initFlags, RwUInt32 resArenaSize);
+extern RwBool RwEngineInit(const RwMemoryFunctions *memFuncs,
+ RwUInt32 initFlags,
+ RwUInt32 resArenaSize);
extern RwInt32 RwEngineRegisterPlugin(RwInt32 size, RwUInt32 pluginID,
RwPluginObjectConstructor initCB,
RwPluginObjectDestructor termCB);
@@ -5256,80 +5420,75 @@ extern RwMetrics *RwEngineGetMetrics(void);
*/
/*
- * \typedef rwFnFexist
+ * rwFnFexist
* Returns TRUE if file with given name exists, FALSE if it doesn't.
*/
typedef RwBool (*rwFnFexist)(const RwChar *name);
/*
- * \typedef rwFnFopen
+ * rwFnFopen
* Mimics ANSI C Standard Library fopen.
*/
typedef void *(*rwFnFopen)(const RwChar *name, const RwChar *mode);
/*
- * \typedef rwFnFclose
+ * rwFnFclose
* Mimics ANSI C Standard Library fclose.
*/
typedef int (*rwFnFclose)(void *fptr);
/*
- * \typedef rwFnFread
+ * rwFnFread
* Mimics ANSI C Standard Library fread.
*/
typedef size_t (*rwFnFread)(void *addr, size_t size, size_t count, void *fptr);
/*
- * \typedef rwFnFwrite
+ * rwFnFwrite
* Mimics ANSI C Standard Library fwrite.
*/
typedef size_t (*rwFnFwrite)(const void *addr, size_t size, size_t count, void *fptr);
/*
- * \typedef rwFnFgets
+ * rwFnFgets
* Mimics ANSI C Standard Library fgets.
*/
typedef RwChar *(*rwFnFgets)(RwChar *buffer, int maxLen, void *fptr);
/*
- * \typedef rwFnFputs
+ * rwFnFputs
* Mimics ANSI C Standard Library fputs.
*/
typedef int (*rwFnFputs)(const RwChar *buffer, void *fptr);
/*
- * \typedef rwFnFeof
+ * rwFnFeof
* Mimics ANSI C Standard Library feof.
*/
typedef int (*rwFnFeof)(void *fptr);
/*
- * \typedef rwFnFseek
+ * rwFnFseek
* Mimics ANSI C Standard Library fseek.
*/
typedef int (*rwFnFseek)(void *fptr, long offset, int origin);
/*
- * \typedef rwFnFflush
+ * rwFnFflush
* Mimics ANSI C Standard Library fflush.
*/
typedef int (*rwFnFflush)(void *fptr);
/*
- * \typedef rwFnFtell
+ * rwFnFtell
* Mimics ANSI C Standard Library ftell.
*/
typedef int (*rwFnFtell)(void *fptr);
-/**
- * \ingroup datatypes
- * \typedef RwFileFunctions
- * typedef for struct RwFileFunctions
- */
typedef struct RwFileFunctions RwFileFunctions;
/**
- * \ingroup datatypes
+ * \ingroup memoryfileinterface
* \struct RwFileFunctions
* This type is used to specify the file access
* functions used by RenderWare. The default file system uses the standard
@@ -5390,8 +5549,9 @@ extern RwFileFunctions *RwOsGetFileInterface(void);
*/
typedef struct RwError RwError;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwerror
* \struct RwError
* This type represents a RenderWare error specified by the
* ID of the plugin that the error was issued from (pluginID) and the error
@@ -5399,6 +5559,7 @@ typedef struct RwError RwError;
* \param pluginID The ID of the plugin that issued the error.
* \param errorCode A value representing the error code.
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwError
{
RwInt32 pluginID; /**< Internal Use */
@@ -5444,7 +5605,7 @@ extern RwInt32 _rwerror(RwInt32 code, ...);
*/
/**
- * \ingroup datatypes
+ * \ingroup rwdebug
* RwDebugType
* This type represents the different types of debug and
* trace messages that can be sent to the currently installed debug handler
@@ -5461,7 +5622,7 @@ enum RwDebugType
typedef enum RwDebugType RwDebugType;
/**
- * \ingroup datatypes
+ * \ingroup rwdebug
* \ref RwDebugHandler
* This type represents the
* function called from \ref RwDebugSendMessage for sending a message to the
@@ -5508,9 +5669,12 @@ extern void _rwDebugSendMessage(RwDebugType type,
/* Sending a message */
extern RwChar *_rwdberrcommon(RwInt32 code, ...);
+
+#if (!defined(DOXYGEN))
+/* Doxy doesn't appear to like the __RWFORMAT__ attribute */
extern RwChar *_rwdbsprintf(const RwChar * format,
...) __RWFORMAT__(printf, 1, 2);
-
+#endif /* (!defined(DOXYGEN)) */
#ifdef __cplusplus
}
@@ -5574,6 +5738,8 @@ enum RwEngineStatus
typedef enum RwEngineStatus RwEngineStatus;
typedef struct RwGlobals RwGlobals;
+
+#if (!defined(DOXYGEN))
struct RwGlobals
{
#ifdef RWDEBUG
@@ -5632,6 +5798,7 @@ struct RwModuleInfo
RwInt32 globalsOffset;
RwInt32 numInstances;
};
+#endif /* (!defined(DOXYGEN)) */
@@ -5648,7 +5815,13 @@ extern "C"
extern RwUInt32 ourGlobals[RWGLOBALSIZE / sizeof(RwUInt32)];
#define RwEngineInstance ourGlobals
#else /* RWGLOBALSIZE */
+
+#ifdef _RWDLL
+__declspec(dllimport) extern void *RwEngineInstance;
+#else
extern void *RwEngineInstance;
+#endif
+
#endif /* RWGLOBALSIZE */
extern RwInt8 _rwMsbBit[];
@@ -5663,39 +5836,45 @@ extern RwInt8 _rwMsbBit[];
#define RWRESOURCESGLOBAL(var) (RWPLUGINOFFSET(rwResourcesGlobals, \
RwEngineInstance, resourcesModule.globalsOffset)->var)
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * \typedef RwResEntry
+ * \ingroup rwresources
+ * \struct RwResEntry
* RwResEntry object. Instanced data block in resources arena.
* This should be considered an opaque
* type. Use the RwResEntry API functions to access.
*/
+#endif /* RWADOXYGENEXTERNAL */
+
typedef struct RwResEntry RwResEntry;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
- * \typedef RwResEntryDestroyNotify
- * This type represents the function
+ * \ingroup rwresources
+ * \ref RwResEntryDestroyNotify type represents the function
* called from \ref RwResourcesFreeResEntry (and indirectly from
* \ref RwResourcesEmptyArena) immediately before the memory used by the
* specified resources entry is released.
*
* \param resEntry Pointer to the instanced data.
*/
+#endif /* RWADOXYGENEXTERNAL */
typedef void (*RwResEntryDestroyNotify) (RwResEntry * resEntry);
#if (!defined(DOXYGEN))
struct RwResEntry
{
- RwLLLink link; /**< Node in the list of resource elements */
- RwInt32 size; /**< Size of this node */
- void *owner; /**< Owner of this node */
- RwResEntry **ownerRef; /**< Pointer to pointer to this (enables de-alloc) */
- RwResEntryDestroyNotify destroyNotify; /**< This is called right before destruction */
+ RwLLLink link; /* Node in the list of resource elements */
+ RwInt32 size; /* Size of this node */
+ void *owner; /* Owner of this node */
+ RwResEntry **ownerRef; /* Pointer to pointer to this (enables de-alloc) */
+ RwResEntryDestroyNotify destroyNotify; /* This is called right before destruction */
};
#endif /* (!defined(DOXYGEN)) */
typedef struct rwResources rwResources;
+
+#if (!defined(DOXYGEN))
struct rwResources
{
RwInt32 maxSize;
@@ -5711,11 +5890,13 @@ struct rwResources
RwLinkList *usedEntries;
};
+
typedef struct rwResourcesGlobals rwResourcesGlobals;
struct rwResourcesGlobals
{
rwResources res;
};
+#endif /* (!defined(DOXYGEN)) */
#ifdef __cplusplus
@@ -5768,8 +5949,9 @@ extern RwModuleInfo resourcesModule;
*/
typedef struct RwRGBAReal RwRGBAReal;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwrgba
* \struct RwRGBAReal
* This structure represents a RGBA color which has
* components specified as real values.
@@ -5785,6 +5967,7 @@ typedef struct RwRGBAReal RwRGBAReal;
* value 0 generally corresponds to the associcated component in an
* RwRGBAReal with the value 0.0.
*/
+#endif /* RWADOXYGENEXTERNAL */
struct RwRGBAReal
{
RwReal red; /**< red component */
@@ -5799,11 +5982,14 @@ struct RwRGBAReal
#endif /* (!defined(RwRGBARealAssign)) */
typedef struct RwRGBA RwRGBA;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwrgba
* \struct RwRGBA
* This structure represents a RGBA color
- * which has integer components specified in the range 0 to 255. */
+ * which has integer components specified in the range 0 to 255.
+ */
+#endif /* RWADOXYGENEXTERNAL */
struct RwRGBA
{
RwUInt8 red; /**< red component */
@@ -5947,6 +6133,7 @@ extern void RwRGBARealFromRwRGBA(RwRGBAReal *result,
/* Matrix stream format */
typedef struct rwStreamMatrix RwMatrixChunkInfo;
typedef struct rwStreamMatrix rwStreamMatrix;
+#if (!defined(DOXYGEN))
struct rwStreamMatrix
{
RwV3d right;
@@ -5955,6 +6142,7 @@ struct rwStreamMatrix
RwV3d pos;
RwInt32 type;
};
+#endif /* (!defined(DOXYGEN)) */
/****************************************************************************
@@ -6009,11 +6197,14 @@ extern RwMatrixChunkInfo *RwMatrixChunkInfoRead(RwStream * stream,
*/
typedef struct RwChunkHeaderInfo RwChunkHeaderInfo;
+#ifndef RWADOXYGENEXTERNAL
/**
- * \ingroup datatypes
+ * \ingroup rwstream
* \struct RwChunkHeaderInfo
* Holds data for a chunk header read from a
- * stream with \ref RwStreamReadChunkHeaderInfo. */
+ * stream with \ref RwStreamReadChunkHeaderInfo.
+ */
+#endif /* RWADOXYGENEXTERNAL */
struct RwChunkHeaderInfo
{
RwUInt32 type; /**< chunk ID - see \ref RwStreamFindChunk */
diff --git a/src/animation/AnimBlendClumpData.h b/src/animation/AnimBlendClumpData.h
index b953ee88..4043c778 100644
--- a/src/animation/AnimBlendClumpData.h
+++ b/src/animation/AnimBlendClumpData.h
@@ -19,7 +19,7 @@ struct AnimBlendFrameData
#ifdef PED_SKIN
union {
RwFrame *frame;
- RpHAnimStdKeyFrame *hanimFrame;
+ RpHAnimStdInterpFrame *hanimFrame;
};
int32 nodeID;
#else
diff --git a/src/animation/AnimManager.cpp b/src/animation/AnimManager.cpp
index 4694920a..f682964f 100644
--- a/src/animation/AnimManager.cpp
+++ b/src/animation/AnimManager.cpp
@@ -238,14 +238,14 @@ AnimAssocDesc aMeleeAnimDescs[] = {
{ ANIM_MELEE_ATTACK_2ND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
{ ANIM_MELEE_ATTACK_START, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
{ ANIM_MELEE_IDLE_FIGHTMODE, ASSOC_REPEAT },
- { ANIM_WEAPON_SPECIAL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION }, // TODO(Miami): Overload that name for melee/swing
+ { ANIM_MELEE_ATTACK_FINISH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
};
AnimAssocDesc aSwingAnimDescs[] = {
{ ANIM_MELEE_ATTACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
{ ANIM_MELEE_ATTACK_2ND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
{ ANIM_MELEE_ATTACK_START, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
{ ANIM_MELEE_IDLE_FIGHTMODE, ASSOC_REPEAT },
- { ANIM_WEAPON_SPECIAL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL }, // TODO(Miami): Overload that name for melee/swing
+ { ANIM_MELEE_ATTACK_FINISH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
};
AnimAssocDesc aWeaponAnimDescs[] = {
{ ANIM_WEAPON_FIRE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
diff --git a/src/animation/AnimationId.h b/src/animation/AnimationId.h
index ddf36b23..f2ef3dfd 100644
--- a/src/animation/AnimationId.h
+++ b/src/animation/AnimationId.h
@@ -234,6 +234,7 @@ enum AnimationId
ANIM_MELEE_ATTACK_2ND,
ANIM_MELEE_ATTACK_START,
ANIM_MELEE_IDLE_FIGHTMODE,
+ ANIM_MELEE_ATTACK_FINISH,
ANIM_THROWABLE_THROW = ANIM_WEAPON_FIRE,
ANIM_THROWABLE_THROWU,
ANIM_THROWABLE_START_THROW,
diff --git a/src/animation/FrameUpdate.cpp b/src/animation/FrameUpdate.cpp
index c119d479..faeea709 100644
--- a/src/animation/FrameUpdate.cpp
+++ b/src/animation/FrameUpdate.cpp
@@ -236,7 +236,7 @@ FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
float transBlendAmount = 0.0f;
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
float totalBlendAmount = 0.0f;
- RpHAnimStdKeyFrame *xform = frame->hanimFrame;
+ RpHAnimStdInterpFrame *xform = frame->hanimFrame;
CAnimBlendNode **node;
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
@@ -297,7 +297,7 @@ FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void
float curx = 0.0f, cury = 0.0f;
float endx = 0.0f, endy = 0.0f;
bool looped = false;
- RpHAnimStdKeyFrame *xform = frame->hanimFrame;
+ RpHAnimStdInterpFrame *xform = frame->hanimFrame;
CAnimBlendNode **node;
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
@@ -381,7 +381,7 @@ FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, vo
CVector cur(0.0f, 0.0f, 0.0f);
CVector end(0.0f, 0.0f, 0.0f);
bool looped = false;
- RpHAnimStdKeyFrame *xform = frame->hanimFrame;
+ RpHAnimStdInterpFrame *xform = frame->hanimFrame;
CAnimBlendNode **node;
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
diff --git a/src/animation/RpAnimBlend.cpp b/src/animation/RpAnimBlend.cpp
index 8671e95d..e93615b7 100644
--- a/src/animation/RpAnimBlend.cpp
+++ b/src/animation/RpAnimBlend.cpp
@@ -169,7 +169,11 @@ RpAnimBlendClumpInitSkinned(RpClump *clump)
for(i = 0; i < numBones; i++){
frames[i].nodeID = HIERNODEID(hier, i);
frames[i].resetPos = boneTab[i];
- frames[i].hanimFrame = (RpHAnimStdKeyFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
+#ifdef LIBRW
+ frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
+#else
+ frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rtANIMGETINTERPFRAME(hier->currentAnim, i);
+#endif
}
clumpData->ForAllFrames(FrameInitCBskin, nil);
clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION;
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 54aa5300..b814d58c 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -166,7 +166,7 @@ cAudioManager::PostInitialiseGameSpecificSetup()
m_sMissionAudio.m_nSampleIndex[0] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[0] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[0] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.field_22[0] = 0;
+ m_sMissionAudio.m_bIsPlaying[0] = false;
m_sMissionAudio.m_bIsPlayed[0] = false;
m_sMissionAudio.m_bPredefinedProperties[0] = true;
m_sMissionAudio.m_nMissionAudioCounter[0] = 0;
@@ -175,7 +175,7 @@ cAudioManager::PostInitialiseGameSpecificSetup()
m_sMissionAudio.m_nSampleIndex[1] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[1] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[1] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.field_22[1] = 0;
+ m_sMissionAudio.m_bIsPlaying[1] = false;
m_sMissionAudio.m_bIsPlayed[1] = false;
m_sMissionAudio.m_bPredefinedProperties[1] = true;
m_sMissionAudio.m_nMissionAudioCounter[1] = 0;
@@ -1077,15 +1077,15 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams *params)
}
break;
case 'F':
- if (automobile->m_aWheelState[VEHWHEEL_FRONT_LEFT] == WHEEL_STATE_SPINNING)
+ if (automobile->m_aWheelState[CARWHEEL_FRONT_LEFT] == WHEEL_STATE_SPINNING)
traction += 0.1f;
- if (automobile->m_aWheelState[VEHWHEEL_REAR_LEFT] == WHEEL_STATE_SPINNING)
+ if (automobile->m_aWheelState[CARWHEEL_FRONT_RIGHT] == WHEEL_STATE_SPINNING)
traction += 0.1f;
break;
case 'R':
- if (automobile->m_aWheelState[VEHWHEEL_FRONT_RIGHT] == WHEEL_STATE_SPINNING)
+ if (automobile->m_aWheelState[CARWHEEL_REAR_LEFT] == WHEEL_STATE_SPINNING)
traction += 0.1f;
- if (automobile->m_aWheelState[VEHWHEEL_REAR_RIGHT] == WHEEL_STATE_SPINNING)
+ if (automobile->m_aWheelState[CARWHEEL_REAR_RIGHT] == WHEEL_STATE_SPINNING)
traction += 0.1f;
break;
}
@@ -1096,7 +1096,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams *params)
relativeGearChange =
Min(1.0f, (params->m_fVelocityChange - transmission->Gears[currentGear].fShiftDownVelocity) / transmission->fMaxVelocity * 2.5f);
if (traction == 0.0f && automobile->GetStatus() != STATUS_SIMPLE &&
- params->m_fVelocityChange >= transmission->Gears[1].fShiftUpVelocity) {
+ params->m_fVelocityChange < transmission->Gears[1].fShiftUpVelocity) {
traction = 0.7f;
}
relativeChange = traction * automobile->m_fGasPedalAudio * 0.95f + (1.0f - traction) * relativeGearChange;
@@ -1109,7 +1109,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams *params)
relativeChange = automobile->m_fGasPedalAudio;
}
modificator = relativeChange;
- if (currentGear || !automobile->m_nWheelsOnGround)
+ if (currentGear != 0 || automobile->m_nWheelsOnGround == 0)
freq = 1200 * currentGear + 18000.f * modificator + 14000;
else
freq = 13000.f * modificator + 14000;
@@ -1366,12 +1366,12 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
lostTraction = true;
break;
case 'F':
- if ((automobile->m_aWheelState[VEHWHEEL_FRONT_LEFT] != WHEEL_STATE_NORMAL || automobile->m_aWheelState[VEHWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL) &&
- (automobile->m_aWheelState[VEHWHEEL_FRONT_RIGHT] != WHEEL_STATE_NORMAL || automobile->m_aWheelState[VEHWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
+ if ((automobile->m_aWheelState[CARWHEEL_FRONT_LEFT] != WHEEL_STATE_NORMAL || automobile->m_aWheelState[CARWHEEL_FRONT_RIGHT] != WHEEL_STATE_NORMAL) &&
+ (automobile->m_aWheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL || automobile->m_aWheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
lostTraction = true;
break;
case 'R':
- if ((automobile->m_aWheelState[VEHWHEEL_FRONT_RIGHT] != WHEEL_STATE_NORMAL) || (automobile->m_aWheelState[VEHWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
+ if ((automobile->m_aWheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL) || (automobile->m_aWheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
lostTraction = true;
break;
}
@@ -1395,7 +1395,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
SampleManager.StopChannel(m_nActiveSamples);
bAccelSampleStopped = true;
}
- if (!automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn || lostTraction)
+ if (automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction)
gasPedalAudio = automobile->m_fGasPedalAudio;
else
gasPedalAudio = Min(1.0f, params->m_fVelocityChange / params->m_pTransmission->fMaxReverseVelocity);
@@ -1408,8 +1408,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
bAccelSampleStopped = true;
}
nCruising = 0;
- if (!automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn || lostTraction ||
- params->m_fVelocityChange >= 0.01f && automobile->m_fGasPedalAudio > 0.2f) {
+ if (automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction ||
+ params->m_fVelocityChange < 0.01f && automobile->m_fGasPedalAudio > 0.2f) {
automobile->m_fGasPedalAudio *= 0.6f;
gasPedalAudio = automobile->m_fGasPedalAudio;
}
@@ -1429,11 +1429,11 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
CurrentPretendGear = Max(1, currentGear);
} else {
while (nCruising == 0) {
- if (accelerateState < 150 || !automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn || lostTraction ||
+ if (accelerateState < 150 || automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction ||
currentGear < 2 && velocityChange - automobile->m_fVelocityChangeForAudio < 0.01f) { // here could be used abs
- if (!automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn || lostTraction) {
- if (!automobile->m_nWheelsOnGround && automobile->m_nDriveWheelsOnGround ||
- (automobile->bIsHandbrakeOn && !bHandbrakeOnLastFrame || lostTraction && !bLostTractionLastFrame) && automobile->m_nWheelsOnGround) {
+ if (automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction) {
+ if (automobile->m_nWheelsOnGround == 0 && automobile->m_nDriveWheelsOnGround != 0 ||
+ (automobile->bIsHandbrakeOn && !bHandbrakeOnLastFrame || lostTraction && !bLostTractionLastFrame) && automobile->m_nWheelsOnGround != 0) {
automobile->m_fGasPedalAudio *= 0.6f;
}
freqModifier = 0;
@@ -1497,11 +1497,11 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
}
if (nCruising != 0) {
bAccelSampleStopped = true;
- if (accelerateState < 150 || !automobile->m_nWheelsOnGround || automobile->bIsHandbrakeOn || lostTraction ||
+ if (accelerateState < 150 || automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction ||
currentGear < params->m_pTransmission->nNumberOfGears - 1) {
nCruising = 0;
} else {
- if (accelerateState >= 220 && 0.001f + params->m_fVelocityChange < automobile->m_fVelocityChangeForAudio) {
+ if (accelerateState >= 220 && params->m_fVelocityChange + 0.001f < automobile->m_fVelocityChangeForAudio) {
if (nCruising < 800)
++nCruising;
} else if (nCruising > 3) {
@@ -1520,7 +1520,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams *params, CAutomobile *
bLostTractionLastFrame = lostTraction;
}
-void
+bool
cAudioManager::ProcessVehicleSkidding(cVehicleParams *params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -1532,10 +1532,10 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams *params)
float skidVal = 0.0f;
if (params->m_fDistance >= SQR(SOUND_INTENSITY))
- return;
+ return false;
automobile = (CAutomobile *)params->m_pVehicle;
- if (!automobile->m_nWheelsOnGround)
- return;
+ if (automobile->m_nWheelsOnGround == 0)
+ return true;
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
for (int32 i = 0; i < ARRAY_SIZE(automobile->m_aWheelState); i++) {
if (automobile->m_aWheelState[i] == WHEEL_STATE_NORMAL || automobile->Damage.GetWheelStatus(i) == WHEEL_STATUS_MISSING)
@@ -1575,6 +1575,8 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams *params)
emittingVol /= 4;
m_sQueueSample.m_nFrequency = 13000.f * skidVal + 35000.f;
m_sQueueSample.m_nVolume /= 4;
+ if (m_sQueueSample.m_nVolume == 0)
+ return true;
break;
case SURFACE_GRAVEL:
case SURFACE_MUD_DRY:
@@ -1606,43 +1608,40 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams *params)
AddSampleToRequestedQueue();
}
}
+ return true;
}
float
cAudioManager::GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange)
{
- tWheelState wheelState;
- float relativeVelChange;
+ float relativeVelChange = 0.0f;
float gasPedalAudio = automobile->m_fGasPedalAudio;
- float modificator;
float velChange;
float relativeVel;
- wheelState = automobile->m_aWheelState[wheel];
- if (wheelState == WHEEL_STATE_SPINNING && gasPedalAudio > 0.4f) {
- relativeVelChange = (gasPedalAudio - 0.4f) * 1.25f;
-
- } else if (wheelState == WHEEL_STATE_SKIDDING) {
+ switch (automobile->m_aWheelState[wheel])
+ {
+ case WHEEL_STATE_SPINNING:
+ if (gasPedalAudio > 0.4f)
+ relativeVelChange = (gasPedalAudio - 0.4f) * (5.0f / 3.0f) / (4.0f / 3.0f);
+ break;
+ case WHEEL_STATE_SKIDDING:
relativeVelChange = Min(1.0f, Abs(velocityChange) / transmission->fMaxVelocity);
- } else if (wheelState == WHEEL_STATE_FIXED) {
- modificator = 0.4f;
- relativeVelChange = gasPedalAudio;
- if (relativeVelChange > 0.4f) {
- relativeVelChange = relativeVelChange - 0.4f;
- modificator = 5.f / 3.f;
- }
+ break;
+ case WHEEL_STATE_FIXED:
+ relativeVel = gasPedalAudio;
+ if (relativeVel > 0.4f)
+ relativeVel = (gasPedalAudio - 0.4f) * (5.0f / 3.0f);
+
velChange = Abs(velocityChange);
- if (relativeVelChange > 0.4f)
- relativeVelChange = relativeVelChange * modificator;
- if (velChange > 0.04f) {
- relativeVel = Min(1.0f, velChange / transmission->fMaxVelocity);
- } else {
- relativeVel = 0.0f;
- }
- if (relativeVel >= relativeVelChange)
+ if (velChange > 0.04f)
+ relativeVelChange = Min(1.0f, velChange / transmission->fMaxVelocity);
+ if (relativeVel > relativeVelChange)
relativeVelChange = relativeVel;
- } else {
- relativeVelChange = 0.0f;
+
+ break;
+ default:
+ break;
}
return Max(relativeVelChange, Min(1.0f, Abs(automobile->m_vecTurnSpeed.z) * 20.0f));
@@ -1651,12 +1650,10 @@ cAudioManager::GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobil
float
cAudioManager::GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange)
{
- float relativeVelChange;
+ float relativeVelChange = 0.0f;
if (automobile->m_aWheelState[wheel] == WHEEL_STATE_SKIDDING)
relativeVelChange = Min(1.0f, Abs(velocityChange) / transmission->fMaxVelocity);
- else
- relativeVelChange = 0.0f;
return Max(relativeVelChange, Min(1.0f, Abs(automobile->m_vecTurnSpeed.z) * 20.0f));
}
@@ -2550,10 +2547,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
AddSampleToRequestedQueue();
}
if (FindPlayerVehicle() == params->m_pVehicle) {
- if (Pads[0].GetAccelerate() <= Pads[0].GetBrake())
- padAccelerate = Pads[0].GetBrake();
- else
- padAccelerate = Pads[0].GetAccelerate();
+ padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
padRelativeAccerate = padAccelerate / 255;
emittingVol = (100.f * padRelativeAccerate) + 15;
m_sQueueSample.m_nFrequency = (3000.f * padRelativeAccerate) + 6000;
@@ -2592,10 +2586,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_bRequireReflection = false;
} else {
if (FindPlayerVehicle() == params->m_pVehicle) {
- if (Pads[0].GetAccelerate() <= Pads[0].GetBrake())
- padAccelerate = Pads[0].GetBrake();
- else
- padAccelerate = Pads[0].GetAccelerate();
+ padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
if (padAccelerate <= 20) {
emittingVol = 45 - 45 * padAccelerate / 40;
m_sQueueSample.m_nFrequency = 100 * padAccelerate + 11025;
@@ -2671,7 +2662,7 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams *params)
return true;
velocityChange = Min(0.75f, velocityChange);
- multiplier = (velocityChange - 0.0005f) * 1.3342f;
+ multiplier = (velocityChange - 0.0005f) / (1499.0f / 2000.0f);
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
vol = (30.f * multiplier);
m_sQueueSample.m_nVolume = ComputeVolume(vol, 50.f, m_sQueueSample.m_fDistance);
@@ -2792,7 +2783,7 @@ cAudioManager::ProcessJumbo(cVehicleParams *params)
DoJumboVolOffset();
position = PlanePathPosition[plane->m_nPlaneId];
if (position <= TakeOffPoint) {
- if (plane->m_fSpeed <= 0.10334f) {
+ if (plane->m_fSpeed <= 0.103344f) {
ProcessJumboTaxi();
return;
}
@@ -2804,7 +2795,7 @@ cAudioManager::ProcessJumbo(cVehicleParams *params)
ProcessJumboFlying();
} else {
if (position > LandingPoint) {
- if (plane->m_fSpeed > 0.10334f) {
+ if (plane->m_fSpeed > 0.103344f) {
ProcessJumboDecel(plane);
return;
}
@@ -2834,7 +2825,7 @@ cAudioManager::ProcessJumboAccel(CPlane *plane)
float modificator;
if (SetupJumboFlySound(20)) {
- modificator = (plane->m_fSpeed - 0.10334f) * 1.676f;
+ modificator = (plane->m_fSpeed - 0.103344f) * 1.6760077f;
if (modificator > 1.0f)
modificator = 1.0f;
if (SetupJumboRumbleSound(MAX_VOLUME * modificator) && SetupJumboTaxiSound((1.0f - modificator) * 75.f)) {
@@ -2887,7 +2878,7 @@ void
cAudioManager::ProcessJumboDecel(CPlane *plane)
{
if (SetupJumboFlySound(20) && SetupJumboTaxiSound(75)) {
- const float modificator = Min(1.f, (plane->m_fSpeed - 0.10334f) * 1.676f);
+ const float modificator = Min(1.f, (plane->m_fSpeed - 0.103344f) * 1.6760077f);
SetupJumboEngineSound(MAX_VOLUME * modificator, 6050.f * modificator + 16000);
SetupJumboWhineSound(18, 29500);
}
@@ -5645,7 +5636,7 @@ cAudioManager::PreloadMissionAudio(uint8 slot, Const char *name)
m_sMissionAudio.m_nSampleIndex[slot] = missionAudioSfx;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.field_22[slot] = 0;
+ m_sMissionAudio.m_bIsPlaying[slot] = false;
m_sMissionAudio.m_nMissionAudioCounter[slot] = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
m_sMissionAudio.m_nMissionAudioCounter[slot] *= 4;
m_sMissionAudio.m_bIsPlayed[slot] = false;
@@ -5726,10 +5717,12 @@ cAudioManager::ClearMissionAudio(uint8 slot)
m_sMissionAudio.m_nSampleIndex[slot] = NO_SAMPLE;
m_sMissionAudio.m_nLoadingStatus[slot] = LOADING_STATUS_NOT_LOADED;
m_sMissionAudio.m_nPlayStatus[slot] = PLAY_STATUS_STOPPED;
- m_sMissionAudio.field_22[slot] = 0;
+ m_sMissionAudio.m_bIsPlaying[slot] = false;
m_sMissionAudio.m_bIsPlayed[slot] = false;
m_sMissionAudio.m_bPredefinedProperties[slot] = true;
m_sMissionAudio.m_nMissionAudioCounter[slot] = 0;
+ m_sMissionAudio.m_bIsMobile[slot] = false;
+ SampleManager.StopStreamedFile(slot + 1);
}
}
@@ -5828,7 +5821,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
m_sMissionAudio.m_nMissionAudioCounter[slot] = 0;
}
}
- } else if (m_sMissionAudio.field_22[slot]) {
+ } else if (m_sMissionAudio.m_bIsPlaying[slot]) {
if (SampleManager.IsStreamPlaying(slot + 1) || m_nUserPause || m_nPreviousUserPause) {
if (m_nUserPause)
SampleManager.PauseStream(1, slot + 1);
@@ -5870,7 +5863,7 @@ cAudioManager::ProcessMissionAudioSlot(uint8 slot)
break;
nCheckPlayingDelay[slot] = 0;
}
- m_sMissionAudio.field_22[slot] = 1;
+ m_sMissionAudio.m_bIsPlaying[slot] = true;
}
break;
default:
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 8c795477..5b0b4907 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -169,11 +169,11 @@ cAudioManager::SetEntityStatus(int32 id, uint8 status)
void
cAudioManager::PlayOneShot(int32 index, int16 sound, float vol)
{
- static const uint8 OneShotPriority[] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 3, 5, 2, 2, 1, 1, 3, 1, 3, 3, 1, 1, 1, 4, 4, 3, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 3, 2, 2, 2, 2, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 1, 1, 9,
- 2, 2, 0, 0, 0, 0, 3, 3, 5, 1, 1, 1, 1, 3, 4, 7, 6, 6, 6, 6, 1, 3, 4, 3, 4, 2, 1, 3, 5, 4, 6, 6, 1, 3,
- 1, 1, 1, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ static const uint8 OneShotPriority[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 2, 5, 5, 3, 5, 2, 2, 1, 1, 3, 1, 3, 3, 1, 1, 1, 1, 4, 4, 4, 3, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 3, 4, 2, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 1, 1, 9, 0, 0, 0, 1, 2, 2, 0, 0, 2, 3, 3, 3, 5, 1, 1,
+ 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 7, 1, 4, 3, 4, 2, 2, 2, 3, 1, 2, 1, 3, 5, 3, 4, 6, 4, 6, 3, 0, 0, 0, 0, 0,
+ 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0, 3, 3, 1, 0 };
if (m_bIsInitialised) {
if (index >= 0 && index < NUM_AUDIOENTITIES) {
@@ -437,7 +437,7 @@ cAudioManager::ServiceSoundEffects()
}
ClearActiveSamples();
}
- m_nActiveSampleQueue = m_nActiveSampleQueue != 1;
+ m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1;
ProcessReverb();
ProcessSpecial();
ClearRequestedQueue();
@@ -687,7 +687,7 @@ cAudioManager::AddReleasingSounds()
{
bool toProcess[44]; // why not 27?
- int8 queue = m_nActiveSampleQueue == 0;
+ int8 queue = m_nActiveSampleQueue == 0 ? 1 : 0;
for (int32 i = 0; i < m_SampleRequestQueuesStatus[queue]; i++) {
tSound &sample = m_asSamples[queue][m_abSampleQueueIndexTable[queue][i]];
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 738aae58..b34dbed0 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -108,7 +108,7 @@ public:
int32 m_nSampleIndex[MISSION_AUDIO_SLOTS];
uint8 m_nLoadingStatus[MISSION_AUDIO_SLOTS];
uint8 m_nPlayStatus[MISSION_AUDIO_SLOTS];
- uint8 field_22[MISSION_AUDIO_SLOTS]; // todo find a name
+ bool m_bIsPlaying[MISSION_AUDIO_SLOTS];
int32 m_nMissionAudioCounter[MISSION_AUDIO_SLOTS];
bool m_bIsPlayed[MISSION_AUDIO_SLOTS];
bool m_bIsMobile[MISSION_AUDIO_SLOTS];
@@ -362,7 +362,7 @@ public:
bool ProcessVehicleReverseWarning(cVehicleParams *params);
bool ProcessVehicleRoadNoise(cVehicleParams *params);
bool ProcessVehicleSirenOrAlarm(cVehicleParams *params);
- void ProcessVehicleSkidding(cVehicleParams *params);
+ bool ProcessVehicleSkidding(cVehicleParams *params);
void ProcessWaterCannon(int32);
void ProcessWeather(int32 id);
bool ProcessWetRoadNoise(cVehicleParams *params);
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 7581114d..6859cba3 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -112,25 +112,69 @@ cDMAudio::Get3DProviderName(uint8 id)
return AudioManager.Get3DProviderName(id);
}
+// TODO(Miami): Content of this moved to cSampleManager or cAudioManager
int8 cDMAudio::AutoDetect3DProviders(void)
{
+ if (!AudioManager.IsAudioInitialised())
+ return -1;
+
+ int eax = -1, eax2 = -1, eax3 = -1, ds3dh = -1, ds3ds = -1;
+
for ( int32 i = 0; i < GetNum3DProvidersAvailable(); i++ )
{
- wchar buff[64];
-
- char *name = Get3DProviderName(i);
- AsciiToUnicode(name, buff);
- char *providername = UnicodeToAscii(buff);
+ char *providername = Get3DProviderName(i);
strupr(providername);
-#if defined(AUDIO_MSS)
- if ( !strcmp(providername, "MILES FAST 2D POSITIONAL AUDIO") )
- return i;
-#elif defined(AUDIO_OAL)
- if ( !strcmp(providername, "OPENAL SOFT") )
- return i;
+
+#if defined(AUDIO_OAL)
+ if (!strcmp(providername, "OPENAL SOFT")) {
+ SetCurrent3DProvider(i);
+ if (GetCurrent3DProviderIndex() == i)
+ return i;
+ }
+#else
+ if (!strcmp(providername, "CREATIVE LABS EAX 3 (TM)")) {
+ SetCurrent3DProvider(i);
+ if (GetCurrent3DProviderIndex() == i) {
+ eax3 = i;
+ }
+ }
+
+ if (!strcmp(providername, "CREATIVE LABS EAX 2 (TM)")) {
+ SetCurrent3DProvider(i);
+ if (GetCurrent3DProviderIndex() == i)
+ eax2 = i;
+ }
+
+ if (!strcmp(providername, "CREATIVE LABS EAX (TM)")) {
+ SetCurrent3DProvider(i);
+ if (GetCurrent3DProviderIndex() == i)
+ eax = i;
+ }
+
+ if (!strcmp(providername, "DIRECTSOUND3D HARDWARE SUPPORT")) {
+ SetCurrent3DProvider(i);
+ if (GetCurrent3DProviderIndex() == i)
+ ds3dh = i;
+ }
+
+ if (!strcmp(providername, "DIRECTSOUND3D SOFTWARE EMULATION")) {
+ SetCurrent3DProvider(i);
+ if (GetCurrent3DProviderIndex() == i)
+ ds3ds = i;
+ }
#endif
}
+ if (eax3 != -1)
+ return eax3;
+ if (eax2 != -1)
+ return eax2;
+ if (eax != -1)
+ return eax;
+ if (ds3dh != -1)
+ return ds3dh;
+ if (ds3ds != -1)
+ return ds3ds;
return -1;
}
diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h
index bb1454c9..e7d3a23b 100644
--- a/src/audio/DMAudio.h
+++ b/src/audio/DMAudio.h
@@ -7,6 +7,9 @@
#define AEHANDLE_IS_FAILED(h) ((h)<0)
#define AEHANDLE_IS_OK(h) ((h)>=0)
+#define NO_AUDIO_PROVIDER -3
+#define AUDIO_PROVIDER_NOT_DETERMINED -99
+
class cAudioScriptObject;
class CEntity;
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 9fb1991e..ae2e97ac 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -714,15 +714,17 @@ cMusicManager::UsesPoliceRadio(CVehicle *veh)
{
switch (veh->GetModelIndex())
{
- case MI_FBICAR:
- case MI_POLICE:
- case MI_ENFORCER:
- case MI_PREDATOR:
+ case MI_VCNMAV:
+ case MI_POLMAV:
+ case MI_COASTG:
case MI_RHINO:
case MI_BARRACKS:
return true;
+ case MI_MRWHOOP:
+ case MI_HUNTER:
+ return false;
}
- return false;
+ return veh->UsesSiren();
}
void
diff --git a/src/audio/oal/aldlist.cpp b/src/audio/oal/aldlist.cpp
index 3e86b1d7..881418c1 100644
--- a/src/audio/oal/aldlist.cpp
+++ b/src/audio/oal/aldlist.cpp
@@ -27,6 +27,7 @@
#ifndef _WIN32
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
+#define _strdup strdup
#endif
#ifdef AUDIO_OAL
@@ -71,7 +72,7 @@ ALDeviceList::ALDeviceList()
if ((bNewName) && (actualDeviceName != NULL) && (strlen(actualDeviceName) > 0)) {
ALDEVICEINFO ALDeviceInfo;
ALDeviceInfo.bSelected = true;
- ALDeviceInfo.strDeviceName = actualDeviceName;
+ ALDeviceInfo.strDeviceName = _strdup(actualDeviceName);
alcGetIntegerv(device, ALC_MAJOR_VERSION, sizeof(int), &ALDeviceInfo.iMajorVersion);
alcGetIntegerv(device, ALC_MINOR_VERSION, sizeof(int), &ALDeviceInfo.iMinorVersion);
diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp
index 0378c07c..b689e929 100644
--- a/src/audio/oal/stream.cpp
+++ b/src/audio/oal/stream.cpp
@@ -5,7 +5,11 @@
#include "sampman.h"
#ifdef _WIN32
+
+// TODO: This is due to version difference of 32-bit libmpg123 and 64-bit libmpg123, fix it
+#ifndef _WIN64
typedef long ssize_t;
+#endif
#pragma comment( lib, "libsndfile-1.lib" )
#pragma comment( lib, "libmpg123.lib" )
#else
@@ -173,8 +177,11 @@ public:
size_t size;
int err = mpg123_read(m_pMH, (unsigned char *)buffer, GetBufferSize(), &size);
+#if defined(__LP64__) || defined(_WIN64)
+ assert("We can't handle audio files more then 2 GB yet :shrug:" && (size < UINT32_MAX));
+#endif
if (err != MPG123_OK && err != MPG123_DONE) return 0;
- return size;
+ return (uint32)size;
}
};
@@ -248,15 +255,11 @@ CStream::CStream(char *filename, ALuint &source, ALuint (&buffers)[NUM_STREAMBUF
{
// Be case-insensitive on linux (from https://github.com/OneSadCookie/fcaseopen/)
#if !defined(_WIN32)
- FILE *test = fopen(filename, "r");
- if (!test) {
- char *r = (char*)alloca(strlen(filename) + 2);
- if (casepath(filename, r))
- {
- strcpy(m_aFilename, r);
- }
+ char *real = casepath(filename);
+ if (real) {
+ strcpy(m_aFilename, real);
+ free(real);
} else {
- fclose(test);
#else
{
#endif
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 5893ea64..d6bb1975 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -1012,6 +1012,15 @@ cSampleManager::Initialise(void)
}
+#ifdef AUDIO_CACHE
+ TRACE("cache");
+ FILE *cacheFile = fopen("audio\\sound.cache", "rb");
+ if (cacheFile) {
+ fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
+ fclose(cacheFile);
+ m_bInitialised = true;
+ }else {
+#endif
TRACE("cdrom");
S32 tatalms;
@@ -1168,7 +1177,13 @@ cSampleManager::Initialise(void)
_bUseHDDAudio = false;
}
#endif
-
+#ifdef AUDIO_CACHE
+ cacheFile = fopen("audio\\sound.cache", "wb");
+ fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
+ fclose(cacheFile);
+ }
+#endif
+
TRACE("stream");
{
for ( int32 i = 0; i < MAX_STREAMS; i++ )
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index de55c2ed..bf2eca7d 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -604,7 +604,13 @@ cSampleManager::Initialise(void)
return false;
}
}
-
+#ifdef AUDIO_CACHE
+ FILE *cacheFile = fopen("audio\\sound.cache", "rb");
+ if (cacheFile) {
+ fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
+ fclose(cacheFile);
+ } else
+#endif
{
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
@@ -622,6 +628,11 @@ cSampleManager::Initialise(void)
else
USERERROR("Can't open '%s'\n", StreamedNameTable[i]);
}
+#ifdef AUDIO_CACHE
+ cacheFile = fopen("audio\\sound.cache", "wb");
+ fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
+ fclose(cacheFile);
+#endif
}
LoadSampleBank(SAMPLEBANK_MAIN);
diff --git a/src/audio/soundlist.h b/src/audio/soundlist.h
index 3db5b666..2a5b83cf 100644
--- a/src/audio/soundlist.h
+++ b/src/audio/soundlist.h
@@ -113,7 +113,7 @@ enum eSound : uint16
SOUND_PED_BURNING,
SOUND_PED_PLAYER_REACTTOCOP,
SOUND_PED_ARREST_COP,
- SOUND_111,
+ SOUND_PED_MIAMIVICE_EXITING_CAR,
SOUND_PED_COP_HELIPILOTPHRASE,
SOUND_PED_PULLOUTWEAPON,
SOUND_PED_HELI_PLAYER_FOUND,
@@ -188,7 +188,7 @@ enum eSound : uint16
SOUND_186, // makes same sound with 40
SOUND_187, // makes same sound with 46
SOUND_MELEE_ATTACK_START,
- SOUND_189,
+ SOUND_SKATING,
SOUND_WEAPON_MINIGUN_ATTACK,
SOUND_WEAPON_MINIGUN_2,
SOUND_WEAPON_MINIGUN_3,
diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp
index 7e517a83..a3fcbf9a 100644
--- a/src/control/CarAI.cpp
+++ b/src/control/CarAI.cpp
@@ -80,7 +80,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
if (FindSwitchDistanceClose(pVehicle) > (FindPlayerCoors() - pVehicle->GetPosition()).Magnitude2D() ||
pVehicle->AutoPilot.m_bIgnorePathfinding) {
pVehicle->AutoPilot.m_nCarMission = MISSION_RAMPLAYER_CLOSE;
- if (pVehicle->UsesSiren(pVehicle->GetModelIndex()))
+ if (pVehicle->UsesSiren())
pVehicle->m_bSirenOrAlarm = true;
}
BackToCruisingIfNoWantedLevel(pVehicle);
@@ -136,7 +136,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
if (FindSwitchDistanceClose(pVehicle) > (FindPlayerCoors() - pVehicle->GetPosition()).Magnitude2D() ||
pVehicle->AutoPilot.m_bIgnorePathfinding) {
pVehicle->AutoPilot.m_nCarMission = MISSION_BLOCKPLAYER_CLOSE;
- if (pVehicle->UsesSiren(pVehicle->GetModelIndex()))
+ if (pVehicle->UsesSiren())
pVehicle->m_bSirenOrAlarm = true;
}
BackToCruisingIfNoWantedLevel(pVehicle);
@@ -294,7 +294,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
if ((pVehicle->AutoPilot.m_pTargetCar->GetPosition() - pVehicle->GetPosition()).Magnitude2D() < FindSwitchDistanceClose(pVehicle) ||
pVehicle->AutoPilot.m_bIgnorePathfinding){
pVehicle->AutoPilot.m_nCarMission = MISSION_BLOCKCAR_CLOSE;
- if (pVehicle->UsesSiren(pVehicle->GetModelIndex()))
+ if (pVehicle->UsesSiren())
pVehicle->m_bSirenOrAlarm = true;
}
}else{
@@ -540,7 +540,7 @@ void CCarAI::AddPoliceCarOccupants(CVehicle* pVehicle)
return;
pVehicle->bOccupantsHaveBeenGenerated = true;
switch (pVehicle->GetModelIndex()){
- case MI_FBICAR:
+ case MI_FBIRANCH:
case MI_ENFORCER:
pVehicle->SetUpDriver();
for (int i = 0; i < 3; i++)
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 514150a6..cd08753d 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -366,7 +366,7 @@ CCarCtrl::GenerateOneRandomCar()
pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
}
- if (carModel == MI_FBICAR){
+ if (carModel == MI_FBIRANCH){
pVehicle->m_currentColour1 = 0;
pVehicle->m_currentColour2 = 0;
}
@@ -874,9 +874,9 @@ CCarCtrl::ChoosePoliceCarModel(void)
CStreaming::HasModelLoaded(MI_POLICE))
return ((CGeneral::GetRandomNumber() & 0xF) == 0) ? MI_ENFORCER : MI_POLICE;
if (FindPlayerPed()->m_pWanted->AreFbiRequired() &&
- CStreaming::HasModelLoaded(MI_FBICAR) &&
+ CStreaming::HasModelLoaded(MI_FBIRANCH) &&
CStreaming::HasModelLoaded(MI_FBI))
- return MI_FBICAR;
+ return MI_FBIRANCH;
if (FindPlayerPed()->m_pWanted->AreArmyRequired() &&
CStreaming::HasModelLoaded(MI_RHINO) &&
CStreaming::HasModelLoaded(MI_BARRACKS) &&
diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp
index f00486e8..bbb35080 100644
--- a/src/control/Darkel.cpp
+++ b/src/control/Darkel.cpp
@@ -27,6 +27,7 @@ int32 CDarkel::KillsNeeded;
int8 CDarkel::InterruptedWeapon;
/*
+ * TODO: Collect timer/kill counter RGBA colors on top like in Hud/Frontend.
* bStandardSoundAndMessages is a completely beta thing,
* makes game handle sounds & messages instead of SCM (just like in GTA2)
* but it's never been used in the game. Has unused sliding text when frenzy completed etc.
@@ -102,7 +103,7 @@ CDarkel::DrawMessages()
if (timeLeft > 4000 || CTimer::GetFrameCounter() & 1) {
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(109.0f), gUString);
- CFont::SetColor(CRGBA(150, 100, 255, 255));
+ CFont::SetColor(CRGBA(0, 207, 133, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f), SCREEN_SCALE_Y(108.0f), gUString);
}
}
@@ -110,7 +111,7 @@ CDarkel::DrawMessages()
AsciiToUnicode(gString, gUString);
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(35.0f), SCREEN_SCALE_Y(144.0f), gUString);
- CFont::SetColor(CRGBA(255, 128, 128, 255));
+ CFont::SetColor(CRGBA(156, 91, 40, 255));
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(34.0f), SCREEN_SCALE_Y(143.0f), gUString);
break;
}
diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp
index af1680ae..2af9464c 100644
--- a/src/control/GameLogic.cpp
+++ b/src/control/GameLogic.cpp
@@ -155,8 +155,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestHospitalRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
- CRestart::OverrideHospitalLevel = LEVEL_NONE;
- CRestart::OverridePoliceStationLevel = LEVEL_NONE;
+ CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
+ CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
PassTime(720);
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
AfterDeathArrestSetUpShortCutTaxi();
@@ -261,8 +261,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
- CRestart::OverrideHospitalLevel = LEVEL_NONE;
- CRestart::OverridePoliceStationLevel = LEVEL_NONE;
+ CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
+ CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
PassTime(720);
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
AfterDeathArrestSetUpShortCutTaxi();
@@ -313,8 +313,8 @@ CGameLogic::Update()
CCarCtrl::ClearInterestingVehicleList();
CWorld::ClearExcitingStuffFromArea(pPlayerInfo.GetPos(), 4000.0f, 1);
CRestart::FindClosestPoliceRestartPoint(pPlayerInfo.GetPos(), &vecRestartPos, &fRestartFloat);
- CRestart::OverridePoliceStationLevel = LEVEL_NONE;
- CRestart::OverrideHospitalLevel = LEVEL_NONE;
+ CRestart::OverridePoliceStationLevel = LEVEL_GENERIC;
+ CRestart::OverrideHospitalLevel = LEVEL_GENERIC;
RestorePlayerStuffDuringResurrection(pPlayerInfo.m_pPed, vecRestartPos, fRestartFloat);
SortOutStreamingAndMemory(pPlayerInfo.GetPos());
TheCamera.m_fCamShakeForce = 0.0f;
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index 88654141..e7b5ebe6 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -137,6 +137,9 @@ void CGarages::Init(void)
MessageStartTime = 0;
PlayerInGarage = false;
BombsAreFree = false;
+#ifdef FIX_BUGS
+ RespraysAreFree = false;
+#endif
CarsCollected = 0;
BankVansCollected = 0;
PoliceCarsCollected = 0;
@@ -347,7 +350,7 @@ void CGarage::Update()
FindPlayerPed()->m_pWanted->m_bIgnoredByCops = true;
}
else {
- CGarages::TriggerMessage("GA_3", -1, 4000, -1); // No more freebies. $1000 to respray!
+ CGarages::TriggerMessage("GA_3", -1, 4000, -1); // No more freebies. $100 to respray!
m_eGarageState = GS_OPENEDCONTAINSCAR;
DMAudio.PlayFrontEndSound(SOUND_GARAGE_NO_MONEY, 1);
}
@@ -400,7 +403,7 @@ void CGarage::Update()
FindPlayerPed()->m_pWanted->Suspend();
}
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_GARAGE);
- FindPlayerPed()->m_pWanted->m_bIgnoredByCops = true;
+ FindPlayerPed()->m_pWanted->m_bIgnoredByCops = false;
#ifdef FIX_BUGS
bool bChangedColour = false;
#else
@@ -1096,7 +1099,7 @@ bool CGarage::IsStaticPlayerCarEntirelyInside()
{
if (!FindPlayerVehicle())
return false;
- if (!FindPlayerVehicle()->IsCar())
+ if (!FindPlayerVehicle()->IsCar() && !FindPlayerVehicle()->IsBike())
return false;
if (FindPlayerPed()->GetPedState() != PED_DRIVING)
return false;
@@ -1386,6 +1389,7 @@ bool CGarages::IsCarSprayable(CVehicle * pVehicle)
case MI_BARRACKS:
case MI_DODO:
case MI_COACH:
+ case MI_FBIRANCH:
return false;
default:
break;
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index 95abe2c5..6576be7f 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -269,12 +269,12 @@ CPickup::Update(CPlayerPed *player, CVehicle *vehicle, int playerId)
return true;
case PICKUP_COLLECTABLE1:
CWorld::Players[playerId].m_nCollectedPackages++;
- CWorld::Players[playerId].m_nMoney += 1000;
+ CWorld::Players[playerId].m_nMoney += 100;
if (CWorld::Players[playerId].m_nCollectedPackages == CWorld::Players[playerId].m_nTotalPackages) {
printf("All collectables have been picked up\n");
CGarages::TriggerMessage("CO_ALL", -1, 5000, -1);
- CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 1000000;
+ CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 100000;
} else
CGarages::TriggerMessage("CO_ONE", CWorld::Players[CWorld::PlayerInFocus].m_nCollectedPackages, 5000, CWorld::Players[CWorld::PlayerInFocus].m_nTotalPackages);
diff --git a/src/control/Record.h b/src/control/Record.h
index 7af733ba..8b55b1f4 100644
--- a/src/control/Record.h
+++ b/src/control/Record.h
@@ -17,13 +17,13 @@ public:
int8 forwardY;
int8 forwardZ;
int8 wheel;
- uint8 gas;
- uint8 brake;
+ int8 gas;
+ int8 brake;
bool handbrake;
CVector pos;
};
-extern char gString[256];;
+extern char gString[256];
class CRecordDataForChase
{
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 4407254c..1a050bee 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -170,7 +170,7 @@ static void ApplyPanelDamageToCar(uint32 panels, CAutomobile* vehicle, bool flyi
void PrintElementsInPtrList(void)
{
- for (CPtrNode* node = CWorld::GetBigBuildingList(LEVEL_NONE).first; node; node = node->next) {
+ for (CPtrNode* node = CWorld::GetBigBuildingList(LEVEL_GENERIC).first; node; node = node->next) {
/* Most likely debug print was present here */
}
}
@@ -1143,7 +1143,7 @@ void CReplay::StoreStuffInMem(void)
pWorld1 = new uint8[sizeof(CSector) * NUMSECTORS_X * NUMSECTORS_Y];
memcpy(pWorld1, CWorld::GetSector(0, 0), NUMSECTORS_X * NUMSECTORS_Y * sizeof(CSector));
WorldPtrList = CWorld::GetMovingEntityList().first; // why
- BigBuildingPtrList = CWorld::GetBigBuildingList(LEVEL_NONE).first;
+ BigBuildingPtrList = CWorld::GetBigBuildingList(LEVEL_GENERIC).first;
pPickups = new uint8[sizeof(CPickup) * NUMPICKUPS];
memcpy(pPickups, CPickups::aPickUps, NUMPICKUPS * sizeof(CPickup));
pReferences = new uint8[(sizeof(CReference) * NUMREFERENCES)];
@@ -1189,7 +1189,7 @@ void CReplay::RestoreStuffFromMem(void)
delete[] pWorld1;
pWorld1 = nil;
CWorld::GetMovingEntityList().first = WorldPtrList;
- CWorld::GetBigBuildingList(LEVEL_NONE).first = BigBuildingPtrList;
+ CWorld::GetBigBuildingList(LEVEL_GENERIC).first = BigBuildingPtrList;
memcpy(CPickups::aPickUps, pPickups, sizeof(CPickup) * NUMPICKUPS);
delete[] pPickups;
pPickups = nil;
@@ -1483,7 +1483,7 @@ void CReplay::StreamAllNecessaryCarsAndPeds(void)
for (int slot = 0; slot < NUM_REPLAYBUFFERS; slot++) {
if (BufferStatus[slot] == REPLAYBUFFER_UNUSED)
continue;
- for (int offset = 0; Buffers[slot][offset] != REPLAYPACKET_END; offset += FindSizeOfPacket(Buffers[slot][offset])) {
+ for (size_t offset = 0; Buffers[slot][offset] != REPLAYPACKET_END; offset += FindSizeOfPacket(Buffers[slot][offset])) {
switch (Buffers[slot][offset]) {
case REPLAYPACKET_VEHICLE:
CStreaming::RequestModel(((tVehicleUpdatePacket*)&Buffers[slot][offset])->mi, 0);
@@ -1505,7 +1505,7 @@ void CReplay::FindFirstFocusCoordinate(CVector *coord)
for (int slot = 0; slot < NUM_REPLAYBUFFERS; slot++) {
if (BufferStatus[slot] == REPLAYBUFFER_UNUSED)
continue;
- for (int offset = 0; Buffers[slot][offset] != REPLAYPACKET_END; offset += FindSizeOfPacket(Buffers[slot][offset])) {
+ for (size_t offset = 0; Buffers[slot][offset] != REPLAYPACKET_END; offset += FindSizeOfPacket(Buffers[slot][offset])) {
if (Buffers[slot][offset] == REPLAYPACKET_GENERAL) {
*coord = ((tGeneralPacket*)&Buffers[slot][offset])->player_pos;
return;
diff --git a/src/control/Restart.cpp b/src/control/Restart.cpp
index 64cabf5d..8fa018d6 100644
--- a/src/control/Restart.cpp
+++ b/src/control/Restart.cpp
@@ -24,8 +24,8 @@ uint16 CRestart::NumberOfPoliceRestarts;
void
CRestart::Initialise()
{
- OverridePoliceStationLevel = LEVEL_NONE;
- OverrideHospitalLevel = LEVEL_NONE;
+ OverridePoliceStationLevel = LEVEL_GENERIC;
+ OverrideHospitalLevel = LEVEL_GENERIC;
bFadeInAfterNextArrest = true;
bFadeInAfterNextDeath = true;
OverrideHeading = 0.0f;
@@ -86,7 +86,7 @@ CRestart::FindClosestHospitalRestartPoint(const CVector &pos, CVector *outPos, f
// find closest point on this level
for (int i = 0; i < NumberOfHospitalRestarts; i++) {
- if (CTheZones::GetLevelFromPosition(&HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_NONE ? OverrideHospitalLevel : curlevel)) {
+ if (CTheZones::GetLevelFromPosition(&HospitalRestartPoints[i]) == (OverrideHospitalLevel != LEVEL_GENERIC ? OverrideHospitalLevel : curlevel)) {
float dist = (pos - HospitalRestartPoints[i]).MagnitudeSqr();
if (fMinDist >= dist) {
fMinDist = dist;
@@ -133,7 +133,7 @@ CRestart::FindClosestPoliceRestartPoint(const CVector &pos, CVector *outPos, flo
// find closest point on this level
for (int i = 0; i < NumberOfPoliceRestarts; i++) {
- if (CTheZones::GetLevelFromPosition(&PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_NONE ? OverridePoliceStationLevel : curlevel)) {
+ if (CTheZones::GetLevelFromPosition(&PoliceRestartPoints[i]) == (OverridePoliceStationLevel != LEVEL_GENERIC ? OverridePoliceStationLevel : curlevel)) {
float dist = (pos - PoliceRestartPoints[i]).MagnitudeSqr();
if (fMinDist >= dist) {
fMinDist = dist;
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index 5d466be2..010dec3f 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -67,7 +67,7 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
eCopType copType = COP_STREET;
switch (pVehicle->GetModelIndex())
{
- case MI_FBICAR:
+ case MI_FBIRANCH:
modelInfoId = MI_FBI;
copType = COP_FBI;
break;
@@ -236,7 +236,7 @@ CRoadBlocks::CreateRoadBlockBetween2Points(CVector point1, CVector point2)
pVehicle->AutoPilot.m_nNextLane = pVehicle->AutoPilot.m_nCurrentLane = 0;
pVehicle->AutoPilot.m_nCruiseSpeed = pVehicle->AutoPilot.m_fMaxTrafficSpeed = 0;
pVehicle->bExtendedRange = true;
- if (pVehicle->UsesSiren(pVehicle->GetModelIndex()) && CGeneral::GetRandomNumber() & 1)
+ if (pVehicle->UsesSiren() && CGeneral::GetRandomNumber() & 1)
pVehicle->m_bSirenOrAlarm = true;
if (pVehicle->GetUp().z > 0.94f) {
CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), 0);
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 92f407b7..88a62f4e 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -352,8 +352,8 @@ const tScriptCommandData commands[] = {
REGISTER_COMMAND(COMMAND_SET_CAR_CRUISE_SPEED, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SET_CAR_DRIVING_STYLE, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SET_CAR_MISSION, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_SPECIAL_0, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SPECIAL_1, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SPECIAL_2, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
@@ -393,945 +393,1225 @@ const tScriptCommandData commands[] = {
REGISTER_COMMAND(COMMAND_ANDOR, INPUT_ARGUMENTS(ARGTYPE_ANDOR,), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_LAUNCH_MISSION, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_MISSION_HAS_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_STORE_CAR_CHAR_IS_IN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_STORE_CAR_PLAYER_IS_IN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_BUTTON_PRESSED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_PAD_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), true, -1, ""),
- REGISTER_COMMAND(COMMAND_DELETE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_SCORE_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_STORE_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GIVE_REMOTE_CONTROLLED_CAR_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ALTER_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ALTER_WANTED_LEVEL_NO_DROP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_WANTED_LEVEL_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_DEATHARREST_STATE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_STORE_CAR_CHAR_IS_IN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_STORE_CAR_PLAYER_IS_IN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_BUTTON_PRESSED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PAD_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_PLAYER_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ANY_MEANS_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CHAR_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CHAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DELETE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_SCORE_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_STORE_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GIVE_REMOTE_CONTROLLED_CAR_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ALTER_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ALTER_WANTED_LEVEL_NO_DROP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_WANTED_LEVEL_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_DEATHARREST_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_HAS_DEATHARREST_BEEN_EXECUTED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_AMMO_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_AMMO_TO_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_AMMO_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STILL_ALIVE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_DEAD, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_DEAD, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_DEAD, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_THREAT_SEARCH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_THREAT_REACTION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_NO_OBJ, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ORDER_DRIVER_OUT_OF_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ORDER_CHAR_TO_DRIVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_PATROL_POINT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_GANGZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_PRESSING_HORN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CHAR_SPOTTED_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_ORDER_CHAR_TO_BACKDOOR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_CHAR_TO_GANG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_OBJECTIVE_PASSED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_DRIVE_AGGRESSION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_MAX_DRIVESPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_CHAR_INSIDE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WARP_PLAYER_FROM_CAR_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MAKE_CHAR_DO_NOTHING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_INVINCIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_INVINCIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_GRAPHIC_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_GRAPHIC_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_PLAYER_BEEN_ARRESTED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_STOP_CHAR_DRIVING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_KILL_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FAVOURITE_CAR_MODEL_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OCCUPATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHANGE_CAR_LOCK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SHAKE_CAM_WITH_POINT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_REMAP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CAR_JUST_SUNK, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_NO_COLLIDE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_DEAD_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_DEAD_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_TRAILER_ATTACHED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_ON_TRAILER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CAR_GOT_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_PARK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_AMMO_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_AMMO_TO_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_AMMO_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STILL_ALIVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_DEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_DEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_DEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_THREAT_SEARCH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_THREAT_REACTION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_NO_OBJ, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ORDER_DRIVER_OUT_OF_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ORDER_CHAR_TO_DRIVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PATROL_POINT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_GANGZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_PRESSING_HORN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_SPOTTED_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ORDER_CHAR_TO_BACKDOOR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_CHAR_TO_GANG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_OBJECTIVE_PASSED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_DRIVE_AGGRESSION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_MAX_DRIVESPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CHAR_INSIDE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WARP_PLAYER_FROM_CAR_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_CHAR_DO_NOTHING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_INVINCIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_INVINCIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_GRAPHIC_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_GRAPHIC_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_PLAYER_BEEN_ARRESTED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_STOP_CHAR_DRIVING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_KILL_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FAVOURITE_CAR_MODEL_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OCCUPATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_CAR_LOCK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SHAKE_CAM_WITH_POINT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_REMAP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CAR_JUST_SUNK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_NO_COLLIDE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_DEAD_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_DEAD_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_TRAILER_ATTACHED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_ON_TRAILER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CAR_GOT_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_PARK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_HAS_PARK_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_KILL_ALL_PASSENGERS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_BULLETPROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_FLAMEPROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_ROCKETPROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CARBOMB_ACTIVE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GIVE_CAR_ALARM, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PUT_CAR_ON_TRAILER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_CRUSHED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_GANG_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_CAR_GENERATOR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_CAR_GENERATOR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_PAGER_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_ONSCREEN_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_COUNTER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_ONSCREEN_COUNTER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ZONE_CAR_INFO, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_GANG_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_DENSITY, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PED_DENSITY, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_KILL_ALL_PASSENGERS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_BULLETPROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_FLAMEPROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_ROCKETPROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CARBOMB_ACTIVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GIVE_CAR_ALARM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PUT_CAR_ON_TRAILER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_CRUSHED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_GANG_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CAR_GENERATOR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_CAR_GENERATOR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PAGER_MESSAGE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_ONSCREEN_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_COUNTER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_ONSCREEN_COUNTER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ZONE_CAR_INFO, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_GANG_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_DENSITY, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PED_DENSITY, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_RESTORE_CAMERA, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SHAKE_PAD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ZONE_PED_INFO, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TIME_SCALE, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_IN_AIR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FIXED_CAMERA_POSITION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CAR_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CHAR_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_OBJECT_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_BLIP, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHANGE_BLIP_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DIM_BLIP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_COORD_OLD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHANGE_BLIP_SCALE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FADING_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DO_FADE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SHAKE_PAD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ZONE_PED_INFO, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TIME_SCALE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_AIR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FIXED_CAMERA_POSITION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_POINT_CAMERA_AT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CAR_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CHAR_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_OBJECT_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_BLIP, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_BLIP_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DIM_BLIP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_COORD_OLD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_BLIP_SCALE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FADING_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DO_FADE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_GET_FADING_STATUS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_HOSPITAL_RESTART, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_POLICE_RESTART, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_OVERRIDE_NEXT_RESTART, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DRAW_SHADOW, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_PLAYER_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CHAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_OBJECT_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_OBJECT_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_TOUCHING_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_TOUCHING_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_CAMERA_SPLINE, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MOVE_CAMERA_ALONG_SPLINE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAMERA_POSITION_ALONG_SPLINE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DECLARE_MISSION_FLAG, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DECLARE_MISSION_FLAG_FOR_CONTACT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DECLARE_BASE_BRIEF_ID_FOR_CONTACT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_HEALTH_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_HEALTH_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_HEALTH_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CONTACT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHANGE_BLIP_DISPLAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_ONE_OFF_SOUND, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_CONTINUOUS_SOUND, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_SOUND, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_STUCK_ON_ROOF, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_UPSIDEDOWN_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_UPSIDEDOWN_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_WAIT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GUARD_SPOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GUARD_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_WAIT_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_STOPPED_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GIVE_WEAPON_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GIVE_WEAPON_TO_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GIVE_WEAPON_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_CONTROL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FORCE_WEATHER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FORCE_WEATHER_NOW, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_HOSPITAL_RESTART, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_POLICE_RESTART, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_OVERRIDE_NEXT_RESTART, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRAW_SHADOW, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PLAYER_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CHAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_OBJECT_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_HEADING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_TOUCHING_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_TOUCHING_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_CAMERA_SPLINE, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MOVE_CAMERA_ALONG_SPLINE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAMERA_POSITION_ALONG_SPLINE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DECLARE_MISSION_FLAG, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DECLARE_MISSION_FLAG_FOR_CONTACT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DECLARE_BASE_BRIEF_ID_FOR_CONTACT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_HEALTH_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_HEALTH_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_HEALTH_GREATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_CONTACT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_BLIP_DISPLAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_ONE_OFF_SOUND, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_CONTINUOUS_SOUND, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_SOUND, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_STUCK_ON_ROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_UPSIDEDOWN_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_UPSIDEDOWN_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_WAIT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GUARD_SPOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GUARD_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_WAIT_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED_IN_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_STOPPED_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GIVE_WEAPON_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GIVE_WEAPON_TO_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GIVE_WEAPON_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_CONTROL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FORCE_WEATHER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FORCE_WEATHER_NOW, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_RELEASE_WEATHER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CURRENT_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CURRENT_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CURRENT_CAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_OBJECT_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_OBJECT_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_GAME_TIMER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_CHAR_TO_FACE_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_PLAYER_TO_FACE_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_STORE_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_STOPPED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_MARK_CHAR_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MARK_CAR_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MARK_OBJECT_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DONT_REMOVE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DONT_REMOVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DONT_REMOVE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_CHAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_CHAR_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_CHAR_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_PLAYER_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_CHAR_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_PLAYER_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_LEAVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_ENTER_CAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_ENTER_CAR_AS_DRIVER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_CAR_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FIRE_AT_OBJECT_FROM_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_DESTROY_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_DESTROY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_AREA_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_AREA_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_CAR_ON_FOOT_WITH_OFFSET, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GUARD_ATTACK, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_AS_LEADER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_AS_LEADER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LEAVE_GROUP, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_ROUTE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_ROUTE_POINT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_ROADS_ON, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_ROADS_OFF, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_PASSENGERS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_MAXIMUM_NUMBER_OF_PASSENGERS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_DENSITY_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_HEAVY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_CHAR_THREAT_SEARCH, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ACTIVATE_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DEACTIVATE_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_MAX_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CURRENT_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CURRENT_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CURRENT_CAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_OBJECT_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_GAME_TIMER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_CHAR_TO_FACE_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_PLAYER_TO_FACE_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_STORE_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_STOPPED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_MARK_CHAR_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MARK_CAR_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MARK_OBJECT_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DONT_REMOVE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DONT_REMOVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DONT_REMOVE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CHAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_CHAR_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_KILL_PLAYER_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_CHAR_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_PLAYER_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_CHAR_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_PLAYER_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_LEAVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_ENTER_CAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_ENTER_CAR_AS_DRIVER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_CAR_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FIRE_AT_OBJECT_FROM_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_DESTROY_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_DESTROY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_AREA_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_AREA_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_CAR_ON_FOOT_WITH_OFFSET, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GUARD_ATTACK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_AS_LEADER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_AS_LEADER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LEAVE_GROUP, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_ROUTE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_ROUTE_POINT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_ROADS_ON, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_ROADS_OFF, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_PASSENGERS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_MAXIMUM_NUMBER_OF_PASSENGERS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_DENSITY_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_HEAVY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CHAR_THREAT_SEARCH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ACTIVATE_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DEACTIVATE_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_MAX_WANTED_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SAVE_VAR_INT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SAVE_VAR_FLOAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_IN_AIR_PROPER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_UPSIDEDOWN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_PLAYER_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_AIR_PROPER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_UPSIDEDOWN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PLAYER_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
REGISTER_COMMAND(COMMAND_CANCEL_OVERRIDE_RESTART, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_POLICE_IGNORE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_PAGER_MESSAGE_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_KILL_FRENZY, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_READ_KILL_FRENZY_STATUS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SQRT, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_FLOAT_IN_RANGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_INT_IN_RANGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCK_CAR_DOORS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_EXPLODE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_EXPLOSION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_UPRIGHT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_CHAR_TO_FACE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_CHAR_TO_FACE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_PLAYER_TO_FACE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_COORD_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_COORD_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_PICKUP_BEEN_COLLECTED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TAXI_LIGHTS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_BIG_Q, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_BIG_Q, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GARAGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GARAGE_WITH_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TARGET_CAR_FOR_MISSION_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_IN_MISSION_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FREE_BOMBS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_POWERPOINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ALL_TAXI_LIGHTS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_ARMED_WITH_ANY_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_APPLY_BRAKES_TO_PLAYERS_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_PLAYER_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CHAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_ARMED_WITH_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CHANGE_CAR_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_ON, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_OFF, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHAR_LOOK_AT_CHAR_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHAR_LOOK_AT_PLAYER_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PLAYER_LOOK_AT_CHAR_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_STOP_CHAR_LOOKING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_STOP_PLAYER_LOOKING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_HELICOPTER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GANG_ATTITUDE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GANG_GANG_ATTITUDE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GANG_PLAYER_ATTITUDE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GANG_PED_MODELS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GANG_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GANG_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_RUN_TO_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_RUN_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_TOUCHING_OBJECT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_TOUCHING_OBJECT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_SPECIAL_CHARACTER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_SPECIAL_CHARACTER_LOADED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_FLASH_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FLASH_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FLASH_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_REMOTE_MODE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_ARM_CAR_WITH_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_PERSONALITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CUTSCENE_OFFSET, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ANIM_GROUP_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ANIM_GROUP_FOR_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REQUEST_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_MODEL_LOADED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_MARK_MODEL_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GRAB_PHONE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_REPEATED_PHONE_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PHONE_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_PHONE_DISPLAYED_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_PHONE_OFF, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DRAW_CORONA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DRAW_LIGHT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_POLICE_IGNORE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PAGER_MESSAGE_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_KILL_FRENZY, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_READ_KILL_FRENZY_STATUS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SQRT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ANY_MEANS_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_ON_FOOT_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_PLAYER_IN_CAR_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_FLOAT_IN_RANGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_INT_IN_RANGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCK_CAR_DOORS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_EXPLODE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_EXPLOSION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_UPRIGHT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_CHAR_TO_FACE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_CHAR_TO_FACE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_PLAYER_TO_FACE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_COORD_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_COORD_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_PICKUP_BEEN_COLLECTED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TAXI_LIGHTS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_BIG_Q, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_NUMBER_BIG_Q, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GARAGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GARAGE_WITH_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TARGET_CAR_FOR_MISSION_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_MISSION_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FREE_BOMBS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_POWERPOINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ALL_TAXI_LIGHTS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_ARMED_WITH_ANY_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_APPLY_BRAKES_TO_PLAYERS_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PLAYER_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CHAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_ARMED_WITH_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_CAR_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_ON, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_OFF, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHAR_LOOK_AT_CHAR_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHAR_LOOK_AT_PLAYER_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLAYER_LOOK_AT_CHAR_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_STOP_CHAR_LOOKING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_STOP_PLAYER_LOOKING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_HELICOPTER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_ATTITUDE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_GANG_ATTITUDE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_PLAYER_ATTITUDE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_PED_MODELS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_RUN_TO_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_RUN_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_TOUCHING_OBJECT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_TOUCHING_OBJECT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_SPECIAL_CHARACTER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_SPECIAL_CHARACTER_LOADED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_FLASH_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FLASH_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FLASH_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_REMOTE_MODE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ARM_CAR_WITH_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_PERSONALITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CUTSCENE_OFFSET, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ANIM_GROUP_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ANIM_GROUP_FOR_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REQUEST_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_MODEL_LOADED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_MARK_MODEL_AS_NO_LONGER_NEEDED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GRAB_PHONE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_REPEATED_PHONE_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PHONE_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_PHONE_DISPLAYED_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_PHONE_OFF, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRAW_CORONA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRAW_LIGHT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_STORE_WEATHER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_RESTORE_WEATHER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_STORE_CLOCK, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_RESTORE_CLOCK, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_RESTART_CRITICAL_MISSION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_PLAYING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_NO_OBJ, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_WAIT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GUARD_SPOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GUARD_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_WAIT_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_CHAR_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_PLAYER_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_CHAR_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_PLAYER_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_CHAR_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_PLAYER_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_LEAVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_ENTER_CAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_ENTER_CAR_AS_DRIVER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FOLLOW_CAR_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FIRE_AT_OBJECT_FROM_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_DESTROY_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_DESTROY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_AREA_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_AREA_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FOLLOW_CAR_ON_FOOT_WITH_OFFSET, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GUARD_ATTACK, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FOLLOW_ROUTE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_COORD_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_COORD_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_RUN_TO_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_RUN_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_PEDS_IN_AREA_TO_COLL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_PEDS_IN_VEHICLE_TO_COLL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_COLL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLL_IN_CARS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_COLL_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_COLL_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_COLL_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_PLAYER_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_PLAYER_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_PLAYER_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLL_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLL_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLL_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLL_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLL_STOPPED_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLL_STOPPED_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_PEDS_IN_COLL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_HEED_THREATS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_HEED_THREATS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CONTROLLER_MODE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAN_RESPRAY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_UNLOAD_SPECIAL_CHARACTER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_RESTART_CRITICAL_MISSION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_PLAYING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_NO_OBJ, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_WAIT_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GUARD_SPOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GUARD_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_WAIT_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_CHAR_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_KILL_PLAYER_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_CHAR_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_PLAYER_ON_FOOT_TILL_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_CHAR_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FLEE_PLAYER_ON_FOOT_ALWAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_LEAVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_ENTER_CAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_ENTER_CAR_AS_DRIVER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FOLLOW_CAR_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FIRE_AT_OBJECT_FROM_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_DESTROY_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_DESTROY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_AREA_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_AREA_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FOLLOW_CAR_ON_FOOT_WITH_OFFSET, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GUARD_ATTACK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_FOLLOW_ROUTE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_COORD_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_COORD_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_RUN_TO_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_RUN_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PEDS_IN_AREA_TO_COLL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PEDS_IN_VEHICLE_TO_COLL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_COLL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLL_IN_CARS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_COLL_ANY_MEANS_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_COLL_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_STOPPED_COLL_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_CHAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ANY_MEANS_PLAYER_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_ON_FOOT_PLAYER_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_COLL_IN_CAR_PLAYER_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLL_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLL_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLL_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLL_STOPPED_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLL_STOPPED_IN_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLL_STOPPED_IN_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_PEDS_IN_COLL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_HEED_THREATS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_HEED_THREATS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CONTROLLER_MODE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAN_RESPRAY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_UNLOAD_SPECIAL_CHARACTER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_RESET_NUM_OF_MODELS_KILLED_BY_PLAYER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUM_OF_MODELS_KILLED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ACTIVATE_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_TAXI_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_OBJECT_NO_OFFSET, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_BOAT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_AREA_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_AREA_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_MESSAGE_WAIT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_PARTICLE_EFFECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_WIDESCREEN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_CONTACT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_ONLY_DAMAGED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_ONLY_DAMAGED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_PROOFS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_PROOFS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_DEACTIVATE_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_CARS_COLLECTED_BY_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CAR_BEEN_TAKEN_TO_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_SWAT_REQUIRED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FBI_REQUIRED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ARMY_REQUIRED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CLOSEST_CHAR_NODE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CAR_GOTO_COORDINATES_ACCURATE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_PACMAN_RACE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUM_OF_MODELS_KILLED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ACTIVATE_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_TAXI_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_OBJECT_NO_OFFSET, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_BOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_AREA_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_GOTO_AREA_ANY_MEANS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STOPPED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_MESSAGE_WAIT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PARTICLE_EFFECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_WIDESCREEN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_CONTACT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_ONLY_DAMAGED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_ONLY_DAMAGED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_PROOFS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_PROOFS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_ON_FOOT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_IN_CAR_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANGLED_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_ON_FOOT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STOPPED_IN_ANGLED_AREA_IN_CAR_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DEACTIVATE_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_CARS_COLLECTED_BY_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CAR_BEEN_TAKEN_TO_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_SWAT_REQUIRED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FBI_REQUIRED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ARMY_REQUIRED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_CHAR_NODE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CAR_GOTO_COORDINATES_ACCURATE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_PACMAN_RACE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_START_PACMAN_RECORD, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_POWER_PILLS_EATEN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_POWER_PILLS_EATEN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
REGISTER_COMMAND(COMMAND_CLEAR_PACMAN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_PACMAN_SCRAMBLE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_POWER_PILLS_CARRIED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_PACMAN_SCRAMBLE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_POWER_PILLS_CARRIED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
REGISTER_COMMAND(COMMAND_CLEAR_NUMBER_OF_POWER_PILLS_CARRIED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_OBJECT_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GOSUB_FILE, INPUT_ARGUMENTS(ARGTYPE_LABEL, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_GROUND_Z_FOR_3D_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_SCRIPT_FIRE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_SCRIPT_FIRE_EXTINGUISHED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_SCRIPT_FIRE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COMEDY_CONTROLS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_BOAT_GOTO_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_BOAT_STOP, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_SHOOTING_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_SHOOTING_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CURRENT_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CURRENT_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_OBJECT_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GOSUB_FILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_GROUND_Z_FOR_3D_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_SCRIPT_FIRE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_SCRIPT_FIRE_EXTINGUISHED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_SCRIPT_FIRE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COMEDY_CONTROLS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_BOAT_GOTO_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_BOAT_STOP, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_SHOOTING_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_SHOOTING_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CURRENT_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CURRENT_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_CLEAR_NUMBER_OF_POWER_PILLS_EATEN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_POWER_PILL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_BOAT_CRUISE_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_RANDOM_CHAR_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_RANDOM_CHAR_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_SHOOTING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_SHOOTING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_MONEY_PICKUP, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_ACCURACY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_CUTSCENE, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_CUTSCENE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CUTSCENE_ANIM, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_POWER_PILL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_BOAT_CRUISE_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_CHAR_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_CHAR_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_SHOOTING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_SHOOTING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_MONEY_PICKUP, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_ACCURACY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_CUTSCENE, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CUTSCENE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CUTSCENE_ANIM, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_START_CUTSCENE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CUTSCENE_TIME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CUTSCENE_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CUTSCENE_TIME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CUTSCENE_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_CLEAR_CUTSCENE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_RESTORE_CAMERA_JUMPCUT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_COLLECTABLE1, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLLECTABLE1_TOTAL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PROJECTILE_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_DESTROY_PROJECTILES_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DROP_MINE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DROP_NAUTICAL_MINE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_SPECIAL_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_CUTSCENE_HEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CUTSCENE_HEAD_ANIM, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SIN, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_COS, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_FORWARD_X, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_FORWARD_Y, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHANGE_GARAGE_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ACTIVATE_CRUSHER_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_CHAR_IN_FORMATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PLAYER_MADE_PROGRESS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PROGRESS_TOTAL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_JUMP_DISTANCE, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_JUMP_HEIGHT, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_JUMP_FLIPS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_JUMP_SPINS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_JUMP_STUNT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_COLLECTABLE1, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLLECTABLE1_TOTAL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PROJECTILE_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DESTROY_PROJECTILES_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DROP_MINE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DROP_NAUTICAL_MINE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_SPECIAL_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CUTSCENE_HEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CUTSCENE_HEAD_ANIM, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SIN, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_COS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_FORWARD_X, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_FORWARD_Y, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_GARAGE_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ACTIVATE_CRUSHER_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FOLLOW_CHAR_IN_FORMATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLAYER_MADE_PROGRESS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PROGRESS_TOTAL, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_JUMP_DISTANCE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_JUMP_HEIGHT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_JUMP_FLIPS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_JUMP_SPINS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_JUMP_STUNT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REGISTER_UNIQUE_JUMP_FOUND, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_UNIQUE_JUMPS_TOTAL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_UNIQUE_JUMPS_TOTAL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REGISTER_PASSENGER_DROPPED_OFF_TAXI, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_MONEY_MADE_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_MONEY_MADE_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REGISTER_MISSION_GIVEN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_MISSION_PASSED, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_RUNNING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_MISSION_PASSED, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_RUNNING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REMOVE_ALL_SCRIPT_FIRES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_FIRST_CAR_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_SECOND_CAR_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CAR_BEEN_DAMAGED_BY_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_CHARS_GROUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_PLAYERS_GROUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_EXPLODE_CHAR_HEAD, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_EXPLODE_PLAYER_HEAD, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ANCHOR_BOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ZONE_GROUP, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_CAR_FIRE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_CHAR_FIRE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_OF_TYPE_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_OF_TYPE_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_RESPRAY_HAPPENED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAMERA_ZOOM, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_PICKUP_WITH_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_RAM_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_BLOCK_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_CATCH_TRAIN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_CATCH_TRAIN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_NEVER_GETS_TIRED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_FAST_RELOAD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_BLEEDING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_FUNNY_SUSPENSION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_BIG_WHEELS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FREE_RESPRAYS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_AREA_OCCUPIED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_FIRST_CAR_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_SECOND_CAR_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CAR_BEEN_DAMAGED_BY_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_CHARS_GROUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_PLAYERS_GROUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_EXPLODE_CHAR_HEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_EXPLODE_PLAYER_HEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ANCHOR_BOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ZONE_GROUP, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_CAR_FIRE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_CHAR_FIRE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_OF_TYPE_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_OF_TYPE_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_RESPRAY_HAPPENED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAMERA_ZOOM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_PICKUP_WITH_AMMO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_RAM_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_BLOCK_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_CATCH_TRAIN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_CATCH_TRAIN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_NEVER_GETS_TIRED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_FAST_RELOAD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_BLEEDING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_FUNNY_SUSPENSION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_BIG_WHEELS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FREE_RESPRAYS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_AREA_OCCUPIED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_START_DRUG_RUN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_DRUG_RUN_BEEN_COMPLETED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_DRUG_PLANE_BEEN_SHOT_DOWN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SAVE_PLAYER_FROM_FIRES, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DISPLAY_TEXT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_SCALE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_JUSTIFY, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_CENTRE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_WRAPX, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_CENTRE_SIZE, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_BACKGROUND, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_BACKGROUND_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_BACKGROUND_ONLY_TEXT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_PROPORTIONAL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_FONT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_DRUG_RUN_BEEN_COMPLETED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_DRUG_PLANE_BEEN_SHOT_DOWN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SAVE_PLAYER_FROM_FIRES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_TEXT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_SCALE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_JUSTIFY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_CENTRE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_WRAPX, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_CENTRE_SIZE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_BACKGROUND, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_BACKGROUND_COLOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_BACKGROUND_ONLY_TEXT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_PROPORTIONAL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_FONT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_INDUSTRIAL_PASSED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_COMMERCIAL_PASSED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SUBURBAN_PASSED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ROTATE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SLIDE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_CHAR_ELEGANTLY, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_STAY_IN_SAME_PLACE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ROTATE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SLIDE_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_CHAR_ELEGANTLY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_STAY_IN_SAME_PLACE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_IS_NASTY_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_UNDRESS_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DRESS_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_CHASE_SCENE, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_UNDRESS_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRESS_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_CHASE_SCENE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_STOP_CHASE_SCENE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_EXPLOSION_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_EXPLOSION_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_EXPLOSION_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_EXPLOSION_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_START_DRUG_DROP_OFF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_DROP_OFF_PLANE_BEEN_SHOT_DOWN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FIND_DROP_OFF_PLANE_COORDINATES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_FLOATING_PACKAGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PLACE_OBJECT_RELATIVE_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MAKE_OBJECT_TARGETTABLE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_ARMOUR_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_ARMOUR_TO_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_OPEN_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLOSE_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WARP_CHAR_FROM_CAR_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_CHAR_SPOTTED_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_HAIL_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_OBJECT_BEEN_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_START_KILL_FRENZY_HEADSHOT, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ACTIVATE_MILITARY_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WARP_PLAYER_INTO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WARP_CHAR_INTO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_CAR_RADIO, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_AUDIO_STREAM, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_WAIT_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_DROP_OFF_PLANE_BEEN_SHOT_DOWN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_FIND_DROP_OFF_PLANE_COORDINATES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_FLOATING_PACKAGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLACE_OBJECT_RELATIVE_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_OBJECT_TARGETTABLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_ARMOUR_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_ARMOUR_TO_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_OPEN_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLOSE_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WARP_CHAR_FROM_CAR_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_VISIBILITY_OF_CLOSEST_OBJECT_OF_TYPE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_SPOTTED_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_HAIL_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_OBJECT_BEEN_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_KILL_FRENZY_HEADSHOT, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ACTIVATE_MILITARY_CRANE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WARP_PLAYER_INTO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WARP_CHAR_INTO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_CAR_RADIO, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_AUDIO_STREAM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_2_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_3_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_4_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_5_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_WITH_6_NUMBERS_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_WAIT_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SET_CAMERA_BEHIND_PLAYER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_MOTION_BLUR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_STRING_IN_STRING, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_RANDOM_CHAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_STEAL_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_2_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_2_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_3_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_3_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_4_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_4_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_SNIPER_BULLET_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_MOTION_BLUR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_STRING_IN_STRING, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_RANDOM_CHAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_STEAL_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_2_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_2_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_3_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_3_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_4_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_4_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_SNIPER_BULLET_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_GIVE_PLAYER_DETONATOR, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_STEAL_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_OBJECT_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_OBJECT_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_ICECREAM_JINGLE_ON, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_STRING_IN_STRING_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_STRING_IN_STRING_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_5_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_5_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_6_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_6_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_POINT_OBSCURED_BY_A_MISSION_ENTITY, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_COLL_OBJ_STEAL_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_ICECREAM_JINGLE_ON, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_STRING_IN_STRING_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_STRING_IN_STRING_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_5_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_5_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_6_REPEATED_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_6_PHONE_MESSAGES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_POINT_OBSCURED_BY_A_MISSION_ENTITY, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_LOAD_ALL_MODELS_NOW, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_TO_OBJECT_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DRAW_SPRITE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DRAW_RECT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_SPRITE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_TEXTURE_DICTIONARY, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_TO_OBJECT_VELOCITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRAW_SPRITE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRAW_RECT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_SPRITE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_TEXTURE_DICTIONARY, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REMOVE_TEXTURE_DICTIONARY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_OBJECT_DYNAMIC, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_ANIM_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PLAY_MISSION_PASSED_TUNE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FREEZE_ONSCREEN_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_CAR_SIREN, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_ON_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_OFF_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_ROADS_ON_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_ROADS_OFF_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_WATERTIGHT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_MOVING_PARTICLE_EFFECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_CANT_BE_DRAGGED_OUT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_CAR_TO_FACE_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CRANE_LIFTING_CAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_DRAW_SPHERE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_STATUS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_MALE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SCRIPT_NAME, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHANGE_GARAGE_TYPE_WITH_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FIND_DRUG_PLANE_COORDINATES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SAVE_INT_TO_DEBUG_FILE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SAVE_FLOAT_TO_DEBUG_FILE, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_DYNAMIC, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_ANIM_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLAY_MISSION_PASSED_TUNE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FREEZE_ONSCREEN_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_CAR_SIREN, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_ON_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_PED_ROADS_OFF_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_ROADS_ON_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_ROADS_OFF_ANGLED, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_WATERTIGHT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MOVING_PARTICLE_EFFECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_CANT_BE_DRAGGED_OUT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_CAR_TO_FACE_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CRANE_LIFTING_CAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRAW_SPHERE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_STATUS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_MALE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SCRIPT_NAME, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_GARAGE_TYPE_WITH_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FIND_DRUG_PLANE_COORDINATES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SAVE_INT_TO_DEBUG_FILE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SAVE_FLOAT_TO_DEBUG_FILE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SAVE_NEWLINE_TO_DEBUG_FILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_POLICE_RADIO_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_STRONG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_ROUTE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_RUBBISH, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_PARTICLE_EFFECTS_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_STREAMING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_GARAGE_OPEN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_GARAGE_CLOSED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_POLICE_RADIO_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_STRONG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_ROUTE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_RUBBISH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_PARTICLE_EFFECTS_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_STREAMING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_GARAGE_OPEN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_GARAGE_CLOSED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_START_CATALINA_HELI, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_CATALINA_HELI_TAKE_OFF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REMOVE_CATALINA_HELI, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_HAS_CATALINA_HELI_BEEN_SHOT_DOWN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SWAP_NEAREST_BUILDING_MODEL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_WORLD_PROCESSING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_ALL_PLAYER_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GRAB_CATALINA_HELI, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_AREA_OF_CARS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ROTATING_GARAGE_DOOR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SPHERE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_SPHERE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWAP_NEAREST_BUILDING_MODEL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_WORLD_PROCESSING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_ALL_PLAYER_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GRAB_CATALINA_HELI, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_AREA_OF_CARS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ROTATING_GARAGE_DOOR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SPHERE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_SPHERE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_CATALINA_HELI_FLY_AWAY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_EVERYONE_IGNORE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_STORE_CAR_CHAR_IS_IN_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_STORE_CAR_PLAYER_IS_IN_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PHONE_DISPLAYING_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_STRING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_COUNTER_WITH_STRING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_RANDOM_CAR_FOR_CAR_PARK, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_COLLISION_IN_MEMORY, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_WANTED_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_EVERYONE_IGNORE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_STORE_CAR_CHAR_IS_IN_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_STORE_CAR_PLAYER_IS_IN_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PHONE_DISPLAYING_MESSAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_TIMER_WITH_STRING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_ONSCREEN_COUNTER_WITH_STRING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_RANDOM_CAR_FOR_CAR_PARK, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_COLLISION_IN_MEMORY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_WANTED_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_SET_CAMERA_IN_FRONT_OF_PLAYER, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_VISIBLY_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_DOES_OBJECT_EXIST, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_SCENE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_STUCK_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_STUCK_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_STUCK, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_MISSION_AUDIO, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_MISSION_AUDIO_LOADED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_PLAY_MISSION_AUDIO, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_MISSION_AUDIO_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_HAS_IMPORT_GARAGE_SLOT_BEEN_FILLED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_THIS_PRINT, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_THIS_BIG_PRINT, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_MISSION_AUDIO_POSITION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_VISIBLY_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DOES_OBJECT_EXIST, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_SCENE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_STUCK_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_STUCK_CAR_CHECK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_STUCK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_MISSION_AUDIO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_MISSION_AUDIO_LOADED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLAY_MISSION_AUDIO, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_MISSION_AUDIO_FINISHED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_IMPORT_GARAGE_SLOT_BEEN_FILLED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_THIS_PRINT, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_THIS_BIG_PRINT, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_MISSION_AUDIO_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_ACTIVATE_SAVE_MENU, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_HAS_SAVE_GAME_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_NO_SPECIAL_CAMERA_FOR_THIS_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_PICKUP_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PED_DENSITY_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FORCE_RANDOM_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_DRAW_BEFORE_FADE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_COLLECTABLE1S_COLLECTED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- //REGISTER_COMMAND(COMMAND_REGISTER_EL_BURRO_TIME, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_SPRITES_DRAW_BEFORE_FADE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TEXT_RIGHT_JUSTIFY, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_HELP, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_NO_SPECIAL_CAMERA_FOR_THIS_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_PICKUP_OLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLIP_FOR_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SPRITE_BLIP_FOR_PICKUP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PED_DENSITY_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FORCE_RANDOM_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_DRAW_BEFORE_FADE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_COLLECTABLE1S_COLLECTED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_LEAVE_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_SPRITES_DRAW_BEFORE_FADE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TEXT_RIGHT_JUSTIFY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_HELP, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_CLEAR_HELP, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FLASH_HUD_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FLASH_RADAR_BLIP, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_CONTROL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GENERATE_CARS_AROUND_CAMERA, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FLASH_HUD_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FLASH_RADAR_BLIP, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_CONTROL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GENERATE_CARS_AROUND_CAMERA, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_CLEAR_SMALL_PRINTS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_HAS_MILITARY_CRANE_COLLECTED_ALL_CARS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_UPSIDEDOWN_CAR_NOT_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CAN_PLAYER_START_MISSION, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_MAKE_PLAYER_SAFE_FOR_CUTSCENE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_USE_TEXT_COMMANDS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_THREAT_FOR_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_THREAT_FOR_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_COLOURS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ALL_CARS_CAN_BE_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_CAN_BE_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MAKE_PLAYER_UNSAFE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_BODY_CAST_HEALTH, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHARS_CHATTING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MAKE_PLAYER_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_STAYS_IN_CURRENT_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- //REGISTER_COMMAND(COMMAND_REGISTER_4X4_ONE_TIME, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- //REGISTER_COMMAND(COMMAND_REGISTER_4X4_TWO_TIME, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- //REGISTER_COMMAND(COMMAND_REGISTER_4X4_THREE_TIME, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- //REGISTER_COMMAND(COMMAND_REGISTER_4X4_MAYHEM_TIME, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_UPSIDEDOWN_CAR_NOT_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CAN_PLAYER_START_MISSION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_PLAYER_SAFE_FOR_CUTSCENE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_USE_TEXT_COMMANDS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_THREAT_FOR_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_THREAT_FOR_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_COLOURS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ALL_CARS_CAN_BE_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_CAN_BE_DAMAGED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_PLAYER_UNSAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_BODY_CAST_HEALTH, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHARS_CHATTING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_PLAYER_SAFE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_STAYS_IN_CURRENT_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_DRUNK_INPUT_DELAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_MONEY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_INCREASE_CHAR_MONEY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_OFFSET_FROM_OBJECT_IN_WORLD_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
REGISTER_COMMAND(COMMAND_REGISTER_LIFE_SAVED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REGISTER_CRIMINAL_CAUGHT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_AMBULANCE_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_AMBULANCE_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_REGISTER_FIRE_EXTINGUISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_TURN_PHONE_ON, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_LONGEST_DODO_FLIGHT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- //REGISTER_COMMAND(COMMAND_REGISTER_DEFUSE_BOMB_TIME, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TOTAL_NUMBER_OF_KILL_FRENZIES, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_TURN_PHONE_ON, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_LONGEST_DODO_FLIGHT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_OFFSET_FROM_CAR_IN_WORLD_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TOTAL_NUMBER_OF_KILL_FRENZIES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_BLOW_UP_RC_BUGGY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REMOVE_CAR_FROM_CHASE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_CAR_FROM_CHASE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_IS_FRENCH_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_IS_GERMAN_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_MISSION_AUDIO, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FADE_IN_AFTER_NEXT_ARREST, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FADE_IN_AFTER_NEXT_DEATH, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GANG_PED_MODEL_PREFERENCE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_USE_PEDNODE_SEEK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SWITCH_VEHICLE_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_GET_OUT_OF_JAIL_FREE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_FREE_HEALTH_CARE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_DOOR_CLOSED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_MISSION_AUDIO, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FADE_IN_AFTER_NEXT_ARREST, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FADE_IN_AFTER_NEXT_DEATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_PED_MODEL_PREFERENCE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_USE_PEDNODE_SEEK, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_VEHICLE_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GET_OUT_OF_JAIL_FREE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FREE_HEALTH_CARE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_DOOR_CLOSED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
REGISTER_COMMAND(COMMAND_LOAD_AND_LAUNCH_MISSION, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_AND_LAUNCH_MISSION_INTERNAL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_OBJECT_DRAW_LAST, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_AMMO_IN_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_AMMO_IN_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_AND_LAUNCH_MISSION_INTERNAL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_DRAW_LAST, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_AMMO_IN_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_AMMO_IN_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
REGISTER_COMMAND(COMMAND_REGISTER_KILL_FRENZY_PASSED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_SAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_NEAR_CLIP, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_RADIO_CHANNEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_OVERRIDE_HOSPITAL_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_OVERRIDE_POLICE_STATION_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_FORCE_RAIN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DOES_GARAGE_CONTAIN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_TRACTION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_SAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_NEAR_CLIP, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_RADIO_CHANNEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_OVERRIDE_HOSPITAL_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_OVERRIDE_POLICE_STATION_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FORCE_RAIN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DOES_GARAGE_CONTAIN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_TRACTION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_ARE_MEASUREMENTS_IN_METRES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CONVERT_METRES_TO_FEET, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MARK_ROADS_BETWEEN_LEVELS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MARK_PED_ROADS_BETWEEN_LEVELS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_AVOID_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_AVOID_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_THREAT_FOR_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_AREA_OF_CHARS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TOTAL_NUMBER_OF_MISSIONS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CONVERT_METRES_TO_FEET_INT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_FASTEST_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REGISTER_HIGHEST_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WARP_CHAR_INTO_CAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_PASSENGER_SEAT_FREE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CHAR_IN_CAR_PASSENGER_SEAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_IS_CHRIS_CRIMINAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CONVERT_METRES_TO_FEET, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MARK_ROADS_BETWEEN_LEVELS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MARK_PED_ROADS_BETWEEN_LEVELS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_AVOID_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_AVOID_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_THREAT_FOR_PED_TYPE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_AREA_OF_CHARS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TOTAL_NUMBER_OF_MISSIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CONVERT_METRES_TO_FEET_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_FASTEST_TIME, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_HIGHEST_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WARP_CHAR_INTO_CAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_PASSENGER_SEAT_FREE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CHAR_IN_CAR_PASSENGER_SEAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_IS_CHRIS_CRIMINAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_START_CREDITS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_STOP_CREDITS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_ARE_CREDITS_FINISHED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_SINGLE_PARTICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_IGNORE_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CHASE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_SINGLE_PARTICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_IGNORE_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CHASE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
REGISTER_COMMAND(COMMAND_START_BOAT_FOAM_ANIMATION, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_UPDATE_BOAT_FOAM_ANIMATION, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_MUSIC_DOES_FADE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_INTRO_IS_PLAYING, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_HOOKER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_UPDATE_BOAT_FOAM_ANIMATION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_MUSIC_DOES_FADE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_INTRO_IS_PLAYING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_HOOKER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_PLAY_END_OF_GAME_TUNE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_STOP_END_OF_GAME_TUNE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_SITTING_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_SITTING_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_SCRIPT_FIRE_AUDIO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_SITTING_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_SITTING_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_SCRIPT_FIRE_AUDIO, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_ARE_ANY_CAR_CHEATS_ACTIVATED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_SUFFERS_CRITICAL_HITS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_LIFTING_A_PHONE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_SITTING_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_SITTING_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_COLLISION_WITH_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOAD_SPLASH_SCREEN, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_IGNORE_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_MAKE_CRAIGS_CAR_A_BIT_STRONGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_JAMES_CAR_ON_PATH_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_SUFFERS_CRITICAL_HITS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_LIFTING_A_PHONE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_SITTING_IN_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_SITTING_IN_ANY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_COLLISION_WITH_SCREEN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_SPLASH_SCREEN, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_IGNORE_LEVEL_TRANSITIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_CRAIGS_CAR_A_BIT_STRONGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_JAMES_CAR_ON_PATH_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_LOAD_END_OF_GAME_TUNE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_ENABLE_PLAYER_CONTROL_CAMERA, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
-#ifndef GTA_PS2
- REGISTER_COMMAND(COMMAND_SET_OBJECT_ROTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_DEBUG_CAMERA_COORDINATES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_DEBUG_CAMERA_FRONT_VECTOR, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_TARGETTING_ANY_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_TARGETTING_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_TARGETTING_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, INPUT_ARGUMENTS(ARGTYPE_STRING,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DISPLAY_TEXT_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DISPLAY_TEXT_WITH_2_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_ROTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_DEBUG_CAMERA_COORDINATES, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_DEBUG_CAMERA_FRONT_VECTOR, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_TARGETTING_ANY_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_TARGETTING_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_TARGETTING_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_TEXT_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_TEXT_WITH_2_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
REGISTER_COMMAND(COMMAND_FAIL_CURRENT_MISSION, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CLOSEST_OBJECT_OF_TYPE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PLACE_OBJECT_RELATIVE_TO_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ALL_OCCUPANTS_OF_CAR_LEAVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_INTERPOLATION_PARAMETERS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING_TOWARDS_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING_AWAY_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_DEBUG_CAMERA_POINT_AT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ATTACH_CHAR_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DETACH_CHAR_FROM_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_CHANGE_LANE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_CHAR_LAST_WEAPON_DAMAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_CAR_LAST_WEAPON_DAMAGE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_RANDOM_COP_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_RANDOM_COP_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_DRIVER_OF_CAR, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_FOLLOWERS, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CURRENT_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CURRENT_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_OBJECT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_OBJECT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_OBJECT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_OBJECT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_OBJECT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_OBJECT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- //REGISTER_COMMAND(COMMAND_SET_CAR_HANDBRAKE_TURN_LEFT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_HANDBRAKE_TURN_RIGHT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_HANDBRAKE_STOP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_ON_ANY_BIKE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_SNIPER_BULLET_2D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LOCATE_SNIPER_BULLET_3D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_SEATS_IN_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_ON_ANY_BIKE, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_LYING_DOWN, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CAN_CHAR_SEE_DEAD_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
-#endif
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_OBJECT_OF_TYPE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLACE_OBJECT_RELATIVE_TO_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ALL_OCCUPANTS_OF_CAR_LEAVE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_INTERPOLATION_PARAMETERS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING_TOWARDS_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING_AWAY_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_DEBUG_CAMERA_POINT_AT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ATTACH_CHAR_TO_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DETACH_CHAR_FROM_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_CHANGE_LANE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CHAR_LAST_WEAPON_DAMAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CAR_LAST_WEAPON_DAMAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_COP_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_COP_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_FLEE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_DRIVER_OF_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_FOLLOWERS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GIVE_REMOTE_CONTROLLED_MODEL_TO_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CURRENT_PLAYER_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CURRENT_CHAR_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_OBJECT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_OBJECT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_OBJECT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ANY_MEANS_OBJECT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_ON_FOOT_OBJECT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_CHAR_IN_CAR_OBJECT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_TEMP_ACTION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_HANDBRAKE_TURN_RIGHT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_HANDBRAKE_STOP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_ON_ANY_BIKE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_SNIPER_BULLET_2D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_SNIPER_BULLET_3D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_SEATS_IN_MODEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_ON_ANY_BIKE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_LYING_DOWN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CAN_CHAR_SEE_DEAD_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_CEASE_ATTACK_TIMER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_REMOTE_CONTROLLED_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PC_VERSION, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_REPLAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_REPLAY_PLAYING, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_MODEL_AVAILABLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SHUT_CHAR_UP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ENABLE_RC_DETONATE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_RANDOM_ROUTE_SEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_ANY_PICKUP_AT_COORDS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_FIRST_PICKUP_COORDS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NEXT_PICKUP_COORDS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_ALL_CHAR_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_PLAYER_GOT_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_GOT_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_FACING_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TANK_DETONATE_CARS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_POSITION_OF_ANALOGUE_STICKS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_ON_FIRE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_TYRE_BURST, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_DRIVE_STRAIGHT_AHEAD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_WAIT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_STANDING_ON_A_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_FOOT_DOWN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_FOOT_DOWN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_INITIALISE_OBJECT_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_OBJECT_ON_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_PATH_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_PATH_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_OBJECT_DISTANCE_ALONG_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_OBJECT_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HELI_GOTO_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_EQUAL_TO_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_EQUAL_TO_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_DEAD_CHAR_PICKUP_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_PROTECTION_PICKUP, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ANY_BOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANY_BOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ANY_HELI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANY_HELI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ANY_PLANE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_ANY_PLANE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_VAR_INT_TO_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_LVAR_INT_TO_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_THAN_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_THAN_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_CONSTANT_GREATER_THAN_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_CONSTANT_GREATER_THAN_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_CONSTANT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_CONSTANT_GREATER_OR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_CONSTANT_GREATER_OR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_GET_CHAR_WEAPON_IN_SLOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_STRAIGHT_ROAD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_FORWARD_SPEED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_AREA_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CUTSCENE_ANIM_TO_LOOP, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MARK_CAR_AS_CONVOY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_RESET_HAVOC_CAUSED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_HAVOC_CAUSED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_SCRIPT_ROADBLOCK, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_ALL_SCRIPT_ROADBLOCKS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_WALK_TO_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PICKUP_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_BEEN_PHOTOGRAPHED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_AIM_GUN_AT_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_SECURITY_CAMERA, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_FLYING_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_FLYING_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_SONY_CD_BEEN_READ, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NUMBER_OF_SONY_CDS_READ, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SHORT_RANGE_BLIP_FOR_COORD_OLD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SHORT_RANGE_BLIP_FOR_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SHORT_RANGE_SPRITE_BLIP_FOR_COORD, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MONEY_SPENT_ON_CLOTHES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_HELI_ORIENTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_HELI_ORIENTATION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLANE_GOTO_COORDS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NTH_CLOSEST_CAR_NODE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NTH_CLOSEST_CHAR_NODE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DRAW_WEAPONSHOP_CORONA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ENABLE_RC_DETONATE_ON_CONTACT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_FREEZE_CHAR_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_DROWNS_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_RECORDS_COLLISIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_OBJECT_COLLIDED_WITH_ANYTHING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_RC_BUGGY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_PHOTOGRAPH_BEEN_TAKEN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CHAR_ARMOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_ARMOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_HELI_STABILISER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_STRAIGHT_LINE_DISTANCE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_POP_CAR_BOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SHUT_PLAYER_UP, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_MOOD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REQUEST_COLLISION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_OBJECT_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOCATE_OBJECT_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_OBJECT_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_STEAL_ANY_CAR_EVEN_MISSION_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_OBJECT_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_OBJECT_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_CROUCH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ZONE_CIVILIAN_CAR_INFO, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REQUEST_ANIMATION, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_ANIMATION_LOADED, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_ANIMATION, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_WAITING_FOR_WORLD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_WAITING_FOR_WORLD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_OBJECT_WAITING_FOR_WORLD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_SHUFFLE_INTO_DRIVERS_SEAT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ATTACH_CHAR_TO_OBJECT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_AS_PLAYER_FRIEND, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_NTH_ONSCREEN_COUNTER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_NTH_ONSCREEN_COUNTER_WITH_STRING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SET_PIECE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_EXTRA_COLOURS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_EXTRA_COLOURS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLOSE_CAR_BOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_WHEELIE_STATS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISARM_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_BURST_CAR_TYRE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_OBJ_NO_OBJ, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_WEARING, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_CAN_DO_DRIVE_BY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_SPRINT_TO_COORD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_SWAT_ROPE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FIRST_PERSON_CONTROL_CAMERA, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_NEAREST_TYRE_TO_POINT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_MODEL_COMPONENTS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SWITCH_LIFT_CAMERA, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLOSE_ALL_CAR_DOORS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_DISTANCE_BETWEEN_COORDS_2D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_DISTANCE_BETWEEN_COORDS_3D, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_POP_CAR_BOOT_USING_PHYSICS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FIRST_PERSON_WEAPON_CAMERA, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_LEAVING_VEHICLE_TO_DIE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SORT_OUT_OBJECT_COLLISION_WITH_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_MAX_WANTED_LEVEL, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_WANDER_PATH_CLEAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_HELP_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_HELP_FOREVER, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_HELP_FOREVER_WITH_NUMBER, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_CAN_BE_DAMAGED_BY_MEMBERS_OF_GANG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_AND_LAUNCH_MISSION_EXCLUSIVE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_MISSION_AUDIO_PLAYING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_LOCKED_PROPERTY_PICKUP, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_FORSALE_PROPERTY_PICKUP, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FREEZE_CAR_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_BEEN_DAMAGED_BY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CAR_BEEN_DAMAGED_BY_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RADIO_CHANNEL, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_TEXT_WITH_3_NUMBERS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_DROWNING_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_DROWNING_IN_WATER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISABLE_CUTSCENE_SHADOWS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_GLASS_BEEN_SHATTERED_NEARBY, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ATTACH_CUTSCENE_OBJECT_TO_BONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ATTACH_CUTSCENE_OBJECT_TO_COMPONENT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_STAY_IN_CAR_WHEN_JACKED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_MISSION_AUDIO_LOADING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MONEY_SPENT_ON_WEAPONS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MONEY_SPENT_ON_PROPERTY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MONEY_SPENT_ON_AUTO_PAINTING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_ANSWERING_MOBILE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_DRUNKENNESS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PLAYER_DRUNKENNESS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_DRUG_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PLAYER_DRUG_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_LOAN_SHARK_VISITS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_STORES_KNOCKED_OFF, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MOVIE_STUNTS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_NUMBER_OF_ASSASSINATIONS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PIZZAS_DELIVERED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_GARBAGE_PICKUPS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_ICE_CREAMS_SOLD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TOP_SHOOTING_RANGE_SCORE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SHOOTING_RANGE_RANK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MONEY_SPENT_ON_GAMBLING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_MONEY_WON_ON_GAMBLING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_LARGEST_GAMBLING_WIN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_IN_PLAYERS_GROUP_CAN_FIGHT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CHAR_WAIT_STATE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_OF_TYPE_IN_AREA_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAN_BURST_CAR_TYRES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_AUTO_AIM, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FIRE_HUNTER_GUN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PROPERTY_AS_OWNED, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BLOOD_RING_KILLS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_LONGEST_TIME_IN_BLOOD_RING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_EVERYTHING_FOR_HUGE_CUTSCENE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_TOUCHING_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_TOUCHING_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHECK_FOR_PED_MODEL_AROUND_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CHAR_FOLLOW_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_CAN_BE_SHOT_IN_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ATTACH_CUTSCENE_OBJECT_TO_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_MISSION_TEXT, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TONIGHTS_EVENT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CHAR_LAST_DAMAGE_ENTITY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CAR_LAST_DAMAGE_ENTITY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FREEZE_OBJECT_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_HAS_MET_DEBBIE_HARRY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_RIOT_INTENSITY, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_ANGLED_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_IN_ANGLED_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_REMOVE_WEAPON_FROM_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_UP_TAXI_SHORTCUT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_TAXI_SHORTCUT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_GOTO_CAR_ON_FOOT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CLOSEST_WATER_NODE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_PORN_LEAFLET_TO_RUBBISH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CLOTHES_PICKUP, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHANGE_BLIP_THRESHOLD, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_PLAYER_FIRE_PROOF, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_INCREASE_PLAYER_MAX_HEALTH, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_INCREASE_PLAYER_MAX_ARMOUR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_RANDOM_CHAR_AS_DRIVER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_RANDOM_CHAR_AS_PASSENGER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_IGNORE_THREATS_BEHIND_OBJECTS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ENSURE_PLAYER_HAS_DRIVE_BY_WEAPON, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_MAKE_HELI_COME_CRASHING_DOWN, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_EXPLOSION_NO_SOUND, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_OBJECT_AREA_VISIBLE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WAS_VEHICLE_EVER_POLICE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_NEVER_TARGETTED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LOAD_UNCOMPRESSED_ANIM, INPUT_ARGUMENTS(ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WAS_CUTSCENE_SKIPPED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_CROUCH_WHEN_THREATENED, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_ANY_POLICE_VEHICLE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DOES_CHAR_EXIST, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DOES_VEHICLE_EXIST, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SHORT_RANGE_BLIP_FOR_CONTACT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_SHORT_RANGE_SPRITE_BLIP_FOR_CONTACT_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STUCK, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ALL_TAXIS_HAVE_NITRO, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_STOP_SHOOT_DONT_SEEK_ENTITY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FREEZE_CAR_POSITION_AND_DONT_LOAD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FREEZE_CHAR_POSITION_AND_DONT_LOAD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_FREEZE_OBJECT_POSITION_AND_DONT_LOAD_COLLISION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_FADE_AND_JUMPCUT_AFTER_RC_EXPLOSION, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_VIGILANTE_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_ALL_CHAR_ANIMS, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_MAXIMUM_NUMBER_OF_CARS_IN_GARAGE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WANTED_STARS_ARE_FLASHING, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_ALLOW_HURRICANES, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PLAY_ANNOUNCEMENT, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_IS_IN_STADIUM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_BUS_FARES_COLLECTED_BY_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_OBJ_BUY_ICE_CREAM, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISPLAY_RADAR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_BEST_POSITION, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_INFO_ZONE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_STRING, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_CHAR_ICE_CREAM_PURCHASE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_IN_CAR_FIRE_BUTTON_PRESSED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_ATTEMPTED_ATTRACTOR, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_LOAD_COLLISION_FOR_CAR_FLAG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_LOAD_COLLISION_FOR_CHAR_FLAG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_LOAD_COLLISION_FOR_OBJECT_FLAG, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_BIG_GUN_FLASH, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_HAS_CHAR_BOUGHT_ICE_CREAM, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PROGRESS_PERCENTAGE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_SHORTCUT_PICKUP_POINT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_SHORTCUT_DROPOFF_POINT_FOR_MISSION, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_ICE_CREAM_CUSTOMER_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_RANDOM_ICE_CREAM_CUSTOMER_IN_ZONE, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_UNLOCK_ALL_CAR_DOORS_IN_AREA, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_GANG_ATTACK_PLAYER_WITH_COPS, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_FRIGHTENED_IN_JACKED_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_VEHICLE_TO_FADE_IN, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_ODDJOB_MISSION_PASSED, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_SHORTCUT_TAXI, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_DUCKING, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_DUST_EFFECT_FOR_CUTSCENE_HELI, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REGISTER_FIRE_LEVEL, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_AUSTRALIAN_GAME, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DISARM_CAR_BOMB, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""),
};
#undef REGISTER_COMMAND
#undef INPUT_ARGUMENTS
@@ -1355,9 +1635,9 @@ static void PrintToLog(const char* format, ...)
#endif
va_end(va);
- printf("%s", tmp);
#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
- fwrite(tmp, 1, strlen(tmp), dbg_log);
+ if (dbg_log)
+ fwrite(tmp, 1, strlen(tmp), dbg_log);
#endif
}
@@ -1768,13 +2048,13 @@ void CRunningScript::CollectParameters(uint32* pIp, int16 total)
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
int CRunningScript::CollectParameterForDebug(char* buf, bool& var)
{
- float tmp;
uint16 varIndex;
char tmpstr[24];
var = false;
switch (CTheScripts::Read1ByteFromScript(&m_nIp))
{
case ARGUMENT_INT32:
+ case ARGUMENT_FLOAT:
return CTheScripts::Read4BytesFromScript(&m_nIp);
case ARGUMENT_GLOBALVAR:
varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
@@ -1794,9 +2074,6 @@ int CRunningScript::CollectParameterForDebug(char* buf, bool& var)
return CTheScripts::Read1ByteFromScript(&m_nIp);
case ARGUMENT_INT16:
return CTheScripts::Read2BytesFromScript(&m_nIp);
- case ARGUMENT_FLOAT:
- tmp = CTheScripts::ReadFloatFromScript(&m_nIp);
- return *(int32*)&tmp;
default:
PrintToLog("%s - script assertion failed in CollectParameterForDebug", buf);
script_assert(0);
@@ -2015,7 +2292,7 @@ void CTheScripts::Init()
dbg_log = fopen("SCRDBG.LOG", "w");
static const char* init_msg = "Starting debug script log\n\n";
PrintToLog(init_msg);
- CFileMgr::SetDir("\\");
+ CFileMgr::SetDir("");
#endif
}
@@ -2124,7 +2401,7 @@ void CTheScripts::Process()
dbg_log = fopen("SCRDBG.LOG", "w");
static const char* init_msg = "Starting debug script log\n\n";
PrintToLog(init_msg);
- CFileMgr::SetDir("\\");
+ CFileMgr::SetDir("");
#endif
PrintToLog("------------------------\n");
PrintToLog("CTheScripts::Process started, CTimer::GetTimeInMilliseconds == %u\n", CTimer::GetTimeInMilliseconds());
@@ -2948,9 +3225,8 @@ int8 CRunningScript::ProcessCommands0To99(int32 command)
UpdateCompareFlag(ped->IsWithinArea(x1, y1, x2, y2));
else
UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, x2, y2));
- if (!ScriptParams[5])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
+ if (ScriptParams[5])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
return 0;
@@ -2969,9 +3245,8 @@ int8 CRunningScript::ProcessCommands0To99(int32 command)
UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, z1, x2, y2, z2));
else
UpdateCompareFlag(ped->IsWithinArea(x1, y1, z1, x2, y2, z2));
- if (!ScriptParams[7])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
+ if (ScriptParams[7])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2);
return 0;
@@ -3529,9 +3804,8 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, x2, y2));
else
UpdateCompareFlag(ped->IsWithinArea(x1, y1, x2, y2));
- if (!ScriptParams[5])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
+ if (ScriptParams[5])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
return 0;
@@ -3556,9 +3830,8 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
UpdateCompareFlag(ped->m_pMyVehicle->IsWithinArea(x1, y1, z1, x2, y2, z2));
else
UpdateCompareFlag(ped->IsWithinArea(x1, y1, z1, x2, y2, z2));
- if (!ScriptParams[7])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
+ if (ScriptParams[7])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2);
return 0;
@@ -3786,9 +4059,8 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
float x2 = *(float*)&ScriptParams[3];
float y2 = *(float*)&ScriptParams[4];
UpdateCompareFlag(vehicle->IsWithinArea(x1, y1, x2, y2));
- if (!ScriptParams[5])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
+ if (ScriptParams[5])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
return 0;
@@ -3805,9 +4077,8 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
float y2 = *(float*)&ScriptParams[5];
float z2 = *(float*)&ScriptParams[6];
UpdateCompareFlag(vehicle->IsWithinArea(x1, y1, z1, x2, y2, z2));
- if (!ScriptParams[7])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
+ if (ScriptParams[7])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2);
return 0;
@@ -4524,9 +4795,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
float y2 = *(float*)&ScriptParams[4];
UpdateCompareFlag(pVehicle->GetStatus() == STATUS_WRECKED &&
pVehicle->IsWithinArea(x1, y1, x2, y2));
- if (!ScriptParams[5])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
+ if (ScriptParams[5])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
return 0;
@@ -4544,9 +4814,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
float z2 = *(float*)&ScriptParams[6];
UpdateCompareFlag(pVehicle->GetStatus() == STATUS_WRECKED &&
pVehicle->IsWithinArea(x1, y1, z1, x2, y2, z2));
- if (!ScriptParams[7])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
+ if (ScriptParams[7])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, (z1 + z2) / 2);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugCube(x1, y1, z1, x2, y2, z2);
return 0;
@@ -7401,9 +7670,8 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
float x2 = *(float*)&ScriptParams[3];
float y2 = *(float*)&ScriptParams[4];
UpdateCompareFlag(pPed->bIsShooting && pPed->IsWithinArea(x1, y1, x2, y2));
- if (!ScriptParams[5])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
+ if (ScriptParams[5])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
return 0;
@@ -7418,9 +7686,8 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
float x2 = *(float*)&ScriptParams[3];
float y2 = *(float*)&ScriptParams[4];
UpdateCompareFlag(pPed->bIsShooting && pPed->IsWithinArea(x1, y1, x2, y2));
- if (!ScriptParams[5])
- return 0;
- CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
+ if (ScriptParams[5])
+ CTheScripts::HighlightImportantArea((uintptr)this + m_nIp, x1, y1, x2, y2, MAP_Z_LOW_LIMIT);
if (CTheScripts::DbgFlag)
CTheScripts::DrawDebugSquare(x1, y1, x2, y2);
return 0;
@@ -8868,7 +9135,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
CEntity* apEntities[16];
CWorld::FindObjectsOfTypeInRange(mi, pos, range, true, &total, 16, apEntities, true, false, false, true, true);
if (total == 0)
- CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_NONE), pos, range, true, &total, 16, apEntities);
+ CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, range, true, &total, 16, apEntities);
if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, range, true, &total, 16, apEntities);
CEntity* pClosestEntity = nil;
@@ -9658,7 +9925,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
CEntity* apEntities[16];
CWorld::FindObjectsOfTypeInRange(mi1, pos, radius, true, &total, 16, apEntities, true, false, false, false, false);
if (total == 0)
- CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_NONE), pos, radius, true, &total, 16, apEntities);
+ CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(LEVEL_GENERIC), pos, radius, true, &total, 16, apEntities);
if (total == 0)
CWorld::FindObjectsOfTypeInRangeSectorList(mi1, CWorld::GetBigBuildingList(CTheZones::GetLevelFromPosition(&pos)), pos, radius, true, &total, 16, apEntities);
CEntity* pClosestEntity = nil;
@@ -10318,11 +10585,15 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
CollectParameters(&m_nIp, 1);
CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0];
+#ifndef NO_ISLAND_LOADING
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+#endif
CCollision::SortOutCollisionAfterLoad();
+#ifndef NO_ISLAND_LOADING
CStreaming::RequestIslands(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true);
+#endif
CTimer::Update();
return 0;
}
@@ -10351,7 +10622,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
if (ScriptParams[1])
pVehicle->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pVehicle->GetPosition());
else
- pVehicle->m_nZoneLevel = LEVEL_NONE;
+ pVehicle->m_nZoneLevel = LEVEL_GENERIC;
return 0;
}
case COMMAND_SET_CHAR_STAYS_IN_CURRENT_LEVEL:
@@ -10362,7 +10633,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
if (ScriptParams[1])
pPed->m_nZoneLevel = CTheZones::GetLevelFromPosition(&pPed->GetPosition());
else
- pPed->m_nZoneLevel = LEVEL_NONE;
+ pPed->m_nZoneLevel = LEVEL_GENERIC;
return 0;
}
*/
@@ -10445,12 +10716,9 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
UpdateCompareFlag(CGame::germanGame);
return 0;
case COMMAND_CLEAR_MISSION_AUDIO:
- {
CollectParameters(&m_nIp, 1);
- debug("CLEAR_MISSION_AUDIO not implemented\n");
- //DMAudio.ClearMissionAudio(ScriptParams[0]);
+ DMAudio.ClearMissionAudio(ScriptParams[0] - 1);
return 0;
- }
/*
case COMMAND_SET_FADE_IN_AFTER_NEXT_ARREST:
CollectParameters(&m_nIp, 1);
@@ -11003,18 +11271,24 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
CTimer::Stop();
CGame::currLevel = (eLevelName)ScriptParams[0];
if (CGame::currLevel != CCollision::ms_collisionInMemory) {
+#ifndef NO_ISLAND_LOADING
DMAudio.SetEffectsFadeVol(0);
CPad::StopPadsShaking();
CCollision::LoadCollisionScreen(CGame::currLevel);
DMAudio.Service();
+#endif
CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false);
+#ifndef NO_ISLAND_LOADING
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
+#endif
CCollision::SortOutCollisionAfterLoad();
+#ifndef NO_ISLAND_LOADING
CStreaming::RequestIslands(CGame::currLevel);
CStreaming::RequestBigBuildings(CGame::currLevel);
CStreaming::LoadAllRequestedModels(true);
DMAudio.SetEffectsFadeVol(127);
+#endif
}
CTimer::Update();
return 0;
@@ -11853,7 +12127,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
CollectParameters(&m_nIp, 1);
CPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
assert(pPed);
- UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BIKE);
+ UpdateCompareFlag(pPed->bInVehicle && pPed->m_pMyVehicle->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT);
return 0;
}
case COMMAND_IS_CHAR_IN_ANY_HELI:
@@ -12296,7 +12570,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
case COMMAND_IS_OBJECT_IN_AREA_3D:
ObjectInAreaCheckCommand(command, &m_nIp);
return 0;
- case COMMAND_TASK_TOGGLE_DUCK:
+ case COMMAND_SET_CHAR_CROUCH:
{
CollectParameters(&m_nIp, 3);
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
@@ -13288,12 +13562,8 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
break;
case COMMAND_WANTED_STARS_ARE_FLASHING:
{
- static bool bShowed = false;
- if (!bShowed) {
- debug("WANTED_STARS_ARE_FLASHING not implemented, default to FALSE\n");
- bShowed = true;
- }
- UpdateCompareFlag(false);
+ CWanted *pWanted = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted;
+ UpdateCompareFlag(pWanted->m_nMinWantedLevel - pWanted->m_nWantedLevel > 0);
return 0;
}
case COMMAND_SET_ALLOW_HURRICANES:
@@ -13329,10 +13599,14 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
ScriptParams[0] = 0;
if (pPed->m_objective == OBJECTIVE_NONE && !pPed->bHasAlreadyUsedAttractor) {
C2dEffect* pEffect = (C2dEffect*)GetPedAttractorManager()->GetEffectForIceCreamVan(pVehicle, pPed->GetPosition()); // has to be casted, because inner methods are const
- if ((pPed->GetPosition() - pEffect->pos).MagnitudeSqr() < SQR(20.0f)) {
- if (GetPedAttractorManager()->HasEmptySlot(pEffect) && GetPedAttractorManager()->IsApproachable(pEffect, pVehicle->GetMatrix(), 0, pPed)) {
- if (GetPedAttractorManager()->RegisterPedWithAttractor(pPed, pEffect, pVehicle->GetMatrix()))
- ScriptParams[0] = 1;
+ if (pEffect) {
+ CVector pos;
+ CPedAttractorManager::ComputeEffectPos(pEffect, pVehicle->GetMatrix(), pos);
+ if ((pPed->GetPosition() - pos).MagnitudeSqr() < SQR(20.0f)) {
+ if (GetPedAttractorManager()->HasEmptySlot(pEffect) && GetPedAttractorManager()->IsApproachable(pEffect, pVehicle->GetMatrix(), 0, pPed)) {
+ if (GetPedAttractorManager()->RegisterPedWithAttractor(pPed, pEffect, pVehicle->GetMatrix()))
+ ScriptParams[0] = 1;
+ }
}
}
}
@@ -13341,7 +13615,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
}
case COMMAND_DISPLAY_RADAR:
CollectParameters(&m_nIp, 1);
- debug("DISPLAY_RADAR not implemented\n");
+ CHud::m_HideRadar = ScriptParams[0] == 0;
return 0;
case COMMAND_REGISTER_BEST_POSITION:
CollectParameters(&m_nIp, 2);
@@ -13459,11 +13733,57 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
return 0;
}
case COMMAND_GET_RANDOM_ICE_CREAM_CUSTOMER_IN_AREA:
+ {
CollectParameters(&m_nIp, 7);
- debug("GET_RANDOM_ICE_CREAM_CUSTOMER_IN_AREA not implemented\n"); // TODO(MIAMI)
- ScriptParams[0] = -1;
+ int ped_handle = -1;
+ CVector pos = FindPlayerCoors();
+ float x1 = *(float*)&ScriptParams[0];
+ float y1 = *(float*)&ScriptParams[1];
+ float x2 = *(float*)&ScriptParams[2];
+ float y2 = *(float*)&ScriptParams[3];
+ int i = CPools::GetPedPool()->GetSize();
+ while (--i && ped_handle == -1) {
+ CPed* pPed = CPools::GetPedPool()->GetSlot(i);
+ if (!pPed)
+ continue;
+ if (CTheScripts::LastRandomPedId == CPools::GetPedPool()->GetIndex(pPed))
+ continue;
+ if (pPed->CharCreatedBy != RANDOM_CHAR)
+ continue;
+ if (!pPed->IsPedInControl())
+ continue;
+ if (pPed->bRemoveFromWorld)
+ continue;
+ if (pPed->bFadeOut)
+ continue;
+ if (pPed->m_nWaitState != WAITSTATE_FALSE)
+ continue;
+ if (pPed->bHasAlreadyUsedAttractor)
+ continue;
+ if (pPed->m_attractor)
+ continue;
+ if (!ThisIsAValidRandomPed(pPed->m_nPedType, ScriptParams[4], ScriptParams[5], ScriptParams[6]))
+ continue;
+ if (pPed->bIsLeader || pPed->m_leader)
+ continue;
+ if (!pPed->IsWithinArea(x1, y1, x2, y2))
+ continue;
+ if (pos.z - PED_FIND_Z_OFFSET > pPed->GetPosition().z)
+ continue;
+ if (pos.z + PED_FIND_Z_OFFSET < pPed->GetPosition().z)
+ continue;
+ ped_handle = CPools::GetPedPool()->GetIndex(pPed);
+ CTheScripts::LastRandomPedId = ped_handle;
+ pPed->CharCreatedBy = MISSION_CHAR;
+ pPed->bRespondsToThreats = false;
+ ++CPopulation::ms_nTotalMissionPeds;
+ if (m_bIsMissionScript)
+ CTheScripts::MissionCleanup.AddEntityToList(ped_handle, CLEANUP_CHAR);
+ }
+ ScriptParams[0] = ped_handle;
StoreParameters(&m_nIp, 1);
return 0;
+ }
//case COMMAND_GET_RANDOM_ICE_CREAM_CUSTOMER_IN_ZONE:
case COMMAND_UNLOCK_ALL_CAR_DOORS_IN_AREA:
CollectParameters(&m_nIp, 4);
@@ -14094,7 +14414,7 @@ void CRunningScript::LocateCharCommand(int32 command, uint32* pIp)
CollectParameters(pIp, b3D ? 8 : 6);
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
script_assert(pPed);
- CVector pos = pPed->bInVehicle ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition();
+ CVector pos = pPed->InVehicle() ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition();
switch (command) {
case COMMAND_LOCATE_STOPPED_CHAR_ANY_MEANS_2D:
case COMMAND_LOCATE_STOPPED_CHAR_ANY_MEANS_3D:
@@ -14854,7 +15174,7 @@ void CRunningScript::CharInAreaCheckCommand(int32 command, uint32* pIp)
CollectParameters(pIp, b3D ? 8 : 6);
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
script_assert(pPed);
- CVector pos = pPed->bInVehicle ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition();
+ CVector pos = pPed->InVehicle() ? pPed->m_pMyVehicle->GetPosition() : pPed->GetPosition();
switch (command) {
case COMMAND_IS_CHAR_STOPPED_IN_AREA_3D:
case COMMAND_IS_CHAR_STOPPED_IN_AREA_ON_FOOT_3D:
@@ -15139,7 +15459,7 @@ void CRunningScript::DoDeatharrestCheck()
if (!CTheScripts::IsPlayerOnAMission())
return;
CPlayerInfo* pPlayer = &CWorld::Players[CWorld::PlayerInFocus];
- if (!pPlayer->IsRestartingAfterDeath() && !pPlayer->IsRestartingAfterArrest() && !CTheScripts::UpsideDownCars.AreAnyCarsUpsideDown())
+ if (!pPlayer->IsRestartingAfterDeath() && !pPlayer->IsRestartingAfterArrest())
return;
#ifdef MISSION_REPLAY
if (AllowMissionReplay != 0)
@@ -15151,6 +15471,7 @@ void CRunningScript::DoDeatharrestCheck()
while (m_nStackPointer > 1)
--m_nStackPointer;
m_nIp = m_anStack[--m_nStackPointer];
+ CMessages::ClearSmallMessagesOnly();
*(int32*)&CTheScripts::ScriptSpace[CTheScripts::OnAMissionFlag] = 0;
m_bDeatharrestExecuted = true;
m_nWakeTime = 0;
@@ -15587,22 +15908,24 @@ void CTheScripts::HighlightImportantAngledArea(uint32 id, float x1, float y1, fl
bool CTheScripts::IsPedStopped(CPed* pPed)
{
- if (pPed->bInVehicle)
+ if (pPed->InVehicle())
return IsVehicleStopped(pPed->m_pMyVehicle);
- return pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL;
+ return (pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL) &&
+ !pPed->bIsInTheAir && !pPed->bIsLanding && pPed->bIsStanding && pPed->m_vecAnimMoveDelta.x == 0.0f && pPed->m_vecAnimMoveDelta.y == 0.0f;
}
bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer)
{
CPed* pPed = pPlayer->m_pPed;
- if (pPed->bInVehicle)
+ if (pPed->InVehicle())
return IsVehicleStopped(pPed->m_pMyVehicle);
if (RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_RUN_STOP) ||
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_RUN_STOP_R) ||
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_LAUNCH) ||
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_GLIDE))
return false;
- return pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL;
+ return (pPed->m_nMoveState == eMoveState::PEDMOVE_NONE || pPed->m_nMoveState == eMoveState::PEDMOVE_STILL) &&
+ !pPed->bIsInTheAir && !pPed->bIsLanding && pPed->bIsStanding && pPed->m_vecAnimMoveDelta.x == 0.0f && pPed->m_vecAnimMoveDelta.y == 0.0f;
}
bool CTheScripts::IsVehicleStopped(CVehicle* pVehicle)
@@ -15904,4 +16227,4 @@ CTheScripts::SwitchToMission(int32 mission)
CTheScripts::bAlreadyRunningAMissionScript = true;
CGameLogic::ClearShortCut();
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/control/ScriptCommands.h b/src/control/ScriptCommands.h
index 6669e43f..18fc9575 100644
--- a/src/control/ScriptCommands.h
+++ b/src/control/ScriptCommands.h
@@ -1260,7 +1260,7 @@ enum {
COMMAND_SET_CHAR_OBJ_STEAL_ANY_CAR_EVEN_MISSION_CAR,
COMMAND_IS_OBJECT_IN_AREA_2D,
COMMAND_IS_OBJECT_IN_AREA_3D,
- COMMAND_TASK_TOGGLE_DUCK,
+ COMMAND_SET_CHAR_CROUCH,
COMMAND_SET_ZONE_CIVILIAN_CAR_INFO,
COMMAND_REQUEST_ANIMATION,
COMMAND_HAS_ANIMATION_LOADED,
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index c37e6b33..c4768fdc 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -39,7 +39,7 @@ extern float fRangePlayerRadius;
extern float fCloseNearClipLimit;
#ifdef FREE_CAM
-bool CCamera::bFreeCam;
+bool CCamera::bFreeCam = false;
int nPreviousMode = -1;
#endif
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index d558e3ad..9f3646e2 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -193,8 +193,8 @@ CCamera::Init(void)
m_bMusicFading = false;
m_fTimeToFadeMusic = 0.0f;
m_fFLOATingFadeMusic = 0.0f;
- m_fMouseAccelHorzntl = 0.003f;
- m_fMouseAccelVertical = 0.0025f;
+ m_fMouseAccelVertical = 0.003f;
+ m_fMouseAccelHorzntl = 0.0025f;
}
if(FrontEndMenuManager.m_bWantToRestart)
m_fTimeToFadeMusic = 0.0f;
@@ -3376,15 +3376,15 @@ CCamera::LoadTrainCamNodes(char const *name)
char token[16] = { 0 };
char filename[16] = { 0 };
uint8 *buf;
- int bufpos = 0;
+ size_t bufpos = 0;
int field = 0;
int tokpos = 0;
char c;
int i;
- int len;
+ size_t len;
strcpy(filename, name);
- len = strlen(filename);
+ len = (int)strlen(filename);
filename[len] = '.';
filename[len+1] = 'd';
filename[len+2] = 'a';
@@ -4031,7 +4031,7 @@ bool
CCamera::IsPointVisible(const CVector &center, const CMatrix *mat)
{
RwV3d c;
- c = *(RwV3d*)&center;
+ c = center;
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
if(c.y < CDraw::GetNearClipZ()) return false;
if(c.y > CDraw::GetFarClipZ()) return false;
@@ -4046,7 +4046,7 @@ bool
CCamera::IsSphereVisible(const CVector &center, float radius, const CMatrix *mat)
{
RwV3d c;
- c = *(RwV3d*)&center;
+ c = center;
RwV3dTransformPoints(&c, &c, 1, &mat->m_matrix);
if(c.y + radius < CDraw::GetNearClipZ()) return false;
if(c.y - radius > CDraw::GetFarClipZ()) return false;
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp
index 4d6bcdab..45fd9832 100644
--- a/src/core/CdStreamPosix.cpp
+++ b/src/core/CdStreamPosix.cpp
@@ -189,10 +189,11 @@ GetGTA3ImgSize(void)
realpath(gImgNames[0], path);
if (stat(path, &statbuf) == -1) {
// Try case-insensitivity
- char *r = (char*)alloca(strlen(gImgNames[0]) + 2);
- if (casepath(gImgNames[0], r))
+ char* real = casepath(gImgNames[0], false);
+ if (real)
{
- realpath(r, path);
+ realpath(real, path);
+ free(real);
if (stat(path, &statbuf) != -1)
goto ok;
}
@@ -210,7 +211,6 @@ CdStreamShutdown(void)
{
// Destroying semaphores and free(gpReadInfo) will be done at threads
#ifndef ONE_THREAD_PER_CHANNEL
- free(gChannelRequestQ.items);
gCdStreamThreadStatus = 2;
sem_post(&gCdStreamSema);
#endif
@@ -442,6 +442,7 @@ void *CdStreamThread(void *param)
sem_destroy(&gpReadInfo[i].pDoneSemaphore);
}
sem_destroy(&gCdStreamSema);
+ free(gChannelRequestQ.items);
#else
sem_destroy(&gpReadInfo[channel].pStartSemaphore);
sem_destroy(&gpReadInfo[channel].pDoneSemaphore);
@@ -460,10 +461,11 @@ CdStreamAddImage(char const *path)
// Fix case sensitivity and backslashes.
if (gImgFiles[gNumImages] == -1) {
- char *r = (char*)alloca(strlen(path) + 2);
- if (casepath(path, r))
+ char* real = casepath(path, false);
+ if (real)
{
- gImgFiles[gNumImages] = open(r, _gdwCdStreamFlags);
+ gImgFiles[gNumImages] = open(real, _gdwCdStreamFlags);
+ free(real);
}
}
diff --git a/src/core/Collision.cpp b/src/core/Collision.cpp
index 76019c2f..268e3c5e 100644
--- a/src/core/Collision.cpp
+++ b/src/core/Collision.cpp
@@ -23,6 +23,8 @@
#include "Camera.h"
#include "ColStore.h"
+//--MIAMI: file done
+
enum Direction
{
DIR_X_POS,
@@ -36,16 +38,14 @@ enum Direction
eLevelName CCollision::ms_collisionInMemory;
CLinkList<CColModel*> CCollision::ms_colModelCache;
-//--MIAMI: done
void
CCollision::Init(void)
{
ms_colModelCache.Init(NUMCOLCACHELINKS);
- ms_collisionInMemory = LEVEL_NONE;
+ ms_collisionInMemory = LEVEL_GENERIC;
CColStore::Initialise();
}
-//--MIAMI: done
void
CCollision::Shutdown(void)
{
@@ -53,7 +53,6 @@ CCollision::Shutdown(void)
CColStore::Shutdown();
}
-//--MIAMI: done
void
CCollision::Update(void)
{
@@ -70,10 +69,10 @@ GetCollisionInSectorList(CPtrList &list)
for(node = list.first; node; node = node->next){
e = (CEntity*)node->item;
level = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel()->level;
- if(level != LEVEL_NONE)
+ if(level != LEVEL_GENERIC)
return (eLevelName)level;
}
- return LEVEL_NONE;
+ return LEVEL_GENERIC;
}
//--MIAMI: unused
@@ -84,29 +83,29 @@ GetCollisionInSector(CSector &sect)
int level;
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS]);
- if(level == LEVEL_NONE)
+ if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_BUILDINGS_OVERLAP]);
- if(level == LEVEL_NONE)
+ if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS]);
- if(level == LEVEL_NONE)
+ if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_OBJECTS_OVERLAP]);
- if(level == LEVEL_NONE)
+ if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES]);
- if(level == LEVEL_NONE)
+ if(level == LEVEL_GENERIC)
level = GetCollisionInSectorList(sect.m_lists[ENTITYLIST_DUMMIES_OVERLAP]);
return (eLevelName)level;
}
-//--MIAMI: done
void
CCollision::LoadCollisionWhenINeedIt(bool forceChange)
{
}
-//--MIAMI: done
void
CCollision::SortOutCollisionAfterLoad(void)
{
+ CColStore::LoadCollision(TheCamera.GetPosition());
+ CStreaming::LoadAllRequestedModels(false);
}
void
@@ -251,7 +250,7 @@ CCollision::TestVerticalLineBox(const CColLine &line, const CBox &box)
}
bool
-CCollision::TestLineTriangle(const CColLine &line, const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane)
+CCollision::TestLineTriangle(const CColLine &line, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane)
{
float t;
CVector normal;
@@ -266,9 +265,9 @@ CCollision::TestLineTriangle(const CColLine &line, const CVector *verts, const C
// find point of intersection
CVector p = line.p0 + (line.p1-line.p0)*t;
- const CVector &va = verts[tri.a];
- const CVector &vb = verts[tri.b];
- const CVector &vc = verts[tri.c];
+ const CVector &va = verts[tri.a].Get();
+ const CVector &vb = verts[tri.b].Get();
+ const CVector &vc = verts[tri.c].Get();
CVector2D vec1, vec2, vec3, vect;
// We do the test in 2D. With the plane direction we
@@ -361,15 +360,16 @@ CCollision::TestLineSphere(const CColLine &line, const CColSphere &sph)
bool
CCollision::TestSphereTriangle(const CColSphere &sphere,
- const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane)
+ const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane)
{
// If sphere and plane don't intersect, no collision
- if(Abs(plane.CalcPoint(sphere.center)) > sphere.radius)
+ float planedist = plane.CalcPoint(sphere.center);
+ if(Abs(planedist) > sphere.radius)
return false;
- const CVector &va = verts[tri.a];
- const CVector &vb = verts[tri.b];
- const CVector &vc = verts[tri.c];
+ const CVector &va = verts[tri.a].Get();
+ const CVector &vb = verts[tri.b].Get();
+ const CVector &vc = verts[tri.c].Get();
// calculate two orthogonal basis vectors for the triangle
CVector vec2 = vb - va;
@@ -393,28 +393,35 @@ CCollision::TestSphereTriangle(const CColSphere &sphere,
int testcase = insideAB + insideAC + insideBC;
float dist = 0.0f;
- if(testcase == 1){
+ switch(testcase){
+ case 0:
+ return false; // shouldn't happen
+ case 1:
// closest to a vertex
if(insideAB) dist = (sphere.center - vc).Magnitude();
else if(insideAC) dist = (sphere.center - vb).Magnitude();
else if(insideBC) dist = (sphere.center - va).Magnitude();
else assert(0);
- }else if(testcase == 2){
+ break;
+ case 2:
// closest to an edge
+ // looks like original game as DistToLine manually inlined
if(!insideAB) dist = DistToLine(&va, &vb, &sphere.center);
else if(!insideAC) dist = DistToLine(&va, &vc, &sphere.center);
else if(!insideBC) dist = DistToLine(&vb, &vc, &sphere.center);
else assert(0);
- }else if(testcase == 3){
+ break;
+ case 3:
// center is in triangle
- return true;
- }else
- assert(0); // front fell off
+ dist = Abs(planedist);
+ break;
+ default:
+ assert(0);
+ }
return dist < sphere.radius;
}
-//--MIAMI: TODO
bool
CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, bool ignoreSeeThrough, bool ignoreShootThrough)
{
@@ -429,25 +436,32 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
if(!TestLineBox(newline, model.boundingBox))
return false;
- for(i = 0; i < model.numSpheres; i++)
- if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_TRANSPARENT_CLOTH)
- if(TestLineSphere(newline, model.spheres[i]))
- return true;
+ for(i = 0; i < model.numSpheres; i++){
+ if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
+ if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue;
+ if(TestLineSphere(newline, model.spheres[i]))
+ return true;
+ }
- for(i = 0; i < model.numBoxes; i++)
- if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_TRANSPARENT_CLOTH)
- if(TestLineBox(newline, model.boxes[i]))
- return true;
+ for(i = 0; i < model.numBoxes; i++){
+ if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
+ if(ignoreShootThrough && IsShootThrough(model.boxes[i].surface)) continue;
+ if(TestLineBox(newline, model.boxes[i]))
+ return true;
+ }
CalculateTrianglePlanes(&model);
- for(i = 0; i < model.numTriangles; i++)
- if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_TRANSPARENT_CLOTH)
- if(TestLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i]))
- return true;
+ for(i = 0; i < model.numTriangles; i++){
+ if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
+ if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
+ if(TestLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i]))
+ return true;
+ }
return false;
}
+// TODO: TestPillWithSpheresInColModel, but only called from overloaded CWeapon::FireMelee which isn't used
//
// Process
@@ -716,18 +730,19 @@ CCollision::ProcessLineSphere(const CColLine &line, const CColSphere &sphere, CC
return true;
}
+//--MIAMI: unused
bool
CCollision::ProcessVerticalLineTriangle(const CColLine &line,
- const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
+ const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
CColPoint &point, float &mindist, CStoredCollPoly *poly)
{
float t;
CVector normal;
const CVector &p0 = line.p0;
- const CVector &va = verts[tri.a];
- const CVector &vb = verts[tri.b];
- const CVector &vc = verts[tri.c];
+ const CVector &va = verts[tri.a].Get();
+ const CVector &vb = verts[tri.b].Get();
+ const CVector &vc = verts[tri.c].Get();
// early out bound rect test
if(p0.x < va.x && p0.x < vb.x && p0.x < vc.x) return false;
@@ -792,6 +807,7 @@ CCollision::ProcessVerticalLineTriangle(const CColLine &line,
if(CrossProduct2D(vec2-vec1, vect-vec1) < 0.0f) return false;
if(CrossProduct2D(vec3-vec1, vect-vec1) > 0.0f) return false;
if(CrossProduct2D(vec3-vec2, vect-vec2) < 0.0f) return false;
+ if(t >= mindist) return false;
point.point = p;
point.normal = normal;
point.surfaceA = 0;
@@ -817,16 +833,12 @@ CCollision::IsStoredPolyStillValidVerticalLine(const CVector &pos, float z, CCol
return false;
// maybe inlined?
- CColTriangle tri;
- tri.a = 0;
- tri.b = 1;
- tri.c = 2;
CColTrianglePlane plane;
- plane.Set(poly->verts, tri);
+ plane.Set(poly->verts[0], poly->verts[1], poly->verts[2]);
- const CVector &va = poly->verts[tri.a];
- const CVector &vb = poly->verts[tri.b];
- const CVector &vc = poly->verts[tri.c];
+ const CVector &va = poly->verts[0];
+ const CVector &vb = poly->verts[1];
+ const CVector &vc = poly->verts[2];
CVector p0 = pos;
CVector p1(pos.x, pos.y, z);
@@ -891,8 +903,8 @@ CCollision::IsStoredPolyStillValidVerticalLine(const CVector &pos, float z, CCol
bool
CCollision::ProcessLineTriangle(const CColLine &line ,
- const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
- CColPoint &point, float &mindist)
+ const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
+ CColPoint &point, float &mindist, CStoredCollPoly *poly)
{
float t;
CVector normal;
@@ -910,9 +922,9 @@ CCollision::ProcessLineTriangle(const CColLine &line ,
// find point of intersection
CVector p = line.p0 + (line.p1-line.p0)*t;
- const CVector &va = verts[tri.a];
- const CVector &vb = verts[tri.b];
- const CVector &vc = verts[tri.c];
+ const CVector &va = verts[tri.a].Get();
+ const CVector &vb = verts[tri.b].Get();
+ const CVector &vc = verts[tri.c].Get();
CVector2D vec1, vec2, vec3, vect;
switch(plane.dir){
@@ -958,19 +970,26 @@ CCollision::ProcessLineTriangle(const CColLine &line ,
if(CrossProduct2D(vec2-vec1, vect-vec1) < 0.0f) return false;
if(CrossProduct2D(vec3-vec1, vect-vec1) > 0.0f) return false;
if(CrossProduct2D(vec3-vec2, vect-vec2) < 0.0f) return false;
+ if(t >= mindist) return false;
point.point = p;
point.normal = normal;
point.surfaceA = 0;
point.pieceA = 0;
point.surfaceB = tri.surface;
point.pieceB = 0;
+ if(poly){
+ poly->verts[0] = va;
+ poly->verts[1] = vb;
+ poly->verts[2] = vc;
+ poly->valid = true;
+ }
mindist = t;
return true;
}
bool
CCollision::ProcessSphereTriangle(const CColSphere &sphere,
- const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
+ const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
CColPoint &point, float &mindistsq)
{
// If sphere and plane don't intersect, no collision
@@ -979,9 +998,9 @@ CCollision::ProcessSphereTriangle(const CColSphere &sphere,
if(Abs(planedist) > sphere.radius || distsq > mindistsq)
return false;
- const CVector &va = verts[tri.a];
- const CVector &vb = verts[tri.b];
- const CVector &vc = verts[tri.c];
+ const CVector &va = verts[tri.a].Get();
+ const CVector &vb = verts[tri.b].Get();
+ const CVector &vc = verts[tri.c].Get();
// calculate two orthogonal basis vectors for the triangle
CVector normal;
@@ -1008,25 +1027,33 @@ CCollision::ProcessSphereTriangle(const CColSphere &sphere,
int testcase = insideAB + insideAC + insideBC;
float dist = 0.0f;
CVector p;
- if(testcase == 1){
+ switch(testcase){
+ case 0:
+ return false; // shouldn't happen
+ case 1:
// closest to a vertex
if(insideAB) p = vc;
else if(insideAC) p = vb;
else if(insideBC) p = va;
else assert(0);
dist = (sphere.center - p).Magnitude();
- }else if(testcase == 2){
+ break;
+ case 2:
// closest to an edge
+ // looks like original game as DistToLine manually inlined
if(!insideAB) dist = DistToLine(&va, &vb, &sphere.center, p);
else if(!insideAC) dist = DistToLine(&va, &vc, &sphere.center, p);
else if(!insideBC) dist = DistToLine(&vb, &vc, &sphere.center, p);
else assert(0);
- }else if(testcase == 3){
+ break;
+ case 3:
// center is in triangle
dist = Abs(planedist);
p = sphere.center - normal*planedist;
- }else
- assert(0); // front fell off
+ break;
+ default:
+ assert(0);
+ }
if(dist >= sphere.radius || dist*dist >= mindistsq)
return false;
@@ -1043,7 +1070,6 @@ CCollision::ProcessSphereTriangle(const CColSphere &sphere,
return true;
}
-//--MIAMI: TODO
bool
CCollision::ProcessLineOfSight(const CColLine &line,
const CMatrix &matrix, CColModel &model,
@@ -1061,18 +1087,24 @@ CCollision::ProcessLineOfSight(const CColLine &line,
return false;
float coldist = mindist;
- for(i = 0; i < model.numSpheres; i++)
- if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_TRANSPARENT_CLOTH)
- ProcessLineSphere(newline, model.spheres[i], point, coldist);
+ for(i = 0; i < model.numSpheres; i++){
+ if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
+ if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue;
+ ProcessLineSphere(newline, model.spheres[i], point, coldist);
+ }
- for(i = 0; i < model.numBoxes; i++)
- if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_TRANSPARENT_CLOTH)
- ProcessLineBox(newline, model.boxes[i], point, coldist);
+ for(i = 0; i < model.numBoxes; i++){
+ if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
+ if(ignoreShootThrough && IsShootThrough(model.boxes[i].surface)) continue;
+ ProcessLineBox(newline, model.boxes[i], point, coldist);
+ }
CalculateTrianglePlanes(&model);
- for(i = 0; i < model.numTriangles; i++)
- if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_TRANSPARENT_CLOTH)
- ProcessLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist);
+ for(i = 0; i < model.numTriangles; i++){
+ if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
+ if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
+ ProcessLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist);
+ }
if(coldist < mindist){
point.point = matrix * point.point;
@@ -1083,7 +1115,6 @@ CCollision::ProcessLineOfSight(const CColLine &line,
return false;
}
-//--MIAMI: TODO
bool
CCollision::ProcessVerticalLine(const CColLine &line,
const CMatrix &matrix, CColModel &model,
@@ -1095,31 +1126,33 @@ CCollision::ProcessVerticalLine(const CColLine &line,
// transform line to model space
// Why does the game seem to do this differently than above?
CColLine newline(MultiplyInverse(matrix, line.p0), MultiplyInverse(matrix, line.p1));
- newline.p1.x = newline.p0.x;
- newline.p1.y = newline.p0.y;
- if(!TestVerticalLineBox(newline, model.boundingBox))
+ if(!TestLineBox(newline, model.boundingBox))
return false;
+ // BUG? is IsSeeThroughVertical really the right thing? also not checking shoot through
float coldist = mindist;
- for(i = 0; i < model.numSpheres; i++)
- if(!ignoreSeeThrough || model.spheres[i].surface != SURFACE_GLASS && model.spheres[i].surface != SURFACE_TRANSPARENT_CLOTH)
- ProcessLineSphere(newline, model.spheres[i], point, coldist);
+ for(i = 0; i < model.numSpheres; i++){
+ if(ignoreSeeThrough && IsSeeThroughVertical(model.spheres[i].surface)) continue;
+ ProcessLineSphere(newline, model.spheres[i], point, coldist);
+ }
- for(i = 0; i < model.numBoxes; i++)
- if(!ignoreSeeThrough || model.boxes[i].surface != SURFACE_GLASS && model.boxes[i].surface != SURFACE_TRANSPARENT_CLOTH)
- ProcessLineBox(newline, model.boxes[i], point, coldist);
+ for(i = 0; i < model.numBoxes; i++){
+ if(ignoreSeeThrough && IsSeeThroughVertical(model.boxes[i].surface)) continue;
+ ProcessLineBox(newline, model.boxes[i], point, coldist);
+ }
CalculateTrianglePlanes(&model);
TempStoredPoly.valid = false;
- for(i = 0; i < model.numTriangles; i++)
- if(!ignoreSeeThrough || model.triangles[i].surface != SURFACE_GLASS && model.triangles[i].surface != SURFACE_TRANSPARENT_CLOTH)
- ProcessVerticalLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist, &TempStoredPoly);
+ for(i = 0; i < model.numTriangles; i++){
+ if(ignoreSeeThrough && IsSeeThroughVertical(model.triangles[i].surface)) continue;
+ ProcessLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist, &TempStoredPoly);
+ }
if(coldist < mindist){
point.point = matrix * point.point;
point.normal = Multiply3x3(matrix, point.normal);
- if(poly && TempStoredPoly.valid){
+ if(TempStoredPoly.valid && poly){
*poly = TempStoredPoly;
poly->verts[0] = matrix * poly->verts[0];
poly->verts[1] = matrix * poly->verts[1];
@@ -1354,6 +1387,15 @@ CCollision::CalculateTrianglePlanes(CColModel *model)
}
void
+CCollision::RemoveTrianglePlanes(CColModel *model)
+{
+ if(model->trianglePlanes){
+ ms_colModelCache.Remove(model->GetLinkPtr());
+ model->RemoveTrianglePlanes();
+ }
+}
+
+void
CCollision::DrawColModel(const CMatrix &mat, const CColModel &colModel)
{
int i;
@@ -1575,15 +1617,75 @@ CCollision::DrawColModel(const CMatrix &mat, const CColModel &colModel)
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
}
+static void
+GetSurfaceColor(uint8 surf, uint8 &r, uint8 &g, uint8 &b)
+{
+ // game doesn't do this
+ r = 255;
+ g = 128;
+ b = 0;
+
+ switch(CSurfaceTable::GetAdhesionGroup(surf)){
+ case ADHESIVE_RUBBER:
+ r = 255;
+ g = 0;
+ b = 0;
+ break;
+ case ADHESIVE_HARD:
+ r = 255;
+ g = 255;
+ b = 128;
+ break;
+ case ADHESIVE_ROAD:
+ r = 128;
+ g = 128;
+ b = 128;
+ break;
+ case ADHESIVE_LOOSE:
+ r = 0;
+ g = 255;
+ b = 0;
+ break;
+ case ADHESIVE_SAND:
+ r = 255;
+ g = 128;
+ b = 128;
+ break;
+ case ADHESIVE_WET:
+ r = 0;
+ g = 0;
+ b = 255;
+ break;
+ }
+
+ if(surf == SURFACE_SAND || surf == SURFACE_SAND_BEACH){
+ r = 255;
+ g = 255;
+ b = 0;
+ }
+
+ float f = (surf & 0xF)/32.0f + 0.5f;
+ r *= f;
+ g *= f;
+ b *= f;
+
+ if(surf == SURFACE_TRANSPARENT_CLOTH || surf == SURFACE_METAL_CHAIN_FENCE ||
+ surf == SURFACE_TRANSPARENT_STONE || surf == SURFACE_SCAFFOLD_POLE)
+ if(CTimer::GetFrameCounter() & 1){
+ r = 0;
+ g = 0;
+ b = 0;
+ }
+}
+
void
CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel, int32 id)
{
int i;
int s;
- float f;
CVector verts[8];
CVector min, max;
- int r, g, b;
+ uint8 r, g, b;
RwImVertexIndex *iptr;
RwIm3DVertex *vptr;
@@ -1602,53 +1704,8 @@ CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel,
verts[1] = mat * verts[1];
verts[2] = mat * verts[2];
- // game doesn't do this
- r = 255;
- g = 128;
- b = 0;
-
s = colModel.triangles[i].surface;
- f = (s & 0xF)/32.0f + 0.5f;
- switch(CSurfaceTable::GetAdhesionGroup(s)){
- case ADHESIVE_RUBBER:
- r = f * 255.0f;
- g = 0;
- b = 0;
- break;
- case ADHESIVE_HARD:
- r = f*255.0f;
- g = f*255.0f;
- b = f*128.0f;
- break;
- case ADHESIVE_ROAD:
- r = f*128.0f;
- g = f*128.0f;
- b = f*128.0f;
- break;
- case ADHESIVE_LOOSE:
- r = 0;
- g = f * 255.0f;
- b = 0;
- break;
- case ADHESIVE_WET:
- r = 0;
- g = 0;
- b = f * 255.0f;
- break;
- default:
- // this doesn't make much sense
- r *= f;
- g *= f;
- b *= f;
- }
-
- if(s == SURFACE_TRANSPARENT_CLOTH || s == SURFACE_METAL_CHAIN_FENCE ||
- s == SURFACE_TRANSPARENT_STONE || s == SURFACE_SCAFFOLD_POLE)
- if(CTimer::GetFrameCounter() & 1){
- r = 0;
- g = 0;
- b = 0;
- }
+ GetSurfaceColor(s, r, g, b);
if(s > SURFACE_METAL_GATE){
r = CGeneral::GetRandomNumber();
@@ -1689,47 +1746,7 @@ CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel,
verts[7] = mat * CVector(max.x, max.y, max.z);
s = colModel.boxes[i].surface;
- f = (s & 0xF)/32.0f + 0.5f;
- switch(CSurfaceTable::GetAdhesionGroup(s)){
- case ADHESIVE_RUBBER:
- r = f * 255.0f;
- g = 0;
- b = 0;
- break;
- case ADHESIVE_HARD:
- r = f*255.0f;
- g = f*255.0f;
- b = f*128.0f;
- break;
- case ADHESIVE_ROAD:
- r = f*128.0f;
- g = f*128.0f;
- b = f*128.0f;
- break;
- case ADHESIVE_LOOSE:
- r = 0;
- g = f * 255.0f;
- b = 0;
- break;
- case ADHESIVE_WET:
- r = 0;
- g = 0;
- b = f * 255.0f;
- break;
- default:
- // this doesn't make much sense
- r *= f;
- g *= f;
- b *= f;
- }
-
- if(s == SURFACE_TRANSPARENT_CLOTH || s == SURFACE_METAL_CHAIN_FENCE ||
- s == SURFACE_TRANSPARENT_STONE || s == SURFACE_SCAFFOLD_POLE)
- if(CTimer::GetFrameCounter() & 1){
- r = 0;
- g = 0;
- b = 0;
- }
+ GetSurfaceColor(s, r, g, b);
RenderBuffer::StartStoring(36, 8, &iptr, &vptr);
RwIm3DVertexSetRGBA(&vptr[0], r, g, b, 255);
@@ -1833,7 +1850,7 @@ CColLine::Set(const CVector &p0, const CVector &p1)
}
void
-CColTriangle::Set(const CVector *, int a, int b, int c, uint8 surf, uint8 piece)
+CColTriangle::Set(const CompressedVector *, int a, int b, int c, uint8 surf, uint8 piece)
{
this->a = a;
this->b = b;
@@ -1842,12 +1859,8 @@ CColTriangle::Set(const CVector *, int a, int b, int c, uint8 surf, uint8 piece)
}
void
-CColTrianglePlane::Set(const CVector *v, CColTriangle &tri)
+CColTrianglePlane::Set(const CVector &va, const CVector &vb, const CVector &vc)
{
- const CVector &va = v[tri.a];
- const CVector &vb = v[tri.b];
- const CVector &vc = v[tri.c];
-
normal = CrossProduct(vc-va, vb-va);
normal.Normalise();
dist = DotProduct(normal, va);
@@ -1905,6 +1918,7 @@ CColModel::RemoveCollisionVolumes(void)
RwFree(boxes);
RwFree(vertices);
RwFree(triangles);
+ CCollision::RemoveTrianglePlanes(this);
}
numSpheres = 0;
numLines = 0;
@@ -1950,7 +1964,7 @@ CColModel::GetLinkPtr(void)
void
CColModel::GetTrianglePoint(CVector &v, int i) const
{
- v = vertices[i];
+ v = vertices[i].Get();
}
CColModel&
@@ -2029,7 +2043,7 @@ CColModel::operator=(const CColModel &other)
if(vertices)
RwFree(vertices);
if(numVerts){
- vertices = (CVector*)RwMalloc(numVerts*sizeof(CVector));
+ vertices = (CompressedVector*)RwMalloc(numVerts*sizeof(CompressedVector));
for(i = 0; i < numVerts; i++)
vertices[i] = other.vertices[i];
}
diff --git a/src/core/Collision.h b/src/core/Collision.h
index d79352b5..1dc29efb 100644
--- a/src/core/Collision.h
+++ b/src/core/Collision.h
@@ -10,6 +10,19 @@
#define MAX_COLLISION_POINTS 32
#endif
+struct CompressedVector
+{
+#ifdef COMPRESSED_COL_VECTORS
+ int16 x, y, z;
+ CVector Get(void) const { return CVector(x, y, z)/128.0f; };
+ void Set(float x, float y, float z) { this->x = x*128.0f; this->y = y*128.0f; this->z = z*128.0f; };
+#else
+ float x, y, z;
+ CVector Get(void) const { return CVector(x, y, z); };
+ void Set(float x, float y, float z) { this->x = x; this->y = y; this->z = z; };
+#endif
+};
+
struct CSphere
{
CVector center;
@@ -63,7 +76,7 @@ struct CColTriangle
uint16 c;
uint8 surface;
- void Set(const CVector *v, int a, int b, int c, uint8 surf, uint8 piece);
+ void Set(const CompressedVector *v, int a, int b, int c, uint8 surf, uint8 piece);
};
struct CColTrianglePlane
@@ -72,7 +85,8 @@ struct CColTrianglePlane
float dist;
uint8 dir;
- void Set(const CVector *v, CColTriangle &tri);
+ void Set(const CVector &va, const CVector &vb, const CVector &vc);
+ void Set(const CompressedVector *v, CColTriangle &tri) { Set(v[tri.a].Get(), v[tri.b].Get(), v[tri.c].Get()); }
void GetNormal(CVector &n) const { n = normal; }
float GetNormalX() const { return normal.x; }
float GetNormalY() const { return normal.y; }
@@ -116,7 +130,7 @@ struct CColModel
CColSphere *spheres;
CColLine *lines;
CColBox *boxes;
- CVector *vertices;
+ CompressedVector *vertices;
CColTriangle *triangles;
CColTrianglePlane *trianglePlanes;
@@ -148,24 +162,25 @@ public:
static void DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel, int32 id);
static void CalculateTrianglePlanes(CColModel *model);
+ static void RemoveTrianglePlanes(CColModel *model);
// all these return true if there's a collision
static bool TestSphereSphere(const CSphere &s1, const CSphere &s2);
static bool TestSphereBox(const CSphere &sph, const CBox &box);
static bool TestLineBox(const CColLine &line, const CBox &box);
static bool TestVerticalLineBox(const CColLine &line, const CBox &box);
- static bool TestLineTriangle(const CColLine &line, const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
+ static bool TestLineTriangle(const CColLine &line, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
static bool TestLineSphere(const CColLine &line, const CColSphere &sph);
- static bool TestSphereTriangle(const CColSphere &sphere, const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
+ static bool TestSphereTriangle(const CColSphere &sphere, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
static bool TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, bool ignoreSeeThrough, bool ignoreShootThrough);
static bool ProcessSphereSphere(const CColSphere &s1, const CColSphere &s2, CColPoint &point, float &mindistsq);
static bool ProcessSphereBox(const CColSphere &sph, const CColBox &box, CColPoint &point, float &mindistsq);
static bool ProcessLineBox(const CColLine &line, const CColBox &box, CColPoint &point, float &mindist);
- static bool ProcessVerticalLineTriangle(const CColLine &line, const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist, CStoredCollPoly *poly);
- static bool ProcessLineTriangle(const CColLine &line , const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist);
+ static bool ProcessVerticalLineTriangle(const CColLine &line, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist, CStoredCollPoly *poly);
+ static bool ProcessLineTriangle(const CColLine &line , const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist, CStoredCollPoly *poly = nil);
static bool ProcessLineSphere(const CColLine &line, const CColSphere &sphere, CColPoint &point, float &mindist);
- static bool ProcessSphereTriangle(const CColSphere &sph, const CVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindistsq);
+ static bool ProcessSphereTriangle(const CColSphere &sph, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindistsq);
static bool ProcessLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough, bool ignoreShootThrough);
static bool ProcessVerticalLine(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough, bool ignoreShootThrough, CStoredCollPoly *poly);
static int32 ProcessColModels(const CMatrix &matrixA, CColModel &modelA, const CMatrix &matrixB, CColModel &modelB, CColPoint *spherepoints, CColPoint *linepoints, float *linedists);
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index c3e4e872..d194cebb 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -131,6 +131,7 @@ void CControllerConfigManager::SaveSettings(int32 file)
void CControllerConfigManager::LoadSettings(int32 file)
{
bool bValid = true;
+ int nVersion = 0;
if (file)
{
@@ -139,11 +140,13 @@ void CControllerConfigManager::LoadSettings(int32 file)
if (!strncmp(buff, TopLineEmptyFile, sizeof(TopLineEmptyFile)-1))
bValid = false;
- else
+ else {
CFileMgr::Seek(file, 0, 0);
+ CFileMgr::Read(file, (char*)&nVersion, sizeof(nVersion));
+ }
}
- if (bValid)
+ if (bValid && nVersion >= 3)
{
ControlsManager.MakeControllerActionsBlank();
@@ -202,6 +205,8 @@ void CControllerConfigManager::InitDefaultControlConfiguration()
SetControllerKeyAssociatedWithAction (GO_BACK, rsDOWN, KEYBOARD);
SetControllerKeyAssociatedWithAction (GO_BACK, 'S', OPTIONAL_EXTRA);
+
+ SetControllerKeyAssociatedWithAction (NETWORK_TALK, 'T', KEYBOARD);
SetControllerKeyAssociatedWithAction (PED_LOOKBEHIND, rsPADEND, KEYBOARD);
SetControllerKeyAssociatedWithAction (PED_LOOKBEHIND, rsCAPSLK, OPTIONAL_EXTRA);
@@ -436,6 +441,7 @@ void CControllerConfigManager::InitialiseControllerActionNameArray()
SETACTIONNAME(PED_SPRINT);
SETACTIONNAME(PED_CYCLE_TARGET_LEFT);
SETACTIONNAME(PED_CYCLE_TARGET_RIGHT);
+ SETACTIONNAME(PED_LOCK_TARGET); // duplicate
SETACTIONNAME(PED_CENTER_CAMERA_BEHIND_PLAYER);
SETACTIONNAME(VEHICLE_LOOKBEHIND);
SETACTIONNAME(PED_DUCK);
@@ -1808,23 +1814,23 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
{
switch (action)
{
- case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
case PED_FIREWEAPON:
case GO_LEFT:
case GO_RIGHT:
+ case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
case NETWORK_TALK:
- case SWITCH_DEBUG_CAM_ON:
case TOGGLE_DPAD:
+ case SWITCH_DEBUG_CAM_ON:
case TAKE_SCREEN_SHOT:
case SHOW_MOUSE_POINTER_TOGGLE:
return ACTIONTYPE_COMMON;
break;
- case PED_LOOKBEHIND:
- case PED_CYCLE_WEAPON_LEFT:
case PED_CYCLE_WEAPON_RIGHT:
+ case PED_CYCLE_WEAPON_LEFT:
case PED_JUMPING:
case PED_SPRINT:
+ case PED_LOOKBEHIND:
case PED_DUCK:
case PED_ANSWER_PHONE:
case PED_CYCLE_TARGET_LEFT:
@@ -1853,13 +1859,13 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
return ACTIONTYPE_VEHICLE_3RDPERSON;
break;
- case PED_LOCK_TARGET:
case GO_FORWARD:
case GO_BACK:
case PED_1RST_PERSON_LOOK_LEFT:
case PED_1RST_PERSON_LOOK_RIGHT:
- case PED_1RST_PERSON_LOOK_DOWN:
+ case PED_LOCK_TARGET:
case PED_1RST_PERSON_LOOK_UP:
+ case PED_1RST_PERSON_LOOK_DOWN:
return ACTIONTYPE_1RST3RDPERSON;
break;
diff --git a/src/core/ControllerConfig.h b/src/core/ControllerConfig.h
index 5f0b6862..05c37c22 100644
--- a/src/core/ControllerConfig.h
+++ b/src/core/ControllerConfig.h
@@ -61,6 +61,7 @@ enum e_ControllerAction
SWITCH_DEBUG_CAM_ON,
TAKE_SCREEN_SHOT,
SHOW_MOUSE_POINTER_TOGGLE,
+ UNKNOWN_ACTION,
MAX_CONTROLLERACTIONS,
};
diff --git a/src/core/Directory.cpp b/src/core/Directory.cpp
index cc4d65d8..05344065 100644
--- a/src/core/Directory.cpp
+++ b/src/core/Directory.cpp
@@ -30,7 +30,8 @@ CDirectory::ReadDirFile(const char *filename)
bool
CDirectory::WriteDirFile(const char *filename)
{
- int fd, n;
+ int fd;
+ size_t n;
fd = CFileMgr::OpenFileForWriting(filename);
n = CFileMgr::Write(fd, (char*)entries, numEntries*sizeof(DirectoryInfo));
CFileMgr::CloseFile(fd);
diff --git a/src/core/EventList.cpp b/src/core/EventList.cpp
index 4fab29bc..e5f264c7 100644
--- a/src/core/EventList.cpp
+++ b/src/core/EventList.cpp
@@ -189,7 +189,7 @@ CEventList::FindClosestEvent(eEventType type, CVector posn, int32 *event)
// --MIAMI: Done
void
-CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCare)
+CEventList::ReportCrimeForEvent(eEventType type, size_t crimeId, bool copsDontCare)
{
eCrimeType crime;
switch(type){
@@ -227,10 +227,10 @@ CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCar
if(CWanted::WorkOutPolicePresence(playerCoors, 14.0f) != 0 ||
CGame::germanGame && (crime == CRIME_SHOOT_PED || crime == CRIME_SHOOT_COP || crime == CRIME_COP_BURNED || crime == CRIME_VEHICLE_BURNED)){
- FindPlayerPed()->m_pWanted->RegisterCrime_Immediately(crime, playerPedCoors, crimeId, copsDontCare);
+ FindPlayerPed()->m_pWanted->RegisterCrime_Immediately(crime, playerPedCoors, (uint32)crimeId, copsDontCare);
FindPlayerPed()->m_pWanted->SetWantedLevelNoDrop(1);
}else
- FindPlayerPed()->m_pWanted->RegisterCrime(crime, playerPedCoors, crimeId, copsDontCare);
+ FindPlayerPed()->m_pWanted->RegisterCrime(crime, playerPedCoors, (uint32)crimeId, copsDontCare);
if(type == EVENT_ASSAULT_POLICE)
FindPlayerPed()->SetWantedLevelNoDrop(1);
diff --git a/src/core/EventList.h b/src/core/EventList.h
index f2c3d7a8..0531aed7 100644
--- a/src/core/EventList.h
+++ b/src/core/EventList.h
@@ -61,7 +61,7 @@ public:
static bool GetEvent(eEventType type, int32 *event);
static void ClearEvent(int32 event);
static bool FindClosestEvent(eEventType type, CVector posn, int32 *event);
- static void ReportCrimeForEvent(eEventType type, int32, bool);
+ static void ReportCrimeForEvent(eEventType type, size_t, bool);
};
extern CEvent gaEvent[NUMEVENTS]; \ No newline at end of file
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index 08126081..635192ea 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -106,7 +106,9 @@ CFileLoader::LoadLevel(const char *filename)
LoadingScreenLoadingFile(line + 4);
LoadScene(line + 4);
}else if(strncmp(line, "SPLASH", 6) == 0){
+#ifndef DISABLE_LOADING_SCREEN
LoadSplash(GetRandomSplashScreen());
+#endif
}else if(strncmp(line, "CDIMAGE", 7) == 0){
CdStreamAddImage(line + 8);
}
@@ -324,13 +326,13 @@ CFileLoader::LoadCollisionModel(uint8 *buf, CColModel &model, char *modelname)
int32 numVertices = *(int16*)buf;
buf += 4;
if(numVertices > 0){
- model.vertices = (CVector*)RwMalloc(numVertices*sizeof(CVector));
+ model.vertices = (CompressedVector*)RwMalloc(numVertices*sizeof(CompressedVector));
for(i = 0; i < numVertices; i++){
- model.vertices[i] = *(CVector*)buf;
+ model.vertices[i].Set(*(float*)buf, *(float*)(buf+4), *(float*)(buf+8));
#if 0
- if(Abs(model.vertices[i].x) >= 256.0f ||
- Abs(model.vertices[i].y) >= 256.0f ||
- Abs(model.vertices[i].z) >= 256.0f)
+ if(Abs(*(float*)buf) >= 256.0f ||
+ Abs(*(float*)(buf+4)) >= 256.0f ||
+ Abs(*(float*)(buf+8)) >= 256.0f)
printf("%s:Collision volume too big\n", modelname);
#endif
buf += 12;
@@ -393,6 +395,16 @@ CFileLoader::FindRelatedModelInfoCB(RpAtomic *atomic, void *data)
return atomic;
}
+#ifdef LIBRW
+void
+InitClump(RpClump *clump)
+{
+ RpClumpForAllAtomics(clump, ConvertPlatformAtomic, nil);
+}
+#else
+#define InitClump(clump)
+#endif
+
void
CFileLoader::LoadModelFile(const char *filename)
{
@@ -404,6 +416,7 @@ CFileLoader::LoadModelFile(const char *filename)
if(RwStreamFindChunk(stream, rwID_CLUMP, nil, nil)){
clump = RpClumpStreamRead(stream);
if(clump){
+ InitClump(clump);
RpClumpForAllAtomics(clump, FindRelatedModelInfoCB, clump);
RpClumpDestroy(clump);
}
@@ -429,6 +442,7 @@ CFileLoader::LoadClumpFile(const char *filename)
GetNameAndLOD(nodename, name, &n);
mi = (CClumpModelInfo*)CModelInfo::GetModelInfo(name, nil);
if(mi){
+ InitClump(clump);
assert(mi->IsClump());
mi->SetClump(clump);
}else
@@ -449,6 +463,7 @@ CFileLoader::LoadClumpFile(RwStream *stream, uint32 id)
clump = RpClumpStreamRead(stream);
if(clump == nil)
return false;
+ InitClump(clump);
mi = (CClumpModelInfo*)CModelInfo::GetModelInfo(id);
mi->SetClump(clump);
return true;
@@ -476,6 +491,7 @@ CFileLoader::FinishLoadClumpFile(RwStream *stream, uint32 id)
clump = RpClumpGtaStreamRead2(stream);
if(clump){
+ InitClump(clump);
mi = (CClumpModelInfo*)CModelInfo::GetModelInfo(id);
mi->SetClump(clump);
return true;
@@ -496,6 +512,7 @@ CFileLoader::LoadAtomicFile(RwStream *stream, uint32 id)
clump = RpClumpStreamRead(stream);
if(clump == nil)
return false;
+ InitClump(clump);
gpRelatedModelInfo = (CSimpleModelInfo*)CModelInfo::GetModelInfo(id);
RpClumpForAllAtomics(clump, SetRelatedModelInfoCB, clump);
RpClumpDestroy(clump);
@@ -531,6 +548,8 @@ CFileLoader::LoadAtomicFile2Return(const char *filename)
stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, filename);
if(RwStreamFindChunk(stream, rwID_CLUMP, nil, nil))
clump = RpClumpStreamRead(stream);
+ if(clump)
+ InitClump(clump);
RwStreamClose(stream, nil);
return clump;
}
@@ -1260,7 +1279,7 @@ CFileLoader::LoadOcclusionVolume(const char *line)
&x, &y, &z,
&width, &length, &height,
&angle);
- COcclusion::AddOne(x, y, z, width, length, z + height/2.0f, angle);
+ COcclusion::AddOne(x, y, z + height/2.0f, width, length, height, angle);
}
diff --git a/src/core/FileMgr.cpp b/src/core/FileMgr.cpp
index 1939c861..4477a190 100644
--- a/src/core/FileMgr.cpp
+++ b/src/core/FileMgr.cpp
@@ -4,6 +4,7 @@
#include <direct.h>
#endif
#include "common.h"
+#include "crossplatform.h"
#include "FileMgr.h"
@@ -31,19 +32,16 @@ static myFILE myfiles[NUMFILES];
#include <dirent.h>
#include <errno.h>
#include <unistd.h>
-#include "crossplatform.h"
#define _getcwd getcwd
// Case-insensitivity on linux (from https://github.com/OneSadCookie/fcaseopen)
void mychdir(char const *path)
{
- char *r = (char*)alloca(strlen(path) + 2);
- if (casepath(path, r))
- {
+ char* r = casepath(path, false);
+ if (r) {
chdir(r);
- }
- else
- {
+ free(r);
+ } else {
errno = ENOENT;
}
}
@@ -73,30 +71,7 @@ found:
*p++ = 'b';
*p = '\0';
-#if !defined(_WIN32)
- char *newPath = strdup(filename);
- // Normally casepath() fixes backslashes, but if the mode is sth other than r/rb it will create new file with backslashes on linux, so fix backslashes here
- char *nextBs;
- while(nextBs = strstr(newPath, "\\")){
- *nextBs = '/';
- }
-#else
- const char *newPath = filename;
-#endif
-
- myfiles[fd].file = fopen(newPath, realmode);
-// Be case-insensitive on linux (from https://github.com/OneSadCookie/fcaseopen/)
-#if !defined(_WIN32)
- if (!myfiles[fd].file) {
- char *r = (char*)alloca(strlen(newPath) + 2);
- if (casepath(newPath, r))
- {
- myfiles[fd].file = fopen(r, realmode);
- }
- }
-
- free(newPath);
-#endif
+ myfiles[fd].file = fcaseopen(filename, realmode);
if(myfiles[fd].file == nil)
return 0;
return fd;
@@ -163,7 +138,7 @@ myfgets(char *buf, int len, int fd)
return buf;
}
-static int
+static size_t
myfread(void *buf, size_t elt, size_t n, int fd)
{
if(myfiles[fd].isText){
@@ -184,7 +159,7 @@ myfread(void *buf, size_t elt, size_t n, int fd)
return fread(buf, elt, n, myfiles[fd].file);
}
-static int
+static size_t
myfwrite(void *buf, size_t elt, size_t n, int fd)
{
if(myfiles[fd].isText){
@@ -265,11 +240,11 @@ CFileMgr::SetDirMyDocuments(void)
mychdir(_psGetUserFilesFolder());
}
-int
+size_t
CFileMgr::LoadFile(const char *file, uint8 *buf, int unused, const char *mode)
{
int fd;
- int n, len;
+ size_t n, len;
fd = myfopen(file, mode);
if(fd == 0)
@@ -298,14 +273,14 @@ CFileMgr::OpenFileForWriting(const char *file)
return OpenFile(file, "wb");
}
-int
-CFileMgr::Read(int fd, const char *buf, int len)
+size_t
+CFileMgr::Read(int fd, const char *buf, size_t len)
{
return myfread((void*)buf, 1, len, fd);
}
-int
-CFileMgr::Write(int fd, const char *buf, int len)
+size_t
+CFileMgr::Write(int fd, const char *buf, size_t len)
{
return myfwrite((void*)buf, 1, len, fd);
}
diff --git a/src/core/FileMgr.h b/src/core/FileMgr.h
index 1d0faf50..51e30694 100644
--- a/src/core/FileMgr.h
+++ b/src/core/FileMgr.h
@@ -9,12 +9,12 @@ public:
static void ChangeDir(const char *dir);
static void SetDir(const char *dir);
static void SetDirMyDocuments(void);
- static int LoadFile(const char *file, uint8 *buf, int unused, const char *mode);
+ static size_t LoadFile(const char *file, uint8 *buf, int unused, const char *mode);
static int OpenFile(const char *file, const char *mode);
static int OpenFile(const char *file) { return OpenFile(file, "rb"); }
static int OpenFileForWriting(const char *file);
- static int Read(int fd, const char *buf, int len);
- static int Write(int fd, const char *buf, int len);
+ static size_t Read(int fd, const char *buf, size_t len);
+ static size_t Write(int fd, const char *buf, size_t len);
static bool Seek(int fd, int offset, int whence);
static bool ReadLine(int fd, char *buf, int len);
static int CloseFile(int fd);
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index 19e8e8f3..06744ac2 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -24,7 +24,6 @@
#include "GenericGameStorage.h"
#include "Script.h"
#include "Camera.h"
-#include "MenuScreens.h"
#include "ControllerConfig.h"
#include "Vehicle.h"
#include "MBlur.h"
@@ -38,8 +37,8 @@
#include "Messages.h"
#include "FileLoader.h"
-// TODO(Miami): This is -3 on VC but still -1 on AudioManager?!? What the hell?
-#define INVALID_AUDIO_PROVIDER -1
+// TODO(Miami): Remove that!! That was my map implementation for III, instead use MAP_ENHACEMENTS on some places
+#define CUSTOM_MAP
// Similar story to Hud.cpp:
// Game has colors inlined in code.
@@ -52,7 +51,7 @@ CRGBA HEADER_COLOR(255, 150, 255, 255);
CRGBA DARKMENUOPTION_COLOR(195, 90, 165, 255);
CRGBA SLIDERON_COLOR(97, 194, 247, 255);
CRGBA SLIDEROFF_COLOR(27, 89, 130, 255);
-CRGBA MAPINFOBOX_COLOR(255, 150, 225, 150);
+CRGBA LIST_BACKGROUND_COLOR(49, 101, 148, 255);
#define TIDY_UP_PBP // ProcessButtonPresses
#define MAX_VISIBLE_LIST_ROW 30
@@ -66,11 +65,7 @@ CRGBA MAPINFOBOX_COLOR(255, 150, 225, 150);
#define FEET_IN_METER 3.33f
#endif
-#ifdef SCROLLABLE_STATS_PAGE
-#define isPlainTextScreen(screen) (screen == MENUPAGE_BRIEFS)
-#else
#define isPlainTextScreen(screen) (screen == MENUPAGE_BRIEFS || screen == MENUPAGE_STATS)
-#endif
#ifdef TRIANGLE_BACK_BUTTON
#define GetBackJustUp GetTriangleJustUp
@@ -95,7 +90,9 @@ int curBottomBarOption = -1;
int hoveredBottomBarOption = -1;
#endif
-uint8 CMenuManager::m_PrefsStereoMono; // unused except restore settings
+#ifdef CUTSCENE_BORDERS_SWITCH
+bool CMenuManager::m_PrefsCutsceneBorders = true;
+#endif
// Originally that was PS2 option color, they forget it here and used in PrintBriefs once(but didn't use the output anyway)
#ifdef PS2_LIKE_MENU
@@ -117,9 +114,10 @@ MenuTrapezoid menuBg(CGeneral::GetRandomNumber() % 40 + 65, CGeneral::GetRandomN
MenuTrapezoid menuOptionHighlight(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
-// TODO(Miami): TEMPORARY
+#ifdef CUSTOM_MAP
bool bMapLoaded = false;
bool bMapMouseShownOnce = false;
+#endif
#ifndef MASTER
bool CMenuManager::m_PrefsMarketing = false;
@@ -215,75 +213,6 @@ ScaleAndCenterX(float x)
// --- Functions not in the game/inlined starts
-bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
-void DoRWStuffEndOfFrame(void);
-
-#ifdef PS2_LIKE_MENU
-void
-CMenuManager::SwitchToNewScreen(int8 screen)
-{
- if (reverseAlpha) {
- m_nPrevScreen = m_nCurrScreen;
- m_nCurrScreen = pendingScreen;
- m_nCurrOption = pendingOption;
- reverseAlpha = false;
- if (updateDelay)
- m_LastScreenSwitch = CTimer::GetTimeInMillisecondsPauseMode();
- }
- if (withReverseAlpha) {
- pendingOption = option;
- pendingScreen = screen;
- reverseAlpha = true;
- } else {
- m_nPrevScreen = m_nCurrScreen;
- m_nCurrScreen = screen;
- m_nCurrOption = option;
- if (updateDelay)
- m_LastScreenSwitch = CTimer::GetTimeInMillisecondsPauseMode();
- }
- m_nMenuFadeAlpha = 255;
-}
-#else
-
-// --MIAMI: Done except using VC's gMenuPages
-void
-CMenuManager::SwitchToNewScreen(int8 screen)
-{
- bMenuChangeOngoing = true;
- DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
- DrawBackground(true);
- DoRWStuffEndOfFrame();
- DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
- DrawBackground(true);
- DoRWStuffEndOfFrame();
- m_nPrevScreen = m_nCurrScreen;
- m_ShowEmptyBindingError = false;
- ResetHelperText();
-
- ThingsToDoBeforeLeavingPage();
-
- if (screen == -2) {
- int oldScreen = aScreens[m_nCurrScreen].m_PreviousPage;
- int oldOption = (m_nCurrScreen == MENUPAGE_NEW_GAME ? 0 : (m_nCurrScreen == MENUPAGE_OPTIONS ? 1 : (m_nCurrScreen == MENUPAGE_EXIT ? 2 : aScreens[m_nCurrScreen].m_ParentEntry)));
-
- m_nCurrOption = oldOption;
- m_nCurrScreen = oldScreen;
- } else if (screen == 0) {
- m_nCurrScreen = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu;
- m_nCurrOption = 0;
- } else {
- m_nCurrOption = 0;
- m_nCurrScreen = screen;
- }
-
- if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT)
- m_nCurrOption = 8;
- m_nMenuFadeAlpha = 0;
- m_nOptionHighlightTransitionBlend = 0;
- m_LastScreenSwitch = CTimer::GetTimeInMillisecondsPauseMode();
-}
-#endif
-
inline void
CMenuManager::ScrollUpListByOne()
{
@@ -350,14 +279,13 @@ CMenuManager::PageDownList(bool playSoundOnSuccess)
}
}
-// TODO(Miami)
inline void
CMenuManager::ThingsToDoBeforeLeavingPage()
{
if ((m_nCurrScreen == MENUPAGE_SKIN_SELECT) && strcmp(m_aSkinName, m_PrefsSkinFile) != 0) {
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
} else if (m_nCurrScreen == MENUPAGE_SOUND_SETTINGS) {
- if (m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER)
+ if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
m_nPrefsAudio3DProviderIndex = DMAudio.GetCurrent3DProviderIndex();
#ifdef TIDY_UP_PBP
DMAudio.StopFrontEndTrack();
@@ -374,13 +302,123 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
CPlayerSkin::EndFrontendSkinEdit();
}
- if ((m_nCurrScreen == MENUPAGE_SKIN_SELECT) || (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS)) {
- m_nTotalListRow = 0;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ for (int i = 0; i < numCustomFrontendOptions; i++) {
+ FrontendOption& option = customFrontendOptions[i];
+ if (option.type != FEOPTION_REDIRECT && option.type != FEOPTION_GOBACK && m_nCurrScreen == option.screen) {
+ if (option.returnPrevPageFunc)
+ option.returnPrevPageFunc();
+
+ if (m_nCurrOption == option.screenOptionOrder && option.type == FEOPTION_DYNAMIC)
+ option.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+
+ if (option.onlyApplyOnEnter)
+ option.displayedValue = *option.value;
+ }
+ }
+#endif
+}
+
+int8
+CMenuManager::GetPreviousPageOption()
+{
+#ifndef CUSTOM_FRONTEND_OPTIONS
+ return (!m_bGameNotLoaded ? aScreens[m_nCurrScreen].m_ParentEntry :
+ (m_nCurrScreen == MENUPAGE_NEW_GAME ? 0 : (m_nCurrScreen == MENUPAGE_OPTIONS ? 1 : (m_nCurrScreen == MENUPAGE_EXIT ? 2 : aScreens[m_nCurrScreen].m_ParentEntry))));
+#else
+ int8 prevPage = aScreens[m_nCurrScreen].m_PreviousPage;
+
+ if (prevPage == -1) // Game also does same
+ return 0;
+
+ prevPage = prevPage == MENUPAGE_NONE ? (!m_bGameNotLoaded ? MENUPAGE_PAUSE_MENU : MENUPAGE_START_MENU) : prevPage;
+
+ for (int i = 0; i < NUM_MENUROWS; i++) {
+ if (aScreens[prevPage].m_aEntries[i].m_TargetMenu == m_nCurrScreen) {
+ return i;
+ }
}
+
+ // Couldn't find current screen option on previous page, use default behaviour (maybe save-related screen?)
+ return (!m_bGameNotLoaded ? aScreens[m_nCurrScreen].m_ParentEntry :
+ (m_nCurrScreen == MENUPAGE_NEW_GAME ? 0 : (m_nCurrScreen == MENUPAGE_OPTIONS ? 1 : (m_nCurrScreen == MENUPAGE_EXIT ? 2 : aScreens[m_nCurrScreen].m_ParentEntry))));
+#endif
}
// ------ Functions not in the game/inlined ends
+bool DoRWStuffStartOfFrame(int16 TopRed, int16 TopGreen, int16 TopBlue, int16 BottomRed, int16 BottomGreen, int16 BottomBlue, int16 Alpha);
+void DoRWStuffEndOfFrame(void);
+
+#ifdef PS2_LIKE_MENU
+void
+CMenuManager::SwitchToNewScreen(int8 screen)
+{
+ if (reverseAlpha) {
+ m_nPrevScreen = m_nCurrScreen;
+ m_nCurrScreen = pendingScreen;
+ m_nCurrOption = pendingOption;
+ reverseAlpha = false;
+ if (updateDelay)
+ m_LastScreenSwitch = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+ if (withReverseAlpha) {
+ pendingOption = option;
+ pendingScreen = screen;
+ reverseAlpha = true;
+ } else {
+ m_nPrevScreen = m_nCurrScreen;
+ m_nCurrScreen = screen;
+ m_nCurrOption = option;
+ if (updateDelay)
+ m_LastScreenSwitch = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+ m_nMenuFadeAlpha = 255;
+}
+#else
+
+// --MIAMI: Done
+void
+CMenuManager::SwitchToNewScreen(int8 screen)
+{
+ bMenuChangeOngoing = true;
+ DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
+ DrawBackground(true);
+ DoRWStuffEndOfFrame();
+ DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
+ DrawBackground(true);
+ DoRWStuffEndOfFrame();
+ m_nPrevScreen = m_nCurrScreen;
+ m_ShowEmptyBindingError = false;
+ ResetHelperText();
+
+ ThingsToDoBeforeLeavingPage();
+
+ if (screen == -2) {
+ int oldScreen = aScreens[m_nCurrScreen].m_PreviousPage;
+ int oldOption = GetPreviousPageOption();
+
+ m_nCurrOption = oldOption;
+ m_nCurrScreen = oldScreen;
+ } else if (screen == 0) {
+ m_nCurrScreen = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu;
+ m_nCurrOption = 0;
+ } else {
+ m_nCurrOption = 0;
+ m_nCurrScreen = screen;
+ }
+
+ if (m_nPrevScreen == MENUPAGE_SKIN_SELECT || m_nPrevScreen == MENUPAGE_KEYBOARD_CONTROLS)
+ m_nTotalListRow = 0;
+
+ if (m_nCurrScreen == MENUPAGE_CHOOSE_SAVE_SLOT)
+ m_nCurrOption = 8;
+ m_nMenuFadeAlpha = 0;
+ m_nOptionHighlightTransitionBlend = 0;
+ m_LastScreenSwitch = CTimer::GetTimeInMillisecondsPauseMode();
+}
+#endif
+
CMenuManager::CMenuManager()
{
m_StatsScrollSpeed = 150.0f;
@@ -388,9 +426,9 @@ CMenuManager::CMenuManager()
m_PrefsSfxVolume = 49;
m_PrefsMusicVolume = 49;
m_PrefsRadioStation = 0;
- field_2C = 1;
+ m_PrefsStereoMono = 1;
m_PrefsBrightness = 256;
- m_PrefsLOD = 1.2f;
+ m_PrefsLOD = CRenderer::ms_lodDistScale;
m_KeyPressedCode = -1;
m_bFrontEnd_ReloadObrTxtGxt = false;
m_PrefsMP3BoostVolume = 0;
@@ -423,7 +461,7 @@ CMenuManager::CMenuManager()
m_nScrollbarTopMargin = 0.0f;
m_nSelectedListRow = 0;
m_nSkinsTotal = 0;
- m_nPrefsAudio3DProviderIndex = -99;
+ m_nPrefsAudio3DProviderIndex = AUDIO_PROVIDER_NOT_DETERMINED;
m_bGameNotLoaded = true;
m_nMousePosX = m_nMouseTempPosX;
m_nMousePosY = m_nMouseTempPosY;
@@ -464,7 +502,7 @@ CMenuManager::Initialise(void)
DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
DoRWStuffEndOfFrame();
m_AllowNavigation = false;
- m_menuTransitionProgress = -50;
+ m_menuTransitionProgress = -50; // to start from black
m_nMenuFadeAlpha = 0;
m_nCurrOption = 0;
m_nOptionHighlightTransitionBlend = 0;
@@ -631,31 +669,30 @@ CMenuManager::CheckSliderMovement(int value)
{
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
case MENUACTION_BRIGHTNESS:
- m_PrefsBrightness += value * (512/16);
- m_PrefsBrightness = clamp(m_PrefsBrightness, 0, 511);
+ m_PrefsBrightness += value * 24.19f;
+ m_PrefsBrightness = clamp(m_PrefsBrightness, 0, 384);
break;
case MENUACTION_DRAWDIST:
if(value > 0)
- m_PrefsLOD += ((1.8f - 0.8f) / 16.0f);
+ m_PrefsLOD += ((1.8f - 0.925f) / 16.0f);
else
- m_PrefsLOD -= ((1.8f - 0.8f) / 16.0f);
- m_PrefsLOD = clamp(m_PrefsLOD, 0.8f, 1.8f);
+ m_PrefsLOD -= ((1.8f - 0.925f) / 16.0f);
+ m_PrefsLOD = clamp(m_PrefsLOD, 0.925f, 1.8f);
CRenderer::ms_lodDistScale = m_PrefsLOD;
break;
case MENUACTION_MUSICVOLUME:
- m_PrefsMusicVolume += value * (128/16);
- m_PrefsMusicVolume = clamp(m_PrefsMusicVolume, 0, 127);
+ m_PrefsMusicVolume += value * (128/32);
+ m_PrefsMusicVolume = clamp(m_PrefsMusicVolume, 0, 65);
DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume);
break;
case MENUACTION_SFXVOLUME:
- m_PrefsSfxVolume += value * (128/16);
- m_PrefsSfxVolume = clamp(m_PrefsSfxVolume, 0, 127);
+ m_PrefsSfxVolume += value * (128/32);
+ m_PrefsSfxVolume = clamp(m_PrefsSfxVolume, 0, 65);
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
break;
case MENUACTION_MOUSESENS:
TheCamera.m_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // ???
TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f);
- TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl;
break;
default:
return;
@@ -663,12 +700,27 @@ CMenuManager::CheckSliderMovement(int value)
SaveSettings();
}
+// --MIAMI: Done
void
-CMenuManager::DisplayHelperText()
+CMenuManager::DisplayHelperText(char *text)
{
+ if (m_nMenuFadeAlpha != 255)
+ return;
+
// there was a unused static bool
static PauseModeTime LastFlash = 0;
- int32 alpha;
+ int32 alpha = 255;
+
+ CFont::SetRightJustifyOn();
+ CFont::SetScale(SCREEN_SCALE_X(SMALLESTTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLESTTEXT_Y_SCALE));
+ CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
+ CFont::SetDropShadowPosition(0);
+
+ if (text) {
+ CFont::SetColor(CRGBA(255, 255, 255, 255));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f), TheText.Get(text));
+ return;
+ }
if (m_nHelperTextMsgId != 0 && m_nHelperTextMsgId != 1) {
if (CTimer::GetTimeInMillisecondsPauseMode() - LastFlash > 10) {
@@ -682,41 +734,67 @@ CMenuManager::DisplayHelperText()
alpha = m_nHelperTextAlpha > 255 ? 255 : m_nHelperTextAlpha;
}
- CFont::SetCentreOn();
- CFont::SetScale(SCREEN_SCALE_X(SMALLESTTEXT_X_SCALE), SCREEN_SCALE_Y(SMALLESTTEXT_Y_SCALE));
- CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
-
+ CFont::SetColor(CRGBA(255, 255, 255, alpha));
// TODO: name this cases?
switch (m_nHelperTextMsgId) {
- case 0:
- {
- int action = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
- if (action != MENUACTION_CHANGEMENU && action != MENUACTION_KEYBOARDCTRLS && action != MENUACTION_RESTOREDEF) {
- CFont::SetColor(CRGBA(255, 255, 255, 255));
- CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_MIG"));
- }
- break;
- }
case 1:
- CFont::SetColor(CRGBA(255, 255, 255, 255));
- CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_APP"));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f), TheText.Get("FET_APP"));
break;
case 2:
- CFont::SetColor(CRGBA(255, 255, 255, alpha));
- CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_HRD"));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f), TheText.Get("FET_HRD"));
break;
case 3:
- CFont::SetColor(CRGBA(255, 255, 255, alpha));
- CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_RSO"));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f), TheText.Get("FET_RSO"));
break;
case 4:
- CFont::SetColor(CRGBA(255, 255, 255, alpha));
- CFont::PrintString(MENU_X_LEFT_ALIGNED(320.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), TheText.Get("FET_RSC"));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f), TheText.Get("FET_STS"));
+ break;
+ case 5:
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f), TheText.Get("FET_RSC"));
break;
default:
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NO)
+ return;
+
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_MUSICVOLUME ||
+ aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_SFXVOLUME) {
+
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f),
+ m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER ? TheText.Get("FEH_NA") : TheText.Get("FET_MIG"));
+ return;
+ }
+
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_KEYBOARDCTRLS)
+ return;
+
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_SCREENRES) {
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f),
+ m_bGameNotLoaded ? TheText.Get("FET_MIG") : TheText.Get("FEH_NA"));
+ return;
+ }
+
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_AUDIOHW ||
+ aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_SPEAKERCONF) {
+
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f),
+ m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER ? TheText.Get("FEH_NA") : TheText.Get("FET_MIG"));
+ return;
+ }
+
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_RESTOREDEF)
+ return;
+
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_MP3VOLUMEBOOST) {
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f),
+ m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER ? TheText.Get("FEH_NA") : TheText.Get("FET_MIG"));
+ return;
+ }
+
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(10.f), SCREEN_SCALE_FROM_BOTTOM(18.f),
+ m_nCurrScreen != MENUPAGE_STATS ? TheText.Get("FET_MIG") : TheText.Get("FEH_SSA"));
+
break;
}
- CFont::SetRightJustifyOff();
}
// --MIAMI: Done
@@ -755,10 +833,10 @@ CMenuManager::DisplaySlider(float x, float y, float mostLeftBarSize, float mostR
void
CMenuManager::DoSettingsBeforeStartingAGame()
{
- CCamera::m_bUseMouse3rdPerson = m_ControlMethod == CONTROL_STANDARD;
+#ifdef LEGACY_MENU_OPTIONS
if (m_PrefsVsyncDisp != m_PrefsVsync)
m_PrefsVsync = m_PrefsVsyncDisp;
-
+#endif
DMAudio.DestroyAllGameCreatedEntities();
DMAudio.Service();
m_bShutDownFrontEndRequested = true;
@@ -795,7 +873,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
CSprite2d::Draw2DPolygon(MENU_X_LEFT_ALIGNED(38.0f), MENU_Y(85.0f),
MENU_X_LEFT_ALIGNED(615.0f), MENU_Y(75.0f),
MENU_X_LEFT_ALIGNED(30.0f), MENU_Y(320.0f),
- MENU_X_LEFT_ALIGNED(605.0f), MENU_Y(330.0f), CRGBA(49, 101, 148, FadeIn(130)));
+ MENU_X_LEFT_ALIGNED(605.0f), MENU_Y(330.0f), CRGBA(LIST_BACKGROUND_COLOR.r, LIST_BACKGROUND_COLOR.g, LIST_BACKGROUND_COLOR.b, FadeIn(130)));
break;
/*
// TODO(Miami)
@@ -816,10 +894,10 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
PREPARE_MENU_HEADER
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X + 7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255)));
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
}
// Label
@@ -880,28 +958,6 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
wchar unicodeTemp[64];
char asciiTemp[32];
-#ifdef MENU_MAP
- if (m_nCurrScreen == MENUPAGE_MAP) {
- // Back button
- wchar *backTx = TheText.Get("FEDS_TB");
- CFont::SetDropShadowPosition(1);
- CFont::SetDropColor(CRGBA(0, 0, 0, 255));
- CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE));
- CFont::SetRightJustifyOff();
- CFont::SetCentreOn();
- CFont::PrintString(MENU_X(60.0f), SCREEN_SCALE_FROM_BOTTOM(120.0f), backTx);
- CFont::SetDropShadowPosition(0);
- if (!CheckHover(MENU_X(30.0f), MENU_X(30.0f) + CFont::GetStringWidth(backTx), SCREEN_SCALE_FROM_BOTTOM(125.0f), SCREEN_SCALE_FROM_BOTTOM(105.0f))) {
- m_nHoverOption = HOVEROPTION_NOT_HOVERING;
- m_nCurrOption = m_nPrevOption = 0;
- } else {
- m_nHoverOption = HOVEROPTION_RANDOM_ITEM;
- m_nCurrOption = m_nPrevOption = 1;
- }
- return;
- }
-#endif
-
bool weHaveLabel = aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL;
uint8 section = 0; // 0: highlight trapezoid 1: texts
@@ -962,7 +1018,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
leftText = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName);
}
- if (m_nPrefsAudio3DProviderIndex == INVALID_AUDIO_PROVIDER) {
+ if (m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER) {
if (strncmp(aScreens[m_nCurrScreen].m_aEntries[i].m_EntryName, "FEO_AUD", 8) == 0) {
CFont::SetColor(CRGBA(DARKMENUOPTION_COLOR.r, DARKMENUOPTION_COLOR.g, DARKMENUOPTION_COLOR.b, FadeIn(255)));
}
@@ -1028,7 +1084,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
case MENUACTION_MUSICVOLUME:
case MENUACTION_SFXVOLUME:
- if (m_nPrefsAudio3DProviderIndex == INVALID_AUDIO_PROVIDER)
+ if (m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER)
rightText = TheText.Get("FEA_NAH");
break;
@@ -1057,6 +1113,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
break;
case MENUACTION_HUD:
rightText = TheText.Get(m_PrefsShowHud ? "FEM_ON" : "FEM_OFF");
+ break;
#ifdef LEGACY_MENU_OPTIONS
case MENUACTION_SETDBGFLAG:
rightText = TheText.Get(CTheScripts::IsDebugOn() ? "FEM_ON" : "FEM_OFF");
@@ -1094,7 +1151,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
break;
#endif
case MENUACTION_AUDIOHW:
- if (m_nPrefsAudio3DProviderIndex == INVALID_AUDIO_PROVIDER)
+ if (m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER)
rightText = TheText.Get("FEA_NAH");
else if (m_nPrefsAudio3DProviderIndex == -1)
rightText = TheText.Get("FEA_ADP");
@@ -1112,7 +1169,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
}
break;
case MENUACTION_SPEAKERCONF: {
- if (m_nPrefsAudio3DProviderIndex == INVALID_AUDIO_PROVIDER)
+ if (m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER)
rightText = TheText.Get("FEA_NAH");
else {
switch (m_PrefsSpeakers) {
@@ -1154,22 +1211,52 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
rightText = TheText.Get("FEA_NM3");
}
break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case MENUACTION_TRIGGERFUNC:
+ FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
+ if (m_nCurrScreen == option.screen && i == option.screenOptionOrder) {
+ leftText = (wchar*)option.leftText;
+ if (option.type == FEOPTION_SELECT) {
+ if (option.displayedValue >= option.numRightTexts || option.displayedValue < 0)
+ option.displayedValue = 0;
+
+ rightText = (wchar*)option.rightTexts[option.displayedValue];
+
+ } else if (option.type == FEOPTION_DYNAMIC) {
+ if (option.drawFunc) {
+ bool isOptionDisabled = false;
+ rightText = option.drawFunc(&isOptionDisabled);
+ if (isOptionDisabled)
+ CFont::SetColor(CRGBA(DARKMENUOPTION_COLOR.r, DARKMENUOPTION_COLOR.g, DARKMENUOPTION_COLOR.b, FadeIn(255)));
+ }
+ }
+ } else {
+ debug("A- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, i, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu, option.screen, option.screenOptionOrder);
+ assert(0 && "Custom frontend options is borked");
+ }
+
+ break;
+#endif
}
// Highlight trapezoid
if (drawCurrScreen && i == m_nCurrOption && itemsAreSelectable && section == 0) {
int leftXMax, rightXMin;
- CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE));
+
+ // FIX: Let's don't scale those so GetStringWidth will give unscaled width, which will be handy to other calculations below that's done without scaling in mind.
+ // CFont::SetScale(MENU_X(BIGTEXT_X_SCALE), MENU_Y(BIGTEXT_Y_SCALE));
+ CFont::SetScale(BIGTEXT_X_SCALE, BIGTEXT_Y_SCALE);
+
wchar *curOptionName = TheText.Get(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName);
float curOptionWidth = CFont::GetStringWidth(curOptionName, true);
if (CFont::Details.centre) {
leftXMax = Max(0, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X - curOptionWidth / 2.f);
- rightXMin = Min(SCREEN_WIDTH, curOptionWidth / 2.f + aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X);
+ rightXMin = Min(DEFAULT_SCREEN_WIDTH, curOptionWidth / 2.f + aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X);
} else if (!CFont::Details.rightJustify) {
leftXMax = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X;
- rightXMin = Min(SCREEN_WIDTH, curOptionWidth + aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X);
+ rightXMin = Min(DEFAULT_SCREEN_WIDTH, curOptionWidth + aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X);
} else {
leftXMax = Max(0, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X - curOptionWidth);
rightXMin = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_X;
@@ -1283,7 +1370,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
}
if (m_nPrefsAudio3DProviderIndex != DMAudio.GetCurrent3DProviderIndex()) {
if (strcmp(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_EntryName, "FEA_3DH") != 0
- && m_nCurrScreen == MENUPAGE_SOUND_SETTINGS && m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER) {
+ && m_nCurrScreen == MENUPAGE_SOUND_SETTINGS && m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
m_nPrefsAudio3DProviderIndex = DMAudio.GetCurrent3DProviderIndex();
SetHelperText(3);
@@ -1304,6 +1391,24 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
}
}
#endif
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ static int lastOption = m_nCurrOption;
+
+ if (aScreens[m_nCurrScreen].m_aEntries[i].m_Action == MENUACTION_TRIGGERFUNC) {
+ FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[i].m_TargetMenu];
+ if (option.onlyApplyOnEnter && m_nCurrOption != i)
+ option.displayedValue = *option.value;
+
+ if (m_nCurrOption != lastOption && lastOption == i) {
+ FrontendOption& oldOption = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[lastOption].m_TargetMenu];
+ if (oldOption.type == FEOPTION_DYNAMIC)
+ oldOption.buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
+ }
+ }
+
+ if (i == MAX_MENUROWS - 1 || aScreens[m_nCurrScreen].m_aEntries[i + 1].m_EntryName[0] == '\0')
+ lastOption = m_nCurrOption;
+#endif
// TODO(Miami): check
// Sliders
@@ -1316,11 +1421,11 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
ProcessSlider((m_PrefsLOD - 0.925f) / 0.875f, 99.0f, HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
break;
case MENUACTION_MUSICVOLUME:
- if(m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER)
+ if(m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
ProcessSlider(m_PrefsMusicVolume / 64.0f, 70.0f, HOVEROPTION_INCREASE_MUSICVOLUME, HOVEROPTION_DECREASE_MUSICVOLUME, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
break;
case MENUACTION_SFXVOLUME:
- if (m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER)
+ if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER)
ProcessSlider(m_PrefsSfxVolume / 64.0f, 99.0f, HOVEROPTION_INCREASE_SFXVOLUME, HOVEROPTION_DECREASE_SFXVOLUME, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
break;
case MENUACTION_MOUSESENS:
@@ -1356,8 +1461,6 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
section++;
}
- // TODO(Miami)
- /*
switch (m_nCurrScreen) {
case MENUPAGE_STATS:
case MENUPAGE_CONTROLLER_PC:
@@ -1367,11 +1470,10 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
DisplayHelperText(nil);
break;
case MENUPAGE_OPTIONS:
- if (m_nPrefsAudio3DProviderIndex == INVALID_AUDIO_PROVIDER && aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_LOADRADIO)
+ if (m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER && aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_LOADRADIO)
DisplayHelperText("FEA_NAH");
break;
}
- */
if (m_nCurrScreen == MENUPAGE_DELETING_IN_PROGRESS) {
SmallMessageScreen("FEDL_WR");
@@ -1832,25 +1934,25 @@ CMenuManager::DrawControllerSetupScreen()
CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(MENU_UNK_X_MARGIN));
CFont::SetRightJustifyWrap(SCREEN_SCALE_X(MENU_UNK_WIDTH));
- PREPARE_MENU_HEADER
-
switch (m_ControlMethod) {
case CONTROL_STANDARD:
+ PREPARE_MENU_HEADER
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X + 7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
- PREPARE_MENU_HEADER
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y),
+ CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255)));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y),
TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
break;
case CONTROL_CLASSIC:
+ PREPARE_MENU_HEADER
CFont::SetColor(CRGBA(30, 30, 30, FadeIn(255)));
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X + 7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X) - MENU_X(7.f), SCREEN_SCALE_Y(MENUHEADER_POS_Y + 7.f),
TheText.Get("FET_CTI"));
- PREPARE_MENU_HEADER
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y),
+ CFont::SetColor(CRGBA(HEADER_COLOR.r, HEADER_COLOR.g, HEADER_COLOR.b, FadeIn(255)));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_Y(MENUHEADER_POS_Y),
TheText.Get("FET_CTI"));
break;
default:
@@ -1936,10 +2038,10 @@ CMenuManager::DrawControllerSetupScreen()
float curOptY = i * rowHeight + yStart;
if (m_nMousePosY > MENU_Y(curOptY) && m_nMousePosY < MENU_Y(rowHeight + curOptY)) {
- if (m_nPrevOption != i && m_nCurrExLayer == HOVEROPTION_LIST)
+ if (m_nOptionMouseHovering != i && m_nCurrExLayer == HOVEROPTION_LIST)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
- m_nPrevOption = i;
+ m_nOptionMouseHovering = i;
if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) {
m_nCurrExLayer = HOVEROPTION_LIST;
m_nSelectedListRow = i;
@@ -2467,9 +2569,9 @@ CMenuManager::DrawBackground(bool transitionCall)
if (m_nCurrScreen != MENUPAGE_OUTRO)
if (m_menuTransitionProgress == 255) {
- m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(MENU_X(27.0f), MENU_Y(8.0f), MENU_X(157.0f), MENU_Y(138.0f)), CRGBA(255, 255, 255, 255));
+ m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(SCREEN_STRETCH_X(27.0f), MENU_Y(8.0f), SCREEN_STRETCH_X(27.0f) + MENU_X(130.f), MENU_Y(138.0f)), CRGBA(255, 255, 255, 255));
} else {
- m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(MENU_X(27.0f), MENU_Y(8.0f), MENU_X(157.0f), MENU_Y(138.0f)), CRGBA(255, 255, 255, FadeIn(255)));
+ m_aFrontEndSprites[MENUSPRITE_VCLOGO].Draw(CRect(SCREEN_STRETCH_X(27.0f), MENU_Y(8.0f), SCREEN_STRETCH_X(27.0f) + MENU_X(130.f), MENU_Y(138.0f)), CRGBA(255, 255, 255, FadeIn(255)));
}
if (m_ShowEmptyBindingError) {
@@ -2514,7 +2616,7 @@ CMenuManager::DrawPlayerSetupScreen()
PREPARE_MENU_HEADER
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get("FET_PS"));
+ CFont::PrintString(SCREEN_STRETCH_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get("FET_PS"));
// lstrcpy's changed with strcpy
@@ -2551,7 +2653,7 @@ CMenuManager::DrawPlayerSetupScreen()
char nameTemp[256];
for (m_pSelectedSkin = m_pSkinListHead.nextSkin; m_pSelectedSkin; m_pSelectedSkin = m_pSelectedSkin->nextSkin) {
// Drop extension
- int oldLength = strlen(m_pSelectedSkin->skinNameDisplayed);
+ int oldLength = (int)strlen(m_pSelectedSkin->skinNameDisplayed);
m_pSelectedSkin->skinNameDisplayed[oldLength - 4] = '\0';
m_pSelectedSkin->skinNameOriginal[oldLength - 4] = '\0';
@@ -2641,7 +2743,7 @@ CMenuManager::DrawPlayerSetupScreen()
if (m_nMousePosX > MENU_X_LEFT_ALIGNED(PLAYERSETUP_LIST_LEFT) && m_nMousePosX < MENU_X_RIGHT_ALIGNED(PLAYERSETUP_LIST_RIGHT)) {
if (m_nMousePosY > MENU_Y(rowStartY) && m_nMousePosY < MENU_Y(rowEndY)) {
- m_nPrevOption = rowIdx;
+ m_nOptionMouseHovering = rowIdx;
if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) {
m_nCurrExLayer = HOVEROPTION_LIST;
}
@@ -2917,7 +3019,7 @@ CMenuManager::FadeIn(int alpha)
}
void
-CMenuManager::FilterOutColorMarkersFromString(wchar *str, CRGBA &newColor)
+CMenuManager::FilterOutColorMarkersFromString(wchar *str)
{
int newIdx = 0;
wchar copy[256], *c;
@@ -2926,16 +3028,6 @@ CMenuManager::FilterOutColorMarkersFromString(wchar *str, CRGBA &newColor)
for (c = copy; *c != '\0'; c++) {
if (*c == '~') {
c++;
- switch (*c) {
- case 'b': newColor = CRGBA(40, 40, 255, 255); break;
- case 'g': newColor = CRGBA(40, 235, 40, 255); break;
- // There is no case for "h", is that a mistake?
- case 'l': newColor = CRGBA(0, 0, 0, 255); break;
- case 'p': newColor = CRGBA(255, 0, 255, 255); break;
- case 'r': newColor = CRGBA(255, 0, 0, 255); break;
- case 'w': newColor = CRGBA(255, 255, 255, 255); break;
- case 'y': newColor = CRGBA(255, 255, 0, 255); break;
- }
while (*c != '~') c++;
} else {
str[newIdx++] = *c;
@@ -3014,6 +3106,10 @@ CMenuManager::InitialiseChangedLanguageSettings()
default:
break;
}
+
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ CustomFrontendOptionsPopulate();
+#endif
}
}
@@ -3076,28 +3172,32 @@ CMenuManager::LoadAllTextures()
CTimer::Update();
}
+// --MIAMI: Done
void
CMenuManager::LoadSettings()
{
CFileMgr::SetDirMyDocuments();
- int fileHandle = CFileMgr::OpenFile("gta3.set", "r");
+ int fileHandle = CFileMgr::OpenFile("gta_vc.set", "r");
int32 prevLang = m_PrefsLanguage;
-#ifdef GTA3_1_1_PATCH
- CMBlur::BlurOn = (_dwOperatingSystemVersion != OS_WIN98);
-#else
- CMBlur::BlurOn = true;
-#endif
MousePointerStateHelper.bInvertVertically = true;
+ CMBlur::BlurOn = false;
// 50 is silly
- char Ver[50];
+ char headerText[50];
+ int someVersion = 0;
+ bool fileIsValid = true;
if (fileHandle) {
- CFileMgr::Read(fileHandle, Ver, 29);
+ CFileMgr::Read(fileHandle, headerText, 29);
- if (strncmp(Ver, TopLineEmptyFile, sizeof(TopLineEmptyFile) - 1)) {
+ if (strncmp(headerText, TopLineEmptyFile, sizeof(TopLineEmptyFile) - 1) == 0) {
+ fileIsValid = false;
+ } else {
CFileMgr::Seek(fileHandle, 0, 0);
+ CFileMgr::Read(fileHandle, (char*)&someVersion, sizeof(someVersion));
+ }
+ if (fileIsValid && someVersion >= 3) {
ControlsManager.LoadSettings(fileHandle);
#ifdef IMPROVED_VIDEOMODE
CFileMgr::Read(fileHandle, (char*)&m_nPrefsWidth, sizeof(m_nPrefsWidth));
@@ -3121,33 +3221,44 @@ CMenuManager::LoadSettings()
CFileMgr::Read(fileHandle, gString, 20);
CFileMgr::Read(fileHandle, gString, 4);
CFileMgr::Read(fileHandle, gString, 4);
+#ifdef FREE_CAM
+ CFileMgr::Read(fileHandle, (char*)&TheCamera.bFreeCam, 1);
+#else
CFileMgr::Read(fileHandle, gString, 1);
+#endif
+
+#ifdef LEGACY_MENU_OPTIONS
+ CFileMgr::Read(fileHandle, (char*)&m_PrefsVsyncDisp, 1);
+ CFileMgr::Read(fileHandle, (char*)&CMBlur::BlurOn, 1);
+#else
CFileMgr::Read(fileHandle, gString, 1);
CFileMgr::Read(fileHandle, gString, 1);
+#endif
CFileMgr::Read(fileHandle, (char*)&TheCamera.m_bHeadBob, 1);
CFileMgr::Read(fileHandle, (char*)&TheCamera.m_fMouseAccelHorzntl, 4);
- CFileMgr::Read(fileHandle, (char*)&TheCamera.m_fMouseAccelVertical, 4);
CFileMgr::Read(fileHandle, (char*)&MousePointerStateHelper.bInvertVertically, 1);
CFileMgr::Read(fileHandle, (char*)&CVehicle::m_bDisableMouseSteering, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsSfxVolume, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsMusicVolume, 1);
+ CFileMgr::Read(fileHandle, (char*)&m_PrefsMP3BoostVolume, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsRadioStation, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsSpeakers, 1);
CFileMgr::Read(fileHandle, (char*)&m_nPrefsAudio3DProviderIndex, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsDMA, 1);
- CFileMgr::Read(fileHandle, (char*)&m_PrefsBrightness, 1);
- CFileMgr::Read(fileHandle, (char*)&m_PrefsLOD, 4);
+ CFileMgr::Read(fileHandle, (char*)&m_PrefsBrightness, 2);
+ CFileMgr::Read(fileHandle, (char*)&m_PrefsLOD, sizeof(m_PrefsLOD));
CFileMgr::Read(fileHandle, (char*)&m_PrefsShowSubtitles, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsUseWideScreen, 1);
- CFileMgr::Read(fileHandle, (char*)&m_PrefsVsyncDisp, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsFrameLimiter, 1);
CFileMgr::Read(fileHandle, (char*)&m_nDisplayVideoMode, 1);
- CFileMgr::Read(fileHandle, (char*)&CMBlur::BlurOn, 1);
CFileMgr::Read(fileHandle, m_PrefsSkinFile, 256);
CFileMgr::Read(fileHandle, (char*)&m_ControlMethod, 1);
CFileMgr::Read(fileHandle, (char*)&m_PrefsLanguage, 1);
-#ifdef FREE_CAM
- CFileMgr::Read(fileHandle, (char*)&TheCamera.bFreeCam, 1);
+ CFileMgr::Read(fileHandle, (char*)&m_PrefsShowHud, 1);
+ CFileMgr::Read(fileHandle, (char*)&m_PrefsRadarMode, 1);
+ CFileMgr::Read(fileHandle, (char*)&m_PrefsShowLegends, 1);
+#ifdef CUTSCENE_BORDERS_SWITCH
+ CFileMgr::Read(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1);
#endif
}
}
@@ -3155,10 +3266,13 @@ CMenuManager::LoadSettings()
CFileMgr::CloseFile(fileHandle);
CFileMgr::SetDir("");
+ CCamera::m_bUseMouse3rdPerson = m_ControlMethod == CONTROL_STANDARD;
+#ifdef LEGACY_MENU_OPTIONS
m_PrefsVsync = m_PrefsVsyncDisp;
+#endif
CRenderer::ms_lodDistScale = m_PrefsLOD;
- if (m_nPrefsAudio3DProviderIndex == INVALID_AUDIO_PROVIDER)
+ if (m_nPrefsAudio3DProviderIndex == NO_AUDIO_PROVIDER)
m_nPrefsAudio3DProviderIndex = -2;
m_lastWorking3DAudioProvider = m_nPrefsAudio3DProviderIndex;
@@ -3194,15 +3308,18 @@ CMenuManager::LoadSettings()
}
}
+// --MIAMI: Done
void
CMenuManager::SaveSettings()
{
static char RubbishString[48] = "stuffmorestuffevenmorestuff etc";
+ static int SomeVersion = 3;
CFileMgr::SetDirMyDocuments();
- int fileHandle = CFileMgr::OpenFile("gta3.set", "w+");
+ int fileHandle = CFileMgr::OpenFile("gta_vc.set", "w+");
if (fileHandle) {
+ CFileMgr::Write(fileHandle, (char*)&SomeVersion, sizeof(SomeVersion));
ControlsManager.SaveSettings(fileHandle);
#ifdef IMPROVED_VIDEOMODE
CFileMgr::Write(fileHandle, (char*)&m_nPrefsWidth, sizeof(m_nPrefsWidth));
@@ -3216,33 +3333,44 @@ CMenuManager::SaveSettings()
CFileMgr::Write(fileHandle, RubbishString, 20);
CFileMgr::Write(fileHandle, RubbishString, 4);
CFileMgr::Write(fileHandle, RubbishString, 4);
+#ifdef FREE_CAM
+ CFileMgr::Write(fileHandle, (char*)&TheCamera.bFreeCam, 1);
+#else
CFileMgr::Write(fileHandle, RubbishString, 1);
+#endif
+
+#ifdef LEGACY_MENU_OPTIONS
+ CFileMgr::Write(fileHandle, (char*)&m_PrefsVsyncDisp, 1);
+ CFileMgr::Write(fileHandle, (char*)&CMBlur::BlurOn, 1);
+#else
CFileMgr::Write(fileHandle, RubbishString, 1);
CFileMgr::Write(fileHandle, RubbishString, 1);
+#endif
CFileMgr::Write(fileHandle, (char*)&TheCamera.m_bHeadBob, 1);
CFileMgr::Write(fileHandle, (char*)&TheCamera.m_fMouseAccelHorzntl, 4);
- CFileMgr::Write(fileHandle, (char*)&TheCamera.m_fMouseAccelVertical, 4);
CFileMgr::Write(fileHandle, (char*)&MousePointerStateHelper.bInvertVertically, 1);
CFileMgr::Write(fileHandle, (char*)&CVehicle::m_bDisableMouseSteering, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsSfxVolume, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsMusicVolume, 1);
+ CFileMgr::Write(fileHandle, (char*)&m_PrefsMP3BoostVolume, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsRadioStation, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsSpeakers, 1);
CFileMgr::Write(fileHandle, (char*)&m_nPrefsAudio3DProviderIndex, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsDMA, 1);
- CFileMgr::Write(fileHandle, (char*)&m_PrefsBrightness, 1);
+ CFileMgr::Write(fileHandle, (char*)&m_PrefsBrightness, 2);
CFileMgr::Write(fileHandle, (char*)&m_PrefsLOD, sizeof(m_PrefsLOD));
CFileMgr::Write(fileHandle, (char*)&m_PrefsShowSubtitles, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsUseWideScreen, 1);
- CFileMgr::Write(fileHandle, (char*)&m_PrefsVsyncDisp, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsFrameLimiter, 1);
CFileMgr::Write(fileHandle, (char*)&m_nPrefsVideoMode, 1);
- CFileMgr::Write(fileHandle, (char*)&CMBlur::BlurOn, 1);
CFileMgr::Write(fileHandle, m_PrefsSkinFile, 256);
CFileMgr::Write(fileHandle, (char*)&m_ControlMethod, 1);
CFileMgr::Write(fileHandle, (char*)&m_PrefsLanguage, 1);
-#ifdef FREE_CAM
- CFileMgr::Write(fileHandle, (char*)&TheCamera.bFreeCam, 1);
+ CFileMgr::Write(fileHandle, (char*)&m_PrefsShowHud, 1);
+ CFileMgr::Write(fileHandle, (char*)&m_PrefsRadarMode, 1);
+ CFileMgr::Write(fileHandle, (char*)&m_PrefsShowLegends, 1);
+#ifdef CUTSCENE_BORDERS_SWITCH
+ CFileMgr::Write(fileHandle, (char *)&CMenuManager::m_PrefsCutsceneBorders, 1);
#endif
}
m_lastWorking3DAudioProvider = m_nPrefsAudio3DProviderIndex;
@@ -3300,17 +3428,22 @@ CMenuManager::SmallMessageScreen(const char* text)
CFont::PrintString(SCREEN_WIDTH / 2.f, y, TheText.Get(text));
}
+// --MIAMI: Done, but FilterOutColorMarkersFromString is actually in CFont
void
CMenuManager::PrintBriefs()
{
- CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
- CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
+ CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255)));
CFont::SetRightJustifyOff();
- CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why
+ CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
+ CFont::SetScale(MENU_X(MEDIUMTEXT_X_SCALE), MENU_Y(MEDIUMTEXT_Y_SCALE));
+ CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(80.0f));
+ CFont::SetDropShadowPosition(0);
- float nextY = BRIEFS_TOP_MARGIN;
- CRGBA newColor;
+ float nextY = BRIEFS_BOTTOM_MARGIN;
for (int i = 4; i >= 0; i--) {
+ if (nextY < BRIEFS_TOP_MARGIN)
+ break;
+
tPreviousBrief &brief = CMessages::PreviousBriefs[i];
if (brief.m_pText) {
CMessages::InsertNumberInString(brief.m_pText,
@@ -3319,127 +3452,125 @@ CMenuManager::PrintBriefs()
brief.m_nNumber[4], brief.m_nNumber[5], gUString);
CMessages::InsertStringInString(gUString, brief.m_pString);
CMessages::InsertPlayerControlKeysInString(gUString);
- newColor = TEXT_COLOR;
- FilterOutColorMarkersFromString(gUString, newColor);
+ FilterOutColorMarkersFromString(gUString);
-#ifdef PS2_LIKE_MENU
- // This PS2 code was always here, but unused
- bool rgSame = newColor.r == TEXT_COLOR.r && newColor.g == TEXT_COLOR.g;
- bool bSame = rgSame && newColor.b == TEXT_COLOR.b;
- bool colorNotChanged = bSame; /* && newColor.a == TEXT_COLOR.a; */
-
- if (!colorNotChanged) {
- newColor.r /= 2;
- newColor.g /= 2;
- newColor.b /= 2;
- }
- CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255))); // But this is from PS2
- CFont::SetDropShadowPosition(1);
-#endif
-
-#if defined(FIX_BUGS) || defined(PS2_LIKE_MENU)
- newColor.a = FadeIn(255);
- CFont::SetColor(newColor);
-#endif
- CFont::PrintString(MENU_X_LEFT_ALIGNED(BRIEFS_LINE_X), nextY, gUString);
- nextY += MENU_Y(BRIEFS_LINE_HEIGHT);
+ nextY -= CFont::GetNumberLines(MENU_X_LEFT_ALIGNED(BRIEFS_LINE_X), nextY, gUString) * BRIEFS_LINE_HEIGHT + BRIEFS_LINE_SPACING;
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(BRIEFS_LINE_X), MENU_Y(nextY), gUString);
}
}
-
-#ifdef PS2_LIKE_MENU
- CFont::SetDropShadowPosition(0);
-#endif
}
+// --MIAMI: Done
void
CMenuManager::PrintStats()
{
+ static uint8 pirateCheck = 0;
+ static float scrollY = 0;
+
int rowNum = ConstructStatLine(99999);
-#ifdef GTA3_1_1_PATCH
+ CSprite2d::Draw2DPolygon(MENU_X_LEFT_ALIGNED(90.0f), MENU_Y(142.0f),
+ MENU_X_LEFT_ALIGNED(543.0f), MENU_Y(142.f),
+ MENU_X_LEFT_ALIGNED(107.0f), MENU_Y(316.f),
+ MENU_X_LEFT_ALIGNED(531.f), MENU_Y(299.f), CRGBA(LIST_BACKGROUND_COLOR.r, LIST_BACKGROUND_COLOR.g, LIST_BACKGROUND_COLOR.b, FadeIn(130)));
+
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
-#endif
- CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X * 0.7), MENU_Y(MENU_TEXT_SIZE_Y * 0.9)); // second mulipliers are double, idk why
- float nextYChange, y, alphaMult;
+ CFont::SetPropOn();
+ CFont::SetDropShadowPosition(0);
- // Scroll stats with mouse
-#ifdef SCROLLABLE_STATS_PAGE
- static float scrollY = 0;
- static PauseModeTime lastChange = m_LastScreenSwitch;
- if (CPad::GetPad(0)->GetLeftMouse()) {
- scrollY += (m_nMouseOldPosY - m_nMousePosY);
- lastChange = CTimer::GetTimeInMillisecondsPauseMode();
- } else {
- scrollY += MENU_Y(STATS_SLIDE_Y_PER_SECOND) / 1000.0f * (CTimer::GetTimeInMillisecondsPauseMode() - lastChange);
- lastChange = CTimer::GetTimeInMillisecondsPauseMode();
+ if (pirateCheck == 0)
+ // if not pirated game
+ pirateCheck = 46;
+ // else
+ // pirateCheck = 45;
+
+ if (m_PrefsLanguage == LANGUAGE_AMERICAN)
+ CFont::SetScale(MENU_X(0.43f), MENU_Y(0.75f));
+ else
+ CFont::SetScale(MENU_X(0.37f), MENU_Y(0.75f));
+
+ static PauseModeTime lastCheck = 0;
+
+ if (CTimer::GetTimeInMillisecondsPauseMode() - lastCheck > 40) {
+
+ if (m_StatsScrollSpeed > 0.f) {
+ if (m_StatsScrollDirection == 0)
+ scrollY -= MENU_Y(100.f) / m_StatsScrollSpeed;
+ else
+ scrollY += MENU_Y(100.f) / m_StatsScrollSpeed;
+ }
+ lastCheck = CTimer::GetTimeInMillisecondsPauseMode();
}
-#else
- // MENU_Y(30.0f) per second
- float scrollY = MENU_Y(STATS_SLIDE_Y_PER_SECOND) * (CTimer::GetTimeInMillisecondsPauseMode() - m_LastScreenSwitch) / 1000.0f;
-#endif
+ if (pirateCheck == 45)
+ return;
+
+ float nextYChange, y, alpha;
+
+ float totalHeight = (rowNum + 7) * STATS_ROW_HEIGHT;
for (int row = 0; row < rowNum; ++row) {
- // Put just got hidden text at the top back to the bottom, in circular fashion
- for (y = MENU_Y(STATS_ROW_HEIGHT - 1) * row + SCREEN_HEIGHT - scrollY; MENU_Y(STATS_PUT_BACK_TO_BOTTOM_Y) > y; y += nextYChange) {
- nextYChange = (MENU_Y(STATS_ROW_HEIGHT) + rowNum) * MENU_Y(STATS_ROW_HEIGHT - 1);
+ // Put faded away text at the top back to the bottom, in circular fashion
+ for (y = MENU_Y(STATS_ROW_HEIGHT) * row + MENU_Y(100.f) - scrollY; MENU_Y(STATS_FADING_AREA_LENGTH) > y; y += nextYChange) {
+ nextYChange = MENU_Y(totalHeight);
+ }
+
+ // Put faded away text at the bottom back to the top
+ while (SCREEN_SCALE_FROM_BOTTOM(STATS_FADING_AREA_LENGTH) < y) {
+ y -= MENU_Y(totalHeight);
}
+ alpha = 0.f;
// If it's still on screen
- if (y > 0.0f && SCREEN_HEIGHT > y) {
+ if (y > MENU_Y(STATS_VISIBLE_START_Y) && y < MENU_Y(STATS_VISIBLE_END_Y)) {
ConstructStatLine(row);
- // But about to dim from top
- if (y - MENU_Y(STATS_BOTTOM_MARGIN) < MENU_Y(STATS_TOP_DIMMING_AREA_LENGTH)) {
- if ((y - MENU_Y(STATS_BOTTOM_MARGIN)) / MENU_Y(STATS_TOP_DIMMING_AREA_LENGTH) < 0.0f)
- alphaMult = 0.0f;
- else
- alphaMult = (y - MENU_Y(STATS_BOTTOM_MARGIN)) / MENU_Y(STATS_TOP_DIMMING_AREA_LENGTH);
+ // But about to dim from bottom
+ if (y < MENU_Y(STATS_BOTTOM_Y)) {
+ if (y > MENU_Y(STATS_BOTTOM_Y - STATS_FADING_AREA_LENGTH))
+ alpha = (MENU_Y(STATS_BOTTOM_Y) - y) * 5.f;
+ }
- // About to dim from bottom
- } else if (y > SCREEN_SCALE_FROM_BOTTOM(STATS_TOP_DIMMING_AREA_LENGTH) - MENU_Y(STATS_BOTTOM_DIMMING_AREA_LENGTH)) {
- if ((SCREEN_SCALE_FROM_BOTTOM(STATS_BOTTOM_DIMMING_AREA_LENGTH) - y) / MENU_Y(STATS_TOP_DIMMING_AREA_LENGTH) < 0.0f)
- alphaMult = 0.0f;
- else
- alphaMult = (SCREEN_SCALE_FROM_BOTTOM(STATS_BOTTOM_DIMMING_AREA_LENGTH) - y) / MENU_Y(STATS_TOP_DIMMING_AREA_LENGTH);
- } else
- alphaMult = 1.0f;
+ // About to dim from top
+ if (y > MENU_Y(STATS_TOP_Y)) {
+ if (y < MENU_Y(STATS_TOP_Y + STATS_FADING_AREA_LENGTH))
+ alpha = (y - MENU_Y(STATS_TOP_Y)) * 5.f;
+ }
+
+ // Content
+ if (y >= MENU_Y(STATS_TOP_Y + STATS_FADING_AREA_LENGTH) && y <= MENU_Y(STATS_BOTTOM_Y - STATS_FADING_AREA_LENGTH))
+ alpha = 255.0f;
- CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255.0f * alphaMult)));
+ CFont::SetColor(CRGBA(0, 0, 0, FadeIn(Min(255.f, alpha))));
CFont::SetRightJustifyOff();
- CFont::PrintString(MENU_X_LEFT_ALIGNED(STATS_ROW_X_MARGIN), y - MENU_Y(STATS_BOTTOM_MARGIN - STATS_TOP_MARGIN), gUString);
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(STATS_ROW_LEFT_MARGIN), y, gUString);
CFont::SetRightJustifyOn();
- CFont::PrintString(MENU_X_RIGHT_ALIGNED(STATS_ROW_X_MARGIN), y - MENU_Y(STATS_BOTTOM_MARGIN - STATS_TOP_MARGIN), gUString2);
+ CFont::PrintString(MENU_X_RIGHT_ALIGNED(STATS_ROW_RIGHT_MARGIN), y, gUString2);
}
}
- // Game doesn't do that, but it's better
- float nextX = MENU_X_LEFT_ALIGNED(STATS_RATING_X);
+ CFont::SetColor(CRGBA(MENUOPTION_COLOR.r, MENUOPTION_COLOR.g, MENUOPTION_COLOR.b, FadeIn(255)));
+ CFont::SetDropShadowPosition(2);
+ CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255)));
+ CFont::SetCentreOn();
+ CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
+ CFont::SetScale(MENU_X(0.65f), MENU_Y(1.05f));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(STATS_RATING_X), MENU_Y(STATS_RATING_Y_1), TheText.Get("CRIMRA"));
- CFont::SetColor(CRGBA(235, 170, 50, FadeIn(255)));
+ CFont::SetCentreOff();
CFont::SetRightJustifyOff();
- CFont::PrintString(nextX, MENU_Y(STATS_RATING_Y), TheText.Get("CRIMRA"));
-#ifdef MORE_LANGUAGES
- if (CFont::IsJapanese())
- nextX += MENU_X(10.0f) + CFont::GetStringWidth_Jap(TheText.Get("CRIMRA"));
- else
-#endif
- nextX += MENU_X(10.0f) + CFont::GetStringWidth(TheText.Get("CRIMRA"), true);
- UnicodeStrcpy(gUString, CStats::FindCriminalRatingString());
- CFont::PrintString(nextX, MENU_Y(STATS_RATING_Y), gUString);
-#ifdef MORE_LANGUAGES
- if (CFont::IsJapanese())
- nextX += MENU_X(6.0f) + CFont::GetStringWidth_Jap(gUString);
- else
-#endif
- nextX += MENU_X(6.0f) + CFont::GetStringWidth(gUString, true);
- sprintf(gString, "%d", CStats::FindCriminalRatingNumber());
+
+ // FIX: Game does that in a weird way, alignment and spacing is now ok
+
+ sprintf(gString, "(%d)", CStats::FindCriminalRatingNumber());
AsciiToUnicode(gString, gUString);
- CFont::PrintString(nextX, MENU_Y(STATS_RATING_Y), gUString);
- // ::Draw already does that.
- /*
- PREPARE_MENU_HEADER
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(MENUHEADER_POS_X), SCREEN_SCALE_FROM_BOTTOM(MENUHEADER_POS_Y), TheText.Get(aScreens[m_nCurrScreen].m_ScreenName));
- */
- CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X), MENU_Y(MENU_TEXT_SIZE_Y));
+ UnicodeStrcpy(gUString2, CStats::FindCriminalRatingString());
+ UnicodeStrcat(gUString2, gUString);
+
+ CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
+ CFont::SetScale(MENU_X(0.5f), MENU_Y(0.9f));
+ CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255)));
+ CFont::SetDropShadowPosition(0);
+
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(STATS_RATING_X) - CFont::GetStringWidth(gUString2, true) / 2.f, MENU_Y(STATS_RATING_Y_2), gUString2);
}
// --MIAMI: Done
@@ -3574,7 +3705,7 @@ CMenuManager::ProcessButtonPresses(void)
m_nMousePosY < MENU_Y(aScreens[m_nCurrScreen].m_aEntries[rowToCheck].m_Y + MENU_DEFAULT_LINE_HEIGHT)) {
static int oldScreen = m_nCurrScreen;
- m_nPrevOption = rowToCheck;
+ m_nOptionMouseHovering = rowToCheck;
if (m_nMouseOldPosX != m_nMousePosX || m_nMouseOldPosY != m_nMousePosY) {
m_nCurrOption = rowToCheck;
m_bShowMouse = true;
@@ -3588,7 +3719,7 @@ CMenuManager::ProcessButtonPresses(void)
break;
}
if (m_bShowMouse && m_nMenuFadeAlpha == 255) {
- m_nPrevOption = oldOption;
+ m_nOptionMouseHovering = oldOption;
m_nCurrOption = oldOption;
}
}
@@ -3597,7 +3728,7 @@ CMenuManager::ProcessButtonPresses(void)
if (oldOption != m_nCurrOption) {
if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_LABEL) {
++m_nCurrOption;
- ++m_nPrevOption;
+ ++m_nOptionMouseHovering;
}
m_nOptionHighlightTransitionBlend = 0;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
@@ -3879,7 +4010,7 @@ CMenuManager::ProcessButtonPresses(void)
if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_RESUME &&
#endif
(m_nHoverOption == HOVEROPTION_RANDOM_ITEM)) {
- m_nCurrOption = m_nPrevOption;
+ m_nCurrOption = m_nOptionMouseHovering;
optionSelected = true;
}
} else if (CPad::GetPad(0)->GetLeftMouseJustDown()) {
@@ -3893,7 +4024,7 @@ CMenuManager::ProcessButtonPresses(void)
OutputDebugString("FRONTEND RADIO STATION CHANGED");
} else if (m_nHoverOption == HOVEROPTION_RANDOM_ITEM
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_RESUME) {
- m_nCurrOption = m_nPrevOption;
+ m_nCurrOption = m_nOptionMouseHovering;
optionSelected = true;
}
#else
@@ -3980,7 +4111,7 @@ CMenuManager::ProcessButtonPresses(void)
break;
case HOVEROPTION_RANDOM_ITEM:
if (((m_nCurrOption != 0) || (m_nCurrScreen != MENUPAGE_PAUSE_MENU)) {
- m_nCurrOption = m_nPrevOption;
+ m_nCurrOption = m_nOptionMouseHovering;
optionSelected = true;
}
break;
@@ -4065,13 +4196,11 @@ CMenuManager::ProcessButtonPresses(void)
case HOVEROPTION_INCREASE_MOUSESENS:
TheCamera.m_fMouseAccelHorzntl += (1.0f / 3000);
TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200);
- TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl;
SaveSettings();
break;
case HOVEROPTION_DECREASE_MOUSESENS:
TheCamera.m_fMouseAccelHorzntl -= (1.0f / 3000);
TheCamera.m_fMouseAccelHorzntl = clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200);
- TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl;
SaveSettings();
break;
}
@@ -4316,26 +4445,6 @@ CMenuManager::ProcessButtonPresses(void)
InitialiseChangedLanguageSettings();
SaveSettings();
break;
-#ifdef MORE_LANGUAGES
- case MENUACTION_LANG_PL:
- m_PrefsLanguage = LANGUAGE_POLISH;
- m_bFrontEnd_ReloadObrTxtGxt = true;
- InitialiseChangedLanguageSettings();
- SaveSettings();
- break;
- case MENUACTION_LANG_RUS:
- m_PrefsLanguage = LANGUAGE_RUSSIAN;
- m_bFrontEnd_ReloadObrTxtGxt = true;
- CMenuManager::InitialiseChangedLanguageSettings();
- SaveSettings();
- break;
- case MENUACTION_LANG_JAP:
- m_PrefsLanguage = LANGUAGE_JAPANESE;
- m_bFrontEnd_ReloadObrTxtGxt = true;
- InitialiseChangedLanguageSettings();
- SaveSettings();
- break;
-#endif
case MENUACTION_POPULATESLOTS_CHANGEMENU:
PcSaveHelper.PopulateSlotInfo();
@@ -4344,8 +4453,7 @@ CMenuManager::ProcessButtonPresses(void)
case MENUACTION_YES:
case MENUACTION_NO:
{
- // TODO(Miami): TEMP
-#ifdef MENU_MAP
+#ifdef CUSTOM_MAP
if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu == MENUPAGE_MAP) {
bMapLoaded = false;
}
@@ -4399,9 +4507,11 @@ CMenuManager::ProcessButtonPresses(void)
SwitchToNewScreen(MENUPAGE_OUTRO);
break;
case MENUACTION_RESUME:
+#ifdef LEGACY_MENU_OPTIONS
if (m_PrefsVsyncDisp != m_PrefsVsync) {
m_PrefsVsync = m_PrefsVsyncDisp;
}
+#endif
RequestFrontEndShutDown();
break;
case MENUACTION_DONTCANCEL:
@@ -4411,12 +4521,11 @@ CMenuManager::ProcessButtonPresses(void)
if (m_nDisplayVideoMode != m_nPrefsVideoMode) {
m_nPrefsVideoMode = m_nDisplayVideoMode;
_psSelectScreenVM(m_nPrefsVideoMode);
- SetHelperText(0); // TODO(Miami): Remove that
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
DMAudio.Service();
CentreMousePointer();
m_bShowMouse = true;
- // m_nCurrOption = 5; // Why?
+ // m_nCurrOption = 5; // Why? TODO(Miami)
m_nOptionHighlightTransitionBlend = 0;
SaveSettings();
}
@@ -4426,7 +4535,6 @@ CMenuManager::ProcessButtonPresses(void)
if (m_nSelectedScreenMode != m_nPrefsWindowed) {
m_nPrefsWindowed = m_nSelectedScreenMode;
_psSelectScreenVM(m_nPrefsVideoMode); // apply same resolution
- SetHelperText(0);
SaveSettings();
}
break;
@@ -4434,14 +4542,12 @@ CMenuManager::ProcessButtonPresses(void)
case MENUACTION_AUDIOHW:
{
int selectedProvider = m_nPrefsAudio3DProviderIndex;
- if (selectedProvider != INVALID_AUDIO_PROVIDER) {
+ if (selectedProvider != NO_AUDIO_PROVIDER) {
+ if (selectedProvider == -1)
+ selectedProvider = m_nPrefsAudio3DProviderIndex = DMAudio.AutoDetect3DProviders();
m_nPrefsAudio3DProviderIndex = DMAudio.SetCurrent3DProvider(m_nPrefsAudio3DProviderIndex);
- if (selectedProvider == m_nPrefsAudio3DProviderIndex) {
- DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
- SetHelperText(0);
- } else {
- DMAudio.PlayFrontEndSound(SOUND_FRONTEND_FAIL, 0);
- SetHelperText(4);
+ if (selectedProvider != m_nPrefsAudio3DProviderIndex) {
+ SetHelperText(5);
}
SaveSettings();
}
@@ -4449,7 +4555,7 @@ CMenuManager::ProcessButtonPresses(void)
}
case MENUACTION_SPEAKERCONF:
#ifndef TIDY_UP_PBP
- if (m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER) {
+ if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
if (--m_PrefsSpeakers < 0)
m_PrefsSpeakers = 2;
DMAudio.SetSpeakerConfig(m_PrefsSpeakers);
@@ -4467,38 +4573,36 @@ CMenuManager::ProcessButtonPresses(void)
break;
case MENUACTION_RESTOREDEF:
if (m_nCurrScreen == MENUPAGE_SOUND_SETTINGS) {
- m_PrefsSfxVolume = 102;
+ m_nPrefsAudio3DProviderIndex = DMAudio.AutoDetect3DProviders();
+ DMAudio.SetCurrent3DProvider(m_nPrefsAudio3DProviderIndex);
+ m_PrefsSfxVolume = 49;
+ m_PrefsMusicVolume = 49;
+ m_PrefsRadioStation = EMOTION;
+ m_PrefsMP3BoostVolume = 0;
+ m_PrefsStereoMono = 1;
m_PrefsSpeakers = 0;
- m_PrefsMusicVolume = 102;
- m_PrefsStereoMono = 0;
- m_PrefsRadioStation = WILDSTYLE;
- DMAudio.SetMusicMasterVolume(102);
+ // DMAudio.SetMP3BoostVolume(m_PrefsMP3BoostVolume); // TODO(Miami)
+ DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume);
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
DMAudio.SetRadioInCar(m_PrefsRadioStation);
DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
SaveSettings();
} else if (m_nCurrScreen == MENUPAGE_GRAPHICS_SETTINGS) {
- m_PrefsFrameLimiter = true;
m_PrefsBrightness = 256;
- m_PrefsVsyncDisp = true;
m_PrefsLOD = 1.2f;
+#ifdef LEGACY_MENU_OPTIONS
m_PrefsVsync = true;
- CRenderer::ms_lodDistScale = 1.2f;
+#endif
+ CRenderer::ms_lodDistScale = m_PrefsLOD;
+ m_PrefsShowSubtitles = false;
m_PrefsUseWideScreen = false;
- m_PrefsShowSubtitles = true;
+ m_PrefsShowLegends = true;
+ m_PrefsVsyncDisp = true;
+ m_PrefsFrameLimiter = true;
+ m_PrefsRadarMode = 0;
+ m_PrefsShowHud = true;
m_nDisplayVideoMode = m_nPrefsVideoMode;
-#ifdef GTA3_1_1_PATCH
- if (_dwOperatingSystemVersion == OS_WIN98) {
- CMBlur::BlurOn = false;
- CMBlur::MotionBlurClose();
- }
- else {
- CMBlur::BlurOn = true;
- CMBlur::MotionBlurOpen(Scene.camera);
- }
-#else
- CMBlur::BlurOn = true;
-#endif
+ CMBlur::BlurOn = false;
SaveSettings();
} else if (m_nCurrScreen == MENUPAGE_CONTROLLER_PC) {
ControlsManager.MakeControllerActionsBlank();
@@ -4518,11 +4622,12 @@ CMenuManager::ProcessButtonPresses(void)
ControlsManager.InitDefaultControlConfigJoyPad(count);
}
#endif
- m_ControlMethod = CONTROL_STANDARD;
- MousePointerStateHelper.bInvertVertically = false;
+ MousePointerStateHelper.bInvertVertically = true;
+ TheCamera.m_bHeadBob = false;
TheCamera.m_fMouseAccelHorzntl = 0.0025f;
CVehicle::m_bDisableMouseSteering = true;
- TheCamera.m_bHeadBob = false;
+ m_ControlMethod = CONTROL_STANDARD;
+ TheCamera.m_bUseMouse3rdPerson = true;
SaveSettings();
}
SetHelperText(2);
@@ -4556,6 +4661,33 @@ CMenuManager::ProcessButtonPresses(void)
}
break;
}
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case MENUACTION_TRIGGERFUNC:
+ FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
+ if (m_nCurrScreen == option.screen && m_nCurrOption == option.screenOptionOrder) {
+ if (option.type == FEOPTION_SELECT) {
+ if (!option.onlyApplyOnEnter) {
+ option.displayedValue++;
+ if (option.displayedValue >= option.numRightTexts || option.displayedValue < 0)
+ option.displayedValue = 0;
+ }
+ option.changeFunc(option.displayedValue);
+ *option.value = option.displayedValue;
+
+ } else if (option.type == FEOPTION_DYNAMIC) {
+ option.buttonPressFunc(FEOPTION_ACTION_SELECT);
+ } else if (option.type == FEOPTION_REDIRECT) {
+ ChangeScreen(option.to, option.option, true, option.fadeIn);
+ } else if (option.type == FEOPTION_GOBACK) {
+ goBack = true;
+ }
+ } else {
+ debug("B- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, m_nCurrOption, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, option.screen, option.screenOptionOrder);
+ assert(0 && "Custom frontend options are borked");
+ }
+
+ break;
+#endif
}
}
ProcessOnOffMenuOptions();
@@ -4570,9 +4702,11 @@ CMenuManager::ProcessButtonPresses(void)
if (m_nCurrScreen == MENUPAGE_PAUSE_MENU) {
#endif
if (!m_bGameNotLoaded) {
+#ifdef LEGACY_MENU_OPTIONS
if (m_PrefsVsyncDisp != m_PrefsVsync) {
m_PrefsVsync = m_PrefsVsyncDisp;
}
+#endif
RequestFrontEndShutDown();
}
@@ -4600,6 +4734,9 @@ CMenuManager::ProcessButtonPresses(void)
if (oldScreen != -1) {
ThingsToDoBeforeLeavingPage();
+ if ((m_nCurrScreen == MENUPAGE_SKIN_SELECT) || (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS)) {
+ m_nTotalListRow = 0;
+ }
#ifdef PS2_LIKE_MENU
if (!bottomBarActive &&
@@ -4735,14 +4872,14 @@ CMenuManager::ProcessButtonPresses(void)
break;
#endif
case MENUACTION_AUDIOHW:
- if (m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER) {
+ if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
m_nPrefsAudio3DProviderIndex += changeValueBy;
m_nPrefsAudio3DProviderIndex = clamp(m_nPrefsAudio3DProviderIndex, 0, DMAudio.GetNum3DProvidersAvailable() - 1);
}
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
break;
case MENUACTION_SPEAKERCONF:
- if (m_nPrefsAudio3DProviderIndex != INVALID_AUDIO_PROVIDER) {
+ if (m_nPrefsAudio3DProviderIndex != NO_AUDIO_PROVIDER) {
m_PrefsSpeakers -= changeValueBy;
m_PrefsSpeakers = clamp(m_PrefsSpeakers, 0, 2);
DMAudio.SetSpeakerConfig(m_PrefsSpeakers);
@@ -4756,6 +4893,36 @@ CMenuManager::ProcessButtonPresses(void)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings();
break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case MENUACTION_TRIGGERFUNC:
+ FrontendOption& option = customFrontendOptions[aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu];
+ if (m_nCurrScreen == option.screen && m_nCurrOption == option.screenOptionOrder) {
+ if (option.type == FEOPTION_SELECT) {
+ if (changeValueBy > 0) {
+ option.displayedValue++;
+ if (option.displayedValue >= option.numRightTexts)
+ option.displayedValue = 0;
+ } else {
+ option.displayedValue--;
+ if (option.displayedValue < 0)
+ option.displayedValue = option.numRightTexts - 1;
+ }
+ if (!option.onlyApplyOnEnter) {
+ option.changeFunc(option.displayedValue);
+ *option.value = option.displayedValue;
+ }
+ } else if (option.type == FEOPTION_DYNAMIC) {
+ option.buttonPressFunc(changeValueBy > 0 ? FEOPTION_ACTION_RIGHT : FEOPTION_ACTION_LEFT);
+ }
+ DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
+ }
+ else {
+ debug("C- screen:%d option:%d - totalCo: %d, coId: %d, coScreen:%d, coOption:%d\n", m_nCurrScreen, m_nCurrOption, numCustomFrontendOptions, aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, option.screen, option.screenOptionOrder);
+ assert(0 && "Custom frontend options are borked");
+ }
+
+ break;
+#endif
}
ProcessOnOffMenuOptions();
if (m_nCurrScreen == MENUPAGE_KEYBOARD_CONTROLS) {
@@ -4849,13 +5016,6 @@ CMenuManager::ProcessOnOffMenuOptions()
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
SaveSettings();
break;
-#ifdef FREE_CAM
- case MENUACTION_FREECAM:
- TheCamera.bFreeCam = !TheCamera.bFreeCam;
- DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
- SaveSettings();
- break;
-#endif
}
}
@@ -4969,7 +5129,7 @@ CMenuManager::ProcessFileActions()
}
}
-// --MIAMI: Done except DxInput things, are they even needed?
+// --MIAMI: Done
void
CMenuManager::SwitchMenuOnAndOff()
{
@@ -4995,8 +5155,10 @@ CMenuManager::SwitchMenuOnAndOff()
m_bMenuActive = !m_bMenuActive;
if (m_bMenuActive) {
- // TODO(Miami): DxInput??
-
+ if (_InputMouseNeedsExclusive()) {
+ _InputShutdownMouse();
+ _InputInitialiseMouse(false);
+ }
Initialise();
LoadAllTextures();
} else {
@@ -5008,8 +5170,10 @@ CMenuManager::SwitchMenuOnAndOff()
DoRWStuffEndOfFrame();
DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255);
DoRWStuffEndOfFrame();
-
- // TODO(Miami): DxInput??
+ if (_InputMouseNeedsExclusive()) {
+ _InputShutdownMouse();
+ _InputInitialiseMouse(true);
+ }
#ifdef PS2_LIKE_MENU
bottomBarActive = false;
@@ -5054,7 +5218,10 @@ CMenuManager::SwitchMenuOnAndOff()
m_bMenuActive = true;
m_OnlySaveMenu = true;
- // TODO(Miami): DxInput??
+ if (_InputMouseNeedsExclusive()) {
+ _InputShutdownMouse();
+ _InputInitialiseMouse(false);
+ }
Initialise();
LoadAllTextures();
@@ -5163,7 +5330,7 @@ CMenuManager::DrawQuitGameScreen(void)
m_AllowNavigation = false;
}
-#ifdef MENU_MAP
+#ifdef CUSTOM_MAP
#define ZOOM(x, y, in) \
do { \
@@ -5177,15 +5344,17 @@ CMenuManager::DrawQuitGameScreen(void)
break; \
\
m_fMapSize *= z2; \
- } while(0) \
+ } while(0)
+
+#endif
void
CMenuManager::PrintMap(void)
{
- CFont::SetJustifyOn();
m_bMenuMapActive = true;
CRadar::InitFrontEndMap();
+#ifdef CUSTOM_MAP
// Just entered to map
if (!bMapLoaded) {
m_fMapSize = SCREEN_HEIGHT * 2.0f;
@@ -5207,15 +5376,11 @@ CMenuManager::PrintMap(void)
return;
}
}
+#endif
// Because m_fMapSize is half of the map length, and map consists of 3x3 tiles.
float halfTile = m_fMapSize / 3.0f;
- // Darken background a bit
- CSprite2d::DrawRect(CRect(0, 0,
- SCREEN_WIDTH, SCREEN_HEIGHT),
- CRGBA(0, 0, 0, FadeIn(128)));
-
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
if (SCREEN_WIDTH >= m_fMapCenterX - m_fMapSize || SCREEN_HEIGHT >= m_fMapCenterY - m_fMapSize) {
@@ -5265,6 +5430,7 @@ CMenuManager::PrintMap(void)
CRadar::DrawBlips();
+#ifdef CUSTOM_MAP
CVector2D mapPoint;
mapPoint.x = m_nMousePosX;
mapPoint.y = m_nMousePosY;
@@ -5338,56 +5504,15 @@ CMenuManager::PrintMap(void)
if (m_fMapCenterY - m_fMapSize > SCREEN_HEIGHT / 2)
m_fMapCenterY = SCREEN_HEIGHT / 2 + m_fMapSize;
-
- m_bMenuMapActive = false;
-
- // CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(5.0f)); // From VC
- // CFont::SetRightJustifyWrap(10.0f);
-
- CSprite2d::DrawRect(CRect(MENU_X(14.0f), SCREEN_STRETCH_FROM_BOTTOM(95.0f),
- SCREEN_STRETCH_FROM_RIGHT(11.0f), SCREEN_STRETCH_FROM_BOTTOM(59.0f)),
- CRGBA(MAPINFOBOX_COLOR.r, MAPINFOBOX_COLOR.g, MAPINFOBOX_COLOR.b, MAPINFOBOX_COLOR.a));
-
- CFont::SetScale(MENU_X(0.4f), MENU_Y(0.7f));
- CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
- CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255)));
-
- float nextX = MENU_X(30.0f), nextY = 95.0f;
- wchar *text;
-#ifdef MORE_LANGUAGES
-#define TEXT_PIECE(key,extraSpace) \
- text = TheText.Get(key);\
- CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), text);\
- if (CFont::IsJapanese())\
- nextX += CFont::GetStringWidth_Jap(text) + MENU_X(extraSpace);\
- else\
- nextX += CFont::GetStringWidth(text, true) + MENU_X(extraSpace);
-#else
-#define TEXT_PIECE(key,extraSpace) \
- text = TheText.Get(key); CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), text); nextX += CFont::GetStringWidth(text, true) + MENU_X(extraSpace);
#endif
+ m_bMenuMapActive = false;
- TEXT_PIECE("FEC_MWF", 3.0f);
- TEXT_PIECE("FEC_PGU", 1.0f);
- TEXT_PIECE("FEC_IBT", 1.0f);
- TEXT_PIECE("FEC_ZIN", 20.0f);
- TEXT_PIECE("FEC_MWB", 3.0f);
- TEXT_PIECE("FEC_PGD", 1.0f);
- TEXT_PIECE("FEC_IBT", 1.0f);
- CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), TheText.Get("FEC_ZOT")); nextX = MENU_X(30.0f); nextY -= 11.0f;
- TEXT_PIECE("FEC_UPA", 2.0f);
- TEXT_PIECE("FEC_DWA", 2.0f);
- TEXT_PIECE("FEC_LFA", 2.0f);
- TEXT_PIECE("FEC_RFA", 2.0f);
- TEXT_PIECE("FEC_MSL", 1.0f);
- TEXT_PIECE("FEC_IBT", 1.0f);
- CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), TheText.Get("FEC_MOV")); nextX = MENU_X(30.0f); nextY -= 11.0f;
- TEXT_PIECE("FEC_MSR", 2.0f);
- TEXT_PIECE("FEC_IBT", 1.0f);
- CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), TheText.Get("FEC_TAR"));
-#undef TEXT_PIECE
+ CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(5.0f));
+ CFont::SetRightJustifyWrap(SCREEN_SCALE_X(10.0f));
+ DisplayHelperText("FEH_MPH");
}
+#ifdef CUSTOM_MAP
#undef ZOOM
#endif
@@ -5458,13 +5583,9 @@ CMenuManager::ConstructStatLine(int rowIdx)
if (CStats::Record4x4Mayhem > 0) {
STAT_LINE("FEST_RM", &CStats::Record4x4Mayhem, false, nil);
}
- if (CStats::LongestFlightInDodo > 0) {
- STAT_LINE("FEST_LF", &CStats::LongestFlightInDodo, false, nil);
- }
if (CStats::TimeTakenDefuseMission > 0) {
STAT_LINE("FEST_BD", &CStats::TimeTakenDefuseMission, false, nil);
}
- STAT_LINE("CAR_CRU", &CStats::CarsCrushed, false, nil);
if (CStats::HighestScores[0] > 0) {
STAT_LINE("FEST_BB", nil, false, nil);
@@ -5492,7 +5613,6 @@ CMenuManager::ConstructStatLine(int rowIdx)
float fTemp;
STAT_LINE("FEST_DF", &(fTemp = CStats::DistanceTravelledOnFoot * MILES_IN_METER), true, nil);
STAT_LINE("FEST_DC", &(fTemp = CStats::DistanceTravelledInVehicle * MILES_IN_METER), true, nil);
- STAT_LINE("MMRAIN", &CStats::mmRain, false, nil);
STAT_LINE("MXCARD", &(fTemp = CStats::MaximumJumpDistance * FEET_IN_METER), true, nil);
STAT_LINE("MXCARJ", &(fTemp = CStats::MaximumJumpHeight * FEET_IN_METER), true, nil);
break;
@@ -5508,7 +5628,6 @@ CMenuManager::ConstructStatLine(int rowIdx)
#endif
STAT_LINE("FESTDFM", &CStats::DistanceTravelledOnFoot, true, nil);
STAT_LINE("FESTDCM", &CStats::DistanceTravelledInVehicle, true, nil);
- STAT_LINE("MMRAIN", &CStats::mmRain, false, nil);
STAT_LINE("MXCARDM", &CStats::MaximumJumpDistance, true, nil);
STAT_LINE("MXCARJM", &CStats::MaximumJumpHeight, true, nil);
break;
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 4655c971..83d86d5b 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -66,20 +66,23 @@
#define PLAYERSETUP_LIST_BODY_TOP 47
#define PLAYERSETUP_ROW_HEIGHT 9
-#define STATS_SLIDE_Y_PER_SECOND 30.0f
-#define STATS_ROW_HEIGHT 20.0f
-#define STATS_ROW_X_MARGIN 50.0f
-#define STATS_BOTTOM_MARGIN 135.0f
-#define STATS_TOP_MARGIN 40.0f
-#define STATS_TOP_DIMMING_AREA_LENGTH (93.0f - STATS_TOP_MARGIN)
-#define STATS_BOTTOM_DIMMING_AREA_LENGTH 55.0f
-#define STATS_PUT_BACK_TO_BOTTOM_Y 50.0f
-#define STATS_RATING_X 24.0f
-#define STATS_RATING_Y 20.0f
-
-#define BRIEFS_TOP_MARGIN 40.0f
-#define BRIEFS_LINE_X 50.0f
-#define BRIEFS_LINE_HEIGHT 60.0f
+#define STATS_ROW_HEIGHT 17.0f
+#define STATS_ROW_LEFT_MARGIN 110.0f
+#define STATS_ROW_RIGHT_MARGIN 113.0f
+#define STATS_TOP_Y 135.0f // Just faded in
+#define STATS_BOTTOM_Y 300.0f // Starts to fade out after that
+#define STATS_FADING_AREA_LENGTH 50.0f
+#define STATS_VISIBLE_START_Y (STATS_TOP_Y - 10.f)
+#define STATS_VISIBLE_END_Y (STATS_BOTTOM_Y + 21.f)
+#define STATS_RATING_X 320.0f
+#define STATS_RATING_Y_1 85.0f
+#define STATS_RATING_Y_2 110.0f
+
+#define BRIEFS_TOP_MARGIN 140.0f
+#define BRIEFS_BOTTOM_MARGIN 280.0f
+#define BRIEFS_LINE_X 100.0f
+#define BRIEFS_LINE_HEIGHT 20.0f
+#define BRIEFS_LINE_SPACING 10.0f
#define CONTSETUP_STANDARD_ROW_HEIGHT 10.7f
#define CONTSETUP_CLASSIC_ROW_HEIGHT 9.0f
@@ -262,17 +265,9 @@ enum eMenuAction
MENUACTION_DYNAMICACOUSTIC,
MENUACTION_MOUSESTEER,
MENUACTION_UNK110,
-#ifdef MORE_LANGUAGES
- MENUACTION_LANG_PL,
- MENUACTION_LANG_RUS,
- MENUACTION_LANG_JAP,
-#endif
#ifdef IMPROVED_VIDEOMODE
MENUACTION_SCREENMODE,
#endif
-#ifdef FREE_CAM
- MENUACTION_FREECAM,
-#endif
#ifdef LEGACY_MENU_OPTIONS
MENUACTION_CTRLVIBRATION,
MENUACTION_CTRLCONFIG,
@@ -477,10 +472,10 @@ public:
int8 m_nPrefsAudio3DProviderIndex;
int8 m_PrefsSpeakers;
int8 m_PrefsDMA;
- uint8 m_PrefsSfxVolume;
- uint8 m_PrefsMusicVolume;
+ int8 m_PrefsSfxVolume;
+ int8 m_PrefsMusicVolume;
uint8 m_PrefsRadioStation;
- uint8 field_2C;
+ uint8 m_PrefsStereoMono; // unused except restore settings
int32 m_nCurrOption;
bool m_bQuitGameNoCD;
bool m_bMenuMapActive;
@@ -544,7 +539,7 @@ public:
int32 m_nMouseOldPosY;
int32 m_nHoverOption;
bool m_bShowMouse;
- int32 m_nPrevOption;
+ int32 m_nOptionMouseHovering;
bool m_bStartWaitingForKeyBind;
bool m_bWaitingForNewKeyBind;
bool m_bKeyChangeNotProcessed;
@@ -595,7 +590,9 @@ public:
};
bool GetIsMenuActive() {return !!m_bMenuActive;}
- static uint8 m_PrefsStereoMono;
+#ifdef CUTSCENE_BORDERS_SWITCH
+ static bool m_PrefsCutsceneBorders;
+#endif
#ifndef MASTER
static bool m_PrefsMarketing;
@@ -613,7 +610,7 @@ public:
void CheckCodesForControls(int);
bool CheckHover(int x1, int x2, int y1, int y2);
void CheckSliderMovement(int);
- void DisplayHelperText();
+ void DisplayHelperText(char*);
int DisplaySlider(float, float, float, float, float, float, float);
void DoSettingsBeforeStartingAGame();
void DrawStandardMenus(bool);
@@ -625,7 +622,7 @@ public:
void DrawBackground(bool transitionCall);
void DrawPlayerSetupScreen();
int FadeIn(int alpha);
- void FilterOutColorMarkersFromString(wchar*, CRGBA &);
+ void FilterOutColorMarkersFromString(wchar*);
int GetStartOptionsCntrlConfigScreens();
void InitialiseChangedLanguageSettings();
void LoadAllTextures();
@@ -659,6 +656,7 @@ public:
void ScrollDownListByOne();
void PageUpList(bool);
void PageDownList(bool);
+ int8 GetPreviousPageOption();
// uint8 GetNumberOfMenuOptions();
};
@@ -668,6 +666,6 @@ VALIDATE_SIZE(CMenuManager, 0x688);
#endif
extern CMenuManager FrontEndMenuManager;
-
+extern CMenuScreen aScreens[];
#endif \ No newline at end of file
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 92564289..39bbd364 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -88,6 +88,7 @@
#include "Zones.h"
#include "Occlusion.h"
#include "debugmenu.h"
+#include "Ropes.h"
eLevelName CGame::currLevel;
int32 CGame::currArea;
@@ -151,6 +152,10 @@ CGame::InitialiseOnceBeforeRW(void)
return true;
}
+#if !defined(LIBRW) && defined(PS2_MATFX)
+void ReplaceMatFxCallback();
+#endif
+
bool
CGame::InitialiseRenderWare(void)
{
@@ -201,6 +206,8 @@ CGame::InitialiseRenderWare(void)
#else
rw::MatFX::modulateEnvMap = false;
#endif
+#elif defined(PS2_MATFX)
+ ReplaceMatFxCallback();
#endif
CFont::Initialise();
@@ -245,23 +252,20 @@ void CGame::ShutdownRenderWare(void)
bool CGame::InitialiseOnceAfterRW(void)
{
TheText.Load();
- DMAudio.Initialise();
CTimer::Initialise();
CTempColModels::Initialise();
mod_HandlingManager.Initialise();
CSurfaceTable::Initialise("DATA\\SURFACE.DAT");
CPedStats::Initialise();
CTimeCycle::Initialise();
-
+ DMAudio.Initialise();
if ( DMAudio.GetNum3DProvidersAvailable() == 0 )
- FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = -1;
+ FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = NO_AUDIO_PROVIDER;
- if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
+ if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == AUDIO_PROVIDER_NOT_DETERMINED || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
{
FrontEndMenuManager.m_PrefsSpeakers = 0;
- int8 provider = DMAudio.AutoDetect3DProviders();
- if ( provider != -1 )
- FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = provider;
+ FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = DMAudio.AutoDetect3DProviders();
}
DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
@@ -316,7 +320,6 @@ bool CGame::Initialise(const char* datFile)
COcclusion::Init();
CCollision::Init();
CSetPieces::Init();
- TheText.Load();
CTheZones::Init();
CUserDisplay::Init();
CMessages::Init();
@@ -358,9 +361,9 @@ bool CGame::Initialise(const char* datFile)
LoadingScreen("Loading the Game", "Setup streaming", nil);
CStreaming::LoadInitialVehicles();
CStreaming::LoadInitialPeds();
- CStreaming::RequestBigBuildings(LEVEL_NONE);
+ CStreaming::RequestBigBuildings(LEVEL_GENERIC);
CStreaming::LoadAllRequestedModels(false);
- printf("Streaming uses %dK of its memory", CStreaming::ms_memoryUsed / 1024);
+ printf("Streaming uses %zuK of its memory", CStreaming::ms_memoryUsed / 1024); // original modifier was %d
LoadingScreen("Loading the Game", "Load animations", GetRandomSplashScreen());
CAnimManager::LoadAnimFiles();
CStreaming::LoadInitialWeapons();
@@ -401,9 +404,11 @@ bool CGame::Initialise(const char* datFile)
CRubbish::Init();
CClouds::Init();
CSpecialFX::Init();
+ CRopes::Init();
CWaterCannons::Init();
CBridge::Init();
CGarages::Init();
+ LoadingScreen("Loading the Game", "Position dynamic objects", nil);
LoadingScreen("Loading the Game", "Initialise vehicle paths", nil);
CTrain::InitTrains();
CPlane::InitPlanes();
@@ -414,6 +419,7 @@ bool CGame::Initialise(const char* datFile)
if ( !TheMemoryCard.m_bWantToLoad )
{
#endif
+ LoadingScreen("Loading the Game", "Start script", nil);
CTheScripts::StartTestScript();
CTheScripts::Process();
TheCamera.Process();
@@ -424,6 +430,9 @@ bool CGame::Initialise(const char* datFile)
CCollision::ms_collisionInMemory = currLevel;
for (int i = 0; i < MAX_PADS; i++)
CPad::GetPad(i)->Clear(true);
+ // TODO(Miami)
+ // DMAudio.SetStartingTrackPositions(1);
+ DMAudio.ChangeMusicMode(MUSICMODE_GAME);
return true;
}
@@ -509,7 +518,7 @@ void CGame::ReInitGameObjectVariables(void)
CTimeCycle::Initialise();
CDraw::SetFOV(120.0f);
CDraw::ms_fLODDistance = 500.0f;
- CStreaming::RequestBigBuildings(LEVEL_NONE);
+ CStreaming::RequestBigBuildings(LEVEL_GENERIC);
CStreaming::LoadAllRequestedModels(false);
CPed::Initialise();
CEventList::Initialise();
@@ -544,6 +553,7 @@ void CGame::ReInitGameObjectVariables(void)
CRemote::Init();
#endif
CSpecialFX::Init();
+ CRopes::Init();
CWaterCannons::Init();
CParticle::ReloadConfig();
@@ -647,7 +657,7 @@ void CGame::InitialiseWhenRestarting(void)
CTimer::Initialise();
FrontEndMenuManager.m_bWantToLoad = false;
ReInitGameObjectVariables();
- currLevel = LEVEL_NONE;
+ currLevel = LEVEL_GENERIC;
CCollision::SortOutCollisionAfterLoad();
}
}
@@ -716,6 +726,7 @@ void CGame::Process(void)
CGarages::Update();
CRubbish::Update();
CSpecialFX::Update();
+ CRopes::Update();
CTimeCycle::Update();
if (CReplay::ShouldStandardCameraBeProcessed())
TheCamera.Process();
diff --git a/src/core/Game.h b/src/core/Game.h
index 49a3e67c..67d83c00 100644
--- a/src/core/Game.h
+++ b/src/core/Game.h
@@ -2,7 +2,7 @@
enum eLevelName {
LEVEL_IGNORE = -1, // beware, this is only used in CPhysical's m_nZoneLevel
- LEVEL_NONE = 0,
+ LEVEL_GENERIC = 0,
LEVEL_BEACH,
LEVEL_MAINLAND
};
diff --git a/src/core/General.h b/src/core/General.h
index dbf169e9..7ab444a4 100644
--- a/src/core/General.h
+++ b/src/core/General.h
@@ -108,7 +108,7 @@ public:
if (angle >= TWOPI)
angle -= TWOPI;
- return (int)floorf(angle / DEGTORAD(45.0f));
+ return (int)Floor(angle / DEGTORAD(45.0f));
}
// Unlike usual string comparison functions, these don't care about greater or lesser
diff --git a/src/core/MenuScreens.h b/src/core/MenuScreens.cpp
index cae65316..6fbf597b 100644
--- a/src/core/MenuScreens.h
+++ b/src/core/MenuScreens.cpp
@@ -1,10 +1,12 @@
-#pragma once
+#include "common.h"
+#include "Frontend.h"
+#ifdef PC_MENU
-// --MIAMI: Done except commented things
+// If you want to add new options, please don't do that here and see CustomFrontendOptionsPopulate in re3.cpp.
CMenuScreen aScreens[] = {
// MENUPAGE_STATS = 0
- { "FET_STA", MENUPAGE_NONE, 3,
+ { "FEH_STA", MENUPAGE_NONE, 3,
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 190, 320, MENUALIGN_RIGHT,
},
@@ -79,11 +81,9 @@ CMenuScreen aScreens[] = {
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, MENUALIGN_CENTER,
},
- // TODO(Miami): This is still my implementation
// MENUPAGE_MAP = 6
{ "FEH_MAP", MENUPAGE_NONE, 2,
- MENUACTION_UNK110, "", SAVESLOT_NONE, 0, 0, 0, 0, // to prevent cross/enter to go back
- MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
+ MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 70, 380, MENUALIGN_CENTER,
},
// MENUPAGE_NEW_GAME_RELOAD = 7
@@ -343,3 +343,5 @@ CMenuScreen aScreens[] = {
},
#endif
};
+
+#endif
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 99b9c8a8..8043bb6c 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -39,6 +39,7 @@
#include "General.h"
#include "Fluff.h"
#include "Gangs.h"
+#include "platform.h"
#ifdef GTA_PS2
#include "eetypes.h"
@@ -518,9 +519,12 @@ void FlyingFishCheat(void)
bool
CControllerState::CheckForInput(void)
{
- return !!LeftStickX || !!LeftStickY || !!RightStickX || !!RightStickY || !!LeftShoulder1 || !!LeftShoulder2 || !!RightShoulder1 || !!RightShoulder2 ||
- !!DPadUp || !!DPadDown || !!DPadLeft || !!DPadRight || !!Start || !!Select || !!Square || !!Triangle || !!Cross || !!Circle || !!LeftShock ||
- !!RightShock;
+ return !!RightStickX || !!RightStickY || !!LeftStickX || !!LeftStickY
+ || !!DPadUp || !!DPadDown || !!DPadLeft || !!DPadRight
+ || !!Triangle || !!Cross || !!Circle || !!Square
+ || !!Start || !!Select
+ || !!LeftShoulder1 || !!LeftShoulder2 || !!RightShoulder1 || !!RightShoulder2
+ || !!LeftShock || !!RightShock;
}
void
@@ -668,7 +672,7 @@ CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
#if defined RW_D3D9 || defined RWLIBS
if ( PSGLOBAL(mouse) == nil )
- _InputInitialiseMouse();
+ _InputInitialiseMouse(!FrontEndMenuManager.m_bMenuActive && _InputMouseNeedsExclusive());
if ( PSGLOBAL(mouse) != nil )
{
@@ -718,11 +722,11 @@ CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
void CPad::UpdateMouse()
{
+#if defined RW_D3D9 || defined RWLIBS
if ( IsForegroundApp() )
{
-#if defined RW_D3D9 || defined RWLIBS
if ( PSGLOBAL(mouse) == nil )
- _InputInitialiseMouse();
+ _InputInitialiseMouse(!FrontEndMenuManager.m_bMenuActive && _InputMouseNeedsExclusive());
DIMOUSESTATE2 state;
@@ -757,7 +761,10 @@ void CPad::UpdateMouse()
OldMouseControllerState = NewMouseControllerState;
NewMouseControllerState = PCTempMouseControllerState;
}
+ }
#else
+ if ( IsForegroundApp() && PSGLOBAL(cursorIsInWindow) )
+ {
double xpos = 1.0f, ypos;
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
if (xpos == 0.f)
@@ -795,8 +802,8 @@ void CPad::UpdateMouse()
OldMouseControllerState = NewMouseControllerState;
NewMouseControllerState = PCTempMouseControllerState;
-#endif
}
+#endif
}
CControllerState CPad::ReconcileTwoControllersInput(CControllerState const &State1, CControllerState const &State2)
@@ -1447,6 +1454,13 @@ void CPad::UpdatePads(void)
#else
CapturePad(0);
#endif
+
+ // Improve keyboard input latency part 1
+#ifdef FIX_BUGS
+ OldKeyState = NewKeyState;
+ NewKeyState = TempKeyState;
+#endif
+
#ifdef DETECT_PAD_INPUT_SWITCH
if (GetPad(0)->PCTempJoyState.CheckForInput())
IsAffectedByController = true;
@@ -1468,7 +1482,7 @@ void CPad::UpdatePads(void)
if ( bUpdate )
{
GetPad(0)->Update(0);
- GetPad(1)->Update(0);
+ // GetPad(1)->Update(0); // not in VC
}
#if defined(MASTER) && !defined(XINPUT)
@@ -1476,8 +1490,11 @@ void CPad::UpdatePads(void)
GetPad(1)->OldState.Clear();
#endif
+ // Improve keyboard input latency part 2
+#ifndef FIX_BUGS
OldKeyState = NewKeyState;
NewKeyState = TempKeyState;
+#endif
}
void CPad::ProcessPCSpecificStuff(void)
@@ -3024,7 +3041,7 @@ void CPad::ResetCheats(void)
char *CPad::EditString(char *pStr, int32 nSize)
{
- int32 pos = strlen(pStr);
+ int32 pos = (int32)strlen(pStr);
// letters
for ( int32 i = 0; i < ('Z' - 'A' + 1); i++ )
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index 2511ce9a..3c01a176 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -560,7 +560,7 @@ CPlayerInfo::Process(void)
veh->m_nZoneLevel = LEVEL_IGNORE;
for (int i = 0; i < ARRAY_SIZE(veh->pPassengers); i++) {
if (veh->pPassengers[i])
- veh->pPassengers[i]->m_nZoneLevel = LEVEL_NONE;
+ veh->pPassengers[i]->m_nZoneLevel = LEVEL_GENERIC;
}
CStats::DistanceTravelledInVehicle += veh->m_fDistanceTravelled;
} else {
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 475ca4d3..559a8cd6 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -121,11 +121,11 @@ static_assert(RADAR_TILE_SIZE == (RADAR_SIZE_Y / RADAR_NUM_TILES), "CRadar: not
#define RADAR_MIN_SPEED (0.3f)
#define RADAR_MAX_SPEED (0.9f)
-#ifdef MENU_MAP
CRGBA CRadar::ArrowBlipColour1;
CRGBA CRadar::ArrowBlipColour2;
uint16 CRadar::MapLegendCounter;
int16 CRadar::MapLegendList[NUM_MAP_LEGENDS];
+#ifdef MAP_ENHANCEMENTS
int CRadar::TargetMarkerId = -1;
CVector CRadar::TargetMarkerPos;
#endif
@@ -263,10 +263,9 @@ int LineRadarBoxCollision(CVector2D &out, const CVector2D &p1, const CVector2D &
uint8 CRadar::CalculateBlipAlpha(float dist)
{
-#ifdef MENU_MAP
if (FrontEndMenuManager.m_bMenuMapActive)
return 255;
-#endif
+
if (dist <= 1.0f)
return 255;
@@ -486,9 +485,7 @@ void CRadar::DrawBlips()
CVector2D in = CVector2D(0.0f, 0.0f);
TransformRadarPointToScreenSpace(out, in);
-#ifdef MENU_MAP
if (!FrontEndMenuManager.m_bMenuMapActive) {
-#endif
float angle;
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN)
angle = PI + FindPlayerHeading();
@@ -508,9 +505,7 @@ void CRadar::DrawBlips()
LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
DrawRadarSprite(RADAR_SPRITE_NORTH, out.x, out.y, 255);
-#ifdef MENU_MAP
}
-#endif
CEntity *blipEntity = nil;
for(int blipId = 0; blipId < NUMRADARBLIPS; blipId++) {
@@ -743,14 +738,12 @@ void CRadar::DrawBlips()
break;
}
}
-#ifdef MENU_MAP
if (FrontEndMenuManager.m_bMenuMapActive) {
CVector2D in, out;
TransformRealWorldPointToRadarSpace(in, FindPlayerCentreOfWorld_NoSniperShift());
TransformRadarPointToScreenSpace(out, in);
DrawYouAreHereSprite(out.x, out.y);
}
-#endif
}
}
@@ -773,7 +766,8 @@ void CRadar::DrawMap()
m_radarRange = RADAR_MIN_RANGE;
vec2DRadarOrigin = CVector2D(FindPlayerCentreOfWorld_NoSniperShift());
- DrawRadarMap();
+ if (FrontEndMenuManager.m_PrefsRadarMode != 1)
+ DrawRadarMap();
}
}
@@ -784,8 +778,8 @@ void CRadar::DrawRadarMap()
DrawRadarMask();
// top left ist (0, 0)
- int x = floorf((vec2DRadarOrigin.x - RADAR_MIN_X) / RADAR_TILE_SIZE);
- int y = ceilf((RADAR_NUM_TILES - 1) - (vec2DRadarOrigin.y - RADAR_MIN_Y) / RADAR_TILE_SIZE);
+ int x = Floor((vec2DRadarOrigin.x - RADAR_MIN_X) / RADAR_TILE_SIZE);
+ int y = Ceil((RADAR_NUM_TILES - 1) - (vec2DRadarOrigin.y - RADAR_MIN_Y) / RADAR_TILE_SIZE);
StreamRadarSections(x, y);
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
@@ -898,7 +892,7 @@ void CRadar::DrawRadarSection(int32 x, int32 y)
void CRadar::DrawRadarSprite(uint16 sprite, float x, float y, uint8 alpha)
{
RadarSprites[sprite]->Draw(CRect(x - SCREEN_SCALE_X(8.0f), y - SCREEN_SCALE_Y(8.0f), x + SCREEN_SCALE_X(8.0f), y + SCREEN_SCALE_Y(8.0f)), CRGBA(255, 255, 255, alpha));
-#ifdef MENU_MAP
+
if (FrontEndMenuManager.m_bMenuMapActive) {
bool alreadyThere = false;
for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
@@ -910,7 +904,6 @@ void CRadar::DrawRadarSprite(uint16 sprite, float x, float y, uint8 alpha)
MapLegendCounter++;
}
}
-#endif
}
void CRadar::DrawRotatingRadarSprite(CSprite2d* sprite, float x, float y, float angle, int32 alpha)
@@ -1046,10 +1039,10 @@ float CRadar::LimitRadarPoint(CVector2D &point)
float dist, invdist;
dist = point.Magnitude();
-#ifdef MENU_MAP
+
if (FrontEndMenuManager.m_bMenuMapActive)
return dist;
-#endif
+
if (dist > 1.0f) {
invdist = 1.0f / dist;
point.x *= invdist;
@@ -1130,7 +1123,7 @@ void CRadar::SaveAllRadarBlips(uint8 *buf, uint32 *size)
INITSAVEBUF
WriteSaveHeader(buf, 'R', 'D', 'R', '\0', *size - SAVE_HEADER_SIZE);
-#ifdef MENU_MAP
+#ifdef MAP_ENHANCEMENTS
if (TargetMarkerId != -1) {
ClearBlip(TargetMarkerId);
TargetMarkerId = -1;
@@ -1276,7 +1269,8 @@ void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red,
CSprite2d::DrawRect(CRect(x - SCREEN_SCALE_X(size), y - SCREEN_SCALE_Y(size), SCREEN_SCALE_X(size) + x, SCREEN_SCALE_Y(size) + y), CRGBA(red, green, blue, alpha));
break;
}
-#ifdef MENU_MAP
+
+ // TODO(Miami): Map
// VC uses -1 for coords and -2 for entities but meh, I don't want to edit DrawBlips
if (FrontEndMenuManager.m_bMenuMapActive) {
bool alreadyThere = false;
@@ -1290,7 +1284,6 @@ void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red,
ArrowBlipColour1 = CRGBA(red, green, blue, alpha);
}
}
-#endif
}
void CRadar::Shutdown()
@@ -1339,7 +1332,7 @@ void CRadar::Shutdown()
void CRadar::StreamRadarSections(const CVector &posn)
{
- StreamRadarSections(floorf((2000.0f + posn.x) / 500.0f), ceilf(7.0f - (2000.0f + posn.y) / 500.0f));
+ StreamRadarSections(Floor((2000.0f + posn.x) / 500.0f), Ceil(7.0f - (2000.0f + posn.y) / 500.0f));
}
void CRadar::StreamRadarSections(int32 x, int32 y)
@@ -1402,13 +1395,10 @@ void CRadar::TransformRadarPointToRealWorldSpace(CVector2D &out, const CVector2D
// Radar space goes from -1.0 to 1.0 in x and y, top right is (1.0, 1.0)
void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &in)
{
-#ifdef MENU_MAP
if (FrontEndMenuManager.m_bMenuMapActive) {
out.x = (FrontEndMenuManager.m_fMapCenterX - FrontEndMenuManager.m_fMapSize) + (MENU_MAP_LENGTH / 2 + MENU_MAP_LEFT_OFFSET + in.x) * FrontEndMenuManager.m_fMapSize * MENU_MAP_WIDTH_SCALE * 2.0f / MENU_MAP_LENGTH;
out.y = (FrontEndMenuManager.m_fMapCenterY - FrontEndMenuManager.m_fMapSize) + (MENU_MAP_LENGTH / 2 - MENU_MAP_TOP_OFFSET - in.y) * FrontEndMenuManager.m_fMapSize * MENU_MAP_HEIGHT_SCALE * 2.0f / MENU_MAP_LENGTH;
- } else
-#endif
- {
+ } else {
#ifdef FIX_BUGS
out.x = (in.x + 1.0f) * 0.5f * SCREEN_SCALE_X(RADAR_WIDTH) + SCREEN_SCALE_X(RADAR_LEFT);
#else
@@ -1462,10 +1452,7 @@ void
CRadar::CalculateCachedSinCos()
{
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED
-#ifdef MENU_MAP
- || FrontEndMenuManager.m_bMenuMapActive
-#endif
- ) {
+ || FrontEndMenuManager.m_bMenuMapActive ) {
cachedSin = 0.0f;
cachedCos = 1.0f;
} else if (TheCamera.GetLookDirection() == LOOKING_FORWARD) {
@@ -1486,7 +1473,6 @@ CRadar::CalculateCachedSinCos()
}
}
-#ifdef MENU_MAP
void
CRadar::InitFrontEndMap()
{
@@ -1530,6 +1516,7 @@ CRadar::DrawYouAreHereSprite(float x, float y)
MapLegendList[MapLegendCounter++] = RADAR_SPRITE_CENTRE;
}
+#ifdef MAP_ENHANCEMENTS
void
CRadar::ToggleTargetMarker(float x, float y)
{
diff --git a/src/core/Radar.h b/src/core/Radar.h
index 95b74b84..a36faaea 100644
--- a/src/core/Radar.h
+++ b/src/core/Radar.h
@@ -21,6 +21,8 @@
#define COORDBLIP_MARKER_COLOR_B 242
#define COORDBLIP_MARKER_COLOR_A 255
+#define NUM_MAP_LEGENDS 75
+
#define MENU_MAP_LENGTH_UNIT 1190.0f // in game unit
#define MENU_MAP_WIDTH_SCALE 1.112f // in game unit (originally 1.112494151260504f)
#define MENU_MAP_HEIGHT_SCALE 1.119f // in game unit (originally 1.118714268907563f)
@@ -48,10 +50,8 @@ enum eBlipDisplay
enum eRadarSprite
{
-#ifdef MENU_MAP
RADAR_SPRITE_ENTITY_BLIP = -2,
RADAR_SPRITE_COORD_BLIP = -1,
-#endif
RADAR_SPRITE_NONE = 0,
RADAR_SPRITE_CENTRE,
RADAR_SPRITE_MAP_HERE,
@@ -173,17 +173,19 @@ public:
static CSprite2d *RadarSprites[RADAR_SPRITE_COUNT];
static float cachedCos;
static float cachedSin;
-#ifdef MENU_MAP
-#define NUM_MAP_LEGENDS 75
static CRGBA ArrowBlipColour1;
static CRGBA ArrowBlipColour2;
static int16 MapLegendList[NUM_MAP_LEGENDS];
static uint16 MapLegendCounter;
+
+#ifdef MAP_ENHANCEMENTS
static int TargetMarkerId;
static CVector TargetMarkerPos;
+#endif
static void InitFrontEndMap();
static void DrawYouAreHereSprite(float, float);
+#ifdef MAP_ENHANCEMENTS
static void ToggleTargetMarker(float, float);
#endif
static uint8 CalculateBlipAlpha(float dist);
diff --git a/src/core/Ropes.cpp b/src/core/Ropes.cpp
new file mode 100644
index 00000000..dbae9ee3
--- /dev/null
+++ b/src/core/Ropes.cpp
@@ -0,0 +1,173 @@
+#include "common.h"
+
+#include "Timer.h"
+#include "ModelIndices.h"
+#include "Streaming.h"
+#include "CopPed.h"
+#include "Population.h"
+#include "RenderBuffer.h"
+#include "Camera.h"
+#include "Ropes.h"
+
+CRope CRopes::aRopes[8];
+
+RwImVertexIndex RopeIndices[64] = {
+ 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7,
+ 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15,
+ 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23,
+ 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31,
+ 31, 32 // unused
+};
+
+void
+CRope::Update(void)
+{
+ int i;
+ float step = Pow(0.85f, CTimer::GetTimeStep());
+ if(!m_bWasRegistered && CTimer::GetTimeInMilliseconds() > m_updateTimer){
+ m_speed[0].z -= 0.0015f*CTimer::GetTimeStep();
+ m_pos[0] += m_speed[0]*CTimer::GetTimeStep();
+ }
+ for(i = 1; i < ARRAY_SIZE(m_pos); i++){
+ CVector prevPos = m_pos[i];
+ m_pos[i] += m_speed[i]*step*CTimer::GetTimeStep();
+ m_pos[i].z -= 0.05f*CTimer::GetTimeStep();
+ CVector dist = m_pos[i] - m_pos[i-1];
+ m_pos[i] = m_pos[i-1] + (0.625f/dist.Magnitude())*dist;
+ m_speed[i] = (m_pos[i] - prevPos)/CTimer::GetTimeStep();
+ }
+ if(!m_bWasRegistered && m_pos[0].z < 0.0f)
+ m_bActive = false;
+ m_bWasRegistered = false;
+}
+
+void
+CRope::Render(void)
+{
+ int i;
+ int numVerts = 0;
+ if(!TheCamera.IsSphereVisible(m_pos[16], 20.0f))
+ return;
+
+ for(i = 0; i < ARRAY_SIZE(m_pos); i++){
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[i], 128, 128, 128, 100);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[i], m_pos[i].x, m_pos[i].y, m_pos[i].z);
+ }
+
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
+
+ if(RwIm3DTransform(TempBufferRenderVertices, ARRAY_SIZE(m_pos), nil, rwIM3D_VERTEXXYZ|rwIM3D_VERTEXRGBA)){
+#ifdef FIX_BUGS
+ RwIm3DRenderIndexedPrimitive(rwPRIMTYPELINELIST, RopeIndices, 2*(ARRAY_SIZE(m_pos)-1));
+#else
+ RwIm3DRenderIndexedPrimitive(rwPRIMTYPEPOLYLINE, RopeIndices, 2*(ARRAY_SIZE(m_pos)-1));
+#endif
+ RwIm3DEnd();
+ }
+}
+
+
+void
+CRopes::Init(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aRopes); i++)
+ aRopes[i].m_bActive = false;
+}
+
+void
+CRopes::Update(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aRopes); i++)
+ if(aRopes[i].m_bActive)
+ aRopes[i].Update();
+}
+
+void
+CRopes::Render(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aRopes); i++)
+ if(aRopes[i].m_bActive)
+ aRopes[i].Render();
+}
+
+bool
+CRopes::RegisterRope(uintptr id, CVector pos, bool setUpdateTimer)
+{
+ int i, j;
+ for(i = 0; i < ARRAY_SIZE(aRopes); i++){
+ if(aRopes[i].m_bActive && aRopes[i].m_id == id){
+ aRopes[i].m_pos[0] = pos;
+ aRopes[i].m_speed[0] = CVector(0.0f, 0.0f, 0.0f);
+ aRopes[i].m_bWasRegistered = true;
+ return true;
+ }
+ }
+ for(i = 0; i < ARRAY_SIZE(aRopes); i++)
+ if(!aRopes[i].m_bActive){
+ aRopes[i].m_id = id;
+ aRopes[i].m_pos[0] = pos;
+ aRopes[i].m_speed[0] = CVector(0.0f, 0.0f, 0.0f);
+ aRopes[i].m_unk = false;
+ aRopes[i].m_bWasRegistered = true;
+ aRopes[i].m_updateTimer = setUpdateTimer ? CTimer::GetTimeInMilliseconds() + 20000 : 0;
+ for(j = 1; j < ARRAY_SIZE(CRope::m_pos); j++){
+ if(j & 1)
+ aRopes[i].m_pos[j] = aRopes[i].m_pos[j-1] + CVector(0.0f, 0.0f, 0.625f);
+ else
+ aRopes[i].m_pos[j] = aRopes[i].m_pos[j-1] - CVector(0.0f, 0.0f, 0.625f);
+ aRopes[i].m_speed[j] = CVector(0.0f, 0.0f, 0.0f);
+ }
+ aRopes[i].m_bActive = true;
+ return true;
+ }
+ return false;
+}
+
+void
+CRopes::SetSpeedOfTopNode(uintptr id, CVector speed)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aRopes); i++)
+ if(aRopes[i].m_bActive && aRopes[i].m_id == id){
+ aRopes[i].m_speed[0] = speed;
+ return;
+ }
+}
+
+bool
+CRopes::FindCoorsAlongRope(uintptr id, float t, CVector *coors)
+{
+ int i, j;
+ float f;
+ for(i = 0; i < ARRAY_SIZE(aRopes); i++)
+ if(aRopes[i].m_bActive && aRopes[i].m_id == id){
+ t = (ARRAY_SIZE(CRope::m_pos)-1)*clamp(t, 0.0f, 0.999f);
+ j = t;
+ f = t - j;
+ *coors = (1.0f-f)*aRopes[i].m_pos[j] + f*aRopes[i].m_pos[j+1];
+ return true;
+ }
+ return false;
+}
+
+bool
+CRopes::CreateRopeWithSwatComingDown(CVector pos)
+{
+ static uint32 ropeId = 0;
+
+ if(!CStreaming::HasModelLoaded(MI_SWAT) || !RegisterRope(ropeId+100, pos, true))
+ return false;
+ CCopPed *swat = (CCopPed*)CPopulation::AddPed(PEDTYPE_COP, COP_HELI_SWAT, pos);
+ swat->bUsesCollision = false;
+ swat->m_pRopeEntity = (CEntity*)1;
+ swat->m_nRopeID = 100 + ropeId;
+ CAnimManager::BlendAnimation(swat->GetClump(), ASSOCGRP_STD, ANIM_ABSEIL, 4.0f);
+ ropeId++;
+ return true;
+}
diff --git a/src/core/Ropes.h b/src/core/Ropes.h
new file mode 100644
index 00000000..7930fa98
--- /dev/null
+++ b/src/core/Ropes.h
@@ -0,0 +1,31 @@
+#pragma once
+
+class CRope
+{
+public:
+ bool m_bActive;
+ bool m_bWasRegistered;
+ bool m_unk;
+ uintptr m_id;
+ uint32 m_updateTimer;
+ CVector m_pos[32];
+ CVector m_speed[32];
+
+ void Update(void);
+ void Render(void);
+};
+
+class CRopes
+{
+ static CRope aRopes[8];
+
+public:
+
+ static void Init(void);
+ static void Update(void);
+ static void Render(void);
+ static bool RegisterRope(uintptr id, CVector pos, bool setUpdateTimer);
+ static void SetSpeedOfTopNode(uintptr id, CVector speed);
+ static bool FindCoorsAlongRope(uintptr id, float t, CVector *coors);
+ static bool CreateRopeWithSwatComingDown(CVector pos);
+};
diff --git a/src/core/Stats.cpp b/src/core/Stats.cpp
index b8ea0943..2e3a27b2 100644
--- a/src/core/Stats.cpp
+++ b/src/core/Stats.cpp
@@ -21,8 +21,8 @@ int32 CStats::PedsKilledOfThisType[NUM_PEDTYPES];
int32 CStats::TimesDied;
int32 CStats::TimesArrested;
int32 CStats::KillsSinceLastCheckpoint;
-int32 CStats::DistanceTravelledInVehicle;
-int32 CStats::DistanceTravelledOnFoot;
+float CStats::DistanceTravelledInVehicle;
+float CStats::DistanceTravelledOnFoot;
int32 CStats::ProgressMade;
int32 CStats::TotalProgressInGame;
int32 CStats::CarsExploded;
@@ -49,7 +49,6 @@ int32 CStats::LivesSavedWithAmbulance;
int32 CStats::CriminalsCaught;
int32 CStats::HighestLevelAmbulanceMission;
int32 CStats::FiresExtinguished;
-int32 CStats::LongestFlightInDodo;
int32 CStats::TimeTakenDefuseMission;
int32 CStats::TotalNumberKillFrenzies;
int32 CStats::TotalNumberMissions;
@@ -58,8 +57,6 @@ int32 CStats::KgsOfExplosivesUsed;
int32 CStats::InstantHitsFiredByPlayer;
int32 CStats::InstantHitsHitByPlayer;
int32 CStats::BestTimeBombDefusal;
-int32 CStats::mmRain;
-int32 CStats::CarsCrushed;
int32 CStats::FastestTimes[CStats::TOTAL_FASTEST_TIMES];
int32 CStats::HighestScores[CStats::TOTAL_HIGHEST_SCORES];
int32 CStats::BestPositions[CStats::TOTAL_BEST_POSITIONS];
@@ -83,13 +80,11 @@ void CStats::Init()
KgsOfExplosivesUsed = 0;
InstantHitsFiredByPlayer = 0;
InstantHitsHitByPlayer = 0;
- CarsCrushed = 0;
HeadsPopped = 0;
TimesArrested = 0;
TimesDied = 0;
DaysPassed = 0;
NumberOfUniqueJumpsFound = 0;
- mmRain = 0;
MaximumJumpFlips = 0;
MaximumJumpSpins = 0;
MaximumJumpDistance = 0;
@@ -97,7 +92,6 @@ void CStats::Init()
BestStuntJump = 0;
TotalNumberOfUniqueJumps = 0;
Record4x4One = 0;
- LongestFlightInDodo = 0;
Record4x4Two = 0;
PassengersDroppedOffWithTaxi = 0;
Record4x4Three = 0;
@@ -202,11 +196,6 @@ void CStats::AnotherFireExtinguished()
++FiresExtinguished;
}
-void CStats::RegisterLongestFlightInDodo(int32 time)
-{
- LongestFlightInDodo = Max(LongestFlightInDodo, time);
-}
-
void CStats::RegisterTimeTakenDefuseMission(int32 time)
{
TimeTakenDefuseMission = (TimeTakenDefuseMission && TimeTakenDefuseMission < time) ? TimeTakenDefuseMission : time;
@@ -296,12 +285,10 @@ void CStats::SaveStats(uint8 *buf, uint32 *size)
sizeof(KgsOfExplosivesUsed) +
sizeof(InstantHitsFiredByPlayer) +
sizeof(InstantHitsHitByPlayer) +
- sizeof(CarsCrushed) +
sizeof(HeadsPopped) +
sizeof(TimesArrested) +
sizeof(TimesDied) +
sizeof(DaysPassed) +
- sizeof(mmRain) +
sizeof(MaximumJumpDistance) +
sizeof(MaximumJumpHeight) +
sizeof(MaximumJumpFlips) +
@@ -327,7 +314,6 @@ void CStats::SaveStats(uint8 *buf, uint32 *size)
sizeof(CriminalsCaught) +
sizeof(HighestLevelAmbulanceMission) +
sizeof(FiresExtinguished) +
- sizeof(LongestFlightInDodo) +
sizeof(TimeTakenDefuseMission) +
sizeof(NumberKillFrenziesPassed) +
sizeof(TotalNumberKillFrenzies) +
@@ -351,12 +337,10 @@ void CStats::SaveStats(uint8 *buf, uint32 *size)
CopyToBuf(buf, KgsOfExplosivesUsed);
CopyToBuf(buf, InstantHitsFiredByPlayer);
CopyToBuf(buf, InstantHitsHitByPlayer);
- CopyToBuf(buf, CarsCrushed);
CopyToBuf(buf, HeadsPopped);
CopyToBuf(buf, TimesArrested);
CopyToBuf(buf, TimesDied);
CopyToBuf(buf, DaysPassed);
- CopyToBuf(buf, mmRain);
CopyToBuf(buf, MaximumJumpDistance);
CopyToBuf(buf, MaximumJumpHeight);
CopyToBuf(buf, MaximumJumpFlips);
@@ -382,7 +366,6 @@ void CStats::SaveStats(uint8 *buf, uint32 *size)
CopyToBuf(buf, CriminalsCaught);
CopyToBuf(buf, HighestLevelAmbulanceMission);
CopyToBuf(buf, FiresExtinguished);
- CopyToBuf(buf, LongestFlightInDodo);
CopyToBuf(buf, TimeTakenDefuseMission);
CopyToBuf(buf, NumberKillFrenziesPassed);
CopyToBuf(buf, TotalNumberKillFrenzies);
@@ -415,12 +398,10 @@ void CStats::LoadStats(uint8 *buf, uint32 size)
CopyFromBuf(buf, KgsOfExplosivesUsed);
CopyFromBuf(buf, InstantHitsFiredByPlayer);
CopyFromBuf(buf, InstantHitsHitByPlayer);
- CopyFromBuf(buf, CarsCrushed);
CopyFromBuf(buf, HeadsPopped);
CopyFromBuf(buf, TimesArrested);
CopyFromBuf(buf, TimesDied);
CopyFromBuf(buf, DaysPassed);
- CopyFromBuf(buf, mmRain);
CopyFromBuf(buf, MaximumJumpDistance);
CopyFromBuf(buf, MaximumJumpHeight);
CopyFromBuf(buf, MaximumJumpFlips);
@@ -446,7 +427,6 @@ void CStats::LoadStats(uint8 *buf, uint32 size)
CopyFromBuf(buf, CriminalsCaught);
CopyFromBuf(buf, HighestLevelAmbulanceMission);
CopyFromBuf(buf, FiresExtinguished);
- CopyFromBuf(buf, LongestFlightInDodo);
CopyFromBuf(buf, TimeTakenDefuseMission);
CopyFromBuf(buf, NumberKillFrenziesPassed);
CopyFromBuf(buf, TotalNumberKillFrenzies);
diff --git a/src/core/Stats.h b/src/core/Stats.h
index 8588fef1..7dd527ea 100644
--- a/src/core/Stats.h
+++ b/src/core/Stats.h
@@ -25,8 +25,8 @@ public:
static int32 TimesDied;
static int32 TimesArrested;
static int32 KillsSinceLastCheckpoint;
- static int32 DistanceTravelledInVehicle;
- static int32 DistanceTravelledOnFoot;
+ static float DistanceTravelledInVehicle;
+ static float DistanceTravelledOnFoot;
static int32 CarsExploded;
static int32 PeopleKilledByPlayer;
static int32 ProgressMade;
@@ -53,7 +53,6 @@ public:
static int32 CriminalsCaught;
static int32 HighestLevelAmbulanceMission;
static int32 FiresExtinguished;
- static int32 LongestFlightInDodo;
static int32 TimeTakenDefuseMission;
static int32 TotalNumberKillFrenzies;
static int32 TotalNumberMissions;
@@ -62,8 +61,6 @@ public:
static int32 InstantHitsFiredByPlayer;
static int32 InstantHitsHitByPlayer;
static int32 BestTimeBombDefusal;
- static int32 mmRain;
- static int32 CarsCrushed;
static int32 FastestTimes[TOTAL_FASTEST_TIMES];
static int32 HighestScores[TOTAL_HIGHEST_SCORES];
static int32 BestPositions[TOTAL_BEST_POSITIONS];
@@ -90,7 +87,6 @@ public:
static void RegisterLevelAmbulanceMission(int32);
static void AnotherFireExtinguished();
static wchar *FindCriminalRatingString();
- static void RegisterLongestFlightInDodo(int32);
static void RegisterTimeTakenDefuseMission(int32);
static void AnotherKillFrenzyPassed();
static void SetTotalNumberKillFrenzies(int32);
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index d560a695..3c32b856 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -44,7 +44,7 @@ int32 CStreaming::ms_oldSectorX;
int32 CStreaming::ms_oldSectorY;
int32 CStreaming::ms_streamingBufferSize;
int8 *CStreaming::ms_pStreamingBuffer[2];
-int32 CStreaming::ms_memoryUsed;
+size_t CStreaming::ms_memoryUsed;
CStreamingChannel CStreaming::ms_channel[2];
int32 CStreaming::ms_channelError;
int32 CStreaming::ms_numVehiclesLoaded;
@@ -61,7 +61,7 @@ uint16 CStreaming::ms_loadedGangCars;
int32 CStreaming::ms_imageOffsets[NUMCDIMAGES];
int32 CStreaming::ms_lastImageRead;
int32 CStreaming::ms_imageSize;
-uint32 CStreaming::ms_memoryAvailable;
+size_t CStreaming::ms_memoryAvailable;
int32 desiredNumVehiclesLoaded = 12;
@@ -200,9 +200,9 @@ CStreaming::Init2(void)
debug("Streaming buffer size is %d sectors", ms_streamingBufferSize);
#define MB (1024*1024)
- ms_memoryAvailable = 65*MB;
+ ms_memoryAvailable = 65 * MB;
desiredNumVehiclesLoaded = 25;
- debug("Memory allocated to Streaming is %dMB", ms_memoryAvailable/MB);
+ debug("Memory allocated to Streaming is %dMB", ms_memoryAvailable / MB);
#undef MB
// find island LODs
@@ -723,7 +723,11 @@ CStreaming::RequestBigBuildings(eLevelName level, const CVector &pos)
n = CPools::GetBuildingPool()->GetSize()-1;
for(i = n; i >= 0; i--){
b = CPools::GetBuildingPool()->GetSlot(i);
- if(b && b->bIsBIGBuilding && b->m_level == level)
+ if(b && b->bIsBIGBuilding
+#ifndef NO_ISLAND_LOADING
+ && b->m_level == level
+#endif
+ )
if(b->bStreamBIGBuilding){
if(CRenderer::ShouldModelBeStreamed(b, pos))
RequestModel(b->GetModelIndex(), 0);
@@ -795,6 +799,7 @@ CStreaming::InstanceLoadedModels(const CVector &pos)
void
CStreaming::RequestIslands(eLevelName level)
{
+#ifndef NO_ISLAND_LOADING
switch(level){
case LEVEL_MAINLAND:
if(islandLODbeach != -1)
@@ -806,6 +811,7 @@ CStreaming::RequestIslands(eLevelName level)
break;
default: break;
}
+#endif
}
//--MIAMI: TODO
@@ -1010,10 +1016,12 @@ CStreaming::RemoveBuildings(eLevelName level)
void
CStreaming::RemoveUnusedBigBuildings(eLevelName level)
{
+#ifndef NO_ISLAND_LOADING
if(level != LEVEL_BEACH)
RemoveBigBuildings(LEVEL_BEACH);
if(level != LEVEL_MAINLAND)
RemoveBigBuildings(LEVEL_MAINLAND);
+#endif
RemoveIslandsNotUsed(level);
}
@@ -1035,6 +1043,7 @@ DeleteIsland(CEntity *island)
void
CStreaming::RemoveIslandsNotUsed(eLevelName level)
{
+#ifndef NO_ISLAND_LOADING
int i;
if(pIslandLODmainlandEntity == nil)
for(i = CPools::GetBuildingPool()->GetSize()-1; i >= 0; i--){
@@ -1053,8 +1062,10 @@ CStreaming::RemoveIslandsNotUsed(eLevelName level)
break;
case LEVEL_BEACH:
DeleteIsland(pIslandLODbeachEntity);
+
break;
}
+#endif // !NO_ISLAND_LOADING
}
//--MIAMI: done
@@ -1380,11 +1391,11 @@ CStreaming::StreamVehiclesAndPeds(void)
}
if(FindPlayerPed()->m_pWanted->AreFbiRequired()){
- RequestModel(MI_FBICAR, STREAMFLAGS_DONT_REMOVE);
+ RequestModel(MI_FBIRANCH, STREAMFLAGS_DONT_REMOVE);
RequestModel(MI_FBI, STREAMFLAGS_DONT_REMOVE);
}else{
- SetModelIsDeletable(MI_FBICAR);
- if(!HasModelLoaded(MI_FBICAR))
+ SetModelIsDeletable(MI_FBIRANCH);
+ if(!HasModelLoaded(MI_FBIRANCH))
SetModelIsDeletable(MI_FBI);
}
@@ -1594,7 +1605,7 @@ CStreaming::LoadBigBuildingsWhenNeeded(void)
if(CCutsceneMgr::IsCutsceneProcessing())
return;
- if(CTheZones::m_CurrLevel == LEVEL_NONE ||
+ if(CTheZones::m_CurrLevel == LEVEL_GENERIC ||
CTheZones::m_CurrLevel == CGame::currLevel)
return;
@@ -1612,7 +1623,7 @@ CStreaming::LoadBigBuildingsWhenNeeded(void)
CGame::TidyUpMemory(true, true);
CReplay::EmptyReplayBuffer();
- if(CGame::currLevel != LEVEL_NONE)
+ if(CGame::currLevel != LEVEL_GENERIC)
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
CStreaming::RequestBigBuildings(CGame::currLevel, TheCamera.GetPosition());
@@ -2374,7 +2385,7 @@ CStreaming::DeleteRwObjectsAfterDeath(const CVector &pos)
}
void
-CStreaming::DeleteRwObjectsBehindCamera(int32 mem)
+CStreaming::DeleteRwObjectsBehindCamera(size_t mem)
{
int ix, iy;
int x, y;
@@ -2549,7 +2560,7 @@ CStreaming::DeleteRwObjectsInOverlapSectorList(CPtrList &list, int32 x, int32 y)
}
bool
-CStreaming::DeleteRwObjectsBehindCameraInSectorList(CPtrList &list, int32 mem)
+CStreaming::DeleteRwObjectsBehindCameraInSectorList(CPtrList &list, size_t mem)
{
CPtrNode *node;
CEntity *e;
@@ -2570,7 +2581,7 @@ CStreaming::DeleteRwObjectsBehindCameraInSectorList(CPtrList &list, int32 mem)
}
bool
-CStreaming::DeleteRwObjectsNotInFrustumInSectorList(CPtrList &list, int32 mem)
+CStreaming::DeleteRwObjectsNotInFrustumInSectorList(CPtrList &list, size_t mem)
{
CPtrNode *node;
CEntity *e;
@@ -2597,7 +2608,7 @@ CStreaming::MakeSpaceFor(int32 size)
// the code still happens to work in that case because ms_memoryAvailable is unsigned
// but it's not nice....
- while((uint32)ms_memoryUsed >= ms_memoryAvailable - size)
+ while(ms_memoryUsed >= ms_memoryAvailable - size)
if(!RemoveLeastUsedModel(STREAMFLAGS_20)){
DeleteRwObjectsBehindCamera(ms_memoryAvailable - size);
return;
@@ -2620,16 +2631,16 @@ CStreaming::LoadScene(const CVector &pos)
}
CRenderer::m_loadingPriority = false;
DeleteAllRwObjects();
- if(level == LEVEL_NONE)
+ if(level == LEVEL_GENERIC)
level = CGame::currLevel;
CGame::currLevel = level;
RemoveUnusedBigBuildings(level);
RequestBigBuildings(level, pos);
- RequestBigBuildings(LEVEL_NONE, pos);
+ RequestBigBuildings(LEVEL_GENERIC, pos);
RemoveIslandsNotUsed(level);
LoadAllRequestedModels(false);
InstanceBigBuildings(level, pos);
- InstanceBigBuildings(LEVEL_NONE, pos);
+ InstanceBigBuildings(LEVEL_GENERIC, pos);
AddModelsToRequestList(pos);
CRadar::StreamRadarSections(pos);
@@ -2688,7 +2699,8 @@ CStreaming::UpdateForAnimViewer(void)
if (CStreaming::ms_channelError == -1) {
CStreaming::AddModelsToRequestList(CVector(0.0f, 0.0f, 0.0f));
CStreaming::LoadRequestedModels();
- sprintf(gString, "Requested %d, memory size %dK\n", CStreaming::ms_numModelsRequested, 2 * CStreaming::ms_memoryUsed);
+ // original modifier was %d
+ sprintf(gString, "Requested %d, memory size %zuK\n", CStreaming::ms_numModelsRequested, 2 * CStreaming::ms_memoryUsed);
}
else {
CStreaming::RetryLoadFile(CStreaming::ms_channelError);
diff --git a/src/core/Streaming.h b/src/core/Streaming.h
index 8a92266f..569c06d8 100644
--- a/src/core/Streaming.h
+++ b/src/core/Streaming.h
@@ -89,7 +89,7 @@ public:
static int32 ms_oldSectorY;
static int32 ms_streamingBufferSize;
static int8 *ms_pStreamingBuffer[2];
- static int32 ms_memoryUsed;
+ static size_t ms_memoryUsed;
static CStreamingChannel ms_channel[2];
static int32 ms_channelError;
static int32 ms_numVehiclesLoaded;
@@ -106,7 +106,7 @@ public:
static int32 ms_imageOffsets[NUMCDIMAGES];
static int32 ms_lastImageRead;
static int32 ms_imageSize;
- static uint32 ms_memoryAvailable;
+ static size_t ms_memoryAvailable;
static void Init(void);
static void Init2(void);
@@ -193,11 +193,11 @@ public:
static void DeleteFarAwayRwObjects(const CVector &pos);
static void DeleteAllRwObjects(void);
static void DeleteRwObjectsAfterDeath(const CVector &pos);
- static void DeleteRwObjectsBehindCamera(int32 mem);
+ static void DeleteRwObjectsBehindCamera(size_t mem);
static void DeleteRwObjectsInSectorList(CPtrList &list);
static void DeleteRwObjectsInOverlapSectorList(CPtrList &list, int32 x, int32 y);
- static bool DeleteRwObjectsBehindCameraInSectorList(CPtrList &list, int32 mem);
- static bool DeleteRwObjectsNotInFrustumInSectorList(CPtrList &list, int32 mem);
+ static bool DeleteRwObjectsBehindCameraInSectorList(CPtrList &list, size_t mem);
+ static bool DeleteRwObjectsNotInFrustumInSectorList(CPtrList &list, size_t mem);
static void LoadScene(const CVector &pos);
static void LoadSceneCollision(const CVector &pos);
diff --git a/src/core/SurfaceTable.h b/src/core/SurfaceTable.h
index d8f9be3d..359ebd5c 100644
--- a/src/core/SurfaceTable.h
+++ b/src/core/SurfaceTable.h
@@ -53,6 +53,41 @@ enum
struct CColPoint;
+inline bool
+IsSeeThrough(uint8 surfType)
+{
+ switch(surfType)
+ case SURFACE_GLASS:
+ case SURFACE_TRANSPARENT_CLOTH:
+ case SURFACE_METAL_CHAIN_FENCE:
+ case SURFACE_TRANSPARENT_STONE:
+ case SURFACE_SCAFFOLD_POLE:
+ return true;
+ return false;
+}
+
+// I think the necessity of this function is really a bug
+inline bool
+IsSeeThroughVertical(uint8 surfType)
+{
+ switch(surfType)
+ case SURFACE_GLASS:
+ case SURFACE_TRANSPARENT_CLOTH:
+ return true;
+ return false;
+}
+
+inline bool
+IsShootThrough(uint8 surfType)
+{
+ switch(surfType)
+ case SURFACE_METAL_CHAIN_FENCE:
+ case SURFACE_TRANSPARENT_STONE:
+ case SURFACE_SCAFFOLD_POLE:
+ return true;
+ return false;
+}
+
class CSurfaceTable
{
static float ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
diff --git a/src/core/TempColModels.cpp b/src/core/TempColModels.cpp
index c6a9d368..e12b48dd 100644
--- a/src/core/TempColModels.cpp
+++ b/src/core/TempColModels.cpp
@@ -37,19 +37,19 @@ CTempColModels::Initialise(void)
#define SET_COLMODEL_SPHERES(colmodel, sphrs)\
colmodel.numSpheres = ARRAY_SIZE(sphrs);\
colmodel.spheres = sphrs;\
- colmodel.level = LEVEL_NONE;\
+ colmodel.level = LEVEL_GENERIC;\
colmodel.ownsCollisionVolumes = false;\
int i;
ms_colModelBBox.boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f));
ms_colModelBBox.boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f));
- ms_colModelBBox.level = LEVEL_NONE;
+ ms_colModelBBox.level = LEVEL_GENERIC;
for (i = 0; i < ARRAY_SIZE(ms_colModelCutObj); i++) {
ms_colModelCutObj[i].boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f));
ms_colModelCutObj[i].boundingBox.Set(CVector(-2.0f, -2.0f, -2.0f), CVector(2.0f, 2.0f, 2.0f));
- ms_colModelCutObj[i].level = LEVEL_NONE;
+ ms_colModelCutObj[i].level = LEVEL_GENERIC;
}
// Ped Spheres
diff --git a/src/core/User.cpp b/src/core/User.cpp
index 56e37ac4..53196d03 100644
--- a/src/core/User.cpp
+++ b/src/core/User.cpp
@@ -74,6 +74,14 @@ CPlaceName::Display()
CHud::SetZoneName(text);
}
+void
+CPlaceName::ProcessAfterFrontEndShutDown(void)
+{
+ CHud::m_pLastZoneName = nil;
+ CHud::m_ZoneState = 0;
+ m_nAdditionalTimer = 250;
+}
+
CCurrentVehicle::CCurrentVehicle()
{
Init();
diff --git a/src/core/User.h b/src/core/User.h
index 153ef57b..dd53a40a 100644
--- a/src/core/User.h
+++ b/src/core/User.h
@@ -16,6 +16,7 @@ public:
void Init();
void Process();
void Display();
+ void ProcessAfterFrontEndShutDown();
};
class CCurrentVehicle
diff --git a/src/core/Wanted.cpp b/src/core/Wanted.cpp
index 83407c56..c70a3ab5 100644
--- a/src/core/Wanted.cpp
+++ b/src/core/Wanted.cpp
@@ -182,7 +182,7 @@ CWanted::RegisterCrime(eCrimeType type, const CVector &coors, uint32 id, bool po
void
CWanted::RegisterCrime_Immediately(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare)
{
-#ifdef FIX_BUGS
+#ifdef FIX_SIGNIFICANT_BUGS
if(!AddCrimeToQ(type, id, coors, true, policeDoesntCare))
#else
if(!AddCrimeToQ(type, id, coors, false, policeDoesntCare))
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 8399161f..7126b26f 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -1785,7 +1785,7 @@ CWorld::ClearForRestart(void)
CWorld::Remove(pEntity);
delete pEntity;
}
- for(CPtrNode *pNode = GetBigBuildingList(LEVEL_NONE).first; pNode; pNode = pNode->next) {
+ for(CPtrNode *pNode = GetBigBuildingList(LEVEL_GENERIC).first; pNode; pNode = pNode->next) {
CVehicle *pVehicle = (CVehicle *)pNode->item;
if(pVehicle && pVehicle->IsVehicle() && pVehicle->IsPlane()) {
CWorld::Remove(pVehicle);
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp
index 84b5ca29..3095b36d 100644
--- a/src/core/Zones.cpp
+++ b/src/core/Zones.cpp
@@ -93,7 +93,7 @@ CTheZones::Init(void)
InfoZoneArray[0].maxx = 1600.0f;
InfoZoneArray[0].maxy = 2000.0f;
InfoZoneArray[0].maxz = 500.0f;
- InfoZoneArray[0].level = LEVEL_NONE;
+ InfoZoneArray[0].level = LEVEL_GENERIC;
InfoZoneArray[0].type = ZONE_INFO;
strcpy(NavigationZoneArray[0].name, "VICE_C");
@@ -103,10 +103,10 @@ CTheZones::Init(void)
NavigationZoneArray[0].maxx = 1600.0f;
NavigationZoneArray[0].maxy = 2000.0f;
NavigationZoneArray[0].maxz = 500.0f;
- NavigationZoneArray[0].level = LEVEL_NONE;
- NavigationZoneArray[0].type = ZONE_NAVIG;
+ NavigationZoneArray[0].level = LEVEL_GENERIC;
+ NavigationZoneArray[0].type = ZONE_DEFAULT;
- m_CurrLevel = LEVEL_NONE;
+ m_CurrLevel = LEVEL_GENERIC;
for(i = 0; i < NUMMAPZONES; i++){
memset(&MapZoneArray[i], 0, sizeof(CZone));
@@ -120,7 +120,7 @@ CTheZones::Init(void)
MapZoneArray[0].maxx = 1600.0f;
MapZoneArray[0].maxy = 2000.0f;
MapZoneArray[0].maxz = 500.0f;
- MapZoneArray[0].level = LEVEL_NONE;
+ MapZoneArray[0].level = LEVEL_GENERIC;
}
//--MIAMI: done
diff --git a/src/core/common.h b/src/core/common.h
index 3ead4f1d..d22c1715 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -17,7 +17,11 @@
#if defined _WIN32 && defined WITHD3D
#include <windows.h>
+#ifndef USE_D3D9
#include <d3d8types.h>
+#else
+#include <d3d9types.h>
+#endif
#endif
#include <rwcore.h>
@@ -37,6 +41,7 @@
#define HIERNODEINFO(hier) ((hier)->pNodeInfo)
#define HIERNODEID(hier, i) ((hier)->pNodeInfo[i].nodeID)
#define HANIMFRAME(anim, i) ((RwUInt8*)(anim)->pFrames + (i)*(anim)->interpInfo->keyFrameSize)
+#define RpHAnimStdInterpFrame RpHAnimStdKeyFrame
#endif
#ifdef RWHALFPIXEL
diff --git a/src/core/config.h b/src/core/config.h
index 7ba1a6fd..c9c65051 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -54,7 +54,7 @@ enum Config {
NUMBOATALPHALIST = 20,
NUMALPHAENTITYLIST = 200,
NUMALPHAUNTERWATERENTITYLIST = 30,
- NUMCOLCACHELINKS = 200,
+ NUMCOLCACHELINKS = 50,
NUMREFERENCES = 800,
// Zones
@@ -67,6 +67,7 @@ enum Config {
NUMATTRIBZONES = 704,
NUMOCCLUSIONVOLUMES = 350,
+ NUMACTIVEOCCLUDERS = 48,
PATHNODESIZE = 4500,
@@ -165,6 +166,7 @@ enum Config {
#if defined GTA_PS2
# define GTA_PS2_STUFF
# define RANDOMSPLASH
+# define COMPRESSED_COL_VECTORS
#elif defined GTA_PC
# define GTA3_1_1_PATCH
//# define GTA3_STEAM_PATCH
@@ -213,7 +215,10 @@ enum Config {
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
+//#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
+//#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU
//#define USE_TEXTURE_POOL
+#define CUTSCENE_BORDERS_SWITCH
// Water & Particle
#define PC_PARTICLE
@@ -242,8 +247,7 @@ enum Config {
//# define PS2_MENU_USEALLPAGEICONS
#else
//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
-# define MENU_MAP // VC-like menu map. Make sure you have new menu.txd
-# define SCROLLABLE_STATS_PAGE // only draggable by mouse atm
+# define MAP_ENHANCEMENTS // Adding waypoint etc.
# define TRIANGLE_BACK_BUTTON
//# define CIRCLE_BACK_BUTTON
//#define CUSTOM_FRONTEND_OPTIONS
@@ -257,7 +261,7 @@ enum Config {
//#define MISSION_REPLAY // mobile feature
#endif
//#define SIMPLIER_MISSIONS // apply simplifications from mobile
-//#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
+#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
#define SCRIPT_LOG_FILE_LEVEL 1 // 0 == no log, 1 == overwrite every frame, 2 == full log
#ifndef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
@@ -270,7 +274,7 @@ enum Config {
// Vehicles
#define EXPLODING_AIRTRAIN // can blow up jumbo jet with rocket launcher
-//#define REMOVE_TREADABLE_PATHFIND
+#define CPLANE_ROTORS // make the rotors of the NPC police heli rotate
// Pickups
//#define MONEY_MESSAGES
@@ -286,3 +290,6 @@ enum Config {
// Camera
#define IMPROVED_CAMERA // Better Debug cam, and maybe more in the future
#define FREE_CAM // Rotating cam
+
+// Audio
+#define AUDIO_CACHE // cache sound lengths to speed up the cold boot
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 6e6092f3..d4ef8c4b 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -61,6 +61,8 @@
#include "MemoryCard.h"
#include "SceneEdit.h"
#include "debugmenu.h"
+#include "Occlusion.h"
+#include "Ropes.h"
GlobalScene Scene;
@@ -249,7 +251,11 @@ DoFade(void)
}
// This is CCamera::GetScreenRect in VC
- if(TheCamera.m_WideScreenOn){
+ if(TheCamera.m_WideScreenOn
+#ifdef CUTSCENE_BORDERS_SWITCH
+ && CMenuManager::m_PrefsCutsceneBorders
+#endif
+ ){
float y = SCREEN_HEIGHT/2 * TheCamera.m_ScreenReductionPercentage/100.0f;
rect.left = 0.0f;
rect.right = SCREEN_WIDTH;
@@ -299,7 +305,12 @@ PluginAttach(void)
return FALSE;
}
-
+#ifndef LIBRW
+ if (!RtAnimInitialize())
+ {
+ return FALSE;
+ }
+#endif
if( !RpHAnimPluginAttach() )
{
printf("Couldn't attach RpHAnim plugin\n");
@@ -464,6 +475,11 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
{
CSprite2d *splash;
+#ifdef DISABLE_LOADING_SCREEN
+ if (str1 && str2)
+ return;
+#endif
+
#ifndef RANDOMSPLASH
splashscreen = "LOADSC0";
#endif
@@ -858,6 +874,7 @@ RenderEffects(void)
CGlass::Render();
CWaterCannons::Render();
CSpecialFX::Render();
+ CRopes::Render();
CShadows::RenderStaticShadows();
CShadows::RenderStoredShadows();
CSkidmarks::Render();
@@ -885,7 +902,11 @@ Render2dStuff(void)
CReplay::Display();
CPickups::RenderPickUpText();
- if(TheCamera.m_WideScreenOn)
+ if(TheCamera.m_WideScreenOn
+#ifdef CUTSCENE_BORDERS_SWITCH
+ && CMenuManager::m_PrefsCutsceneBorders
+#endif
+ )
TheCamera.DrawBordersForWideScreen();
CPed *player = FindPlayerPed();
@@ -930,6 +951,7 @@ Render2dStuff(void)
CGarages::PrintMessages();
CPad::PrintErrorMessage();
CFont::DrawFonts();
+ COcclusion::Render();
#ifdef DEBUGMENU
DebugMenuRender();
diff --git a/src/core/patcher.cpp b/src/core/patcher.cpp
deleted file mode 100644
index 83e06886..00000000
--- a/src/core/patcher.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-#define WITHWINDOWS
-#include "common.h"
-#include "patcher.h"
-
-#include <algorithm>
-#include <vector>
-
-StaticPatcher *StaticPatcher::ms_head;
-
-StaticPatcher::StaticPatcher(Patcher func)
- : m_func(func)
-{
- m_next = ms_head;
- ms_head = this;
-}
-
-void
-StaticPatcher::Apply()
-{
- StaticPatcher *current = ms_head;
- while(current){
- current->Run();
- current = current->m_next;
- }
- ms_head = nil;
-}
-#ifdef _WIN32
-std::vector<uint32> usedAddresses;
-
-static DWORD protect[2];
-static uint32 protect_address;
-static uint32 protect_size;
-
-void
-Protect_internal(uint32 address, uint32 size)
-{
- protect_address = address;
- protect_size = size;
- VirtualProtect((void*)address, size, PAGE_EXECUTE_READWRITE, &protect[0]);
-}
-
-void
-Unprotect_internal(void)
-{
- VirtualProtect((void*)protect_address, protect_size, protect[0], &protect[1]);
-}
-
-void
-InjectHook_internal(uint32 address, uint32 hook, int type)
-{
- if(std::any_of(usedAddresses.begin(), usedAddresses.end(),
- [address](uint32 value) { return value == address; })) {
- debug("Used address %#06x twice when injecting hook\n", address);
- }
-
- usedAddresses.push_back(address);
-
-
- switch(type){
- case PATCH_JUMP:
- VirtualProtect((void*)address, 5, PAGE_EXECUTE_READWRITE, &protect[0]);
- *(uint8*)address = 0xE9;
- break;
- case PATCH_CALL:
- VirtualProtect((void*)address, 5, PAGE_EXECUTE_READWRITE, &protect[0]);
- *(uint8*)address = 0xE8;
- break;
- default:
- VirtualProtect((void*)(address + 1), 4, PAGE_EXECUTE_READWRITE, &protect[0]);
- break;
- }
-
- *(ptrdiff_t*)(address + 1) = hook - address - 5;
- if(type == PATCH_NOTHING)
- VirtualProtect((void*)(address + 1), 4, protect[0], &protect[1]);
- else
- VirtualProtect((void*)address, 5, protect[0], &protect[1]);
-}
-#else
-void
-Protect_internal(uint32 address, uint32 size)
-{
-}
-
-void
-Unprotect_internal(void)
-{
-}
-
-void
-InjectHook_internal(uint32 address, uint32 hook, int type)
-{
-}
-#endif
diff --git a/src/core/patcher.h b/src/core/patcher.h
deleted file mode 100644
index 2722b6fd..00000000
--- a/src/core/patcher.h
+++ /dev/null
@@ -1,144 +0,0 @@
-#pragma once
-
-#define WRAPPER __declspec(naked)
-#define DEPRECATED __declspec(deprecated)
-#define EAXJMP(a) { _asm mov eax, a _asm jmp eax }
-#define VARJMP(a) { _asm jmp a }
-#define WRAPARG(a) UNREFERENCED_PARAMETER(a)
-
-#include <string.h> //memset
-
-enum
-{
- PATCH_CALL,
- PATCH_JUMP,
- PATCH_NOTHING,
-};
-
-enum
-{
- III_10 = 1,
- III_11,
- III_STEAM,
- VC_10,
- VC_11,
- VC_STEAM
-};
-
-extern int gtaversion;
-
-class StaticPatcher
-{
-private:
- using Patcher = void(*)();
-
- Patcher m_func;
- StaticPatcher *m_next;
- static StaticPatcher *ms_head;
-
- void Run() { m_func(); }
-public:
- StaticPatcher(Patcher func);
- static void Apply();
-};
-
-template<typename T>
-inline T AddressByVersion(uint32_t addressIII10, uint32_t addressIII11, uint32_t addressIIISteam, uint32_t addressvc10, uint32_t addressvc11, uint32_t addressvcSteam)
-{
- if(gtaversion == -1){
- if(*(uint32_t*)0x5C1E75 == 0xB85548EC) gtaversion = III_10;
- else if(*(uint32_t*)0x5C2135 == 0xB85548EC) gtaversion = III_11;
- else if(*(uint32_t*)0x5C6FD5 == 0xB85548EC) gtaversion = III_STEAM;
- else if(*(uint32_t*)0x667BF5 == 0xB85548EC) gtaversion = VC_10;
- else if(*(uint32_t*)0x667C45 == 0xB85548EC) gtaversion = VC_11;
- else if(*(uint32_t*)0x666BA5 == 0xB85548EC) gtaversion = VC_STEAM;
- else gtaversion = 0;
- }
- switch(gtaversion){
- case III_10:
- return (T)addressIII10;
- case III_11:
- return (T)addressIII11;
- case III_STEAM:
- return (T)addressIIISteam;
- case VC_10:
- return (T)addressvc10;
- case VC_11:
- return (T)addressvc11;
- case VC_STEAM:
- return (T)addressvcSteam;
- default:
- return (T)0;
- }
-}
-
-inline bool
-is10(void)
-{
- return gtaversion == III_10 || gtaversion == VC_10;
-}
-
-inline bool
-isIII(void)
-{
- return gtaversion >= III_10 && gtaversion <= III_STEAM;
-}
-
-inline bool
-isVC(void)
-{
- return gtaversion >= VC_10 && gtaversion <= VC_STEAM;
-}
-
-#define PTRFROMCALL(addr) (uint32_t)(*(uint32_t*)((uint32_t)addr+1) + (uint32_t)addr + 5)
-#define INTERCEPT(saved, func, a) \
-{ \
- saved = PTRFROMCALL(a); \
- InjectHook(a, func); \
-}
-
-void InjectHook_internal(uint32 address, uint32 hook, int type);
-void Protect_internal(uint32 address, uint32 size);
-void Unprotect_internal(void);
-
-template<typename T, typename AT> inline void
-Patch(AT address, T value)
-{
- Protect_internal((uint32)address, sizeof(T));
- *(T*)address = value;
- Unprotect_internal();
-}
-
-template<typename AT> inline void
-Nop(AT address, unsigned int nCount)
-{
- Protect_internal((uint32)address, nCount);
- memset((void*)address, 0x90, nCount);
- Unprotect_internal();
-}
-
-template <typename T> inline void
-InjectHook(uintptr_t address, T hook, unsigned int nType = PATCH_NOTHING)
-{
- InjectHook_internal(address, reinterpret_cast<uintptr_t>((void *&)hook), nType);
-}
-
-inline void ExtractCall(void *dst, uint32_t a)
-{
- *(uint32_t*)dst = (uint32_t)(*(uint32_t*)(a+1) + a + 5);
-}
-template<typename T>
-inline void InterceptCall(void *dst, T func, uint32_t a)
-{
- ExtractCall(dst, a);
- InjectHook(a, func);
-}
-template<typename T>
-inline void InterceptVmethod(void *dst, T func, uint32_t a)
-{
- *(uint32_t*)dst = *(uint32_t*)a;
- Patch(a, func);
-}
-
-#define STARTPATCHES static StaticPatcher Patcher([](){
-#define ENDPATCHES });
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 6032fc4a..81b2bfc0 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -2,8 +2,8 @@
#define WITHWINDOWS
#include "common.h"
#include "crossplatform.h"
-#include "patcher.h"
#include "Renderer.h"
+#include "Occlusion.h"
#include "Credits.h"
#include "Camera.h"
#include "Weather.h"
@@ -77,7 +77,6 @@ mysrand(unsigned int seed)
void ReloadFrontendOptions(void)
{
- RemoveCustomFrontendOptions();
CustomFrontendOptionsPopulate();
}
@@ -135,10 +134,20 @@ void ToggleFreeCam(int8 action)
}
#endif
+#ifdef CUTSCENE_BORDERS_SWITCH
+void BorderModeChange(int8 displayedValue)
+{
+ CMenuManager::m_PrefsCutsceneBorders = !!displayedValue;
+ FrontEndMenuManager.SaveSettings();
+}
+#endif
+
// Reloaded on language change, so you can use hardcoded wchar* and TheText.Get with peace of mind
void
CustomFrontendOptionsPopulate(void)
{
+ RemoveCustomFrontendOptions(); // if exist
+
#ifdef MORE_LANGUAGES
FrontendOptionSetPosition(MENUPAGE_LANGUAGE_SETTINGS);
FrontendOptionAddDynamic(TheText.Get("FEL_POL"), nil, LangPolSelect, nil);
@@ -152,16 +161,17 @@ CustomFrontendOptionsPopulate(void)
FrontendOptionAddSelect(TheText.Get("SCRFOR"), screenModes, 2, (int8*)&FrontEndMenuManager.m_nPrefsWindowed, true, ScreenModeChange, nil);
#endif
-#ifdef MENU_MAP
- FrontendOptionSetPosition(MENUPAGE_PAUSE_MENU, 2);
- FrontendOptionAddRedirect(TheText.Get("FEG_MAP"), MENUPAGE_MAP);
-#endif
-
#ifdef FREE_CAM
static const wchar *text = (wchar*)L"TOGGLE FREE CAM";
FrontendOptionSetPosition(MENUPAGE_CONTROLLER_PC, 1);
FrontendOptionAddDynamic(text, nil, ToggleFreeCam, nil);
#endif
+
+#ifdef CUTSCENE_BORDERS_SWITCH
+ static const wchar *off_on[] = { TheText.Get("FEM_OFF"), TheText.Get("FEM_ON") };
+ FrontendOptionSetPosition(MENUPAGE_GRAPHICS_SETTINGS, 9);
+ FrontendOptionAddSelect((const wchar *)L"CUTSCENE BORDERS", off_on, 2, (int8 *)&CMenuManager::m_PrefsCutsceneBorders, false, BorderModeChange, nil);
+#endif
}
#endif
@@ -252,7 +262,7 @@ FixCar(void)
}
}
-#ifdef MENU_MAP
+#ifdef MAP_ENHANCEMENTS
static void
TeleportToWaypoint(void)
{
@@ -474,6 +484,8 @@ DebugMenuPopulate(void)
DebugMenuAddCmd("Spawn", "Spawn PCJ 600", [](){ SpawnCar(MI_PCJ600); });
DebugMenuAddCmd("Spawn", "Spawn Faggio", [](){ SpawnCar(MI_FAGGIO); });
DebugMenuAddCmd("Spawn", "Spawn Freeway", [](){ SpawnCar(MI_FREEWAY); });
+ DebugMenuAddCmd("Spawn", "Spawn Squalo", [](){ SpawnCar(MI_SQUALO); });
+ DebugMenuAddCmd("Spawn", "Spawn Skimmer", [](){ SpawnCar(MI_SKIMMER); });
DebugMenuAddVarBool8("Render", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil);
DebugMenuAddVarBool8("Render", "Backface Culling", &gBackfaceCulling, nil);
@@ -483,6 +495,7 @@ DebugMenuPopulate(void)
DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil);
DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil);
DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil);
+ DebugMenuAddVarBool8("Render", "Occlusion debug", &bDisplayOccDebugStuff, nil);
DebugMenuAddVarBool8("Render", "Show Ped Paths", &gbShowPedPaths, nil);
DebugMenuAddVarBool8("Render", "Show Car Paths", &gbShowCarPaths, nil);
DebugMenuAddVarBool8("Render", "Show Car Path Links", &gbShowCarPathsLinks, nil);
@@ -497,7 +510,7 @@ DebugMenuPopulate(void)
DebugMenuAddVarBool8("Debug", "pad 1 -> pad 2", &CPad::m_bMapPadOneToPadTwo, nil);
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
-#ifdef MENU_MAP
+#ifdef MAP_ENHANCEMENTS
DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint);
#endif
DebugMenuAddCmd("Debug", "Switch car collision", SwitchCarCollision);
diff --git a/src/entities/Building.cpp b/src/entities/Building.cpp
index 3217e684..921055ce 100644
--- a/src/entities/Building.cpp
+++ b/src/entities/Building.cpp
@@ -17,7 +17,7 @@ CBuilding::ReplaceWithNewModel(int32 id)
m_modelIndex = id;
if(bIsBIGBuilding)
- if(m_level == LEVEL_NONE || m_level == CGame::currLevel)
+ if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
}
diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp
index e0cdbeb0..518c36c5 100644
--- a/src/entities/Entity.cpp
+++ b/src/entities/Entity.cpp
@@ -31,6 +31,7 @@
#include "Ped.h"
#include "Dummy.h"
#include "WindModifiers.h"
+#include "Occlusion.h"
//--MIAMI: file almost done (see TODO)
@@ -359,8 +360,8 @@ CEntity::SetupBigBuilding(void)
if(mi->m_lodDistances[0] <= 2000.0f)
bStreamBIGBuilding = true;
if(mi->m_lodDistances[0] > 2500.0f || mi->m_ignoreDrawDist)
- m_level = LEVEL_NONE;
- else if(m_level == LEVEL_NONE)
+ m_level = LEVEL_GENERIC;
+ else if(m_level == LEVEL_GENERIC)
printf("%s isn't in a level\n", mi->GetName());
}
@@ -619,6 +620,23 @@ CEntity::PruneReferences(void)
}
}
+// Clean up the reference from *pent -> 'this'
+void
+CEntity::CleanUpOldReference(CEntity **pent)
+{
+ CReference* ref, ** lastnextp;
+ lastnextp = &m_pFirstReference;
+ for (ref = m_pFirstReference; ref; ref = ref->next) {
+ if (ref->pentity == pent) {
+ *lastnextp = ref->next;
+ ref->next = CReferences::pEmptyList;
+ CReferences::pEmptyList = ref;
+ break;
+ }
+ lastnextp = &ref->next;
+ }
+}
+
void
CEntity::UpdateRpHAnim(void)
{
@@ -630,7 +648,7 @@ CEntity::UpdateRpHAnim(void)
char buf[256];
if(this == (CEntity*)FindPlayerPed())
for(i = 0; i < hier->numNodes; i++){
- RpHAnimStdKeyFrame *kf = (RpHAnimStdKeyFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
+ RpHAnimStdInterpFrame *kf = (RpHAnimStdInterpFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
sprintf(buf, "%6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %d %s",
kf->q.imag.x, kf->q.imag.y, kf->q.imag.z, kf->q.real,
kf->t.x, kf->t.y, kf->t.z,
@@ -1157,3 +1175,36 @@ bool IsEntityPointerValid(CEntity* pEntity)
}
return false;
}
+
+bool CEntity::IsEntityOccluded(void) {
+
+ CVector coors;
+ float width, height;
+
+ if (COcclusion::NumActiveOccluders == 0 || !CalcScreenCoors(GetBoundCentre(), &coors, &width, &height))
+ return false;
+
+ float area = Max(width, height) * GetBoundRadius() * 0.9f;
+
+ for (int i = 0; i < COcclusion::NumActiveOccluders; i++) {
+ if (coors.z - (GetBoundRadius() * 0.85f) > COcclusion::aActiveOccluders[i].radius) {
+ if (COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, area)) {
+ return true;
+ }
+
+ if (COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) {
+ CVector min = m_matrix * CModelInfo::GetModelInfo(GetModelIndex())->GetColModel()->boundingBox.min;
+ CVector max = m_matrix * CModelInfo::GetModelInfo(GetModelIndex())->GetColModel()->boundingBox.max;
+
+ if (CalcScreenCoors(min, &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+ if (CalcScreenCoors(CVector(max.x, max.y, min.z), &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+ if (CalcScreenCoors(CVector(max.x, min.y, max.z), &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+ if (CalcScreenCoors(CVector(min.x, max.y, max.z), &coors) && !COcclusion::aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+
+ return true;
+ }
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/src/entities/Entity.h b/src/entities/Entity.h
index c3e4cc3b..fd01b6f8 100644
--- a/src/entities/Entity.h
+++ b/src/entities/Entity.h
@@ -156,8 +156,7 @@ public:
bool GetIsOnScreenComplex(void);
bool IsVisible(void) { return m_rwObject && bIsVisible && GetIsOnScreen(); }
bool IsVisibleComplex(void) { return m_rwObject && bIsVisible && GetIsOnScreenComplex(); }
-// TODO(MIAMI):
- bool IsEntityOccluded(void) { return false; }
+ bool IsEntityOccluded(void);
int16 GetModelIndex(void) const { return m_modelIndex; }
void UpdateRwFrame(void);
void SetupBigBuilding(void);
@@ -169,6 +168,7 @@ public:
void RegisterReference(CEntity **pent);
void ResolveReferences(void);
void PruneReferences(void);
+ void CleanUpOldReference(CEntity **pent);
#ifdef PED_SKIN
void UpdateRpHAnim(void);
diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp
index 12345cc9..5fe29a79 100644
--- a/src/entities/Physical.cpp
+++ b/src/entities/Physical.cpp
@@ -75,7 +75,7 @@ CPhysical::CPhysical(void)
#ifdef FIX_BUGS
m_nSurfaceTouched = SURFACE_DEFAULT;
#endif
- m_nZoneLevel = LEVEL_NONE;
+ m_nZoneLevel = LEVEL_GENERIC;
bIsFrozen = false;
bDontLoadCollision = false;
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index 7a2b136e..b9ff0144 100644
--- a/src/fakerw/fake.cpp
+++ b/src/fakerw/fake.cpp
@@ -35,9 +35,9 @@ RwReal RwV3dLength(const RwV3d * in) { return length(*in); }
//void RwV3dAssign(RwV3d * out, const RwV3d * ina);
void RwV3dAdd(RwV3d * out, const RwV3d * ina, const RwV3d * inb) { *out = add(*ina, *inb); }
void RwV3dSub(RwV3d * out, const RwV3d * ina, const RwV3d * inb) { *out = sub(*ina, *inb); }
-//void RwV3dScale(RwV3d * out, const RwV3d * in, RwReal scalar);
-//void RwV3dIncrementScaled(RwV3d * out, const RwV3d * in, RwReal scalar);
-//void RwV3dNegate(RwV3d * out, const RwV3d * in);
+void RwV3dScale(RwV3d * out, const RwV3d * in, RwReal scalar) { *out = scale(*in, scalar); }
+void RwV3dIncrementScaled(RwV3d * out, const RwV3d * in, RwReal scalar) { *out = add(*out, scale(*in, scalar)); }
+void RwV3dNegate(RwV3d * out, const RwV3d * in) { *out = neg(*in); }
RwReal RwV3dDotProduct(const RwV3d * ina, const RwV3d * inb) { return dot(*ina, *inb); }
//void RwV3dCrossProduct(RwV3d * out, const RwV3d * ina, const RwV3d * inb);
RwV3d *RwV3dTransformPoints(RwV3d * pointsOut, const RwV3d * pointsIn, RwInt32 numPoints, const RwMatrix * matrix)
@@ -137,7 +137,7 @@ RwCamera *RwCameraCreate(void) { return rw::Camera::create(); }
RwCamera *RwCameraClone(RwCamera * camera) { return camera->clone(); }
RwCamera *RwCameraSetViewOffset(RwCamera *camera, const RwV2d *offset) { camera->setViewOffset(offset); return camera; }
RwCamera *RwCameraSetViewWindow(RwCamera *camera, const RwV2d *viewWindow) { camera->setViewWindow(viewWindow); return camera; }
-RwCamera *RwCameraSetProjection(RwCamera *camera, RwCameraProjection projection);
+RwCamera *RwCameraSetProjection(RwCamera *camera, RwCameraProjection projection) { camera->projection = projection; return camera; }
RwCamera *RwCameraSetNearClipPlane(RwCamera *camera, RwReal nearClip) { camera->setNearPlane(nearClip); return camera; }
RwCamera *RwCameraSetFarClipPlane(RwCamera *camera, RwReal farClip) { camera->setFarPlane(farClip); return camera; }
RwInt32 RwCameraRegisterPlugin(RwInt32 size, RwUInt32 pluginID, RwPluginObjectConstructor constructCB, RwPluginObjectDestructor destructCB, RwPluginObjectCopy copyCB);
@@ -308,7 +308,7 @@ ConvertTexRaster(rw::Raster *ras)
Image *img = ras->toImage();
ras->destroy();
- img->unindex();
+ img->unpalettize();
ras = Raster::createFromImage(img);
img->destroy();
return ras;
@@ -376,23 +376,19 @@ RwStream *RwStreamOpen(RwStreamType type, RwStreamAccessType accessType, const v
file = rwNewT(StreamFile, 1, 0);
memcpy(file, &fakefile, sizeof(StreamFile));
#ifndef _WIN32
- // Be case-insensitive and fix backslashes (from https://github.com/OneSadCookie/fcaseopen/)
- FILE* first = fopen((char*)pData, "r");
- char *r;
- if (!first) {
- r = (char*)alloca(strlen((char*)pData) + 2);
- // Use default path(and pass error handling to librw) if we can't find any match
- if (!casepath((char*)pData, r))
- r = (char*)pData;
+ char *r = casepath((char*)pData);
+ if (r) {
+ if (file->open((char*)r, mode)) {
+ free(r);
+ return file;
+ }
+ free(r);
} else
- fclose(first);
-
- if(file->open((char*)r, mode))
- return file;
-#else
- if(file->open((char*)pData, mode))
- return file;
#endif
+ {
+ if (file->open((char*)pData, mode))
+ return file;
+ }
rwFree(file);
return nil;
}
@@ -856,12 +852,41 @@ RpSkin *RpSkinGeometryGetSkin( RpGeometry *geometry ) { return Skin::get(geometr
RpAtomic *RpSkinAtomicSetHAnimHierarchy( RpAtomic *atomic, RpHAnimHierarchy *hierarchy ) { Skin::setHierarchy(atomic, hierarchy); return atomic; }
RpHAnimHierarchy *RpSkinAtomicGetHAnimHierarchy( const RpAtomic *atomic ) { return Skin::getHierarchy(atomic); }
+RwImage *
+RtBMPImageWrite(RwImage *image, const RwChar *imageName)
+{
+#ifndef _WIN32
+ char *r = casepath(imageName);
+ if (r) {
+ rw::writeBMP(image, r);
+ free(r);
+ } else {
+ rw::writeBMP(image, imageName);
+ }
+
+#else
+ rw::writeBMP(image, imageName);
+#endif
+ return image;
+}
+RwImage *
+RtBMPImageRead(const RwChar *imageName)
+{
+#ifndef _WIN32
+ RwImage *image;
+ char *r = casepath(imageName);
+ if (r) {
+ image = rw::readBMP(r);
+ free(r);
+ } else {
+ image = rw::readBMP(imageName);
+ }
+ return image;
-
-
-
-RwImage *RtBMPImageWrite(RwImage * image, const RwChar * imageName) { rw::writeBMP(image, imageName); return image; }
-RwImage *RtBMPImageRead(const RwChar * imageName) { return rw::readBMP(imageName); }
+#else
+ return rw::readBMP(imageName);
+#endif
+}
#include "rtquat.h"
diff --git a/src/fakerw/rphanim.h b/src/fakerw/rphanim.h
index 6ece8306..63059800 100644
--- a/src/fakerw/rphanim.h
+++ b/src/fakerw/rphanim.h
@@ -17,7 +17,15 @@ struct RpHAnimStdKeyFrame
RtQuat q;
RwV3d t;
};
-
+// same story, this one only exists in later RW versions
+// but we need it for 64 bit builds because offset and size differs!
+struct RpHAnimStdInterpFrame
+{
+ RpHAnimStdKeyFrame *keyFrame1;
+ RpHAnimStdKeyFrame *keyFrame2;
+ RtQuat q;
+ RwV3d t;
+};
enum RpHAnimHierarchyFlag
{
@@ -56,7 +64,7 @@ RwBool RpHAnimHierarchyUpdateMatrices(RpHAnimHierarchy *hierarchy);
#define rpHANIMHIERARCHYGETINTERPFRAME( hierarchy, nodeIndex ) \
( (void *)( ( (RwUInt8 *)&(hierarchy->interpolator[1]) + \
((nodeIndex) * \
- hierarchy->interpolator->currentAnimKeyFrameSize) ) ) )
+ hierarchy->interpolator->currentInterpKeyFrameSize) ) ) )
RpHAnimAnimation *RpHAnimAnimationCreate(RwInt32 typeID, RwInt32 numFrames, RwInt32 flags, RwReal duration);
diff --git a/src/math/maths.h b/src/math/maths.h
index 51b0ef10..8d68bf64 100644
--- a/src/math/maths.h
+++ b/src/math/maths.h
@@ -15,3 +15,5 @@ inline float Sqrt(float x) { return sqrtf(x); }
inline float RecipSqrt(float x, float y) { return x/Sqrt(y); }
inline float RecipSqrt(float x) { return RecipSqrt(1.0f, x); }
inline float Pow(float x, float y) { return powf(x, y); }
+inline float Floor(float x) { return floorf(x); }
+inline float Ceil(float x) { return ceilf(x); }
diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp
index a9caa867..8d07737f 100644
--- a/src/modelinfo/PedModelInfo.cpp
+++ b/src/modelinfo/PedModelInfo.cpp
@@ -110,7 +110,7 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump)
max.x = max.y = 0.5f;
max.z = 1.2f;
colmodel->boundingBox.Set(min, max);
- colmodel->level = LEVEL_NONE;
+ colmodel->level = LEVEL_GENERIC;
m_hitColModel = colmodel;
}
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp
index d1994c06..11f78495 100644
--- a/src/modelinfo/VehicleModelInfo.cpp
+++ b/src/modelinfo/VehicleModelInfo.cpp
@@ -89,7 +89,17 @@ RwObjectNameIdAssocation boatIds[] = {
{ "boat_flap_right", BOAT_FLAP_RIGHT, 0 },
{ "boat_rearflap_left", BOAT_REARFLAP_LEFT, 0 },
{ "boat_rearflap_right", BOAT_REARFLAP_RIGHT, 0 },
+#ifdef FIX_BUGS
+ // let's just accept both
+ { "windscreen", BOAT_WINDSCREEN, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_DRAWLAST },
{ "windscreen_hi_ok", BOAT_WINDSCREEN, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_DRAWLAST },
+#else
+#ifdef GTA_PS2
+ { "windscreen", BOAT_WINDSCREEN, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_DRAWLAST },
+#else
+ { "windscreen_hi_ok", BOAT_WINDSCREEN, VEHICLE_FLAG_WINDSCREEN | VEHICLE_FLAG_DRAWLAST },
+#endif
+#endif
{ "ped_frontseat", BOAT_POS_FRONTSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
{ nil, 0, 0 }
};
@@ -679,7 +689,11 @@ ChooseComponent(int32 rule, int32 comps)
return COMPRULE_COMPN(comps, n-1);
return -1;
case 4:
+#ifdef FIX_BUGS
+ return CGeneral::GetRandomNumberInRange(0, 6);
+#else
return CGeneral::GetRandomNumberInRange(0, 5);
+#endif
}
return -1;
}
@@ -1081,7 +1095,7 @@ CVehicleModelInfo::SetEnvironmentMapCB(RpAtomic *atomic, void *data)
RpGeometry *geo;
geo = RpAtomicGetGeometry(atomic);
- fx = 0;
+ fx = rpMATFXEFFECTNULL;
RpGeometryForAllMaterials(geo, GetMatFXEffectMaterialCB, &fx);
if(fx != rpMATFXEFFECTNULL){
RpMatFXAtomicEnableEffects(atomic);
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp
index cec45e1b..51c11775 100644
--- a/src/peds/CivilianPed.cpp
+++ b/src/peds/CivilianPed.cpp
@@ -170,9 +170,13 @@ CCivilianPed::CivilianAI(void)
}
}
+// --MIAMI: Done except comments
void
CCivilianPed::ProcessControl(void)
{
+ if (CharCreatedBy == TODO_CHAR)
+ return;
+
CPed::ProcessControl();
if (bWasPostponed)
@@ -198,7 +202,8 @@ CCivilianPed::ProcessControl(void)
// fall through
case PED_SEEK_POS:
if (Seek()) {
- if ((m_objective == OBJECTIVE_GOTO_AREA_ON_FOOT || m_objective == OBJECTIVE_RUN_TO_AREA || IsUseAttractorObjective(m_objective)) && m_pNextPathNode) {
+ if ((m_objective == OBJECTIVE_GOTO_AREA_ON_FOOT || m_objective == OBJECTIVE_RUN_TO_AREA || m_objective == OBJECTIVE_SPRINT_TO_AREA ||
+ IsUseAttractorObjective(m_objective)) && m_pNextPathNode) {
m_pNextPathNode = nil;
} else if (bRunningToPhone) {
@@ -207,10 +212,10 @@ CCivilianPed::ProcessControl(void)
m_phoneId = -1;
} else {
gPhoneInfo.m_aPhones[m_phoneId].m_nState = PHONE_STATE_REPORTING_CRIME;
- m_nPedState = PED_FACE_PHONE;
+ SetPedState(PED_FACE_PHONE);
}
} else if (m_objective != OBJECTIVE_KILL_CHAR_ANY_MEANS && m_objective != OBJECTIVE_KILL_CHAR_ON_FOOT) {
- if (m_objective == OBJECTIVE_FOLLOW_CHAR_IN_FORMATION) {
+ if (m_pedInObjective && m_objective == OBJECTIVE_FOLLOW_CHAR_IN_FORMATION) {
if (m_moved.Magnitude() == 0.0f) {
if (m_pedInObjective->m_nMoveState == PEDMOVE_STILL)
m_fRotationDest = m_pedInObjective->m_fRotationCur;
@@ -218,7 +223,8 @@ CCivilianPed::ProcessControl(void)
} else if (m_objective == OBJECTIVE_GOTO_CHAR_ON_FOOT
&& m_pedInObjective && m_pedInObjective->m_nMoveState != PEDMOVE_STILL) {
SetMoveState(m_pedInObjective->m_nMoveState);
- } else if (m_objective == OBJECTIVE_GOTO_AREA_ON_FOOT || m_objective == OBJECTIVE_RUN_TO_AREA || IsUseAttractorObjective(m_objective)) {
+ } else if (m_objective == OBJECTIVE_GOTO_AREA_ON_FOOT || m_objective == OBJECTIVE_RUN_TO_AREA || m_objective == OBJECTIVE_SPRINT_TO_AREA ||
+ IsUseAttractorObjective(m_objective)) {
SetIdle();
} else {
RestorePreviousState();
@@ -228,7 +234,7 @@ CCivilianPed::ProcessControl(void)
break;
case PED_FACE_PHONE:
if (FacePhone())
- m_nPedState = PED_MAKE_CALL;
+ SetPedState(PED_MAKE_CALL);
break;
case PED_MAKE_CALL:
if (MakePhonecall())
@@ -284,6 +290,8 @@ CCivilianPed::ProcessControl(void)
GetPosition().x - m_pMyVehicle->GetPosition().x, GetPosition().y - m_pMyVehicle->GetPosition().y, 0.0f);
DMAudio.PlayOneShot(m_pMyVehicle->m_audioEntityId, SOUND_CAR_JERK, 0.0f);
+ m_pMyVehicle->pDriver->Say(SOUND_PED_PLAYER_BEFORESEX);
+ Say(SOUND_PED_PLAYER_BEFORESEX);
int playerSexFrequency = CWorld::Players[CWorld::PlayerInFocus].m_nSexFrequency;
if (CWorld::Players[CWorld::PlayerInFocus].m_nMoney >= 10 && playerSexFrequency > 250) {
@@ -300,13 +308,17 @@ CCivilianPed::ProcessControl(void)
} else {
bWanderPathAfterExitingCar = true;
CWorld::Players[CWorld::PlayerInFocus].m_pHooker = nil;
+ ClearLeader();
SetObjective(OBJECTIVE_LEAVE_CAR, m_pMyVehicle);
+ m_pMyVehicle->pDriver->Say(SOUND_PED_PLAYER_AFTERSEX);
}
} else {
bWanderPathAfterExitingCar = true;
CWorld::Players[CWorld::PlayerInFocus].m_pHooker = nil;
m_pMyVehicle->pDriver->m_fHealth = CWorld::Players[0].m_nMaxHealth + 25.0f;
+ ClearLeader();
SetObjective(OBJECTIVE_LEAVE_CAR, m_pMyVehicle);
+ m_pMyVehicle->pDriver->Say(SOUND_PED_PLAYER_AFTERSEX);
}
} else {
CWorld::Players[CWorld::PlayerInFocus].m_nNextSexFrequencyUpdateTime = CTimer::GetTimeInMilliseconds() + 3000;
@@ -319,6 +331,7 @@ CCivilianPed::ProcessControl(void)
} else {
bWanderPathAfterExitingCar = true;
CWorld::Players[CWorld::PlayerInFocus].m_pHooker = nil;
+ ClearLeader();
SetObjective(OBJECTIVE_LEAVE_CAR, m_pMyVehicle);
}
}
@@ -340,6 +353,7 @@ CCivilianPed::ProcessControl(void)
CivilianAI();
if (CharCreatedBy == RANDOM_CHAR) {
+ // TODO(Miami): EnterVacantNearbyCars();
UseNearbyAttractors();
}
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
index d2daea42..6c9eb276 100644
--- a/src/peds/CopPed.cpp
+++ b/src/peds/CopPed.cpp
@@ -16,6 +16,8 @@
#include "CarCtrl.h"
#include "Renderer.h"
#include "Camera.h"
+#include "PedPlacement.h"
+#include "Ropes.h"
CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
{
@@ -39,12 +41,13 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
m_wepAccuracy = 76;
break;
case COP_SWAT:
+ case COP_HELI_SWAT:
SetModelIndex(MI_SWAT);
GiveDelayedWeapon(WEAPONTYPE_UZI, 1000);
SetCurrentWeapon(WEAPONTYPE_UZI);
m_fArmour = 50.0f;
m_wepSkills = 32; /* TODO: what is this? seems unused */
- m_wepAccuracy = 64;
+ m_wepAccuracy = 68;
break;
case COP_ARMY:
SetModelIndex(MI_ARMY);
@@ -77,14 +80,20 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
field_5FE = 1;
m_bIsDisabledCop = false;
m_attackTimer = 0;
+ m_bBeatingSuspect = false;
m_bStopAndShootDisabledZone = false;
field_601 = false;
m_bZoneDisabled = false;
field_628 = -1;
m_nRoadblockNode = -1; // TODO(Miami): this will be nil
- field_5FF = 0;
+ m_bThrowsSpikeTrap = false;
+ m_pRopeEntity = nil;
m_fAbseilPos = 0.0f;
- m_bBeatingSuspect = false;
+ m_nHassleTimer = 0;
+ field_61C = 0;
+ field_624 = 0;
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference((CEntity**)&m_pPointGunAt);
m_pPointGunAt = nil;
}
@@ -93,24 +102,17 @@ CCopPed::~CCopPed()
ClearPursuit();
}
+// --MIAMI: Done
// Parameter should always be CPlayerPed, but it seems they considered making civilians arrestable at some point
void
CCopPed::SetArrestPlayer(CPed *player)
{
if (!IsPedInControl() || !player)
return;
- /*
- switch (m_nCopType) {
- case COP_FBI:
- Say(SOUND_PED_ARREST_FBI);
- break;
- case COP_SWAT:
- Say(SOUND_PED_ARREST_SWAT);
- break;
- default:
- Say(SOUND_PED_ARREST_COP);
- break;
- } */
+
+ player->Say(SOUND_PED_PLAYER_REACTTOCOP);
+ Say(SOUND_PED_ARREST_COP);
+
if (player->EnteringCar()) {
if (CTimer::GetTimeInMilliseconds() > m_nPedStateTimer)
return;
@@ -125,14 +127,14 @@ CCopPed::SetArrestPlayer(CPed *player)
} else if (player->m_nPedState != PED_DIE && player->m_nPedState != PED_DEAD && player->m_nPedState != PED_ARRESTED) {
player->m_nLastPedState = player->m_nPedState;
- player->m_nPedState = PED_ARRESTED;
+ player->SetPedState(PED_ARRESTED);
FindPlayerPed()->m_bCanBeDamaged = false;
((CPlayerPed*)player)->m_pArrestingCop = this;
this->RegisterReference((CEntity**) &((CPlayerPed*)player)->m_pArrestingCop);
}
- m_nPedState = PED_ARREST_PLAYER;
+ SetPedState(PED_ARREST_PLAYER);
SetObjective(OBJECTIVE_NONE);
m_prevObjective = OBJECTIVE_NONE;
bIsPointingGunAt = false;
@@ -145,10 +147,11 @@ CCopPed::SetArrestPlayer(CPed *player)
player->m_pMyVehicle->bIsHandbrakeOn = true;
player->m_pMyVehicle->SetStatus(STATUS_PLAYER_DISABLED);
}
- if (GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED)
+ if (GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED || GetWeapon()->m_eWeaponType == WEAPONTYPE_BRASSKNUCKLE)
SetCurrentWeapon(WEAPONTYPE_COLT45);
}
+// --MIAMI: Done
void
CCopPed::ClearPursuit(void)
{
@@ -187,6 +190,7 @@ CCopPed::ClearPursuit(void)
bNotAllowedToDuck = false;
bKindaStayInSamePlace = false;
m_bStopAndShootDisabledZone = false;
+ field_601 = false;
m_bZoneDisabled = false;
ClearObjective();
if (IsPedInControl()) {
@@ -204,10 +208,14 @@ CCopPed::ClearPursuit(void)
}
}
+// --MIAMI: Done
// TODO: I don't know why they needed that parameter.
void
CCopPed::SetPursuit(bool ignoreCopLimit)
{
+ if (CTimer::GetTimeInMilliseconds() < field_61C)
+ return;
+
CWanted *wanted = FindPlayerPed()->m_pWanted;
if (m_bIsInPursuit || !IsPedInControl())
return;
@@ -233,6 +241,7 @@ CCopPed::SetPursuit(bool ignoreCopLimit)
}
}
+// --MIAMI: Done
void
CCopPed::ArrestPlayer(void)
{
@@ -298,6 +307,7 @@ CCopPed::ScanForCrimes(void)
}
}
+// --MIAMI: Done
void
CCopPed::CopAI(void)
{
@@ -315,11 +325,6 @@ CCopPed::CopAI(void)
if (bHitSomethingLastFrame) {
m_bZoneDisabled = true;
m_bIsDisabledCop = true;
-#ifdef FIX_BUGS
- m_nRoadblockNode = -1;
-#else
- m_nRoadblockNode = 0;
-#endif
bKindaStayInSamePlace = true;
bIsRunning = false;
bNotAllowedToDuck = false;
@@ -346,6 +351,27 @@ CCopPed::CopAI(void)
}
if (wantedLevel > 0) {
if (!m_bIsDisabledCop) {
+ // Turn and shoot the player's vehicle, if possible
+ if (!m_bIsInPursuit && !GetWeapon()->IsTypeMelee() && FindPlayerVehicle() && m_fDistanceToTarget < CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_fRange) {
+ if (FindPlayerVehicle()->m_vecMoveSpeed.Magnitude2D() > 0.1f) {
+ CVector2D distToVeh = GetPosition() - FindPlayerVehicle()->GetPosition();
+ distToVeh.Normalise();
+ CVector2D vehSpeed = FindPlayerVehicle()->m_vecMoveSpeed;
+ vehSpeed.Normalise();
+
+ if (DotProduct2D(distToVeh, vehSpeed) > 0.8f) {
+ SetLookFlag(playerOrHisVeh, true);
+ SetMoveState(PEDMOVE_STILL);
+ if (TurnBody()) {
+ SetAttack(FindPlayerVehicle());
+ SetShootTimer(CGeneral::GetRandomNumberInRange(500.0f, 1000.0f));
+ SetAttackTimer(CGeneral::GetRandomNumberInRange(200.0f, 300.0f));
+ }
+ } else if (m_nPedState == PED_ATTACK)
+ RestorePreviousState();
+ }
+ }
+
if (!m_bIsInPursuit || wanted->m_CurrentCops > wanted->m_MaxCops) {
CCopPed *copFarthestToTarget = nil;
float copFarthestToTargetDist = m_fDistanceToTarget;
@@ -388,11 +414,14 @@ CCopPed::CopAI(void)
if (wantedLevel > 1 && GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED)
SetCurrentWeapon(WEAPONTYPE_COLT45);
- else if (wantedLevel == 1 && GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && !FindPlayerPed()->m_pCurrentPhysSurface) {
+ else if (wantedLevel == 1 && GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED && !FindPlayerPed()->m_pCurrentPhysSurface) {
// i.e. if player is on top of car, cop will still use colt45.
- SetCurrentWeapon(WEAPONTYPE_UNARMED);
+ SetCurrentWeapon(GetWeaponSlot(WEAPONTYPE_NIGHTSTICK) >= 0 ? WEAPONTYPE_NIGHTSTICK : WEAPONTYPE_UNARMED);
}
+ if (m_bBeatingSuspect && GetWeapon()->m_eWeaponType == WEAPONTYPE_NIGHTSTICK)
+ Say(SOUND_PED_PULLOUTWEAPON);
+
if (FindPlayerVehicle()) {
if (m_bBeatingSuspect) {
--wanted->m_CopsBeatingSuspect;
@@ -403,18 +432,18 @@ CCopPed::CopAI(void)
}
return;
}
- float weaponRange = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_fRange;
+ SetCurrentWeapon(WEAPONTYPE_COLT45);
+ CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
+ float weaponRange = weaponInfo->m_fRange;
SetLookFlag(playerOrHisVeh, true);
TurnBody();
- SetCurrentWeapon(WEAPONTYPE_COLT45);
- if (!bIsDucking) {
+ if (!bIsDucking || bCrouchWhenShooting && GetCrouchFireAnim(weaponInfo)) {
if (m_attackTimer >= CTimer::GetTimeInMilliseconds()) {
if (m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT && !m_bZoneDisabled) {
CVector targetDist = playerOrHisVeh->GetPosition() - GetPosition();
if (m_fDistanceToTarget > 30.0f) {
- CAnimBlendAssociation* crouchShootAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RBLOCK_CSHOOT);
- if (crouchShootAssoc)
- crouchShootAssoc->blendDelta = -1000.0f;
+ if (bIsDucking)
+ ClearDuck();
// Target is coming onto us
if (DotProduct(playerOrHisVeh->m_vecMoveSpeed, targetDist) > 0.0f) {
@@ -432,42 +461,23 @@ CCopPed::CopAI(void)
bNotAllowedToDuck = false;
bDuckAndCover = false;
} else {
- // VC checks for != nil compared to buggy behaviour of III. I check for != -1 here.
-#ifdef VC_PED_PORTS
+ // TODO(Miami): Roadblock system is still III
float dotProd;
if (m_nRoadblockNode != -1) {
- // TODO(MIAMI): check this, i'm only getting this compile here....
CPathNode *roadBlockNode = &ThePaths.m_pathNodes[CRoadBlocks::RoadBlockNodes[m_nRoadblockNode]];
dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - roadBlockNode->GetPosition(), GetPosition() - roadBlockNode->GetPosition());
} else
dotProd = -1.0f;
if(dotProd >= 0.0f) {
-#else
-
-#ifndef FIX_BUGS
- float copRoadDotProd, targetRoadDotProd;
-#else
- float copRoadDotProd = 1.0f, targetRoadDotProd = 1.0f;
- if (m_nRoadblockNode != -1)
-#endif
- {
- CTreadable* roadBlockRoad = ThePaths.m_mapObjects[CRoadBlocks::RoadBlockObjects[m_nRoadblockNode]];
- CVector2D roadFwd = roadBlockRoad->GetForward();
- copRoadDotProd = DotProduct2D(GetPosition() - roadBlockRoad->GetPosition(), roadFwd);
- targetRoadDotProd = DotProduct2D(playerOrHisVeh->GetPosition() - roadBlockRoad->GetPosition(), roadFwd);
- }
- // Roadblock may be towards road's fwd or opposite, so check both
- if ((copRoadDotProd >= 0.0f || targetRoadDotProd >= 0.0f)
- && (copRoadDotProd <= 0.0f || targetRoadDotProd <= 0.0f)) {
-#endif
bIsPointingGunAt = true;
} else {
+ if (bIsDucking)
+ ClearDuck();
m_bIsDisabledCop = false;
bKindaStayInSamePlace = false;
bNotAllowedToDuck = false;
bCrouchWhenShooting = false;
- bIsDucking = false;
bDuckAndCover = false;
SetPursuit(false);
}
@@ -475,7 +485,6 @@ CCopPed::CopAI(void)
}
} else {
if (m_fDistanceToTarget < weaponRange) {
- CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
CVector gunPos = weaponInfo->m_vecFireOffset;
TransformToNode(gunPos, PED_HANDR);
@@ -484,6 +493,9 @@ CCopPed::CopAI(void)
if (!CWorld::ProcessLineOfSight(gunPos, playerOrHisVeh->GetPosition(), foundCol, foundEnt,
false, true, false, false, true, false, false)
|| foundEnt && foundEnt == playerOrHisVeh) {
+
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference((CEntity**) &m_pPointGunAt);
m_pPointGunAt = playerOrHisVeh;
if (playerOrHisVeh)
playerOrHisVeh->RegisterReference((CEntity**) &m_pPointGunAt);
@@ -491,7 +503,7 @@ CCopPed::CopAI(void)
SetAttack(playerOrHisVeh);
SetShootTimer(CGeneral::GetRandomNumberInRange(500, 1000));
}
- SetAttackTimer(CGeneral::GetRandomNumberInRange(100, 300));
+ SetAttackTimer(CGeneral::GetRandomNumberInRange(200, 300));
}
SetMoveState(PEDMOVE_STILL);
}
@@ -521,10 +533,8 @@ CCopPed::CopAI(void)
ClearObjective();
SetWanderPath(CGeneral::GetRandomNumber() & 7);
}
- }
-#ifdef VC_PED_PORTS
- else {
- if (m_objective != OBJECTIVE_KILL_CHAR_ON_FOOT && CharCreatedBy == RANDOM_CHAR) {
+ } else {
+ if (m_objective != OBJECTIVE_KILL_CHAR_ON_FOOT && m_objective != OBJECTIVE_HASSLE_CHAR && CharCreatedBy == RANDOM_CHAR) {
for (int i = 0; i < m_numNearPeds; i++) {
CPed *nearPed = m_nearPeds[i];
if (nearPed->CharCreatedBy == RANDOM_CHAR) {
@@ -544,12 +554,30 @@ CCopPed::CopAI(void)
nearPed->bBeingChasedByPolice = true;
return;
}
+ } else {
+ if (nearPed->m_nPedType != PEDTYPE_COP && !nearPed->IsPlayer()
+ && nearPed->IsPedInControl() && m_nHassleTimer < CTimer::GetTimeInMilliseconds()) {
+
+ if (nearPed->m_objective == OBJECTIVE_NONE && nearPed->m_nPedState == PED_WANDER_PATH
+ && !nearPed->m_pLookTarget && nearPed->m_lookTimer < CTimer::GetTimeInMilliseconds()) {
+
+ if ((GetPosition() - nearPed->GetPosition()).MagnitudeSqr() < sq(5.0f)) {
+
+ if (CWorld::GetIsLineOfSightClear(GetPosition(), nearPed->GetPosition(),
+ true, false, false, false, false, false, false)) {
+ Say(SOUND_PED_COP_REACTION);
+ SetObjective(OBJECTIVE_HASSLE_CHAR, nearPed);
+ nearPed->SetObjective(OBJECTIVE_WAIT_ON_FOOT_FOR_COP, this);
+ m_nHassleTimer = CTimer::GetTimeInMilliseconds() + 100000;
+ }
+ }
+ }
+ }
}
}
}
}
}
-#endif
}
}
} else {
@@ -560,18 +588,35 @@ CCopPed::CopAI(void)
bKindaStayInSamePlace = false;
bNotAllowedToDuck = false;
bCrouchWhenShooting = false;
- bIsDucking = false;
bDuckAndCover = false;
+ if (bIsDucking)
+ ClearDuck();
if (m_pMyVehicle)
SetObjective(OBJECTIVE_ENTER_CAR_AS_DRIVER, m_pMyVehicle);
}
}
}
+// --MIAMI: Done except commented things
void
CCopPed::ProcessControl(void)
{
+ if (m_nCopType == COP_HELI_SWAT)
+ ProcessHeliSwat();
+
CPed::ProcessControl();
+
+ if (m_bThrowsSpikeTrap) {
+ // TODO(Miami)
+ /*
+ if (CGame::currArea != AREA_MALL)
+ ProcessStingerCop();
+ */
+ return;
+ }
+
+ // TODO(Miami): CStinger::Process
+
if (bWasPostponed)
return;
@@ -603,25 +648,36 @@ CCopPed::ProcessControl(void)
if (IsPedInControl())
SetIdle();
}
- /*
+
if (m_bIsInPursuit) {
if (player->m_nPedState != PED_ARRESTED && !player->DyingOrDead()) {
- switch (m_nCopType) {
- case COP_FBI:
- Say(SOUND_PED_PURSUIT_FBI);
- break;
- case COP_SWAT:
- Say(SOUND_PED_PURSUIT_SWAT);
- break;
- case COP_ARMY:
- Say(SOUND_PED_PURSUIT_ARMY);
- break;
- default:
- Say(SOUND_PED_PURSUIT_COP);
- break;
+ if (player->m_pWanted->m_CurrentCops == 1) {
+ Say(SOUND_PED_COP_ALONE);
+ } else {
+ int numCopsNear = 0;
+ for (int i = 0; i < player->m_numNearPeds; ++i) {
+ CPed *nearPed = player->m_nearPeds[i];
+ if (nearPed->m_nPedType == PEDTYPE_COP && nearPed->m_nPedState != PED_DEAD)
+ ++numCopsNear;
+ }
+ if (numCopsNear <= 3) {
+ Say(SOUND_PED_COP_LITTLECOPSAROUND);
+ if (!player->bInVehicle) {
+ CVector distToPlayer = player->GetPosition() - GetPosition();
+ if (distToPlayer.MagnitudeSqr() < sq(20.0f)) {
+ player->Say(SOUND_PED_PLAYER_FARFROMCOPS);
+ if (player->m_nPedState != PED_ATTACK && player->m_nPedState != PED_AIM_GUN) {
+ player->SetLookFlag(this, false);
+ player->SetLookTimer(1000);
+ }
+ }
+ }
+ } else if ((CGeneral::GetRandomNumber() % 16) == 1) {
+ Say(SOUND_PED_COP_MANYCOPSAROUND);
+ }
}
}
- } */
+ }
if (IsPedInControl()) {
CopAI();
@@ -668,23 +724,10 @@ CCopPed::ProcessControl(void)
RestorePreviousObjective();
} else {
if (player->m_pMyVehicle && player->m_pMyVehicle->m_nNumGettingIn != 0) {
- // This is 1.3f when arresting in car without seeking first (in above)
-#if defined(VC_PED_PORTS) || defined(FIX_BUGS)
m_distanceToCountSeekDone = 1.3f;
-#else
- m_distanceToCountSeekDone = 2.0f;
-#endif
}
- if (bDuckAndCover) {
-#if !defined(GTA3_1_1_PATCH) && !defined(VC_PED_PORTS)
- if (!bNotAllowedToDuck && Seek()) {
- SetMoveState(PEDMOVE_STILL);
- SetMoveAnim();
- SetPointGunAt(m_pedInObjective);
- }
-#endif
- } else if (Seek()) {
+ if (!bDuckAndCover && Seek()) {
CVehicle *playerVeh = FindPlayerVehicle();
if (!playerVeh && player && player->EnteringCar()) {
SetArrestPlayer(player);
@@ -715,35 +758,100 @@ CCopPed::ProcessControl(void)
}
}
}
- if (!m_bStopAndShootDisabledZone)
- return;
- bool dontShoot = false;
- if (GetIsOnScreen()) {
- if (((CTimer::GetFrameCounter() + m_randomSeed) & 0x1F) == 17) {
- CEntity *foundBuilding = nil;
- CColPoint foundCol;
- CVector lookPos = GetPosition() + CVector(0.0f, 0.0f, 0.7f);
- CVector camPos = TheCamera.GetGameCamPosition();
- CWorld::ProcessLineOfSight(camPos, lookPos, foundCol, foundBuilding,
- true, false, false, false, false, false, false);
-
- // He's at least 15.0 far, in disabled zone, collided into somewhere (that's why m_bStopAndShootDisabledZone set),
- // and now has building on front of him. He's stupid, we don't need him.
- if (foundBuilding) {
- FlagToDestroyWhenNextProcessed();
- dontShoot = true;
+ if (m_pPointGunAt)
+ Say(SOUND_PED_COP_UNK_129);
+
+ if (m_bStopAndShootDisabledZone) {
+ bool dontShoot = false;
+ if (GetIsOnScreen()) {
+ if (((CTimer::GetFrameCounter() + m_randomSeed) & 0x1F) == 17) {
+ CEntity* foundBuilding = nil;
+ CColPoint foundCol;
+ CVector lookPos = GetPosition() + CVector(0.0f, 0.0f, 0.7f);
+ CVector camPos = TheCamera.GetGameCamPosition();
+ CWorld::ProcessLineOfSight(camPos, lookPos, foundCol, foundBuilding,
+ true, false, false, false, false, false, false);
+
+ // He's at least 15.0 far, in disabled zone, collided into somewhere (that's why m_bStopAndShootDisabledZone set),
+ // and now has building on front of him. He's stupid, we don't need him.
+ if (foundBuilding) {
+ FlagToDestroyWhenNextProcessed();
+ dontShoot = true;
+ }
}
+ } else {
+ FlagToDestroyWhenNextProcessed();
+ dontShoot = true;
}
- } else {
- FlagToDestroyWhenNextProcessed();
- dontShoot = true;
- }
- if (!dontShoot) {
- bStopAndShoot = true;
- bKindaStayInSamePlace = true;
- bIsPointingGunAt = true;
- SetAttack(m_pedInObjective);
+ if (!dontShoot) {
+ bStopAndShoot = true;
+ bKindaStayInSamePlace = true;
+ bIsPointingGunAt = true;
+ SetAttack(m_pedInObjective);
+ }
}
+
+ if (field_624 >= 2 && m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT) {
+ CVector centre = GetPosition() + CVector(0.f, 0.f, 0.65f);
+ if (CWorld::TestSphereAgainstWorld(centre, 0.35f, this, true, false, false, false, false, false)) {
+ field_624 = 0;
+ m_bStopAndShootDisabledZone = true;
+ ClearPursuit();
+ SetObjective(OBJECTIVE_NONE);
+ SetWanderPath(CGeneral::GetRandomNumberInRange(0,8));
+ field_61C = CTimer::GetTimeInMilliseconds() + 30000;
+ } else {
+ field_624 = 0;
+ if (GetWeapon()->IsTypeMelee()) {
+ // TODO(Miami): enum
+ for (int i = 3; i < 7; i++) {
+ if (HasWeaponSlot(i)) {
+ SetCurrentWeapon(i);
+ break;
+ }
+ }
+ SetMoveState(PEDMOVE_STILL);
+ bStopAndShoot = true;
+ }
+ }
+ } else if (CTimer::GetTimeStep() / 100.f <= m_fDistanceTravelled)
+ field_624 = 0;
}
+
+// --MIAMI: Done
+void
+CCopPed::ProcessHeliSwat(void)
+{
+ CVector bestPos = GetPosition();
+ SetPedState(PED_ABSEIL);
+ CPedPlacement::FindZCoorForPed(&bestPos);
+ if (GetPosition().z - 2.0f >= bestPos.z && m_pRopeEntity) {
+ m_fAbseilPos += 0.003f * CTimer::GetTimeStep();
+ m_vecMoveSpeed.z = -0.03f;
+ m_vecTurnSpeed = CVector(0.f, 0.f, (m_randomSeed % 32) * 0.003f - 0.05f);
+ CPhysical::ApplyTurnSpeed();
+ GetMatrix().Reorthogonalise();
+ CVector posOnRope;
+
+ if (CRopes::FindCoorsAlongRope(m_nRopeID, m_fAbseilPos, &posOnRope)) {
+ SetPosition(posOnRope);
+ } else {
+ bUsesCollision = true;
+ m_vecMoveSpeed = CVector(0.f, 0.f, 0.f);
+ SetPedState(PED_IDLE);
+ m_nCopType = COP_SWAT;
+ SetInTheAir();
+ bKnockedUpIntoAir = true;
+ }
+ Say(SOUND_PED_COP_HELIPILOTPHRASE);
+ } else {
+ bUsesCollision = true;
+ m_vecMoveSpeed = CVector(0.f, 0.f, 0.f);
+ SetPedState(PED_IDLE);
+ m_nCopType = COP_SWAT;
+ SetInTheAir();
+ bKnockedUpIntoAir = true;
+ }
+} \ No newline at end of file
diff --git a/src/peds/CopPed.h b/src/peds/CopPed.h
index e4ea072b..edec145e 100644
--- a/src/peds/CopPed.h
+++ b/src/peds/CopPed.h
@@ -6,7 +6,8 @@ enum eCopType
COP_STREET = 0,
COP_FBI = 1,
COP_SWAT = 2,
- COP_ARMY = 3,
+ COP_HELI_SWAT = 3,
+ COP_ARMY = 4,
COP_MIAMIVICE = 5
};
@@ -18,13 +19,18 @@ public:
bool m_bIsInPursuit;
bool m_bIsDisabledCop;
int8 field_5FE;
- int8 field_5FF;
bool m_bBeatingSuspect;
bool m_bStopAndShootDisabledZone;
bool field_601; // set when police dragging player from car
bool m_bZoneDisabled;
float m_fAbseilPos;
eCopType m_nCopType;
+ bool m_bThrowsSpikeTrap;
+ CEntity *m_pRopeEntity; // CHeli or 1
+ uintptr m_nRopeID;
+ uint32 m_nHassleTimer;
+ uint32 field_61C;
+ int32 field_624;
int8 field_628;
CCopPed(eCopType, int32 modifier = 0);
@@ -37,6 +43,7 @@ public:
void ArrestPlayer(void);
void ScanForCrimes(void);
void CopAI(void);
+ void ProcessHeliSwat(void);
};
#ifndef PED_SKIN
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index f03904fe..4e1c3c6d 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -408,10 +408,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
m_ped_flagI80 = false;
#endif
- m_gangFlags = 0xFF;
-
bReachedAttractorHeadingTarget = false;
bTurnedAroundOnAttractor = false;
+ bHasAlreadyUsedAttractor = false;
bCarPassenger = false;
bMiamiViceCop = false;
bMoneyHasBeenGivenByScript = false;
@@ -419,22 +418,29 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
bIsDrowning = false;
bDrownsInWater = true;
-#ifdef VC_PED_PORTS
bHeadStuckInCollision = false;
-#endif
+ bHeldHostageInCar = false;
bIsPlayerFriend = true;
bDeadPedInFrontOfCar = false;
+
+ m_gangFlags = 0xFF;
+
bStayInCarOnJack = false;
bDontFight = false;
bDoomAim = true;
bCanBeShotInVehicle = true;
+ bPushedAlongByCar = false;
b157_40 = false;
bIgnoreThreatsBehindObjects = false;
bNeverEverTargetThisPed = false;
+ bCrouchWhenScared = false;
+ bKnockedOffBike = false;
+ b158_8 = false;
b158_10 = false;
bBoughtIceCream = false;
+ b158_40 = false;
if ((CGeneral::GetRandomNumber() & 3) == 0)
bHasACamera = true;
@@ -465,7 +471,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
weapon.m_nTimer = 0;
}
- m_lastFightMove = m_lastHitState = 0;
+ m_curFightMove = m_lastFightMove = FIGHTMOVE_IDLE;
GiveWeapon(WEAPONTYPE_UNARMED, 0, true);
m_wepAccuracy = 60;
m_lastWepDam = -1;
@@ -484,6 +490,8 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
#ifdef PED_SKIN
m_pWeaponModel = nil;
#endif
+ m_delayedSoundID = -1;
+ m_delayedSoundTimer = 0;
CPopulation::UpdatePedCount((ePedType)m_nPedType, false);
}
@@ -578,7 +586,7 @@ CheckForPedsOnGroundToAttack(CPed *attacker, CPed **pedOnGround)
currentPedState = currentPed->m_nPedState;
- if (currentPedState == PED_FALL || currentPedState == PED_GETUP || currentPedState == PED_DIE || currentPedState == PED_DEAD) {
+ if (currentPed->OnGroundOrGettingUp()) {
if (distance < 2.0f && angleDiff < DEGTORAD(65.0f)) {
if (currentPedState == PED_DEAD) {
foundDead = 1;
@@ -1096,13 +1104,13 @@ CPed::FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg)
return;
}
- if (currentWeapon->m_bUse2nd && ped->bIsAttacking && currentWeapon->m_AnimToPlay != ASSOCGRP_THROW) {
+ if (GetSecondFireAnim(currentWeapon) && ped->bIsAttacking && currentWeapon->m_AnimToPlay != ASSOCGRP_THROW) {
AnimationId groundAnim = GetFireAnimGround(currentWeapon);
CAnimBlendAssociation *groundAnimAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), groundAnim);
if (!groundAnimAssoc || groundAnimAssoc->blendAmount <= 0.95f && groundAnimAssoc->blendDelta <= 0.0f) {
if (attackAssoc && attackAssoc->animId == ANIM_MELEE_ATTACK) {
newAnim = CAnimManager::BlendAnimation(
- ped->GetClump(), currentWeapon->m_AnimToPlay, ANIM_MELEE_ATTACK_2ND, 8.0f);
+ ped->GetClump(), currentWeapon->m_AnimToPlay, GetSecondFireAnim(currentWeapon), 8.0f);
} else {
newAnim = CAnimManager::BlendAnimation(
ped->GetClump(), currentWeapon->m_AnimToPlay, ANIM_MELEE_ATTACK, 8.0f);
@@ -1233,7 +1241,7 @@ CPed::Attack(void)
}
if (!weaponAnimAssoc) {
if (!!ourWeapon->m_bUse2nd) {
- weaponAnimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_FIRE_2ND);
+ weaponAnimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetSecondFireAnim(ourWeapon));
if (weaponAnimAssoc) {
animLoopStart = ourWeapon->m_fAnim2LoopStart;
animLoopEnd = ourWeapon->m_fAnim2LoopEnd;
@@ -1257,8 +1265,8 @@ CPed::Attack(void)
if (bCrouchWhenShooting && bIsDucking && !!ourWeapon->m_bCrouchFire) {
weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, GetCrouchFireAnim(ourWeapon), 8.0f);
- } else if(!!ourWeapon->m_bUse2nd && CGeneral::GetRandomNumber() & 1){
- weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, ANIM_WEAPON_FIRE_2ND, 8.0f);
+ } else if(GetSecondFireAnim(ourWeapon) && CGeneral::GetRandomNumber() & 1){
+ weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, GetSecondFireAnim(ourWeapon), 8.0f);
} else if (!CGame::nastyGame || (!ourWeapon->m_bGround2nd && !ourWeapon->m_bGround3rd) ||
ourWeaponFire != WEAPON_FIRE_MELEE || CheckForPedsOnGroundToAttack(this, nil) < PED_ON_THE_FLOOR) {
@@ -1407,7 +1415,6 @@ CPed::Attack(void)
weaponAnimTime = weaponAnimAssoc->currentTime;
firePos = ourWeapon->m_vecFireOffset;
- //TODO(Miami): Check
if (weaponAnimTime > 1.0f && weaponAnimTime - weaponAnimAssoc->timeStep <= 1.0f && weaponAnimAssoc->IsRunning()) {
TransformToNode(firePos, PED_HANDR);
@@ -1496,10 +1503,10 @@ CPed::Attack(void)
}
weaponAnimAssoc->SetFinishCallback(FinishedAttackCB, this);
} else if (!!ourWeapon->m_bUse2nd) {
- if (weaponAnimAssoc->animId == ANIM_WEAPON_FIRE_2ND) {
+ if (weaponAnimAssoc->animId == GetSecondFireAnim(ourWeapon)) {
weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, ANIM_WEAPON_FIRE, 8.0f);
} else {
- weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, ANIM_WEAPON_FIRE_2ND, 8.0f);
+ weaponAnimAssoc = CAnimManager::BlendAnimation(GetClump(), ourWeapon->m_AnimToPlay, GetSecondFireAnim(ourWeapon), 8.0f);
}
weaponAnimAssoc->SetFinishCallback(FinishedAttackCB, this);
} else {
@@ -2318,6 +2325,7 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
}
+// --MIAMI: Done
static void
particleProduceFootDust(CPed *ped, CVector const &pos, float size, int times)
{
@@ -2327,10 +2335,15 @@ particleProduceFootDust(CPed *ped, CVector const &pos, float size, int times)
case SURFACE_GRAVEL:
case SURFACE_PAVEMENT:
case SURFACE_SAND:
+ case SURFACE_SAND_BEACH:
+ case SURFACE_CONCRETE_BEACH:
for (int i = 0; i < times; ++i) {
CVector adjustedPos = pos;
adjustedPos.x += CGeneral::GetRandomNumberInRange(-0.1f, 0.1f);
adjustedPos.y += CGeneral::GetRandomNumberInRange(-0.1f, 0.1f);
+ // ??
+ CGeneral::GetRandomNumber();
+ CGeneral::GetRandomNumber();
CParticle::AddParticle(PARTICLE_PEDFOOT_DUST, adjustedPos, CVector(0.0f, 0.0f, 0.0f), nil, size, CRGBA(0, 0, 0, 0), 0, 0, 0, 0);
}
break;
@@ -2339,10 +2352,10 @@ particleProduceFootDust(CPed *ped, CVector const &pos, float size, int times)
}
}
+// --MIAMI: Done
static void
particleProduceFootSplash(CPed *ped, CVector const &pos, float size, int times)
{
-#ifdef PC_PARTICLE
for (int i = 0; i < times; i++) {
CVector adjustedPos = pos;
adjustedPos.x += CGeneral::GetRandomNumberInRange(-0.1f, 0.1f);
@@ -2351,21 +2364,20 @@ particleProduceFootSplash(CPed *ped, CVector const &pos, float size, int times)
CVector direction = ped->GetForward() * -0.05f;
CParticle::AddParticle(PARTICLE_RAIN_SPLASHUP, adjustedPos, direction, nil, size, CRGBA(32, 32, 32, 32), 0, 0, CGeneral::GetRandomNumber() & 1, 200);
}
-#else
- for ( int32 i = 0; i < times; i++ )
- {
- CVector adjustedPos = pos;
- adjustedPos.x += CGeneral::GetRandomNumberInRange(-0.2f, 0.2f);
- adjustedPos.y += CGeneral::GetRandomNumberInRange(-0.2f, 0.2f);
-
- CParticle::AddParticle(PARTICLE_RAIN_SPLASHUP, adjustedPos, CVector(0.0f, 0.0f, 0.0f), nil, size, CRGBA(0, 0, 0, 0), 0, 0, CGeneral::GetRandomNumber() & 1, 200);
- }
-#endif
}
+// --MIAMI: Done
void
CPed::PlayFootSteps(void)
{
+ CAnimBlendAssociation *assoc = RpAnimBlendClumpGetFirstAssociation(GetClump());
+ CAnimBlendAssociation *walkRunAssoc = nil;
+ float walkRunAssocBlend = 0.0f, idleAssocBlend = 0.0f;
+ bool isSkater = m_pedStats == CPedStats::ms_apPedStats[PEDSTAT_SKATER];
+
+ CVector footPosL(0.0f, 0.0f, 0.0f), footPosR(0.0f, 0.0f, 0.0f);
+ bool footPosLok = false, footPosRok = false;
+
if (bDoBloodyFootprints) {
if (m_bloodyFootprintCountOrDeathTime > 0 && m_bloodyFootprintCountOrDeathTime < 300) {
m_bloodyFootprintCountOrDeathTime--;
@@ -2378,10 +2390,6 @@ CPed::PlayFootSteps(void)
if (!bIsStanding)
return;
- CAnimBlendAssociation *assoc = RpAnimBlendClumpGetFirstAssociation(GetClump());
- CAnimBlendAssociation *walkRunAssoc = nil;
- float walkRunAssocBlend = 0.0f, idleAssocBlend = 0.0f;
-
for (; assoc; assoc = RpAnimBlendGetNextAssociation(assoc)) {
if (assoc->flags & ASSOC_WALK) {
walkRunAssoc = assoc;
@@ -2391,96 +2399,200 @@ CPed::PlayFootSteps(void)
}
}
-#ifdef GTA_PS2_STUFF
- CAnimBlendAssociation *runStopAsoc = NULL;
-
- if ( IsPlayer() )
- {
- runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP);
-
- if ( runStopAsoc == NULL )
- runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R);
- }
-
- if ( runStopAsoc != NULL && runStopAsoc->blendAmount > 0.1f )
- {
- {
- CVector pos(0.0f, 0.0f, 0.0f);
- TransformToNode(pos, PED_FOOTL);
-
- pos.z -= 0.1f;
- pos += GetForward()*0.2f;
- particleProduceFootDust(this, pos, 0.02f, 1);
- }
-
- {
- CVector pos(0.0f, 0.0f, 0.0f);
- TransformToNode(pos, PED_FOOTR);
-
- pos.z -= 0.1f;
- pos += GetForward()*0.2f;
- particleProduceFootDust(this, pos, 0.02f, 1);
- }
- }
-#endif
-
-
if (walkRunAssoc && walkRunAssocBlend > 0.5f && idleAssocBlend < 1.0f) {
- float stepStart = 1 / 15.0f;
+
+ float stepStart = 1.f / 15.f;
float stepEnd = walkRunAssoc->hierarchy->totalLength / 2.0f + stepStart;
float currentTime = walkRunAssoc->currentTime;
- int stepPart = 0;
- if (currentTime >= stepStart && currentTime - walkRunAssoc->timeStep < stepStart)
- stepPart = 1;
- else if (currentTime >= stepEnd && currentTime - walkRunAssoc->timeStep < stepEnd)
- stepPart = 2;
+ if (isSkater) {
+ // both are unused
+ static float stepStartSection = 1.0f;
+ static float animSections = 15.f;
- if (stepPart != 0) {
- DMAudio.PlayOneShot(m_audioEntityId, stepPart == 1 ? SOUND_STEP_START : SOUND_STEP_END, 1.0f);
- CVector footPos(0.0f, 0.0f, 0.0f);
- TransformToNode(footPos, stepPart == 1 ? PED_FOOTL : PED_FOOTR);
+ float moveStart, soundVolume, skateTime;
+ if (walkRunAssoc->animId == ANIM_WALK) {
+ moveStart = 0.0f;
+ skateTime = 8.f / 15.f;
+ } else {
+ moveStart = 0.0f;
+ skateTime = 5.f / 15.f;
+ }
+ switch (CSurfaceTable::GetAdhesionGroup(m_nSurfaceTouched)) {
+ case ADHESIVE_LOOSE:
+ if (CGeneral::GetRandomNumber() % 128) {
+ m_vecAnimMoveDelta *= 0.5f;
+ } else {
+ SetFall(0, ANIM_KO_SKID_BACK, false);
+ }
+ soundVolume = 0.5f;
+ break;
+ case ADHESIVE_SAND:
+ if (CGeneral::GetRandomNumber() % 64) {
+ m_vecAnimMoveDelta *= 0.2f;
+ } else {
+ SetFall(0, ANIM_KO_SKID_BACK, false);
+ }
+ soundVolume = 0.2f;
+ break;
+ case ADHESIVE_WET:
+ m_vecAnimMoveDelta *= 0.3f;
+ soundVolume = 0.2f;
+ break;
+ default:
+ soundVolume = 1.f;
+ break;
+ }
+ if (soundVolume > 0.2f && currentTime > moveStart && currentTime - walkRunAssoc->timeStep <= moveStart) {
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_SKATING, ((int)(127.f * soundVolume) | (walkRunAssoc->animId << 8)));
+ } else if (soundVolume > 0.2f) {
+ if (currentTime > skateTime && currentTime - walkRunAssoc->timeStep <= skateTime) {
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_SKATING, ((int)(127.f * soundVolume) | (walkRunAssoc->animId << 8)));
+ }
+ }
- CVector forward = GetForward();
+ } else {
+ int stepPart = 0;
+
+ // This section is shortened/optimized for sanity.
+
+ if (currentTime >= stepStart && currentTime - walkRunAssoc->timeStep < stepStart)
+ stepPart = 1;
+ else if (currentTime >= stepEnd && currentTime - walkRunAssoc->timeStep < stepEnd)
+ stepPart = 2;
+
+ if (stepPart != 0) {
+ CVector adjustedFootPos;
+ if (stepPart == 1) {
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_STEP_START, 1.0f);
+ TransformToNode(footPosL, PED_FOOTL);
+ footPosLok = true;
+ adjustedFootPos = footPosL;
+ } else {
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_STEP_END, 1.0f);
+ TransformToNode(footPosR, PED_FOOTR);
+ footPosRok = true;
+ adjustedFootPos = footPosR;
+ }
- footPos.z -= 0.1f;
- footPos += 0.2f * forward;
+ CVector forward = GetForward();
- if (bDoBloodyFootprints) {
- CVector2D top(forward * 0.26f);
+ adjustedFootPos.z -= 0.1f;
+ adjustedFootPos += 0.2f * forward;
+
+ if (bDoBloodyFootprints) {
+ CVector2D top(forward * 0.26f);
+ CVector2D right(GetRight() * (stepPart == 1 ? 0.14f : 0.1f));
+
+ CShadows::AddPermanentShadow(SHADOWTYPE_DARK, gpBloodPoolTex, &adjustedFootPos,
+ top.x, top.y,
+ right.x, right.y,
+ 255, 255, 0, 0, 4.0f, 3000.0f, 1.0f);
+
+ if (m_bloodyFootprintCountOrDeathTime <= 20) {
+ m_bloodyFootprintCountOrDeathTime = 0;
+ bDoBloodyFootprints = false;
+ } else {
+ m_bloodyFootprintCountOrDeathTime -= 20;
+ }
+ }
+ if (m_nSurfaceTouched == SURFACE_SAND || m_nSurfaceTouched == SURFACE_SAND_BEACH) {
+ CVector2D top(forward * -0.26f);
+ CVector2D right(GetRight() * (stepPart == 1 ? 0.1f : 0.14f));
+
+ CShadows::AddPermanentShadow(SHADOWTYPE_DARK, gpBloodPoolTex, &adjustedFootPos,
+ top.x, top.y,
+ right.x, right.y,
+ 120, 250, 250, 50, 4.0f, 5000.0f, 1.0f);
+ }
+ if (CWeather::Rain <= 0.1f || CCullZones::CamNoRain() || CCullZones::PlayerNoRain()) {
+ if (IsPlayer())
+ particleProduceFootDust(this, adjustedFootPos, 0.0f, 4);
+
+ } else if (stepPart == 2) {
+ particleProduceFootSplash(this, adjustedFootPos, 0.15f, 4);
+ }
+ }
+ }
+ }
+
+ if (IsPlayer() && !walkRunAssoc && bIsLanding) {
+ if (!footPosLok)
+ TransformToNode(footPosL, PED_FOOTL);
+
+ CVector forward = GetForward();
+
+ CVector adjustedFootPosL = footPosL;
+ adjustedFootPosL.z -= 0.1f;
+ adjustedFootPosL += 0.2f * forward;
+ if (bDoBloodyFootprints) {
+ CVector2D top(forward * 0.26f);
+ CVector2D right(GetRight() * 0.14f);
+
+ CShadows::AddPermanentShadow(SHADOWTYPE_DARK, gpBloodPoolTex, &adjustedFootPosL,
+ top.x, top.y,
+ right.x, right.y,
+ 255, 255, 0, 0, 4.0f, 3000.0f, 1.0f);
+
+ if (m_bloodyFootprintCountOrDeathTime <= 20) {
+ m_bloodyFootprintCountOrDeathTime = 0;
+ bDoBloodyFootprints = false;
+ }
+ else {
+ m_bloodyFootprintCountOrDeathTime -= 20;
+ }
+ }
+ if (!isSkater) {
+ if (m_nSurfaceTouched == SURFACE_SAND || m_nSurfaceTouched == SURFACE_SAND_BEACH) {
+ CVector2D top(forward * -0.26f);
CVector2D right(GetRight() * 0.14f);
- CShadows::AddPermanentShadow(SHADOWTYPE_DARK, gpBloodPoolTex, &footPos,
+ CShadows::AddPermanentShadow(SHADOWTYPE_DARK, gpBloodPoolTex, &adjustedFootPosL,
top.x, top.y,
right.x, right.y,
- 255, 255, 0, 0, 4.0f, 3000.0f, 1.0f);
-
- if (m_bloodyFootprintCountOrDeathTime <= 20) {
- m_bloodyFootprintCountOrDeathTime = 0;
- bDoBloodyFootprints = false;
- } else {
- m_bloodyFootprintCountOrDeathTime -= 20;
- }
+ 120, 250, 250, 50, 4.0f, 5000.0f, 1.0f);
}
- if (CWeather::Rain <= 0.1f || CCullZones::CamNoRain() || CCullZones::PlayerNoRain()) {
- if(IsPlayer())
- particleProduceFootDust(this, footPos, 0.0f, 4);
+ }
+ if(!footPosRok)
+ TransformToNode(footPosR, PED_FOOTR);
+
+ CVector adjustedFootPosR = footPosR;
+ adjustedFootPosR.z -= 0.1f;
+ adjustedFootPosR += 0.2f * forward;
+
+ if (bDoBloodyFootprints) {
+ CVector2D top(forward * 0.26f);
+ CVector2D right(GetRight() * 0.1f);
+
+ CShadows::AddPermanentShadow(SHADOWTYPE_DARK, gpBloodPoolTex, &adjustedFootPosR,
+ top.x, top.y,
+ right.x, right.y,
+ 255, 255, 0, 0, 4.0f, 3000.0f, 1.0f);
+
+ if (m_bloodyFootprintCountOrDeathTime <= 20) {
+ m_bloodyFootprintCountOrDeathTime = 0;
+ bDoBloodyFootprints = false;
+ } else {
+ m_bloodyFootprintCountOrDeathTime -= 20;
}
-#ifdef PC_PARTICLE
- else if(stepPart == 2)
-#else
- else
-#endif
- {
- particleProduceFootSplash(this, footPos, 0.15f, 4);
+ }
+ if (!isSkater) {
+ if (m_nSurfaceTouched == SURFACE_SAND || m_nSurfaceTouched == SURFACE_SAND_BEACH) {
+ CVector2D top(forward * -0.26f);
+ CVector2D right(GetRight() * 0.14f);
+
+ CShadows::AddPermanentShadow(SHADOWTYPE_DARK, gpBloodPoolTex, &adjustedFootPosR,
+ top.x, top.y,
+ right.x, right.y,
+ 120, 250, 250, 50, 4.0f, 5000.0f, 1.0f);
}
}
}
if (m_nSurfaceTouched == SURFACE_WATER) {
+ CRGBA rubberSmokeColor(255, 255, 255, 196);
float pedSpeed = CVector2D(m_vecMoveSpeed).Magnitude();
if (pedSpeed > 0.03f && CTimer::GetFrameCounter() % 2 == 0 && pedSpeed > 0.13f) {
-#ifdef PC_PARTICLE
float particleSize = pedSpeed * 2.0f;
if (particleSize < 0.25f)
@@ -2492,19 +2604,23 @@ CPed::PlayFootSteps(void)
CVector particlePos = GetPosition() + GetForward() * 0.3f;
particlePos.z -= 1.2f;
- CVector particleDir = m_vecMoveSpeed * 0.75f;
+ CVector particleDir = m_vecMoveSpeed * -0.75f;
particleDir.z = CGeneral::GetRandomNumberInRange(0.01f, 0.03f);
- CParticle::AddParticle(PARTICLE_PED_SPLASH, particlePos, particleDir, nil, 0.8f * particleSize, CRGBA(155,155,185,128), 0, 0, 0, 0);
+ CParticle::AddParticle(PARTICLE_CAR_SPLASH, particlePos, particleDir, nil, 0.5f * particleSize, CRGBA(0,0,0,0), 0, 0, 0, 0);
+ CParticle::AddParticle(PARTICLE_RUBBER_SMOKE, particlePos, particleDir, nil, particleSize, rubberSmokeColor, 0, 0, 0, 0);
+ }
- particleDir.z = CGeneral::GetRandomNumberInRange(0.03f, 0.05f);
- CParticle::AddParticle(PARTICLE_RUBBER_SMOKE, particlePos, particleDir, nil, particleSize, CRGBA(255,255,255,255), 0, 0, 0, 0);
-#else
- CVector particlePos = (GetPosition() - 0.3f * GetUp()) + GetForward()*0.3f;
- CVector particleDir = m_vecMoveSpeed * 0.45f;
- particleDir.z = CGeneral::GetRandomNumberInRange(0.03f, 0.05f);
- CParticle::AddParticle(PARTICLE_PED_SPLASH, particlePos-CVector(0.0f, 0.0f, 1.2f), particleDir, nil, 0.0f, CRGBA(155, 185, 155, 255));
-#endif
+ if (m_nPedState == PED_JUMP) {
+ CVector particlePos = GetPosition();
+ particlePos.z -= 0.1f;
+
+ CVector particleDir(0.0f, 0.075f, 0.0f);
+ CParticle::AddParticle(PARTICLE_CAR_SPLASH, particlePos, particleDir, nil, 0.005f, CRGBA(0, 0, 0, 0), 0, 0, 0, 0);
+ particleDir.x += CGeneral::GetRandomNumberInRange(-0.05f, 0.05f);
+ particleDir.y += CGeneral::GetRandomNumberInRange(-0.05f, 0.05f);
+ particleDir.z -= CGeneral::GetRandomNumberInRange(0.025f, 0.05f);
+ CParticle::AddParticle(PARTICLE_RUBBER_SMOKE, particlePos, particleDir, nil, 0.5f, rubberSmokeColor, 0, 0, 0, 0);
}
}
}
@@ -2688,6 +2804,7 @@ CPed::SetModelIndex(uint32 mi)
#endif
}
+// --MIAMI: Done
void
CPed::RemoveLighting(bool reset)
{
@@ -2700,6 +2817,7 @@ CPed::RemoveLighting(bool reset)
DeActivateDirectional();
}
+// --MIAMI: Done
bool
CPed::SetupLighting(void)
{
@@ -2717,7 +2835,7 @@ CPed::SetupLighting(void)
} else {
// Note that this lightMult is only affected by LIGHT_DARKEN. If there's no LIGHT_DARKEN, it will be 1.0.
float lightMult = CPointLights::GenerateLightsAffectingObject(&GetPosition());
- if (!bHasBlip && lightMult != 1.0f) {
+ if (lightMult != 1.0f) {
SetAmbientAndDirectionalColours(lightMult);
return true;
}
@@ -2725,6 +2843,7 @@ CPed::SetupLighting(void)
return false;
}
+// --MIAMI: Done
void
CPed::Teleport(CVector pos)
{
@@ -2738,6 +2857,7 @@ CPed::Teleport(CVector pos)
CWorld::Add(this);
}
+// --MIAMI: Done
void
CPed::CalculateNewOrientation(void)
{
@@ -3081,47 +3201,52 @@ CPed::RestorePreviousObjective(void)
bObjectiveCompleted = false;
}
+// --MIAMI: Done
void
CPed::SetLeader(CEntity *leader)
{
m_leader = (CPed*)leader;
- if(m_leader)
- m_leader->RegisterReference((CEntity **)&m_leader);
+ if (m_leader) {
+ m_leader->bIsLeader = true;
+ m_leader->RegisterReference((CEntity**)&m_leader);
+ }
}
-// TODO(Miami)
+// --MIAMI: Done except comments
void
CPed::SetObjective(eObjective newObj, void *entity)
{
if (DyingOrDead())
return;
- if (m_prevObjective == newObj) {
- // Why?
- if (m_prevObjective != OBJECTIVE_NONE)
- return;
- }
+ if (m_prevObjective == newObj && m_prevObjective != OBJECTIVE_NONE)
+ return;
if (entity == this)
return;
+ if (m_attachedTo && newObj != OBJECTIVE_KILL_CHAR_ON_FOOT && newObj != OBJECTIVE_KILL_CHAR_ANY_MEANS && newObj != OBJECTIVE_DESTROY_OBJECT && newObj != OBJECTIVE_DESTROY_CAR)
+ return;
+
if (m_objective == newObj) {
switch (newObj) {
case OBJECTIVE_KILL_CHAR_ON_FOOT:
case OBJECTIVE_KILL_CHAR_ANY_MEANS:
case OBJECTIVE_GOTO_CHAR_ON_FOOT:
+ case OBJECTIVE_GOTO_CHAR_ON_FOOT_WALKING:
+ case OBJECTIVE_HASSLE_CHAR:
case OBJECTIVE_FOLLOW_CHAR_IN_FORMATION:
case OBJECTIVE_GOTO_AREA_ANY_MEANS:
case OBJECTIVE_GUARD_ATTACK:
+ case OBJECTIVE_KILL_CHAR_ON_BOAT:
+ case OBJECTIVE_SOLICIT_FOOT:
if (m_pedInObjective == entity)
return;
break;
case OBJECTIVE_LEAVE_CAR:
case OBJECTIVE_FLEE_CAR:
-#ifdef VC_PED_PORTS
case OBJECTIVE_LEAVE_CAR_AND_DIE:
-#endif
return;
case OBJECTIVE_ENTER_CAR_AS_PASSENGER:
case OBJECTIVE_ENTER_CAR_AS_DRIVER:
@@ -3130,6 +3255,10 @@ CPed::SetObjective(eObjective newObj, void *entity)
case OBJECTIVE_BUY_ICE_CREAM:
if (m_carInObjective == entity)
return;
+
+ if (newObj == OBJECTIVE_BUY_ICE_CREAM && bBoughtIceCream)
+ return;
+
break;
case OBJECTIVE_SET_LEADER:
if (m_leader == entity)
@@ -3143,17 +3272,14 @@ CPed::SetObjective(eObjective newObj, void *entity)
break;
}
} else {
- if ((newObj == OBJECTIVE_LEAVE_CAR
-#ifdef VC_PED_PORTS
- || newObj == OBJECTIVE_LEAVE_CAR_AND_DIE
-#endif
- ) && !bInVehicle)
+ if (newObj != OBJECTIVE_WAIT_IN_CAR_THEN_GET_OUT && (newObj == OBJECTIVE_LEAVE_CAR || newObj == OBJECTIVE_LEAVE_CAR_AND_DIE)
+ && !bInVehicle)
return;
}
+ bObjectiveCompleted = false;
ClearPointGunAt();
m_objectiveTimer = 0;
- bObjectiveCompleted = false;
if (!IsTemporaryObjective(m_objective) || IsTemporaryObjective(newObj)) {
if (m_objective != newObj) {
if (IsTemporaryObjective(newObj))
@@ -3167,6 +3293,13 @@ CPed::SetObjective(eObjective newObj, void *entity)
}
switch (newObj) {
+ case OBJECTIVE_WAIT_ON_FOOT_FOR_COP:
+ m_pedInObjective = (CPed*)entity;
+ m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
+ SetIdle();
+ // TODO(Miami)
+ // SetLook(m_pedInObjective);
+ break;
case OBJECTIVE_WAIT_IN_CAR_THEN_GET_OUT:
// In this special case, entity parameter isn't CEntity, but int.
@@ -3175,12 +3308,20 @@ CPed::SetObjective(eObjective newObj, void *entity)
case OBJECTIVE_KILL_CHAR_ON_FOOT:
case OBJECTIVE_KILL_CHAR_ANY_MEANS:
case OBJECTIVE_MUG_CHAR:
+ case OBJECTIVE_KILL_CHAR_ON_BOAT:
m_pNextPathNode = nil;
bUsePedNodeSeek = false;
- m_vecSeekPos = CVector(0.0f, 0.0f, 0.0f);
+
+ if (m_pedInObjective)
+ m_pedInObjective->CleanUpOldReference((CEntity**)&m_pedInObjective);
+ if (m_pLookTarget)
+ m_pLookTarget->CleanUpOldReference(&m_pLookTarget);
+
+ m_pLookTarget = (CEntity*)entity;
m_pedInObjective = (CPed*)entity;
+ m_vecSeekPos = CVector(0.0f, 0.0f, 0.0f);
m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
- m_pLookTarget = (CEntity*)entity;
+ // m_pLookTarget = (CEntity*)entity; // duplicate
m_pLookTarget->RegisterReference((CEntity**)&m_pLookTarget);
break;
case OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE:
@@ -3189,8 +3330,11 @@ CPed::SetObjective(eObjective newObj, void *entity)
case OBJECTIVE_GOTO_CHAR_ON_FOOT_WALKING:
case OBJECTIVE_HASSLE_CHAR:
case OBJECTIVE_GUARD_ATTACK:
- m_vecSeekPos = CVector(0.0f, 0.0f, 0.0f);
+
+ if (m_pedInObjective)
+ m_pedInObjective->CleanUpOldReference((CEntity**)&m_pedInObjective);
m_pedInObjective = (CPed*)entity;
+ m_vecSeekPos = CVector(0.0f, 0.0f, 0.0f);
m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
break;
case OBJECTIVE_FOLLOW_CHAR_IN_FORMATION:
@@ -3199,13 +3343,11 @@ CPed::SetObjective(eObjective newObj, void *entity)
m_pedFormation = FORMATION_REAR;
break;
case OBJECTIVE_LEAVE_CAR:
-#ifdef VC_PED_PORTS
case OBJECTIVE_LEAVE_CAR_AND_DIE:
-#endif
case OBJECTIVE_FLEE_CAR:
m_carInObjective = (CVehicle*)entity;
m_carInObjective->RegisterReference((CEntity **)&m_carInObjective);
- if (!m_carInObjective->bIsBus || m_leaveCarTimer)
+ if (!m_carInObjective->bIsBus || m_leaveCarTimer != 0)
break;
for (int i = 0; i < m_carInObjective->m_nNumMaxPassengers; i++) {
@@ -3216,12 +3358,19 @@ CPed::SetObjective(eObjective newObj, void *entity)
}
break;
+ case OBJECTIVE_DESTROY_OBJECT:
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
+ m_pPointGunAt = (CPed*)entity;
+ if (entity)
+ ((CEntity*)entity)->RegisterReference((CEntity**) &m_pPointGunAt);
+ break;
case OBJECTIVE_ENTER_CAR_AS_PASSENGER:
case OBJECTIVE_ENTER_CAR_AS_DRIVER:
if (m_nMoveState == PEDMOVE_STILL)
SetMoveState(PEDMOVE_RUN);
- if (((CVehicle*)entity)->m_vehType == VEHICLE_TYPE_BOAT && !IsPlayer()) {
+ if (((CVehicle*)entity)->m_vehType == VEHICLE_TYPE_BOAT && !IsPlayer() && m_pCurrentPhysSurface != entity) {
RestorePreviousObjective();
break;
}
@@ -3251,6 +3400,10 @@ CPed::SetObjective(eObjective newObj, void *entity)
m_pedInObjective = (CPed*)entity;
m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
break;
+ case OBJECTIVE_SOLICIT_FOOT:
+ m_pedInObjective = (CPed*)entity;
+ m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
+ break;
default:
break;
}
@@ -3295,7 +3448,7 @@ CPed::SetObjective(eObjective newObj)
}
*/
- m_objective = newObj;
+ m_objective = OBJECTIVE_NONE;
m_prevObjective = OBJECTIVE_NONE;
} else if (m_prevObjective != newObj || m_prevObjective == OBJECTIVE_NONE) {
SetObjectiveTimer(0);
@@ -3385,6 +3538,7 @@ CPed::IsGangMember(void)
return m_nPedType >= PEDTYPE_GANG1 && m_nPedType <= PEDTYPE_GANG9;
}
+// --MIAMI: Done
void
CPed::InformMyGangOfAttack(CEntity *attacker)
{
@@ -3411,8 +3565,7 @@ CPed::InformMyGangOfAttack(CEntity *attacker)
CPed *nearPed = m_nearPeds[i];
if (nearPed && nearPed != this) {
CPed *leader = nearPed->m_leader;
- if (leader && leader == this && nearPed->m_pedStats->m_fear < nearPed->m_pedStats->m_temper)
- {
+ if (leader && leader == this && nearPed->m_pedStats->m_fear < nearPed->m_pedStats->m_temper) {
nearPed->SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, attackerPed);
nearPed->SetObjectiveTimer(30000);
}
@@ -3630,6 +3783,7 @@ CPed::Chat(void)
}
}
+// --MIAMI: Done
void
CPed::CheckAroundForPossibleCollisions(void)
{
@@ -3904,7 +4058,6 @@ CPed::ClearAll(void)
bIsPointingGunAt = false;
bRenderPedInCar = true;
bKnockedUpIntoAir = false;
- bCrouchWhenScared = false;
bKnockedOffBike = false;
m_pCollidingEntity = nil;
}
@@ -3947,11 +4100,11 @@ CPed::ClearAttackByRemovingAnim(void)
}
if (!weaponAssoc) {
if(!!weapon->m_bFinish3rd)
- weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_SPECIAL);
+ weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetFinishingAttackAnim(weapon));
}
if (!weaponAssoc) {
if(!!weapon->m_bUse2nd)
- weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCHFIRE);
+ weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), GetSecondFireAnim(weapon));
}
if (!weaponAssoc) {
if(!!weapon->m_bCop3rd)
@@ -4186,7 +4339,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
if (method != WEAPONTYPE_KATANA ||
damagedBy != FindPlayerPed()
|| FindPlayerPed()->m_nPedState != PED_FIGHT
- || FindPlayerPed()->m_lastFightMove != FIGHTMOVE_MELEE1 && FindPlayerPed()->m_lastFightMove != FIGHTMOVE_MELEE2
+ || FindPlayerPed()->m_curFightMove != FIGHTMOVE_MELEE1 && FindPlayerPed()->m_curFightMove != FIGHTMOVE_MELEE2
|| CGeneral::GetRandomNumber() & 3) {
if (m_nPedState == PED_FALL) {
@@ -4200,8 +4353,8 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi
dieDelta = dieDelta * 2.0f;
dieSpeed = 0.5f;
}
- } else if (damagedBy != FindPlayerPed() || FindPlayerPed()->m_lastFightMove != FIGHTMOVE_MELEE2) {
- if (damagedBy != FindPlayerPed() || FindPlayerPed()->m_lastFightMove != FIGHTMOVE_MELEE3) {
+ } else if (damagedBy != FindPlayerPed() || FindPlayerPed()->m_curFightMove != FIGHTMOVE_MELEE2) {
+ if (damagedBy != FindPlayerPed() || FindPlayerPed()->m_curFightMove != FIGHTMOVE_MELEE3) {
switch (direction) {
case 0:
dieAnim = ANIM_KO_SKID_FRONT;
@@ -4726,8 +4879,8 @@ CPed::ClearObjective(void)
m_objective = OBJECTIVE_NONE;
m_pedInObjective = nil;
m_carInObjective = nil;
- if (m_nPedState == PED_DRIVING && m_pMyVehicle) {
+ if (m_nPedState == PED_DRIVING && m_pMyVehicle) {
if (m_pMyVehicle->pDriver != this) {
if(!IsPlayer())
bWanderPathAfterExitingCar = true;
@@ -4849,7 +5002,7 @@ CPed::RestoreHeadingRateCB(CAnimBlendAssociation *assoc, void *arg)
void
CPed::RestorePreviousState(void)
{
- if(!CanSetPedState() || m_nPedState == PED_FALL)
+ if (!CanSetPedState() || m_nPedState == PED_FALL)
return;
if (m_nPedState == PED_GETUP && !bGetUpAnimStarted)
@@ -4875,7 +5028,7 @@ CPed::RestorePreviousState(void)
case PED_WANDER_PATH:
SetPedState(PED_WANDER_PATH);
bIsRunning = false;
- if (!bFindNewNodeAfterStateRestore) {
+ if (bFindNewNodeAfterStateRestore) {
if (m_pNextPathNode) {
CVector nextNode = CPathFind::TakeWidthIntoAccountForWandering(m_pNextPathNode, m_randomSeed);
CVector diff = nextNode - GetPosition();
@@ -4897,14 +5050,18 @@ CPed::RestorePreviousState(void)
}
}
-// TODO(Miami): Clean up old references
+// --MIAMI: Done
void
CPed::SetAimFlag(CEntity *to)
{
bIsAimingGun = true;
bIsRestoringGun = false;
+ if (m_pLookTarget)
+ m_pLookTarget->CleanUpOldReference(&m_pLookTarget);
m_pLookTarget = to;
m_pLookTarget->RegisterReference((CEntity **) &m_pLookTarget);
+ if (m_pSeekTarget)
+ m_pSeekTarget->CleanUpOldReference(&m_pSeekTarget);
m_pSeekTarget = to;
m_pSeekTarget->RegisterReference((CEntity **) &m_pSeekTarget);
m_lookTimer = 0;
@@ -5270,7 +5427,8 @@ CPed::SetAttack(CEntity *victim)
return;
}
- // TODO(Miami): Clean up old referene
+ if (m_pSeekTarget)
+ m_pSeekTarget->CleanUpOldReference(&m_pSeekTarget);
m_pSeekTarget = victim;
if (m_pSeekTarget)
m_pSeekTarget->RegisterReference((CEntity **) &m_pSeekTarget);
@@ -5389,6 +5547,7 @@ CPed::SetAttack(CEntity *victim)
SetLookTimer(100);
}
+// --MIAMI: Done
void
CPed::StartFightAttack(uint8 buttonPressure)
{
@@ -5408,53 +5567,71 @@ CPed::StartFightAttack(uint8 buttonPressure)
RestoreHeadingRate();
}
- m_nPedState = PED_FIGHT;
- m_fightButtonPressure = 0;
- RpAnimBlendClumpRemoveAssociations(GetClump(), ASSOC_REPEAT);
- CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK_START);
-
- if (animAssoc) {
- animAssoc->flags |= ASSOC_DELETEFADEDOUT;
- animAssoc->blendDelta = -1000.0f;
- }
-
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP);
+ CAnimBlendAssociation* animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP);
if (!animAssoc)
animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R);
if (animAssoc) {
- animAssoc->flags |= ASSOC_DELETEFADEDOUT;
- animAssoc->blendDelta = -1000.0f;
RestoreHeadingRate();
}
-
SetMoveState(PEDMOVE_NONE);
m_nStoredMoveState = PEDMOVE_NONE;
+ bool fightWithWeapon = false;
+ CAnimBlendAssociation *fightIdleAssoc;
- CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE)->blendAmount = 1.0f;
-
- CPed *pedOnGround = nil;
- if (IsPlayer() && CheckForPedsOnGroundToAttack(this, &pedOnGround) > PED_IN_FRONT_OF_ATTACKER) {
- m_lastFightMove = FIGHTMOVE_GROUNDKICK;
- } else if (m_pedStats->m_flags & STAT_SHOPPING_BAGS) {
- m_lastFightMove = FIGHTMOVE_ROUNDHOUSE;
+ CWeaponInfo* weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
+ if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED) {
+ if (GetFightIdleWithMeleeAnim(weaponInfo)) {
+ fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), weaponInfo->m_AnimToPlay, GetFightIdleWithMeleeAnim(weaponInfo), 1000.0f);
+ fightWithWeapon = true;
+ } else {
+ fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE, 1000.0f);
+ }
} else {
- m_lastFightMove = FIGHTMOVE_STDPUNCH;
+ fightIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE, 1000.0f);
}
+ m_lastFightMove = FIGHTMOVE_IDLE;
+ m_curFightMove = IsPlayer() ? ChooseAttackPlayer(buttonPressure, fightWithWeapon) : ChooseAttackAI(buttonPressure, fightWithWeapon);
- if (pedOnGround && IsPlayer()) {
- m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(
- pedOnGround->GetPosition().x, pedOnGround->GetPosition().y,
- GetPosition().x, GetPosition().y);
+ SetPedState(PED_FIGHT);
+ m_fightButtonPressure = 0;
- m_fRotationDest = CGeneral::LimitRadianAngle(m_fRotationDest);
- m_fRotationCur = m_fRotationDest;
- m_lookTimer = 0;
- SetLookFlag(pedOnGround, true);
- SetLookTimer(1500);
+ if (m_curFightMove > FIGHTMOVE_NULL && m_curFightMove != FIGHTMOVE_IDLE) {
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), m_curFightMove < FIGHTMOVE_MELEE1 ? ASSOCGRP_STD : weaponInfo->m_AnimToPlay,
+ tFightMoves[m_curFightMove].animId, 8.0f);
+
+ if (weaponInfo->m_AnimToPlay != ASSOCGRP_KNIFE || m_curFightMove < FIGHTMOVE_MELEE1) {
+ if (m_curFightMove == FIGHTMOVE_BACKKICK)
+ animAssoc->speed = 1.15f;
+ else
+ animAssoc->speed = 0.8f;
+ } else {
+ switch (GetWeapon()->m_eWeaponType) {
+ case WEAPONTYPE_SCREWDRIVER:
+ case WEAPONTYPE_KNIFE:
+ animAssoc->speed = 1.05f;
+ break;
+ case WEAPONTYPE_GOLFCLUB:
+ case WEAPONTYPE_NIGHTSTICK:
+ case WEAPONTYPE_BASEBALLBAT:
+ case WEAPONTYPE_HAMMER:
+ case WEAPONTYPE_KATANA:
+ animAssoc->speed = 0.8f;
+ break;
+ case WEAPONTYPE_CLEAVER:
+ case WEAPONTYPE_MACHETE:
+ animAssoc->speed = 0.9f;
+ break;
+ }
+ }
+ if (IsPlayer())
+ animAssoc->SetCurrentTime(0.08f);
+
+ animAssoc->SetFinishCallback(FinishFightMoveCB, this);
+ } else {
+ m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2000;
}
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_lastFightMove].animId, 4.0f);
- animAssoc->SetFinishCallback(FinishFightMoveCB, this);
+
m_fightState = FIGHTSTATE_NO_MOVE;
m_takeAStepAfterAttack = false;
bIsAttacking = true;
@@ -5474,7 +5651,7 @@ CPed::LoadFightData(void)
CAnimBlendAssociation *animAssoc;
- int bp, buflen;
+ size_t bp, buflen;
int lp, linelen;
buflen = CFileMgr::LoadFile("DATA\\fistfite.dat", work_buff, sizeof(work_buff), "r");
@@ -5568,7 +5745,7 @@ CPed::GetLocalDirection(const CVector2D &posOffset)
// --MIAMI: Done
bool
-CPed::FightStrike(CVector &touchedNodePos, bool unk = false)
+CPed::FightStrike(CVector &touchedNodePos, bool fightWithWeapon)
{
CColModel *hisCol;
CVector attackDistance;
@@ -5577,8 +5754,8 @@ CPed::FightStrike(CVector &touchedNodePos, bool unk = false)
CVector extendedTouchPoint;
CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
- float radius = tFightMoves[m_lastFightMove].strikeRadius;
- if (unk)
+ float radius = tFightMoves[m_curFightMove].strikeRadius;
+ if (fightWithWeapon)
radius = weaponInfo->m_fRadius;
if (m_fightState == FIGHTSTATE_JUST_ATTACKED)
@@ -5589,7 +5766,7 @@ CPed::FightStrike(CVector &touchedNodePos, bool unk = false)
for (int i = 0; i < m_numNearPeds; i++) {
int8 pedFound = 0;
nearPed = m_nearPeds[i];
- if (!unk && GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && GetWeapon()->m_eWeaponType != WEAPONTYPE_BRASSKNUCKLE)
+ if (!fightWithWeapon && GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && GetWeapon()->m_eWeaponType != WEAPONTYPE_BRASSKNUCKLE)
maxDistanceToBeat = nearPed->GetBoundRadius() + radius + 0.1f;
else
maxDistanceToBeat = nearPed->GetBoundRadius() + radius;
@@ -5620,14 +5797,14 @@ CPed::FightStrike(CVector &touchedNodePos, bool unk = false)
}
}
}
- if (!pedFound && !unk) {
+ if (!pedFound && !fightWithWeapon) {
extendedTouchPoint = touchedNodePos - GetPosition();
if (DotProduct(touchedNodePos - GetPosition(), nearPed->GetPosition() - GetPosition()) > 0.f) {
- if (m_lastFightMove == FIGHTMOVE_GROUNDKICK) {
+ if (m_curFightMove == FIGHTMOVE_GROUNDKICK) {
extendedTouchPoint += tFightMoves[FIGHTMOVE_GROUNDKICK].extendReachMultiplier * GetForward();
} else {
- extendedTouchPoint.x *= tFightMoves[m_lastFightMove].extendReachMultiplier;
- extendedTouchPoint.y *= tFightMoves[m_lastFightMove].extendReachMultiplier;
+ extendedTouchPoint.x *= tFightMoves[m_curFightMove].extendReachMultiplier;
+ extendedTouchPoint.y *= tFightMoves[m_curFightMove].extendReachMultiplier;
}
pedFound = -1;
extendedTouchPoint += GetPosition();
@@ -5641,7 +5818,7 @@ CPed::FightStrike(CVector &touchedNodePos, bool unk = false)
attackDistance = hisCol->spheres[j].center;
attackDistance -= extendedTouchPoint;
CColSphere* hisPieces = hisCol->spheres;
- float maxDistanceToBeat2 = hisPieces[j].radius + tFightMoves[m_lastFightMove].strikeRadius;
+ float maxDistanceToBeat2 = hisPieces[j].radius + tFightMoves[m_curFightMove].strikeRadius;
// We can beat him too
if (sq(maxDistanceToBeat2) > attackDistance.MagnitudeSqr()) {
@@ -5662,22 +5839,22 @@ CPed::FightStrike(CVector &touchedNodePos, bool unk = false)
return false;
}
-// TODO(Miami)
+// --MIAMI: Done
void
-CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dist, int16 piece)
+CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dir, int16 piece)
{
if (victim->IsPlayer() && victim->m_nPedState == PED_GETUP)
return;
CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
bool fightingWithWeapon = false;
- int damageMult = tFightMoves[m_lastFightMove].damage * ((CGeneral::GetRandomNumber() & 1) + 2) + 1;
+ int damageMult = tFightMoves[m_curFightMove].damage * ((CGeneral::GetRandomNumber() & 1) + 2) + 1;
if (weaponInfo->m_bFightMode) {
fightingWithWeapon = true;
- if (m_lastFightMove >= FIGHTMOVE_MELEE1) {
+ if (m_curFightMove >= FIGHTMOVE_MELEE1) {
damageMult = weaponInfo->m_nDamage;
- if (m_lastFightMove == FIGHTMOVE_MELEE3 && GetWeapon()->m_eWeaponType != WEAPONTYPE_SCREWDRIVER)
+ if (m_curFightMove == FIGHTMOVE_MELEE3 && GetWeapon()->m_eWeaponType != WEAPONTYPE_SCREWDRIVER)
damageMult *= 5;
}
}
@@ -5690,56 +5867,83 @@ CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dist, int16 piece)
}
float oldVictimHealth = victim->m_fHealth;
- CVector bloodPos = 0.5f * dist + touchPoint;
+ CVector bloodPos = 0.5f * dir + touchPoint;
CVector2D diff(GetPosition() - victim->GetPosition());
int direction = victim->GetLocalDirection(diff);
- /*
- // Change direction if we used kick.
- if (m_lastFightMove == FIGHTMOVE_KICK) {
- if (CGeneral::GetRandomNumber() & 1) {
- direction++;
- if (direction > 3)
- direction -= 4;
+ bool brassKnucklePunch = false;
+ if (GetWeapon()->m_eWeaponType == WEAPONTYPE_BRASSKNUCKLE) {
+ if (m_curFightMove == FIGHTMOVE_PUNCHHOOK || m_curFightMove == FIGHTMOVE_PUNCHJAB || m_curFightMove == FIGHTMOVE_BACKLEFT ||
+ m_curFightMove == FIGHTMOVE_STDPUNCH || m_curFightMove == FIGHTMOVE_PUNCH) {
+ brassKnucklePunch = true;
+ damageMult *= 1.5f;
}
- } */
+ }
victim->ReactToAttack(this);
- // Mostly unused. if > 5, ANIM_HIT_WALK will be run, that's it.
+ // Mostly unused. if > 5, ANIM_HIT_BIGSTEP will be run, that's it.
int unk2;
- if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && !victim->IsPlayer())
+ if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && GetWeapon()->m_eWeaponType != WEAPONTYPE_BRASSKNUCKLE &&
+ !victim->IsPlayer() && !fightingWithWeapon)
unk2 = 101;
else
unk2 = damageMult;
- victim->StartFightDefend(direction, tFightMoves[m_lastFightMove].hitLevel, unk2);
+ victim->StartFightDefend(direction, tFightMoves[m_curFightMove].hitLevel, unk2);
PlayHitSound(victim);
m_fightState = FIGHTSTATE_JUST_ATTACKED;
- RpAnimBlendClumpGetAssociation(GetClump(), tFightMoves[m_lastFightMove].animId)->speed = 0.6f;
+ RpAnimBlendClumpGetAssociation(GetClump(), tFightMoves[m_curFightMove].animId)->speed = 0.6f;
+
if (!victim->DyingOrDead()) {
- victim->InflictDamage(this, WEAPONTYPE_UNARMED, damageMult * 3.0f, (ePedPieceTypes)piece, direction);
+ if(fightingWithWeapon)
+ victim->InflictDamage(this, GetWeapon()->m_eWeaponType, damageMult, (ePedPieceTypes)piece, direction);
+ else
+ victim->InflictDamage(this, WEAPONTYPE_UNARMED, damageMult * 3.0f, (ePedPieceTypes)piece, direction);
}
- if (CGame::nastyGame
- && tFightMoves[m_lastFightMove].hitLevel > HITLEVEL_MEDIUM
- && victim->m_nPedState == PED_DIE
+ if (CGame::nastyGame && weaponInfo->m_AnimToPlay == ASSOCGRP_KNIFE && m_curFightMove >= FIGHTMOVE_MELEE1
&& victim->GetIsOnScreen()) {
- // Just for blood particle. We will restore it below.
- dist /= (10.0f * dist.Magnitude());
- for(int i=0; i<4; i++) {
- CParticle::AddParticle(PARTICLE_BLOOD, bloodPos, dist, nil, 0.0f, 0, 0, 0, 0);
+ static float particleRightLen = 0.05f;
+ static float particleUpLen = 0.05f;
+
+ // Just for particles. We will restore it below.
+ dir /= (20.0f * dir.Magnitude());
+ if (m_curFightMove == FIGHTMOVE_MELEE1) {
+ float rightMult = -particleRightLen;
+ dir += particleUpLen * GetUp() + rightMult * GetRight();
+
+ } else if (m_curFightMove == FIGHTMOVE_MELEE2) {
+ float upMult = 2.0f * particleUpLen;
+ dir += particleRightLen * GetRight() + upMult * GetUp();
+ }
+ CParticle::AddParticle(PARTICLE_BLOOD_SPURT, bloodPos, dir, nil, 0.0f, 0, 0, 0, 0);
+ CParticle::AddParticle(PARTICLE_BLOOD_SPURT, bloodPos, dir, nil, 0.0f, 0, 0, 0, 0);
+ if (IsPlayer()) {
+ CParticle::AddParticle(PARTICLE_BLOOD_SPURT, bloodPos, dir, nil, 0.0f, 0, 0, 0, 0);
+ CParticle::AddParticle(PARTICLE_BLOOD_SPURT, bloodPos, dir, nil, 0.0f, 0, 0, 0, 0);
+ }
+ if (!(CGeneral::GetRandomNumber() & 3)) {
+ CParticle::AddParticle(PARTICLE_TEST, bloodPos, dir, nil, 0.0f, 0, 0, 0, 0);
+ }
+ } else if (CGame::nastyGame && (tFightMoves[m_curFightMove].hitLevel > HITLEVEL_MEDIUM || fightingWithWeapon)
+ && victim->GetIsOnScreen()) {
+
+ // Just for particles. We will restore it below.
+ dir /= (10.0f * dir.Magnitude());
+ for (int i = 0; i < 4; i++) {
+ CParticle::AddParticle(PARTICLE_BLOOD, bloodPos, dir, nil, 0.0f, 0, 0, 0, 0);
}
}
eWeaponType weaponType = GetWeapon()->m_eWeaponType;
if (!fightingWithWeapon) {
- if (victim->m_nPedState != PED_FALL && victim->m_nPedState != PED_DIE && victim->m_nPedState != PED_DEAD) {
+ if (!victim->OnGround()) {
float curVictimHealth = victim->m_fHealth;
if (curVictimHealth > 0.0f
&& (curVictimHealth < 30.0f && oldVictimHealth > 30.0f
|| weaponType != WEAPONTYPE_UNARMED && weaponType != WEAPONTYPE_BRASSKNUCKLE && IsPlayer()
- || victim->m_pedStats->m_flags & STAT_ONE_HIT_KNOCKDOWN)) {
+ || victim->m_pedStats->m_flags & STAT_ONE_HIT_KNOCKDOWN || brassKnucklePunch)) {
victim->SetFall(0, (AnimationId)(direction + ANIM_KO_SKID_FRONT), 0);
if (victim->m_nPedState == PED_FALL)
@@ -5749,15 +5953,15 @@ CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dist, int16 piece)
}
if (victim->m_nPedState == PED_DIE || !victim->bIsStanding) {
- dist = victim->GetPosition() - GetPosition();
- dist.Normalise();
- dist.z = 1.0f;
+ dir = victim->GetPosition() - GetPosition();
+ dir.Normalise();
+ dir.z = 1.0f;
victim->bIsStanding = false;
float moveMult;
if (fightingWithWeapon) {
moveMult = Min(damageMult * 0.02f, 1.0f);
- } else if (m_lastFightMove == FIGHTMOVE_GROUNDKICK) {
+ } else if (m_curFightMove == FIGHTMOVE_GROUNDKICK) {
moveMult = Min(damageMult * 0.6f, 4.0f);
} else {
if (victim->m_nPedState != PED_DIE || damageMult >= 20) {
@@ -5767,7 +5971,7 @@ CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dist, int16 piece)
}
}
- victim->ApplyMoveForce(moveMult * 0.6f * dist);
+ victim->ApplyMoveForce(moveMult * 0.6 * dir);
}
if (weaponType != WEAPONTYPE_KNIFE && weaponType != WEAPONTYPE_MACHETE
@@ -5786,6 +5990,334 @@ CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dist, int16 piece)
}
// --MIAMI: Done
+int32
+CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon)
+{
+ CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
+ const float maxAttackDist = 2.7f;
+ float weaponAttackDist = 2.0f;
+ CPed *victimPed = nil;
+ CPed *walkUpTo = nil;
+ CPed *groundAttackDeadPed = nil;
+ CPed *groundAttackAlivePed = nil;
+ if (fightWithWeapon)
+ weaponAttackDist = weaponInfo->m_fRange;
+
+ bool willWalkUp = false;
+ PedFightMoves choosenMove = FIGHTMOVE_IDLE;
+ int numPedsWeCanReach = 0;
+ if (m_takeAStepAfterAttack)
+ willWalkUp = true;
+
+ float groundAttackDeadAngle, groundAttackAliveAngle, walkAngle, victimAngle, distToVictim;
+
+ for (int i = 0; i < m_numNearPeds; ++i) {
+ CPed *nearPed = m_nearPeds[i];
+ CVector distVec(nearPed->GetPosition() - GetPosition());
+ float dist = distVec.Magnitude();
+ if (dist < maxAttackDist) {
+ float nearPedAngle = CGeneral::LimitRadianAngle(distVec.Heading());
+ m_fRotationCur = CGeneral::LimitRadianAngle(m_fRotationCur);
+ float neededTurn = Abs(nearPedAngle - m_fRotationCur);
+ if (neededTurn > PI)
+ neededTurn = TWOPI - neededTurn;
+
+ if (!nearPed->OnGroundOrGettingUp() && nearPed->m_nWaitState != WAITSTATE_SUN_BATHE_IDLE) {
+ if (!willWalkUp || neededTurn <= DEGTORAD(45.0f)) {
+
+ if (neededTurn <= DEGTORAD(30.0f) || nearPed->m_pedInObjective == this
+ && (nearPed->m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT || nearPed->m_objective == OBJECTIVE_KILL_CHAR_ANY_MEANS)) {
+
+ if (dist < weaponAttackDist) {
+ if (!victimPed
+ || nearPed->m_attackTimer < victimPed->m_attackTimer && nearPed->m_attackTimer > CTimer::GetTimeInMilliseconds() - 100) {
+ victimPed = nearPed;
+ victimAngle = nearPedAngle;
+ distToVictim = dist;
+ }
+ ++numPedsWeCanReach;
+
+ } else {
+ if (neededTurn < DEGTORAD(30.0f)) {
+ walkUpTo = nearPed;
+ walkAngle = nearPedAngle;
+ }
+ }
+ }
+ }
+ } else if (CGame::nastyGame && dist < 1.2f && neededTurn < DEGTORAD(55.0f)) {
+ if (!nearPed->DyingOrDead() || groundAttackDeadPed) {
+ if (!nearPed->IsPedHeadAbovePos(-0.3f)) {
+ groundAttackAlivePed = nearPed;
+ groundAttackAliveAngle = nearPedAngle;
+ }
+ } else {
+ groundAttackDeadPed = nearPed;
+ groundAttackDeadAngle = nearPedAngle;
+ }
+ ++numPedsWeCanReach;
+
+ } else if (dist > 1.4f && dist < maxAttackDist && neededTurn < DEGTORAD(30.0f)) {
+ if (!walkUpTo) {
+ walkUpTo = nearPed;
+ walkAngle = nearPedAngle;
+ }
+#ifdef FIX_BUGS
+ if(dist < 2.1f)
+#endif
+ ++numPedsWeCanReach;
+ }
+ }
+ }
+
+ if (victimPed) {
+ float adjustedAngleDiff = victimAngle - m_fRotationCur + DEGTORAD(30.0f);
+ if (adjustedAngleDiff < 0.0f)
+ adjustedAngleDiff += TWOPI;
+
+ int16 dir = Floor(adjustedAngleDiff / DEGTORAD(60.0f));
+
+ // Just focus on who we're fighting with, don't care peds on ground
+ if (numPedsWeCanReach < 2 || fightWithWeapon) {
+ float angleDiff = Abs(victimAngle - m_fRotationCur);
+ if (angleDiff > PI)
+ angleDiff = TWOPI - angleDiff;
+
+ if (angleDiff < DEGTORAD(60.0f))
+ dir = 0; // forward
+ }
+ int16 randVal = CGeneral::GetRandomNumber() & 3;
+ switch (dir) {
+ case 0: // forward
+ if (fightWithWeapon) {
+ if (distToVictim < 0.95f - 0.2f && m_nPedState == PED_FIGHT) {
+ choosenMove = FIGHTMOVE_KNEE;
+ } else {
+ if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CLEAVER) {
+ if (distToVictim < 0.85f * weaponInfo->m_fRange)
+ choosenMove = FIGHTMOVE_MELEE1;
+ else
+ choosenMove = FIGHTMOVE_SHUFFLE_F;
+ } else {
+ float weaponRange = weaponInfo->m_fRange;
+ if (distToVictim < 0.75f * weaponRange && GetWeapon()->m_eWeaponType != WEAPONTYPE_SCREWDRIVER) {
+ if (m_lastFightMove == FIGHTMOVE_MELEE1 && GetFinishingAttackAnim(weaponInfo)) {
+ choosenMove = FIGHTMOVE_MELEE2;
+ } else if (m_lastFightMove == FIGHTMOVE_MELEE2 && GetFinishingAttackAnim(weaponInfo)) {
+ choosenMove = FIGHTMOVE_MELEE3;
+ } else {
+ choosenMove = FIGHTMOVE_MELEE1;
+ }
+ } else if (distToVictim < weaponRange && GetFinishingAttackAnim(weaponInfo)) {
+ choosenMove = FIGHTMOVE_MELEE3;
+ } else {
+ choosenMove = FIGHTMOVE_SHUFFLE_F;
+ }
+ }
+ }
+ } else if (distToVictim < 0.95f && m_nPedState == PED_FIGHT) {
+ choosenMove = FIGHTMOVE_KNEE;
+
+ } else if (distToVictim < 1.4f) {
+ if (m_curFightMove == FIGHTMOVE_PUNCHJAB) {
+ choosenMove = FIGHTMOVE_PUNCH;
+
+ } else if (m_curFightMove != FIGHTMOVE_PUNCH || randVal != 1) {
+ if (randVal == 2)
+ choosenMove = FIGHTMOVE_PUNCH;
+ else
+ choosenMove = FIGHTMOVE_PUNCHJAB;
+ } else {
+ choosenMove = FIGHTMOVE_LONGKICK;
+ }
+ } else {
+ choosenMove = FIGHTMOVE_LONGKICK;
+ }
+ break;
+ case 1:
+ choosenMove = FIGHTMOVE_FWDLEFT;
+ break;
+ case 2:
+ choosenMove = FIGHTMOVE_BACKLEFT;
+ break;
+ case 3:
+ choosenMove = FIGHTMOVE_BACKKICK;
+ break;
+ case 4:
+ choosenMove = FIGHTMOVE_BACKRIGHT;
+ break;
+ default:
+ choosenMove = FIGHTMOVE_FWDRIGHT;
+ break;
+ }
+
+ // forward
+ if (dir == 0) {
+ m_fRotationDest = CGeneral::LimitRadianAngle(victimAngle);
+ } else {
+ m_fRotationDest = victimAngle - dir * DEGTORAD(60.0f);
+ m_fRotationDest = CGeneral::LimitRadianAngle(m_fRotationDest);
+ }
+
+ m_fRotationCur = m_fRotationDest;
+ Say(SOUND_PED_ATTACK);
+
+ } else if (groundAttackAlivePed || groundAttackDeadPed) {
+ if (fightWithWeapon && weaponInfo->m_bGround2nd) {
+ choosenMove = FIGHTMOVE_MELEE2;
+ } else if (fightWithWeapon && weaponInfo->m_bGround3rd) {
+ choosenMove = FIGHTMOVE_MELEE3;
+ } else {
+ choosenMove = FIGHTMOVE_GROUNDKICK;
+ }
+ if (groundAttackAlivePed)
+ m_fRotationDest = groundAttackAliveAngle;
+ else
+ m_fRotationDest = groundAttackDeadAngle;
+
+ m_fRotationCur = m_fRotationDest;
+ m_lookTimer = 0;
+ if (groundAttackAlivePed)
+ SetLookFlag(groundAttackAlivePed, 1, 0);
+ else
+ SetLookFlag(groundAttackDeadPed, 1, 0);
+
+ SetLookTimer(1500u);
+
+ } else if (walkUpTo) {
+ choosenMove = FIGHTMOVE_SHUFFLE_F;
+ m_fRotationCur = m_fRotationDest = walkAngle;
+ m_lookTimer = 0;
+ SetLookFlag(walkUpTo, true);
+ SetLookTimer(1500);
+
+ } else if (fightWithWeapon) {
+ // No enemy, fight with space
+ if (GetWeapon()->m_eWeaponType == WEAPONTYPE_SCREWDRIVER) {
+ choosenMove = FIGHTMOVE_MELEE3;
+ } else {
+ if (m_lastFightMove == FIGHTMOVE_MELEE1 && GetFinishingAttackAnim(weaponInfo)) {
+ choosenMove = FIGHTMOVE_MELEE2;
+ } else if (m_lastFightMove == FIGHTMOVE_MELEE2 && GetFinishingAttackAnim(weaponInfo)) {
+ choosenMove = FIGHTMOVE_MELEE3;
+ } else {
+ choosenMove = FIGHTMOVE_MELEE1;
+ }
+ }
+ } else {
+ // Max number GetRandomNumberInRange returns is max-1
+#ifdef FIX_BUGS
+ switch (CGeneral::GetRandomNumberInRange(0,4)) {
+#else
+ switch (CGeneral::GetRandomNumberInRange(0,3)) {
+#endif
+ case 0:
+ choosenMove = FIGHTMOVE_PUNCHJAB;
+ break;
+ case 1:
+ choosenMove = FIGHTMOVE_PUNCH;
+ break;
+ case 2:
+ choosenMove = FIGHTMOVE_LONGKICK;
+ break;
+ case 3:
+ choosenMove = FIGHTMOVE_KNEE;
+ break;
+ default:
+ break;
+ }
+ }
+ return choosenMove;
+}
+
+// --MIAMI: Done
+int32
+CPed::ChooseAttackAI(uint8 buttonPressure, bool fightWithWeapon)
+{
+ eWeaponType weapon = GetWeapon()->m_eWeaponType;
+ CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(weapon);
+ if (!fightWithWeapon && weapon != WEAPONTYPE_UNARMED && weapon != WEAPONTYPE_BRASSKNUCKLE) {
+ return FIGHTMOVE_PUNCH;
+ }
+
+ if (!m_pedInObjective)
+ return FIGHTMOVE_IDLE;
+ if (buttonPressure == 0)
+ return FIGHTMOVE_IDLE;
+
+ uint16 pedFeatures = m_pedStats->m_flags;
+ bool punchOnly = !!(pedFeatures & STAT_PUNCH_ONLY);
+ bool canRoundhouse = !!(pedFeatures & STAT_CAN_ROUNDHOUSE);
+ bool canKneeHead = !!(pedFeatures & STAT_CAN_KNEE_HEAD);
+ bool canKick = !!(pedFeatures & STAT_CAN_KICK);
+ bool hasShoppingBags = !!(pedFeatures & STAT_SHOPPING_BAGS);
+
+ CVector distVec(m_pedInObjective->GetPosition() - GetPosition());
+ float dist = distVec.Magnitude();
+ m_fRotationDest = CGeneral::LimitRadianAngle(distVec.Heading());
+ m_fRotationCur = m_fRotationDest;
+
+ if (fightWithWeapon) {
+ if (m_pedInObjective->OnGroundOrGettingUp()) {
+ if (!CGame::nastyGame || dist >= 1.2f || m_pedInObjective->IsPlayer()
+ || m_pedInObjective->m_nPedState != PED_DEAD && m_pedInObjective->IsPedHeadAbovePos(-0.3f)) {
+ return FIGHTMOVE_IDLE;
+ }
+
+ if (weaponInfo->m_bGround2nd)
+ return FIGHTMOVE_MELEE2;
+ if (weaponInfo->m_bGround3rd)
+ return FIGHTMOVE_MELEE3;
+
+ return FIGHTMOVE_GROUNDKICK;
+ }
+ if (dist < 2.f) {
+ if (m_curFightMove == FIGHTMOVE_MELEE1) {
+ if (GetSecondFireAnim(weaponInfo))
+ return FIGHTMOVE_MELEE2;
+ }
+ if (m_curFightMove == FIGHTMOVE_MELEE2) {
+ if (GetFinishingAttackAnim(weaponInfo))
+ return FIGHTMOVE_MELEE3;
+ }
+ return FIGHTMOVE_MELEE1;
+ }
+ return FIGHTMOVE_SHUFFLE_F;
+ }
+ if (!hasShoppingBags) {
+ if (punchOnly) {
+ if (dist < 1.4f)
+ return FIGHTMOVE_PUNCH;
+ } else {
+ if (m_pedInObjective->OnGroundOrGettingUp()) {
+ if (!CGame::nastyGame || dist >= 1.2f || m_pedInObjective->IsPlayer()
+ || m_pedInObjective->m_nPedState != PED_DEAD && m_pedInObjective->IsPedHeadAbovePos(-0.3f)) {
+
+ return FIGHTMOVE_IDLE;
+ } else {
+ return FIGHTMOVE_GROUNDKICK;
+ }
+ }
+ if (dist < 0.95f && canKneeHead)
+ return FIGHTMOVE_KNEE;
+ if (dist < 1.4f)
+ return FIGHTMOVE_PUNCH;
+ if (dist < 2.f && canKick) {
+ int nextMove = FIGHTMOVE_LONGKICK;
+ if (canRoundhouse && CGeneral::GetRandomNumber() & 1)
+ nextMove = FIGHTMOVE_ROUNDHOUSE;
+ return nextMove;
+ }
+ }
+ return FIGHTMOVE_SHUFFLE_F;
+ }
+ if (dist < 2.f)
+ return FIGHTMOVE_ROUNDHOUSE;
+ else
+ return FIGHTMOVE_SHUFFLE_F;
+}
+
+// --MIAMI: Done
void
CPed::SetFall(int extraTime, AnimationId animId, uint8 evenIfNotInControl)
{
@@ -5851,6 +6383,7 @@ CPed::SetFall(int extraTime, AnimationId animId, uint8 evenIfNotInControl)
bFallenDown = true;
}
+// --MIAMI: Done
void
CPed::SetFlee(CEntity *fleeFrom, int time)
{
@@ -5858,7 +6391,7 @@ CPed::SetFlee(CEntity *fleeFrom, int time)
return;
SetStoredState();
- m_nPedState = PED_FLEE_ENTITY;
+ SetPedState(PED_FLEE_ENTITY);
bUsePedNodeSeek = true;
SetMoveState(PEDMOVE_RUN);
m_fleeFrom = fleeFrom;
@@ -5881,6 +6414,7 @@ CPed::SetFlee(CEntity *fleeFrom, int time)
}
}
+// --MIAMI: Done
void
CPed::SetFlee(CVector2D const &from, int time)
{
@@ -5889,7 +6423,7 @@ CPed::SetFlee(CVector2D const &from, int time)
if (m_nPedState != PED_FLEE_ENTITY) {
SetStoredState();
- m_nPedState = PED_FLEE_POS;
+ SetPedState(PED_FLEE_POS);
SetMoveState(PEDMOVE_RUN);
m_fleeFromPosX = from.x;
m_fleeFromPosY = from.y;
@@ -6153,8 +6687,8 @@ CPed::PlayHitSound(CPed *hitTo)
eWeaponType weapon = GetWeapon()->m_eWeaponType;
CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(weapon);
if (weaponInfo->m_AnimToPlay == ASSOCGRP_KNIFE) {
- if (m_lastFightMove >= FIGHTMOVE_MELEE1) {
- if (m_lastFightMove == FIGHTMOVE_MELEE3) {
+ if (m_curFightMove >= FIGHTMOVE_MELEE1) {
+ if (m_curFightMove == FIGHTMOVE_MELEE3) {
DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_BAT_ATTACK, (weapon << 8) | 3);
} else {
DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_KNIFE_ATTACK, (weapon << 8) | 3);
@@ -6164,21 +6698,21 @@ CPed::PlayHitSound(CPed *hitTo)
}
// This is why first dimension is between FightMove 1 and 17.
- if (m_lastFightMove <= FIGHTMOVE_NULL || m_lastFightMove >= FIGHTMOVE_HITFRONT)
+ if (m_curFightMove <= FIGHTMOVE_NULL || m_curFightMove >= FIGHTMOVE_HITFRONT)
return;
uint16 soundId;
// And this is why second dimension is between 18 and 27.
- if (hitTo->m_lastFightMove <= FIGHTMOVE_GROUNDKICK || hitTo->m_lastFightMove >= FIGHTMOVE_IDLE2NORM) {
+ if (hitTo->m_curFightMove > FIGHTMOVE_GROUNDKICK && hitTo->m_curFightMove < FIGHTMOVE_IDLE2NORM) {
+ soundId = hitSoundsByFightMoves[m_curFightMove - FIGHTMOVE_STDPUNCH][hitTo->m_curFightMove - FIGHTMOVE_HITFRONT];
+ } else {
if (hitTo->m_nPedState == PED_DEAD || hitTo->UseGroundColModel()) {
- soundId = hitSoundsByFightMoves[m_lastFightMove - FIGHTMOVE_STDPUNCH][FIGHTMOVE_HITONFLOOR - FIGHTMOVE_HITFRONT];
+ soundId = hitSoundsByFightMoves[m_curFightMove - FIGHTMOVE_STDPUNCH][FIGHTMOVE_HITONFLOOR - FIGHTMOVE_HITFRONT];
} else {
- soundId = hitSoundsByFightMoves[m_lastFightMove - FIGHTMOVE_STDPUNCH][FIGHTMOVE_HITFRONT - FIGHTMOVE_HITFRONT];
+ soundId = hitSoundsByFightMoves[m_curFightMove - FIGHTMOVE_STDPUNCH][FIGHTMOVE_HITFRONT - FIGHTMOVE_HITFRONT];
}
- } else {
- soundId = hitSoundsByFightMoves[m_lastFightMove - FIGHTMOVE_STDPUNCH][hitTo->m_lastFightMove - FIGHTMOVE_HITFRONT];
}
if (soundId != NO_SND)
@@ -6994,7 +7528,7 @@ CPed::EndFight(uint8 endType)
if (m_nPedState != PED_FIGHT)
return;
- m_lastFightMove = FIGHTMOVE_NULL;
+ m_curFightMove = FIGHTMOVE_NULL;
RestorePreviousState();
CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE);
if (!animAssoc)
@@ -7328,30 +7862,60 @@ CPed::Fall(void)
}
}
+// --MIAMI: Done
void
CPed::Fight(void)
{
- CAnimBlendAssociation *currentAssoc = nil, *animAssoc;
- bool hasShoppingBags, punchOnly, canKick, canKneeHead, canRoundhouse;
- float angleToFace, nextAngle;
- bool goForward = false;
- int nextFightMove;
+ CAnimBlendAssociation *currentAssoc, *animAssoc;
+ bool fightWithWeapon = false;
+
+ eWeaponType weapon = GetWeapon()->m_eWeaponType;
+ CWeaponInfo *weaponInfo = CWeaponInfo::GetWeaponInfo(weapon);
+
+ if (weaponInfo->m_bFightMode && weapon != WEAPONTYPE_UNARMED) {
+ fightWithWeapon = true;
+ tFightMoves[FIGHTMOVE_MELEE1].startFireTime = weaponInfo->m_fAnimFrameFire;
+ tFightMoves[FIGHTMOVE_MELEE1].endFireTime = weaponInfo->m_fAnimLoopEnd;
+ tFightMoves[FIGHTMOVE_MELEE2].startFireTime = weaponInfo->m_fAnim2FrameFire;
+ tFightMoves[FIGHTMOVE_MELEE2].endFireTime = weaponInfo->m_fAnim2LoopEnd;
+ tFightMoves[FIGHTMOVE_MELEE3].startFireTime = weaponInfo->m_fAnim2FrameFire;
+ tFightMoves[FIGHTMOVE_MELEE3].endFireTime = weaponInfo->m_fAnim2LoopEnd;
+ }
- switch (m_lastFightMove) {
+ switch (m_curFightMove) {
case FIGHTMOVE_NULL:
return;
case FIGHTMOVE_IDLE2NORM:
- m_lastFightMove = FIGHTMOVE_NULL;
+ m_curFightMove = FIGHTMOVE_NULL;
RestorePreviousState();
+
+ // FIX: Uninitialized
+ currentAssoc = nil;
break;
case FIGHTMOVE_IDLE:
- // currentAssoc = nil;
+ currentAssoc = nil;
break;
default:
- currentAssoc = RpAnimBlendClumpGetAssociation(GetClump(), tFightMoves[m_lastFightMove].animId);
+ currentAssoc = RpAnimBlendClumpGetAssociation(GetClump(), tFightMoves[m_curFightMove].animId);
break;
}
+ if (m_curFightMove == FIGHTMOVE_SHUFFLE_F && !currentAssoc)
+ currentAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_SH_BACK);
+
+ if (IsPlayer() && currentAssoc && weapon == WEAPONTYPE_KATANA) {
+ if (m_curFightMove == FIGHTMOVE_MELEE1 || m_curFightMove == FIGHTMOVE_MELEE2) {
+ static float streakDelay = 0.2f;
+
+ if (tFightMoves[m_curFightMove].startFireTime - streakDelay < currentAssoc->currentTime &&
+ streakDelay + tFightMoves[m_curFightMove].endFireTime > currentAssoc->currentTime) {
+
+ // TODO(Miami): AddWeaponStreak
+ // CSpecialFX::AddWeaponStreak(v2->m_weapons[(char)v2->m_currentWeapon].nWeaponId);
+ }
+ }
+ }
+
if (!bIsAttacking && IsPlayer()) {
if (currentAssoc) {
currentAssoc->blendDelta = -1000.0f;
@@ -7365,291 +7929,145 @@ CPed::Fight(void)
} else if (currentAssoc && m_fightState > FIGHTSTATE_MOVE_FINISHED) {
float animTime = currentAssoc->currentTime;
- FightMove &curMove = tFightMoves[m_lastFightMove];
+ FightMove &curMove = tFightMoves[m_curFightMove];
if (curMove.hitLevel != HITLEVEL_NULL && animTime > curMove.startFireTime && animTime <= curMove.endFireTime && m_fightState >= FIGHTSTATE_NO_MOVE) {
+ if (animTime > curMove.startFireTime && animTime - currentAssoc->timeStep < curMove.startFireTime &&
+ (IsPlayer() || weapon != WEAPONTYPE_UNARMED)) {
+
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_MELEE_ATTACK_START, weapon << 8);
+ }
+
CVector touchingNodePos(0.0f, 0.0f, 0.0f);
- switch (m_lastFightMove) {
- case FIGHTMOVE_STDPUNCH:
- case FIGHTMOVE_PUNCHHOOK:
- case FIGHTMOVE_BODYBLOW:
- TransformToNode(touchingNodePos, PED_HANDR);
- break;
- case FIGHTMOVE_IDLE:
- case FIGHTMOVE_SHUFFLE_F:
- break;
+ switch (m_curFightMove) {
case FIGHTMOVE_KNEE:
TransformToNode(touchingNodePos, PED_LOWERLEGR);
break;
+ case FIGHTMOVE_PUNCHHOOK:
case FIGHTMOVE_PUNCHJAB:
TransformToNode(touchingNodePos, PED_HANDL);
break;
case FIGHTMOVE_LONGKICK:
case FIGHTMOVE_ROUNDHOUSE:
+ case FIGHTMOVE_FWDLEFT:
+ case FIGHTMOVE_BACKRIGHT:
case FIGHTMOVE_GROUNDKICK:
TransformToNode(touchingNodePos, PED_FOOTR);
break;
+ case FIGHTMOVE_FWDRIGHT:
+ TransformToNode(touchingNodePos, PED_HEAD);
+ break;
+ case FIGHTMOVE_BACKKICK:
+ case FIGHTMOVE_BACKFLIP:
+ TransformToNode(touchingNodePos, PED_FOOTL);
+ break;
+ case FIGHTMOVE_BACKLEFT:
+ TransformToNode(touchingNodePos, PED_UPPERARML);
+ break;
+ default:
+ TransformToNode(touchingNodePos, PED_HANDR);
+ break;
}
- if (m_lastFightMove == FIGHTMOVE_PUNCHJAB) {
- touchingNodePos += 0.1f * GetForward();
- } else if (m_lastFightMove == FIGHTMOVE_PUNCHHOOK) {
- touchingNodePos += 0.22f * GetForward();
- }
- FightStrike(touchingNodePos);
+ FightStrike(touchingNodePos, fightWithWeapon);
m_fightButtonPressure = 0;
return;
}
if (curMove.hitLevel != HITLEVEL_NULL) {
- if (animTime > curMove.endFireTime) {
+ if (animTime > curMove.endFireTime && weaponInfo->m_AnimToPlay != ASSOCGRP_KNIFE) {
if (IsPlayer())
currentAssoc->speed = 1.0f;
else
currentAssoc->speed = 0.8f;
}
- if (IsPlayer() && !nPlayerInComboMove) {
+ if (IsPlayer() && !nPlayerInComboMove && !fightWithWeapon) {
if (curMove.comboFollowOnTime > 0.0f && m_fightButtonPressure != 0 && animTime > curMove.comboFollowOnTime) {
+ m_lastFightMove = m_curFightMove;
// Notice that it increases fight move index, because we're in combo!
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[++m_lastFightMove].animId, 8.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[++m_curFightMove].animId, 8.0f);
animAssoc->SetFinishCallback(FinishFightMoveCB, this);
animAssoc->SetCurrentTime(0.1f * animAssoc->hierarchy->totalLength);
+ animAssoc->speed = 0.8f;
m_fightButtonPressure = 0;
nPlayerInComboMove = 1;
}
}
- } else {
- if (curMove.startFireTime > 0.0f && m_lastFightMove != FIGHTMOVE_SHUFFLE_F && animTime > curMove.startFireTime) {
- if (IsPlayer())
- currentAssoc->speed = 1.3f;
- else
- currentAssoc->speed = 0.8f;
- }
}
- } else if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED) {
+
+ } else if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && GetWeapon()->m_eWeaponType != WEAPONTYPE_BRASSKNUCKLE && !fightWithWeapon) {
EndFight(ENDFIGHT_FAST);
} else if (m_fightButtonPressure != 0) {
- bool canAffectMultiplePeople = true;
- nextAngle = m_fRotationCur;
- bool kickGround = false;
- float angleForGroundKick = 0.0f;
- CPed *pedOnGround = nil;
-
- Say(SOUND_PED_ATTACK);
-
- if (IsPlayer()) {
- canRoundhouse = false;
- punchOnly = false;
- canKick = true;
- nextFightMove = (m_fightButtonPressure > 190 ? FIGHTMOVE_BODYBLOW : FIGHTMOVE_KNEE);
- hasShoppingBags = false;
- canKneeHead = true;
- nPlayerInComboMove = 0;
- } else {
- nextFightMove = (m_fightButtonPressure > 120 ? FIGHTMOVE_BODYBLOW : FIGHTMOVE_KNEE);
- uint16 pedFeatures = m_pedStats->m_flags;
- punchOnly = pedFeatures & STAT_PUNCH_ONLY;
- canRoundhouse = pedFeatures & STAT_CAN_ROUNDHOUSE;
- canKneeHead = pedFeatures & STAT_CAN_KNEE_HEAD;
- canKick = pedFeatures & STAT_CAN_KICK;
- hasShoppingBags = pedFeatures & STAT_SHOPPING_BAGS;
- }
-
- // Attack isn't scripted, find the victim
- if (IsPlayer() || !m_pedInObjective) {
-
- for (int i = 0; i < m_numNearPeds; i++) {
-
- CPed *nearPed = m_nearPeds[i];
- float nearPedDist = (nearPed->GetPosition() - GetPosition()).Magnitude();
- if (nearPedDist < 3.0f) {
- float angleToFace = CGeneral::GetRadianAngleBetweenPoints(
- nearPed->GetPosition().x, nearPed->GetPosition().y,
- GetPosition().x, GetPosition().y);
-
- nextAngle = CGeneral::LimitRadianAngle(angleToFace);
- m_fRotationCur = CGeneral::LimitRadianAngle(m_fRotationCur);
-
- float neededTurn = Abs(nextAngle - m_fRotationCur);
- if (neededTurn > PI)
- neededTurn = TWOPI - neededTurn;
-
- PedState nearPedState = nearPed->m_nPedState;
- if (nearPedState != PED_FALL && nearPedState != PED_GETUP && nearPedState != PED_DIE && nearPedState != PED_DEAD) {
-
- if (nearPedDist < 0.8f && neededTurn < DEGTORAD(75.0f) && canKneeHead) {
- canAffectMultiplePeople = false;
- } else if (nearPedDist >= 1.3f || neededTurn >= DEGTORAD(55.0f) || hasShoppingBags) {
+ if (!IsPlayer())
+ Say(SOUND_PED_ATTACK);
- if (nearPedDist < 1.7f
- && neededTurn < DEGTORAD(35.0f)
- && (canKick || hasShoppingBags)) {
+ if (m_curFightMove != FIGHTMOVE_IDLE)
+ m_lastFightMove = m_curFightMove;
- nextFightMove = FIGHTMOVE_LONGKICK;
- if (hasShoppingBags) {
- nextFightMove = FIGHTMOVE_ROUNDHOUSE;
- } else if (canRoundhouse && CGeneral::GetRandomNumber() & 1) {
- nextFightMove = FIGHTMOVE_ROUNDHOUSE;
- }
- canAffectMultiplePeople = false;
- } else if (nearPedDist < 2.0f && neededTurn < DEGTORAD(30.0f) && canKick) {
- canAffectMultiplePeople = false;
- nextFightMove = FIGHTMOVE_LONGKICK;
- } else if (neededTurn < DEGTORAD(30.0f)) {
- goForward = true;
- }
- } else {
- nextFightMove += 2; // Makes it 6 or 7
- if (punchOnly)
- nextFightMove = FIGHTMOVE_PUNCHJAB;
+ m_curFightMove = IsPlayer() ? ChooseAttackPlayer(m_fightButtonPressure, fightWithWeapon) : ChooseAttackAI(m_fightButtonPressure, fightWithWeapon);
- canAffectMultiplePeople = false;
- }
- } else if (!CGame::nastyGame
- || nearPedDist >= 1.3f
- || neededTurn >= DEGTORAD(55.0f)
- || punchOnly) {
-
- if (nearPedDist > 0.8f
- && nearPedDist < 3.0f
- && neededTurn < DEGTORAD(30.0f)) {
- goForward = true;
- }
+ if (m_curFightMove != FIGHTMOVE_IDLE) {
- } else if (nearPedState != PED_DEAD || pedOnGround) {
- if (!nearPed->IsPedHeadAbovePos(-0.3f)) {
- canAffectMultiplePeople = false;
- nextFightMove = FIGHTMOVE_GROUNDKICK;
- }
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), m_curFightMove < FIGHTMOVE_MELEE1 ? ASSOCGRP_STD : weaponInfo->m_AnimToPlay,
+ tFightMoves[m_curFightMove].animId, 8.0f);
- } else {
- pedOnGround = nearPed;
- kickGround = true;
- angleForGroundKick = nextAngle;
- }
- }
-
- if (!canAffectMultiplePeople) {
- m_fRotationDest = nextAngle;
- if (IsPlayer()) {
- m_fRotationCur = m_fRotationDest;
- m_lookTimer = 0;
- SetLookFlag(nearPed, true);
- SetLookTimer(1500);
- }
- break;
- }
- }
- } else {
- // Because we're in a scripted fight with some particular ped.
- canAffectMultiplePeople = false;
-
- float fightingPedDist = (m_pedInObjective->GetPosition() - GetPosition()).Magnitude();
- if (hasShoppingBags) {
- if (fightingPedDist >= 1.7f)
- nextFightMove = FIGHTMOVE_SHUFFLE_F;
- else
- nextFightMove = FIGHTMOVE_ROUNDHOUSE;
-
- } else if (punchOnly) {
- if (fightingPedDist >= 1.3f)
- nextFightMove = FIGHTMOVE_SHUFFLE_F;
+ if (weaponInfo->m_AnimToPlay != ASSOCGRP_KNIFE || m_curFightMove < FIGHTMOVE_MELEE1) {
+ if (m_curFightMove == FIGHTMOVE_BACKKICK)
+ animAssoc->speed = 1.15f;
else
- nextFightMove = FIGHTMOVE_PUNCHJAB;
-
- } else if (fightingPedDist >= 3.0f) {
- nextFightMove = FIGHTMOVE_STDPUNCH;
-
+ animAssoc->speed = 0.8f;
} else {
- angleToFace = CGeneral::GetRadianAngleBetweenPoints(
- m_pedInObjective->GetPosition().x,
- m_pedInObjective->GetPosition().y,
- GetPosition().x,
- GetPosition().y);
-
- nextAngle = CGeneral::LimitRadianAngle(angleToFace);
- m_fRotationDest = nextAngle;
- m_fRotationCur = m_fRotationDest;
- PedState fightingPedState = m_pedInObjective->m_nPedState;
- if (fightingPedState != PED_FALL && fightingPedState != PED_GETUP && fightingPedState != PED_DIE && fightingPedState != PED_DEAD) {
-
- if (fightingPedDist >= 0.8f || !canKneeHead) {
-
- if (fightingPedDist >= 1.3f) {
-
- if (fightingPedDist < 1.7f && canKick) {
- nextFightMove = FIGHTMOVE_LONGKICK;
- if (canRoundhouse && CGeneral::GetRandomNumber() & 1)
- nextFightMove = FIGHTMOVE_ROUNDHOUSE;
-
- } else if (fightingPedDist < 2.0f && canKick) {
- nextFightMove += 5; // Makes it 9 or 10
-
- } else {
- nextFightMove = FIGHTMOVE_SHUFFLE_F;
-
- }
- } else {
- nextFightMove += 2; // Makes it 6 or 7
- }
- }
- } else if (!CGame::nastyGame
- || fightingPedDist >= 1.3f
- || m_pedInObjective->IsPlayer()
- || m_pedInObjective->m_nPedState != PED_DEAD && m_pedInObjective->IsPedHeadAbovePos(-0.3f)) {
- nextFightMove = FIGHTMOVE_IDLE;
- } else {
- nextFightMove = FIGHTMOVE_GROUNDKICK;
+ switch (GetWeapon()->m_eWeaponType) {
+ case WEAPONTYPE_SCREWDRIVER:
+ case WEAPONTYPE_KNIFE:
+ animAssoc->speed = 1.05f;
+ break;
+ case WEAPONTYPE_GOLFCLUB:
+ case WEAPONTYPE_NIGHTSTICK:
+ case WEAPONTYPE_BASEBALLBAT:
+ case WEAPONTYPE_HAMMER:
+ case WEAPONTYPE_KATANA:
+ animAssoc->speed = 0.8f;
+ break;
+ case WEAPONTYPE_CLEAVER:
+ case WEAPONTYPE_MACHETE:
+ animAssoc->speed = 0.9f;
+ break;
}
}
- }
-
- if (canAffectMultiplePeople) {
- if (kickGround && IsPlayer()) {
- m_fRotationDest = angleForGroundKick;
- nextFightMove = FIGHTMOVE_GROUNDKICK;
- m_fRotationCur = m_fRotationDest;
- m_lookTimer = 0;
- SetLookFlag(pedOnGround, true);
- SetLookTimer(1500);
- } else if (goForward) {
- nextFightMove = FIGHTMOVE_SHUFFLE_F;
- } else {
- nextFightMove = FIGHTMOVE_STDPUNCH;
- }
- }
- if (nextFightMove != FIGHTMOVE_IDLE) {
- m_lastFightMove = nextFightMove;
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_lastFightMove].animId, 4.0f);
-
- animAssoc->SetFinishCallback(FinishFightMoveCB, this);
if (m_fightState == FIGHTSTATE_MOVE_FINISHED && animAssoc->currentTime != 0.0f) {
- animAssoc->SetCurrentTime(0.0f);
animAssoc->SetRun();
+ if (!IsPlayer())
+ animAssoc->SetCurrentTime(0.0f);
}
+ if (IsPlayer())
+ animAssoc->SetCurrentTime(0.08f);
+
+ animAssoc->SetFinishCallback(FinishFightMoveCB, this);
m_fightButtonPressure = 0;
}
m_fightState = FIGHTSTATE_NO_MOVE;
- } else if (m_takeAStepAfterAttack && m_lastFightMove != FIGHTMOVE_SHUFFLE_F
+ } else if (m_takeAStepAfterAttack && m_curFightMove != FIGHTMOVE_SHUFFLE_F
#ifndef FIX_BUGS
&& CheckForPedsOnGroundToAttack(this, nil) == 4) {
#else
&& CheckForPedsOnGroundToAttack(this, nil) == PED_IN_FRONT_OF_ATTACKER) {
#endif
- m_lastFightMove = FIGHTMOVE_SHUFFLE_F;
- animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), tFightMoves[m_lastFightMove].animId);
+ m_lastFightMove = m_curFightMove;
+ m_curFightMove = FIGHTMOVE_SHUFFLE_F;
+ animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), tFightMoves[m_curFightMove].animId);
if (animAssoc) {
animAssoc->SetCurrentTime(0.0f);
animAssoc->blendDelta = 4.0f;
animAssoc->SetRun();
} else {
- animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_lastFightMove].animId, 32.0f);
+ animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_curFightMove].animId, 32.0f);
}
animAssoc->SetFinishCallback(FinishFightMoveCB, this);
m_fightState = FIGHTSTATE_NO_MOVE;
@@ -7659,13 +8077,14 @@ CPed::Fight(void)
} else if (m_takeAStepAfterAttack) {
EndFight(ENDFIGHT_FAST);
- } else if (m_lastFightMove == FIGHTMOVE_IDLE) {
+ } else if (m_curFightMove == FIGHTMOVE_IDLE) {
if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) {
EndFight(ENDFIGHT_NORMAL);
}
} else {
- m_lastFightMove = FIGHTMOVE_IDLE;
+ m_lastFightMove = m_curFightMove;
+ m_curFightMove = FIGHTMOVE_IDLE;
if (IsPlayer())
m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 500;
else
@@ -7755,12 +8174,13 @@ CPed::FinishDieAnimCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->bIsPedDieAnimPlaying = false;
}
+// --MIAMI: Done
void
CPed::FinishFightMoveCB(CAnimBlendAssociation *animAssoc, void *arg)
{
CPed *ped = (CPed*)arg;
- if (tFightMoves[ped->m_lastFightMove].animId == animAssoc->animId) {
+ if (tFightMoves[ped->m_curFightMove].animId == animAssoc->animId) {
ped->m_fightState = FIGHTSTATE_MOVE_FINISHED;
animAssoc->blendDelta = -1000.0f;
}
@@ -8184,14 +8604,19 @@ CPed::Wait(void)
animAssoc->blendDelta = -4.0f;
animAssoc->flags |= ASSOC_DELETEFADEDOUT;
}
+ if (m_attractor && m_objective == OBJECTIVE_WAIT_ON_FOOT_AT_ICE_CREAM_VAN) {
+ GetPedAttractorManager()->BroadcastDeparture(this, m_attractor);
+ bBoughtIceCream = true;
+ }
ClearWaitState();
}
#ifdef VC_PED_PORTS
else if (m_nWaitState == WAITSTATE_PLAYANIM_TAXI) {
if (m_pedInObjective) {
if (m_objective == OBJECTIVE_GOTO_CHAR_ON_FOOT || m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT) {
-
- // VC also calls CleanUpOldReference here for old LookTarget.
+
+ if (m_pLookTarget)
+ m_pLookTarget->CleanUpOldReference(&m_pLookTarget);
m_pLookTarget = m_pedInObjective;
m_pLookTarget->RegisterReference((CEntity **) &m_pLookTarget);
TurnBody();
@@ -8305,7 +8730,7 @@ CPed::Seek(void)
m_objective != OBJECTIVE_ENTER_CAR_AS_PASSENGER && m_objective != OBJECTIVE_SOLICIT_VEHICLE && !bDuckAndCover) {
if ((!m_pedInObjective || !m_pedInObjective->bInVehicle)
- && !((CTimer::GetFrameCounter() + (m_randomSeed % 256) + 17) & 7)) {
+ && (CTimer::GetFrameCounter() + m_randomSeed + 60) % 32 == 0) {
CEntity *obstacle = CWorld::TestSphereAgainstWorld(m_vecSeekPos, 0.4f, nil,
false, true, false, false, false, false);
@@ -8404,8 +8829,8 @@ CPed::Seek(void)
CVector2D moveDist(GetPosition().x - m_actionX, GetPosition().y - m_actionY);
if (moveDist.Magnitude() < 0.5f) {
m_nPedStateTimer = 0;
- m_actionX = 0;
- m_actionY = 0;
+ m_actionX = 0.f;
+ m_actionY = 0.f;
}
}
@@ -8447,8 +8872,8 @@ CPed::Seek(void)
if ((m_objective != OBJECTIVE_FOLLOW_CHAR_IN_FORMATION || m_pedInObjective->m_nMoveState == PEDMOVE_STILL) && m_nMoveState != PEDMOVE_STILL) {
m_nPedStateTimer = 0;
- m_actionX = 0;
- m_actionY = 0;
+ m_actionX = 0.f;
+ m_actionY = 0.f;
}
if (m_objective == OBJECTIVE_GOTO_AREA_ON_FOOT || m_objective == OBJECTIVE_RUN_TO_AREA || m_objective == OBJECTIVE_SPRINT_TO_AREA ||
@@ -8465,6 +8890,7 @@ CPed::Seek(void)
return true;
}
+// --MIAMI: Done
CVector*
CPed::SeekFollowingPath(void)
{
@@ -8488,6 +8914,7 @@ CPed::SeekFollowingPath(void)
return &vecNextPathNode;
}
+// --MIAMI: Done
void
CPed::Flee(void)
{
@@ -8499,11 +8926,14 @@ CPed::Flee(void)
}
if (mayFinishFleeing) {
+ bMakeFleeScream = false;
eMoveState moveState = m_nMoveState;
ClearFlee();
- if (m_objective == OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE || m_objective == OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS)
+ if (m_objective == OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE || m_objective == OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS) {
+ bBeingChasedByPolice = false;
RestorePreviousObjective();
+ }
if ((m_nPedState == PED_IDLE || m_nPedState == PED_WANDER_PATH) && CGeneral::GetRandomNumber() & 1) {
SetWaitState(moveState <= PEDMOVE_WALK ? WAITSTATE_CROSS_ROAD_LOOK : WAITSTATE_FINISH_FLEE, nil);
@@ -8513,6 +8943,11 @@ CPed::Flee(void)
m_fleeTimer = CTimer::GetTimeInMilliseconds() + 5000;
}
+ if (bMakeFleeScream && !((CTimer::GetFrameCounter() + m_randomSeed) & 7)) {
+ Say(SOUND_PED_FLEE_SPRINT);
+ bMakeFleeScream = false;
+ }
+
if (bUsePedNodeSeek) {
CPathNode *realLastNode = nil;
uint8 nextDirection = 0;
@@ -8536,7 +8971,7 @@ CPed::Flee(void)
}
if (m_pNextPathNode) {
- m_vecSeekPos = m_pNextPathNode->GetPosition();
+ m_vecSeekPos = CPathFind::TakeWidthIntoAccountForWandering(m_pNextPathNode, m_randomSeed);
if (m_nMoveState == PEDMOVE_RUN)
bIsRunning = true;
@@ -8590,32 +9025,15 @@ CPed::Flee(void)
m_fRotationDest -= TWOPI;
}
- if (CTimer::GetTimeInMilliseconds() & 0x20) {
- //CVector forwardPos = GetPosition();
- CMatrix forwardMat(GetMatrix());
- forwardMat.GetPosition() += Multiply3x3(forwardMat, CVector(0.0f, 4.0f, 0.0f));
- CVector forwardPos = forwardMat.GetPosition();
-
- CEntity *foundEnt;
- CColPoint foundCol;
- bool found = CWorld::ProcessVerticalLine(forwardPos, forwardMat.GetPosition().z - 100.0f, foundCol, foundEnt, 1, 0, 0, 0, 1, 0, 0);
-
- if (!found || Abs(forwardPos.z - forwardMat.GetPosition().z) > 1.0f) {
- m_fRotationDest += DEGTORAD(112.5f);
- m_nPedStateTimer = CTimer::GetTimeInMilliseconds() + 2000;
- }
- }
-
if (CTimer::GetTimeInMilliseconds() >= m_collidingThingTimer)
return;
if (!m_collidingEntityWhileFleeing)
return;
- double damagingThingPriorityMult = (double)(m_collidingThingTimer - CTimer::GetTimeInMilliseconds()) * 2.0 / 2500;
-
- if (damagingThingPriorityMult <= 1.5) {
+ double collidingThingPriorityMult = (double)(m_collidingThingTimer - CTimer::GetTimeInMilliseconds()) * 2.0 / 2500;
+ if (collidingThingPriorityMult <= 1.5) {
double angleToFleeEntity = CGeneral::GetRadianAngleBetweenPoints(
GetPosition().x,
GetPosition().y,
@@ -8623,35 +9041,34 @@ CPed::Flee(void)
m_collidingEntityWhileFleeing->GetPosition().y);
angleToFleeEntity = CGeneral::LimitRadianAngle(angleToFleeEntity);
- // It includes projectiles, but is everything collides with us included?
- double angleToFleeDamagingThing = CGeneral::GetRadianAngleBetweenPoints(
+ double angleToFleeCollidingThing = CGeneral::GetRadianAngleBetweenPoints(
m_vecDamageNormal.x,
m_vecDamageNormal.y,
0.0f,
0.0f);
- angleToFleeDamagingThing = CGeneral::LimitRadianAngle(angleToFleeDamagingThing);
+ angleToFleeCollidingThing = CGeneral::LimitRadianAngle(angleToFleeCollidingThing);
- if (angleToFleeEntity - PI > angleToFleeDamagingThing)
- angleToFleeDamagingThing += TWOPI;
- else if (PI + angleToFleeEntity < angleToFleeDamagingThing)
- angleToFleeDamagingThing -= TWOPI;
+ if (angleToFleeEntity - PI > angleToFleeCollidingThing)
+ angleToFleeCollidingThing += TWOPI;
+ else if (PI + angleToFleeEntity < angleToFleeCollidingThing)
+ angleToFleeCollidingThing -= TWOPI;
- if (damagingThingPriorityMult <= 1.0f) {
+ if (collidingThingPriorityMult <= 1.0f) {
// Range [0.0, 1.0]
- float angleToFleeBoth = (angleToFleeDamagingThing + angleToFleeEntity) * 0.5f;
+ float angleToFleeBoth = (angleToFleeCollidingThing + angleToFleeEntity) * 0.5f;
if (m_fRotationDest - PI > angleToFleeBoth)
angleToFleeBoth += TWOPI;
else if (PI + m_fRotationDest < angleToFleeBoth)
angleToFleeBoth -= TWOPI;
- m_fRotationDest = (1.0f - damagingThingPriorityMult) * m_fRotationDest + damagingThingPriorityMult * angleToFleeBoth;
+ m_fRotationDest = (1.0f - collidingThingPriorityMult) * m_fRotationDest + collidingThingPriorityMult * angleToFleeBoth;
} else {
// Range (1.0, 1.5]
- double adjustedMult = (damagingThingPriorityMult - 1.0f) * 2.0f;
- m_fRotationDest = angleToFleeEntity * (1.0 - adjustedMult) + adjustedMult * angleToFleeDamagingThing;
+ double adjustedMult = (collidingThingPriorityMult - 1.0f) * 2.0f;
+ m_fRotationDest = angleToFleeEntity * (1.0 - adjustedMult) + adjustedMult * angleToFleeCollidingThing;
}
} else {
m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(
@@ -8676,7 +9093,7 @@ void
CPed::FollowPath(void)
{
m_pCurPathNode = m_pathNodesToGo[m_nCurPathNodeId];
- if (m_pathNodeTimer != 0 && CTimer::GetTimeInMilliseconds() > m_pathNodeTimer) {
+ if (m_pathNodeTimer > 0 && CTimer::GetTimeInMilliseconds() > m_pathNodeTimer) {
RestorePreviousState();
ClearFollowPath();
m_pathNodeTimer = 0;
@@ -9455,7 +9872,6 @@ CPed::IsPedDoingDriveByShooting(void)
return false;
}
-
// --MIAMI: Done
bool
CPed::IsPedShootable(void)
@@ -9696,8 +10112,7 @@ CPed::KillPedWithCar(CVehicle *car, float impulse)
CPed::InflictDamage(car, WEAPONTYPE_RAMMEDBYCAR, damage, PEDPIECE_TORSO, fallDirection);
CPed::SetFall(1000, (AnimationId)(fallDirection + ANIM_KO_SKID_FRONT), true);
- if ((m_nPedState == PED_FALL || m_nPedState == PED_DIE || m_nPedState == PED_DEAD)
- && !m_pCollidingEntity &&
+ if (OnGround() && !m_pCollidingEntity &&
(!IsPlayer() || bHasHitWall || car->GetModelIndex() == MI_TRAIN || m_vecDamageNormal.z < -0.8f)) {
m_pCollidingEntity = car;
@@ -10384,12 +10799,16 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
}
}
+// --MIAMI: Done?
void
CPed::ProcessControl(void)
{
CColPoint foundCol;
CEntity *foundEnt = nil;
+ if (CTimer::GetFrameCounter() + m_randomSeed % 32 == 0)
+ PruneReferences();
+
int alpha = CVisibilityPlugins::GetClumpAlpha(GetClump());
if (!bFadeOut) {
if (alpha < 255) {
@@ -10405,6 +10824,7 @@ CPed::ProcessControl(void)
CVisibilityPlugins::SetClumpAlpha(GetClump(), alpha);
bIsShooting = false;
+ b158_40 = false;
BuildPedLists();
bIsInWater = false;
bIsDrowning = false;
@@ -10440,6 +10860,7 @@ CPed::ProcessControl(void)
if (!nearPed->bIsLooking && nearPed->m_nPedState != PED_ATTACK) {
int16 camMode = TheCamera.Cams[TheCamera.ActiveCam].Mode;
if (camMode != CCam::MODE_SNIPER
+ && camMode != CCam::MODE_CAMERA
&& camMode != CCam::MODE_ROCKETLAUNCHER
&& camMode != CCam::MODE_M16_1STPERSON
&& camMode != CCam::MODE_1STPERSON
@@ -10475,13 +10896,11 @@ CPed::ProcessControl(void)
if (ServiceTalkingWhenDead())
ServiceTalking();
-#ifdef VC_PED_PORTS
if (bIsInWater) {
bIsStanding = false;
bWasStanding = false;
CPhysical::ProcessControl();
}
-#endif
return;
}
@@ -10504,14 +10923,13 @@ CPed::ProcessControl(void)
if (m_fHealth <= 1.0f && m_nPedState <= PED_STATES_NO_AI && !bIsInTheAir && !bIsLanding)
SetDie();
+ if (bIsStanding)
+ bPushedAlongByCar = false;
+
bCollidedWithMyVehicle = false;
CEntity *collidingEnt = m_pDamageEntity;
-#ifndef VC_PED_PORTS
- if (!bUsesCollision || m_fDamageImpulse <= 0.0f || m_nPedState == PED_DIE || !collidingEnt) {
-#else
- if (!bUsesCollision || ((!collidingEnt || m_fDamageImpulse <= 0.0f) && (!IsPlayer() || !bIsStuck)) || m_nPedState == PED_DIE) {
-#endif
+ if (!bUsesCollision || ((!collidingEnt || m_fDamageImpulse <= 0.0f) && (!IsPlayer() || !bIsStuck)) || m_nPedState == PED_DIE) {
bHitSomethingLastFrame = false;
if (m_nPedStateTimer <= 500 && bIsInTheAir) {
if (m_nPedStateTimer)
@@ -10530,11 +10948,7 @@ CPed::ProcessControl(void)
}
*/
-#ifndef VC_PED_PORTS
- } else {
-#else
} else if (collidingEnt) {
-#endif
switch (collidingEnt->GetType())
{
case ENTITY_TYPE_BUILDING:
@@ -10584,6 +10998,9 @@ CPed::ProcessControl(void)
if (CanPedJumpThis(collidingEnt)) {
SetJump();
} else if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT) {
+ if (m_nPedType == PEDTYPE_COP && m_nWaitState != WAITSTATE_LOOK_ABOUT)
+ ((CCopPed*)this)->field_624++;
+
SetWaitState(WAITSTATE_LOOK_ABOUT, nil);
} else {
SetWaitState(WAITSTATE_PLAYANIM_TAXI, nil);
@@ -10593,6 +11010,9 @@ CPed::ProcessControl(void)
Say(SOUND_PED_TAXI_CALL);
}
} else {
+ if (m_pLookTarget)
+ m_pLookTarget->CleanUpOldReference(&m_pLookTarget);
+
m_pLookTarget = m_pedInObjective;
m_pLookTarget->RegisterReference((CEntity **) &m_pLookTarget);
TurnBody();
@@ -10622,10 +11042,10 @@ CPed::ProcessControl(void)
m_collidingEntityWhileFleeing = collidingEnt;
m_collidingEntityWhileFleeing->RegisterReference((CEntity **) &m_collidingEntityWhileFleeing);
- uint8 currentDir = floorf((PI + m_fRotationCur) / DEGTORAD(45.0f));
- uint8 nextDir;
- ThePaths.FindNextNodeWandering(PATH_PED, GetPosition(), &m_pLastPathNode, &m_pNextPathNode, currentDir, &nextDir);
-
+ if (m_nWaitState != WAITSTATE_HITWALL)
+ SetWaitState(WAITSTATE_TURN180, nil);
+ m_nPedStateTimer = CTimer::GetTimeInMilliseconds() + 5000;
+ Flee();
} else {
if (neededTurn < DEGTORAD(60.0f)) {
CVector posToHead = m_vecDamageNormal * 4.0f;
@@ -10639,9 +11059,17 @@ CPed::ProcessControl(void)
if (m_nPedState != PED_SEEK_POS && m_nPedState != PED_SEEK_CAR) {
if (m_nPedState == PED_WANDER_PATH) {
m_pNextPathNode = &ThePaths.m_pathNodes[closestNodeId];
+ CVector bestCoords = CPathFind::TakeWidthIntoAccountForWandering(m_pNextPathNode, m_randomSeed);
angleToFace = CGeneral::GetRadianAngleBetweenPoints(
- m_pNextPathNode->GetX(), m_pNextPathNode->GetY(),
+ bestCoords.x, bestCoords.y,
GetPosition().x, GetPosition().y);
+
+ } else if (m_nPedState == PED_FOLLOW_PATH) {
+ CVector bestCoords = m_pathNodesToGo[m_nCurPathNodeId]->GetPosition();
+ angleToFace = CGeneral::GetRadianAngleBetweenPoints(
+ bestCoords.x, bestCoords.y,
+ GetPosition().x, GetPosition().y);
+
} else {
if (ThePaths.m_pathNodes[closestNodeId].GetX() == 0.0f
|| ThePaths.m_pathNodes[closestNodeId].GetY() == 0.0f) {
@@ -10651,6 +11079,7 @@ CPed::ProcessControl(void)
} else {
posToHead.x = ThePaths.m_pathNodes[closestNodeId].GetX();
posToHead.y = ThePaths.m_pathNodes[closestNodeId].GetY();
+ posToHead.z = ThePaths.m_pathNodes[closestNodeId].GetZ();
}
angleToFace = CGeneral::GetRadianAngleBetweenPoints(
posToHead.x, posToHead.y,
@@ -10747,7 +11176,7 @@ CPed::ProcessControl(void)
if (collidingVeh == m_pMyVehicle)
bCollidedWithMyVehicle = true;
-#ifdef VC_PED_PORTS
+
float oldHealth = m_fHealth;
bool playerSufferSound = false;
@@ -10757,7 +11186,8 @@ CPed::ProcessControl(void)
|| m_objective == OBJECTIVE_GOTO_AREA_ON_FOOT
|| m_objective == OBJECTIVE_RUN_TO_AREA
|| m_objective == OBJECTIVE_SPRINT_TO_AREA
- || m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER)) {
+ || m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER
+ || IsUseAttractorObjective(m_objective))) {
if (collidingVeh != m_pCurrentPhysSurface || IsPlayer()) {
if (!bVehEnterDoorIsBlocked) {
@@ -10802,10 +11232,11 @@ CPed::ProcessControl(void)
SetLookTimer(1300);
eWeaponType weaponType = GetWeapon()->m_eWeaponType;
+ uint32 weaponSlot = CWeaponInfo::GetWeaponInfo(weaponType)->m_nWeaponSlot;
if (weaponType == WEAPONTYPE_UNARMED
- || weaponType == WEAPONTYPE_BASEBALLBAT
- || weaponType == WEAPONTYPE_COLT45
- || weaponType == WEAPONTYPE_UZI) {
+ || weaponSlot == 3
+ || weaponSlot == 5
+ || weaponSlot == 1) {
bShakeFist = true;
}
} else {
@@ -10911,142 +11342,12 @@ CPed::ProcessControl(void)
KillPedWithCar(collidingVeh, m_fDamageImpulse);
}
- /* VC specific
if (m_pCollidingEntity != collidingEnt)
bPushedAlongByCar = true;
- */
}
if (m_fHealth < oldHealth && playerSufferSound)
Say(SOUND_PED_HIT);
-#else
- if (collidingVehSpeedSqr <= 1.0f / 400.0f) {
- if (!IsPedInControl()
- || IsPlayer()
- && m_objective != OBJECTIVE_GOTO_AREA_ON_FOOT
- && m_objective != OBJECTIVE_ENTER_CAR_AS_DRIVER
- && m_objective != OBJECTIVE_RUN_TO_AREA) {
-
- if (IsPlayer() && !bIsInTheAir) {
-
- if (IsPedInControl()
- && ((CPlayerPed*)this)->m_fMoveSpeed == 0.0f
- && !bIsLooking
- && CTimer::GetTimeInMilliseconds() > m_lookTimer
- && collidingVeh->pDriver) {
-
- ((CPlayerPed*)this)->AnnoyPlayerPed(false);
- SetLookFlag(collidingVeh, true);
- SetLookTimer(1300);
-
- eWeaponType weaponType = GetWeapon()->m_eWeaponType;
- if (weaponType == WEAPONTYPE_UNARMED
- || weaponType == WEAPONTYPE_BASEBALLBAT
- || weaponType == WEAPONTYPE_COLT45
- || weaponType == WEAPONTYPE_UZI) {
- bShakeFist = true;
- }
- } else {
- SetLookFlag(collidingVeh, true);
- SetLookTimer(500);
- }
- }
-
- } else if (!bVehEnterDoorIsBlocked) {
- if (collidingVeh->GetStatus() != STATUS_PLAYER || CharCreatedBy == MISSION_CHAR) {
- SetDirectionToWalkAroundObject(collidingVeh);
-
- } else if (CTimer::GetTimeInMilliseconds() >= CWorld::Players[CWorld::PlayerInFocus].m_nLastBumpPlayerCarTimer
- || m_nPedStateTimer >= CTimer::GetTimeInMilliseconds()) {
-
- CPed::SetDirectionToWalkAroundObject(collidingVeh);
- CWorld::Players[CWorld::PlayerInFocus].m_nLastBumpPlayerCarTimer = m_nPedStateTimer;
-
- } else if (m_fleeFrom != collidingVeh) {
- SetFlee(collidingVeh, 4000);
- bUsePedNodeSeek = false;
- SetMoveState(PEDMOVE_WALK);
- }
- }
- } else {
- DMAudio.PlayOneShot(collidingVeh->m_audioEntityId, SOUND_CAR_PED_COLLISION, m_fDamageImpulse);
- if (IsPlayer()) {
- CColModel *collidingCol = CModelInfo::GetModelInfo(collidingVeh->GetModelIndex())->GetColModel();
- CVector colMinVec = collidingCol->boundingBox.min;
- CVector colMaxVec = collidingCol->boundingBox.max;
-
- CVector vehColCenterDist = collidingVeh->GetMatrix() * ((colMinVec + colMaxVec) * 0.5f) - GetPosition();
-
- // TLVC = To look vehicle center
-
- float angleToVehFront = collidingVeh->GetForward().Heading();
- float angleDiffFromLookingFrontTLVC = angleToVehFront - vehColCenterDist.Heading();
- angleDiffFromLookingFrontTLVC = CGeneral::LimitRadianAngle(angleDiffFromLookingFrontTLVC);
-
- // I don't know why do we use that
- float vehTopRightHeading = Atan2(colMaxVec.x - colMinVec.x, colMaxVec.y - colMinVec.y);
-
- CVector vehDist = GetPosition() - collidingVeh->GetPosition();
- vehDist.Normalise();
-
- float vehRightVecAndSpeedDotProd;
-
- if (Abs(angleDiffFromLookingFrontTLVC) >= vehTopRightHeading && Abs(angleDiffFromLookingFrontTLVC) < PI - vehTopRightHeading) {
- if (angleDiffFromLookingFrontTLVC <= 0.0f) {
- vehRightVecAndSpeedDotProd = DotProduct(collidingVeh->GetRight(), collidingVeh->m_vecMoveSpeed);
-
- // vehRightVecAndSpeedDotProd < 0.1f = Vehicle being overturned or spinning to it's right?
- if (collidingVehSpeedSqr > 1.0f / 100.0f && vehRightVecAndSpeedDotProd < 0.1f) {
-
- // Car's right faces towards us and isn't coming directly to us
- if (DotProduct(collidingVeh->GetRight(), GetForward()) < 0.0f
- && DotProduct(vehDist, collidingVeh->m_vecMoveSpeed) > 0.0f) {
- SetEvasiveStep(collidingVeh, 1);
- }
- }
- } else {
- vehRightVecAndSpeedDotProd = DotProduct(-1.0f * collidingVeh->GetRight(), collidingVeh->m_vecMoveSpeed);
-
- if (collidingVehSpeedSqr > 1.0f / 100.0f && vehRightVecAndSpeedDotProd < 0.1f) {
- if (DotProduct(collidingVeh->GetRight(), GetForward()) > 0.0f
- && DotProduct(vehDist, collidingVeh->m_vecMoveSpeed) > 0.0f) {
- SetEvasiveStep(collidingVeh, 1);
- }
- }
- }
- } else {
- vehRightVecAndSpeedDotProd = DotProduct(vehDist, collidingVeh->m_vecMoveSpeed);
- }
-
- if (vehRightVecAndSpeedDotProd <= 0.1f) {
- if (m_nPedState != PED_FIGHT) {
- SetLookFlag(collidingVeh, true);
- SetLookTimer(700);
- }
- } else {
- bIsStanding = false;
- CVector2D collidingEntMoveDir = -collidingVeh->m_vecMoveSpeed;
- int dir = GetLocalDirection(collidingEntMoveDir);
- SetFall(1000, (AnimationId)(dir + ANIM_KO_SKID_FRONT), false);
- CPed *driver = collidingVeh->pDriver;
-
- float damage;
- if (driver && driver->IsPlayer()) {
- damage = vehRightVecAndSpeedDotProd * 1000.0f;
- } else if (collidingVeh->GetModelIndex() == MI_TRAIN) {
- damage = 50.0f;
- } else {
- damage = 20.0f;
- }
-
- InflictDamage(collidingVeh, WEAPONTYPE_RAMMEDBYCAR, damage, PEDPIECE_TORSO, dir);
- Say(SOUND_PED_DAMAGE);
- }
- } else {
- KillPedWithCar(collidingVeh, m_fDamageImpulse);
- }
- }
-#endif
break;
}
case ENTITY_TYPE_PED:
@@ -11062,11 +11363,12 @@ CPed::ProcessControl(void)
player->AnnoyPlayerPed(false);
player->SetLookFlag(this, true);
player->SetLookTimer(1300);
- eWeaponType weapon = player->GetWeapon()->m_eWeaponType;
- if (weapon == WEAPONTYPE_UNARMED
- || weapon == WEAPONTYPE_BASEBALLBAT
- || weapon == WEAPONTYPE_COLT45
- || weapon == WEAPONTYPE_UZI) {
+ eWeaponType weaponType = player->GetWeapon()->m_eWeaponType;
+ uint32 weaponSlot = CWeaponInfo::GetWeaponInfo(weaponType)->m_nWeaponSlot;
+ if (weaponType == WEAPONTYPE_UNARMED
+ || weaponSlot == 3
+ || weaponSlot == 5
+ || weaponSlot == 1) {
player->bShakeFist = true;
}
}
@@ -11081,12 +11383,7 @@ CPed::ProcessControl(void)
}
}
CVector forceDir;
- if (!bIsInTheAir && m_nPedState != PED_JUMP
-#ifdef VC_PED_PORTS
- && m_fDamageImpulse > 0.0f
-#endif
- ) {
-
+ if (!bIsInTheAir && m_nPedState != PED_JUMP && m_fDamageImpulse > 0.0f) {
forceDir = m_vecDamageNormal;
forceDir.z = 0.0f;
if (!bIsStanding) {
@@ -11102,7 +11399,7 @@ CPed::ProcessControl(void)
|| (!bIsStanding && !bWasStanding && m_nPedState == PED_FALL)
#endif
) {
- if (m_nPedStateTimer <= 1000 && m_nPedStateTimer) {
+ if (m_nPedStateTimer > 0 && m_nPedStateTimer <= 1000) {
forceDir = GetPosition() - m_vecHitLastPos;
} else {
m_nPedStateTimer = 0;
@@ -11298,15 +11595,15 @@ CPed::ProcessControl(void)
} else if (m_nPedState == PED_DRIVING) {
bWanderPathAfterExitingCar = true;
SetObjective(OBJECTIVE_LEAVE_CAR, m_pMyVehicle);
+ bStartWanderPathOnFoot = false;
}
}
- if (!bIsStanding && m_vecMoveSpeed.z > 0.25f) {
+ if (!bIsStanding && m_vecMoveSpeed.z > 0.25) {
float airResistance = Pow(0.95f, CTimer::GetTimeStep());
m_vecMoveSpeed *= airResistance;
}
-#ifdef VC_PED_PORTS
if (IsPlayer() || !bIsStanding || m_vecMoveSpeed.x != 0.0f || m_vecMoveSpeed.y != 0.0f || m_vecMoveSpeed.z != 0.0f
|| (m_nMoveState != PEDMOVE_NONE && m_nMoveState != PEDMOVE_STILL)
|| m_vecAnimMoveDelta.x != 0.0f || m_vecAnimMoveDelta.y != 0.0f
@@ -11328,9 +11625,7 @@ CPed::ProcessControl(void)
m_vecTurnFriction = CVector(0.0f, 0.0f, 0.0f);
m_vecMoveFriction = CVector(0.0f, 0.0f, 0.0f);
}
-#else
- CPhysical::ProcessControl();
-#endif
+
if (m_nPedState != PED_DIE || bIsPedDieAnimPlaying) {
RequestDelayedWeapon();
PlayFootSteps();
@@ -11347,14 +11642,12 @@ CPed::ProcessControl(void)
bHeadStuckInCollision = false;
}
}
-#ifdef VC_PED_PORTS
if (bHeadStuckInCollision) {
CVector posToCheck = GetPosition();
posToCheck.z += 0.9f;
if (!CWorld::TestSphereAgainstWorld(posToCheck, 0.2f, this, true, true, false, true, false, false))
bHeadStuckInCollision = false;
}
-#endif
ProcessObjective();
if (!bIsAimingGun) {
if (bIsRestoringGun)
@@ -11392,8 +11685,11 @@ CPed::ProcessControl(void)
Look();
break;
case PED_WANDER_RANGE:
+ // III has these in here(and they were unused):
+ /*
WanderRange();
CheckAroundForPossibleCollisions();
+ */
break;
case PED_WANDER_PATH:
WanderPath();
@@ -11412,8 +11708,13 @@ CPed::ProcessControl(void)
case PED_CPR:
case PED_SOLICIT:
case PED_STEP_AWAY:
+ case PED_SUN_BATHE:
+ case PED_FLASH:
+ case PED_JOG:
case PED_UNKNOWN:
case PED_STATES_NO_AI:
+ case PED_ABSEIL:
+ case PED_SIT:
case PED_JUMP:
case PED_STAGGER:
case PED_DIVE_AWAY:
@@ -11424,8 +11725,8 @@ CPed::ProcessControl(void)
case PED_OPEN_DOOR:
case PED_DEAD:
case PED_DRAG_FROM_CAR:
- case PED_EXIT_CAR:
case PED_STEAL_CAR:
+ case PED_EXIT_CAR:
break;
case PED_ENTER_CAR:
case PED_CARJACK:
@@ -11441,19 +11742,34 @@ CPed::ProcessControl(void)
int vehAnim = m_pVehicleAnim->animId;
+ static bool cancelJack = false;
int16 padWalkX = pad->GetPedWalkLeftRight();
int16 padWalkY = pad->GetPedWalkUpDown();
if (Abs(padWalkX) > 0.0f || Abs(padWalkY) > 0.0f) {
if (vehAnim == ANIM_CAR_OPEN_LHS || vehAnim == ANIM_CAR_OPEN_RHS || vehAnim == ANIM_COACH_OPEN_L || vehAnim == ANIM_COACH_OPEN_R ||
vehAnim == ANIM_VAN_OPEN_L || vehAnim == ANIM_VAN_OPEN) {
+
+ if (!m_pMyVehicle->pDriver) {
+ cancelJack = false;
+ bCancelEnteringCar = true;
+ } else
+ cancelJack = true;
+ } else if (vehAnim == ANIM_CAR_QJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f) {
+ cancelJack = true;
+ } else if (vehAnim == ANIM_CAR_PULLOUT_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_RHS || vehAnim == ANIM_CAR_PULLOUT_RHS) {
bCancelEnteringCar = true;
- } else if (vehAnim == ANIM_CAR_QJACK) {
- if (m_pVehicleAnim->GetTimeLeft() > 0.69f && m_pVehicleAnim->GetTimeLeft() < 0.72f) {
- QuitEnteringCar();
- RestorePreviousObjective();
- }
+ cancelJack = false;
}
}
+ if (cancelJack && vehAnim == ANIM_CAR_QJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f && m_pVehicleAnim->GetTimeLeft() < 0.78f) {
+ cancelJack = false;
+ QuitEnteringCar();
+ RestorePreviousObjective();
+ }
+ if (cancelJack && (vehAnim == ANIM_CAR_PULLOUT_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_RHS || vehAnim == ANIM_CAR_PULLOUT_RHS)) {
+ cancelJack = false;
+ bCancelEnteringCar = true;
+ }
#endif
break;
}
@@ -11464,6 +11780,7 @@ CPed::ProcessControl(void)
break;
case PED_FLEE_ENTITY:
if (!m_fleeFrom) {
+ bMakeFleeScream = false;
SetIdle();
break;
}
@@ -11512,13 +11829,19 @@ CPed::ProcessControl(void)
break;
if (CTimer::GetTimeInMilliseconds() <= m_fleeTimer) {
- if (m_fleeFrom) {
- ms_vec2DFleePosition = m_fleeFrom->GetPosition();
+ if (m_pFire) {
+ if (m_fleeFrom) {
+ ms_vec2DFleePosition = m_fleeFrom->GetPosition();
+ } else {
+ ms_vec2DFleePosition.x = m_fleeFromPosX;
+ ms_vec2DFleePosition.y = m_fleeFromPosY;
+ }
+ Flee();
} else {
- ms_vec2DFleePosition.x = m_fleeFromPosX;
- ms_vec2DFleePosition.y = m_fleeFromPosY;
+ m_nLastPedState = PED_NONE;
+ SetWanderPath(0);
+ SetWaitState(WAITSTATE_FINISH_FLEE, 0);
}
- Flee();
} else {
if (m_pFire)
m_pFire->Extinguish();
@@ -11604,7 +11927,7 @@ CPed::ProcessControl(void)
Die();
break;
case PED_HANDS_UP:
- if (m_pedStats->m_temper <= 50) {
+ if (m_pedStats->m_flags & STAT_GUN_PANIC) {
if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSCOWER)) {
CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSCOWER);
Say(SOUND_PED_HANDS_COWER);
@@ -11614,7 +11937,8 @@ CPed::ProcessControl(void)
Say(SOUND_PED_HANDS_UP);
}
break;
- default: break;
+ default:
+ break;
}
SetMoveAnim();
if (bPedIsBleeding || m_bleedCounter != 0) {
@@ -11642,9 +11966,19 @@ CPed::ProcessControl(void)
ServiceTalking();
if (bInVehicle && !m_pMyVehicle)
bInVehicle = false;
-#ifndef VC_PED_PORTS
- m_pCurrentPhysSurface = nil;
-#endif
+
+ if (bHeldHostageInCar) {
+ if (m_pMyVehicle && m_pMyVehicle->pDriver && m_pMyVehicle->pDriver->IsPlayer()) {
+ Say(SOUND_PED_FLEE_SPRINT);
+ }
+ }
+
+ if (m_delayedSoundID >= 0 && CTimer::GetTimeInMilliseconds() > m_delayedSoundTimer) {
+ Say(m_delayedSoundID);
+ m_delayedSoundID = -1;
+ m_delayedSoundTimer = 0;
+ }
+
if (bFannyMagnetCheat && m_nPedType == PEDTYPE_CIVFEMALE
&& m_pedStats->m_sexiness > 40 && !m_leader) {
SetLeader(FindPlayerPed());
@@ -12230,6 +12564,15 @@ CPed::PedAnimPullPedOutCB(CAnimBlendAssociation* animAssoc, void* arg)
if (!ped->IsNotInWreckedVehicle())
return;
+#ifdef CANCELLABLE_CAR_ENTER
+ if (ped->bCancelEnteringCar) {
+ ped->QuitEnteringCar();
+ ped->RestorePreviousObjective();
+ ped->bCancelEnteringCar = false;
+ return;
+ }
+#endif
+
bool isLow = !!veh->bLowVehicle;
int padNo;
@@ -12290,27 +12633,34 @@ CPed::PedAnimPullPedOutCB(CAnimBlendAssociation* animAssoc, void* arg)
}
}
+// --MIAMI: Done
void
CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg)
{
CPed* ped = (CPed*)arg;
CVehicle* veh = ped->m_pMyVehicle;
- if (animAssoc)
+ if (animAssoc) {
+ if ((animAssoc->animId == ANIM_CAR_ROLLOUT_LHS || animAssoc->animId == ANIM_CAR_ROLLOUT_RHS) && ped && ped->m_nPedState == PED_FALL) {
+ ped->RestoreHeadingRate();
+ return;
+ }
animAssoc->blendDelta = -1000.0f;
+ if (animAssoc->animId == ANIM_BIKE_GETOFF_BACK)
+ ped->RestoreHeadingRate();
+ }
if (!veh) {
PedSetOutCarCB(nil, ped);
return;
}
-#ifdef VC_PED_PORTS
CVector posForZ = ped->GetPosition();
CPedPlacement::FindZCoorForPed(&posForZ);
if (ped->GetPosition().z - 0.5f > posForZ.z) {
PedSetOutCarCB(nil, ped);
return;
}
-#endif
+
veh->m_nStaticFrames = 0;
veh->m_vecMoveSpeed += CVector(0.001f, 0.001f, 0.001f);
veh->m_vecTurnSpeed += CVector(0.001f, 0.001f, 0.001f);
@@ -12383,10 +12733,8 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg)
}
}
-#ifdef VC_PED_PORTS
if (ped->m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE)
closeDoor = false;
-#endif
if (!closeDoor) {
if (!veh->IsDoorMissing(door) && !veh->bIsBus) {
@@ -12707,7 +13055,7 @@ CPed::PedSetInCarCB(CAnimBlendAssociation *animAssoc, void *arg)
if (ped->m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER) {
for (int i = 0; i < veh->m_nNumMaxPassengers; ++i) {
CPed *passenger = veh->pPassengers[i];
- if (passenger && !passenger->bStayInCarOnJack && !passenger->b156_8 && (passenger->m_leader != ped || !ped->bIsLeader)) {
+ if (passenger && !passenger->bStayInCarOnJack && !passenger->bHeldHostageInCar && (passenger->m_leader != ped || !ped->bIsLeader)) {
passenger->SetObjective(OBJECTIVE_LEAVE_CAR, veh);
passenger->m_leaveCarTimer = CTimer::GetTimeInMilliseconds();
}
@@ -13068,14 +13416,17 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg)
}
ped->bInVehicle = false;
- if (veh && veh->IsCar() && !veh->IsRoomForPedToLeaveCar(ped->m_vehEnterType, nil)) {
+ if (veh && (veh->IsCar() || veh->IsBike()) && !veh->IsRoomForPedToLeaveCar(ped->m_vehEnterType, nil)) {
ped->PositionPedOutOfCollision();
}
if (ped->m_nPedState == PED_EXIT_CAR) {
- if (ped->m_nPedType == PEDTYPE_COP)
+ if (ped->m_nPedType == PEDTYPE_COP) {
ped->SetIdle();
- else
+ if (((CCopPed*)ped)->m_nCopType == COP_MIAMIVICE && ped->m_pMyVehicle && ped->m_pMyVehicle->pDriver == ped) {
+ DMAudio.PlayOneShot(ped->m_audioEntityId, SOUND_PED_MIAMIVICE_EXITING_CAR, 0.f);
+ }
+ } else
ped->RestorePreviousState();
veh = ped->m_pMyVehicle;
@@ -13135,10 +13486,7 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg)
ped->RestartNonPartialAnims();
ped->m_pVehicleAnim = nil;
- CVector posFromZ = ped->GetPosition();
- CPedPlacement::FindZCoorForPed(&posFromZ);
ped->m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
- ped->SetPosition(posFromZ);
veh = ped->m_pMyVehicle;
if (veh) {
if (ped->m_nPedType == PEDTYPE_PROSTITUTE) {
@@ -13153,7 +13501,7 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg)
}
}
}
- if (veh->IsBike())
+ if (veh && veh->IsBike())
veh->m_nGettingOutFlags &= ~GetBikeDoorFlag(ped->m_vehEnterType);
else
veh->m_nGettingOutFlags &= ~GetCarDoorFlag(ped->m_vehEnterType);
@@ -13208,6 +13556,7 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg)
if (createdBy == MISSION_CHAR && !startedToRun)
ped->SetMoveState(PEDMOVE_WALK);
}
+ ped->bHeldHostageInCar = false;
}
// --MIAMI: Done, but enumarate weapon slots
@@ -13887,356 +14236,29 @@ CPed::ProcessObjective(void)
}
case OBJECTIVE_KILL_CHAR_ON_FOOT:
{
- bool killPlayerInNoPoliceZone = false;
if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT && InVehicle()) {
SetObjective(OBJECTIVE_LEAVE_CAR, m_pMyVehicle);
break;
}
if (!m_pedInObjective || m_pedInObjective->DyingOrDead()) {
- ClearLookFlag();
bObjectiveCompleted = true;
+ ClearLookFlag();
SetMoveAnim();
break;
}
- if (m_pedInObjective->IsPlayer() && CCullZones::NoPolice())
- killPlayerInNoPoliceZone = true;
-
- if (!bNotAllowedToDuck || killPlayerInNoPoliceZone) {
- if (m_nPedType == PEDTYPE_COP && !m_pedInObjective->GetWeapon()->IsTypeMelee() && !GetWeapon()->IsTypeMelee())
- bNotAllowedToDuck = true;
- } else {
- if (!m_pedInObjective->bInVehicle) {
- if (m_pedInObjective->GetWeapon()->IsTypeMelee() || GetWeapon()->IsTypeMelee()) {
- bNotAllowedToDuck = false;
- bCrouchWhenShooting = false;
- } else if (DuckAndCover()) {
- break;
- }
- } else {
- bNotAllowedToDuck = false;
- bCrouchWhenShooting = false;
- }
- }
- if (m_leaveCarTimer > CTimer::GetTimeInMilliseconds() && !bKindaStayInSamePlace) {
- SetMoveState(PEDMOVE_STILL);
- break;
- }
- if (m_pedInObjective->IsPlayer()) {
- CPlayerPed *player = FindPlayerPed();
- if (m_nPedType == PEDTYPE_COP && player->m_pWanted->m_bIgnoredByCops
- || player->m_pWanted->m_bIgnoredByEveryone
- || m_pedInObjective->bIsInWater
- || m_pedInObjective->m_nPedState == PED_ARRESTED) {
-
- if (m_nPedState != PED_ARREST_PLAYER)
- SetIdle();
-
- break;
- }
- }
- CWeaponInfo *wepInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
- float wepRange = wepInfo->m_fRange;
- float wepRangeAdjusted;
- if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED) {
- wepRangeAdjusted = wepRange / 3.0f;
- } else {
- if (m_nPedState == PED_FIGHT) {
- if (!IsPlayer() && !(m_pedStats->m_flags & STAT_CAN_KICK))
- wepRange = 2.0f;
- } else {
- wepRange = 1.3f;
- }
- wepRangeAdjusted = wepRange;
- }
- if (m_pedInObjective->m_getUpTimer > CTimer::GetTimeInMilliseconds() && wepRangeAdjusted < 2.5f) {
- wepRangeAdjusted = 2.5f;
- }
- if (m_pedInObjective->IsPlayer() && m_nPedType != PEDTYPE_COP
- && CharCreatedBy != MISSION_CHAR && FindPlayerPed()->m_pWanted->m_CurrentCops) {
- SetObjective(OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE);
- break;
- }
- if (m_pedInObjective->m_fHealth <= 0.0f) {
- bObjectiveCompleted = true;
- bScriptObjectiveCompleted = true;
- SetMoveAnim();
- break;
- }
- float distWithTargetSc = distWithTarget.Magnitude();
- if (m_pedInObjective->bInVehicle && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
- CVehicle *vehOfTarget = m_pedInObjective->m_pMyVehicle;
- if (vehOfTarget->bIsInWater || vehOfTarget->GetStatus() == STATUS_PLAYER_DISABLED
- || m_pedInObjective->IsPlayer() && CPad::GetPad(0)->ArePlayerControlsDisabled()) {
- SetIdle();
- return;
- }
- SetLookFlag(vehOfTarget, false);
- if (m_nPedState != PED_CARJACK) {
- if (m_pedInObjective->m_nPedState != PED_ARRESTED) {
- if (m_attackTimer < CTimer::GetTimeInMilliseconds() && wepInfo->m_eWeaponFire != WEAPON_FIRE_MELEE
- && distWithTargetSc < wepRange && distWithTargetSc > 3.0f) {
-
- // I hope so
- CVector ourHead = GetMatrix() * CVector(0.5f, 0.0f, 0.6f);
- CVector maxShotPos = vehOfTarget->GetPosition() - ourHead;
- maxShotPos.Normalise();
- maxShotPos = maxShotPos * wepInfo->m_fRange + ourHead;
-
- CWorld::bIncludeDeadPeds = true;
- CColPoint foundCol;
- CEntity *foundEnt;
- CWorld::ProcessLineOfSight(ourHead, maxShotPos, foundCol, foundEnt,
- true, true, true, true, false, true, false);
- CWorld::bIncludeDeadPeds = false;
- if (foundEnt == vehOfTarget) {
- SetAttack(vehOfTarget);
- m_pPointGunAt = vehOfTarget;
- if (vehOfTarget)
- vehOfTarget->RegisterReference((CEntity **) &m_pPointGunAt);
-
- SetShootTimer(CGeneral::GetRandomNumberInRange(500, 2000));
- if (distWithTargetSc <= m_distanceToCountSeekDone) {
- SetAttackTimer(CGeneral::GetRandomNumberInRange(200, 500));
- SetMoveState(PEDMOVE_STILL);
- } else {
- SetAttackTimer(CGeneral::GetRandomNumberInRange(2000, 5000));
- }
- }
- }
- else if (m_nPedState != PED_ATTACK && !bKindaStayInSamePlace && !killPlayerInNoPoliceZone) {
- if (vehOfTarget) {
- if (m_nPedType == PEDTYPE_COP || vehOfTarget->bIsBus) {
- GoToNearestDoor(vehOfTarget);
- } else {
- m_vehEnterType = 0;
- if (m_pedInObjective == vehOfTarget->pDriver || vehOfTarget->bIsBus) {
- m_vehEnterType = CAR_DOOR_LF;
- } else if (m_pedInObjective == vehOfTarget->pPassengers[0]) {
- m_vehEnterType = CAR_DOOR_RF;
- } else if (m_pedInObjective == vehOfTarget->pPassengers[1]) {
- m_vehEnterType = CAR_DOOR_LR;
- } else if (m_pedInObjective == vehOfTarget->pPassengers[2]) {
- m_vehEnterType = CAR_DOOR_RR;
- }
- // Unused
- // GetPositionToOpenCarDoor(vehOfTarget, m_vehEnterType);
- SetSeekCar(vehOfTarget, m_vehEnterType);
- SetMoveState(PEDMOVE_RUN);
- }
- }
- }
- }
- }
- SetMoveAnim();
- break;
- }
- if (m_nMoveState == PEDMOVE_STILL && IsPedInControl()) {
- SetLookFlag(m_pedInObjective, false);
- TurnBody();
- }
- if (m_nPedType == PEDTYPE_COP && distWithTargetSc < 1.5f && m_pedInObjective->IsPlayer()) {
- if (m_pedInObjective->m_getUpTimer > CTimer::GetTimeInMilliseconds()
- || m_pedInObjective->m_nPedState == PED_DRAG_FROM_CAR) {
+ if (m_pedInObjective) {
+ int status;
+ if (GetWeapon()->IsTypeMelee())
+ status = KillCharOnFootMelee(carOrOurPos, targetCarOrHisPos, distWithTarget);
+ else
+ status = KillCharOnFootArmed(carOrOurPos, targetCarOrHisPos, distWithTarget);
- ((CCopPed*)this)->SetArrestPlayer(m_pedInObjective);
+ if (status == WATCH_UNTIL_HE_DISAPPEARS)
return;
- }
- }
- if (!bKindaStayInSamePlace && !bStopAndShoot && m_nPedState != PED_ATTACK && !killPlayerInNoPoliceZone) {
- if (distWithTargetSc > wepRange
- || m_pedInObjective->m_getUpTimer > CTimer::GetTimeInMilliseconds()
- || m_pedInObjective->m_nPedState == PED_ARRESTED
- || m_pedInObjective->EnteringCar() && distWithTargetSc < 3.0f
- || distWithTargetSc > m_distanceToCountSeekDone && !CanSeeEntity(m_pedInObjective)) {
-
- if (m_pedInObjective->EnteringCar())
- wepRangeAdjusted = 2.0f;
-
- if (bUsePedNodeSeek) {
- CVector bestCoords(0.0f, 0.0f, 0.0f);
- m_vecSeekPos = m_pedInObjective->GetPosition();
-
- if (!m_pNextPathNode)
- FindBestCoordsFromNodes(m_vecSeekPos, &bestCoords);
-
- if (m_pNextPathNode)
- m_vecSeekPos = m_pNextPathNode->GetPosition();
-
- SetSeek(m_vecSeekPos, m_distanceToCountSeekDone);
- } else {
- SetSeek(m_pedInObjective, wepRangeAdjusted);
- }
- bCrouchWhenShooting = false;
- if (m_pedInObjective->m_pCurrentPhysSurface && distWithTargetSc < 5.0f) {
- if (wepRange <= 5.0f) {
- if (m_pedInObjective->IsPlayer()
- && FindPlayerPed()->m_bSpeedTimerFlag
- && (IsGangMember() || m_nPedType == PEDTYPE_COP)
- && GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED) {
- GiveWeapon(WEAPONTYPE_COLT45, 1000);
- SetCurrentWeapon(WEAPONTYPE_COLT45);
- }
- } else {
- bStopAndShoot = true;
- }
- SetMoveState(PEDMOVE_STILL);
- SetMoveAnim();
- break;
- }
- bStopAndShoot = false;
- SetMoveAnim();
+ if (status == CANT_ATTACK)
break;
- }
}
- if (m_attackTimer < CTimer::GetTimeInMilliseconds()
- && distWithTargetSc < wepRange && m_pedInObjective->m_nPedState != PED_GETUP && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
- if (bIsDucking) {
- CAnimBlendAssociation *duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
- if (duckAnim) {
- duckAnim->blendDelta = -2.0f;
- break;
- }
- bIsDucking = false;
- } else if (wepRange <= 5.0f) {
- SetMoveState(PEDMOVE_STILL);
- SetAttack(m_pedInObjective);
- m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(
- m_pedInObjective->GetPosition().x, m_pedInObjective->GetPosition().y,
- GetPosition().x, GetPosition().y);
- SetShootTimer(CGeneral::GetRandomNumberInRange(0.0f, 500.0f));
- SetAttackTimer(CGeneral::GetRandomNumberInRange(0.0f, 1500.0f));
- bObstacleShowedUpDuringKillObjective = false;
-
- } else {
- CVector target;
- CVector ourHead = GetMatrix() * CVector(0.5f, 0.0f, 0.6f);
- if (m_pedInObjective->IsPed())
- m_pedInObjective->m_pedIK.GetComponentPosition(*(RwV3d *)&target, PED_MID);
- else
- target = m_pedInObjective->GetPosition();
-
- target -= ourHead;
- target.Normalise();
- target = target * wepInfo->m_fRange + ourHead;
-
- CWorld::bIncludeDeadPeds = true;
- CEntity *foundEnt = nil;
- CColPoint foundCol;
-
- CWorld::ProcessLineOfSight(
- ourHead, target, foundCol, foundEnt,
- true, true, true, false, true, false);
- CWorld::bIncludeDeadPeds = 0;
- if (foundEnt == m_pedInObjective) {
- SetAttack(m_pedInObjective);
- m_pPointGunAt = m_pedInObjective;
- if (m_pedInObjective)
- m_pedInObjective->RegisterReference((CEntity **) &m_pPointGunAt);
-
- SetShootTimer(CGeneral::GetRandomNumberInRange(500.0f, 2000.0f));
-
- int time;
- if (distWithTargetSc <= wepRangeAdjusted)
- time = CGeneral::GetRandomNumberInRange(100.0f, 500.0f);
- else
- time = CGeneral::GetRandomNumberInRange(1500.0f, 3000.0f);
-
- SetAttackTimer(time);
- bObstacleShowedUpDuringKillObjective = false;
-
- } else if (foundEnt) {
- if (foundEnt->IsPed()) {
- SetAttackTimer(CGeneral::GetRandomNumberInRange(500.0f, 1000.0f));
- bObstacleShowedUpDuringKillObjective = false;
- } else {
- if (foundEnt->IsObject()) {
- SetAttackTimer(CGeneral::GetRandomNumberInRange(200.0f, 400.0f));
- bObstacleShowedUpDuringKillObjective = true;
- } else if (foundEnt->IsVehicle()) {
- SetAttackTimer(CGeneral::GetRandomNumberInRange(400.0f, 600.0f));
- bObstacleShowedUpDuringKillObjective = true;
- } else {
- SetAttackTimer(CGeneral::GetRandomNumberInRange(700.0f, 1200.0f));
- bObstacleShowedUpDuringKillObjective = true;
- }
- }
-
- m_fleeFrom = foundEnt;
- m_fleeFrom->RegisterReference((CEntity**) &m_fleeFrom);
- SetPointGunAt(m_pedInObjective);
- }
- }
- } else {
- if (!m_pedInObjective->m_pCurrentPhysSurface)
- bStopAndShoot = false;
-
- if (m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT) {
-
- // This is weird...
- if (bNotAllowedToDuck && bKindaStayInSamePlace) {
- if (!bIsDucking) {
- CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
- if (!duckAnim || duckAnim->blendDelta < 0.0f) {
- CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DUCK_DOWN, 4.0f);
- bIsDucking = true;
- }
- break;
- } else {
- CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
- if (!duckAnim || duckAnim->blendDelta < 0.0f) {
- bIsDucking = false;
- } else {
- break;
- }
- }
- }
- if (bObstacleShowedUpDuringKillObjective) {
- if (m_nPedType == PEDTYPE_COP) {
- if (GetWeapon()->m_eWeaponType > WEAPONTYPE_COLT45
- || m_fleeFrom && m_fleeFrom->IsObject()) {
- wepRangeAdjusted = 6.0f;
- } else if (m_fleeFrom && m_fleeFrom->IsVehicle()) {
- wepRangeAdjusted = 4.0f;
- } else {
- wepRangeAdjusted = 2.0f;
- }
- } else {
- wepRangeAdjusted = 2.0f;
- }
- }
- if (distWithTargetSc <= wepRangeAdjusted) {
- SetMoveState(PEDMOVE_STILL);
- bIsPointingGunAt = true;
- if (m_nPedState != PED_AIM_GUN && !bDuckAndCover) {
- m_attackTimer = CTimer::GetTimeInMilliseconds();
- SetIdle();
- }
- } else {
- if (m_nPedState != PED_SEEK_ENTITY && m_nPedState != PED_SEEK_POS
- && !bStopAndShoot && !killPlayerInNoPoliceZone && !bKindaStayInSamePlace) {
- Say(SOUND_PED_ATTACK);
- SetSeek(m_pedInObjective, wepRangeAdjusted);
- bIsRunning = true;
- }
- }
- }
- }
-
- if (distWithTargetSc < 2.5f && wepRange > 5.0f
- && wepInfo->m_eWeaponFire != WEAPON_FIRE_MELEE) {
-
- SetAttack(m_pedInObjective);
- if (m_attackTimer < CTimer::GetTimeInMilliseconds()) {
- int time = CGeneral::GetRandomNumberInRange(500.0f, 1000.0f);
- SetAttackTimer(time);
- SetShootTimer(time - 500);
- }
- SetMoveState(PEDMOVE_STILL);
- }
- if (CTimer::GetTimeInMilliseconds() > m_nPedStateTimer)
- m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(m_pedInObjective->GetPosition().x, m_pedInObjective->GetPosition().y, GetPosition().x, GetPosition().y);
-
SetMoveAnim();
break;
}
@@ -14265,6 +14287,8 @@ CPed::ProcessObjective(void)
float safeDistance = 2.0f;
if (m_pedInObjective->bInVehicle)
safeDistance = 3.0f;
+ if (m_objective == OBJECTIVE_HASSLE_CHAR)
+ safeDistance = 1.0f;
float distWithTargetSc = distWithTarget.Magnitude();
if (m_nPedStateTimer < CTimer::GetTimeInMilliseconds()) {
@@ -14272,6 +14296,8 @@ CPed::ProcessObjective(void)
bScriptObjectiveCompleted = true;
if (m_nPedState != PED_ATTACK) {
SetIdle();
+ if (m_pLookTarget)
+ m_pLookTarget->CleanUpOldReference(&m_pLookTarget);
m_pLookTarget = m_pedInObjective;
m_pLookTarget->RegisterReference((CEntity **) &m_pLookTarget);
TurnBody();
@@ -14280,6 +14306,18 @@ CPed::ProcessObjective(void)
SetMoveState(m_pedInObjective->m_nMoveState);
else
SetMoveState(PEDMOVE_STILL);
+
+ if (m_objective == OBJECTIVE_HASSLE_CHAR) {
+ Say(SOUND_PED_COP_REACTION);
+ m_pedInObjective->Say(SOUND_PED_UNK_126);
+ m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 3000;
+ m_pedInObjective->m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 3000;
+ SetObjective(OBJECTIVE_WANDER);
+ m_pedInObjective->SetObjective(OBJECTIVE_WANDER);
+ CVector2D dist = GetPosition() - m_pedInObjective->GetPosition();
+ m_nPathDir = CGeneral::GetNodeHeadingFromVector(dist.x, dist.y);
+ m_pedInObjective->m_nPathDir = CGeneral::GetNodeHeadingFromVector(-dist.x, -dist.y);
+ }
} else {
SetSeek(m_pedInObjective, safeDistance);
if (distWithTargetSc >= 5.0f) {
@@ -14879,10 +14917,9 @@ CPed::ProcessObjective(void)
// fall through
case OBJECTIVE_LEAVE_CAR:
if (CTimer::GetTimeInMilliseconds() > m_leaveCarTimer) {
- if (InVehicle()
- && (FindPlayerPed() != this || !CPad::GetPad(0)->GetAccelerate()
- || bBusJacked)
- ) {
+ if (InVehicle() &&
+ (FindPlayerPed() != this || !CPad::GetPad(0)->GetAccelerate() || bBusJacked)) {
+
if (m_nPedState != PED_EXIT_CAR && m_nPedState != PED_DRAG_FROM_CAR && m_nPedState != PED_EXIT_TRAIN
&& (m_nPedType != PEDTYPE_COP
|| m_pMyVehicle->IsBoat()
@@ -14894,7 +14931,6 @@ CPed::ProcessObjective(void)
#endif
if (m_pMyVehicle->IsBoat())
SetExitBoat(m_pMyVehicle);
-
else
SetExitCar(m_pMyVehicle, 0);
}
@@ -14902,6 +14938,15 @@ CPed::ProcessObjective(void)
RestorePreviousObjective();
}
}
+ if (bHeldHostageInCar) {
+ if (CTheScripts::IsPlayerOnAMission()) {
+ CVehicle *playerVeh = FindPlayerVehicle();
+ if (playerVeh && playerVeh->IsPassenger(this)) {
+ if (m_leaveCarTimer != 0)
+ m_leaveCarTimer = 0;
+ }
+ }
+ }
break;
case OBJECTIVE_AIM_GUN_AT:
if (m_pedInObjective) {
@@ -15120,15 +15165,52 @@ CPed::ProcessObjective(void)
else {
GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
SetObjective(OBJECTIVE_ENTER_CAR_AS_PASSENGER, pBus);
- bDontDragMeOutCar = true; // TODO(MIAMI): check, add more flags
+ bDontDragMeOutCar = true;
+ b157_40 = true;
+ CPlayerPed *player = FindPlayerPed();
+ if (pBus->IsPassenger(player) || pBus->IsDriver(player)) {
+ b158_10 = true;
+ }
}
}
}
break;
+ case OBJECTIVE_WAIT_ON_FOOT_AT_ICE_CREAM_VAN:
+ {
+ SetIdle();
+ CVehicle* pIceCreamVan = GetPedAttractorManager()->GetIceCreamVanForEffect(m_attractor->GetEffect());
+ if (m_attractor && m_nWaitState != WAITSTATE_PLAYANIM_CHAT && pIceCreamVan && pIceCreamVan->pDriver && pIceCreamVan->pDriver->IsPlayer()) {
+ int time = 5000;
+ SetWaitState(WAITSTATE_PLAYANIM_CHAT, &time);
+ break;
+ }
+ if (!m_attractor)
+ break;
+ CVehicle* pVan = GetPedAttractorManager()->GetIceCreamVanForEffect(m_attractor->GetEffect());
+ if (!pVan)
+ break;
+ if (0.01f * CTimer::GetTimeStep() * 5.0f < pVan->m_fDistanceTravelled) {
+ GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
+ break;
+ }
+ if (!pVan->pDriver || !pVan->pDriver->IsPlayer() || pVan->pDriver->GetPedState() == PED_ARRESTED || pVan->pDriver->GetPedState() == PED_DEAD) {
+ GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
+ break;
+ }
+ if (!pVan->m_bSirenOrAlarm) {
+ GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
+ return; // ???
+ }
+ if (pVan->GetStatus() == STATUS_WRECKED) {
+ GetPedAttractorManager()->DeRegisterPed(this, m_attractor);
+ return; // ???
+ }
+ break;
+ }
#endif
}
if (bObjectiveCompleted
- || m_objectiveTimer != 0 && CTimer::GetTimeInMilliseconds() > m_objectiveTimer) {
+ || m_objectiveTimer > 0 && CTimer::GetTimeInMilliseconds() > m_objectiveTimer) {
RestorePreviousObjective();
if (m_objectiveTimer > CTimer::GetTimeInMilliseconds() || !m_objectiveTimer)
m_objectiveTimer = CTimer::GetTimeInMilliseconds() - 1;
@@ -16383,7 +16465,7 @@ CPed::PreRender(void)
CVector speed = FindPlayerSpeed();
if (Abs(speed.x) <= 0.05f && Abs(speed.y) <= 0.05f) {
- if (m_nPedState != PED_FALL && !DyingOrDead() && m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT) {
+ if (!OnGround() && m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT) {
if (!IsPedHeadAbovePos(0.3f) || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED)) {
doSplashUp = false;
}
@@ -17141,13 +17223,27 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode)
uint32 optedDoorNode = wantedDoorNode;
bool teleportNeeded = false;
bool isLow = !!veh->bLowVehicle;
-// TODO(MIAMI): argument
- if (!veh->CanPedExitCar(false)) {
- if (veh->pDriver && !veh->pDriver->IsPlayer()) {
- veh->AutoPilot.m_nCruiseSpeed = 0;
- veh->AutoPilot.m_nCarMission = MISSION_NONE;
+
+ bool canJumpOut = false;
+ if (!veh->CanPedExitCar(false) && !bBusJacked) {
+ if (IsPlayer()) {
+ // TODO(Miami): Do jumping out of car
+ canJumpOut = false;
+ }
+ if (!canJumpOut) {
+ if (veh->pDriver) {
+ if (veh->pDriver->IsPlayer()) {
+ if (veh->pDriver != this) {
+ m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 5000;
+ bHeldHostageInCar = true;
+ }
+ } else {
+ veh->AutoPilot.m_nCruiseSpeed = 0;
+ veh->AutoPilot.m_nCarMission = MISSION_NONE;
+ }
+ }
+ return;
}
- return;
}
if (m_nPedState == PED_EXIT_CAR || m_nPedState == PED_DRAG_FROM_CAR)
@@ -17312,9 +17408,9 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode)
SetPedState(PED_EXIT_CAR);
if (m_pVehicleAnim && m_pVehicleAnim->flags & ASSOC_PARTIAL)
m_pVehicleAnim->blendDelta = -1000.0f;
+ RemoveInCarAnims();
SetMoveState(PEDMOVE_NONE);
CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 100.0f);
- RemoveInCarAnims();
veh->AutoPilot.m_nCruiseSpeed = 0;
if (teleportNeeded) {
PedSetOutCarCB(nil, this);
@@ -17609,11 +17705,8 @@ CPed::ScanForThreats(void)
}
if (CPedType::GetFlag(shooter->m_nPedType) & fearFlags || m_nPedType == PEDTYPE_GANG5) {
-
- // TODO(Miami)
- // if (m_threatEntity)
- // m_threatEntity->CleanUpOldReference(&m_threatEntity);
-
+ if (m_threatEntity)
+ m_threatEntity->CleanUpOldReference(&m_threatEntity);
m_threatEntity = shooter;
m_threatEntity->RegisterReference((CEntity**)&m_threatEntity);
return CPedType::GetFlag(shooter->m_nPedType);
@@ -18051,7 +18144,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
Say(SOUND_PED_DEFEND);
switch (hitLevel) {
case HITLEVEL_GROUND:
- m_lastFightMove = FIGHTMOVE_HITONFLOOR;
+ m_curFightMove = FIGHTMOVE_HITONFLOOR;
break;
case HITLEVEL_LOW:
if (direction == 2 && (!IsPlayer() || ((CGeneral::GetRandomNumber() & 1) && m_fHealth < 30.0f))) {
@@ -18063,52 +18156,52 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
Say(SOUND_PED_DEFEND);
return;
}
- m_lastFightMove = FIGHTMOVE_HITBODY;
+ m_curFightMove = FIGHTMOVE_HITBODY;
break;
case HITLEVEL_HIGH:
switch (direction) {
case 1:
- m_lastFightMove = FIGHTMOVE_HITLEFT;
+ m_curFightMove = FIGHTMOVE_HITLEFT;
break;
case 2:
- m_lastFightMove = FIGHTMOVE_HITBACK;
+ m_curFightMove = FIGHTMOVE_HITBACK;
break;
case 3:
- m_lastFightMove = FIGHTMOVE_HITRIGHT;
+ m_curFightMove = FIGHTMOVE_HITRIGHT;
break;
default:
if (unk <= 5)
- m_lastFightMove = FIGHTMOVE_HITHEAD;
+ m_curFightMove = FIGHTMOVE_HITHEAD;
else
- m_lastFightMove = FIGHTMOVE_HITBIGSTEP;
+ m_curFightMove = FIGHTMOVE_HITBIGSTEP;
break;
}
break;
default:
switch (direction) {
case 1:
- m_lastFightMove = FIGHTMOVE_HITLEFT;
+ m_curFightMove = FIGHTMOVE_HITLEFT;
break;
case 2:
- m_lastFightMove = FIGHTMOVE_HITBACK;
+ m_curFightMove = FIGHTMOVE_HITBACK;
break;
case 3:
- m_lastFightMove = FIGHTMOVE_HITRIGHT;
+ m_curFightMove = FIGHTMOVE_HITRIGHT;
break;
default:
if (unk <= 5)
- m_lastFightMove = FIGHTMOVE_HITCHEST;
+ m_curFightMove = FIGHTMOVE_HITCHEST;
else
- m_lastFightMove = FIGHTMOVE_HITBIGSTEP;
+ m_curFightMove = FIGHTMOVE_HITBIGSTEP;
break;
}
break;
}
if (m_nPedState == PED_GETUP && !IsPedHeadAbovePos(0.0f))
- m_lastFightMove = FIGHTMOVE_HITONFLOOR;
+ m_curFightMove = FIGHTMOVE_HITONFLOOR;
if (m_nPedState == PED_FIGHT) {
- CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_lastFightMove].animId, 8.0f);
+ CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_curFightMove].animId, 8.0f);
moveAssoc->SetCurrentTime(0.0f);
moveAssoc->SetFinishCallback(FinishFightMoveCB, this);
if (IsPlayer())
@@ -18119,7 +18212,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
} else if (IsPlayer() && GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && GetWeapon()->m_eWeaponType != WEAPONTYPE_BRASSKNUCKLE &&
!CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_bFightMode) {
- CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_lastFightMove].animId, 4.0f);
+ CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_curFightMove].animId, 4.0f);
moveAssoc->SetCurrentTime(0.0f);
moveAssoc->speed = 1.2f;
@@ -18133,7 +18226,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
}
SetPedState(PED_FIGHT);
m_fightButtonPressure = 0;
- m_lastHitState = 2;
+ m_lastFightMove = FIGHTMOVE_IDLE;
RpAnimBlendClumpRemoveAssociations(GetClump(), ASSOC_REPEAT);
CAnimBlendAssociation *walkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK_START);
if (walkStartAssoc) {
@@ -18163,7 +18256,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
fightIdleAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE);
}
fightIdleAssoc->blendAmount = 1.0f;
- CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_lastFightMove].animId, 8.0f);
+ CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_curFightMove].animId, 8.0f);
moveAssoc->SetFinishCallback(FinishFightMoveCB, this);
m_fightState = FIGHTSTATE_NO_MOVE;
m_takeAStepAfterAttack = false;
@@ -18303,6 +18396,8 @@ CPed::UpdateFromLeader(void)
m_pLookTarget->RegisterReference((CEntity **) &m_pLookTarget);
TurnBody();
if (m_attackTimer < CTimer::GetTimeInMilliseconds() && !GetWeapon()->IsTypeMelee()) {
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
m_pPointGunAt = m_threatEntity;
if (m_threatEntity)
m_threatEntity->RegisterReference((CEntity **) &m_pPointGunAt);
@@ -18775,28 +18870,28 @@ CPed::SetObjective(eObjective newObj, CVector dest)
m_nextRoutePointPos = dest;
m_vecSeekPos = m_nextRoutePointPos;
m_distanceToCountSeekDone = 0.5f;
- if (m_objective == OBJECTIVE_GOTO_ATM_ON_FOOT) {
+ if (newObj == OBJECTIVE_GOTO_ATM_ON_FOOT) {
m_distanceToCountSeekDone = m_attractor->GetDistanceToCountSeekDone();
m_acceptableHeadingOffset = m_attractor->GetAcceptableHeading();
}
- if (m_objective == OBJECTIVE_GOTO_SEAT_ON_FOOT) {
+ if (newObj == OBJECTIVE_GOTO_SEAT_ON_FOOT) {
m_distanceToCountSeekDone = m_attractor->GetDistanceToCountSeekDone();
m_acceptableHeadingOffset = m_attractor->GetAcceptableHeading();
}
- if (m_objective == OBJECTIVE_GOTO_BUS_STOP_ON_FOOT) {
+ if (newObj == OBJECTIVE_GOTO_BUS_STOP_ON_FOOT) {
m_distanceToCountSeekDone = m_attractor->GetDistanceToCountSeekDone();
m_acceptableHeadingOffset = m_attractor->GetAcceptableHeading();
}
- if (m_objective == OBJECTIVE_GOTO_PIZZA_ON_FOOT) {
+ if (newObj == OBJECTIVE_GOTO_PIZZA_ON_FOOT) {
m_distanceToCountSeekDone = m_attractor->GetDistanceToCountSeekDone();
m_acceptableHeadingOffset = m_attractor->GetAcceptableHeading();
}
- if (m_objective == OBJECTIVE_GOTO_SHELTER_ON_FOOT) {
+ if (newObj == OBJECTIVE_GOTO_SHELTER_ON_FOOT) {
bIsRunning = true;
m_distanceToCountSeekDone = m_attractor->GetDistanceToCountSeekDone();
m_acceptableHeadingOffset = m_attractor->GetAcceptableHeading();
}
- if (m_objective == OBJECTIVE_GOTO_ICE_CREAM_VAN_ON_FOOT) {
+ if (newObj == OBJECTIVE_GOTO_ICE_CREAM_VAN_ON_FOOT) {
bIsRunning = true;
m_distanceToCountSeekDone = m_attractor->GetDistanceToCountSeekDone();
m_acceptableHeadingOffset = m_attractor->GetAcceptableHeading();
@@ -19204,7 +19299,7 @@ CPed::SetCarJack_AllClear(CVehicle* car, uint32 doorNode, uint32 doorFlag)
if (m_nPedType == PEDTYPE_COP)
Say(SOUND_PED_ARREST_COP);
else if (car->m_nDoorLock == CARLOCK_UNLOCKED)
- Say(SOUND_PED_CAR_JACKING);
+ Say(SOUND_PED_CAR_JACKING, 1000);
CVector carEnterPos;
carEnterPos = GetPositionToOpenCarDoor(car, m_vehEnterType);
@@ -20279,6 +20374,536 @@ CPed::PositionAttachedPed()
}
}
+// --MIAMI: Done
+int32
+CPed::KillCharOnFootMelee(CVector &ourPos, CVector &targetPos, CVector &distWithTarget)
+{
+ bool killPlayerInNoPoliceZone = false;
+ float distWithTargetSc = distWithTarget.Magnitude();
+ CPlayerPed *victimPlayer = nil;
+ if (m_pedInObjective->IsPlayer())
+ victimPlayer = (CPlayerPed*)m_pedInObjective;
+
+ if (victimPlayer) {
+ if (CCullZones::NoPolice()
+ || m_pedInObjective->m_pCurrentPhysSurface
+ && m_pedInObjective->m_pCurrentPhysSurface != m_pCurrentPhysSurface
+ && distWithTargetSc < 5.f) {
+
+ if (victimPlayer && victimPlayer->m_bSpeedTimerFlag && (IsGangMember() || m_nPedType == PEDTYPE_COP)
+ && CharCreatedBy != MISSION_CHAR) {
+ GiveWeapon(WEAPONTYPE_COLT45, 1000, 1);
+ SetCurrentWeapon(WEAPONTYPE_COLT45);
+ SetMoveState(PEDMOVE_STILL);
+ bStopAndShoot = true;
+ b158_8 = true;
+ return CANT_ATTACK;
+ }
+ killPlayerInNoPoliceZone = true;
+ }
+ }
+ bNotAllowedToDuck = false;
+ bStopAndShoot = false;
+ b158_8 = false;
+ if (m_leaveCarTimer > CTimer::GetTimeInMilliseconds() && !bKindaStayInSamePlace) {
+ SetMoveState(PEDMOVE_STILL);
+ return CANT_ATTACK;
+ }
+ if (victimPlayer) {
+ CPlayerPed *player = FindPlayerPed();
+ if (m_nPedType == PEDTYPE_COP && player->m_pWanted->m_bIgnoredByCops
+ || player->m_pWanted->m_bIgnoredByEveryone
+ || m_pedInObjective->bIsInWater
+ || m_pedInObjective->m_nPedState == PED_ARRESTED) {
+
+ if (m_nPedState != PED_ARREST_PLAYER)
+ SetIdle();
+
+ return CANT_ATTACK;
+ }
+ }
+ if (victimPlayer && m_nPedType != PEDTYPE_COP && CharCreatedBy != MISSION_CHAR
+ && FindPlayerPed()->m_pWanted->m_CurrentCops != 0) {
+ SetObjective(OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE);
+
+ return CANT_ATTACK;
+ }
+ if (m_pedInObjective->m_fHealth <= 0.0f) {
+ bObjectiveCompleted = true;
+ bScriptObjectiveCompleted = true;
+ return ATTACK_IN_PROGRESS;
+ }
+ bool canReachVictim = false;
+ uint32 endOfAttack = 0;
+ CWeaponInfo *wepInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
+
+ // Already calculated at the start
+ // float distWithTargetSc = distWithTarget.Magnitude();
+ float wepRange = 0.3f;
+ float wepRangeAdjusted = wepInfo->m_fRange / 2.f;
+
+ if (GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED && !IsPlayer() && !(m_pedStats->m_flags & STAT_CAN_KICK))
+ wepRangeAdjusted -= 0.3f;
+
+ if (distWithTargetSc <= 5.f && victimPlayer && !victimPlayer->m_bDrunkVisualsWearOff) {
+
+ if (m_pedInObjective->EnteringCar() && wepRangeAdjusted > 2.f) {
+ m_vecSeekPos = m_pedInObjective->GetPosition();
+ wepRangeAdjusted = 1.0f;
+ wepRange = 0.5f;
+ } else {
+ int8 attackDir = victimPlayer->FindMeleeAttackPoint(this, distWithTarget, endOfAttack);
+ if (attackDir == -1) {
+ m_vecSeekPos = victimPlayer->GetPosition();
+ wepRange = 4.0f;
+ } else {
+ victimPlayer->GetMeleeAttackCoords(m_vecSeekPos, attackDir, wepRangeAdjusted);
+ distWithTargetSc = (m_vecSeekPos - GetPosition()).Magnitude();
+ canReachVictim = true;
+ }
+ }
+ } else {
+ m_vecSeekPos = m_pedInObjective->GetPosition();
+ wepRange = Max(0.8f, 0.9f * wepRangeAdjusted);
+ wepRangeAdjusted = 1.1f * wepRangeAdjusted;
+ if (victimPlayer && victimPlayer->m_bDrunkVisualsWearOff)
+ victimPlayer = nil;
+ }
+
+ if (m_pedInObjective->bInVehicle && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
+ CVehicle *vehOfTarget = m_pedInObjective->m_pMyVehicle;
+
+ if (vehOfTarget){
+ if (vehOfTarget->bIsInWater || vehOfTarget->GetStatus() == STATUS_PLAYER_DISABLED
+ || m_pedInObjective->IsPlayer() && CPad::GetPad(0)->ArePlayerControlsDisabled()) {
+ SetIdle();
+ return WATCH_UNTIL_HE_DISAPPEARS;
+ }
+ SetLookFlag(vehOfTarget, false);
+
+ if (m_nPedState != PED_CARJACK) {
+ if (m_pedInObjective->m_nPedState != PED_ARRESTED) {
+ if (m_nPedState != PED_ATTACK && !bKindaStayInSamePlace && !killPlayerInNoPoliceZone) {
+
+ if (m_nPedType == PEDTYPE_COP || vehOfTarget->bIsBus) {
+ GoToNearestDoor(vehOfTarget);
+ } else {
+ m_vehEnterType = 0;
+ if (m_pedInObjective == vehOfTarget->pDriver || vehOfTarget->bIsBus) {
+ m_vehEnterType = CAR_DOOR_LF;
+ } else if (m_pedInObjective == vehOfTarget->pPassengers[0]) {
+ m_vehEnterType = CAR_DOOR_RF;
+ } else if (m_pedInObjective == vehOfTarget->pPassengers[1]) {
+ m_vehEnterType = CAR_DOOR_LR;
+ } else if (m_pedInObjective == vehOfTarget->pPassengers[2]) {
+ m_vehEnterType = CAR_DOOR_RR;
+ }
+ // Unused
+ // GetPositionToOpenCarDoor(vehOfTarget, m_vehEnterType);
+ SetSeekCar(vehOfTarget, m_vehEnterType);
+ SetMoveState(PEDMOVE_RUN);
+ }
+ }
+ }
+ }
+ }
+ return ATTACK_IN_PROGRESS;
+ }
+ if (m_nMoveState == PEDMOVE_STILL && IsPedInControl()) {
+ SetLookFlag(m_pedInObjective, false);
+ if(m_nPedState == PED_IDLE || m_nPedState == PED_ATTACK || m_nPedState == PED_FIGHT)
+ TurnBody();
+ }
+ if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
+ float maxArrestDist = 1.5f;
+ if (((CCopPed*)this)->field_601) {
+ if (m_nPedState == PED_FALL) {
+ maxArrestDist = 3.5f;
+ } else if (m_nPedState != PED_DRAG_FROM_CAR) {
+ ((CCopPed*)this)->field_601 = 0;
+ }
+ }
+
+ if (distWithTargetSc < maxArrestDist) {
+ if (m_pedInObjective->m_getUpTimer > CTimer::GetTimeInMilliseconds()
+ || m_pedInObjective->m_nPedState == PED_DRAG_FROM_CAR) {
+
+ ((CCopPed*)this)->SetArrestPlayer(m_pedInObjective);
+ return WATCH_UNTIL_HE_DISAPPEARS;
+ }
+ }
+ }
+
+ if (distWithTargetSc > wepRange && !bKindaStayInSamePlace && m_nPedState != PED_ATTACK &&
+ (m_nPedState != PED_FIGHT || m_curFightMove == FIGHTMOVE_IDLE) && !killPlayerInNoPoliceZone) {
+
+ bool goForward = false;
+
+ if (m_nPedState == PED_FIGHT) {
+ if (canReachVictim) {
+ CVector attackAndVictimDist = m_vecSeekPos - m_pedInObjective->GetPosition();
+ CVector victimFarness = attackAndVictimDist / wepRangeAdjusted;
+ CVector distVec = GetPosition() - m_pedInObjective->GetPosition();
+ float distSqr = distVec.MagnitudeSqr();
+ if (sq(wepRangeAdjusted) > distSqr && distSqr > 0.05f) {
+ distVec.Normalise();
+ if (DotProduct2D(victimFarness, distVec) > Cos(DEGTORAD(30.f)))
+ goForward = true;
+ }
+ }
+ }
+ if (goForward) {
+ m_curFightMove = FIGHTMOVE_SHUFFLE_F;
+ CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_SH_BACK, 16.f)->SetFinishCallback(FinishFightMoveCB,this);
+ m_fightState = FIGHTSTATE_NO_MOVE;
+ m_fightButtonPressure = 0;
+ m_takeAStepAfterAttack = false;
+
+ } else if (bUsePedNodeSeek && !canReachVictim) {
+ CVector bestCoords(0.0f, 0.0f, 0.0f);
+
+ if (!m_pNextPathNode)
+ FindBestCoordsFromNodes(m_vecSeekPos, &bestCoords);
+
+ if (m_pNextPathNode)
+ m_vecSeekPos = CPathFind::TakeWidthIntoAccountForWandering(m_pNextPathNode, m_randomSeed);
+
+ SetSeek(m_vecSeekPos, m_distanceToCountSeekDone);
+ } else {
+ if (canReachVictim)
+ SetSeek(m_vecSeekPos, wepRange);
+ else
+ SetSeek(m_pedInObjective, wepRange);
+ }
+ return ATTACK_IN_PROGRESS;
+ }
+
+ if (m_attackTimer < CTimer::GetTimeInMilliseconds()
+ && distWithTargetSc < wepRangeAdjusted && m_pedInObjective->m_nPedState != PED_GETUP && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
+
+ if (bIsDucking) {
+ CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
+ if (!duckAnim)
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW);
+ if (!duckAnim)
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH);
+
+ if (duckAnim) {
+ duckAnim->flags |= ASSOC_DELETEFADEDOUT;
+ duckAnim->blendDelta = -4.0f;
+ }
+ bIsDucking = false;
+ return CANT_ATTACK;
+ }
+
+ if (canReachVictim || !victimPlayer) {
+ SetMoveState(PEDMOVE_STILL);
+ SetAttack(m_pedInObjective);
+ m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(
+ m_pedInObjective->GetPosition().x, m_pedInObjective->GetPosition().y,
+ GetPosition().x, GetPosition().y);
+ SetShootTimer(CGeneral::GetRandomNumberInRange(0.f, 500.f));
+
+ int time;
+ if (endOfAttack <= CTimer::GetTimeInMilliseconds())
+ time = CGeneral::GetRandomNumberInRange(100.0f, 1500.0f);
+ else
+ time = endOfAttack - CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(400.0f, 1500.0f);
+
+ SetAttackTimer(time);
+ bObstacleShowedUpDuringKillObjective = false;
+ }
+ return ATTACK_IN_PROGRESS;
+ } else {
+ if (!m_pedInObjective->m_pCurrentPhysSurface && m_pCurrentPhysSurface && b158_8) {
+ b158_8 = false;
+ bStopAndShoot = false;
+ }
+
+ if (m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT) {
+ SetMoveState(PEDMOVE_STILL);
+ if (GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED)
+ StartFightAttack(0);
+ }
+ return ATTACK_IN_PROGRESS;
+ }
+}
+
+// --MIAMI: Done
+int32
+CPed::KillCharOnFootArmed(CVector &ourPos, CVector &targetPos, CVector &distWithTarget)
+{
+ bool killPlayerInNoPoliceZone = false;
+ if (m_pedInObjective->IsPlayer() && CCullZones::NoPolice())
+ killPlayerInNoPoliceZone = true;
+
+ if (!bNotAllowedToDuck || killPlayerInNoPoliceZone) {
+ if (m_nPedType == PEDTYPE_COP && !m_pedInObjective->GetWeapon()->IsTypeMelee())
+ bNotAllowedToDuck = true;
+ } else {
+ if (!m_pedInObjective->bInVehicle) {
+ if (m_pedInObjective->GetWeapon()->IsTypeMelee()) {
+ bNotAllowedToDuck = false;
+ bCrouchWhenShooting = false;
+ } else if (DuckAndCover()) {
+ return CANT_ATTACK;
+ }
+ } else {
+ bNotAllowedToDuck = false;
+ bCrouchWhenShooting = false;
+ }
+ }
+ if (m_leaveCarTimer > CTimer::GetTimeInMilliseconds() && !bKindaStayInSamePlace) {
+ SetMoveState(PEDMOVE_STILL);
+ return CANT_ATTACK;
+ }
+ if (m_pedInObjective->IsPlayer()) {
+ CPlayerPed *player = FindPlayerPed();
+ if (m_nPedType == PEDTYPE_COP && player->m_pWanted->m_bIgnoredByCops
+ || player->m_pWanted->m_bIgnoredByEveryone
+ || m_pedInObjective->bIsInWater
+ || m_pedInObjective->m_nPedState == PED_ARRESTED) {
+
+ if (m_nPedState != PED_ARREST_PLAYER)
+ SetIdle();
+
+ return CANT_ATTACK;
+ }
+ }
+ if (m_pedInObjective->IsPlayer() && m_nPedType != PEDTYPE_COP
+ && CharCreatedBy != MISSION_CHAR && FindPlayerPed()->m_pWanted->m_CurrentCops != 0) {
+ SetObjective(OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE);
+
+ return CANT_ATTACK;
+ }
+ if (m_pedInObjective->m_fHealth <= 0.0f) {
+ bObjectiveCompleted = true;
+ bScriptObjectiveCompleted = true;
+ return CANT_ATTACK;
+ }
+ CWeaponInfo *wepInfo = CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType);
+ float wepRange = wepInfo->m_fRange;
+ float wepRangeAdjusted = wepRange / 3.f;
+
+ float distWithTargetSc = distWithTarget.Magnitude();
+ if (m_pedInObjective->bInVehicle && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
+ CVehicle *vehOfTarget = m_pedInObjective->m_pMyVehicle;
+ if (vehOfTarget->bIsInWater || vehOfTarget->GetStatus() == STATUS_PLAYER_DISABLED
+ || m_pedInObjective->IsPlayer() && CPad::GetPad(0)->ArePlayerControlsDisabled()) {
+ SetIdle();
+ return WATCH_UNTIL_HE_DISAPPEARS;
+ }
+ SetLookFlag(vehOfTarget, false);
+ if (m_nMoveState == PEDMOVE_STILL && IsPedInControl())
+ TurnBody();
+
+ if (m_nPedState != PED_CARJACK) {
+ if (m_pedInObjective->m_nPedState != PED_ARRESTED) {
+ if (m_attackTimer < CTimer::GetTimeInMilliseconds() && distWithTargetSc < wepRange && distWithTargetSc > 3.0f) {
+
+ SetAttack(vehOfTarget);
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
+
+ m_pPointGunAt = vehOfTarget;
+ if (vehOfTarget)
+ vehOfTarget->RegisterReference((CEntity **) &m_pPointGunAt);
+
+ SetShootTimer(CGeneral::GetRandomNumberInRange(500, 2000));
+ if (distWithTargetSc <= m_distanceToCountSeekDone) {
+ SetAttackTimer(CGeneral::GetRandomNumberInRange(200, 500));
+ SetMoveState(PEDMOVE_STILL);
+ } else {
+ SetAttackTimer(CGeneral::GetRandomNumberInRange(2000, 5000));
+ }
+ return ATTACK_IN_PROGRESS;
+ } else if (m_nPedState != PED_ATTACK && !bKindaStayInSamePlace && !killPlayerInNoPoliceZone) {
+ if (vehOfTarget) {
+ if (m_nPedType == PEDTYPE_COP || vehOfTarget->bIsBus) {
+ GoToNearestDoor(vehOfTarget);
+ } else {
+ m_vehEnterType = 0;
+ if (m_pedInObjective == vehOfTarget->pDriver || vehOfTarget->bIsBus) {
+ m_vehEnterType = CAR_DOOR_LF;
+ } else if (m_pedInObjective == vehOfTarget->pPassengers[0]) {
+ m_vehEnterType = CAR_DOOR_RF;
+ } else if (m_pedInObjective == vehOfTarget->pPassengers[1]) {
+ m_vehEnterType = CAR_DOOR_LR;
+ } else if (m_pedInObjective == vehOfTarget->pPassengers[2]) {
+ m_vehEnterType = CAR_DOOR_RR;
+ }
+ // Unused
+ // GetPositionToOpenCarDoor(vehOfTarget, m_vehEnterType);
+ SetSeekCar(vehOfTarget, m_vehEnterType);
+ SetMoveState(PEDMOVE_RUN);
+ }
+ }
+ }
+ }
+ }
+ return ATTACK_IN_PROGRESS;
+ }
+ if (m_nMoveState == PEDMOVE_STILL && IsPedInControl()) {
+ SetLookFlag(m_pedInObjective, false);
+ TurnBody();
+ }
+ if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
+ float maxArrestDist = 1.5f;
+ if (((CCopPed*)this)->field_601) {
+ if (m_nPedState == PED_FALL) {
+ maxArrestDist = 3.5f;
+ } else if (m_nPedState != PED_DRAG_FROM_CAR) {
+ ((CCopPed*)this)->field_601 = 0;
+ }
+ }
+
+ if (distWithTargetSc < maxArrestDist) {
+ if (m_pedInObjective->m_getUpTimer > CTimer::GetTimeInMilliseconds()
+ || m_pedInObjective->m_nPedState == PED_DRAG_FROM_CAR) {
+
+ ((CCopPed*)this)->SetArrestPlayer(m_pedInObjective);
+ return WATCH_UNTIL_HE_DISAPPEARS;
+ }
+ }
+ }
+ /*
+ if (distWithTargetSc > 0.1f) {
+ junk code
+ } */
+
+ if (m_shotTime != 0 && m_ceaseAttackTimer != 0) {
+ if (CTimer::GetTimeInMilliseconds() > m_ceaseAttackTimer + m_shotTime) {
+ ClearLookFlag();
+ bObjectiveCompleted = true;
+ m_shotTime = 0;
+ return CANT_ATTACK;
+ }
+ }
+
+ if (!bKindaStayInSamePlace && !bStopAndShoot && m_nPedState != PED_ATTACK && !bDuckAndCover && !killPlayerInNoPoliceZone) {
+ if (distWithTargetSc > wepRange
+ || m_pedInObjective->m_getUpTimer > CTimer::GetTimeInMilliseconds()
+ || m_pedInObjective->m_nPedState == PED_ARRESTED
+ || m_pedInObjective->EnteringCar() && distWithTargetSc < 3.0f) {
+
+ if (m_pedInObjective->EnteringCar())
+ wepRangeAdjusted = 2.0f;
+
+ if (bUsePedNodeSeek) {
+ CVector bestCoords(0.0f, 0.0f, 0.0f);
+ m_vecSeekPos = m_pedInObjective->GetPosition();
+
+ if (!m_pNextPathNode)
+ FindBestCoordsFromNodes(m_vecSeekPos, &bestCoords);
+
+ if (m_pNextPathNode)
+ m_vecSeekPos = CPathFind::TakeWidthIntoAccountForWandering(m_pNextPathNode, m_randomSeed);
+
+ SetSeek(m_vecSeekPos, m_distanceToCountSeekDone);
+ } else {
+ SetSeek(m_pedInObjective, wepRangeAdjusted);
+ }
+ if (m_pedInObjective->m_pCurrentPhysSurface && distWithTargetSc < 5.0f) {
+ bStopAndShoot = true;
+ b158_8 = true;
+ SetMoveState(PEDMOVE_STILL);
+ } else if (b158_8) {
+ bStopAndShoot = false;
+ b158_8 = false;
+ }
+ return ATTACK_IN_PROGRESS;
+ }
+ }
+ if (m_attackTimer < CTimer::GetTimeInMilliseconds()
+ && distWithTargetSc < wepRange && m_pedInObjective->m_nPedState != PED_GETUP && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) {
+
+ if (bIsDucking && !bCrouchWhenShooting) {
+ CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN);
+ if (!duckAnim)
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW);
+ if (!duckAnim)
+ duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_CROUCH);
+
+ if (duckAnim) {
+ duckAnim->flags |= ASSOC_DELETEFADEDOUT;
+ duckAnim->blendDelta = -4.0f;
+ }
+ bIsDucking = false;
+ return CANT_ATTACK;
+ }
+ bObstacleShowedUpDuringKillObjective = false;
+ SetAttack(m_pedInObjective);
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
+
+ m_pPointGunAt = m_pedInObjective;
+ if (m_pedInObjective)
+ m_pedInObjective->RegisterReference((CEntity**)&m_pPointGunAt);
+
+ SetShootTimer(CGeneral::GetRandomNumberInRange(900.0f, 1500.0f));
+
+ int time;
+ if (distWithTargetSc <= wepRangeAdjusted)
+ time = CGeneral::GetRandomNumberInRange(100.0f, 500.0f);
+ else
+ time = CGeneral::GetRandomNumberInRange(1500.0f, 3000.0f);
+
+ SetAttackTimer(time);
+ } else {
+ if (!m_pedInObjective->m_pCurrentPhysSurface && b158_8) {
+ b158_8 = false;
+ bStopAndShoot = false;
+ }
+
+ if (m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT) {
+ if (bNotAllowedToDuck && bKindaStayInSamePlace && !bIsDucking && bCrouchWhenShooting) {
+ SetDuck(CGeneral::GetRandomNumberInRange(4000, 5000), false);
+ return CANT_ATTACK;
+ }
+ if (bObstacleShowedUpDuringKillObjective) {
+ if (m_nPedType == PEDTYPE_COP) {
+ if (GetWeapon()->m_eWeaponType > WEAPONTYPE_COLT45
+ || m_fleeFrom && m_fleeFrom->IsObject()) {
+ wepRangeAdjusted = 6.0f;
+ } else if (m_fleeFrom && m_fleeFrom->IsVehicle()) {
+ wepRangeAdjusted = 4.0f;
+ } else {
+ wepRangeAdjusted = 2.0f;
+ }
+ } else {
+ wepRangeAdjusted = 2.0f;
+ }
+ }
+ if (distWithTargetSc <= wepRangeAdjusted) {
+ SetMoveState(PEDMOVE_STILL);
+ bIsPointingGunAt = true;
+ if (m_nPedState != PED_AIM_GUN && !bDuckAndCover) {
+ m_attackTimer = CTimer::GetTimeInMilliseconds();
+ SetIdle();
+ }
+ } else {
+ if (m_nPedState != PED_SEEK_ENTITY && m_nPedState != PED_SEEK_POS
+ && !bStopAndShoot && !killPlayerInNoPoliceZone && !bKindaStayInSamePlace) {
+ Say(SOUND_PED_ATTACK);
+ SetSeek(m_pedInObjective, wepRangeAdjusted);
+ bIsRunning = true;
+ if (m_nPedType == PEDTYPE_COP && FindPlayerPed()->m_pWanted->m_CurrentCops > 1) {
+ if (CGeneral::GetRandomNumber() & 1)
+ Say(SOUND_PED_GUNAIMEDAT3);
+ else
+ Say(SOUND_PED_GUNAIMEDAT2);
+ }
+ }
+ }
+ }
+ }
+
+ if (CTimer::GetTimeInMilliseconds() > m_nPedStateTimer)
+ m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(m_pedInObjective->GetPosition().x, m_pedInObjective->GetPosition().y, GetPosition().x, GetPosition().y);
+
+ return ATTACK_IN_PROGRESS;
+}
+
void
PlayRandomAnimationsFromAnimBlock(CPed* ped, AssocGroupId animGroup, uint32 first, uint32 amount)
{
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index d0a2abf0..979eb29c 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -30,6 +30,13 @@ struct PedAudioData
int m_nMaxRandomDelayTime;
};
+enum
+{
+ ATTACK_IN_PROGRESS,
+ CANT_ATTACK,
+ WATCH_UNTIL_HE_DISAPPEARS,
+};
+
enum eFormation
{
FORMATION_UNDEFINED,
@@ -98,7 +105,6 @@ enum PedFightMoves
FIGHTMOVE_PUNCHHOOK,
FIGHTMOVE_PUNCHJAB,
FIGHTMOVE_PUNCH,
- FIGHTMOVE_BODYBLOW = FIGHTMOVE_PUNCH,
FIGHTMOVE_LONGKICK,
FIGHTMOVE_ROUNDHOUSE,
// Directionals
@@ -460,11 +466,9 @@ public:
uint32 bIsDrowning : 1;
uint32 bDrownsInWater : 1;
//uint32 b156_4
- uint32 b156_8 : 1;
+ uint32 bHeldHostageInCar : 1;
uint32 bIsPlayerFriend : 1;
-#ifdef VC_PED_PORTS
uint32 bHeadStuckInCollision : 1;
-#endif
uint32 bDeadPedInFrontOfCar : 1;
uint32 bStayInCarOnJack : 1;
@@ -472,22 +476,21 @@ public:
uint32 bDoomAim : 1;
uint32 bCanBeShotInVehicle : 1;
//uint32 b157_8
- //uint32 b157_10
- //uint32 b157_20
+ uint32 bMakeFleeScream : 1;
+ uint32 bPushedAlongByCar : 1;
uint32 b157_40 : 1;
uint32 bIgnoreThreatsBehindObjects : 1;
uint32 bNeverEverTargetThisPed : 1;
uint32 bCrouchWhenScared : 1;
uint32 bKnockedOffBike : 1;
- //uint32 b158_8
+ uint32 b158_8 : 1;
uint32 b158_10 : 1;
uint32 bBoughtIceCream : 1;
- //uint32 b158_40
+ uint32 b158_40 : 1;
//uint32 b158_80
// our own flags
- uint32 m_ped_flagI40 : 1; // bMakePedsRunToPhonesToReportCrimes makes use of this as runover by car indicator
uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle
uint8 m_gangFlags;
@@ -595,8 +598,8 @@ public:
uint8 m_wepAccuracy;
CEntity *m_pPointGunAt;
CVector m_vecHitLastPos;
+ uint32 m_curFightMove;
uint32 m_lastFightMove;
- uint32 m_lastHitState; // TODO(Miami): What's this?
uint8 m_fightButtonPressure;
FightState m_fightState;
bool m_takeAStepAfterAttack;
@@ -634,8 +637,8 @@ public:
uint32 m_threatFlags;
uint32 m_threatCheck;
uint32 m_lastThreatCheck;
- uint32 m_sayType;
- uint32 m_sayTimer;
+ uint32 m_delayedSoundID;
+ uint32 m_delayedSoundTimer;
uint32 m_lastSoundStart;
uint32 m_soundStart;
uint16 m_lastQueuedSound;
@@ -667,6 +670,7 @@ public:
void AimGun(void);
void KillPedWithCar(CVehicle *veh, float impulse);
void Say(uint16 audio);
+ void Say(uint16 audio, int32 time);
void SetLookFlag(CEntity* target, bool keepTryingToLook, bool cancelPrevious = false);
void SetLookFlag(float direction, bool keepTryingToLook, bool cancelPrevious = false);
void SetLookTimer(int time);
@@ -761,6 +765,8 @@ public:
void SetWaitState(eWaitState, void*);
bool FightStrike(CVector&, bool);
void FightHitPed(CPed*, CVector&, CVector&, int16);
+ int32 ChooseAttackPlayer(uint8, bool);
+ int32 ChooseAttackAI(uint8, bool);
int GetLocalDirection(const CVector2D &);
void StartFightDefend(uint8, uint8, uint8);
void PlayHitSound(CPed*);
@@ -948,6 +954,8 @@ public:
void ClearWaitState(void);
void Undress(const char*);
void Dress(void);
+ int32 KillCharOnFootMelee(CVector&, CVector&, CVector&);
+ int32 KillCharOnFootArmed(CVector&, CVector&, CVector&);
bool HasWeaponSlot(uint8 slot) { return m_weapons[slot].m_eWeaponType != WEAPONTYPE_UNARMED; }
CWeapon& GetWeapon(uint8 slot) { return m_weapons[slot]; }
@@ -964,6 +972,7 @@ public:
bool Dying(void) { return m_nPedState == PED_DIE; }
bool DyingOrDead(void) { return m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
bool OnGround(void) { return m_nPedState == PED_FALL || m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
+ bool OnGroundOrGettingUp(void) { return OnGround() || m_nPedState == PED_GETUP; }
bool Driving(void) { return m_nPedState == PED_DRIVING; }
bool InVehicle(void) { return bInVehicle && m_pMyVehicle; } // True when ped is sitting/standing in vehicle, not in enter/exit state.
@@ -1032,6 +1041,20 @@ public:
else
return (AnimationId)0;
}
+
+ static AnimationId GetFinishingAttackAnim(CWeaponInfo* weapon) {
+ if (!!weapon->m_bFinish3rd)
+ return ANIM_MELEE_ATTACK_FINISH;
+ else
+ return (AnimationId)0;
+ }
+
+ static AnimationId GetSecondFireAnim(CWeaponInfo* weapon) {
+ if (!!weapon->m_bUse2nd)
+ return ANIM_WEAPON_FIRE_2ND; // or ANIM_MELEE_ATTACK_2ND
+ else
+ return (AnimationId)0;
+ }
// --
// My additions, because there were many, many instances of that.
diff --git a/src/peds/PedAttractor.cpp b/src/peds/PedAttractor.cpp
index 659a522b..9f77f2a4 100644
--- a/src/peds/PedAttractor.cpp
+++ b/src/peds/PedAttractor.cpp
@@ -71,15 +71,15 @@ const C2dEffect* CVehicleToEffect::ChooseEffect(const CVector& pos) const
return nil;
if (DotProduct(pos - m_pVehicle->GetPosition(), m_pVehicle->GetRight()) > 0.0f) {
if (DotProduct(pos - m_pVehicle->GetPosition(), m_pVehicle->GetForward()) > 0.0f)
- return &m_effects[0];
+ return &m_effects[1];
else
- return &m_effects[2];
+ return &m_effects[3];
}
else {
if (DotProduct(pos - m_pVehicle->GetPosition(), m_pVehicle->GetForward()) > 0.0f)
- return &m_effects[1];
+ return &m_effects[0];
else
- return &m_effects[3];
+ return &m_effects[2];
}
}
@@ -137,8 +137,8 @@ void CPedAttractorManager::RemoveIceCreamVanEffects(C2dEffect* pEffect)
for (std::vector<CVehicleToEffect>::const_iterator assoc = vVehicleToEffect.cbegin(); assoc != vVehicleToEffect.cend();) {
if (assoc->GetVehicle() != pVehicle)
return;
- size_t total = 0;
- for (size_t j = 0; j < NUM_ATTRACTORS_FOR_ICECREAM_VAN; j++) {
+ uint32 total = 0;
+ for (uint32 j = 0; j < NUM_ATTRACTORS_FOR_ICECREAM_VAN; j++) {
if (FindAssociatedAttractor(assoc->GetEffect(j), vIceCreamAttractors))
total++;
}
@@ -355,13 +355,13 @@ bool CPedAttractor::BroadcastArrival(CPed* pPed)
bool CPedAttractor::BroadcastDeparture(CPed* pPed)
{
int qid = -1;
- for (size_t i = 0; i < vWaitingQueue.size(); i++){
+ for (uint32 i = 0; i < vWaitingQueue.size(); i++){
if (vWaitingQueue[i] == pPed)
qid = i;
}
if (qid < 0)
return false;
- for (size_t i = qid + 1; i < vWaitingQueue.size(); i++) {
+ for (uint32 i = qid + 1; i < vWaitingQueue.size(); i++) {
CVector pos;
float heading;
float time;
@@ -401,7 +401,7 @@ bool CPedAttractor::BroadcastDeparture(CPed* pPed)
bool CPedShelterAttractor::BroadcastDeparture(CPed* pPed)
{
int qid = -1;
- for (size_t i = 0; i < vWaitingQueue.size(); i++) {
+ for (uint32 i = 0; i < vWaitingQueue.size(); i++) {
if (vWaitingQueue[i] == pPed)
qid = i;
}
diff --git a/src/peds/PedAttractor.h b/src/peds/PedAttractor.h
index 563efd3a..85b4327b 100644
--- a/src/peds/PedAttractor.h
+++ b/src/peds/PedAttractor.h
@@ -108,8 +108,8 @@ public:
float ComputeDeltaHeading() const;
float ComputeDeltaPos() const;
void ComputeAttractTime(int32 id, bool, float& time) const;
- int32 GetNoOfRegisteredPeds() const { return vWaitingQueue.size() + vApproachingQueue.size(); }
- int32 ComputeFreeSlot() const { return vWaitingQueue.size(); }
+ int32 GetNoOfRegisteredPeds() const { return (int32)(vWaitingQueue.size() + vApproachingQueue.size()); }
+ int32 ComputeFreeSlot() const { return (int32)vWaitingQueue.size(); }
bool IsInQueue(CPed*) const;
bool RegisterPed(CPed*);
bool BroadcastArrival(CPed*);
diff --git a/src/peds/PedChat.cpp b/src/peds/PedChat.cpp
index ee639a50..4480a8cd 100644
--- a/src/peds/PedChat.cpp
+++ b/src/peds/PedChat.cpp
@@ -155,4 +155,14 @@ CPed::Say(uint16 audio)
m_queuedSound = audioToPlay;
}
}
+}
+
+// --MIAMI: Done
+void
+CPed::Say(uint16 audio, int32 time)
+{
+ if (m_delayedSoundID == -1) {
+ m_delayedSoundID = audio;
+ m_delayedSoundTimer = CTimer::GetTimeInMilliseconds() + time;
+ }
} \ No newline at end of file
diff --git a/src/peds/PedDebug.cpp b/src/peds/PedDebug.cpp
index 1c22963e..0809581b 100644
--- a/src/peds/PedDebug.cpp
+++ b/src/peds/PedDebug.cpp
@@ -7,10 +7,11 @@
#include "Sprite.h"
#include "Text.h"
-
+// TODO(Miami)
static char ObjectiveText[][28] = {
"No Obj",
"Wait on Foot",
+ "Wait on Foot For Cop",
"Flee on Foot Till Safe",
"Guard Spot",
"Guard Area",
@@ -21,6 +22,8 @@ static char ObjectiveText[][28] = {
"Flee Char on Foot Till Safe",
"Flee Char on Foot Always",
"GoTo Char on Foot",
+ "GoTo Char on Foot Walking",
+ "Hassle Char",
"Follow Char in Formation",
"Leave Car",
"Enter Car as Passenger",
@@ -42,10 +45,9 @@ static char ObjectiveText[][28] = {
"Catch Train",
"Buy IceCream",
"Steal Any Car",
+ "Steal Any Mission Car",
"Mug Char",
-#ifdef VC_PED_PORTS
- "Leave Car and Die"
-#endif
+ "Leave Car and Die",
};
static char StateText[][18] = {
@@ -82,8 +84,14 @@ static char StateText[][18] = {
"Investigate",
"Step away",
"On Fire",
+ "Sun Bathe",
+ "Flash",
+ "Jog",
+ "Answer Mobile",
"Unknown",
"STATES_NO_AI",
+ "Abseil",
+ "Sit",
"Jump",
"Fall",
"GetUp",
@@ -106,6 +114,7 @@ static char StateText[][18] = {
"Exit Car",
"Hands Up",
"Arrested",
+ "Deploying Stinger"
};
static char PersonalityTypeText[][18] = {
@@ -283,7 +292,7 @@ CPed::DebugRenderOnePedText(void)
CFont::SetJustifyOff();
CFont::SetColor(CRGBA(255, 255, 0, 255));
CFont::SetBackGroundOnlyTextOn();
- CFont::SetFontStyle(0);
+ CFont::SetFontStyle(1);
AsciiToUnicode(StateText[m_nPedState], gUString);
CFont::PrintString(screenCoords.x, screenCoords.y, gUString);
AsciiToUnicode(ObjectiveText[m_objective], gUString);
diff --git a/src/peds/PedPlacement.cpp b/src/peds/PedPlacement.cpp
index 6011ce44..8012650a 100644
--- a/src/peds/PedPlacement.cpp
+++ b/src/peds/PedPlacement.cpp
@@ -4,7 +4,8 @@
#include "PedPlacement.h"
#include "World.h"
-void
+// --MIAMI: Done
+bool
CPedPlacement::FindZCoorForPed(CVector* pos)
{
float zForPed;
@@ -32,8 +33,11 @@ CPedPlacement::FindZCoorForPed(CVector* pos)
zForPed = Max(foundColZ, foundColZ2);
- if (zForPed > -99.0f)
+ if (zForPed > -99.0f) {
pos->z = FEET_OFFSET + zForPed;
+ return true;
+ }
+ return false;
}
CEntity*
diff --git a/src/peds/PedPlacement.h b/src/peds/PedPlacement.h
index 5b8354d4..d1b0cd16 100644
--- a/src/peds/PedPlacement.h
+++ b/src/peds/PedPlacement.h
@@ -2,7 +2,7 @@
class CPedPlacement {
public:
- static void FindZCoorForPed(CVector* pos);
+ static bool FindZCoorForPed(CVector* pos);
static CEntity* IsPositionClearOfCars(Const CVector*);
static bool IsPositionClearForPed(const CVector& pos, float radius = -1.0f, int total = -1, CEntity** entities = nil);
}; \ No newline at end of file
diff --git a/src/peds/PedStats.cpp b/src/peds/PedStats.cpp
index 06e39039..1f7a95b4 100644
--- a/src/peds/PedStats.cpp
+++ b/src/peds/PedStats.cpp
@@ -47,7 +47,7 @@ CPedStats::LoadPedStats(void)
char *buf;
char line[256];
char name[32];
- int bp, buflen;
+ size_t bp, buflen;
int lp, linelen;
int type;
float fleeDist, headingChangeRate, attackStrength, defendWeakness;
diff --git a/src/peds/PedType.cpp b/src/peds/PedType.cpp
index 8bf4c6e1..397cd71d 100644
--- a/src/peds/PedType.cpp
+++ b/src/peds/PedType.cpp
@@ -43,7 +43,7 @@ CPedType::LoadPedData(void)
char *buf;
char line[256];
char word[32];
- int bp, buflen;
+ size_t bp, buflen;
int lp, linelen;
int type;
uint32 flags;
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 35689e4e..cba01e31 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -35,7 +35,7 @@ CPlayerPed::~CPlayerPed()
delete m_pWanted;
}
-// --MIAMI: Done except commented out things
+// --MIAMI: Done
CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
{
m_fMoveSpeed = 0.0f;
@@ -53,10 +53,8 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
m_nSpeedTimer = 0;
m_bSpeedTimerFlag = false;
- // TODO(Miami)
- // if (pPointGunAt)
- // m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
-
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
m_pPointGunAt = nil;
SetPedState(PED_IDLE);
#ifndef FIX_BUGS
@@ -69,13 +67,14 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
m_fAttackButtonCounter = 0.0f;
m_bHaveTargetSelected = false;
m_bHasLockOnTarget = false;
- m_bDrunkVisualsWearOff = true;
m_bCanBeDamaged = true;
+ m_bDrunkVisualsWearOff = false;
m_fWalkAngle = 0.0f;
m_fFPSMoveHeading = 0.0f;
m_pMinigunTopAtomic = nil;
m_fGunSpinSpeed = 0.0;
m_fGunSpinAngle = 0.0;
+ m_nPadDownPressedInMilliseconds = 0;
m_nTargettableObjects[0] = m_nTargettableObjects[1] = m_nTargettableObjects[2] = m_nTargettableObjects[3] = -1;
unused1 = false;
for (int i = 0; i < 6; i++) {
@@ -85,17 +84,16 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
}
m_nCheckPlayersIndex = 0;
m_nPadUpPressedInMilliseconds = 0;
- m_nPadDownPressedInMilliseconds = 0;
idleAnimBlockIndex = CAnimManager::GetAnimationBlockIndex("playidles");
}
-void CPlayerPed::ClearWeaponTarget()
+// --MIAMI: Done
+void
+CPlayerPed::ClearWeaponTarget()
{
if (m_nPedType == PEDTYPE_PLAYER1) {
-
- // TODO(Miami)
- // if (m_pPointGunAt)
- // m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
+ if (m_pPointGunAt)
+ m_pPointGunAt->CleanUpOldReference(&m_pPointGunAt);
m_pPointGunAt = nil;
TheCamera.ClearPlayerWeaponMode();
@@ -784,6 +782,7 @@ CPlayerPed::PlayerControlM16(CPad *padUsed)
GetWeapon()->Update(m_audioEntityId, nil);
}
+// --MIAMI: Done
void
CPlayerPed::PlayerControlFighter(CPad *padUsed)
{
@@ -809,6 +808,7 @@ CPlayerPed::PlayerControlFighter(CPad *padUsed)
}
}
+// --MIAMI: Done
void
CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed)
{
@@ -1814,6 +1814,7 @@ CPlayerPed::PlayIdleAnimations(CPad *padUsed)
}
}
+// --MIAMI: Done
void
CPlayerPed::RemovePedFromMeleeList(CPed *ped)
{
@@ -1826,6 +1827,100 @@ CPlayerPed::RemovePedFromMeleeList(CPed *ped)
ped->m_attackTimer = 0;
}
+// --MIAMI: Done
+void
+CPlayerPed::GetMeleeAttackCoords(CVector& coords, int8 dir, float dist)
+{
+ coords = GetPosition();
+ switch (dir) {
+ case 0:
+ coords.y += dist;
+ break;
+ case 1:
+ coords.x += Sqrt(3.f / 4.f) * dist;
+ coords.y += 0.5f * dist;
+ break;
+ case 2:
+ coords.x += Sqrt(3.f / 4.f) * dist;
+ coords.y -= 0.5f * dist;
+ break;
+ case 3:
+ coords.y -= dist;
+ break;
+ case 4:
+ coords.x -= Sqrt(3.f / 4.f) * dist;
+ coords.y -= 0.5f * dist;
+ break;
+ case 5:
+ coords.x -= Sqrt(3.f / 4.f) * dist;
+ coords.y += 0.5f * dist;
+ break;
+ default:
+ break;
+ }
+}
+
+// --MIAMI: Done
+int32
+CPlayerPed::FindMeleeAttackPoint(CPed *victim, CVector &dist, uint32 &endOfAttackOut)
+{
+ endOfAttackOut = 0;
+ bool thereIsAnEmptySlot = false;
+ int dirToAttack = -1;
+ for (int i = 0; i < ARRAY_SIZE(m_pMeleeList); i++) {
+ CPed* pedAtThisDir = m_pMeleeList[i];
+ if (pedAtThisDir) {
+ if (pedAtThisDir == victim) {
+ dirToAttack = i;
+ } else {
+ if (pedAtThisDir->m_attackTimer > endOfAttackOut)
+ endOfAttackOut = pedAtThisDir->m_attackTimer;
+ }
+ } else {
+ thereIsAnEmptySlot = true;
+ }
+ }
+
+ // We don't have victim ped in our melee list
+ if (dirToAttack == -1 && thereIsAnEmptySlot) {
+ float angle = Atan2(-dist.x, -dist.y);
+ float adjustedAngle = angle + DEGTORAD(30.0f);
+ if (adjustedAngle < 0.f)
+ adjustedAngle += TWOPI;
+
+ int wantedDir = Floor(adjustedAngle / DEGTORAD(60.0f));
+
+ // And we have another ped at the direction of victim ped, so store victim to next empty direction to it's real direction. (Bollocks)
+ if (m_pMeleeList[wantedDir]) {
+ int closestDirToPreferred = -99;
+ int preferredDir = wantedDir;
+
+ for (int i = 0; i < ARRAY_SIZE(m_pMeleeList); i++) {
+ if (!m_pMeleeList[i]) {
+ if (Abs(i - preferredDir) < Abs(closestDirToPreferred - preferredDir))
+ closestDirToPreferred = i;
+ }
+ }
+ if (closestDirToPreferred > 0)
+ dirToAttack = closestDirToPreferred;
+ } else {
+
+ // Luckily the direction of victim ped is already empty, good
+ dirToAttack = wantedDir;
+ }
+
+ if (dirToAttack != -1) {
+ m_pMeleeList[dirToAttack] = victim;
+ victim->RegisterReference((CEntity**) &m_pMeleeList[dirToAttack]);
+ if (endOfAttackOut > CTimer::GetTimeInMilliseconds())
+ victim->m_attackTimer = endOfAttackOut + CGeneral::GetRandomNumberInRange(1000, 2000);
+ else
+ victim->m_attackTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(500, 1000);
+ }
+ }
+ return dirToAttack;
+}
+
#ifdef COMPATIBLE_SAVES
#define CopyFromBuf(buf, data) memcpy(&data, buf, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
#define CopyToBuf(buf, data) memcpy(buf, &data, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
diff --git a/src/peds/PlayerPed.h b/src/peds/PlayerPed.h
index 7ff95ff3..3b8d8fcb 100644
--- a/src/peds/PlayerPed.h
+++ b/src/peds/PlayerPed.h
@@ -34,7 +34,7 @@ public:
bool m_bDrunkVisualsWearOff; // TODO(Miami): That may be something else
CVector m_vecSafePos[6]; // safe places from the player, for example behind a tree
CPed *m_pPedAtSafePos[6];
- CPlayerPed* m_pMeleeList[6];
+ CPed *m_pMeleeList[6]; // reachable peds at each direction(6)
char unused1;
int16 m_nCheckPlayersIndex;
float m_fWalkAngle; //angle between heading and walking direction
@@ -85,6 +85,8 @@ public:
bool DoesPlayerWantNewWeapon(eWeaponType, bool);
void PlayIdleAnimations(CPad*);
void RemovePedFromMeleeList(CPed*);
+ void GetMeleeAttackCoords(CVector&, int8, float);
+ int32 FindMeleeAttackPoint(CPed*, CVector&, uint32&);
static void SetupPlayerPed(int32);
static void DeactivatePlayerPed(int32);
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 18a0c963..70caf1f2 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -353,7 +353,7 @@ CPopulation::FindCollisionZoneForCoors(CVector *coors, int *safeZoneOut, eLevelN
}
// Then it's transition area
if (*safeZoneOut >= 0)
- *levelOut = LEVEL_NONE;
+ *levelOut = LEVEL_GENERIC;
else
*levelOut = CTheZones::GetLevelFromPosition(coors);
}
@@ -559,16 +559,23 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
CZoneInfo zoneInfo;
CPed *gangLeader = nil;
bool addCop = false;
+ bool forceAddingCop = false;
CPlayerInfo *playerInfo = &CWorld::Players[CWorld::PlayerInFocus];
CVector playerCentreOfWorld = FindPlayerCentreOfWorld(CWorld::PlayerInFocus);
CTheZones::GetZoneInfoForTimeOfDay(&playerCentreOfWorld, &zoneInfo);
CWanted *wantedInfo = playerInfo->m_pPed->m_pWanted;
+
if (wantedInfo->m_nWantedLevel > 2) {
- if (ms_nNumCop < wantedInfo->m_MaxCops && !playerInfo->m_pPed->bInVehicle
- && (CCarCtrl::NumLawEnforcerCars >= wantedInfo->m_MaximumLawEnforcerVehicles
+ if (!CGame::IsInInterior() && (CGeneral::GetRandomNumber() % 32 == 0) && FindPlayerVehicle())
+ forceAddingCop = true;
+
+ uint32 maxCops = CGame::IsInInterior() ? wantedInfo->m_MaxCops * 1.6f : wantedInfo->m_MaxCops;
+ if ((ms_nNumCop < maxCops || forceAddingCop) &&
+ (!playerInfo->m_pPed->bInVehicle &&
+ (CCarCtrl::NumLawEnforcerCars >= wantedInfo->m_MaximumLawEnforcerVehicles
|| CCarCtrl::NumRandomCars >= playerInfo->m_nTrafficMultiplier * CCarCtrl::CarDensityMultiplier
|| CCarCtrl::NumFiretrucksOnDuty + CCarCtrl::NumAmbulancesOnDuty + CCarCtrl::NumParkedCars
- + CCarCtrl::NumMissionCars + CCarCtrl::NumLawEnforcerCars + CCarCtrl::NumRandomCars >= CCarCtrl::MaxNumberOfCarsInUse)) {
+ + CCarCtrl::NumMissionCars + CCarCtrl::NumLawEnforcerCars + CCarCtrl::NumRandomCars >= CCarCtrl::MaxNumberOfCarsInUse) || forceAddingCop)) {
addCop = true;
minDist = PedCreationDistMultiplier() * MIN_CREATION_DIST;
maxDist = PedCreationDistMultiplier() * (MIN_CREATION_DIST + CREATION_RANGE);
@@ -693,6 +700,9 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
if (!farEnoughToAdd)
break;
CPed *newPed = AddPed((ePedType)pedTypeToAdd, modelToAdd, generatedCoors);
+ if (forceAddingCop && newPed->m_nPedType == PEDTYPE_COP)
+ ((CCopPed*)newPed)->m_bThrowsSpikeTrap = true;
+
newPed->SetWanderPath(CGeneral::GetRandomNumberInRange(0, 8));
if (i != 0) {
@@ -721,10 +731,11 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
}
}
+// TODO(Miami)
CPed*
CPopulation::AddPedInCar(CVehicle* car, bool isDriver)
{
- int defaultModel = MI_MALE01;
+ const int defaultModel = MI_MALE01;
int miamiViceIndex = 0;
bool imSureThatModelIsLoaded = true;
CVector coors = FindPlayerCoors();
@@ -744,10 +755,6 @@ CPopulation::AddPedInCar(CVehicle* car, bool isDriver)
preferredModel = 0;
pedType = PEDTYPE_EMERGENCY;
break;
- case MI_FBICAR:
- preferredModel = COP_FBI;
- pedType = PEDTYPE_COP;
- break;
case MI_POLICE:
case MI_PREDATOR:
preferredModel = COP_STREET;
@@ -762,24 +769,24 @@ CPopulation::AddPedInCar(CVehicle* car, bool isDriver)
preferredModel = COP_ARMY;
pedType = PEDTYPE_COP;
break;
- case MI_VICECHEE: // TODO(MIAMI): figure out new structure of the function
- preferredModel = COP_MIAMIVICE;
+ case MI_FBIRANCH:
+ preferredModel = COP_FBI;
pedType = PEDTYPE_COP;
- miamiViceIndex = (isDriver ? 2 * CCarCtrl::MiamiViceCycle : 2 * CCarCtrl::MiamiViceCycle + 1);
break;
- case MI_TAXI:
- case MI_CABBIE:
- case MI_ZEBRA:
- case MI_KAUFMAN:
- if (CGeneral::GetRandomTrueFalse()) {
- pedType = PEDTYPE_CIVMALE;
- preferredModel = MI_TAXI_D;
+ default:
+ if (car->GetModelIndex() == MI_TAXI || car->GetModelIndex() == MI_CABBIE || car->GetModelIndex() == MI_ZEBRA || car->GetModelIndex() == MI_KAUFMAN) {
+ if (isDriver) {
+ pedType = PEDTYPE_CIVMALE;
+ preferredModel = MI_TAXI_D;
+ break;
+ }
+ } else if (car->GetModelIndex() == MI_VICECHEE && car->bIsLawEnforcer) {
+ preferredModel = COP_MIAMIVICE;
+ pedType = PEDTYPE_COP;
+ miamiViceIndex = (isDriver ? 2 * CCarCtrl::MiamiViceCycle : 2 * CCarCtrl::MiamiViceCycle + 1);
break;
}
- defaultModel = MI_TAXI_D;
- // fall through
- default:
int gangOfPed = 0;
imSureThatModelIsLoaded = false;
@@ -798,8 +805,12 @@ CPopulation::AddPedInCar(CVehicle* car, bool isDriver)
if (preferredModel == -1)
preferredModel = defaultModel;
- if (((CPedModelInfo*)CModelInfo::GetModelInfo(preferredModel))->m_carsCanDrive & (1 << carModelInfo->m_vehicleClass))
- break;
+ if (((CPedModelInfo*)CModelInfo::GetModelInfo(preferredModel))->GetRwObject()) {
+ if (!car->IsPassenger(preferredModel) && !car->IsDriver(preferredModel)) {
+ if (((CPedModelInfo*)CModelInfo::GetModelInfo(preferredModel))->m_carsCanDrive & (1 << carModelInfo->m_vehicleClass))
+ break;
+ }
+ }
}
if (i == -1)
preferredModel = defaultModel;
diff --git a/src/render/Credits.cpp b/src/render/Credits.cpp
index 07d8e6e5..26b333fc 100644
--- a/src/render/Credits.cpp
+++ b/src/render/Credits.cpp
@@ -129,12 +129,12 @@ CCredits::Render(void)
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED041"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED042"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED043"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED044"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0f, lineoffset);
@@ -177,14 +177,14 @@ CCredits::Render(void)
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED061"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED062"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED063"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED064"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED065"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED066"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED067"), lineoffset, scrolloffset);
@@ -192,16 +192,16 @@ CCredits::Render(void)
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED069"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED070"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED071"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED072"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED073"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED074"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED075"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED076"), lineoffset, scrolloffset);
@@ -221,16 +221,16 @@ CCredits::Render(void)
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED085"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED086"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED087"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED088"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED089"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED090"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED091"), lineoffset, scrolloffset);
@@ -250,7 +250,7 @@ CCredits::Render(void)
PrintCreditSpace(2.0f, lineoffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED100"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED101"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED102"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED103"), lineoffset, scrolloffset);
@@ -261,82 +261,82 @@ CCredits::Render(void)
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED269"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED107"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED108"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED109"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.5f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED108"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED109"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED110"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED110"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED111"), lineoffset, scrolloffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED112"), lineoffset, scrolloffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED112"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED113"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED113"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED114"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED114"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED115"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED115"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED116"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED116"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED117"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED117"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED118"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED118"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED119"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED119"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED120"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED120"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED121"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED121"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED122"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED122"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED123"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED123"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED124"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED124"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED125"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED125"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED126"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED126"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED127"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED127"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED128"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED128"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED129"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED129"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED130"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED130"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED131"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED131"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED132"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED132"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED133"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED133"), lineoffset, scrolloffset);
if(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_ITALIAN)
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED134"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED134"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED135"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED136"), lineoffset, scrolloffset);
@@ -349,7 +349,7 @@ CCredits::Render(void)
PrintCreditText(1.7f, 1.7f, TheText.Get("CRD138A"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRD138B"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED139"), lineoffset, scrolloffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED139"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.7f, 1.0f, TheText.Get("CRED140"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140A"), lineoffset, scrolloffset);
@@ -359,12 +359,12 @@ CCredits::Render(void)
PrintCreditText(1.7f, 1.7f, TheText.Get("CRD140E"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED141"), lineoffset, scrolloffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED142"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED143"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0, lineoffset);
- PrintCreditText(1.0, 1.0, TheText.Get("CRED144"), lineoffset, scrolloffset);
- PrintCreditSpace(1.0, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED142"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED143"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
+ PrintCreditText(1.0f, 1.0f, TheText.Get("CRED144"), lineoffset, scrolloffset);
+ PrintCreditSpace(1.0f, lineoffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED145"), lineoffset, scrolloffset);
PrintCreditText(1.4f, 1.4f, TheText.Get("CRED146"), lineoffset, scrolloffset);
@@ -441,19 +441,19 @@ CCredits::Render(void)
PrintCreditText(1.4f, 1.4f, TheText.Get("CRED241"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED217"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED218"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRD218A"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRD218B"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED219"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED220"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED221"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED222"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED223"), lineoffset, scrolloffset);
@@ -462,7 +462,7 @@ CCredits::Render(void)
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED226"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
PrintCreditText(1.4f, 0.82f, TheText.Get("CRED227"), lineoffset, scrolloffset);
- PrintCreditSpace(1.5, lineoffset);
+ PrintCreditSpace(1.5f, lineoffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED228"), lineoffset, scrolloffset);
PrintCreditText(1.7f, 1.7f, TheText.Get("CRED229"), lineoffset, scrolloffset);
PrintCreditSpace(2.0f, lineoffset);
diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp
index 3f7d89c7..ab360aac 100644
--- a/src/render/Draw.cpp
+++ b/src/render/Draw.cpp
@@ -3,6 +3,7 @@
#include "Draw.h"
#include "Frontend.h"
#include "Camera.h"
+#include "CutsceneMgr.h"
#ifdef ASPECT_RATIO_SCALE
float CDraw::ms_fAspectRatio = DEFAULT_ASPECT_RATIO;
@@ -61,7 +62,10 @@ void
CDraw::SetFOV(float fov)
{
#ifdef ASPECT_RATIO_SCALE
- ms_fScaledFOV = ConvertFOV(fov);
+ if (!CCutsceneMgr::IsRunning())
+ ms_fScaledFOV = ConvertFOV(fov);
+ else
+ ms_fScaledFOV = fov;
#endif
ms_fFOV = fov;
}
diff --git a/src/render/Fluff.cpp b/src/render/Fluff.cpp
index 53b06a46..e4aff5c4 100644
--- a/src/render/Fluff.cpp
+++ b/src/render/Fluff.cpp
@@ -1,11 +1,14 @@
#include "common.h"
#include "main.h"
+#include "RenderBuffer.h"
#include "Entity.h"
#include "Fluff.h"
#include "Camera.h"
#include "Sprite.h"
#include "Coronas.h"
+#include "Rubbish.h"
+#include "Timecycle.h"
#include "General.h"
#include "Timer.h"
#include "Clock.h"
@@ -18,6 +21,277 @@
#include "Bones.h"
#include "World.h"
+CPlaneTrail CPlaneTrails::aArray[6];
+RwImVertexIndex TrailIndices[32] = {
+ 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9,
+ 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16
+};
+
+void
+CPlaneTrail::Init(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(m_time); i++)
+ m_time[i] = 0;
+}
+
+void
+CPlaneTrail::Render(float visibility)
+{
+ int i;
+ int numVerts = 0;
+ if(!TheCamera.IsSphereVisible(m_pos[0], 1000.0f))
+ return;
+
+ int alpha = visibility*110.0f;
+ if(alpha == 0)
+ return;
+
+ for(i = 0; i < ARRAY_SIZE(m_pos); i++){
+ int32 time = CTimer::GetTimeInMilliseconds() - m_time[i];
+ if(time > 30000)
+ m_time[i] = 0;
+ if(m_time[i] != 0){
+ float fade = (30000.0f - time) / 10000.0f;
+ fade = Min(fade, 1.0f);
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[numVerts], 255, 255, 255, (int)(alpha*fade));
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[numVerts], m_pos[i].x, m_pos[i].y, m_pos[i].z);
+ numVerts++;
+ }
+ }
+ if(numVerts > 1){
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
+
+ if(RwIm3DTransform(TempBufferRenderVertices, numVerts, nil, rwIM3D_VERTEXXYZ|rwIM3D_VERTEXRGBA)){
+ RwIm3DRenderIndexedPrimitive(rwPRIMTYPELINELIST, TrailIndices, (numVerts-1)*2);
+ RwIm3DEnd();
+ }
+ }
+}
+
+void
+CPlaneTrail::RegisterPoint(CVector pos)
+{
+ int i;
+ bool bNewPoint = false;
+ if(m_time[0] != 0 && CTimer::GetTimeInMilliseconds() - m_time[0] > 2000){
+ bNewPoint = true;
+ for(i = ARRAY_SIZE(m_pos)-1; i > 0; i--){
+ m_pos[i] = m_pos[i-1];
+ m_time[i] = m_time[i-1];
+ }
+ }
+ m_pos[0] = pos;
+ if(bNewPoint || m_time[0] == 0)
+ m_time[0] = CTimer::GetTimeInMilliseconds();
+}
+
+void
+CPlaneTrails::Init(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aArray); i++)
+ aArray[i].Init();
+}
+
+void
+CPlaneTrails::Update(void)
+{
+ CVector planePos;
+
+ planePos.x = 1590.0f * Sin((float)(CTimer::GetTimeInMilliseconds() & 0x1FFFF)/0x20000 * TWOPI);
+ planePos.y = 1200.0f * Cos((float)(CTimer::GetTimeInMilliseconds() & 0x1FFFF)/0x20000 * TWOPI);
+ planePos.z = 550.0f;
+ RegisterPoint(planePos, 3);
+ if(CClock::GetHours() > 22 || CClock::GetHours() < 7){
+ if(CTimer::GetTimeInMilliseconds() & 0x200)
+ CCoronas::RegisterCorona(101, 255, 0, 0, 255, planePos, 5.0f, 2000.0f,
+ CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_OFF,
+ CCoronas::LOSCHECK_OFF, CCoronas::STREAK_OFF, 0.0f);
+ else
+ CCoronas::UpdateCoronaCoors(101, planePos, 2000.0f, 0.0f);
+ }
+
+ planePos.x = 1000.0f * Sin((float)(CTimer::GetTimeInMilliseconds() & 0x1FFFF)/0x20000 * TWOPI);
+ planePos.y = -1600.0f * Cos((float)(CTimer::GetTimeInMilliseconds() & 0x1FFFF)/0x20000 * TWOPI);
+ planePos.z = 500.0f;
+ RegisterPoint(planePos, 4);
+ if(CClock::GetHours() > 22 || CClock::GetHours() < 7){
+ if(CTimer::GetTimeInMilliseconds() & 0x200)
+ CCoronas::RegisterCorona(102, 255, 0, 0, 255, planePos, 5.0f, 2000.0f,
+ CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_OFF,
+ CCoronas::LOSCHECK_OFF, CCoronas::STREAK_OFF, 0.0f);
+ else
+ CCoronas::UpdateCoronaCoors(102, planePos, 2000.0f, 0.0f);
+ }
+
+ planePos.x = 1100.0f * Cos((float)(CTimer::GetTimeInMilliseconds() & 0x1FFFF)/0x20000 * TWOPI);
+ planePos.y = 700.0f * Sin((float)(CTimer::GetTimeInMilliseconds() & 0x1FFFF)/0x20000 * TWOPI);
+ planePos.z = 600.0f;
+ RegisterPoint(planePos, 5);
+ if(CClock::GetHours() > 22 || CClock::GetHours() < 7){
+ if(CTimer::GetTimeInMilliseconds() & 0x200)
+ CCoronas::RegisterCorona(103, 255, 0, 0, 255, planePos, 5.0f, 2000.0f,
+ CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_OFF,
+ CCoronas::LOSCHECK_OFF, CCoronas::STREAK_OFF, 0.0f);
+ else
+ CCoronas::UpdateCoronaCoors(103, planePos, 2000.0f, 0.0f);
+ }
+}
+
+void
+CPlaneTrails::Render(void)
+{
+ int i;
+ float visibility = Min(1.0f-CWeather::Foggyness, 1.0f-CWeather::CloudCoverage);
+ visibility = Min(visibility, 1.0f-CWeather::Rain);
+ visibility = Min(Max(Max(CTimeCycle::GetSkyTopRed(), CTimeCycle::GetSkyTopGreen()), CTimeCycle::GetSkyTopBlue())/256.0f, visibility);
+ if(visibility > 0.0001f)
+ for(i = 0; i < ARRAY_SIZE(aArray); i++)
+ aArray[i].Render(visibility);
+}
+
+void
+CPlaneTrails::RegisterPoint(CVector pos, uint32 id)
+{
+ aArray[id].RegisterPoint(pos);
+}
+
+
+
+CPlaneBanner CPlaneBanners::aArray[5];
+
+void
+CPlaneBanner::Init(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(m_pos); i++){
+ m_pos[i].x = i;
+ m_pos[i].y = 0.0f;
+ m_pos[i].z = -60.0f;
+ }
+}
+
+void
+CPlaneBanner::Update(void)
+{
+ int i;
+ if(m_pos[0].z > -50.0f){
+ m_pos[0].z -= 0.05f*CTimer::GetTimeStep();
+ m_pos[0].z = Max(m_pos[0].z, -100.0f);
+ for(i = 1; i < ARRAY_SIZE(m_pos); i++){
+ CVector dist = m_pos[i] - m_pos[i-1];
+ float len = dist.Magnitude();
+ if(len > 8.0f)
+ m_pos[i] = m_pos[i-1] + dist/len*8.0f;
+ }
+ }
+}
+
+void
+CPlaneBanner::Render(void)
+{
+ int i;
+ if(m_pos[0].z > -50.0f){
+ float camDist = (TheCamera.GetPosition() - m_pos[0]).Magnitude();
+ if(TheCamera.IsSphereVisible(m_pos[4], 32.0f) && camDist < 300.0f){
+ TempBufferVerticesStored = 0;
+ TempBufferIndicesStored = 0;
+ int alpha = camDist < 250.0f ? 160 : (300.0f-camDist)/(300.0f-250.0f)*160;
+
+ TempBufferVerticesStored += 2;
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[0], 255, 255, 255, alpha);
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[1], 255, 255, 255, alpha);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[0], m_pos[2].x, m_pos[2].y, m_pos[2].z);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[1], m_pos[2].x, m_pos[2].y, m_pos[2].z - 4.0f);
+ RwIm3DVertexSetU(&TempBufferRenderVertices[0], 0.0f);
+ RwIm3DVertexSetV(&TempBufferRenderVertices[0], 0.0f);
+ RwIm3DVertexSetU(&TempBufferRenderVertices[1], 0.0f);
+ RwIm3DVertexSetV(&TempBufferRenderVertices[1], 1.0f);
+ for(i = 2; i < 8; i++){
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored+0], 255, 255, 255, alpha);
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[TempBufferVerticesStored+1], 255, 255, 255, alpha);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored+0], m_pos[i].x, m_pos[i].y, m_pos[i].z);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[TempBufferVerticesStored+1], m_pos[i].x, m_pos[i].y, m_pos[i].z - 4.0f);
+ RwIm3DVertexSetU(&TempBufferRenderVertices[TempBufferVerticesStored+0], (i-2)/5.0f);
+ RwIm3DVertexSetV(&TempBufferRenderVertices[TempBufferVerticesStored+0], 0.0f);
+ RwIm3DVertexSetU(&TempBufferRenderVertices[TempBufferVerticesStored+1], (i-2)/5.0f);
+ RwIm3DVertexSetV(&TempBufferRenderVertices[TempBufferVerticesStored+1], 1.0f);
+ TempBufferRenderIndexList[TempBufferIndicesStored+0] = TempBufferVerticesStored-2;
+ TempBufferRenderIndexList[TempBufferIndicesStored+1] = TempBufferVerticesStored-1;
+ TempBufferRenderIndexList[TempBufferIndicesStored+2] = TempBufferVerticesStored+1;
+ TempBufferRenderIndexList[TempBufferIndicesStored+3] = TempBufferVerticesStored-2;
+ TempBufferRenderIndexList[TempBufferIndicesStored+4] = TempBufferVerticesStored+1;
+ TempBufferRenderIndexList[TempBufferIndicesStored+5] = TempBufferVerticesStored;
+ TempBufferVerticesStored += 2;
+ TempBufferIndicesStored += 6;
+ }
+ RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
+ RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(gpRubbishTexture[2]));
+
+#ifdef FIX_BUGS
+ if(RwIm3DTransform(TempBufferRenderVertices, TempBufferVerticesStored, nil, rwIM3D_VERTEXXYZ|rwIM3D_VERTEXUV|rwIM3D_VERTEXRGBA)){
+#else
+ if(RwIm3DTransform(TempBufferRenderVertices, TempBufferVerticesStored, nil, 0)){
+#endif
+ RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempBufferRenderIndexList, TempBufferIndicesStored);
+ RwIm3DEnd();
+ }
+
+ RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
+ RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
+
+ TempBufferVerticesStored = 0;
+ TempBufferIndicesStored = 0;
+ }
+ }
+}
+
+void
+CPlaneBanner::RegisterPoint(CVector pos)
+{
+ m_pos[0] = pos;
+}
+
+void
+CPlaneBanners::Init(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aArray); i++)
+ aArray[i].Init();
+}
+
+void
+CPlaneBanners::Update(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aArray); i++)
+ aArray[i].Update();
+}
+
+void
+CPlaneBanners::Render(void)
+{
+ int i;
+ for(i = 0; i < ARRAY_SIZE(aArray); i++)
+ aArray[i].Render();
+}
+
+void
+CPlaneBanners::RegisterPoint(CVector pos, uint32 id)
+{
+ aArray[id].RegisterPoint(pos);
+}
bool CSmokeTrails::CigOn = false;
CSmokeTrail CSmokeTrails::aSmoke[3];
@@ -113,7 +387,9 @@ CMovingThing CMovingThings::aMovingThings[NUMMOVINGTHINGS];
void CMovingThings::Init()
{
+ CPlaneTrails::Init();
CSmokeTrails::Init();
+ CPlaneBanners::Init();
StartCloseList.m_pNext = &CMovingThings::EndCloseList;
StartCloseList.m_pPrev = nil;
@@ -162,14 +438,19 @@ void CMovingThings::Shutdown()
int i;
for (i = 0; i < ARRAY_SIZE(aScrollBars); ++i)
aScrollBars[i].SetVisibility(false);
+/*
for (i = 0; i < ARRAY_SIZE(aTowerClocks); ++i)
aTowerClocks[i].SetVisibility(false);
for (i = 0; i < ARRAY_SIZE(aDigitalClocks); ++i)
aDigitalClocks[i].SetVisibility(false);
+*/
}
void CMovingThings::Update()
{
+ CPlaneBanners::Update();
+ CPlaneTrails::Update();
+
const int TIME_SPAN = 64; // frames to process all aMovingThings
int16 i;
@@ -214,6 +495,7 @@ void CMovingThings::Render()
if (aScrollBars[i].IsVisible())
aScrollBars[i].Render();
}
+/*
for (i = 0; i < ARRAY_SIZE(aTowerClocks); ++i)
{
if (aTowerClocks[i].IsVisible())
@@ -224,8 +506,11 @@ void CMovingThings::Render()
if (aDigitalClocks[i].IsVisible())
aDigitalClocks[i].Render();
}
+*/
+ CPlaneTrails::Render();
CSmokeTrails::Render();
+ CPlaneBanners::Render();
}
// ---------- CMovingThing ----------
@@ -637,7 +922,7 @@ void CScrollBar::Update()
break;
}
- m_MessageLength = strlen(m_pMessage);
+ m_MessageLength = (uint32)strlen(m_pMessage);
m_MessageCurrentChar = 0;
}
@@ -934,7 +1219,6 @@ CSmokeTrails::Render(void) {
void
CSmokeTrail::Render(void) {
int numVerts = 0;
- RwIm3DVertex TempVertexBuffer[16];
if (TheCamera.IsSphereVisible(m_pos[0], 10.0f)) {
for (int32 i = 0; i < 16; i++) {
@@ -949,8 +1233,8 @@ CSmokeTrail::Render(void) {
float posX = (m_pos[i].x + timeSinceSpawned * RandomSmoke[(i - m_seed) & 0xF] * 0.00001f) - offset;
float posY = (m_pos[i].y + timeSinceSpawned * RandomSmoke[(i - m_seed + 5) & 0xF] * 0.00001f) - offset;
float posZ = m_pos[i].z + timeSinceSpawned * 0.0004f;
- RwIm3DVertexSetRGBA(&TempVertexBuffer[i], 200, 200, 200, alpha);
- RwIm3DVertexSetPos(&TempVertexBuffer[i], posX, posY, posZ);
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[i], 200, 200, 200, alpha);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[i], posX, posY, posZ);
numVerts++;
}
}
@@ -962,7 +1246,7 @@ CSmokeTrail::Render(void) {
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
- if (RwIm3DTransform(TempVertexBuffer, numVerts, nil, rwIM3D_VERTEXXYZ | rwIM3D_VERTEXRGBA)) {
+ if (RwIm3DTransform(TempBufferRenderVertices, numVerts, nil, rwIM3D_VERTEXXYZ | rwIM3D_VERTEXRGBA)) {
RwIm3DRenderIndexedPrimitive(rwPRIMTYPEPOLYLINE, SmokeTrailIndices, 2 * (numVerts - 1));
RwIm3DEnd();
}
@@ -994,13 +1278,12 @@ CSmokeTrails::Update(void) {
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil);
- RwIm3DVertex TempVertexBuffer[2];
- RwIm3DVertexSetRGBA(&TempVertexBuffer[0], 255, 255, 255, 255);
- RwIm3DVertexSetPos(&TempVertexBuffer[0], startPos.x, startPos.y, startPos.z);
- RwIm3DVertexSetRGBA(&TempVertexBuffer[1], 255, 255, 255, 255);
- RwIm3DVertexSetPos(&TempVertexBuffer[1], endPos.x, endPos.y, endPos.z);
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[0], 255, 255, 255, 255);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[0], startPos.x, startPos.y, startPos.z);
+ RwIm3DVertexSetRGBA(&TempBufferRenderVertices[1], 255, 255, 255, 255);
+ RwIm3DVertexSetPos(&TempBufferRenderVertices[1], endPos.x, endPos.y, endPos.z);
- if (RwIm3DTransform(TempVertexBuffer, 2, nil, rwIM3D_VERTEXXYZ | rwIM3D_VERTEXRGBA)) {
+ if (RwIm3DTransform(TempBufferRenderVertices, 2, nil, rwIM3D_VERTEXXYZ | rwIM3D_VERTEXRGBA)) {
RwIm3DRenderIndexedPrimitive(rwPRIMTYPEPOLYLINE, SmokeTrailIndices, 2);
RwIm3DEnd();
}
diff --git a/src/render/Fluff.h b/src/render/Fluff.h
index 41db75ec..b8b529f3 100644
--- a/src/render/Fluff.h
+++ b/src/render/Fluff.h
@@ -2,6 +2,70 @@
#include "common.h"
#include "Vector.h"
+// TODO
+class CScriptPath
+{
+public:
+};
+
+// TODO
+class CScriptPaths
+{
+public:
+};
+
+class CPlaneTrail
+{
+ CVector m_pos[16];
+ int32 m_time[16];
+public:
+ void Init(void);
+ void Render(float visibility);
+ void RegisterPoint(CVector pos);
+};
+
+class CPlaneTrails
+{
+ static CPlaneTrail aArray[6]; // NB: 3 CPlanes and 3 hardcoded far away ones
+public:
+ static void Init(void);
+ static void Update(void);
+ static void Render(void);
+ static void RegisterPoint(CVector pos, uint32 id);
+};
+
+class CPlaneBanner
+{
+ CVector m_pos[8];
+public:
+ void Init(void);
+ void Update(void);
+ void Render(void);
+ void RegisterPoint(CVector pos);
+};
+
+class CPlaneBanners
+{
+ static CPlaneBanner aArray[5];
+public:
+ static void Init(void);
+ static void Update(void);
+ static void Render(void);
+ static void RegisterPoint(CVector pos, uint32 id);
+};
+
+// TODO
+class CEscalators
+{
+public:
+};
+
+// TODO
+class CEscalator
+{
+public:
+};
+
class CMovingThing
{
public:
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index a3ead932..1e60083b 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -1133,7 +1133,11 @@ CFont::ParseToken(wchar *s)
case 'r': SetColor(CRGBA(255, 150, 225, 255)); Details.anonymous_23 = true; break;
case 't': SetColor(CRGBA(86, 212, 146, 255)); Details.anonymous_23 = true; break;
case 'w': SetColor(CRGBA(175, 175, 175, 255)); Details.anonymous_23 = true; break;
+#ifdef FIX_BUGS
+ case 'x': SetColor(CRGBA(0, 255, 255, 255)); Details.anonymous_23 = true; break;
+#else
case 'x': SetColor(CRGBA(132, 146, 197, 255)); Details.anonymous_23 = true; break;
+#endif
case 'y': SetColor(CRGBA(255, 227, 79, 255)); Details.anonymous_23 = true; break;
}
while(*s != '~') s++;
@@ -1208,11 +1212,19 @@ CFont::ParseToken(wchar* str, CRGBA &color, bool &flash, bool &bold)
color.g = 175;
color.b = 175;
break;
+#ifdef FIX_BUGS
+ case 'x':
+ color.r = 0;
+ color.g = 255;
+ color.b = 255;
+ break;
+#else
case 'x':
color.r = 132;
color.g = 146;
color.b = 197;
break;
+#endif
case 'y':
color.r = 255;
color.g = 227;
diff --git a/src/render/Glass.cpp b/src/render/Glass.cpp
index ac892ddb..ee36bad3 100644
--- a/src/render/Glass.cpp
+++ b/src/render/Glass.cpp
@@ -424,10 +424,10 @@ CGlass::RenderEntityInGlass(CEntity *entity)
ASSERT(col!=nil);
if ( col->numTriangles >= 2 )
{
- CVector a = object->GetMatrix() * col->vertices[0];
- CVector b = object->GetMatrix() * col->vertices[1];
- CVector c = object->GetMatrix() * col->vertices[2];
- CVector d = object->GetMatrix() * col->vertices[3];
+ CVector a = object->GetMatrix() * col->vertices[0].Get();
+ CVector b = object->GetMatrix() * col->vertices[1].Get();
+ CVector c = object->GetMatrix() * col->vertices[2].Get();
+ CVector d = object->GetMatrix() * col->vertices[3].Get();
if ( object->bGlassCracked )
{
@@ -613,10 +613,10 @@ CGlass::WindowRespondsToCollision(CEntity *entity, float amount, CVector speed,
CColModel *col = object->GetColModel();
ASSERT(col!=nil);
- CVector a = object->GetMatrix() * col->vertices[0];
- CVector b = object->GetMatrix() * col->vertices[1];
- CVector c = object->GetMatrix() * col->vertices[2];
- CVector d = object->GetMatrix() * col->vertices[3];
+ CVector a = object->GetMatrix() * col->vertices[0].Get();
+ CVector b = object->GetMatrix() * col->vertices[1].Get();
+ CVector c = object->GetMatrix() * col->vertices[2].Get();
+ CVector d = object->GetMatrix() * col->vertices[3].Get();
float minx = Min(Min(a.x, b.x), Min(c.x, d.x));
float maxx = Max(Max(a.x, b.x), Max(c.x, d.x));
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index d4cea597..daafd27b 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -38,10 +38,10 @@ CRGBA TIMER_COLOR(97, 194, 247, 255);
CRGBA COUNTER_COLOR(97, 194, 247, 255);
CRGBA PAGER_COLOR(32, 162, 66, 205);
CRGBA RADARDISC_COLOR(255, 255, 255, 255);
-CRGBA BIGMESSAGE_COLOR(85, 119, 133, 255);
-CRGBA WASTEDBUSTED_COLOR(255, 150, 225, 255);
-CRGBA ODDJOB_COLOR(89, 115, 150, 255);
-CRGBA ODDJOB2_COLOR(156, 91, 40, 255);
+CRGBA BIGMESSAGE_COLOR(255, 150, 225, 255);
+CRGBA WASTEDBUSTED_COLOR(0, 207, 133, 255);
+CRGBA ODDJOB_COLOR(0, 207, 133, 255);
+CRGBA ODDJOB2_COLOR(97, 194, 247, 255);
CRGBA MISSIONTITLE_COLOR(220, 172, 2, 255);
wchar CHud::m_HelpMessage[256];
@@ -70,6 +70,8 @@ bool CHud::m_Wants_To_Draw_Hud;
bool CHud::m_Wants_To_Draw_3dMarkers;
wchar CHud::m_BigMessage[6][128];
int16 CHud::m_ItemToFlash;
+bool CHud::m_HideRadar;
+int32 CHud::m_DrawClock;
// These aren't really in CHud
float CHud::BigMessageInUse[6];
@@ -518,7 +520,6 @@ void CHud::Draw()
DrawZoneName
*/
if (m_pZoneName) {
- float fZoneAlpha = 255.0f;
if (m_pZoneName != m_pLastZoneName) {
switch (m_ZoneState) {
@@ -527,6 +528,8 @@ void CHud::Draw()
m_ZoneToPrint = m_pZoneName;
m_ZoneNameTimer = 0;
m_ZoneFadeTimer = 0;
+ if (m_VehicleState == 1 || m_VehicleState == 2)
+ m_VehicleState = 3;
break;
case 1:
case 2:
@@ -541,19 +544,20 @@ void CHud::Draw()
m_pLastZoneName = m_pZoneName;
}
+ float fZoneAlpha = 255.0f;
if (m_ZoneState) {
switch (m_ZoneState) {
case 1:
+ fZoneAlpha = 255.0f;
m_ZoneFadeTimer = 1000;
- if (m_ZoneNameTimer > 10000) {
+ if (m_ZoneNameTimer > 10000.0f) {
m_ZoneFadeTimer = 1000;
m_ZoneState = 3;
}
- fZoneAlpha = 255.0f;
break;
case 2:
m_ZoneFadeTimer += CTimer::GetTimeStepInMilliseconds();
- if (m_ZoneFadeTimer > 1000) {
+ if (m_ZoneFadeTimer > 1000.0f) {
m_ZoneState = 1;
m_ZoneFadeTimer = 1000;
}
@@ -561,7 +565,7 @@ void CHud::Draw()
break;
case 3:
m_ZoneFadeTimer -= CTimer::GetTimeStepInMilliseconds();
- if (m_ZoneFadeTimer < 0) {
+ if (m_ZoneFadeTimer < 0.0f) {
m_ZoneState = 0;
m_ZoneFadeTimer = 0;
}
@@ -569,7 +573,7 @@ void CHud::Draw()
break;
case 4:
m_ZoneFadeTimer -= CTimer::GetTimeStepInMilliseconds();
- if (m_ZoneFadeTimer < 0) {
+ if (m_ZoneFadeTimer < 0.0f) {
m_ZoneFadeTimer = 0;
m_ZoneToPrint = m_pLastZoneName;
m_ZoneState = 2;
@@ -581,11 +585,8 @@ void CHud::Draw()
}
-#ifndef HUD_ENHANCEMENTS
- if (!m_Message[0]) {
-#else
- if (!m_Message[0] && !m_BigMessage[2][0]) { // Hide zone name if wasted/busted text is displaying
-#endif
+ if (!m_Message[0] && BigMessageInUse[1] == 0.0f && BigMessageInUse[2] == 0.0f) {
+
m_ZoneNameTimer += CTimer::GetTimeStepInMilliseconds();
CFont::SetJustifyOff();
CFont::SetPropOn();
@@ -605,11 +606,14 @@ void CHud::Draw()
CFont::SetDropShadowPosition(2);
CFont::SetDropColor(CRGBA(0, 0, 0, fZoneAlpha));
CFont::SetFontStyle(FONT_BANK);
-
CFont::SetColor(CRGBA(ZONE_COLOR.r, ZONE_COLOR.g, ZONE_COLOR.b, fZoneAlpha));
- CFont::PrintStringFromBottom(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f), m_ZoneToPrint);
+
+ if (!CTheScripts::bPlayerIsInTheStatium)
+ CFont::PrintStringFromBottom(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f), m_ZoneToPrint);
CFont::SetSlant(0.f);
+ } else {
+ m_ZoneState = 3;
}
}
}
@@ -627,6 +631,8 @@ void CHud::Draw()
m_pVehicleNameToPrint = m_VehicleName;
m_VehicleNameTimer = 0;
m_VehicleFadeTimer = 0;
+ if (m_ZoneState == 1 || m_ZoneState == 2)
+ m_ZoneState = 3;
break;
case 1:
case 2:
@@ -722,23 +728,26 @@ void CHud::Draw()
/*
DrawClock
*/
- CFont::SetJustifyOff();
- CFont::SetCentreOff();
- CFont::SetBackgroundOff();
- CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y));
- CFont::SetBackGroundOnlyTextOff();
- CFont::SetPropOff();
- CFont::SetFontStyle(FONT_HEADING);
- CFont::SetRightJustifyOn();
- CFont::SetRightJustifyWrap(0.0f);
- CFont::SetDropShadowPosition(2);
- CFont::SetDropColor(CRGBA(0, 0, 0, 255));
+ if (m_DrawClock) {
+ CFont::SetJustifyOff();
+ CFont::SetCentreOff();
+ CFont::SetBackgroundOff();
+ CFont::SetScale(SCREEN_SCALE_X(HUD_TEXT_SCALE_X), SCREEN_SCALE_Y(HUD_TEXT_SCALE_Y));
+ CFont::SetBackGroundOnlyTextOff();
+ CFont::SetPropOff();
+ CFont::SetFontStyle(FONT_HEADING);
+ CFont::SetRightJustifyOn();
+ CFont::SetRightJustifyWrap(0.0f);
+ CFont::SetDropShadowPosition(2);
+ CFont::SetDropColor(CRGBA(0, 0, 0, 255));
- sprintf(sTemp, "%02d:%02d", CClock::GetHours(), CClock::GetMinutes());
- AsciiToUnicode(sTemp, sPrint);
+ sprintf(sTemp, "%02d:%02d", CClock::GetHours(), CClock::GetMinutes());
+ AsciiToUnicode(sTemp, sPrint);
- CFont::SetColor(CLOCK_COLOR);
- CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(111.0f), SCREEN_SCALE_Y(22.0f), sPrint);
+ CFont::SetColor(CLOCK_COLOR);
+ if (FrontEndMenuManager.m_PrefsShowHud)
+ CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(111.0f), SCREEN_SCALE_Y(22.0f), sPrint);
+ }
/*
DrawOnScreenTimer
@@ -902,20 +911,25 @@ void CHud::Draw()
/*
DrawRadar
*/
- if (m_ItemToFlash == ITEM_RADAR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_RADAR) {
+ if (FrontEndMenuManager.m_PrefsRadarMode != 2 &&
+ !m_HideRadar && (m_ItemToFlash == ITEM_RADAR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_RADAR)) {
+
+ RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
CRadar::DrawMap();
- CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT));
+ if (FrontEndMenuManager.m_PrefsRadarMode != 1) {
+ CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT));
#ifdef FIX_BUGS
- rect.Translate(SCREEN_SCALE_X(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
+ rect.Translate(SCREEN_SCALE_X(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
#else
- rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
+ rect.Translate(RADAR_LEFT, SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT));
#endif
- rect.Grow(6.0f);
- rect.Translate(0.0f, 2.0f);
- Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
- rect.Translate(0.0f, -2.0f);
- Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR);
+ rect.Grow(6.0f);
+ rect.Translate(0.0f, 2.0f);
+ Sprites[HUD_RADARDISC].Draw(rect, CRGBA(0, 0, 0, 255));
+ rect.Translate(0.0f, -2.0f);
+ Sprites[HUD_RADARDISC].Draw(rect, RADARDISC_COLOR);
+ }
CRadar::DrawBlips();
}
}
@@ -1005,6 +1019,11 @@ void CHud::Draw()
DrawSubtitles
*/
if (m_Message[0] && !m_BigMessage[2][0]) {
+ if (m_VehicleState != 0)
+ m_VehicleState = 3;
+ if (m_ZoneState != 0)
+ m_ZoneState = 3;
+
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
CFont::SetBackgroundColor(CRGBA(0, 0, 0, 128));
@@ -1044,6 +1063,119 @@ void CHud::Draw()
}
/*
+ HelpMessage
+ */
+
+ if (m_HelpMessage[0]) {
+ if (!CMessages::WideStringCompare(m_HelpMessage, m_LastHelpMessage, 256)) {
+ switch (m_HelpMessageState) {
+ case 0:
+ m_HelpMessageFadeTimer = 0;
+ m_HelpMessageState = 2;
+ m_HelpMessageTimer = 0;
+ CMessages::WideStringCopy(m_HelpMessageToPrint, m_HelpMessage, 256);
+ m_fHelpMessageTime = CMessages::GetWideStringLength(m_HelpMessage) * 0.05f + 3.0f;
+
+ if (TheCamera.m_ScreenReductionPercentage == 0.0f)
+ DMAudio.PlayFrontEndSound(SOUND_HUD_SOUND, 0);
+ break;
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ m_HelpMessageTimer = 5;
+ m_HelpMessageState = 4;
+ break;
+ default:
+ break;
+ }
+ CMessages::WideStringCopy(m_LastHelpMessage, m_HelpMessage, 256);
+ }
+
+ float fAlpha = 225.0f;
+
+ if (m_HelpMessageState != 0) {
+ switch (m_HelpMessageState) {
+ case 1:
+ fAlpha = 225.0f;
+ m_HelpMessageFadeTimer = 600;
+ if (m_HelpMessageTimer > m_fHelpMessageTime * 1000.0f || m_HelpMessageQuick && m_HelpMessageTimer > 1500.0f) {
+ m_HelpMessageFadeTimer = 600;
+ m_HelpMessageState = 3;
+ }
+ break;
+ case 2:
+ if (TheCamera.m_WideScreenOn)
+ break;
+
+ m_HelpMessageFadeTimer += 2 * CTimer::GetTimeStepInMilliseconds();
+ if (m_HelpMessageFadeTimer > 0) {
+ m_HelpMessageState = 1;
+ m_HelpMessageFadeTimer = 0;
+ }
+ fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
+ break;
+ case 3:
+ m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds();
+ if (m_HelpMessageFadeTimer < 0 || TheCamera.m_WideScreenOn) {
+ m_HelpMessageState = 0;
+ m_HelpMessageFadeTimer = 0;
+ }
+ fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
+ break;
+ case 4:
+ m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds();
+ if (m_HelpMessageFadeTimer < 0) {
+ m_HelpMessageState = 2;
+ m_HelpMessageFadeTimer = 0;
+ CMessages::WideStringCopy(m_HelpMessageToPrint, m_LastHelpMessage, 256);
+ }
+ fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
+ break;
+ default:
+ break;
+ }
+
+ if (!TheCamera.m_WideScreenOn) {
+ m_HelpMessageTimer += CTimer::GetTimeStepInMilliseconds();
+
+ CFont::SetAlphaFade(fAlpha);
+ CFont::SetCentreOff();
+ CFont::SetPropOn();
+
+ if (CGame::germanGame)
+ CFont::SetScale(SCREEN_SCALE_X(0.52f * 0.85f), SCREEN_SCALE_Y(1.1f * 0.85f));
+#ifdef MORE_LANGUAGES
+ else if (CFont::IsJapanese())
+ CFont::SetScale(SCREEN_SCALE_X(0.52f) * 1.35f, SCREEN_SCALE_Y(1.1f) * 1.25f);
+#endif
+ else
+ CFont::SetScale(SCREEN_SCALE_X(0.52f), SCREEN_SCALE_Y(1.1f));
+
+ CFont::DrawFonts();
+ // CFont::SetColor(CRGBA(175, 175, 175, 255));
+ CFont::SetJustifyOff();
+#ifdef MORE_LANGUAGES
+ if (CFont::IsJapanese())
+ CFont::SetWrapx(SCREEN_SCALE_X(229.0f + 34.0f - 4.0f));
+ else
+#endif
+ CFont::SetWrapx(SCREEN_SCALE_X(200.0f + 34.0f - 4.0f));
+ CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
+ CFont::SetBackgroundOn();
+ CFont::SetBackGroundOnlyTextOff();
+ CFont::SetDropShadowPosition(0);
+ CFont::SetColor(CRGBA(175, 175, 175, 255));
+ CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.9f));
+ CFont::PrintString(SCREEN_SCALE_X(34.0f), SCREEN_SCALE_Y(28.0f + (150.0f - PagerXOffset) * 0.6f), CHud::m_HelpMessageToPrint);
+ CFont::SetAlphaFade(255.0f);
+ CFont::SetWrapx(SCREEN_WIDTH);
+ }
+ }
+ } else
+ m_HelpMessageState = 0;
+
+ /*
DrawBigMessage
*/
// MissionCompleteFailedText
@@ -1052,10 +1184,15 @@ void CHud::Draw()
CFont::SetJustifyOff();
CFont::SetBackgroundOff();
CFont::SetBackGroundOnlyTextOff();
- CFont::SetScale(SCREEN_SCALE_X(1.8f), SCREEN_SCALE_Y(1.8f));
+ if (CGame::frenchGame || CGame::germanGame) {
+ CFont::SetScale(SCREEN_SCALE_X(1.6f), SCREEN_SCALE_Y(1.8f));
+ } else {
+ CFont::SetScale(SCREEN_SCALE_X(1.8f), SCREEN_SCALE_Y(1.8f));
+ }
CFont::SetPropOn();
CFont::SetCentreOn();
- CFont::SetCentreSize(SCREEN_SCALE_X(615.0f));
+ CFont::SetCentreSize(SCREEN_SCALE_X(590.0f));
+ CFont::SetColor(CRGBA(255, 255, 0, BigMessageAlpha[0])); // unused color
CFont::SetFontStyle(FONT_HEADING);
if (BigMessageX[0] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
@@ -1078,14 +1215,9 @@ void CHud::Draw()
if (BigMessageAlpha[0] > 255.0f)
BigMessageAlpha[0] = 255.0f;
}
-
- CFont::SetColor(CRGBA(0, 0, 0, BigMessageAlpha[0]));
-#ifdef FIX_BUGS
- CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(18.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[0]);
-#else
- CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[0]);
-#endif
-
+ CFont::DrawFonts();
+ CFont::SetDropShadowPosition(2);
+ CFont::SetDropColor(CRGBA(0, 0, 0, BigMessageAlpha[0]));
CFont::SetColor(CRGBA(BIGMESSAGE_COLOR.r, BIGMESSAGE_COLOR.g, BIGMESSAGE_COLOR.b, BigMessageAlpha[0]));
CFont::PrintString(SCREEN_WIDTH / 2, (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(18.0f), m_BigMessage[0]);
}
@@ -1125,8 +1257,12 @@ void CHud::Draw()
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(20.0f), SCREEN_SCALE_FROM_BOTTOM(82.0f), m_BigMessage[2]);
}
else {
- BigMessageAlpha[2] = 0.0f;
BigMessageInUse[2] = 1.0f;
+ BigMessageAlpha[2] = 0.0f;
+ if (CHud::m_VehicleState != 0)
+ CHud::m_VehicleState = 0;
+ if (CHud::m_ZoneState != 0)
+ CHud::m_ZoneState = 0;
}
}
else {
@@ -1137,108 +1273,13 @@ void CHud::Draw()
void CHud::DrawAfterFade()
{
+ RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERNEAREST);
+ RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, (void*)rwTEXTUREADDRESSCLAMP);
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
+
if (CTimer::GetIsUserPaused() || CReplay::IsPlayingBack())
return;
- if (m_HelpMessage[0]) {
- if (!CMessages::WideStringCompare(m_HelpMessage, m_LastHelpMessage, 256)) {
- switch (m_HelpMessageState) {
- case 0:
- m_HelpMessageFadeTimer = 0;
- m_HelpMessageState = 2;
- m_HelpMessageTimer = 0;
- CMessages::WideStringCopy(m_HelpMessageToPrint, m_HelpMessage, 256);
- m_fHelpMessageTime = CMessages::GetWideStringLength(m_HelpMessage) * 0.05f + 3.0f;
-
- if (TheCamera.m_ScreenReductionPercentage == 0.0f)
- DMAudio.PlayFrontEndSound(SOUND_HUD_SOUND, 0);
- break;
- case 1:
- case 2:
- case 3:
- case 4:
- m_HelpMessageTimer = 5;
- m_HelpMessageState = 4;
- break;
- default:
- break;
- }
- CMessages::WideStringCopy(m_LastHelpMessage, m_HelpMessage, 256);
- }
-
- float fAlpha = 225.0f;
-
- if (m_HelpMessageState != 0) {
- switch (m_HelpMessageState) {
- case 1:
- fAlpha = 225.0f;
- m_HelpMessageFadeTimer = 600;
- if (m_HelpMessageTimer > m_fHelpMessageTime * 1000.0f || m_HelpMessageQuick && m_HelpMessageTimer > 1500.0f) {
- m_HelpMessageFadeTimer = 600;
- m_HelpMessageState = 3;
- }
- break;
- case 2:
- m_HelpMessageFadeTimer += 2 * CTimer::GetTimeStepInMilliseconds();
- if (m_HelpMessageFadeTimer > 0) {
- m_HelpMessageState = 1;
- m_HelpMessageFadeTimer = 0;
- }
- fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
- break;
- case 3:
- m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds();
- if (m_HelpMessageFadeTimer < 0) {
- m_HelpMessageState = 0;
- m_HelpMessageFadeTimer = 0;
- }
- fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
- break;
- case 4:
- m_HelpMessageFadeTimer -= 2 * CTimer::GetTimeStepInMilliseconds();
- if (m_HelpMessageFadeTimer < 0) {
- m_HelpMessageState = 2;
- m_HelpMessageFadeTimer = 0;
- CMessages::WideStringCopy(m_HelpMessageToPrint, m_LastHelpMessage, 256);
- }
- fAlpha = m_HelpMessageFadeTimer * 0.001f * 225.0f;
- break;
- default:
- break;
- }
-
- m_HelpMessageTimer += CTimer::GetTimeStepInMilliseconds();
-
- CFont::SetAlphaFade(fAlpha);
- CFont::SetCentreOff();
- CFont::SetPropOn();
-
- if (CGame::germanGame)
- CFont::SetScale(SCREEN_SCALE_X(0.52f * 0.85f), SCREEN_SCALE_Y(1.1f * 0.85f));
-#ifdef MORE_LANGUAGES
- else if (CFont::IsJapanese())
- CFont::SetScale(SCREEN_SCALE_X(0.52f) * 1.35f, SCREEN_SCALE_Y(1.1f) * 1.25f);
-#endif
- else
- CFont::SetScale(SCREEN_SCALE_X(0.52f), SCREEN_SCALE_Y(1.1f));
-
- CFont::SetColor(CRGBA(175, 175, 175, 255));
- CFont::SetJustifyOff();
-#ifdef MORE_LANGUAGES
- if (CFont::IsJapanese())
- CFont::SetWrapx(SCREEN_SCALE_X(229.0f + 26.0f - 4.0f));
- else
-#endif
- CFont::SetWrapx(SCREEN_SCALE_X(200.0f + 26.0f - 4.0f));
- CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
- CFont::SetBackgroundOn();
- CFont::SetBackGroundOnlyTextOff();
- CFont::SetBackgroundColor(CRGBA(0, 0, 0, fAlpha * 0.9f));
- CFont::PrintString(SCREEN_SCALE_X(26.0f), SCREEN_SCALE_Y(28.0f + (150.0f - PagerXOffset) * 0.6f), CHud::m_HelpMessageToPrint);
- CFont::SetAlphaFade(255.0f);
- }
- }
-
for (int i = 0; i < ARRAY_SIZE(CTheScripts::IntroTextLines); i++) {
intro_text_line &line = CTheScripts::IntroTextLines[i];
if (line.m_Text[0] != '\0' && !line.m_bTextBeforeFade) {
@@ -1309,12 +1350,10 @@ void CHud::DrawAfterFade()
CFont::SetPropOn();
CFont::SetCentreSize(SCREEN_SCALE_X(600.0f));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
-
- CFont::SetColor(CRGBA(0, 0, 0, 255));
- CFont::PrintString((SCREEN_WIDTH / 2) + SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[3]);
-
+ CFont::SetDropShadowPosition(2);
+ CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetColor(ODDJOB_COLOR);
- CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f), m_BigMessage[3]);
+ CFont::PrintString((SCREEN_WIDTH / 2), SCREEN_SCALE_Y(140.0f) - SCREEN_SCALE_Y(16.0f), m_BigMessage[3]);
}
if (!m_BigMessage[1][0] && m_BigMessage[4][0]) {
@@ -1324,13 +1363,11 @@ void CHud::DrawAfterFade()
CFont::SetCentreOn();
CFont::SetPropOn();
CFont::SetCentreSize(SCREEN_SCALE_X(620.0f));
- CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
-
- CFont::PrintString((SCREEN_WIDTH / 2) - SCREEN_SCALE_X(2.0f), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f) - SCREEN_SCALE_Y(2.0f), m_BigMessage[4]);
-
+ CFont::SetDropShadowPosition(2);
+ CFont::SetDropColor(CRGBA(0, 0, 0, 255));
CFont::SetColor(ODDJOB_COLOR);
- CFont::PrintString((SCREEN_WIDTH / 2), (SCREEN_HEIGHT / 2) - SCREEN_SCALE_Y(84.0f), m_BigMessage[4]);
+ CFont::PrintString((SCREEN_WIDTH / 2), SCREEN_SCALE_Y(140.0f), m_BigMessage[4]);
}
// Oddjob result
@@ -1412,7 +1449,7 @@ void CHud::DrawAfterFade()
CFont::SetScale(SCREEN_SCALE_X(1.04f), SCREEN_SCALE_Y(1.6f));
CFont::SetPropOn();
- CFont::SetRightJustifyWrap(SCREEN_SCALE_X(-500.0f));
+ CFont::SetRightJustifyWrap(0.0f);
CFont::SetRightJustifyOn();
CFont::SetFontStyle(FONT_BANK);
if (BigMessageX[1] >= SCREEN_SCALE_FROM_RIGHT(20.0f)) {
@@ -1446,6 +1483,7 @@ void CHud::DrawAfterFade()
BigMessageAlpha[1] = 0.0f;
BigMessageX[1] = -60.0f;
BigMessageInUse[1] = 1.0f;
+ m_ZoneState = 0;
}
}
else {
@@ -1535,6 +1573,7 @@ void CHud::Initialise()
if (gpRocketSightTex == nil)
gpRocketSightTex = RwTextureRead("siterocket", nil);
+ m_DrawClock = 1;
CounterOnLastFrame = false;
m_ItemToFlash = ITEM_NONE;
OddJob2Timer = 0;
@@ -1570,6 +1609,7 @@ void CHud::Initialise()
m_WeaponFadeTimer = 0;
m_WeaponTimer = 0;
+ m_HideRadar = false;
m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney;
m_LastWanted = 0;
@@ -1584,6 +1624,7 @@ void CHud::ReInitialise() {
CounterOnLastFrame = false;
m_ItemToFlash = ITEM_NONE;
+ m_DrawClock = 1;
OddJob2Timer = 0;
OddJob2OffTimer = 0.0f;
OddJob2On = 0;
@@ -1617,6 +1658,7 @@ void CHud::ReInitialise() {
m_WeaponFadeTimer = 0;
m_WeaponTimer = 0;
+ m_HideRadar = false;
m_LastDisplayScore = CWorld::Players[CWorld::PlayerInFocus].m_nVisibleMoney;
m_LastWanted = 0;
}
diff --git a/src/render/Hud.h b/src/render/Hud.h
index f8ca4f6d..9106f6fa 100644
--- a/src/render/Hud.h
+++ b/src/render/Hud.h
@@ -85,6 +85,8 @@ public:
static bool m_Wants_To_Draw_3dMarkers;
static wchar m_BigMessage[6][128];
static int16 m_ItemToFlash;
+ static bool m_HideRadar;
+ static int32 m_DrawClock;
// These aren't really in CHud
static float BigMessageInUse[6];
diff --git a/src/render/MBlur.cpp b/src/render/MBlur.cpp
index e7e2e74c..568a0bc1 100644
--- a/src/render/MBlur.cpp
+++ b/src/render/MBlur.cpp
@@ -1,5 +1,11 @@
#define WITHWINDOWS
+#ifndef LIBRW
+#define WITHD3D
+#endif
#include "common.h"
+#ifndef LIBRW
+#include <d3d8caps.h>
+#endif
#include "RwHelper.h"
#include "Camera.h"
@@ -18,6 +24,9 @@ static RwIm2DVertex Vertex[4];
static RwIm2DVertex Vertex2[4];
static RwImVertexIndex Index[6] = { 0, 1, 2, 0, 2, 3 };
+#ifndef LIBRW
+extern "C" D3DCAPS8 _RwD3D8DeviceCaps;
+#endif
RwBool
CMBlur::MotionBlurOpen(RwCamera *cam)
{
@@ -65,12 +74,11 @@ CMBlur::MotionBlurOpen(RwCamera *cam)
if(BlurOn)
{
- int32 width = Pow(2.0f, int32(log2(RwRasterGetWidth (RwCameraGetRaster(cam))))+1);
- int32 height = Pow(2.0f, int32(log2(RwRasterGetHeight(RwCameraGetRaster(cam))))+1);
- int32 depth = RwRasterGetDepth(RwCameraGetRaster(cam));
+ uint32 width = Pow(2.0f, int32(log2(RwRasterGetWidth (RwCameraGetRaster(cam))))+1);
+ uint32 height = Pow(2.0f, int32(log2(RwRasterGetHeight(RwCameraGetRaster(cam))))+1);
+ uint32 depth = RwRasterGetDepth(RwCameraGetRaster(cam));
#ifndef LIBRW
- extern D3DCAPS8 _RwD3D8DeviceCaps;
extern DWORD _dwMemTotalVideo;
if ( _RwD3D8DeviceCaps.MaxTextureWidth >= width && _RwD3D8DeviceCaps.MaxTextureHeight >= height )
{
diff --git a/src/render/Occlusion.cpp b/src/render/Occlusion.cpp
index 1c4e4266..c2f220e9 100644
--- a/src/render/Occlusion.cpp
+++ b/src/render/Occlusion.cpp
@@ -1,13 +1,35 @@
#include "common.h"
+#include "main.h"
#include "Occlusion.h"
+#include "Game.h"
+#include "Camera.h"
+#include "Vector.h"
+#include "Draw.h"
+#include "Timer.h"
+#include "RwHelper.h"
int32 COcclusion::NumOccludersOnMap;
int16 COcclusion::FarAwayList;
int16 COcclusion::NearbyList;
int16 COcclusion::ListWalkThroughFA;
int16 COcclusion::PreviousListWalkThroughFA;
+int16 COcclusion::NumActiveOccluders;
COccluder COcclusion::aOccluders[NUMOCCLUSIONVOLUMES];
+CActiveOccluder COcclusion::aActiveOccluders[NUMACTIVEOCCLUDERS];
+
+CVector gCenterOnScreen;
+
+float gMinYInOccluder;
+float gMinXInOccluder;
+float gMaxYInOccluder;
+float gMaxXInOccluder;
+
+bool gOccluderCoorsValid[8];
+CVector gOccluderCoorsOnScreen[8];
+CVector gOccluderCoors[8];
+
+bool bDisplayOccDebugStuff;
void
COcclusion::Init(void)
@@ -17,6 +39,7 @@ COcclusion::Init(void)
NearbyList = -1;
ListWalkThroughFA = -1;
PreviousListWalkThroughFA = -1;
+ bDisplayOccDebugStuff = false;
}
void
@@ -33,12 +56,423 @@ COcclusion::AddOne(float x, float y, float z, float width, float length, float h
aOccluders[NumOccludersOnMap].height = height;
while(angle < 0.0f) angle += 360.0f;
while(angle > 360.0f) angle -= 360.0f;
- aOccluders[NumOccludersOnMap].angle = angle * UINT16_MAX/360.0f;
+ aOccluders[NumOccludersOnMap].angle = angle/360.0f * UINT16_MAX;
aOccluders[NumOccludersOnMap].listIndex = FarAwayList;
FarAwayList = NumOccludersOnMap++;
}
+bool
+COccluder::NearCamera() {
+ return (TheCamera.GetPosition() - CVector(x, y, z)).Magnitude() - (Max(width, length) / 2.0f) < 250.0f;
+}
+
+bool
+DoesInfiniteLineCrossFiniteLine(float p1X, float p1Y, float p2X, float p2Y, float lineX, float lineY, float lineDX, float lineDY)
+{
+ float side1 = (p1X - lineX) * lineDY - (p1Y - lineY) * lineDX;
+ float side2 = (p2X - lineX) * lineDY - (p2Y - lineY) * lineDX;
+ return side1 * side2 < 0.0f; // if points lie on opposite sides of the infinte line, the line between them crosses it
+}
+
+bool DoesInfiniteLineTouchScreen(float lineX, float lineY, float lineDX, float lineDY) {
+ if (lineX > 0.0f && lineY > 0.0f && SCREEN_WIDTH > lineX && SCREEN_HEIGHT > lineY)
+ return true;
+
+ return (DoesInfiniteLineCrossFiniteLine(0.0f, 0.0f, SCREEN_WIDTH, 0.0f, lineX, lineY, lineDX, lineDY) ||
+ DoesInfiniteLineCrossFiniteLine(0.0f, 0.0f, 0.0f, SCREEN_HEIGHT, lineX, lineY, lineDX, lineDY) ||
+ DoesInfiniteLineCrossFiniteLine(SCREEN_WIDTH, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, lineX, lineY, lineDX, lineDY) ||
+ DoesInfiniteLineCrossFiniteLine(0.0f, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT, lineX, lineY, lineDX, lineDY));
+}
+
+bool IsPointInsideLine(float lineX, float lineY, float lineDX, float lineDY, float pX, float pY, float area = 0.0f) {
+ return (pX - lineX) * lineDY - (pY - lineY) * lineDX >= area;
+}
+
+bool CalcScreenCoors(CVector const &in, CVector *out, float *outw, float *outh) {
+ *out = TheCamera.m_viewMatrix * in;
+
+ if (out->z <= 1.0f) return false;
+
+ float recip = 1.0f / out->z;
+ out->x *= SCREEN_WIDTH * recip;
+ out->y *= SCREEN_HEIGHT * recip;
+
+ float fovScale = DefaultFOV / CDraw::GetFOV();
+
+ *outw = fovScale * recip * SCREEN_WIDTH;
+ *outh = fovScale * recip * SCREEN_HEIGHT;
+
+ return true;
+}
+
+bool CalcScreenCoors(CVector const &in, CVector *out) {
+ *out = TheCamera.m_viewMatrix * in;
+
+ if (out->z <= 1.0f) return false;
+
+ float recip = 1.0f / out->z;
+ out->x *= SCREEN_WIDTH * recip;
+ out->y *= SCREEN_HEIGHT * recip;
+
+ return true;
+}
+
+bool
+COccluder::ProcessLineSegment(int corner1, int corner2, CActiveOccluder *occl) {
+ if (!gOccluderCoorsValid[corner1] && !gOccluderCoorsValid[corner2])
+ return false;
+
+ float x1, y1, x2, y2;
+
+ CVector p1, p2;
+ if (!gOccluderCoorsValid[corner1]) {
+ float clipDist1 = Abs((TheCamera.m_viewMatrix * gOccluderCoors[corner1]).z - 1.1f);
+ float clipDist2 = Abs((TheCamera.m_viewMatrix * gOccluderCoors[corner2]).z - 1.1f);
+ float ratio = clipDist2 / (clipDist1 + clipDist2);
+ CVector clippedCoors = (1.0f - ratio) * gOccluderCoors[corner2] + ratio * gOccluderCoors[corner1];
+
+ if (!CalcScreenCoors(clippedCoors, &p1, &x1, &y1))
+ return true;
+ }
+ else {
+ p1 = gOccluderCoorsOnScreen[corner1];
+ }
+
+ if (!gOccluderCoorsValid[corner2]) {
+ float clipDist1 = Abs((TheCamera.m_viewMatrix * gOccluderCoors[corner1]).z - 1.1f);
+ float clipDist2 = Abs((TheCamera.m_viewMatrix * gOccluderCoors[corner2]).z - 1.1f);
+ float ratio = clipDist1 / (clipDist1 + clipDist2);
+ CVector clippedCoors = (1.0f - ratio) * gOccluderCoors[corner2] + ratio * gOccluderCoors[corner1];
+
+ if (!CalcScreenCoors(clippedCoors, &p2, &x2, &y2))
+ return true;
+ }
+ else {
+ p2 = gOccluderCoorsOnScreen[corner2];
+ }
+
+ gMinXInOccluder = Min(Min(gMinXInOccluder, p1.x), p2.x);
+ gMaxXInOccluder = Max(Max(gMaxXInOccluder, p1.x), p2.x);
+ gMinYInOccluder = Min(Min(gMinYInOccluder, p1.y), p2.y);
+ gMaxYInOccluder = Max(Max(gMaxYInOccluder, p1.y), p2.y);
+
+ CVector2D origin = p1;
+ CVector2D direction = p2 - p1;
+
+ // Make sure lines are counter-clockwise around center
+ if (!IsPointInsideLine(origin.x, origin.y, direction.x, direction.y, gCenterOnScreen.x, gCenterOnScreen.y, 0.0f)) {
+ origin += direction;
+ direction *= -1.0f;
+ }
+
+ float magnitude = direction.Magnitude();
+
+ occl->lines[occl->linesCount].origin = origin;
+ occl->lines[occl->linesCount].direction = direction / magnitude;
+ occl->lines[occl->linesCount].length = magnitude;
+
+ if (!DoesInfiniteLineTouchScreen(origin.x, origin.y, direction.x, direction.y))
+ return !IsPointInsideLine(origin.x, origin.y, direction.x, direction.y, SCREEN_WIDTH / 2.0f, SCREEN_HEIGHT / 2.0f, 0.0f);
+
+ occl->linesCount++;
+
+ return false;
+}
+
+bool
+COccluder::ProcessOneOccluder(CActiveOccluder *occl) {
+ float outX, outY;
+
+ occl->linesCount = 0;
+ CVector pos(x, y, z);
+
+ if (!CalcScreenCoors(pos, &gCenterOnScreen, &outX, &outY) || gCenterOnScreen.z < -150.0f || gCenterOnScreen.z > 300.0f) {
+ return false;
+ }
+
+ occl->radius = Max(width, length) * 0.35f + gCenterOnScreen.z;
+
+ CVector vec[3];
+
+ vec[0].x = length / 2.0f * Sin(GetAngle());
+ vec[0].y = -length / 2.0f * Cos(GetAngle());
+ vec[0].z = 0.0f;
+
+ vec[1].x = width / 2.0f * Cos(GetAngle());
+ vec[1].y = width / 2.0f * Sin(GetAngle());
+ vec[1].z = 0.0f;
+
+ vec[2].x = 0.0f;
+ vec[2].y = 0.0f;
+ vec[2].z = height / 2.0f;
+
+ // Figure out if we see the front or back of a face
+ bool bFrontFace[6];
+ for (int i = 0; i < 3; i++) {
+ bFrontFace[i*2+0] = DotProduct((pos + vec[i] - TheCamera.GetPosition()), vec[i]) < 0.0f;
+ bFrontFace[i*2+1] = DotProduct((pos - vec[i] - TheCamera.GetPosition()), -vec[i]) < 0.0f;
+ }
+
+ //calculating vertices of a box
+ gOccluderCoors[0] = pos + vec[0] + vec[1] + vec[2];
+ gOccluderCoors[1] = pos - vec[0] + vec[1] + vec[2];
+ gOccluderCoors[2] = pos + vec[0] - vec[1] + vec[2];
+ gOccluderCoors[3] = pos - vec[0] - vec[1] + vec[2];
+ gOccluderCoors[4] = pos + vec[0] + vec[1] - vec[2];
+ gOccluderCoors[5] = pos - vec[0] + vec[1] - vec[2];
+ gOccluderCoors[6] = pos + vec[0] - vec[1] - vec[2];
+ gOccluderCoors[7] = pos - vec[0] - vec[1] - vec[2];
+
+ for(int i = 0; i < 8; i++)
+ gOccluderCoorsValid[i] = CalcScreenCoors(gOccluderCoors[i], &gOccluderCoorsOnScreen[i], &outX, &outY);
+
+ gMinYInOccluder = 999999.875f;
+ gMinXInOccluder = 999999.875f;
+ gMaxYInOccluder = -999999.875f;
+ gMaxXInOccluder = -999999.875f;
+
+ // Between two differently facing sides we see an edge, so process those
+ if (bFrontFace[2] != bFrontFace[0] && ProcessLineSegment(0, 4, occl))
+ return false;
+ if (bFrontFace[3] != bFrontFace[0] && ProcessLineSegment(2, 6, occl))
+ return false;
+ if (bFrontFace[4] != bFrontFace[0] && ProcessLineSegment(0, 2, occl))
+ return false;
+ if (bFrontFace[5] != bFrontFace[0] && ProcessLineSegment(4, 6, occl))
+ return false;
+ if (bFrontFace[2] != bFrontFace[1] && ProcessLineSegment(1, 5, occl))
+ return false;
+ if (bFrontFace[3] != bFrontFace[1] && ProcessLineSegment(3, 7, occl))
+ return false;
+ if (bFrontFace[4] != bFrontFace[1] && ProcessLineSegment(1, 3, occl))
+ return false;
+ if (bFrontFace[5] != bFrontFace[1] && ProcessLineSegment(5, 7, occl))
+ return false;
+ if (bFrontFace[4] != bFrontFace[2] && ProcessLineSegment(0, 1, occl))
+ return false;
+ if (bFrontFace[3] != bFrontFace[4] && ProcessLineSegment(2, 3, occl))
+ return false;
+ if (bFrontFace[5] != bFrontFace[3] && ProcessLineSegment(6, 7, occl))
+ return false;
+ if (bFrontFace[2] != bFrontFace[5] && ProcessLineSegment(4, 5, occl))
+ return false;
+
+ if (gMaxXInOccluder - gMinXInOccluder < SCREEN_WIDTH * 0.1f ||
+ gMaxYInOccluder - gMinYInOccluder < SCREEN_HEIGHT * 0.07f)
+ return false;
+
+ return true;
+}
+
+bool
+COcclusion::OccluderHidesBehind(CActiveOccluder *occl1, CActiveOccluder *occl2) {
+ for (int i = 0; i < occl1->linesCount; i++) {
+ for (int j = 0; j < occl2->linesCount; j++) {
+ if (!IsPointInsideLine(occl2->lines[j].origin.x, occl2->lines[j].origin.y, occl2->lines[j].direction.x,
+ occl2->lines[j].direction.y, occl1->lines[i].origin.x, occl1->lines[i].origin.y, 0.0f))
+ return false;
+
+
+ if (!IsPointInsideLine(occl2->lines[j].origin.x, occl2->lines[j].origin.y, occl2->lines[j].direction.x,
+ occl2->lines[j].direction.y, (occl1->lines[i].origin.x + occl1->lines[i].direction.x * occl1->lines[i].length),
+ (occl1->lines[i].origin.y + occl1->lines[i].direction.y * occl1->lines[i].length), 0.0f))
+ return false;
+ }
+ }
+
+ return true;
+}
+
void
COcclusion::ProcessBeforeRendering(void)
{
+ NumActiveOccluders = 0;
+
+ if (CGame::currArea != AREA_MAIN_MAP)
+ return;
+
+ if (ListWalkThroughFA == -1) {
+ PreviousListWalkThroughFA = -1;
+ ListWalkThroughFA = FarAwayList;
+ }
+
+ int i;
+ for (i = 0; i < 16 && ListWalkThroughFA != -1; i++) {
+ if (aOccluders[ListWalkThroughFA].NearCamera()) {
+ int prevListWalkThroughFA = ListWalkThroughFA;
+
+ if (PreviousListWalkThroughFA == -1) {
+ FarAwayList = aOccluders[ListWalkThroughFA].listIndex;
+ }
+ else {
+ aOccluders[PreviousListWalkThroughFA].listIndex = aOccluders[ListWalkThroughFA].listIndex;
+ }
+
+ int prevNearbyList = NearbyList;
+ ListWalkThroughFA = aOccluders[ListWalkThroughFA].listIndex;
+ NearbyList = prevListWalkThroughFA;
+ aOccluders[prevListWalkThroughFA].listIndex = prevNearbyList;
+ }
+ else {
+ PreviousListWalkThroughFA = ListWalkThroughFA;
+ ListWalkThroughFA = aOccluders[ListWalkThroughFA].listIndex;
+ }
+ }
+
+ int prevNearbyList = -1;
+ int tmpNearbyList = NearbyList;
+ int indexTmpNearbyList, storeTmpNearbyList, prevFarAwayList;
+ while (tmpNearbyList != -1)
+ {
+ if (NumActiveOccluders < NUMACTIVEOCCLUDERS && aOccluders[tmpNearbyList].ProcessOneOccluder(&aActiveOccluders[NumActiveOccluders]))
+ ++NumActiveOccluders;
+
+ indexTmpNearbyList = tmpNearbyList;
+ if (aOccluders[indexTmpNearbyList].NearCamera())
+ {
+ prevNearbyList = tmpNearbyList;
+ tmpNearbyList = aOccluders[indexTmpNearbyList].listIndex;
+
+ }
+ else
+ {
+ storeTmpNearbyList = tmpNearbyList;
+ if (prevNearbyList == -1) {
+ NearbyList = aOccluders[indexTmpNearbyList].listIndex;
+ }
+ else {
+ aOccluders[prevNearbyList].listIndex = aOccluders[indexTmpNearbyList].listIndex;
+ }
+ tmpNearbyList = aOccluders[indexTmpNearbyList].listIndex;
+ prevFarAwayList = FarAwayList;
+ FarAwayList = storeTmpNearbyList;
+ aOccluders[storeTmpNearbyList].listIndex = prevFarAwayList;
+ }
+ }
+
+ for (i = 0; i < NumActiveOccluders; i++) {
+ for (int j = 0; j < NumActiveOccluders; j++) {
+ if (i != j && aActiveOccluders[j].radius < aActiveOccluders[i].radius) {
+ if (OccluderHidesBehind(&aActiveOccluders[i], &aActiveOccluders[j])) {
+ for (int k = i; k < NumActiveOccluders - 1; k++) {
+ for (int l = 0; l < aActiveOccluders[k + 1].linesCount; l++)
+ aActiveOccluders[k].lines[l] = aActiveOccluders[k + 1].lines[l];
+ aActiveOccluders[k].linesCount = aActiveOccluders[k + 1].linesCount;
+ aActiveOccluders[k].radius = aActiveOccluders[k + 1].radius;
+ }
+ NumActiveOccluders--;
+ i--;
+ }
+ }
+ }
+ }
+}
+
+bool CActiveOccluder::IsPointWithinOcclusionArea(float pX, float pY, float area) {
+ for (int i = 0; i < linesCount; i++) {
+ if (!IsPointInsideLine(lines[i].origin.x, lines[i].origin.y, lines[i].direction.x, lines[i].direction.y, pX, pY, area))
+ return false;
+ }
+
+ return true;
+}
+
+bool COcclusion::IsAABoxOccluded(CVector pos, float width, float length, float height) {
+
+ CVector coors;
+ float outW, outH;
+
+ if (!NumActiveOccluders || !CalcScreenCoors(pos, &coors, &outW, &outH))
+ return false;
+
+ float side = CVector(width, length, height).Magnitude() / 4.0f;
+ float area = Max(outW, outH) * side;
+
+ CVector minCorner, maxCorner;
+
+ minCorner.x = pos.x - width / 2.0f;
+ minCorner.y = pos.y - length / 2.0f;
+ minCorner.z = pos.z - height / 2.0f;
+
+ maxCorner.x = pos.x + width / 2.0f;
+ maxCorner.y = pos.y + length / 2.0f;
+ maxCorner.z = pos.z + height / 2.0f;
+
+ for (int i = 0; i < NumActiveOccluders; i++) {
+ if (coors.z - (side * 0.85f) > aActiveOccluders[i].radius) {
+ if (aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, area))
+ return true;
+
+ if (aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) {
+ if (CalcScreenCoors(minCorner, &coors) && !aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+ if (CalcScreenCoors(CVector(maxCorner.x, maxCorner.y, minCorner.z), &coors) && !aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+ if (CalcScreenCoors(CVector(maxCorner.x, minCorner.y, maxCorner.z), &coors) && !aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+ if (CalcScreenCoors(CVector(minCorner.x, maxCorner.y, maxCorner.z), &coors, &outW, &outH) && !aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, 0.0f)) continue;
+
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+bool COcclusion::IsPositionOccluded(CVector pos, float side) {
+
+ CVector coors;
+ float width, height;
+
+ if (!NumActiveOccluders || !CalcScreenCoors(pos, &coors, &width, &height))
+ return false;
+
+ float area = Max(width, height) * side;
+
+ for (int i = 0; i < NumActiveOccluders; i++) {
+ if (coors.z - (side * 0.85f) > aActiveOccluders[i].radius)
+ if (aActiveOccluders[i].IsPointWithinOcclusionArea(coors.x, coors.y, area))
+ return true;
+ }
+
+ return false;
+}
+
+#include "Lines.h"
+
+RwIm2DVertex vertexbufferT[2];
+
+void COcclusion::Render() {
+ if (!bDisplayOccDebugStuff || !(CTimer::GetTimeInMilliseconds() & 0x200))
+ return;
+
+ RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATEZTESTENABLE, FALSE);
+ RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
+ RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE);
+ RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE);
+ RwRenderStateSet(rwRENDERSTATETEXTURERASTER, FALSE);
+
+ float recipz = 1.0f/RwCameraGetNearClipPlane(Scene.camera);
+ for (int i = 0; i < NumActiveOccluders; i++) {
+ for (int j = 0; j < aActiveOccluders[i].linesCount; j++) {
+ RwIm2DVertexSetScreenX(&vertexbufferT[0], aActiveOccluders[i].lines[j].origin.x);
+ RwIm2DVertexSetScreenY(&vertexbufferT[0], aActiveOccluders[i].lines[j].origin.y);
+ RwIm2DVertexSetScreenZ(&vertexbufferT[0], RwIm2DGetNearScreenZ());
+ RwIm2DVertexSetCameraZ(&vertexbufferT[0], RwCameraGetNearClipPlane(Scene.camera));
+ RwIm2DVertexSetRecipCameraZ(&vertexbufferT[0], recipz);
+
+ RwIm2DVertexSetScreenX(&vertexbufferT[1],
+ aActiveOccluders[i].lines[j].origin.x + aActiveOccluders[i].lines[j].direction.x * aActiveOccluders[i].lines[j].length);
+ RwIm2DVertexSetScreenY(&vertexbufferT[1],
+ aActiveOccluders[i].lines[j].origin.y + aActiveOccluders[i].lines[j].direction.y * aActiveOccluders[i].lines[j].length);
+ RwIm2DVertexSetScreenZ(&vertexbufferT[1], RwIm2DGetNearScreenZ());
+ RwIm2DVertexSetCameraZ(&vertexbufferT[1], RwCameraGetNearClipPlane(Scene.camera));
+ RwIm2DVertexSetRecipCameraZ(&vertexbufferT[1], recipz);
+
+ RwIm2DVertexSetIntRGBA(&vertexbufferT[0], 255, 255, 0, 255);
+ RwIm2DVertexSetIntRGBA(&vertexbufferT[1], 255, 255, 0, 255);
+ RwIm2DRenderLine(vertexbufferT, 2, 0, 1);
+ }
+ }
+
+ DefinedState();
}
diff --git a/src/render/Occlusion.h b/src/render/Occlusion.h
index 0d3e26e9..9a415f88 100644
--- a/src/render/Occlusion.h
+++ b/src/render/Occlusion.h
@@ -1,12 +1,33 @@
#pragma once
+struct ActiveOccluderLine {
+ CVector2D origin;
+ CVector2D direction;
+ float length;
+};
+
+class CActiveOccluder {
+
+public:
+ ActiveOccluderLine lines[6];
+ int32 linesCount;
+ float radius;
+
+ bool IsPointWithinOcclusionArea(float x, float y, float area);
+};
+
class COccluder
{
public:
- int16 width, length, height;
+ int16 length, width, height;
int16 x, y, z;
uint16 angle;
int16 listIndex;
+
+ bool NearCamera();
+ bool ProcessOneOccluder(CActiveOccluder *occl);
+ bool ProcessLineSegment(int corner1, int corner2, CActiveOccluder* occl);
+ float GetAngle(void) { return angle*TWOPI/UINT16_MAX; }
};
class COcclusion
@@ -17,13 +38,21 @@ public:
static int16 NearbyList;
static int16 ListWalkThroughFA;
static int16 PreviousListWalkThroughFA;
+ static int16 NumActiveOccluders;
static COccluder aOccluders[NUMOCCLUSIONVOLUMES];
+ static CActiveOccluder aActiveOccluders[NUMACTIVEOCCLUDERS];
static void Init(void);
static void AddOne(float x, float y, float z, float width, float length, float height, float angle);
- static void ProcessBeforeRendering(void);
-
- //TODO:
- static bool IsAABoxOccluded(CVector pos, float, float, float) { return false; }
+ static void ProcessBeforeRendering(void);
+ static bool OccluderHidesBehind(CActiveOccluder *occl1, CActiveOccluder *occl2);
+ static bool IsAABoxOccluded(CVector pos, float width, float length, float height);
+ static bool IsPositionOccluded(CVector pos, float side);
+ static void Render();
};
+
+bool CalcScreenCoors(CVector const &in, CVector *out, float *outw, float *outh);
+bool CalcScreenCoors(CVector const &in, CVector *out);
+
+extern bool bDisplayOccDebugStuff;
diff --git a/src/render/Particle.h b/src/render/Particle.h
index f2c3a459..9c496fe1 100644
--- a/src/render/Particle.h
+++ b/src/render/Particle.h
@@ -98,5 +98,6 @@ public:
};
extern bool clearWaterDrop;
+extern int32 numWaterDropOnScreen;
VALIDATE_SIZE(CParticle, 0x58);
diff --git a/src/render/RenderBuffer.cpp b/src/render/RenderBuffer.cpp
index 5239dc06..687cc76b 100644
--- a/src/render/RenderBuffer.cpp
+++ b/src/render/RenderBuffer.cpp
@@ -5,8 +5,7 @@
int32 TempBufferVerticesStored;
int32 TempBufferIndicesStored;
-RwIm2DVertex TempVertexBuffer[TEMPBUFFERVERTSIZE];
-RwIm3DVertex *TempBufferRenderVertices = (RwIm3DVertex * )TempVertexBuffer;
+VertexBufferUnion TempVertexBuffer;
RwImVertexIndex TempBufferRenderIndexList[TEMPBUFFERINDEXSIZE];
int RenderBuffer::VerticesToBeStored;
diff --git a/src/render/RenderBuffer.h b/src/render/RenderBuffer.h
index e67a28d0..a0f3e7b9 100644
--- a/src/render/RenderBuffer.h
+++ b/src/render/RenderBuffer.h
@@ -12,8 +12,14 @@ public:
#define TEMPBUFFERVERTSIZE 512
#define TEMPBUFFERINDEXSIZE 1024
+struct VertexBufferUnion
+{
+ RwIm2DVertex im2d[TEMPBUFFERVERTSIZE];
+ RwIm3DVertex im3d[TEMPBUFFERVERTSIZE];
+};
+
extern int32 TempBufferVerticesStored;
extern int32 TempBufferIndicesStored;
-extern RwIm2DVertex TempVertexBuffer[TEMPBUFFERVERTSIZE];
-extern RwIm3DVertex *TempBufferRenderVertices;
+extern VertexBufferUnion TempVertexBuffer;
+#define TempBufferRenderVertices (TempVertexBuffer.im3d)
extern RwImVertexIndex TempBufferRenderIndexList[TEMPBUFFERINDEXSIZE]; \ No newline at end of file
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index becac84d..0640f25e 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -317,7 +317,11 @@ enum Visbility
VIS_STREAMME
};
+#ifdef FIX_BUGS
+#define LOD_DISTANCE (300.0f*TheCamera.LODDistMultiplier)
+#else
#define LOD_DISTANCE 300.0f
+#endif
#define FADE_DISTANCE 20.0f
#define STREAM_DISTANCE 30.0f
@@ -419,6 +423,8 @@ CRenderer::SetupEntityVisibility(CEntity *ent)
// whose draw dist is > LOD_DISTANCE-FADE_DISTANCE, i.e. 280
// because decreasing dist here makes the object visible above LOD_DISTANCE
// before fading normally once below LOD_DISTANCE.
+ // aha! this must be a workaround for the fact that we're not taking
+ // the LOD multiplier into account here anywhere
if(LOD_DISTANCE < dist && dist < mi->GetLargestLodDistance() + FADE_DISTANCE)
dist += mi->GetLargestLodDistance() - LOD_DISTANCE;
#endif
@@ -751,14 +757,7 @@ CRenderer::ScanWorld(void)
}else
#endif
{
- if(f <= LOD_DISTANCE){
- poly[0].x = CWorld::GetSectorX(vectors[CORNER_CAM].x);
- poly[0].y = CWorld::GetSectorY(vectors[CORNER_CAM].y);
- poly[1].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPLEFT].x);
- poly[1].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPLEFT].y);
- poly[2].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPRIGHT].x);
- poly[2].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPRIGHT].y);
- }else{
+ if(f > LOD_DISTANCE){
// priority
poly[0].x = CWorld::GetSectorX(vectors[CORNER_CAM].x);
poly[0].y = CWorld::GetSectorY(vectors[CORNER_CAM].y);
@@ -775,11 +774,19 @@ CRenderer::ScanWorld(void)
poly[1].y = CWorld::GetSectorY(vectors[CORNER_LOD_LEFT].y);
poly[2].x = CWorld::GetSectorX(vectors[CORNER_LOD_RIGHT].x);
poly[2].y = CWorld::GetSectorY(vectors[CORNER_LOD_RIGHT].y);
+ ScanSectorPoly(poly, 3, ScanSectorList);
+ }else{
+ poly[0].x = CWorld::GetSectorX(vectors[CORNER_CAM].x);
+ poly[0].y = CWorld::GetSectorY(vectors[CORNER_CAM].y);
+ poly[1].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPLEFT].x);
+ poly[1].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPLEFT].y);
+ poly[2].x = CWorld::GetSectorX(vectors[CORNER_FAR_TOPRIGHT].x);
+ poly[2].y = CWorld::GetSectorY(vectors[CORNER_FAR_TOPRIGHT].y);
+ ScanSectorPoly(poly, 3, ScanSectorList);
}
- ScanSectorPoly(poly, 3, ScanSectorList);
ScanBigBuildingList(CWorld::GetBigBuildingList(CGame::currLevel));
- ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_NONE));
+ ScanBigBuildingList(CWorld::GetBigBuildingList(LEVEL_GENERIC));
}
}
}
@@ -922,9 +929,9 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
// prestep x1 and x2 to next integer y
deltaA = CalcNewDelta(&poly[a1], &poly[a2]);
- xA = deltaA * (ceilf(poly[a1].y) - poly[a1].y) + poly[a1].x;
+ xA = deltaA * (Ceil(poly[a1].y) - poly[a1].y) + poly[a1].x;
deltaB = CalcNewDelta(&poly[b1], &poly[b2]);
- xB = deltaB * (ceilf(poly[b1].y) - poly[b1].y) + poly[b1].x;
+ xB = deltaB * (Ceil(poly[b1].y) - poly[b1].y) + poly[b1].x;
if(y != yend){
if(deltaB < 0.0f && (int)xB < xstart)
@@ -969,7 +976,7 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
xstart = poly[b1].x;
}while(y == (int)poly[b2].y);
deltaB = CalcNewDelta(&poly[b1], &poly[b2]);
- xB = deltaB * (ceilf(poly[b1].y) - poly[b1].y) + poly[b1].x;
+ xB = deltaB * (Ceil(poly[b1].y) - poly[b1].y) + poly[b1].x;
if(deltaB < 0.0f && (int)xB < xstart)
xstart = xB;
}
@@ -1005,7 +1012,7 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
xend = poly[a1].x;
}while(y == (int)poly[a2].y);
deltaA = CalcNewDelta(&poly[a1], &poly[a2]);
- xA = deltaA * (ceilf(poly[a1].y) - poly[a1].y) + poly[a1].x;
+ xA = deltaA * (Ceil(poly[a1].y) - poly[a1].y) + poly[a1].x;
if(deltaA >= 0.0f && (int)xA > xend)
xend = xA;
}
diff --git a/src/render/Rubbish.h b/src/render/Rubbish.h
index 2be592fe..52050e20 100644
--- a/src/render/Rubbish.h
+++ b/src/render/Rubbish.h
@@ -49,3 +49,5 @@ public:
static void Init(void);
static void Shutdown(void);
};
+
+extern RwTexture *gpRubbishTexture[4];
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp
index a6d2db7b..f26f8e63 100644
--- a/src/render/Sprite.cpp
+++ b/src/render/Sprite.cpp
@@ -29,11 +29,7 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
float recip = 1.0f/out->z;
out->x *= SCREEN_WIDTH * recip;
out->y *= SCREEN_HEIGHT * recip;
-#ifdef ASPECT_RATIO_SCALE
- float fov = CDraw::ConvertFOV(DefaultFOV);
-#else
const float fov = DefaultFOV;
-#endif
// this is used to scale correctly if you zoom in with sniper rifle
float fovScale = fov / CDraw::GetFOV();
diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp
index bf39d15e..cba64e7a 100644
--- a/src/render/Sprite2d.cpp
+++ b/src/render/Sprite2d.cpp
@@ -432,7 +432,7 @@ void CSprite2d::Draw2DPolygon(float x1, float y1, float x2, float y2, float x3,
void
CSprite2d::AddToBuffer(const CRect &r, const CRGBA &c, float u0, float v0, float u1, float v1, float u3, float v3, float u2, float v2)
{
- SetVertices(&TempVertexBuffer[nextBufferVertex], r, c, c, c, c, u0, v0, u1, v1, u3, v3, u2, v2);
+ SetVertices(&TempVertexBuffer.im2d[nextBufferVertex], r, c, c, c, c, u0, v0, u1, v1, u3, v3, u2, v2);
RwImVertexIndex *pIndexList = &TempBufferRenderIndexList[nextBufferIndex];
pIndexList[0] = nextBufferVertex;
pIndexList[1] = nextBufferVertex + 1;
@@ -449,7 +449,7 @@ CSprite2d::AddToBuffer(const CRect &r, const CRGBA &c, float u0, float v0, float
bool
CSprite2d::IsVertexBufferFull()
{
- return (nextBufferVertex > ARRAY_SIZE(TempVertexBuffer)-128-4 || nextBufferIndex > ARRAY_SIZE(TempBufferRenderIndexList)-6);
+ return (nextBufferVertex > TEMPBUFFERVERTSIZE-128-4 || nextBufferIndex > ARRAY_SIZE(TempBufferRenderIndexList)-6);
}
void
@@ -457,7 +457,7 @@ CSprite2d::RenderVertexBuffer()
{
if (nextBufferVertex > 0) {
RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
- RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempVertexBuffer, nextBufferVertex, TempBufferRenderIndexList, nextBufferIndex);
+ RwIm2DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempVertexBuffer.im2d, nextBufferVertex, TempBufferRenderIndexList, nextBufferIndex);
nextBufferVertex = 0;
nextBufferIndex = 0;
}
diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp
index 0fd1e076..13f52334 100644
--- a/src/render/WaterLevel.cpp
+++ b/src/render/WaterLevel.cpp
@@ -1167,8 +1167,8 @@ CWaterLevel::RenderTransparentWater(void)
{
if (m_nRenderWaterLayers != 1 && m_nRenderWaterLayers != 6)
{
- float fMaskX = floorf(fCamX / 2.0f) * 2.0f;
- float fMaskY = floorf(fCamY / 2.0f) * 2.0f;
+ float fMaskX = Floor(fCamX / 2.0f) * 2.0f;
+ float fMaskY = Floor(fCamY / 2.0f) * 2.0f;
float fWaterZ = CWaterLevel::ms_aWaterZs[nBlock];
float fSectorX = WATER_FROM_SMALL_SECTOR_X(BlockX) - 400.0f;
float fSectorY = WATER_FROM_SMALL_SECTOR_Y(BlockY);
@@ -1519,8 +1519,8 @@ CWaterLevel::RenderWavyMask(float fX, float fY, float fZ,
return;
#ifndef PC_WATER
- float fUOffset = fX - (MAX_LARGE_SECTORS * (int32)floorf(fX / MAX_LARGE_SECTORS));
- float fVOffset = fY - (MAX_LARGE_SECTORS * (int32)floorf(fY / MAX_LARGE_SECTORS));
+ float fUOffset = fX - (MAX_LARGE_SECTORS * (int32)Floor(fX / MAX_LARGE_SECTORS));
+ float fVOffset = fY - (MAX_LARGE_SECTORS * (int32)Floor(fY / MAX_LARGE_SECTORS));
int32 nSecsX = (int32)((fX - fSectorX) / 2.0f);
int32 nSecsY = (int32)((fY - fSectorY) / 2.0f);
@@ -1870,8 +1870,8 @@ CWaterLevel::PreCalcWaterGeometry(void)
if ( _IsColideWithBlock(BlockX, BlockY, nBlock) )
{
- float fMaskX = floorf(fCamX / 2.0f) * 2.0f;
- float fMaskY = floorf(fCamY / 2.0f) * 2.0f;
+ float fMaskX = Floor(fCamX / 2.0f) * 2.0f;
+ float fMaskY = Floor(fCamY / 2.0f) * 2.0f;
float fSectorX = WATER_FROM_SMALL_SECTOR_X(BlockX) - WATER_X_OFFSET;
float fSectorY = WATER_FROM_SMALL_SECTOR_Y(BlockY);
@@ -1994,8 +1994,8 @@ CWaterLevel::PreCalcWavyMask(float fX, float fY, float fZ,
if ( COcclusion::IsAABoxOccluded(vecSectorPos, MAX_LARGE_SECTORS, MAX_LARGE_SECTORS, 4.0f) )
return false;
- floorf(fX / MAX_LARGE_SECTORS);
- floorf(fY / MAX_LARGE_SECTORS);
+ Floor(fX / MAX_LARGE_SECTORS);
+ Floor(fY / MAX_LARGE_SECTORS);
RpGeometry *wavyGeometry = RpAtomicGetGeometry(ms_pWavyAtomic);
RpMorphTarget *wavyMorph = RpGeometryGetMorphTarget(wavyGeometry, 0);
@@ -2335,7 +2335,7 @@ _GetWindedWave(float fX, float fY)
float y = WATER_HUGE_Y(fY);
float fWindFactor (CWeather::WindClipped * 0.4f + 0.2f);
- float fWave = Sin(( (x - floorf(x)) + (y - floorf(y)) ) * TWOPI + fAngle);
+ float fWave = Sin(( (x - Floor(x)) + (y - Floor(y)) ) * TWOPI + fAngle);
return fWindFactor * fWave;
}
@@ -2380,8 +2380,8 @@ CWaterLevel::RenderWakeSegment(CVector2D &vecA, CVector2D &vecB, CVector2D &vecC
float fVD = (PosD.y / 4) + _TEXTURE_WAKE_ADDV;
#define MIN4(a, b, c, d) (Min((a), Min((b), Min((c), (d)))))
- float fMinU = floorf(MIN4(fUA, fUB, fUC, fUD));
- float fMinV = floorf(MIN4(fVA, fVB, fVC, fVD));
+ float fMinU = Floor(MIN4(fUA, fUB, fUC, fUD));
+ float fMinV = Floor(MIN4(fVA, fVB, fVC, fVD));
#undef MIN4
float fZA = _GetWindedWave(PosA.x, PosA.y) + fWakeZ;
diff --git a/src/render/Weather.cpp b/src/render/Weather.cpp
index 106e2f89..945e1f5e 100644
--- a/src/render/Weather.cpp
+++ b/src/render/Weather.cpp
@@ -279,7 +279,7 @@ void CWeather::Update(void)
}
Wind = InterpolationValue * Windiness[NewWeatherType] + (1.0f - InterpolationValue) * Windiness[OldWeatherType];
- WindClipped = Max(1.0f, Wind);
+ WindClipped = Min(1.0f, Wind);
if (CClock::GetHours() == 20)
TrafficLightBrightness = CClock::GetMinutes() / 60.0f;
diff --git a/src/rw/NodeName.cpp b/src/rw/NodeName.cpp
index d62884f7..ad4acffb 100644
--- a/src/rw/NodeName.cpp
+++ b/src/rw/NodeName.cpp
@@ -51,7 +51,7 @@ RwInt32
NodeNameStreamGetSize(const void *object, RwInt32 offsetInObject, RwInt32 sizeInObject)
{
// game checks for null pointer on node name extension but that really happen
- return rwstrlen(NODENAMEEXT(object));
+ return (RwInt32)rwstrlen(NODENAMEEXT(object));
}
bool
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index 4ae68f90..d207a08b 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -108,7 +108,7 @@ DefinedState(void)
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
- RwRenderStateSet(rwRENDERSTATEALPHAPRIMITIVEBUFFER, (void*)FALSE);
+ //RwRenderStateSet(rwRENDERSTATEALPHAPRIMITIVEBUFFER, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEBORDERCOLOR, (void*)RWRGBALONG(0, 0, 0, 255));
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEFOGCOLOR,
@@ -212,7 +212,7 @@ isSkinnedCb(RpAtomic *atomic, void *data)
RpAtomic **pAtomic = (RpAtomic**)data;
if(*pAtomic)
return nil; // already found one
- if(RpSkinGeometryGetSkin(atomic->geometry))
+ if(RpSkinGeometryGetSkin(RpAtomicGetGeometry(atomic)))
*pAtomic = atomic; // we could just return nil here directly...
return atomic;
}
@@ -358,9 +358,9 @@ AtomicRemoveAnimFromSkinCB(RpAtomic *atomic, void *data)
hier->interpolator->currentAnim = nil;
}
#else
- if(hier && hier->pCurrentAnim){
- RpHAnimAnimationDestroy(hier->pCurrentAnim);
- hier->pCurrentAnim = nil;
+ if(hier && hier->currentAnim){
+ RpHAnimAnimationDestroy(hier->currentAnim->pCurrentAnim);
+ hier->currentAnim = nil;
}
#endif
}
@@ -740,3 +740,70 @@ CameraCreate(RwInt32 width, RwInt32 height, RwBool zBuffer)
WRAPPER void _TexturePoolsInitialise() { EAXJMP(0x598B10); }
WRAPPER void _TexturePoolsShutdown() { EAXJMP(0x598B30); }
#endif
+
+#ifdef LIBRW
+#include <rpmatfx.h>
+#include "VehicleModelInfo.h"
+
+int32
+findPlatform(rw::Atomic *a)
+{
+ rw::Geometry *g = a->geometry;
+ if(g->instData)
+ return g->instData->platform;
+ return 0;
+}
+
+// Game doesn't read atomic extensions so we never get any other than the default pipe,
+// but we need it for uninstancing
+void
+attachPipe(rw::Atomic *atomic)
+{
+ if(RpSkinGeometryGetSkin(RpAtomicGetGeometry(atomic)))
+ atomic->pipeline = rw::skinGlobals.pipelines[rw::platform];
+ else{
+ int fx = rpMATFXEFFECTNULL;
+ RpGeometryForAllMaterials(RpAtomicGetGeometry(atomic), CVehicleModelInfo::GetMatFXEffectMaterialCB, &fx);
+ if(fx != rpMATFXEFFECTNULL)
+ RpMatFXAtomicEnableEffects(atomic);
+ }
+}
+
+// Attach pipes for the platform we have native data for so we can uninstance
+void
+switchPipes(rw::Atomic *a, int32 platform)
+{
+ if(a->pipeline && a->pipeline->platform != platform){
+ uint32 plgid = a->pipeline->pluginID;
+ switch(plgid){
+ // assume default pipe won't be attached explicitly
+ case rw::ID_SKIN:
+ a->pipeline = rw::skinGlobals.pipelines[platform];
+ break;
+ case rw::ID_MATFX:
+ a->pipeline = rw::matFXGlobals.pipelines[platform];
+ break;
+ }
+ }
+}
+
+RpAtomic*
+ConvertPlatformAtomic(RpAtomic *atomic, void *data)
+{
+ int32 driver = rw::platform;
+ int32 platform = findPlatform(atomic);
+ if(platform != 0 && platform != driver){
+ attachPipe(atomic); // kludge
+ rw::ObjPipeline *origPipe = atomic->pipeline;
+ rw::platform = platform;
+ switchPipes(atomic, rw::platform);
+ if(atomic->geometry->flags & rw::Geometry::NATIVE)
+ atomic->uninstance();
+ // no ADC in this game
+ //rw::ps2::unconvertADC(atomic->geometry);
+ rw::platform = driver;
+ atomic->pipeline = origPipe;
+ }
+ return atomic;
+}
+#endif
diff --git a/src/rw/RwHelper.h b/src/rw/RwHelper.h
index 8687d119..0bd7b27b 100644
--- a/src/rw/RwHelper.h
+++ b/src/rw/RwHelper.h
@@ -57,4 +57,6 @@ RwCamera *CameraCreate(RwInt32 width,
void _TexturePoolsInitialise();
-void _TexturePoolsShutdown(); \ No newline at end of file
+void _TexturePoolsShutdown();
+
+RpAtomic *ConvertPlatformAtomic(RpAtomic *atomic, void *data);
diff --git a/src/rw/RwMatFX.cpp b/src/rw/RwMatFX.cpp
index 1e64c560..3533eb24 100644
--- a/src/rw/RwMatFX.cpp
+++ b/src/rw/RwMatFX.cpp
@@ -2,9 +2,8 @@
#define WITHD3D
#include "common.h"
-#ifdef RWLIBS
-#include "patcher.h"
-#endif
+#include "rwcore.h"
+#include "rpmatfx.h"
struct MatFXNothing { int pad[5]; int effect; };
@@ -47,16 +46,16 @@ struct MatFX
int effects;
};
-#ifdef RWLIBS
extern "C" {
extern int MatFXMaterialDataOffset;
extern int MatFXAtomicDataOffset;
+
void _rpMatFXD3D8AtomicMatFXEnvRender(RxD3D8InstanceData* inst, int flags, int sel, RwTexture* texture, RwTexture* envMap);
+ void _rpMatFXD3D8AtomicMatFXRenderBlack(RxD3D8InstanceData *inst);
+ void _rpMatFXD3D8AtomicMatFXBumpMapRender(RxD3D8InstanceData *inst, int flags, RwTexture *texture, RwTexture *bumpMap, RwTexture *envMap);
+ void _rpMatFXD3D8AtomicMatFXDualPassRender(RxD3D8InstanceData *inst, int flags, RwTexture *texture, RwTexture *dualTexture);
}
-#else
-int &MatFXMaterialDataOffset = *(int*)0x66188C;
-int &MatFXAtomicDataOffset = *(int*)0x66189C;
-#endif
+
#ifdef PS2_MATFX
@@ -218,12 +217,96 @@ _rpMatFXD3D8AtomicMatFXEnvRender_ps2(RxD3D8InstanceData *inst, int flags, int se
RwD3D8SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, 0);
}
-#ifdef RWLIBS
-STARTPATCHES
- InjectHook((uintptr)&_rpMatFXD3D8AtomicMatFXEnvRender, _rpMatFXD3D8AtomicMatFXEnvRender_ps2, PATCH_JUMP);
-ENDPATCHES
-#endif
+void
+_rwD3D8EnableClippingIfNeeded(void *object, RwUInt8 type)
+{
+ int clip;
+ if (type == rpATOMIC)
+ clip = !RwD3D8CameraIsSphereFullyInsideFrustum(RwCameraGetCurrentCameraMacro(), RpAtomicGetWorldBoundingSphere((RpAtomic *)object));
+ else
+ clip = !RwD3D8CameraIsBBoxFullyInsideFrustum(RwCameraGetCurrentCameraMacro(), &((RpWorldSector *)object)->tightBoundingBox);
+ RwD3D8SetRenderState(D3DRS_CLIPPING, clip);
+}
+
+void
+_rwD3D8AtomicMatFXRenderCallback(RwResEntry *repEntry, void *object, RwUInt8 type, RwUInt32 flags)
+{
+ RwBool lighting;
+ RwBool forceBlack;
+ RxD3D8ResEntryHeader *header;
+ RxD3D8InstanceData *inst;
+ RwInt32 i;
+
+ if (flags & rpGEOMETRYPRELIT) {
+ RwD3D8SetRenderState(D3DRS_COLORVERTEX, 1);
+ RwD3D8SetRenderState(D3DRS_EMISSIVEMATERIALSOURCE, D3DMCS_COLOR1);
+ } else {
+ RwD3D8SetRenderState(D3DRS_COLORVERTEX, 0);
+ RwD3D8SetRenderState(D3DRS_EMISSIVEMATERIALSOURCE, D3DMCS_MATERIAL);
+ }
+
+ _rwD3D8EnableClippingIfNeeded(object, type);
-#endif
+ RwD3D8GetRenderState(D3DRS_LIGHTING, &lighting);
+ if (lighting || flags & rpGEOMETRYPRELIT) {
+ forceBlack = FALSE;
+ } else {
+ forceBlack = TRUE;
+ RwD3D8SetTexture(nil, 0);
+ RwD3D8SetRenderState(D3DRS_TEXTUREFACTOR, D3DCOLOR_RGBA(0, 0, 0, 255));
+ RwD3D8SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
+ RwD3D8SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_TFACTOR);
+ }
+
+ header = (RxD3D8ResEntryHeader *)(repEntry + 1);
+ inst = (RxD3D8InstanceData *)(header + 1);
+ for (i = 0; i < header->numMeshes; i++) {
+ if (forceBlack)
+ _rpMatFXD3D8AtomicMatFXRenderBlack(inst);
+ else {
+ if (lighting)
+ RwD3D8SetSurfaceProperties(&inst->material->color, &inst->material->surfaceProps, flags & rpGEOMETRYMODULATEMATERIALCOLOR);
+ MatFX *matfx = *RWPLUGINOFFSET(MatFX *, inst->material, MatFXMaterialDataOffset);
+ int effect = matfx ? matfx->effects : rpMATFXEFFECTNULL;
+ switch (effect) {
+ case rpMATFXEFFECTNULL:
+ default:
+ _rpMatFXD3D8AtomicMatFXDefaultRender(inst, flags, inst->material->texture);
+ break;
+ case rpMATFXEFFECTBUMPMAP:
+ _rpMatFXD3D8AtomicMatFXBumpMapRender(inst, flags, inst->material->texture, matfx->fx[0].b.bumpedTex, nil);
+ break;
+ case rpMATFXEFFECTENVMAP:
+ {
+ // TODO: matfx switch in the settings
+ //_rpMatFXD3D8AtomicMatFXEnvRender(inst, flags, 0, inst->material->texture, matfx->fx[0].e.envTex);
+ _rpMatFXD3D8AtomicMatFXEnvRender_ps2(inst, flags, 0, inst->material->texture, matfx->fx[0].e.envTex);
+ break;
+ }
+ case rpMATFXEFFECTBUMPENVMAP:
+ _rpMatFXD3D8AtomicMatFXBumpMapRender(inst, flags, inst->material->texture, matfx->fx[0].b.bumpedTex, matfx->fx[1].e.envTex);
+ break;
+ case rpMATFXEFFECTDUAL:
+ _rpMatFXD3D8AtomicMatFXDualPassRender(inst, flags, inst->material->texture, matfx->fx[0].d.dualTex);
+ break;
+ }
+ }
+ inst++;
+ }
+
+ if (forceBlack) {
+ RwD3D8SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG2);
+ RwD3D8SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
+ }
+}
+
+void
+ReplaceMatFxCallback()
+{
+ RxD3D8AllInOneSetRenderCallBack(
+ RxPipelineFindNodeByName(RpMatFXGetD3D8Pipeline(rpMATFXD3D8ATOMICPIPELINE), RxNodeDefinitionGetD3D8AtomicAllInOne()->name, nil, nil),
+ _rwD3D8AtomicMatFXRenderCallback);
+}
+#endif // PS2_MATFX
-#endif
+#endif // !LIBRW
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp
index cff1ff16..ac80eff0 100644
--- a/src/rw/VisibilityPlugins.cpp
+++ b/src/rw/VisibilityPlugins.cpp
@@ -626,6 +626,14 @@ CVisibilityPlugins::RenderPedCB(RpAtomic *atomic)
}
float
+CVisibilityPlugins::GetDistanceSquaredFromCamera(RwV3d *pos)
+{
+ RwV3d dist;
+ RwV3dSub(&dist, pos, ms_pCameraPosn);
+ return RwV3dDotProduct(&dist, &dist);
+}
+
+float
CVisibilityPlugins::GetDistanceSquaredFromCamera(RwFrame *frame)
{
RwMatrix *m;
@@ -835,12 +843,12 @@ CVisibilityPlugins::FrameCopyConstructor(void *dst, const void *src, int32, int3
}
void
-CVisibilityPlugins::SetFrameHierarchyId(RwFrame *frame, int32 id)
+CVisibilityPlugins::SetFrameHierarchyId(RwFrame *frame, uintptr id)
{
FRAMEEXT(frame)->id = id;
}
-int32
+uintptr
CVisibilityPlugins::GetFrameHierarchyId(RwFrame *frame)
{
return FRAMEEXT(frame)->id;
diff --git a/src/rw/VisibilityPlugins.h b/src/rw/VisibilityPlugins.h
index 89583432..f277565d 100644
--- a/src/rw/VisibilityPlugins.h
+++ b/src/rw/VisibilityPlugins.h
@@ -83,6 +83,7 @@ public:
static bool VehicleVisibilityCB(RpClump *clump);
static bool VehicleVisibilityCB_BigVehicle(RpClump *clump);
+ static float GetDistanceSquaredFromCamera(RwV3d *pos);
static float GetDistanceSquaredFromCamera(RwFrame *frame);
static float GetDotProductWithCameraVector(RwMatrix *atomicMat, RwMatrix *clumpMat, uint32 flags);
@@ -111,10 +112,10 @@ public:
struct FrameExt
{
// BUG: this is abused to hold a pointer by SetClumpModelInfo
- int32 id;
+ uintptr id;
};
- static void SetFrameHierarchyId(RwFrame *frame, int32 id);
- static int32 GetFrameHierarchyId(RwFrame *frame);
+ static void SetFrameHierarchyId(RwFrame *frame, uintptr id);
+ static uintptr GetFrameHierarchyId(RwFrame *frame);
static void *FrameConstructor(void *object, int32 offset, int32 len);
static void *FrameDestructor(void *object, int32 offset, int32 len);
diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp
index 0f583221..52c1aef7 100644
--- a/src/save/GenericGameStorage.cpp
+++ b/src/save/GenericGameStorage.cpp
@@ -497,7 +497,7 @@ CheckDataNotCorrupt(int32 slot, char *name)
char filename[100];
int32 blocknum = 0;
- eLevelName level = LEVEL_NONE;
+ eLevelName level = LEVEL_GENERIC;
CheckSum = 0;
uint32 bytes_processed = 0;
sprintf(filename, "%s%i%s", DefaultPCSaveFileName, slot + 1, ".b");
diff --git a/src/skel/crossplatform.cpp b/src/skel/crossplatform.cpp
index 40f4f053..6188992d 100644
--- a/src/skel/crossplatform.cpp
+++ b/src/skel/crossplatform.cpp
@@ -87,7 +87,7 @@ void FileTimeToSystemTime(time_t* writeTime, SYSTEMTIME* out) {
// Funcs/features from Windows that we need on other platforms
#ifndef _WIN32
char *strupr(char *s) {
- char* tmp = s;
+ char* tmp = s;
for (;*tmp;++tmp) {
*tmp = toupper((unsigned char) *tmp);
@@ -96,7 +96,7 @@ char *strupr(char *s) {
return s;
}
char *strlwr(char *s) {
- char* tmp = s;
+ char* tmp = s;
for (;*tmp;++tmp) {
*tmp = tolower((unsigned char) *tmp);
@@ -116,86 +116,117 @@ char *trim(char *s) {
return s;
}
+FILE* _fcaseopen(char const* filename, char const* mode)
+{
+ FILE* result;
+ char* real = casepath(filename);
+ if (!real)
+ result = fopen(filename, mode);
+ else {
+ result = fopen(real, mode);
+ free(real);
+ }
+ return result;
+}
+
// Case-insensitivity on linux (from https://github.com/OneSadCookie/fcaseopen)
-// r must have strlen(path) + 2 bytes
-int casepath(char const *path, char *r)
+// Returned string should freed manually (if exists)
+char* casepath(char const* path, bool checkPathFirst)
{
+ if (checkPathFirst && access(path, F_OK) != -1) {
+ // File path is correct
+ return nil;
+ }
+
size_t l = strlen(path);
- char *p = (char*)alloca(l + 1);
+ char* p = (char*)alloca(l + 1);
+ char* out = (char*)malloc(l + 3); // for extra ./
strcpy(p, path);
- // my addon: change \'s with /
- char *nextBs;
- while(nextBs = strstr(p, "\\")){
- *nextBs = '/';
- }
-
- // my addon: linux doesn't handle filenames with spaces at the end nicely
- p = trim(p);
+ // my addon: linux doesn't handle filenames with spaces at the end nicely
+ p = trim(p);
size_t rl = 0;
-
- DIR *d;
- if (p[0] == '/')
+
+ DIR* d;
+ if (p[0] == '/' || p[0] == '\\')
{
d = opendir("/");
- p = p + 1;
}
else
{
d = opendir(".");
- r[0] = '.';
- r[1] = 0;
+ out[0] = '.';
+ out[1] = 0;
rl = 1;
}
-
- int last = 0;
- char *c = strsep(&p, "/");
- while (c)
+
+ bool cantProceed = false; // just convert slashes in what's left in string, not case sensitivity
+ bool mayBeTrailingSlash = false;
+ char* c;
+ while (c = strsep(&p, "/\\"))
{
- if (!d)
+ // May be trailing slash(allow), slash at the start(avoid), or multiple slashes(avoid)
+ if (*c == '\0')
{
- return 0;
+ mayBeTrailingSlash = true;
+ continue;
+ } else {
+ mayBeTrailingSlash = false;
}
-
- if (last)
+
+ out[rl] = '/';
+ rl += 1;
+ out[rl] = 0;
+
+ if (cantProceed)
{
- closedir(d);
- return 0;
+ strcpy(out + rl, c);
+ rl += strlen(c);
+ continue;
}
-
- r[rl] = '/';
- rl += 1;
- r[rl] = 0;
-
- struct dirent *e = readdir(d);
- while (e)
+
+ struct dirent* e;
+ while (e = readdir(d))
{
if (strcasecmp(c, e->d_name) == 0)
{
- strcpy(r + rl, e->d_name);
- rl += strlen(e->d_name);
+ strcpy(out + rl, e->d_name);
+ int reportedLen = (int)strlen(e->d_name);
+ rl += reportedLen;
+ assert(reportedLen == strlen(c) && "casepath: This is not good at all");
closedir(d);
- d = opendir(r);
-
+ d = opendir(out);
+
+ // Either it wasn't a folder, or permission error, I/O error etc.
+ if (!d) {
+ cantProceed = true;
+ }
+
break;
}
-
- e = readdir(d);
}
-
+
if (!e)
{
- strcpy(r + rl, c);
+ printf("casepath couldn't find dir/file \"%s\", full path was %s\n", c, path);
+ // No match, add original name and continue converting further slashes.
+ strcpy(out + rl, c);
rl += strlen(c);
- last = 1;
+ cantProceed = true;
}
-
- c = strsep(&p, "/");
}
-
+
if (d) closedir(d);
- return 1;
+ if (mayBeTrailingSlash) {
+ out[rl] = '/'; rl += 1;
+ out[rl] = '\0';
+ }
+
+ if (rl > l + 2) {
+ printf("\n\ncasepath: Corrected path length is longer then original+2:\n\tOriginal: %s (%d chars)\n\tCorrected: %s (%d chars)\n\n", path, l, out, rl);
+ }
+ return out;
}
#endif
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index a21877c1..69600385 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -3,19 +3,30 @@
// This is the common include for platform/renderer specific skeletons(glfw.cpp, win.cpp etc.) and using cross platform things (like Windows directories wrapper, platform specific global arrays etc.)
// Functions that's different on glfw and win but have same signature, should be located on platform.h.
+enum eWinVersion
+{
+ OS_WIN95 = 0,
+ OS_WIN98,
+ OS_WINNT,
+ OS_WIN2000,
+ OS_WINXP,
+};
+
#ifdef _WIN32
-// This only has <windef.h> as Win header.
+
+// As long as WITHWINDOWS isn't defined / <Windows.h> isn't included, we only need type definitions so let's include <IntSafe.h>.
+// NOTE: It's perfectly fine to include <Windows.h> here, but it can increase build size and time in *some* conditions, and maybe substantially in future if we'll use crossplatform.h more.
+#ifndef _INC_WINDOWS
+ #include <IntSafe.h>
+#endif
+#if defined RW_D3D9 || defined RWLIBS
#include "win.h"
+#endif
extern DWORD _dwOperatingSystemVersion;
+#define fcaseopen fopen
#else
char *strupr(char *str);
char *strlwr(char *str);
-enum {
- OS_WIN98,
- OS_WIN2000,
- OS_WINNT,
- OS_WINXP,
-};
enum {
LANG_OTHER,
@@ -32,7 +43,9 @@ enum {
};
extern long _dwOperatingSystemVersion;
-int casepath(char const *path, char *r);
+char *casepath(char const *path, bool checkPathFirst = true);
+FILE *_fcaseopen(char const *filename, char const *mode);
+#define fcaseopen _fcaseopen
#endif
#ifdef RW_GL3
@@ -42,6 +55,7 @@ typedef struct
RwBool fullScreen;
RwV2d lastMousePos;
double mouseWheel; // glfw doesn't cache it
+ bool cursorIsInWindow;
RwInt8 joy1id;
RwInt8 joy2id;
}
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index 5a2d2667..9a4f2188 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -16,7 +16,6 @@
#include "platform.h"
#include "crossplatform.h"
-#include "patcher.h"
#include "main.h"
#include "FileMgr.h"
#include "Text.h"
@@ -64,11 +63,7 @@ static psGlobalType PsGlobal;
#undef MAKEPOINTS
#define MAKEPOINTS(l) (*((POINTS /*FAR*/ *)&(l)))
-#define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; }
-#define JIF(x) if (FAILED(hr=(x))) \
- {debug(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("\n"), hr); return;}
-
-unsigned long _dwMemAvailPhys;
+size_t _dwMemAvailPhys;
RwUInt32 gGameState;
#ifdef _WIN32
@@ -178,7 +173,11 @@ psCameraBeginUpdate(RwCamera *camera)
void
psCameraShowRaster(RwCamera *camera)
{
- if (FrontEndMenuManager.m_PrefsVsync)
+#ifdef LEGACY_MENU_OPTIONS
+ if (FrontEndMenuManager.m_PrefsVsync || FrontEndMenuManager.m_bMenuActive)
+#else
+ if (FrontEndMenuManager.m_PrefsFrameLimiter || FrontEndMenuManager.m_bMenuActive)
+#endif
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPWAITVSYNC);
else
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPDONTWAIT);
@@ -283,6 +282,7 @@ psInitialize(void)
RsGlobal.ps = &PsGlobal;
PsGlobal.fullScreen = FALSE;
+ PsGlobal.cursorIsInWindow = TRUE;
PsGlobal.joy1id = -1;
PsGlobal.joy2id = -1;
@@ -791,6 +791,7 @@ void keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods)
void resizeCB(GLFWwindow* window, int width, int height);
void scrollCB(GLFWwindow* window, double xoffset, double yoffset);
void cursorCB(GLFWwindow* window, double xpos, double ypos);
+void cursorEnterCB(GLFWwindow* window, int entered);
void joysChangeCB(int jid, int event);
bool IsThisJoystickBlacklisted(int i)
@@ -826,9 +827,21 @@ void _InputInitialiseJoys()
}
}
-void _InputInitialiseMouse()
+long _InputInitialiseMouse(bool exclusive)
{
glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
+ return 0;
+}
+
+void _InputShutdownMouse()
+{
+ // Not needed
+}
+
+bool _InputMouseNeedsExclusive()
+{
+ // That was the cause of infamous mouse bug on Win. Not supported on glfw anyway
+ return false;
}
void psPostRWinit(void)
@@ -840,10 +853,11 @@ void psPostRWinit(void)
glfwSetWindowSizeCallback(PSGLOBAL(window), resizeCB);
glfwSetScrollCallback(PSGLOBAL(window), scrollCB);
glfwSetCursorPosCallback(PSGLOBAL(window), cursorCB);
+ glfwSetCursorEnterCallback(PSGLOBAL(window), cursorEnterCB);
glfwSetJoystickCallback(joysChangeCB);
_InputInitialiseJoys();
- _InputInitialiseMouse();
+ _InputInitialiseMouse(false);
if(!(vm.flags & rwVIDEOMODEEXCLUSIVE))
glfwSetWindowSize(PSGLOBAL(window), RsGlobal.maximumWidth, RsGlobal.maximumHeight);
@@ -1345,13 +1359,18 @@ _InputTranslateShiftKeyUpDown(RsKeyCodes *rs) {
RsKeyboardEventHandler(rshiftStatus ? rsKEYDOWN : rsKEYUP, &(*rs = rsRSHIFT));
}
-// TODO this only works in frontend(and luckily only frontend use this), maybe because of glfw knows that mouse pos is > 32000 in game??
+// TODO this only works in frontend(and luckily only frontend use this). Fun fact: if I get pos manually in game, glfw reports that it's > 32000
void
cursorCB(GLFWwindow* window, double xpos, double ypos) {
FrontEndMenuManager.m_nMouseTempPosX = xpos;
FrontEndMenuManager.m_nMouseTempPosY = ypos;
}
+void
+cursorEnterCB(GLFWwindow* window, int entered) {
+ PSGLOBAL(cursorIsInWindow) = !!entered;
+}
+
/*
*****************************************************************************
*/
@@ -1366,6 +1385,15 @@ WinMain(HINSTANCE instance,
RwInt32 argc;
RwChar** argv;
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
+
+#if 0
+ // TODO: make this an option somewhere
+ AllocConsole();
+ freopen("CONIN$", "r", stdin);
+ freopen("CONOUT$", "w", stdout);
+ freopen("CONOUT$", "w", stderr);
+#endif
+
#else
int
main(int argc, char *argv[])
@@ -1373,7 +1401,6 @@ main(int argc, char *argv[])
#endif
RwV2d pos;
RwInt32 i;
-// StaticPatcher::Apply();
#ifndef _WIN32
struct sigaction act;
@@ -1488,7 +1515,7 @@ main(int argc, char *argv[])
{
CFileMgr::SetDirMyDocuments();
- int32 gta3set = CFileMgr::OpenFile("gta3.set", "r");
+ int32 gta3set = CFileMgr::OpenFile("gta_vc.set", "r");
if ( gta3set )
{
diff --git a/src/skel/platform.h b/src/skel/platform.h
index cbb1be28..806c0a73 100644
--- a/src/skel/platform.h
+++ b/src/skel/platform.h
@@ -1,6 +1,8 @@
#ifndef PLATFORM_H
#define PLATFORM_H
+// Functions that's different on glfw/win etc. but have same signature (but if a function only used in win.cpp you can keep in win.h)
+
#include "rwcore.h"
#include "skeleton.h"
@@ -35,6 +37,10 @@ extern RwBool psInstallFileSystem(void);
extern RwBool psNativeTextureSupport(void);
extern void _InputTranslateShiftKeyUpDown(RsKeyCodes* rs);
+extern long _InputInitialiseMouse(bool exclusive); // returns HRESULT on Windows actually
+extern void _InputShutdownMouse();
+extern bool _InputMouseNeedsExclusive();
+extern void _InputInitialiseJoys();
extern void HandleExit();
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 77475ca5..75a3a7c9 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -19,7 +19,12 @@
#pragma warning( push )
#pragma warning( disable : 4005)
+
+#ifdef USE_D3D9
+#include <d3d9.h>
+#else
#include <d3d8.h>
+#endif
#include <ddraw.h>
#include <dinput.h>
#include <DShow.h>
@@ -27,7 +32,9 @@
#define WM_GRAPHNOTIFY WM_USER+13
+#ifndef USE_D3D9
#pragma comment( lib, "d3d8.lib" )
+#endif
#pragma comment( lib, "ddraw.lib" )
#pragma comment( lib, "Winmm.lib" )
#pragma comment( lib, "dxguid.lib" )
@@ -76,7 +83,6 @@ static psGlobalType PsGlobal;
{debug(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("\n"), hr); return;}
#include "common.h"
-#include "patcher.h"
#include "main.h"
#include "FileMgr.h"
#include "Text.h"
@@ -103,7 +109,7 @@ IMediaSeeking *pMS = nil;
DWORD dwDXVersion;
SIZE_T _dwMemTotalPhys;
-SIZE_T _dwMemAvailPhys;
+size_t _dwMemAvailPhys;
SIZE_T _dwMemTotalVirtual;
SIZE_T _dwMemAvailVirtual;
DWORD _dwMemTotalVideo;
@@ -223,7 +229,11 @@ psCameraBeginUpdate(RwCamera *camera)
void
psCameraShowRaster(RwCamera *camera)
{
- if (FrontEndMenuManager.m_PrefsVsync)
+#ifdef LEGACY_MENU_OPTIONS
+ if (FrontEndMenuManager.m_PrefsVsync || FrontEndMenuManager.m_bMenuActive)
+#else
+ if (FrontEndMenuManager.m_PrefsFrameLimiter || FrontEndMenuManager.m_bMenuActive)
+#endif
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPWAITVSYNC);
else
RwCameraShowRaster(camera, PSGLOBAL(window), rwRASTERFLIPDONTWAIT);
@@ -306,34 +316,6 @@ psNativeTextureSupport(void)
/*
*****************************************************************************
*/
-static BOOL
-InitApplication(HANDLE instance)
-{
- /*
- * Perform any necessary MS Windows application initialization. Basically,
- * this means registering the window class for this application.
- */
-
- WNDCLASS windowClass;
-
- windowClass.style = CS_BYTEALIGNWINDOW;
- windowClass.lpfnWndProc = (WNDPROC) MainWndProc;
- windowClass.cbClsExtra = 0;
- windowClass.cbWndExtra = 0;
- windowClass.hInstance = (HINSTANCE)instance;
- windowClass.hIcon = nil;
- windowClass.hCursor = LoadCursor(nil, IDC_ARROW);
- windowClass.hbrBackground = nil;
- windowClass.lpszMenuName = NULL;
- windowClass.lpszClassName = AppClassName;
-
- return RegisterClass(&windowClass);
-}
-
-
-/*
- *****************************************************************************
- */
static HWND
InitInstance(HANDLE instance)
{
@@ -450,6 +432,16 @@ DWORD GetDXVersion()
dwDXVersion = 0x700;
pDD7->Release();
+#ifdef USE_D3D9
+ HINSTANCE hD3D9DLL = LoadLibrary("D3D9.DLL");
+ if (hD3D9DLL != nil) {
+ FreeLibrary(hDDrawDLL);
+ FreeLibrary(hD3D9DLL);
+
+ dwDXVersion = 0x900;
+ return dwDXVersion;
+ }
+#endif
//-------------------------------------------------------------------------
// DirectX 8.0 Checks
@@ -499,6 +491,7 @@ DWORD GetDXVersion()
/*
*****************************************************************************
*/
+#ifndef _WIN64
static char cpuvendor[16] = "UnknownVendr";
__declspec(naked) const char * _psGetCpuVendr()
{
@@ -572,6 +565,7 @@ void _psPrintCpuInfo()
if ( FeaturesEx & 0x80000000 )
debug("with 3DNow");
}
+#endif
/*
*****************************************************************************
@@ -647,9 +641,9 @@ psInitialize(void)
gGameState = GS_START_UP;
TRACE("gGameState = GS_START_UP");
-
+#ifndef _WIN64
_psPrintCpuInfo();
-
+#endif
OSVERSIONINFO verInfo;
verInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
@@ -1283,6 +1277,33 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
return DefWindowProc(window, message, wParam, lParam);
}
+/*
+ *****************************************************************************
+ */
+static BOOL
+InitApplication(HANDLE instance)
+{
+ /*
+ * Perform any necessary MS Windows application initialization. Basically,
+ * this means registering the window class for this application.
+ */
+
+ WNDCLASS windowClass;
+
+ windowClass.style = CS_BYTEALIGNWINDOW;
+ windowClass.lpfnWndProc = (WNDPROC)MainWndProc;
+ windowClass.cbClsExtra = 0;
+ windowClass.cbWndExtra = 0;
+ windowClass.hInstance = (HINSTANCE)instance;
+ windowClass.hIcon = nil;
+ windowClass.hCursor = LoadCursor(nil, IDC_ARROW);
+ windowClass.hbrBackground = nil;
+ windowClass.lpszMenuName = NULL;
+ windowClass.lpszClassName = AppClassName;
+
+ return RegisterClass(&windowClass);
+}
+
/*
*****************************************************************************
@@ -1295,8 +1316,11 @@ RwBool IsForegroundApp()
UINT GetBestRefreshRate(UINT width, UINT height, UINT depth)
{
+#ifdef USE_D3D9
+ LPDIRECT3D9 d3d = Direct3DCreate9(D3D_SDK_VERSION);
+#else
LPDIRECT3D8 d3d = Direct3DCreate8(D3D_SDK_VERSION);
-
+#endif
ASSERT(d3d != nil);
UINT refreshRate = INT_MAX;
@@ -1309,14 +1333,21 @@ UINT GetBestRefreshRate(UINT width, UINT height, UINT depth)
else
format = D3DFMT_R5G6B5;
+#ifdef USE_D3D9
+ UINT modeCount = d3d->GetAdapterModeCount(GcurSel, format);
+#else
UINT modeCount = d3d->GetAdapterModeCount(GcurSel);
-
+#endif
+
for ( UINT i = 0; i < modeCount; i++ )
{
D3DDISPLAYMODE mode;
+#ifdef USE_D3D9
+ d3d->EnumAdapterModes(GcurSel, format, i, &mode);
+#else
d3d->EnumAdapterModes(GcurSel, i, &mode);
-
+#endif
if ( mode.Width == width && mode.Height == height && mode.Format == format )
{
if ( mode.RefreshRate == 0 )
@@ -1598,7 +1629,6 @@ RwBool _psSetVideoMode(RwInt32 subSystem, RwInt32 videoMode)
return TRUE;
}
-
/*
*****************************************************************************
*/
@@ -1610,7 +1640,7 @@ CommandLineToArgv(RwChar *cmdLine, RwInt32 *argCount)
RwInt32 i, len;
RwChar *res, *str, **aptr;
- len = strlen(cmdLine);
+ len = (int)strlen(cmdLine);
/*
* Count the number of arguments...
@@ -1698,11 +1728,11 @@ void InitialiseLanguage()
{
WORD primUserLCID = PRIMARYLANGID(GetSystemDefaultLCID());
WORD primSystemLCID = PRIMARYLANGID(GetUserDefaultLCID());
- WORD primLayout = PRIMARYLANGID((DWORD)GetKeyboardLayout(0));
+ WORD primLayout = PRIMARYLANGID((DWORD_PTR)GetKeyboardLayout(0));
WORD subUserLCID = SUBLANGID(GetSystemDefaultLCID());
WORD subSystemLCID = SUBLANGID(GetUserDefaultLCID());
- WORD subLayout = SUBLANGID((DWORD)GetKeyboardLayout(0));
+ WORD subLayout = SUBLANGID((DWORD_PTR)GetKeyboardLayout(0));
if ( primUserLCID == LANG_GERMAN
|| primSystemLCID == LANG_GERMAN
@@ -1936,7 +1966,6 @@ WinMain(HINSTANCE instance,
RwV2d pos;
RwInt32 argc, i;
RwChar **argv;
- StaticPatcher::Apply();
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
// TODO: make this an option somewhere
@@ -1999,7 +2028,7 @@ WinMain(HINSTANCE instance,
if ( _InputInitialise() == S_OK )
{
- _InputInitialiseMouse();
+ _InputInitialiseMouse(false);
_InputInitialiseJoys();
}
@@ -2073,7 +2102,7 @@ WinMain(HINSTANCE instance,
{
CFileMgr::SetDirMyDocuments();
- int32 gta3set = CFileMgr::OpenFile("gta3.set", "r");
+ int32 gta3set = CFileMgr::OpenFile("gta_vc.set", "r");
if ( gta3set )
{
@@ -2243,6 +2272,11 @@ WinMain(HINSTANCE instance,
CloseClip();
CoUninitialize();
+#ifdef FIX_BUGS
+ // draw one frame because otherwise we'll end up looking at black screen for a while if vsync is on
+ RsCameraShowRaster(Scene.camera);
+#endif
+
#ifdef PS2_MENU
extern char version_name[64];
if ( CGame::frenchGame || CGame::germanGame )
@@ -2533,7 +2567,7 @@ HRESULT _InputInitialise()
return S_OK;
}
-HRESULT _InputInitialiseMouse()
+HRESULT _InputInitialiseMouse(bool exclusive)
{
HRESULT hr;
@@ -2551,7 +2585,7 @@ HRESULT _InputInitialiseMouse()
if( FAILED( hr = PSGLOBAL(mouse)->SetDataFormat( &c_dfDIMouse2 ) ) )
return hr;
- if( FAILED( hr = PSGLOBAL(mouse)->SetCooperativeLevel( PSGLOBAL(window), DISCL_NONEXCLUSIVE | DISCL_FOREGROUND ) ) )
+ if( FAILED( hr = PSGLOBAL(mouse)->SetCooperativeLevel( PSGLOBAL(window), (exclusive ? DISCL_EXCLUSIVE : DISCL_NONEXCLUSIVE) | DISCL_FOREGROUND ) ) )
return hr;
// Acquire the newly created device
@@ -2839,6 +2873,28 @@ void _InputShutdown()
SAFE_RELEASE(PSGLOBAL(dinterface));
}
+void _InputShutdownMouse()
+{
+ if (PSGLOBAL(mouse) == nil)
+ return;
+
+ PSGLOBAL(mouse)->Unacquire();
+ SAFE_RELEASE(PSGLOBAL(mouse));
+}
+
+bool _InputMouseNeedsExclusive(void)
+{
+ // FIX: I don't know why R* needed that, but it causes infamous mouse bug on modern systems.
+ // Probably DirectInput bug, since Acquire() and GetDeviceState() reports everything A-OK.
+#ifdef FIX_BUGS
+ return false;
+#endif
+ RwVideoMode vm;
+ RwEngineGetVideoModeInfo(&vm, GcurSelVM);
+
+ return vm.flags & rwVIDEOMODEEXCLUSIVE;
+}
+
BOOL CALLBACK _InputEnumDevicesCallback( const DIDEVICEINSTANCE* pdidInstance, VOID* pContext )
{
HRESULT hr;
diff --git a/src/skel/win/win.h b/src/skel/win/win.h
index 444e0760..be840898 100644
--- a/src/skel/win/win.h
+++ b/src/skel/win/win.h
@@ -1,5 +1,5 @@
-// DON'T include directly. crossplatform.h includes this if you're on Windows.
+// DON'T include directly. crossplatform.h includes this if you're using D3D9 backend(win.cpp).
#if (!defined(_PLATFORM_WIN_H))
#define _PLATFORM_WIN_H
@@ -8,21 +8,6 @@
#define RSREGSETBREAKALLOC(_name) /* No op */
#endif /* (!defined(RSREGSETBREAKALLOC)) */
-#ifndef _INC_WINDOWS
-#define _X86_
-#include <windef.h>
-#endif
-
-enum eWinVersion
-{
- OS_WIN95 = 0,
- OS_WIN98,
- OS_WINNT,
- OS_WIN2000,
- OS_WINXP,
-};
-
-
#ifdef __DINPUT_INCLUDED__
/* platform specfic global data */
typedef struct
@@ -84,13 +69,8 @@ extern "C"
#endif /* __cplusplus */
#ifdef __DINPUT_INCLUDED__
-extern LRESULT CALLBACK
-MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
-
HRESULT _InputInitialise();
-HRESULT _InputInitialiseMouse();
HRESULT CapturePad(RwInt32 padID);
-void _InputInitialiseJoys();
void _InputAddJoyStick(LPDIRECTINPUTDEVICE8 lpDevice, INT num);
HRESULT _InputAddJoys();
HRESULT _InputGetMouseState(DIMOUSESTATE2 *state);
diff --git a/src/text/Text.cpp b/src/text/Text.cpp
index d954470f..dab1cae3 100644
--- a/src/text/Text.cpp
+++ b/src/text/Text.cpp
@@ -28,7 +28,7 @@ void
CText::Load(void)
{
char filename[32];
- uint32 offset;
+ size_t offset;
int file;
bool tkey_loaded = false, tdat_loaded = false;
ChunkHeader m_ChunkHeader;
@@ -209,7 +209,7 @@ CText::GetNameOfLoadedMissionText(char *outName)
//--MIAMI: DONE
void
-CText::ReadChunkHeader(ChunkHeader *buf, int32 file, uint32 *offset)
+CText::ReadChunkHeader(ChunkHeader *buf, int32 file, size_t *offset)
{
// original code loops 8 times to read 1 byte with CFileMgr::Read, that's retarded
CFileMgr::Read(file, (char*)buf, sizeof(ChunkHeader));
@@ -281,15 +281,15 @@ CText::LoadMissionText(char *MissionTableName)
bool tkey_loaded = false, tdat_loaded = false;
ChunkHeader m_ChunkHeader;
while (!tkey_loaded || !tdat_loaded) {
- uint32 bytes_read = 0;
+ size_t bytes_read = 0;
ReadChunkHeader(&m_ChunkHeader, file, &bytes_read);
if (m_ChunkHeader.size != 0) {
if (strncmp(m_ChunkHeader.magic, "TKEY", 4) == 0) {
- uint32 bytes_read = 0;
+ size_t bytes_read = 0;
mission_keyArray.Load(m_ChunkHeader.size, file, &bytes_read);
tkey_loaded = true;
} else if (strncmp(m_ChunkHeader.magic, "TDAT", 4) == 0) {
- uint32 bytes_read = 0;
+ size_t bytes_read = 0;
mission_data.Load(m_ChunkHeader.size, file, &bytes_read);
tdat_loaded = true;
} else
@@ -308,11 +308,12 @@ CText::LoadMissionText(char *MissionTableName)
//--MIAMI: DONE
void
-CKeyArray::Load(uint32 length, int file, uint32 *offset)
+CKeyArray::Load(size_t length, int file, size_t* offset)
{
char *rawbytes;
- numEntries = length / sizeof(CKeyEntry);
+ // You can make numEntries size_t if you want to exceed 32-bit boundaries, everything else should be ready.
+ numEntries = (int)(length / sizeof(CKeyEntry));
entries = new CKeyEntry[numEntries];
rawbytes = (char*)entries;
@@ -403,11 +404,12 @@ CKeyArray::Search(const char *key, uint8 *result)
//--MIAMI: DONE
void
-CData::Load(uint32 length, int file, uint32 *offset)
+CData::Load(size_t length, int file, size_t * offset)
{
char *rawbytes;
- numChars = length / sizeof(wchar);
+ // You can make numChars size_t if you want to exceed 32-bit boundaries, everything else should be ready.
+ numChars = (int)(length / sizeof(wchar));
chars = new wchar[numChars];
rawbytes = (char*)chars;
@@ -430,10 +432,12 @@ CData::Unload(void)
//--MIAMI: DONE
void
-CMissionTextOffsets::Load(uint32 table_size, int file, uint32 *offset, int)
+CMissionTextOffsets::Load(size_t table_size, int file, size_t *offset, int)
{
// not exact VC code but smaller and better :P
- size = table_size / sizeof(CMissionTextOffsets::Entry);
+
+ // You can make this size_t if you want to exceed 32-bit boundaries, everything else should be ready.
+ size = (uint16) (table_size / sizeof(CMissionTextOffsets::Entry));
CFileMgr::Read(file, (char*)data, sizeof(CMissionTextOffsets::Entry) * size);
*offset += sizeof(CMissionTextOffsets::Entry) * size;
}
diff --git a/src/text/Text.h b/src/text/Text.h
index 5fa3d0dc..d163b9c9 100644
--- a/src/text/Text.h
+++ b/src/text/Text.h
@@ -26,11 +26,11 @@ class CKeyArray
{
public:
CKeyEntry *entries;
- int numEntries;
+ int numEntries; // You can make this size_t if you want to exceed 32-bit boundaries, everything else should be ready.
CKeyArray(void) : entries(nil), numEntries(0) {}
~CKeyArray(void) { Unload(); }
- void Load(uint32 length, int file, uint32 *offset);
+ void Load(size_t length, int file, size_t *offset);
void Unload(void);
void Update(wchar *chars);
CKeyEntry *BinarySearch(const char *key, CKeyEntry *entries, int16 low, int16 high);
@@ -45,11 +45,11 @@ class CData
{
public:
wchar *chars;
- int numChars;
+ int numChars; // You can make this size_t if you want to exceed 32-bit boundaries, everything else should be ready.
CData(void) : chars(nil), numChars(0) {}
~CData(void) { Unload(); }
- void Load(uint32 length, int file, uint32 *offset);
+ void Load(size_t length, int file, size_t* offset);
void Unload(void);
};
@@ -65,10 +65,10 @@ public:
enum {MAX_MISSION_TEXTS = 90}; // beware that LCS has more
Entry data[MAX_MISSION_TEXTS];
- uint16 size;
+ uint16 size; // You can make this size_t if you want to exceed 32-bit boundaries, everything else should be ready.
CMissionTextOffsets(void) : size(0) {}
- void Load(uint32 table_size, int file, uint32* bytes_read, int);
+ void Load(size_t table_size, int file, size_t* bytes_read, int);
};
struct ChunkHeader
@@ -96,7 +96,7 @@ public:
wchar GetUpperCase(wchar c);
void UpperCase(wchar *s);
void GetNameOfLoadedMissionText(char *outName);
- void ReadChunkHeader(ChunkHeader *buf, int32 file, uint32 *bytes_read);
+ void ReadChunkHeader(ChunkHeader *buf, int32 file, size_t *bytes_read);
void LoadMissionText(char *MissionTableName);
};
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index b643e336..08f14d68 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -1349,7 +1349,7 @@ CAutomobile::ProcessControl(void)
if(!IsAlarmOn())
ReduceHornCounter();
}else{
- if(UsesSiren(GetModelIndex())){
+ if(UsesSiren()){
if(Pads[0].bHornHistory[Pads[0].iCurrHornHistory]){
if(Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+4) % 5] &&
Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+3) % 5])
@@ -1559,7 +1559,7 @@ CAutomobile::ProcessControl(void)
if(m_bSirenOrAlarm && (CTimer::GetFrameCounter()&7) == 5 &&
- UsesSiren(GetModelIndex()) && GetModelIndex() != MI_MRWHOOP)
+ UsesSiren() && GetModelIndex() != MI_MRWHOOP)
CCarAI::MakeWayForCarWithSiren(this);
@@ -2527,7 +2527,7 @@ CAutomobile::PreRender(void)
if(GetModelIndex() == MI_RCGOBLIN || GetModelIndex() == MI_RCRAIDER)
radius = 3.0f;
if(GetPosition().z - groundZ < radius)
- HeliDustGenerate(this, radius-(GetPosition().z - groundZ), groundZ, ceilf(rnd));
+ HeliDustGenerate(this, radius-(GetPosition().z - groundZ), groundZ, Ceil(rnd));
}
CMatrix mat;
@@ -3800,7 +3800,7 @@ void
CAutomobile::DoDriveByShootings(void)
{
CAnimBlendAssociation *anim = nil;
- CPlayerInfo* playerInfo = ((CPlayerPed*)this)->GetPlayerInfoForThisPlayerPed();
+ CPlayerInfo* playerInfo = ((CPlayerPed*)pDriver)->GetPlayerInfoForThisPlayerPed();
if (playerInfo && !playerInfo->m_bDriveByAllowed)
return;
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp
index 169bde73..c32e72bc 100644
--- a/src/vehicles/Bike.cpp
+++ b/src/vehicles/Bike.cpp
@@ -1989,7 +1989,7 @@ void
CBike::DoDriveByShootings(void)
{
CAnimBlendAssociation *anim;
- CPlayerInfo* playerInfo = ((CPlayerPed*)this)->GetPlayerInfoForThisPlayerPed();
+ CPlayerInfo* playerInfo = ((CPlayerPed*)pDriver)->GetPlayerInfoForThisPlayerPed();
if (playerInfo && !playerInfo->m_bDriveByAllowed)
return;
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 673372b0..ae437f56 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -2,6 +2,7 @@
#include "General.h"
#include "Timecycle.h"
+#include "Weather.h"
#include "HandlingMgr.h"
#include "CarAI.h"
#include "CarCtrl.h"
@@ -13,9 +14,11 @@
#include "Darkel.h"
#include "Explosion.h"
#include "Particle.h"
+#include "ParticleObject.h"
#include "WaterLevel.h"
#include "Floater.h"
#include "World.h"
+#include "Stats.h"
#include "Pools.h"
#include "Pad.h"
#include "Boat.h"
@@ -23,6 +26,8 @@
#include "RpAnimBlend.h"
#include "Record.h"
+//--MIAMI: file done
+
#define INVALID_ORIENTATION (-9999.99f)
float fShapeLength = 0.4f;
@@ -51,11 +56,15 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
m_fBrake = 0.0f;
m_fSteeringLeftRight = 0.0f;
m_nPadID = 0;
- m_fMovingHiRotation = 0.0f;
+ m_fMovingRotation = 0.0f;
+ m_fMovingSpeed = 0.0f;
+ m_skimmerThingTimer = 0.0f;
+ m_nPoliceShoutTimer = CTimer::GetTimeInMilliseconds();
SetModelIndex(mi);
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)minfo->m_handlingId);
pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)minfo->m_handlingId);
+ pBoatHandling = mod_HandlingManager.GetBoatPointer((eHandlingId)minfo->m_handlingId);
minfo->ChooseVehicleColour(m_currentColour1, m_currentColour2);
m_fMass = pHandling->fMass;
@@ -68,11 +77,7 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
m_fGasPedal = 0.0f;
m_fBrakePedal = 0.0f;
- m_fPropellerZ = 0.25f;
- m_fPropellerY = 0.35f;
- m_waterMoveDrag = CVector(0.7f, 0.998f, 0.999f);
- m_waterTurnDrag = CVector(0.85f, 0.96f, 0.96f);
- _unk2 = false;
+ m_boat_unused3 = false;
m_fVolumeUnderWater = 7.0f;
m_fPrevVolumeUnderWater = 7.0f;
@@ -85,6 +90,7 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
bIsInWater = true;
m_phys_unused1 = 0.0f;
+ m_boat_unused2 = 0;
m_bIsAnchored = true;
m_fOrientation = INVALID_ORIENTATION;
bTouchingWater = true;
@@ -96,6 +102,11 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
m_afWakePointLifeTime[i] = 0.0f;
m_nAmmoInClip = 20;
+
+ if(GetModelIndex() == MI_MARQUIS)
+ m_boom.Init(-PI/10.0f, PI/10.0f, 0, 2);
+ else
+ m_boom.Init(-PI/5.0f, PI/5.0f, 0, 2);
}
void
@@ -118,32 +129,51 @@ CBoat::ProcessControl(void)
PruneWakeTrail();
+ if(bRenderScorched)
+ m_fBuoyancy *= 0.99f;
+
+ if(FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){
+ CVehicle *playerVeh = FindPlayerVehicle();
+ if(playerVeh && playerVeh->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT &&
+ (AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY ||
+ AutoPilot.m_nCarMission == MISSION_RAMPLAYER_CLOSE ||
+ AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_FARAWAY ||
+ AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE ||
+ AutoPilot.m_nCarMission == MISSION_ATTACKPLAYER) &&
+ CTimer::GetTimeInMilliseconds() > m_nPoliceShoutTimer){
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_115, 0.0f);
+ m_nPoliceShoutTimer = CTimer::GetTimeInMilliseconds() + 4500 + (CGeneral::GetRandomNumber()&0xFFF);
+ }
+ }
+
int r, g, b;
+ RwRGBA dropColor = { 0, 0, 0, 0 };
RwRGBA splashColor, jetColor;
- r = 114.75f*(CTimeCycle::GetAmbientRed() + 0.5f*CTimeCycle::GetDirectionalRed());
- g = 114.75f*(CTimeCycle::GetAmbientGreen() + 0.5f*CTimeCycle::GetDirectionalGreen());
- b = 114.75f*(CTimeCycle::GetAmbientBlue() + 0.5f*CTimeCycle::GetDirectionalBlue());
+ r = 127.5f*(CTimeCycle::GetAmbientRed_Obj() + 0.5f*CTimeCycle::GetDirectionalRed());
+ g = 127.5f*(CTimeCycle::GetAmbientGreen_Obj() + 0.5f*CTimeCycle::GetDirectionalGreen());
+ b = 127.5f*(CTimeCycle::GetAmbientBlue_Obj() + 0.5f*CTimeCycle::GetDirectionalBlue());
r = clamp(r, 0, 255);
g = clamp(g, 0, 255);
b = clamp(b, 0, 255);
splashColor.red = r;
splashColor.green = g;
splashColor.blue = b;
- splashColor.alpha = CGeneral::GetRandomNumberInRange(128, 150);
+ splashColor.alpha = CGeneral::GetRandomNumberInRange(160, 196);
- r = 242.25f*(CTimeCycle::GetAmbientRed() + 0.5f*CTimeCycle::GetDirectionalRed());
- g = 242.25f*(CTimeCycle::GetAmbientGreen() + 0.5f*CTimeCycle::GetDirectionalGreen());
- b = 242.25f*(CTimeCycle::GetAmbientBlue() + 0.5f*CTimeCycle::GetDirectionalBlue());
+ r = 229.5f*(CTimeCycle::GetAmbientRed() + 0.85f*CTimeCycle::GetDirectionalRed());
+ g = 229.5f*(CTimeCycle::GetAmbientGreen() + 0.85f*CTimeCycle::GetDirectionalGreen());
+ b = 229.5f*(CTimeCycle::GetAmbientBlue() + 0.85f*CTimeCycle::GetDirectionalBlue());
r = clamp(r, 0, 255);
g = clamp(g, 0, 255);
b = clamp(b, 0, 255);
jetColor.red = r;
jetColor.green = g;
jetColor.blue = b;
- jetColor.alpha = CGeneral::GetRandomNumberInRange(96, 128);
+ jetColor.alpha = CGeneral::GetRandomNumberInRange(196, 228);
CGeneral::GetRandomNumber(); // unused
+ UpdateClumpAlpha();
ProcessCarAlarm();
switch(GetStatus()){
@@ -181,7 +211,7 @@ CBoat::ProcessControl(void)
bIsHandbrakeOn = false;
m_fBrakePedal = 0.5f;
m_fGasPedal = 0.0f;
- if((GetPosition() - CWorld::Players[CWorld::PlayerInFocus].GetPos()).Magnitude() > 150.0f){
+ if((GetPosition() - FindPlayerCentreOfWorld_NoSniperShift()).Magnitude() > 150.0f){
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f);
return;
@@ -192,33 +222,42 @@ CBoat::ProcessControl(void)
float collisionDamage = pHandling->fCollisionDamageMultiplier * m_fDamageImpulse;
#ifdef FIX_BUGS
- if (collisionDamage > 25.0f && GetStatus() != STATUS_WRECKED && m_fHealth >= 150.0f && !bCollisionProof) {
+ if(GetStatus() == STATUS_PLAYER && CStats::GetPercentageProgress() >= 100.0f)
+ collisionDamage *= 0.5f;
+ if (collisionDamage > 25.0f && GetStatus() != STATUS_WRECKED && !bCollisionProof) {
#else
- if(collisionDamage > 25.0f && GetStatus() != STATUS_WRECKED && m_fHealth >= 150.0f){
+ if(collisionDamage > 25.0f && GetStatus() != STATUS_WRECKED){
#endif
float prevHealth = m_fHealth;
- if(this == FindPlayerVehicle()){
- if(bTakeLessDamage)
- m_fHealth -= (collisionDamage-25.0f)/6.0f;
- else
- m_fHealth -= (collisionDamage-25.0f)/2.0f;
- }else{
- if(collisionDamage > 60.0f && pDriver)
- pDriver->Say(SOUND_PED_CAR_COLLISION);
- if(bTakeLessDamage)
- m_fHealth -= (collisionDamage-25.0f)/12.0f;
- else
- m_fHealth -= (collisionDamage-25.0f)/4.0f;
- }
+ if(prevHealth >= 250.0f){
+#ifndef FIX_BUGS
+ // if collisionDamage < 50 we actually increase health here...
+ if(GetStatus() == STATUS_PLAYER && CStats::GetPercentageProgress() >= 100.0f)
+ collisionDamage *= 0.5f;
+#endif
+ if(this == FindPlayerVehicle()){
+ if(bTakeLessDamage)
+ m_fHealth -= (collisionDamage-25.0f)/6.0f;
+ else
+ m_fHealth -= (collisionDamage-25.0f)/2.0f;
+ }else{
+ if(collisionDamage > 60.0f && pDriver)
+ pDriver->Say(SOUND_PED_CAR_COLLISION);
+ if(bTakeLessDamage)
+ m_fHealth -= (collisionDamage-25.0f)/12.0f;
+ else
+ m_fHealth -= (collisionDamage-25.0f)/4.0f;
+ }
- if(m_fHealth <= 0.0f && prevHealth > 0.0f){
- m_fHealth = 1.0f;
- m_pSetOnFireEntity = m_pDamageEntity;
+ if(m_fHealth <= 0.0f && prevHealth > 0.0f){
+ m_fHealth = 1.0f;
+ m_pSetOnFireEntity = m_pDamageEntity;
+ }
}
}
// Damage particles
- if(m_fHealth <= 600.0f && GetStatus() != STATUS_WRECKED &&
+ if(m_fHealth <= 460.0f && GetStatus() != STATUS_WRECKED &&
Abs(GetPosition().x - TheCamera.GetPosition().x) < 200.0f &&
Abs(GetPosition().y - TheCamera.GetPosition().y) < 200.0f){
float speedSq = m_vecMoveSpeed.MagnitudeSqr();
@@ -244,7 +283,7 @@ CBoat::ProcessControl(void)
smokePos = GetMatrix() * smokePos;
// On fire
- if(m_fHealth < 150.0f){
+ if(m_fHealth < 250.0f){
CParticle::AddParticle(PARTICLE_CARFLAME, smokePos,
CVector(0.0f, 0.0f, CGeneral::GetRandomNumberInRange(2.25f/200.0f, 0.09f)),
nil, 0.9f);
@@ -261,23 +300,26 @@ CBoat::ProcessControl(void)
if(speedSq < 0.25f && (CTimer::GetFrameCounter() + m_randomSeed) & 1)
CParticle::AddParticle(PARTICLE_ENGINE_STEAM, smokePos, smokeDir);
- if(speedSq < 0.25f && m_fHealth <= 350.0f)
+ if(speedSq < 0.25f && m_fHealth <= 390.0f)
CParticle::AddParticle(PARTICLE_ENGINE_SMOKE, smokePos, 1.25f*smokeDir);
}
+ bool bSeparateTurnForce = bHasHitWall;
CPhysical::ProcessControl();
CVector buoyanceImpulse(0.0f, 0.0f, 0.0f);
CVector buoyancePoint(0.0f, 0.0f, 0.0f);
- if(mod_Buoyancy.ProcessBuoyancy(this, pHandling->fBuoyancy, &buoyancePoint, &buoyanceImpulse)){
+ if(mod_Buoyancy.ProcessBuoyancyBoat(this, pHandling->fBuoyancy, &buoyancePoint, &buoyanceImpulse, bSeparateTurnForce)){
// Process boat in water
if(0.1f * m_fMass * GRAVITY*CTimer::GetTimeStep() < buoyanceImpulse.z){
bBoatInWater = true;
bIsInWater = true;
if (GetUp().z < -0.6f && Abs(GetMoveSpeed().x) < 0.05 && Abs(GetMoveSpeed().y) < 0.05) {
bIsDrowning = true;
- if (pDriver)
+ if (pDriver){
+ pDriver->bTouchingWater = true;
pDriver->InflictDamage(nil, WEAPONTYPE_DROWNING, CTimer::GetTimeStep(), PEDPIECE_TORSO, 0);
+ }
}
else
bIsDrowning = false;
@@ -289,32 +331,61 @@ CBoat::ProcessControl(void)
m_fVolumeUnderWater = mod_Buoyancy.m_volumeUnderWater;
m_vecBuoyancePoint = buoyancePoint;
- ApplyMoveForce(buoyanceImpulse);
- if(!onLand)
- ApplyTurnForce(buoyanceImpulse, buoyancePoint);
+ if(GetModelIndex() == MI_SKIMMER && GetUp().z < -0.5f && Abs(m_vecMoveSpeed.x) < 0.2f && Abs(m_vecMoveSpeed.y) < 0.2f)
+ ApplyMoveForce(0.03f*buoyanceImpulse);
+ else
+ ApplyMoveForce(buoyanceImpulse);
+ if(bSeparateTurnForce)
+ ApplyTurnForce(0.4f*buoyanceImpulse, buoyancePoint);
+
+ // TODO: what is this?
+ if(GetModelIndex() == MI_SKIMMER)
+ if(m_skimmerThingTimer != 0.0f ||
+ GetForward().z < -0.5f && GetUp().z > -0.5f && m_vecMoveSpeed.z < -0.15f &&
+ buoyanceImpulse.z > 0.01f*m_fMass * GRAVITY*CTimer::GetTimeStep() &&
+ buoyanceImpulse.z < 0.4f*m_fMass * GRAVITY*CTimer::GetTimeStep()){
+ float turnImpulse = -0.00017f*GetForward().z*buoyanceImpulse.z * m_fMass*CTimer::GetTimeStep();
+ ApplyTurnForce(turnImpulse*GetForward(), GetUp());
+ bBoatInWater = false;
+ //BUG? aren't we forgetting the timestep here?
+ float moveImpulse = -0.5f*DotProduct(m_vecMoveSpeed, GetForward()) * m_fMass;
+ ApplyMoveForce(moveImpulse*GetForward());
+ if(m_skimmerThingTimer == 0.0f)
+ m_skimmerThingTimer = CTimer::GetTimeInMilliseconds() + 300.0f;
+ else if(m_skimmerThingTimer < CTimer::GetTimeInMilliseconds())
+ m_skimmerThingTimer = 0.0f;
+ }
if(!onLand && bBoatInWater && GetUp().z > 0.0f){
- float impulse;
- if(m_fGasPedal > 0.05f)
- impulse = m_vecMoveSpeed.MagnitudeSqr()*pHandling->fSuspensionForceLevel*buoyanceImpulse.z*CTimer::GetTimeStep()*0.5f*m_fGasPedal;
+ float impulse = m_vecMoveSpeed.MagnitudeSqr()*pBoatHandling->fAqPlaneForce*buoyanceImpulse.z*CTimer::GetTimeStep()*0.5f;
+ if(GetModelIndex() == MI_SKIMMER)
+ impulse *= 1.0f + m_fGasPedal;
+ else if(m_fGasPedal > 0.05f)
+ impulse *= m_fGasPedal;
else
impulse = 0.0f;
- impulse = Min(impulse, GRAVITY*pHandling->fSuspensionDampingLevel*m_fMass*CTimer::GetTimeStep());
+ impulse = Min(impulse, GRAVITY*pBoatHandling->fAqPlaneLimit*m_fMass*CTimer::GetTimeStep());
ApplyMoveForce(impulse*GetUp());
- ApplyTurnForce(impulse*GetUp(), buoyancePoint - pHandling->fSuspensionBias*GetForward());
+ ApplyTurnForce(impulse*GetUp(), buoyancePoint - pBoatHandling->fAqPlaneOffset*GetForward());
}
// Handle boat moving forward
- if(Abs(m_fGasPedal) > 0.05f || m_vecMoveSpeed.Magnitude() > 0.01f){
- if(bBoatInWater)
+ float fwdSpeed = 1.0f;
+ if(Abs(m_fGasPedal) > 0.05f || (fwdSpeed = m_vecMoveSpeed.Magnitude2D()) > 0.01f){
+ if(bBoatInWater && fwdSpeed > 0.05f)
AddWakePoint(GetPosition());
- float steerFactor = 1.0f - DotProduct(m_vecMoveSpeed, GetForward());
-// if (GetModelIndex() == MI_GHOST)
-// steerFactor = 1.0f - DotProduct(m_vecMoveSpeed, GetForward())*0.3f;
- if(steerFactor < 0.0f) steerFactor = 0.0f;
+ float steerFactor = 1.0f;
+ if(GetStatus() == STATUS_PLAYER){
+ float steerLoss = DotProduct(m_vecMoveSpeed, GetForward())*pHandling->fTractionBias;
+ if(CPad::GetPad(0)->GetHandBrake())
+ steerLoss *= 0.5f;
+ steerFactor -= steerLoss;
+ steerFactor = clamp(steerFactor, 0.0f, 1.0f);
+ }
- CVector propeller(0.0f, -pHandling->Dimension.y*m_fPropellerY, -pHandling->Dimension.z*m_fPropellerZ);
+ CVector boundMin = GetColModel()->boundingBox.min;
+ CVector propeller(0.0f, boundMin.y*pBoatHandling->fThrustY, boundMin.z*pBoatHandling->fThrustZ);
propeller = Multiply3x3(GetMatrix(), propeller);
CVector propellerWorld = GetPosition() + propeller;
@@ -330,7 +401,11 @@ CBoat::ProcessControl(void)
propellerDepth = SQR(propellerDepth);
bPropellerInWater = true;
- if(Abs(m_fGasPedal) > 0.05f){
+ bool bSlowAhead = false;
+ if(Abs(m_fGasPedal) > 0.01f && GetModelIndex() != MI_SKIMMER){
+ if(Abs(m_fGasPedal) < 0.05f)
+ bSlowAhead = true;
+
CVector forceDir = Multiply3x3(GetMatrix(), CVector(-steerSin, steerCos, -Abs(m_fSteerAngle)));
CVector force = propellerDepth * m_fGasPedal * 40.0f * pHandling->Transmission.fEngineAcceleration * pHandling->fMass * forceDir;
if(force.z > 0.2f)
@@ -345,80 +420,75 @@ CBoat::ProcessControl(void)
ApplyMoveForce(force * CTimer::GetTimeStep());
}else{
ApplyMoveForce(force * CTimer::GetTimeStep());
- ApplyTurnForce(force * CTimer::GetTimeStep(), propeller - pHandling->fTractionBias*GetUp());
- float rightForce = DotProduct(GetRight(), force);
- ApplyTurnForce(-rightForce*GetRight() * CTimer::GetTimeStep(), GetUp());
+ ApplyTurnForce(force * CTimer::GetTimeStep(), propeller - pBoatHandling->fThrustAppZ*GetUp());
+ float rightForce = -DotProduct(GetRight(), force)*pHandling->fTractionMultiplier;
+ ApplyTurnForce(rightForce*GetRight() * CTimer::GetTimeStep(), GetUp());
}
// Spray some particles
CVector jetDir = -0.04f * force;
if(m_fGasPedal > 0.0f){
if(GetStatus() == STATUS_PLAYER){
- bool cameraHack = TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
- TheCamera.WhoIsInControlOfTheCamera == CAMCONTROL_OBBE;
CVector sternPos = GetColModel()->boundingBox.min;
sternPos.x = 0.0f;
sternPos.z = 0.0f;
sternPos = Multiply3x3(GetMatrix(), sternPos);
- CVector jetPos = GetPosition() + sternPos;
- if(cameraHack)
- jetPos.z = 1.0f;
- else
- jetPos.z = 0.0f;
-
-#ifdef PC_PARTICLE
- CVector wakePos = GetPosition() + sternPos;
- wakePos.z -= 0.65f;
-#else
CVector wakePos = GetPosition() + sternPos;
- wakePos.z = -0.3f;
-#endif
-
- CVector wakeDir = 0.75f * jetDir;
-
- CParticle::AddParticle(PARTICLE_BOAT_THRUSTJET, jetPos, jetDir, nil, 0.0f, jetColor);
-#ifdef PC_PARTICLE
- CParticle::AddParticle(PARTICLE_CAR_SPLASH, jetPos, 0.25f * jetDir, nil, 1.0f, splashColor,
- CGeneral::GetRandomNumberInRange(0, 30),
- CGeneral::GetRandomNumberInRange(0, 90), 3);
-#endif
- //TODO: MIAMI:
- //if(!cameraHack)
- // CParticle::AddParticle(PARTICLE_BOAT_WAKE, wakePos, wakeDir, nil, 0.0f, jetColor);
- }else if((CTimer::GetFrameCounter() + m_randomSeed) & 1){
-#ifdef PC_PARTICLE
- jetDir.z = 0.018f;
- jetDir.x *= 0.01f;
- jetDir.y *= 0.01f;
- propellerWorld.z += 1.5f;
-
- CParticle::AddParticle(PARTICLE_BOAT_SPLASH, propellerWorld, jetDir, nil, 1.5f, jetColor);
-#else
- jetDir.z = 0.018f;
- jetDir.x *= 0.03f;
- jetDir.y *= 0.03f;
- propellerWorld.z += 1.0f;
+ // no actual particles for player...
+ }else if(IsVisible() && ((CTimer::GetFrameCounter() + m_randomSeed) & 1) &&
+ CVisibilityPlugins::GetDistanceSquaredFromCamera((RwV3d*)&propellerWorld) < SQR(70.0f * TheCamera.GenerationDistMultiplier)){
+ jetDir.z = 0.015f;
+ jetDir.x *= 3.5f;
+ jetDir.y *= 3.5f;
+ propellerWorld.z += 0.5f;
- CParticle::AddParticle(PARTICLE_BOAT_SPLASH, propellerWorld, jetDir, nil, 0.0f, jetColor);
-#endif
+ CParticle::AddParticle(PARTICLE_BOAT_SPLASH, propellerWorld, jetDir, nil, 1.25f, jetColor,
+ CGeneral::GetRandomNumberInRange(0, 5),
+ CGeneral::GetRandomNumberInRange(0, 90), 1, 500);
-#ifdef PC_PARTICLE
- CParticle::AddParticle(PARTICLE_CAR_SPLASH, propellerWorld, 0.1f * jetDir, nil, 0.5f, splashColor,
+ CParticle::AddParticle(PARTICLE_CAR_SPLASH, propellerWorld, 0.75f * jetDir, nil, 0.5f, splashColor,
CGeneral::GetRandomNumberInRange(0, 30),
- CGeneral::GetRandomNumberInRange(0, 90), 3);
-#endif
+ CGeneral::GetRandomNumberInRange(0, 45), 3, 500);
}
}
- }else if(!onLand){
- float force = 50.0f*DotProduct(m_vecMoveSpeed, GetForward());
- if(force > 10.0f) force = 10.0f;
+ }else
+ bSlowAhead = true;
+
+ if(!onLand && bSlowAhead){
+ float force = pHandling->fTractionLoss*DotProduct(m_vecMoveSpeed, GetForward());
+ force = Min(force, 0.01f*m_fTurnMass);
+ if(m_fGasPedal > 0.01f){
+ if(GetStatus() == STATUS_PLAYER)
+ force *= (0.55f - Abs(m_fGasPedal)) * 1.3f;
+ else
+ force *= (0.55f - Abs(m_fGasPedal)) * 2.5f;
+ }
+ if(m_fGasPedal < 0.0f && force > 0.0f || m_fGasPedal > 0.0f && force < 0.0f)
+ force *= -1.0f;
CVector propellerForce = propellerDepth * Multiply3x3(GetMatrix(), force*CVector(-steerSin, 0.0f, 0.0f));
- ApplyMoveForce(propellerForce * CTimer::GetTimeStep()*0.5f);
- ApplyTurnForce(propellerForce * CTimer::GetTimeStep()*0.5f, propeller);
+ ApplyMoveForce(propellerForce * CTimer::GetTimeStep());
+ ApplyTurnForce(propellerForce * CTimer::GetTimeStep(), propeller);
+ float rightForce = -steerSin * force * 0.75f/steerFactor * Max(CTimer::GetTimeStep(), 0.01f);
+ ApplyTurnForce(GetRight() * rightForce, GetUp());
}
}else
bPropellerInWater = false;
+
+ if(pHandling->fSuspensionBias != 0.0f){
+ CVector right = CrossProduct(GetForward(), CVector(0.0f, 0.0f, 1.0f));
+ float rightSpeed = DotProduct(m_vecMoveSpeed, right);
+ float impulse = 0.1f*pHandling->fSuspensionBias * m_fMass * m_fVolumeUnderWater * rightSpeed * CTimer::GetTimeStep();
+ ApplyMoveForce(right - impulse * 0.3f * CVector(-right.y, right.x, 0.0f));
+ }
+
+ if(GetStatus() == STATUS_PLAYER && CPad::GetPad(0)->GetHandBrake()){
+ float fwdSpeed = DotProduct(m_vecMoveSpeed, GetForward());
+ if(fwdSpeed > 0.0f){
+ float impulse = -0.1f*pHandling->fSuspensionLowerLimit * m_fMass * m_fVolumeUnderWater * fwdSpeed * CTimer::GetTimeStep();
+ ApplyMoveForce(impulse * GetForward());
+ }
+ }
}
// Slow down or push down boat as it approaches the world limits
@@ -427,111 +497,249 @@ CBoat::ProcessControl(void)
m_vecMoveSpeed.y = Min(m_vecMoveSpeed.y, -(GetPosition().y - (WORLD_MAX_Y-100.0f))*0.01f); // north
m_vecMoveSpeed.y = Max(m_vecMoveSpeed.y, -(GetPosition().y - (WORLD_MIN_Y+100.0f))*0.01f); // south
- if(!onLand && bBoatInWater)
+ if(!onLand && bBoatInWater && !bSeparateTurnForce)
ApplyWaterResistance();
- // No idea what exactly is going on here besides drag in YZ
- float fx = Pow(m_waterTurnDrag.x, CTimer::GetTimeStep());
- float fy = Pow(m_waterTurnDrag.y, CTimer::GetTimeStep());
- float fz = Pow(m_waterTurnDrag.z, CTimer::GetTimeStep());
- m_vecTurnSpeed = Multiply3x3(m_vecTurnSpeed, GetMatrix()); // invert - to local space
- // TODO: figure this out
- float magic = 1.0f/(1000.0f * SQR(m_vecTurnSpeed.x) + 1.0f) * fx;
- m_vecTurnSpeed.y *= fy;
- m_vecTurnSpeed.z *= fz;
- float forceUp = (magic - 1.0f) * m_vecTurnSpeed.x * m_fTurnMass;
- m_vecTurnSpeed = Multiply3x3(GetMatrix(), m_vecTurnSpeed); // back to world
- CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass);
- ApplyTurnForce(CVector(0.0f, 0.0f, forceUp), com + GetForward());
+ if((GetModelIndex() != MI_SKIMMER || m_skimmerThingTimer == 0.0f) && !bSeparateTurnForce){
+ // No idea what exactly is going on here besides drag in YZ
+ float fx = Pow(pBoatHandling->vecTurnRes.x, CTimer::GetTimeStep());
+ float fy = Pow(pBoatHandling->vecTurnRes.y, CTimer::GetTimeStep());
+ float fz = Pow(pBoatHandling->vecTurnRes.z, CTimer::GetTimeStep());
+ m_vecTurnSpeed = Multiply3x3(m_vecTurnSpeed, GetMatrix()); // invert - to local space
+ // TODO: figure this out
+ float magic = 1.0f/(1000.0f * SQR(m_vecTurnSpeed.x) + 1.0f) * fx;
+ m_vecTurnSpeed.y *= fy;
+ m_vecTurnSpeed.z *= fz;
+ float forceUp = (magic - 1.0f) * m_vecTurnSpeed.x * m_fTurnMass;
+ m_vecTurnSpeed = Multiply3x3(GetMatrix(), m_vecTurnSpeed); // back to world
+ CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass);
+ ApplyTurnForce(forceUp*GetUp(), com + GetForward());
+ }
m_nDeltaVolumeUnderWater = (m_fVolumeUnderWater-m_fPrevVolumeUnderWater)*10000;
// Falling into water
- if(!onLand && bBoatInWater && GetUp().z > 0.0f && m_nDeltaVolumeUnderWater > 200){
- DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_SPLASH, m_nDeltaVolumeUnderWater);
-
- float speedUp = m_vecMoveSpeed.MagnitudeSqr() * m_nDeltaVolumeUnderWater * 0.0004f;
- if(speedUp + m_vecMoveSpeed.z > pHandling->fBrakeDeceleration)
- speedUp = pHandling->fBrakeDeceleration - m_vecMoveSpeed.z;
- if(speedUp < 0.0f) speedUp = 0.0f;
- float speedFwd = DotProduct(m_vecMoveSpeed, GetForward());
- speedFwd *= -m_nDeltaVolumeUnderWater * 0.01f * pHandling->fBrakeBias;
- CVector speed = speedFwd*GetForward() + CVector(0.0f, 0.0f, speedUp);
- CVector splashImpulse = speed * m_fMass;
- ApplyMoveForce(splashImpulse);
- ApplyTurnForce(splashImpulse, buoyancePoint);
+ if(!onLand && bBoatInWater && GetUp().z > 0.0f){
+ float splashVol = m_nDeltaVolumeUnderWater*pBoatHandling->fWaveAudioMult;
+ if(splashVol > 200.0f)
+ DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_SPLASH, splashVol);
+
+ if(m_nDeltaVolumeUnderWater > 200){
+ float speedUp = m_vecMoveSpeed.MagnitudeSqr() * m_nDeltaVolumeUnderWater * 0.001f;
+ if(speedUp + m_vecMoveSpeed.z > pHandling->fBrakeDeceleration)
+ speedUp = pHandling->fBrakeDeceleration - m_vecMoveSpeed.z;
+ if(speedUp < 0.0f) speedUp = 0.0f;
+ float speedFwd = DotProduct(m_vecMoveSpeed, GetForward());
+ speedFwd *= -m_nDeltaVolumeUnderWater * 0.01f * pHandling->fBrakeBias;
+ CVector speed = speedFwd*GetForward() + CVector(0.0f, 0.0f, speedUp);
+ CVector splashImpulse = speed * m_fMass;
+ ApplyMoveForce(splashImpulse);
+ ApplyTurnForce(splashImpulse, buoyancePoint);
+ }
}
- // Spray particles on sides of boat
-#ifdef PC_PARTICLE
- if(m_nDeltaVolumeUnderWater > 75)
-#else
- if(m_nDeltaVolumeUnderWater > 120)
-#endif
- {
- float speed = m_vecMoveSpeed.Magnitude();
- float splash1Size = speed;
- float splash2Size = float(m_nDeltaVolumeUnderWater) * 0.005f * 0.2f;
- float front = 0.9f * GetColModel()->boundingBox.max.y;
- if(splash1Size > 0.75f) splash1Size = 0.75f;
-
- CVector dir, pos;
-
- // right
-#ifdef PC_PARTICLE
- dir = -0.5f*m_vecMoveSpeed;
- dir.z += 0.1f*speed;
- dir += 0.5f*GetRight()*speed;
- pos = front*GetForward() + 0.5f*GetRight() + GetPosition() + m_vecBuoyancePoint;
- CWaterLevel::GetWaterLevel(pos, &pos.z, true);
-#else
- dir = 0.3f*m_vecMoveSpeed;
- dir.z += 0.05f*speed;
- dir += 0.5f*GetRight()*speed;
- pos = (GetPosition() + m_vecBuoyancePoint) + (1.5f*GetRight());
-#endif
-
-#ifdef PC_PARTICLE
- CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, 0.75f * dir, nil, splash1Size, splashColor,
- CGeneral::GetRandomNumberInRange(0, 30),
- CGeneral::GetRandomNumberInRange(0, 90), 1);
- CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size, jetColor);
-#else
- CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size);
-#endif
-
-
- // left
-#ifdef PC_PARTICLE
- dir = -0.5f*m_vecMoveSpeed;
- dir.z += 0.1f*speed;
- dir -= 0.5f*GetRight()*speed;
- pos = front*GetForward() - 0.5f*GetRight() + GetPosition() + m_vecBuoyancePoint;
- CWaterLevel::GetWaterLevel(pos, &pos.z, true);
-#else
- dir = 0.3f*m_vecMoveSpeed;
- dir.z += 0.05f*speed;
- dir -= 0.5f*GetRight()*speed;
- pos = (GetPosition() + m_vecBuoyancePoint) - (1.5f*GetRight());
-#endif
-
-#ifdef PC_PARTICLE
- CParticle::AddParticle(PARTICLE_CAR_SPLASH, pos, 0.75f * dir, nil, splash1Size, splashColor,
- CGeneral::GetRandomNumberInRange(0, 30),
- CGeneral::GetRandomNumberInRange(0, 90), 1);
- CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size, jetColor);
-#else
- CParticle::AddParticle(PARTICLE_BOAT_SPLASH, pos, dir, nil, splash2Size);
-#endif
+ // Splashes
+ float speed = m_vecMoveSpeed.Magnitude();
+ if(speed > 0.05f && GetUp().x > 0.0f && !TheCamera.GetLookingForwardFirstPerson() && IsVisible() &&
+ (AutoPilot.m_nCarMission != MISSION_CRUISE || (CTimer::GetFrameCounter()&2) == 0)){
+ CVector splashPos, splashDir;
+ float splashSize, front, waterLevel;
+
+ switch(GetModelIndex()){
+ case MI_RIO:
+ splashSize = speed;
+ front = 0.9f * GetColModel()->boundingBox.max.y;
+ splashDir = -0.5f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir += 0.35f*speed*GetRight();
+ splashPos = GetPosition() + 1.85f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ case MI_SQUALO:
+ splashSize = speed;
+ front = 0.75f * GetColModel()->boundingBox.max.y;
+ splashDir = -0.125f * m_vecMoveSpeed;
+ splashDir.z += 0.15f*speed;
+ splashDir += 0.25f*speed*GetRight();
+ splashPos = GetPosition() + m_vecBuoyancePoint + 0.5f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ case MI_REEFER:
+ splashSize = speed;
+ front = 0.75f * GetColModel()->boundingBox.max.y;
+ splashDir = -0.5f * m_vecMoveSpeed;
+ splashDir.z += 0.15f*speed;
+ splashDir += 0.5f*speed*GetRight();
+ splashPos = GetPosition() + m_vecBuoyancePoint + 1.3f*GetRight() + front*GetForward();
+ break;
+ case MI_COASTG:
+ splashSize = 0.25f*speed;
+ front = 0.8f * GetColModel()->boundingBox.max.y;
+ splashDir = 0.165f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir += 0.15f*speed*GetRight();
+ splashPos = GetPosition() + 0.65f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ case MI_DINGHY:
+ splashSize = 0.25f*speed;
+ front = 0.9f * GetColModel()->boundingBox.max.y;
+ splashDir = 0.35f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir += 0.25f*speed*GetRight();
+ splashPos = GetPosition() + 0.6f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ default:
+ splashSize = speed;
+ front = 0.9f * GetColModel()->boundingBox.max.y;
+ splashDir = -0.5f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir += 0.35f*speed*GetRight();
+ splashPos = GetPosition() + m_vecBuoyancePoint + 0.5f*GetRight() + front*GetForward();
+ break;
+ }
+ if(splashSize > 0.75f) splashSize = 0.75f;
+ if(AutoPilot.m_nCarMission == MISSION_CRUISE)
+ splashDir *= 1.5f;
+ static float lifeMult = 1000.0f;
+ static float lifeBase = 300.0f;
+ splashDir.z += 0.0003f*m_nDeltaVolumeUnderWater;
+ CWaterLevel::GetWaterLevel(splashPos, &waterLevel, true);
+ if(splashPos.z-waterLevel < 3.0f &&
+ CVisibilityPlugins::GetDistanceSquaredFromCamera((RwV3d*)&splashPos) < SQR(70.0f * TheCamera.GenerationDistMultiplier)){
+ splashPos.z = waterLevel + 0.1f;
+ CParticle::AddParticle(PARTICLE_CAR_SPLASH, splashPos, 0.75f*splashDir, nil, splashSize+0.1f, splashColor,
+ CGeneral::GetRandomNumberInRange(0.0f, 10.0f), CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
+ 1, lifeBase + splashDir.z*lifeMult);
+ CParticle::AddParticle(PARTICLE_BOAT_SPLASH, splashPos, splashDir, nil, splashSize, jetColor,
+ CGeneral::GetRandomNumberInRange(0.0f, 0.4f), CGeneral::GetRandomNumberInRange(0.0f, 45.0f),
+ 0, lifeBase + splashDir.z*lifeMult);
+ }
+
+ switch(GetModelIndex()){
+ case MI_RIO:
+ splashDir = -0.5f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir -= 0.35f*speed*GetRight();
+ splashPos = GetPosition() - 1.85f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ case MI_SQUALO:
+ splashDir = -0.125f * m_vecMoveSpeed;
+ splashDir.z += 0.15f*speed;
+ splashDir -= 0.25f*speed*GetRight();
+ splashPos = GetPosition() + m_vecBuoyancePoint - 0.5f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ case MI_REEFER:
+ splashDir = -0.5f * m_vecMoveSpeed;
+ splashDir.z += 0.15f*speed;
+ splashDir -= 0.5f*speed*GetRight();
+ splashPos = GetPosition() + m_vecBuoyancePoint - 1.3f*GetRight() + front*GetForward();
+ break;
+ case MI_COASTG:
+ splashDir = 0.165f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir -= 0.15f*speed*GetRight();
+ splashPos = GetPosition() - 0.65f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ case MI_DINGHY:
+ splashDir = 0.35f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir -= 0.25f*speed*GetRight();
+ splashPos = GetPosition() - 0.6f*GetRight() + front*GetForward();
+ splashPos.z += 0.5f;
+ break;
+ default:
+ splashDir = -0.5f * m_vecMoveSpeed;
+ splashDir.z += 0.25f*speed;
+ splashDir -= 0.35f*speed*GetRight();
+ splashPos = GetPosition() + m_vecBuoyancePoint - 0.5f*GetRight() + front*GetForward();
+ break;
+ }
+ if(AutoPilot.m_nCarMission == MISSION_CRUISE)
+ splashDir *= 1.5f;
+ splashDir.z += 0.0003f*m_nDeltaVolumeUnderWater;
+ CWaterLevel::GetWaterLevel(splashPos, &waterLevel, true);
+ if(splashPos.z-waterLevel < 3.0f &&
+ CVisibilityPlugins::GetDistanceSquaredFromCamera((RwV3d*)&splashPos) < SQR(70.0f * TheCamera.GenerationDistMultiplier)){
+ splashPos.z = waterLevel + 0.1f;
+ CParticle::AddParticle(PARTICLE_CAR_SPLASH, splashPos, 0.75f*splashDir, nil, splashSize+0.1f, splashColor,
+ CGeneral::GetRandomNumberInRange(0.0f, 10.0f), CGeneral::GetRandomNumberInRange(0.0f, 90.0f),
+ 1, lifeBase + splashDir.z*lifeMult);
+ CParticle::AddParticle(PARTICLE_BOAT_SPLASH, splashPos, splashDir, nil, splashSize, jetColor,
+ CGeneral::GetRandomNumberInRange(0.0f, 0.4f), CGeneral::GetRandomNumberInRange(0.0f, 45.0f),
+ 0, lifeBase + splashDir.z*lifeMult);
+ }
+ }
+
+ // Spray waterdrops on screen
+ if(TheCamera.GetLookingForwardFirstPerson() && FindPlayerVehicle() && FindPlayerVehicle()->IsBoat() &&
+ m_nDeltaVolumeUnderWater > 0 && numWaterDropOnScreen < 20){
+ CVector dropPos;
+ CVector dropDir(CGeneral::GetRandomNumberInRange(-0.25f, 0.25f), CGeneral::GetRandomNumberInRange(1.0f, 0.75f), 0.0f);
+
+ int frm = CGeneral::GetRandomNumber() & 1;
+ if(TheCamera.m_CameraAverageSpeed < 0.35f){
+ dropPos.x = CGeneral::GetRandomNumberInRange(50, (int)SCREEN_WIDTH-50);
+ dropPos.y = CGeneral::GetRandomNumberInRange(50, (int)SCREEN_HEIGHT-50);
+ }else{
+ dropPos.x = CGeneral::GetRandomNumberInRange(200, (int)SCREEN_WIDTH-200);
+ dropPos.y = CGeneral::GetRandomNumberInRange(150, (int)SCREEN_HEIGHT-150);
+ }
+ dropPos.z = 1.0f;
+
+ if(TheCamera.m_CameraAverageSpeed > 0.35f){
+ if((int)SCREEN_WIDTH / 2 < dropPos.x)
+ dropPos.x += CGeneral::GetRandomNumberInRange(0.35f, TheCamera.m_CameraAverageSpeed)*7.5f;
+ else
+ dropPos.x -= CGeneral::GetRandomNumberInRange(0.35f, TheCamera.m_CameraAverageSpeed)*7.5f;
+
+ if((int)SCREEN_HEIGHT / 2 < dropPos.y)
+ dropPos.y += CGeneral::GetRandomNumberInRange(0.35f, TheCamera.m_CameraAverageSpeed)*7.5f;
+ else
+ dropPos.y -= CGeneral::GetRandomNumberInRange(0.35f, TheCamera.m_CameraAverageSpeed)*7.5f;
+ }
+
+ if(CParticle::AddParticle(PARTICLE_WATERDROP, dropPos, dropDir, nil,
+ CGeneral::GetRandomNumberInRange(0.1f, 0.15f), dropColor, 0, 0, frm))
+ numWaterDropOnScreen++;
+ }
+
+ if(m_fPrevVolumeUnderWater == 0.0f && m_fVolumeUnderWater > 0.0f && GetModelIndex() == MI_SKIMMER){
+ CVector splashDir(0.0f, 0.0f, 0.25f*speed);
+ CVector splashPos = GetPosition();
+ float level;
+ CWaterLevel::GetWaterLevel(splashPos, &level, true);
+ splashPos.z = level;
+ CParticleObject::AddObject(POBJECT_CAR_WATER_SPLASH, splashPos, splashDir, 0.0f, 65, splashColor, true);
}
m_fPrevVolumeUnderWater = m_fVolumeUnderWater;
}else{
bBoatInWater = false;
bIsInWater = false;
+#ifdef FIX_BUGS
bIsDrowning = false;
+#endif
}
+ if(m_modelIndex == MI_SKIMMER && CTimer::GetTimeStep() > 0.0f){
+ if(GetStatus() == STATUS_PLAYER){
+ if(m_fMovingSpeed < 0.22f)
+ m_fMovingSpeed += 0.001f*CTimer::GetTimeStep();
+ FlyingControl(FLIGHT_MODEL_SEAPLANE);
+ }else{
+ if(m_fMovingSpeed > 0.0005f*CTimer::GetTimeStep())
+ m_fMovingSpeed -= 0.0005f*CTimer::GetTimeStep();
+ else
+ m_fMovingSpeed = 0.0f;
+ }
+ }else if(bCheat8)
+ FlyingControl(FLIGHT_MODEL_PLANE);
+
if(m_bIsAnchored){
m_vecMoveSpeed.x = 0.0f;
m_vecMoveSpeed.y = 0.0f;
@@ -542,29 +750,7 @@ CBoat::ProcessControl(void)
// is this some inlined CPlaceable method?
CVector pos = GetPosition();
GetMatrix().RotateZ(m_fOrientation - GetForward().Heading());
- GetMatrix().GetPosition() = pos;
- }
- }
-
- if (m_modelIndex == MI_SKIMMER && CTimer::GetTimeStep() > 0.0f) {
- if (GetStatus() == STATUS_PLAYER) {
- if (m_fPropellerY <= CTimer::GetTimeStep() * 0.0005f) {
- m_fPropellerY = 0.0f;
- }
- else {
- m_fPropellerY -= CTimer::GetTimeStep() * 0.0005f;
- }
- }
- else {
- if (m_fPropellerY < 0.22f) {
- m_fPropellerY += CTimer::GetTimeStep() * 0.001f;
- }
- FlyingControl(FLIGHT_MODEL_SEAPLANE);
- }
- }
- else {
- if (bCheat8) {
- FlyingControl(FLIGHT_MODEL_PLANE);
+ GetMatrix().SetTranslateOnly(pos);
}
}
@@ -596,17 +782,21 @@ CBoat::ProcessControlInputs(uint8 pad)
m_fGasPedal = m_fAccelerate;
}
+float fSeaPlaneWaterResistance = 30.0f;
+
void
CBoat::ApplyWaterResistance(void)
{
- float fwdSpeed = DotProduct(GetMoveSpeed(), GetForward());
// TODO: figure out how this works
- float magic = (SQR(fwdSpeed) + 0.05f) * (0.001f * SQR(m_fVolumeUnderWater) * m_fMass) + 1.0f;
+ float resistance = 0.001f * pHandling->fSuspensionForceLevel * SQR(m_fVolumeUnderWater) * m_fMass;
+ if(GetModelIndex() == MI_SKIMMER)
+ resistance *= fSeaPlaneWaterResistance;
+ float fwdSpeed = DotProduct(GetMoveSpeed(), GetForward());
+ float magic = (SQR(fwdSpeed) + 0.05f) * resistance + 1.0f;
magic = Abs(magic);
- // FRAMETIME
- float fx = Pow(m_waterMoveDrag.x/magic, 0.5f*CTimer::GetTimeStep());
- float fy = Pow(m_waterMoveDrag.y/magic, 0.5f*CTimer::GetTimeStep());
- float fz = Pow(m_waterMoveDrag.z/magic, 0.5f*CTimer::GetTimeStep());
+ float fx = Pow(pBoatHandling->vecMoveRes.x/magic, 0.5f*CTimer::GetTimeStep());
+ float fy = Pow(pBoatHandling->vecMoveRes.y/magic, 0.5f*CTimer::GetTimeStep());
+ float fz = Pow(pBoatHandling->vecMoveRes.z/magic, 0.5f*CTimer::GetTimeStep());
m_vecMoveSpeed = Multiply3x3(m_vecMoveSpeed, GetMatrix()); // invert - to local space
m_vecMoveSpeed.x *= fx;
@@ -655,19 +845,14 @@ CBoat::BlowUpCar(CEntity *culprit)
m_nBombTimer = 0;
TheCamera.CamShake(0.7f, GetPosition().x, GetPosition().y, GetPosition().z);
- if(this == FindPlayerVehicle())
- FindPlayerPed()->m_fHealth = 0.0f; // kill player
- if(pDriver){
- CDarkel::RegisterKillByPlayer(pDriver, WEAPONTYPE_EXPLOSION);
- pDriver->SetDead();
- pDriver->FlagToDestroyWhenNextProcessed();
- }
+ KillPedsInVehicle();
bEngineOn = false;
bLightsOn = false;
ChangeLawEnforcerState(false);
- CExplosion::AddExplosion(this, culprit, EXPLOSION_CAR, GetPosition(), 0);
+ CExplosion::AddExplosion(this, culprit, EXPLOSION_BOAT, GetPosition(), 0);
+ CDarkel::RegisterCarBlownUpByPlayer(this);
if(m_aBoatNodes[BOAT_MOVING] == nil)
return;
@@ -695,6 +880,7 @@ CBoat::BlowUpCar(CEntity *culprit)
RpAtomicSetFrame(atomic, frame);
CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil);
obj->AttachToRwObject((RwObject*)atomic);
+ obj->bDontStream = true;
// init object
obj->m_fMass = 10.0f;
@@ -724,7 +910,7 @@ CBoat::BlowUpCar(CEntity *culprit)
dist.Normalise();
if(GetUp().z > 0.0f)
dist += GetUp();
- obj->GetMatrix().GetPosition() += GetUp();
+ obj->GetMatrix().GetPosition() += dist;
CWorld::Add(obj);
@@ -734,41 +920,200 @@ CBoat::BlowUpCar(CEntity *culprit)
RpAtomicSetFlags(atomic, 0);
}
-RwIm3DVertex KeepWaterOutVertices[4];
-RwImVertexIndex KeepWaterOutIndices[6];
-
void
-CBoat::Render()
+CBoat::PreRender(void)
{
CMatrix matrix;
+ CVector pos;
+ RpAtomic *atomic;
- if (m_aBoatNodes[BOAT_MOVING] != nil) {
- matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_MOVING]));
+ if(GetModelIndex() == MI_SKIMMER){
+ m_fMovingRotation += m_fMovingSpeed*CTimer::GetTimeStep();
+ if(m_fMovingRotation > TWOPI) m_fMovingRotation -= TWOPI;
+ int alpha = (1.0f - Min(2.0f*m_fMovingSpeed*8.0f/PI, 1.0f))*255.0f;
+ if(GetStatus() == STATUS_PLAYER || GetStatus() == STATUS_PLAYER_REMOTE || GetStatus() == STATUS_PLAYER_PLAYBACKFROMBUFFER){
+ if(m_aBoatNodes[BOAT_RUDDER]){
+ float sine = Sin(m_fSteerAngle);
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_RUDDER]));
+ pos = matrix.GetPosition();
+ matrix.SetRotate(0.0f, 0.0f, -m_fSteerAngle);
+ matrix.Rotate(0.0f, DEGTORAD(22.0f)*sine, 0.0f);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ if(m_aBoatNodes[BOAT_FLAP_LEFT]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_FLAP_LEFT]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateX(-m_fSteerAngle);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ if(m_aBoatNodes[BOAT_FLAP_RIGHT]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_FLAP_RIGHT]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateX(m_fSteerAngle);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ if(m_aBoatNodes[BOAT_REARFLAP_LEFT]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_REARFLAP_LEFT]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateX(-CPad::GetPad(0)->GetSteeringUpDown()/128.0f);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ if(m_aBoatNodes[BOAT_REARFLAP_RIGHT]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_REARFLAP_RIGHT]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateX(-CPad::GetPad(0)->GetSteeringUpDown()/128.0f);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ }
+ if(m_aBoatNodes[BOAT_MOVING]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_MOVING]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateY(m_fMovingRotation);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+
+ atomic = nil;
+ RwFrameForAllObjects(m_aBoatNodes[BOAT_MOVING], GetBoatAtomicObjectCB, &atomic);
+ if(atomic)
+ SetComponentAtomicAlpha(atomic, alpha);
+ }
+ if(m_aBoatNodes[BOAT_WINDSCREEN]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_WINDSCREEN]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateY(-m_fMovingRotation);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+
+ atomic = nil;
+ RwFrameForAllObjects(m_aBoatNodes[BOAT_WINDSCREEN], GetBoatAtomicObjectCB, &atomic);
+ if(atomic)
+ SetComponentAtomicAlpha(atomic, Max(150-alpha, 0));
+ }
+ //CShadows::StoreShadowForVehicle(this);
+ }else if(GetModelIndex() == MI_COASTG || GetModelIndex() == MI_DINGHY || GetModelIndex() == MI_RIO ||
+ GetModelIndex() == MI_SQUALO || GetModelIndex() == MI_MARQUIS){
+ if(m_aBoatNodes[BOAT_RUDDER]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_RUDDER]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateZ(-m_fSteerAngle);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ if(m_aBoatNodes[BOAT_REARFLAP_LEFT]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_REARFLAP_LEFT]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateZ(-m_fSteerAngle);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ if(m_aBoatNodes[BOAT_REARFLAP_RIGHT]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_REARFLAP_RIGHT]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateZ(-m_fSteerAngle);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ }
- CVector pos = matrix.GetPosition();
- matrix.SetRotateZ(m_fMovingHiRotation);
+ if(GetModelIndex() == MI_RIO || GetModelIndex() == MI_MARQUIS){
+ float axes[3] = { 0.0f, 0.0f, 0.0f };
+ m_boom.Process(this);
+ axes[m_boom.m_nAxis] = m_boom.m_fAngle;
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_FLAP_LEFT]));
+ pos = matrix.GetPosition();
+ matrix.SetRotate(axes[0], axes[1], axes[2]);
matrix.Translate(pos);
-
matrix.UpdateRW();
- if (CVehicle::bWheelsOnlyCheat) {
- RpAtomicRender((RpAtomic*)GetFirstObject(m_aBoatNodes[BOAT_MOVING]));
+ }
+
+ if(GetModelIndex() == MI_RIO){
+ // That little wind propeller
+ if(m_aBoatNodes[BOAT_FLAP_RIGHT]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_FLAP_RIGHT]));
+ pos = matrix.GetPosition();
+
+ float flapHeading = matrix.GetForward().Heading();
+ float boatHeading = GetForward().Heading();
+ float rot = -DEGTORAD(45.0f) - (flapHeading + boatHeading);
+ // eh what?
+ rot = CGeneral::LimitRadianAngle(rot);
+ if(rot > HALFPI) rot = PI;
+ else if(rot < -HALFPI) rot = -PI;
+ rot = clamp(rot, -DEGTORAD(63.0f), DEGTORAD(63.0f));
+ m_fMovingSpeed += (0.008f * CWeather::Wind + 0.002f) * rot;
+ m_fMovingSpeed *= Pow(0.9985f, CTimer::GetTimeStep())/(500.0f*SQR(m_fMovingSpeed) + 1.0f);
+
+ matrix.SetRotateZ(flapHeading + m_fMovingSpeed*CTimer::GetTimeStep());
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+ }
+ if(m_aBoatNodes[BOAT_MOVING]){
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_MOVING]));
+ pos = matrix.GetPosition();
+ matrix.SetRotateY(m_fMovingRotation);
+ matrix.Translate(pos);
+ matrix.UpdateRW();
+
+ CVector wind = CVector(0.707f, 0.707f, 0.0f) * (CWeather::Wind + 0.15f)*0.4f;
+ m_fMovingRotation += (m_vecMoveSpeed + wind).Magnitude()*CTimer::GetTimeStep();
+ }
+ }else if(GetModelIndex() == MI_PREDATOR || GetModelIndex() == MI_REEFER){
+ if (m_aBoatNodes[BOAT_MOVING] != nil) {
+ matrix.Attach(RwFrameGetMatrix(m_aBoatNodes[BOAT_MOVING]));
+
+ CVector pos = matrix.GetPosition();
+ matrix.SetRotateZ(m_fMovingRotation);
+ matrix.Translate(pos);
+
+ matrix.UpdateRW();
+ if (CVehicle::bWheelsOnlyCheat) {
+ RpAtomicRender((RpAtomic*)GetFirstObject(m_aBoatNodes[BOAT_MOVING]));
+ }
}
+ m_fMovingRotation += 0.02f * CTimer::GetTimeStep();
}
- m_fMovingHiRotation += 0.05f;
+}
+
+RwIm3DVertex KeepWaterOutVertices[4];
+RwImVertexIndex KeepWaterOutIndices[6];
+
+void
+CBoat::Render()
+{
((CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()))->SetVehicleColour(m_currentColour1, m_currentColour2);
+ m_nSetPieceExtendedRangeTime = CTimer::GetTimeInMilliseconds() + 3000;
if (!CVehicle::bWheelsOnlyCheat)
CEntity::Render();
- RwIm3DVertexSetRGBA(&KeepWaterOutVertices[0], 255, 255, 255, 255);
+ if(GetModelIndex() == MI_SKIMMER)
+ return;
KeepWaterOutIndices[0] = 0;
- RwIm3DVertexSetRGBA(&KeepWaterOutVertices[1], 255, 255, 255, 255);
KeepWaterOutIndices[1] = 2;
- RwIm3DVertexSetRGBA(&KeepWaterOutVertices[2], 255, 255, 255, 255);
KeepWaterOutIndices[2] = 1;
- RwIm3DVertexSetRGBA(&KeepWaterOutVertices[3], 255, 255, 255, 255);
KeepWaterOutIndices[3] = 1;
KeepWaterOutIndices[4] = 2;
KeepWaterOutIndices[5] = 3;
+ RwIm3DVertexSetRGBA(&KeepWaterOutVertices[0], 255, 255, 255, 255);
+ RwIm3DVertexSetRGBA(&KeepWaterOutVertices[1], 255, 255, 255, 255);
+ RwIm3DVertexSetRGBA(&KeepWaterOutVertices[2], 255, 255, 255, 255);
+ RwIm3DVertexSetRGBA(&KeepWaterOutVertices[3], 255, 255, 255, 255);
switch (GetModelIndex()) {
+ case MI_RIO:
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.3f, -1.016f, 0.51f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.3f, -1.016f, 0.51f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.3f, -2.832f, 0.51f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.3f, -2.832f, 0.51f);
+ break;
+ case MI_SQUALO:
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.222f, 2.004f, 0.846f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.222f, 2.004f, 0.846f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.24f, -1.367f, 0.846f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.24f, -1.367f, 0.846f);
+ break;
case MI_SPEEDER:
RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.15f, 3.61f, 1.03f);
RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.15f, 3.61f, 1.03f);
@@ -782,12 +1127,37 @@ CBoat::Render()
RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.66f, -4.48f, 0.83f);
break;
case MI_PREDATOR:
- default:
RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.45f, 1.9f, 0.96f);
RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.45f, 1.9f, 0.96f);
RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.45f, -3.75f, 0.96f);
RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.45f, -3.75f, 0.96f);
break;
+ case MI_TROPIC:
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.886f, -2.347f, 0.787f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.886f, -2.347f, 0.787f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.886f, -4.67f, 0.842f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.886f, -4.67f, 0.842f);
+ break;
+ case MI_COASTG:
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -0.663f, 3.565f, 0.382f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 0.663f, 3.565f, 0.382f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.087f, 0.83f, 0.381f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.087f, 0.83f, 0.381f);
+ break;
+ case MI_DINGHY:
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -0.797f, 1.641f, 0.573f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 0.797f, 1.641f, 0.573f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -0.865f, -1.444f, 0.509f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 0.865f, -1.444f, 0.509f);
+ break;
+ case MI_MARQUIS:
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.246f, -1.373f, 0.787f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.246f, -1.373f, 0.787f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.023f, -5.322f, 0.787f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.023f, -5.322f, 0.787f);
+ break;
+ default:
+ return;
}
KeepWaterOutVertices[0].u = 0.0f;
KeepWaterOutVertices[0].v = 0.0f;
@@ -806,6 +1176,28 @@ CBoat::Render()
RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, KeepWaterOutIndices, 6);
RwIm3DEnd();
}
+ bool drawAnotherRect = false;
+ if(GetModelIndex() == MI_COASTG){
+ drawAnotherRect = true;
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[0], -1.087f, 0.831f, 0.381f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[1], 1.087f, 0.831f, 0.381f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[2], -1.097f, -2.977f, 0.381f);
+ RwIm3DVertexSetPos(&KeepWaterOutVertices[3], 1.097f, -2.977f, 0.381f);
+ }
+ if(drawAnotherRect){
+ KeepWaterOutVertices[0].u = 0.0f;
+ KeepWaterOutVertices[0].v = 0.0f;
+ KeepWaterOutVertices[1].u = 1.0f;
+ KeepWaterOutVertices[1].v = 0.0f;
+ KeepWaterOutVertices[2].u = 0.0f;
+ KeepWaterOutVertices[2].v = 1.0f;
+ KeepWaterOutVertices[3].u = 1.0f;
+ KeepWaterOutVertices[3].v = 1.0f;
+ if (!CVehicle::bWheelsOnlyCheat && RwIm3DTransform(KeepWaterOutVertices, 4, GetMatrix().m_attachment, rwIM3D_VERTEXUV)) {
+ RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, KeepWaterOutIndices, 6);
+ RwIm3DEnd();
+ }
+ }
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA);
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
@@ -822,6 +1214,7 @@ CBoat::Teleport(CVector v)
CWorld::Add(this);
}
+//--MIAMI: unused
bool
CBoat::IsSectorAffectedByWake(CVector2D sector, float fSize, CBoat **apBoats)
{
@@ -853,6 +1246,7 @@ CBoat::IsSectorAffectedByWake(CVector2D sector, float fSize, CBoat **apBoats)
return numVerts != 0;
}
+//--MIAMI: unused
float
CBoat::IsVertexAffectedByWake(CVector vecVertex, CBoat *pBoat)
{
@@ -889,22 +1283,35 @@ CBoat::FillBoatList()
apFrameWakeGeneratingBoats[1] = nil;
apFrameWakeGeneratingBoats[2] = nil;
apFrameWakeGeneratingBoats[3] = nil;
-
+ CVector2D camPos = TheCamera.GetPosition();
+ CVector2D camFwd = TheCamera.GetForward();
+ float camDist = camFwd.Magnitude();
+ if(camDist > 0.0f)
+ camFwd /= camDist;
for (int i = CPools::GetVehiclePool()->GetSize() - 1; i >= 0; i--) {
CBoat *boat = (CBoat *)(CPools::GetVehiclePool()->GetSlot(i));
if (boat && boat->m_vehType == VEHICLE_TYPE_BOAT) {
- int16 nNumWakePoints = boat->m_nNumWakePoints;
- if (nNumWakePoints != 0) {
+ if (boat->m_nNumWakePoints != 0) {
+ CVector2D camToBoat = CVector2D(boat->GetPosition()) - camPos;
+ float distToCam = DotProduct2D(camFwd, camToBoat);
+ if(distToCam > 100.0f || distToCam < -15.0f)
+ continue;
+ float distSq = camToBoat.MagnitudeSqr();
+ if(distSq > SQR(70.0f))
+ continue;
if (frameId >= ARRAY_SIZE(apFrameWakeGeneratingBoats)) {
+ float nearest = 999999.88f;
int16 frameId2 = -1;
for (int16 j = 0; j < ARRAY_SIZE(apFrameWakeGeneratingBoats); j++) {
- if (apFrameWakeGeneratingBoats[j]->m_nNumWakePoints < nNumWakePoints) {
+ float tmpDistSq = (CVector2D(apFrameWakeGeneratingBoats[j]->GetPosition()) - camPos).MagnitudeSqr();
+ if (tmpDistSq < nearest) {
+ nearest = tmpDistSq;
frameId2 = j;
- nNumWakePoints = apFrameWakeGeneratingBoats[j]->m_nNumWakePoints;
}
}
- if (frameId2 != -1)
+ if (frameId2 != -1 &&
+ (distSq < nearest || boat->GetStatus() == STATUS_PLAYER))
apFrameWakeGeneratingBoats[frameId2] = boat;
} else {
apFrameWakeGeneratingBoats[frameId++] = boat;
@@ -935,33 +1342,28 @@ void
CBoat::AddWakePoint(CVector point)
{
int i;
- if (m_afWakePointLifeTime[0] > 0.0f) {
- if ((CVector2D(GetPosition()) - m_avec2dWakePoints[0]).MagnitudeSqr() < SQR(2.0f)) {
- if (GetStatus() == STATUS_PHYSICS) {
- if (VehicleCreatedBy == MISSION_VEHICLE) {
- if (m_nNumWakePoints >= 20)
- m_nNumWakePoints = 20;
- }
- else {
- if (m_nNumWakePoints >= 15)
- m_nNumWakePoints = 15;
- }
- }
- else {
- if (m_nNumWakePoints >= 31)
+ if(m_afWakePointLifeTime[0] > 0.0f){
+ if((CVector2D(GetPosition()) - m_avec2dWakePoints[0]).MagnitudeSqr() < SQR(2.0f)) {
+ if(GetStatus() == STATUS_PLAYER){
+ if(m_nNumWakePoints >= 31)
m_nNumWakePoints = 31;
+ }else if(VehicleCreatedBy == MISSION_VEHICLE){
+ if(m_nNumWakePoints >= 20)
+ m_nNumWakePoints = 20;
+ }else{
+ if(m_nNumWakePoints >= 15)
+ m_nNumWakePoints = 15;
}
- for (i = m_nNumWakePoints; i != 0; i--) {
- m_avec2dWakePoints[i] = m_avec2dWakePoints[i - 1];
- m_afWakePointLifeTime[i] = m_afWakePointLifeTime[i - 1];
+ for(i = m_nNumWakePoints; i != 0; i--){
+ m_avec2dWakePoints[i] = m_avec2dWakePoints[i-1];
+ m_afWakePointLifeTime[i] = m_afWakePointLifeTime[i-1];
}
m_avec2dWakePoints[0] = point;
m_afWakePointLifeTime[0] = 150.0f;
- if (m_nNumWakePoints < ARRAY_SIZE(m_afWakePointLifeTime))
+ if(m_nNumWakePoints < ARRAY_SIZE(m_afWakePointLifeTime))
m_nNumWakePoints++;
}
- }
- else {
+ }else{
m_avec2dWakePoints[0] = point;
m_afWakePointLifeTime[0] = 150.0f;
m_nNumWakePoints = 1;
@@ -972,7 +1374,7 @@ void
CBoat::DoDriveByShootings(void)
{
CAnimBlendAssociation *anim = nil;
- CPlayerInfo* playerInfo = ((CPlayerPed*)this)->GetPlayerInfoForThisPlayerPed();
+ CPlayerInfo* playerInfo = ((CPlayerPed*)pDriver)->GetPlayerInfoForThisPlayerPed();
if (playerInfo && !playerInfo->m_bDriveByAllowed)
return;
@@ -984,7 +1386,8 @@ CBoat::DoDriveByShootings(void)
bool lookingLeft = false;
bool lookingRight = false;
- if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN){
+ if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
+ TheCamera.m_bObbeCinematicCarCamOn){
if(CPad::GetPad(0)->GetLookLeft())
lookingLeft = true;
if(CPad::GetPad(0)->GetLookRight())
diff --git a/src/vehicles/Boat.h b/src/vehicles/Boat.h
index c6f4b7ad..5f8cc8a8 100644
--- a/src/vehicles/Boat.h
+++ b/src/vehicles/Boat.h
@@ -1,6 +1,7 @@
#pragma once
#include "Vehicle.h"
+#include "Door.h"
enum eBoatNodes
{
@@ -10,33 +11,34 @@ enum eBoatNodes
BOAT_FLAP_LEFT,
BOAT_FLAP_RIGHT,
BOAT_REARFLAP_LEFT,
- BOAT_REARFLAP_RIGHT
+ BOAT_REARFLAP_RIGHT,
+ NUM_BOAT_NODES
};
class CBoat : public CVehicle
{
public:
- // 0x288
- float m_fPropellerZ;
- float m_fPropellerY;
- CVector m_waterMoveDrag;
- CVector m_waterTurnDrag;
- float m_fMovingHiRotation;
- int32 _unk0;
- RwFrame *m_aBoatNodes[4];
+ float m_fMovingRotation;
+ float m_fMovingSpeed;
+ int32 m_boat_unused1;
+ RwFrame *m_aBoatNodes[NUM_BOAT_NODES];
+ CDoor m_boom;
+ tBoatHandlingData *pBoatHandling;
uint8 bBoatInWater : 1;
uint8 bPropellerInWater : 1;
bool m_bIsAnchored;
float m_fOrientation;
- int32 _unk1;
+ uint32 m_nPoliceShoutTimer;
+ int32 m_boat_unused2;
float m_fDamage;
CEntity *m_pSetOnFireEntity;
- bool _unk2;
+ float m_skimmerThingTimer;
+ bool m_boat_unused3;
float m_fAccelerate;
float m_fBrake;
float m_fSteeringLeftRight;
uint8 m_nPadID;
- int32 _unk3;
+ int32 m_boat_unused4;
float m_fVolumeUnderWater;
CVector m_vecBuoyancePoint;
float m_fPrevVolumeUnderWater;
@@ -54,7 +56,7 @@ public:
virtual void SetModelIndex(uint32 id);
virtual void ProcessControl();
virtual void Teleport(CVector v);
- virtual void PreRender(void) {};
+ virtual void PreRender(void);
virtual void Render(void);
virtual void ProcessControlInputs(uint8);
virtual void GetComponentWorldPosition(int32 component, CVector &pos);
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index 2a048881..84a19b82 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -16,6 +16,7 @@
#include "VisibilityPlugins.h"
#include "World.h"
#include "Zones.h"
+#include "Occlusion.h"
uint8 CTheCarGenerators::ProcessCounter;
uint32 CTheCarGenerators::NumOfCarGenerators;
@@ -31,7 +32,7 @@ void CCarGenerator::SwitchOff()
void CCarGenerator::SwitchOn()
{
- m_nUsesRemaining = -1;
+ m_nUsesRemaining = 255;
m_nTimer = CalcNextGen();
++CTheCarGenerators::CurrentActiveCount;
}
@@ -140,8 +141,14 @@ void CCarGenerator::DoInternalProcessing()
}
CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), 0);
m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pVehicle);
- if (m_nUsesRemaining < -1) /* I don't think this is a correct comparasion */
+ /* I don't think this is a correct comparasion */
+#ifdef FIX_BUGS
+ if (m_nUsesRemaining != 0)
--m_nUsesRemaining;
+#else
+ if (m_nUsesRemaining < -1)
+ --m_nUsesRemaining;
+#endif
m_nTimer = CalcNextGen();
if (m_nUsesRemaining == 0)
--CTheCarGenerators::CurrentActiveCount;
@@ -151,7 +158,7 @@ void CCarGenerator::Process()
{
if (m_nVehicleHandle == -1 &&
(CTheCarGenerators::GenerateEvenIfPlayerIsCloseCounter || CTimer::GetTimeInMilliseconds() >= m_nTimer) &&
- m_nUsesRemaining != 0 && CheckIfWithinRangeOfAnyPlayer())
+ m_nUsesRemaining != 0 && CheckIfWithinRangeOfAnyPlayers())
DoInternalProcessing();
if (m_nVehicleHandle == -1)
return;
@@ -203,14 +210,14 @@ bool CCarGenerator::CheckForBlockage(int32 mi)
return false;
}
-bool CCarGenerator::CheckIfWithinRangeOfAnyPlayer()
+bool CCarGenerator::CheckIfWithinRangeOfAnyPlayers()
{
CVector2D direction = FindPlayerCentreOfWorld(CWorld::PlayerInFocus) - m_vecPos;
float distance = direction.Magnitude();
float farclip = 110.0f * TheCamera.GenerationDistMultiplier;
float nearclip = farclip - 20.0f;
bool canBeRemoved = (m_nModelIndex > 0 && CModelInfo::IsBoatModel(m_nModelIndex) && 165.0f * TheCamera.GenerationDistMultiplier > distance &&
- TheCamera.IsSphereVisible(m_vecPos, 0.0f)); // TODO(MIAMI) COcclision::IsPositionOccluded(m_vecPos, 0.0f)
+ TheCamera.IsSphereVisible(m_vecPos, 0.0f) && COcclusion::IsPositionOccluded(m_vecPos, 0.0f));
if (distance >= farclip || canBeRemoved){
if (m_bIsBlocking)
m_bIsBlocking = false;
diff --git a/src/vehicles/CarGen.h b/src/vehicles/CarGen.h
index 684f93ee..fccbee96 100644
--- a/src/vehicles/CarGen.h
+++ b/src/vehicles/CarGen.h
@@ -30,7 +30,7 @@ public:
void Process();
void Setup(float x, float y, float z, float angle, int32 mi, int16 color1, int16 color2, uint8 force, uint8 alarm, uint8 lock, uint16 min_delay, uint16 max_delay);
bool CheckForBlockage(int32 mi);
- bool CheckIfWithinRangeOfAnyPlayer();
+ bool CheckIfWithinRangeOfAnyPlayers();
void SetUsesRemaining(uint16 uses) { m_nUsesRemaining = uses; }
};
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp
index c8fa1c22..83c727f5 100644
--- a/src/vehicles/Cranes.cpp
+++ b/src/vehicles/Cranes.cpp
@@ -460,7 +460,7 @@ bool CCrane::DoesCranePickUpThisCarType(uint32 mi)
return mi == MI_FIRETRUCK ||
mi == MI_AMBULAN ||
mi == MI_ENFORCER ||
- mi == MI_FBICAR ||
+ mi == MI_FBIRANCH ||
mi == MI_RHINO ||
mi == MI_BARRACKS ||
mi == MI_POLICE;
@@ -474,7 +474,7 @@ bool CCranes::DoesMilitaryCraneHaveThisOneAlready(uint32 mi)
case MI_FIRETRUCK: return (CarsCollectedMilitaryCrane & 1);
case MI_AMBULAN: return (CarsCollectedMilitaryCrane & 2);
case MI_ENFORCER: return (CarsCollectedMilitaryCrane & 4);
- case MI_FBICAR: return (CarsCollectedMilitaryCrane & 8);
+ case MI_FBIRANCH: return (CarsCollectedMilitaryCrane & 8);
case MI_RHINO: return (CarsCollectedMilitaryCrane & 0x10);
case MI_BARRACKS: return (CarsCollectedMilitaryCrane & 0x20);
case MI_POLICE: return (CarsCollectedMilitaryCrane & 0x40);
@@ -489,7 +489,7 @@ void CCranes::RegisterCarForMilitaryCrane(uint32 mi)
case MI_FIRETRUCK: CarsCollectedMilitaryCrane |= 1; break;
case MI_AMBULAN: CarsCollectedMilitaryCrane |= 2; break;
case MI_ENFORCER: CarsCollectedMilitaryCrane |= 4; break;
- case MI_FBICAR: CarsCollectedMilitaryCrane |= 8; break;
+ case MI_FBIRANCH: CarsCollectedMilitaryCrane |= 8; break;
case MI_RHINO: CarsCollectedMilitaryCrane |= 0x10; break;
case MI_BARRACKS: CarsCollectedMilitaryCrane |= 0x20; break;
case MI_POLICE: CarsCollectedMilitaryCrane |= 0x40; break;
diff --git a/src/vehicles/Floater.cpp b/src/vehicles/Floater.cpp
index 1ae1c5c3..92e3d80e 100644
--- a/src/vehicles/Floater.cpp
+++ b/src/vehicles/Floater.cpp
@@ -7,18 +7,40 @@
#include "Vehicle.h"
#include "Floater.h"
+//--MIAMI: done
+
cBuoyancy mod_Buoyancy;
-static float fVolMultiplier = 1.0f;
+float fVolMultiplier = 1.0f;
// amount of boat volume in bounding box
// 1.0-volume is the empty space in the bbox
-static float fBoatVolumeDistribution[9] = {
+float fBoatVolumeDistribution[9] = {
// rear
0.75f, 0.9f, 0.75f,
0.95f, 1.0f, 0.95f,
- 0.3f, 0.7f, 0.3f
+ 0.4f, 0.7f, 0.4f
// bow
};
+float fBoatVolumeDistributionCat[9] = {
+ 0.9f, 0.3f, 0.9f,
+ 1.0f, 0.5f, 1.0f,
+ 0.95f, 0.4f, 0.95f
+};
+float fBoatVolumeDistributionSail[9] = {
+ 0.55f, 0.95f, 0.55f,
+ 0.75f, 1.1f, 0.75f,
+ 0.3f, 0.8f, 0.3f
+};
+float fBoatVolumeDistributionDinghy[9] = {
+ 0.65f, 0.85f, 0.65f,
+ 0.85f, 1.1f, 0.85f,
+ 0.65f, 0.95f, 0.65f
+};
+float fBoatVolumeDistributionSpeed[9] = {
+ 0.7f, 0.9f, 0.7f,
+ 0.95f, 1.0f, 0.95f,
+ 0.6f, 0.7f, 0.6f
+};
bool
cBuoyancy::ProcessBuoyancy(CPhysical *phys, float buoyancy, CVector *point, CVector *impulse)
@@ -37,6 +59,76 @@ cBuoyancy::ProcessBuoyancy(CPhysical *phys, float buoyancy, CVector *point, CVec
return f != 0.0f;
}
+bool
+cBuoyancy::ProcessBuoyancyBoat(CVehicle *veh, float buoyancy, CVector *point, CVector *impulse, bool bNoTurnForce)
+{
+ m_numSteps = 2.0f;
+
+ if(!CWaterLevel::GetWaterLevel(veh->GetPosition(), &m_waterlevel, veh->bTouchingWater))
+ return false;
+ m_matrix = veh->GetMatrix();
+ PreCalcSetup(veh, buoyancy);
+
+
+ float x, y;
+ int ix, i;
+ tWaterLevel waterPosition;
+ CVector waterNormal;
+
+ // Floater is divided into 3x3 parts. Process and sum each of them
+ float volDiv = 1.0f/((m_dimMax.z - m_dimMin.z)*sq(m_numSteps+1.0f));
+ ix = 0;
+ for(x = m_dimMin.x; x <= m_dimMax.x; x += m_step.x){
+ i = ix;
+ for(y = m_dimMin.y; y <= m_dimMax.y; y += m_step.y){
+ CVector waterLevel(x, y, 0.0f);
+ FindWaterLevelNorm(m_positionZ, &waterLevel, &waterPosition, &waterNormal);
+ switch(veh->GetModelIndex()){
+ case MI_RIO:
+ fVolMultiplier = fBoatVolumeDistributionCat[i];
+ break;
+ case MI_SQUALO:
+ case MI_SPEEDER:
+ case MI_JETMAX:
+ fVolMultiplier = fBoatVolumeDistributionSpeed[i];
+ break;
+ case MI_COASTG:
+ case MI_DINGHY:
+ fVolMultiplier = fBoatVolumeDistributionDinghy[i];
+ break;
+ case MI_MARQUIS:
+ fVolMultiplier = fBoatVolumeDistributionSail[i];
+ break;
+ case MI_PREDATOR:
+ case MI_SKIMMER:
+ case MI_REEFER:
+ case MI_TROPIC:
+ default:
+ fVolMultiplier = fBoatVolumeDistribution[i];
+ break;
+ }
+ if(waterPosition != FLOATER_ABOVE_WATER){
+ float volume = SimpleSumBuoyancyData(waterLevel, waterPosition);
+ float upImpulse = volume * volDiv * buoyancy * CTimer::GetTimeStep();
+ CVector speed = veh->GetSpeed(Multiply3x3(veh->GetMatrix(), CVector(x, y, 0.0f)));
+ float damp = 1.0f - DotProduct(speed, waterNormal)*veh->pHandling->fSuspensionDampingLevel;
+ float finalImpulse = upImpulse*Max(damp, 0.0f);
+ impulse->z += finalImpulse;
+ if(!bNoTurnForce)
+ veh->ApplyTurnForce(finalImpulse*waterNormal, Multiply3x3(m_matrix, waterLevel));
+ }
+ i += 3;
+ }
+ ix++;
+ }
+
+ m_volumeUnderWater *= volDiv;
+
+ *point = Multiply3x3(m_matrix, m_impulsePoint);
+ return m_isBoat || m_haveVolume;
+
+}
+
void
cBuoyancy::PreCalcSetup(CPhysical *phys, float buoyancy)
{
@@ -48,17 +140,55 @@ cBuoyancy::PreCalcSetup(CPhysical *phys, float buoyancy)
m_dimMax = colModel->boundingBox.max;
if(m_isBoat){
- if(phys->GetModelIndex() == MI_PREDATOR){
+ switch(phys->GetModelIndex()){
+ case MI_PREDATOR:
+ default:
+ m_dimMax.y *= 1.05f;
+ m_dimMin.y *= 0.9f;
+ break;
+ case MI_SPEEDER:
+ m_dimMax.y *= 1.25f;
+ m_dimMin.y *= 0.83f;
+ break;
+ case MI_REEFER:
+ m_dimMin.y *= 0.9f;
+ break;
+ case MI_RIO:
+ m_dimMax.y *= 0.9f;
+ m_dimMin.y *= 0.9f;
+ m_dimMax.z += 0.25f;
+ m_dimMin.z -= 0.2f;
+ break;
+ case MI_SQUALO:
m_dimMax.y *= 0.9f;
m_dimMin.y *= 0.9f;
- }else if(phys->GetModelIndex() == MI_SPEEDER){
+ break;
+ case MI_TROPIC:
+ m_dimMax.y *= 1.3f;
+ m_dimMin.y *= 0.82f;
+ m_dimMin.z -= 0.2f;
+ break;
+ case MI_SKIMMER:
+ m_dimMin.y = -m_dimMax.y;
+ m_dimMax.y *= 1.2f;
+ break;
+ case MI_COASTG:
m_dimMax.y *= 1.1f;
m_dimMin.y *= 0.9f;
- }else if(phys->GetModelIndex() == MI_REEFER){
+ m_dimMin.z -= 0.3f;
+ break;
+ case MI_DINGHY:
+ m_dimMax.y *= 1.3f;
m_dimMin.y *= 0.9f;
- }else{
- m_dimMax.y *= 0.9f;
+ m_dimMin.z -= 0.2f;
+ break;
+ case MI_MARQUIS:
+ m_dimMax.y *= 1.3f;
m_dimMin.y *= 0.9f;
+ break;
+ case MI_JETMAX:
+ m_dimMin.y *= 0.9f;
+ break;
}
}
@@ -92,22 +222,17 @@ void
cBuoyancy::SimpleCalcBuoyancy(void)
{
float x, y;
- int ix, i;
tWaterLevel waterPosition;
// Floater is divided into 3x3 parts. Process and sum each of them
- ix = 0;
for(x = m_dimMin.x; x <= m_dimMax.x; x += m_step.x){
- i = ix;
for(y = m_dimMin.y; y <= m_dimMax.y; y += m_step.y){
CVector waterLevel(x, y, 0.0f);
FindWaterLevel(m_positionZ, &waterLevel, &waterPosition);
- fVolMultiplier = m_isBoat ? fBoatVolumeDistribution[i] : 1.0f;
+ fVolMultiplier = 1.0f;
if(waterPosition != FLOATER_ABOVE_WATER)
SimpleSumBuoyancyData(waterLevel, waterPosition);
- i += 3;
}
- ix++;
}
m_volumeUnderWater /= (m_dimMax.z - m_dimMin.z)*sq(m_numSteps+1.0f);
@@ -129,10 +254,6 @@ cBuoyancy::SimpleSumBuoyancyData(CVector &waterLevel, tWaterLevel waterPosition)
if(m_isBoat){
fThisVolume *= fVolMultiplier;
- if(fThisVolume < 0.5f)
- fThisVolume = 2.0f*sq(fThisVolume);
- if(fThisVolume < 1.0f)
- fThisVolume = sq(fThisVolume);
fThisVolume = sq(fThisVolume);
}
@@ -173,6 +294,26 @@ cBuoyancy::FindWaterLevel(const CVector &zpos, CVector *waterLevel, tWaterLevel
}
}
+// Same as above but also get normal
+void
+cBuoyancy::FindWaterLevelNorm(const CVector &zpos, CVector *waterLevel, tWaterLevel *waterPosition, CVector *normal)
+{
+ *waterPosition = FLOATER_IN_WATER;
+ CVector xWaterLevel = Multiply3x3(m_matrix, *waterLevel);
+ CWaterLevel::GetWaterLevel(xWaterLevel.x + m_position.x, xWaterLevel.y + m_position.y, m_position.z,
+ &waterLevel->z, true);
+ waterLevel->z -= xWaterLevel.z + zpos.z; // make local
+ if(waterLevel->z >= m_dimMin.z)
+ *normal = CWaterLevel::GetWaterNormal(xWaterLevel.x + m_position.x, xWaterLevel.y + m_position.y);
+ if(waterLevel->z > m_dimMax.z){
+ waterLevel->z = m_dimMax.z;
+ *waterPosition = FLOATER_UNDER_WATER;
+ }else if(waterLevel->z < m_dimMin.z){
+ waterLevel->z = m_dimMin.z;
+ *waterPosition = FLOATER_ABOVE_WATER;
+ }
+}
+
bool
cBuoyancy::CalcBuoyancyForce(CPhysical *phys, CVector *point, CVector *impulse)
{
diff --git a/src/vehicles/Floater.h b/src/vehicles/Floater.h
index 1cfb46fb..91ab70ae 100644
--- a/src/vehicles/Floater.h
+++ b/src/vehicles/Floater.h
@@ -36,10 +36,12 @@ public:
CVector m_impulsePoint;
bool ProcessBuoyancy(CPhysical *phys, float buoyancy, CVector *point, CVector *impulse);
+ bool ProcessBuoyancyBoat(CVehicle *phys, float buoyancy, CVector *point, CVector *impulse, bool bNoTurnForce);
void PreCalcSetup(CPhysical *phys, float buoyancy);
void SimpleCalcBuoyancy(void);
float SimpleSumBuoyancyData(CVector &waterLevel, tWaterLevel waterPosition);
void FindWaterLevel(const CVector &zpos, CVector *waterLevel, tWaterLevel *waterPosition);
+ void FindWaterLevelNorm(const CVector &zpos, CVector *waterLevel, tWaterLevel *waterPosition, CVector *normal);
bool CalcBuoyancyForce(CPhysical *phys, CVector *impulse, CVector *point);
};
extern cBuoyancy mod_Buoyancy;
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp
index 36681c15..46e51b09 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -14,20 +14,26 @@
#include "Shadows.h"
#include "Coronas.h"
#include "Explosion.h"
+#include "WindModifiers.h"
#include "Timecycle.h"
#include "TempColModels.h"
#include "World.h"
#include "WaterLevel.h"
+#include "Population.h"
#include "PlayerPed.h"
+#include "CopPed.h"
#include "Wanted.h"
#include "DMAudio.h"
#include "Object.h"
#include "HandlingMgr.h"
+#include "Ropes.h"
#include "Heli.h"
#ifdef FIX_BUGS
#include "Replay.h"
#endif
+//--MIAMI: done
+
enum
{
HELI_STATUS_HOVER,
@@ -40,7 +46,6 @@ enum
CHeli *CHeli::pHelis[NUM_HELIS];
int16 CHeli::NumRandomHelis;
uint32 CHeli::TestForNewRandomHelisTimer;
-int16 CHeli::NumScriptHelis; // unused
bool CHeli::CatalinaHeliOn;
bool CHeli::CatalinaHasBeenShotDown;
bool CHeli::ScriptHeliOn;
@@ -67,6 +72,9 @@ CHeli::CHeli(int32 id, uint8 CreatedBy)
m_nBulletDamage = 0;
m_fAngularSpeed = 0.0f;
m_fRotation = 0.0f;
+
+ m_numSwat = 4;
+
m_nSearchLightTimer = CTimer::GetTimeInMilliseconds();
for(i = 0; i < 6; i++){
m_aSearchLightHistoryX[i] = 0.0f;
@@ -82,6 +90,8 @@ CHeli::CHeli(int32 id, uint8 CreatedBy)
m_fTargetOffset = 0.0f;
m_fSearchLightX = m_fSearchLightY = 0.0f;
+ m_aSwatState[0] = m_aSwatState[1] = m_aSwatState[2] = m_aSwatState[3] = 0;
+
// BUG: not in game but gets initialized to CDCDCDCD in debug
m_nLastShotTime = 0;
}
@@ -120,6 +130,8 @@ CHeli::ProcessControl(void)
if(gbModelViewer)
return;
+ CWindModifiers::RegisterOne(GetPosition(), 1);
+
// Find target
CVector target(0.0f, 0.0f, 0.0f);
CVector2D vTargetDist;
@@ -266,7 +278,9 @@ CHeli::ProcessControl(void)
if(fTargetDist > targetHeight)
m_heliStatus = HELI_STATUS_CHASE_PLAYER;
}
- // fall through, BUG?
+ if(m_numSwat)
+ SendDownSwat();
+ break;
case HELI_STATUS_CHASE_PLAYER:{
float targetHeight;
if(m_heliType == HELI_TYPE_CATALINA)
@@ -277,6 +291,7 @@ CHeli::ProcessControl(void)
fTargetDist < targetHeight && CWorld::GetIsLineOfSightClear(GetPosition(), FindPlayerCoors(), true, false, false, false, false, false))
m_heliStatus = HELI_STATUS_HOVER;
}
+ break;
}
// Find xy speed
@@ -346,13 +361,6 @@ CHeli::ProcessControl(void)
if(m_fTargetOffset >= 2.0f)
m_fTargetOffset -= 2.0f;
- if(m_heliType == HELI_TYPE_CATALINA)
- if(m_pathState == 9 || m_pathState == 11 || m_pathState == 10){
- float f = Pow(0.997f, CTimer::GetTimeStep());
- m_vecMoveSpeed.x *= f;
- m_vecMoveSpeed.y *= f;
- }
-
CVector2D speedDir = targetSpeed - m_vecMoveSpeed;
float speedDiff = speedDir.Magnitude();
if(speedDiff != 0.0f)
@@ -457,7 +465,7 @@ CHeli::ProcessControl(void)
else if (searchLightDist < 40.0f)
m_fSearchLightIntensity = 1.0f;
else
- m_fSearchLightIntensity = 1.0f - (40.0f - searchLightDist) / 40.0f;
+ m_fSearchLightIntensity = 1.0f - (40.0f - searchLightDist) / (60.0f-40.0f);
if (m_fSearchLightIntensity < 0.9f || sq(FindPlayerCoors().x - m_fSearchLightX) + sq(FindPlayerCoors().y - m_fSearchLightY) > sq(7.0f))
m_nShootTimer = CTimer::GetTimeInMilliseconds();
@@ -524,28 +532,17 @@ CHeli::ProcessControl(void)
}
}
- // Drop Catalina's bombs
- if(m_heliType == HELI_TYPE_CATALINA && m_pathState > 8 && (CTimer::GetTimeInMilliseconds()>>9) != (CTimer::GetPreviousTimeInMilliseconds()>>9)){
- CVector bombPos = GetPosition() - 60.0f*m_vecMoveSpeed;
- if(sq(FindPlayerCoors().x-bombPos.x) + sq(FindPlayerCoors().y-bombPos.y) < sq(35.0f)){
- bool found;
- float groundZ = CWorld::FindGroundZFor3DCoord(bombPos.x, bombPos.y, bombPos.z, &found);
- float waterZ;
- if(!CWaterLevel::GetWaterLevelNoWaves(bombPos.x, bombPos.y, bombPos.z, &waterZ))
- waterZ = 0.0f;
- if(groundZ > waterZ){
- bombPos.z = groundZ + 2.0f;
- CExplosion::AddExplosion(nil, this, EXPLOSION_HELI_BOMB, bombPos, 0);
- }else{
- bombPos.z = waterZ;
- CVector dir;
- for(i = 0; i < 16; i++){
- dir.x = ((CGeneral::GetRandomNumber()&0xFF)-127)*0.001f;
- dir.y = ((CGeneral::GetRandomNumber()&0xFF)-127)*0.001f;
- dir.z = 0.5f;
- CParticle::AddParticle(PARTICLE_BOAT_SPLASH, bombPos, dir, nil, 0.2f);
- }
- }
+ // Process ropes
+ for(i = 0; i < 4; i++){
+ if(m_aSwatState[i] == 0)
+ continue;
+
+ m_aSwatState[i]--;
+ CRopes::RegisterRope((uintptr)this + i, GetMatrix()*FindSwatPositionRelativeToHeli(i), false);
+ if(m_aSwatState[i] == 0){
+ CVector speed = Multiply3x3(GetMatrix(), 0.05f*FindSwatPositionRelativeToHeli(i));
+ speed.z = 0.0f;
+ CRopes::SetSpeedOfTopNode((uintptr)this + i, speed);
}
}
@@ -665,6 +662,7 @@ CHeli::SpawnFlyingComponent(int32 component)
RpAtomicSetFrame(atomic, frame);
CVisibilityPlugins::SetAtomicRenderCallback(atomic, nil);
obj->AttachToRwObject((RwObject*)atomic);
+ obj->bDontStream = true;
// init object
obj->m_fMass = 10.0f;
@@ -710,6 +708,42 @@ CHeli::SpawnFlyingComponent(int32 component)
return obj;
}
+CVector
+CHeli::FindSwatPositionRelativeToHeli(int n)
+{
+ switch(n){
+ case 0: return CVector(-1.2f, -1.0f, -0.5f);
+ case 1: return CVector( 1.2f, -1.0f, -0.5f);
+ case 2: return CVector(-1.2f, 1.0f, -0.5f);
+ case 3: return CVector( 1.2f, 1.0f, -0.5f);
+ default: return CVector(0.0f, 0.0f, 0.0f);
+ }
+}
+
+bool
+CHeli::SendDownSwat(void)
+{
+ if(m_numSwat == 0 || !CStreaming::HasModelLoaded(MI_SWAT) ||
+ CGeneral::GetRandomNumber() & 0x7F || (GetPosition() - FindPlayerCoors()).Magnitude() > 50.0f)
+ return false;
+
+ CMatrix mat(GetMatrix());
+ CVector pos = Multiply3x3(mat, FindSwatPositionRelativeToHeli(m_numSwat-1)) + GetPosition();
+
+ float groundZ = CWorld::FindGroundZFor3DCoord(pos.x, pos.y, pos.z, nil);
+ if(Abs(FindPlayerCoors().z - groundZ) < 2.5f && CRopes::RegisterRope((uintptr)this + m_numSwat-1, pos, false)){
+ CCopPed *swat = (CCopPed*)CPopulation::AddPed(PEDTYPE_COP, COP_HELI_SWAT, pos);
+ swat->bUsesCollision = false;
+ swat->m_pRopeEntity = this;
+ RegisterReference(&swat->m_pRopeEntity);
+ m_numSwat--;
+ swat->m_nRopeID = (uintptr)this + m_numSwat;
+ m_aSwatState[m_numSwat] = 255;
+ CAnimManager::BlendAnimation(swat->GetClump(), ASSOCGRP_STD, ANIM_ABSEIL, 4.0f);
+ return true;
+ }
+ return false;
+}
void
@@ -719,7 +753,6 @@ CHeli::InitHelis(void)
NumRandomHelis = 0;
TestForNewRandomHelisTimer = 0;
- NumScriptHelis = 0;
CatalinaHeliOn = false;
ScriptHeliOn = false;
for(i = 0; i < NUM_HELIS; i++)
@@ -735,17 +768,20 @@ GenerateHeli(bool catalina)
CVector heliPos;
int i;
- heli = new CHeli(MI_CHOPPER, PERMANENT_VEHICLE);
+ if(catalina)
+ assert(0 && "can't create catalina's heli");
+ else
+ heli = new CHeli(MI_CHOPPER, PERMANENT_VEHICLE);
if(catalina)
heliPos = CVector(-224.0f, 201.0f, 83.0f);
else{
heliPos = FindPlayerCoors();
- float angle = (float)(CGeneral::GetRandomNumber() & 0xFF)/0xFF * 6.28f;
+ float angle = (float)(CGeneral::GetRandomNumber() & 0xFF)/0x100 * 6.28f;
heliPos.x += 250.0f*Sin(angle);
heliPos.y += 250.0f*Cos(angle);
- if(heliPos.x < -2000.0f || heliPos.x > 2000.0f || heliPos.y < -2000.0f || heliPos.y > 2000.0f){
- // directly above player
+ if(heliPos.x < -2000.0f-400.0f || heliPos.x > 2000.0f-400.0f || heliPos.y < -2000.0f || heliPos.y > 2000.0f){
+ heliPos = FindPlayerCoors();
heliPos.x -= 250.0f*Sin(angle);
heliPos.y -= 250.0f*Cos(angle);
}
@@ -756,6 +792,7 @@ GenerateHeli(bool catalina)
heli->GetMatrix().SetRotateZOnly(DEGTORAD(270.0f)); // game actually uses 3.14 here
heli->SetStatus(STATUS_ABANDONED);
+ heli->bIsLocked = true;
int id = -1;
bool found = false;
@@ -784,6 +821,8 @@ CHeli::UpdateHelis(void)
CReplay::IsPlayingBack() ? 0 :
#endif
FindPlayerPed()->m_pWanted->NumOfHelisRequired();
+ if(CCullZones::PlayerNoRain() || CGame::IsInInterior())
+ numHelisRequired = 0;
if(CStreaming::HasModelLoaded(MI_CHOPPER) && CTimer::GetTimeInMilliseconds() > TestForNewRandomHelisTimer){
// Spawn a police heli
TestForNewRandomHelisTimer = CTimer::GetTimeInMilliseconds() + 15000;
@@ -832,7 +871,7 @@ CHeli::UpdateHelis(void)
TheCamera.CamShake(0.7f, pHelis[i]->GetPosition().x, pHelis[i]->GetPosition().y, pHelis[i]->GetPosition().z);
colors[0] = CRGBA(0, 0, 0, 255);
- colors[1] = CRGBA(224, 230, 238, 255);
+ colors[1] = CRGBA(224, 224, 224, 255);
colors[2] = CRGBA(0, 0, 0, 255);
colors[3] = CRGBA(0, 0, 0, 255);
colors[4] = CRGBA(66, 162, 252, 255);
@@ -852,7 +891,7 @@ CHeli::UpdateHelis(void)
int f = ++nFrameGen & 3;
CParticle::AddParticle(PARTICLE_HELI_DEBRIS, pos, dir,
nil, CGeneral::GetRandomNumberInRange(0.1f, 1.0f),
- colors[nFrameGen], rotSpeed, 0, f, 0);
+ colors[nFrameGen&7], rotSpeed, 0, f, 0);
}
CExplosion::AddExplosion(nil, nil, EXPLOSION_HELI, pos, 0);
@@ -870,8 +909,7 @@ CHeli::UpdateHelis(void)
if(i == HELI_CATALINA)
CatalinaHasBeenShotDown = true;
- CStats::HelisDestroyed++;
- CStats::PeopleKilledByOthers += 2;
+ CStats::PeopleKilledByPlayer += 2;
CStats::PedsKilledOfThisType[PEDTYPE_COP] += 2;
CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 250;
pos = CWorld::Players[CWorld::PlayerInFocus].m_pPed->GetPosition();
@@ -889,8 +927,8 @@ CHeli::UpdateHelis(void)
TheCamera.CamShake(0.4f, pHelis[i]->GetPosition().x, pHelis[i]->GetPosition().y, pHelis[i]->GetPosition().z);
- CVector pos = pHelis[i]->GetPosition() - 2.5f*pHelis[i]->GetUp();
- CExplosion::AddExplosion(nil, nil, EXPLOSION_HELI, pos, 0);
+ CVector pos = pHelis[i]->GetPosition() - 2.5f*pHelis[i]->GetForward();
+ CExplosion::AddExplosion(nil, nil, EXPLOSION_HELI2, pos, 0);
}else
pHelis[i]->m_fAngularSpeed *= 1.03f;
}
@@ -905,7 +943,7 @@ CHeli::UpdateHelis(void)
pHelis[i]->m_heliStatus = HELI_STATUS_FLY_AWAY;
}
- // Remove all helis if in a tunnel
+ // Remove all helis if in a tunnel or under water
if(FindPlayerCoors().z < - 2.0f)
for(i = 0; i < NUM_HELIS; i++)
if(pHelis[i] && pHelis[i]->m_heliStatus != HELI_STATUS_SHOT_DOWN)
@@ -950,7 +988,7 @@ CHeli::TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, i
float distToHeli = (pHelis[i]->GetPosition() - *line0).Magnitude();
CVector line = (*line1 - *line0);
float lineLength = line.Magnitude();
- *bulletPos = *line0 + line*Max(1.0f, distToHeli-5.0f);
+ *bulletPos = *line0 + line*Max(1.0f, distToHeli-5.0f)/lineLength;
pHelis[i]->m_nBulletDamage += damage;
@@ -966,6 +1004,26 @@ CHeli::TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, i
return hit;
}
+bool
+CHeli::TestSniperCollision(CVector *line0, CVector *line1)
+{
+ int i;
+ bool hit = false;
+
+ for(i = 0; i < NUM_HELIS; i++){
+ CVector pilotPos = pHelis[i]->GetMatrix() * CVector(-0.43f, 1.49f, 1.5f);
+ if(pHelis[i] && !pHelis[i]->bBulletProof && CCollision::DistToLine(line0, line1, &pilotPos) < 0.8f){
+ pHelis[i]->m_fAngularSpeed = CGeneral::GetRandomTrueFalse() ? 0.05f : -0.05f;
+ pHelis[i]->m_heliStatus = HELI_STATUS_SHOT_DOWN;
+ pHelis[i]->m_nExplosionTimer = CTimer::GetTimeInMilliseconds() + 9999999;
+ pHelis[i]->m_numSwat = 0;
+
+ hit = true;
+ }
+ }
+ return hit;
+}
+
void CHeli::StartCatalinaFlyBy(void)
{
CatalinaHeliOn = true;
diff --git a/src/vehicles/Heli.h b/src/vehicles/Heli.h
index a8f604aa..1f372e42 100644
--- a/src/vehicles/Heli.h
+++ b/src/vehicles/Heli.h
@@ -21,7 +21,7 @@ enum
HELI_RANDOM0,
HELI_RANDOM1,
HELI_SCRIPT,
- HELI_CATALINA,
+ HELI_CATALINA, // TODO 2 in VC
NUM_HELIS
};
@@ -36,7 +36,6 @@ enum
class CHeli : public CVehicle
{
public:
- // 0x288
RwFrame *m_aHeliNodes[NUM_HELI_NODES];
int8 m_heliStatus;
float m_fSearchLightX;
@@ -49,6 +48,8 @@ public:
int8 m_nHeliId;
int8 m_heliType;
int8 m_pathState;
+ int8 m_numSwat;
+ uint8 m_aSwatState[4];
float m_aSearchLightHistoryX[6];
float m_aSearchLightHistoryY[6];
uint32 m_nSearchLightTimer;
@@ -64,7 +65,6 @@ public:
static CHeli *pHelis[NUM_HELIS];
static int16 NumRandomHelis;
static uint32 TestForNewRandomHelisTimer;
- static int16 NumScriptHelis; // unused
static bool CatalinaHeliOn;
static bool CatalinaHasBeenShotDown;
static bool ScriptHeliOn;
@@ -79,12 +79,15 @@ public:
void PreRenderAlways(void);
CObject *SpawnFlyingComponent(int32 component);
+ CVector FindSwatPositionRelativeToHeli(int n);
+ bool SendDownSwat(void);
static void InitHelis(void);
static void UpdateHelis(void);
static void SpecialHeliPreRender(void);
static bool TestRocketCollision(CVector *coors);
static bool TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, int32 damage);
+ static bool TestSniperCollision(CVector *line0, CVector *line1);
static void StartCatalinaFlyBy(void);
static void RemoveCatalinaHeli(void);
diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp
index bc27ca32..ffe9ffbf 100644
--- a/src/vehicles/Plane.cpp
+++ b/src/vehicles/Plane.cpp
@@ -2,6 +2,7 @@
#include "main.h"
#include "General.h"
+#include "CutsceneMgr.h"
#include "ModelIndices.h"
#include "FileMgr.h"
#include "Streaming.h"
@@ -12,10 +13,14 @@
#include "Coronas.h"
#include "Particle.h"
#include "Explosion.h"
+#include "Fluff.h"
#include "World.h"
#include "HandlingMgr.h"
+#include "Heli.h"
#include "Plane.h"
+//--MIAMI: file done
+
CPlaneNode *pPathNodes;
CPlaneNode *pPath2Nodes;
CPlaneNode *pPath3Nodes;
@@ -39,12 +44,10 @@ CPlaneInterpolationLine aPlaneLineBits[6];
float PlanePathPosition[3];
float OldPlanePathPosition[3];
float PlanePathSpeed[3];
-float PlanePath2Position[3];
-float PlanePath3Position;
-float PlanePath4Position;
-float PlanePath2Speed[3];
-float PlanePath3Speed;
-float PlanePath4Speed;
+float PlanePath2Position[5];
+float PlanePath3Position[4];
+float PlanePath2Speed[5];
+float PlanePath3Speed[4];
enum
@@ -62,7 +65,6 @@ int32 DropOffCesnaMissionStatus;
int32 DropOffCesnaMissionStartTime;
CPlane *pDropOffCesna;
-
CPlane::CPlane(int32 id, uint8 CreatedBy)
: CVehicle(CreatedBy)
{
@@ -80,13 +82,15 @@ CPlane::CPlane(int32 id, uint8 CreatedBy)
m_bHasBeenHit = false;
m_bIsDrugRunCesna = false;
m_bIsDropOffCesna = false;
+ m_bTempPlane = false;
SetStatus(STATUS_PLANE);
bIsBIGBuilding = true;
- m_level = LEVEL_NONE;
+ m_level = LEVEL_GENERIC;
-#ifdef FIX_BUGS
- m_isFarAway = true;
+ m_isFarAway = false;
+#ifdef CPLANE_ROTORS
+ m_fRotorRotation = 0.0f;
#endif
}
@@ -99,6 +103,21 @@ void
CPlane::SetModelIndex(uint32 id)
{
CVehicle::SetModelIndex(id);
+#ifdef CPLANE_ROTORS
+ int i;
+ for(i = 0; i < NUM_PLANE_NODES; i++)
+ m_aPlaneNodes[i] = nil;
+ if(GetModelIndex() == MI_CHOPPER){
+ // This is surprisingly annoying...
+ RwFrame *heliNodes[NUM_HELI_NODES];
+ for(i = 0; i < NUM_HELI_NODES; i++)
+ heliNodes[i] = nil;
+ CClumpModelInfo::FillFrameArray(GetClump(), heliNodes);
+ m_aPlaneNodes[PLANE_TOPROTOR] = heliNodes[HELI_TOPROTOR];
+ m_aPlaneNodes[PLANE_BACKROTOR] = heliNodes[HELI_BACKROTOR];
+ }else
+ CClumpModelInfo::FillFrameArray(GetClump(), m_aPlaneNodes);
+#endif
}
void
@@ -123,6 +142,15 @@ CPlane::ProcessControl(void)
int i;
CVector pos;
+ if(CReplay::IsPlayingBack())
+ return;
+
+ if(GetModelIndex() == MI_AIRTRAIN){
+ if(GetPosition().z > 100.0f)
+ CPlaneTrails::RegisterPoint(GetPosition(), m_nPlaneId);
+ }else if(GetModelIndex() == MI_DEADDODO)
+ CPlaneBanners::RegisterPoint(GetPosition(), m_nPlaneId);
+
// Explosion
if(m_bHasBeenHit){
// BUG: since this is all based on frames, you can skip the explosion processing when you go into the menu
@@ -154,7 +182,7 @@ CPlane::ProcessControl(void)
int f = ++nFrameGen & 3;
CParticle::AddParticle(PARTICLE_HELI_DEBRIS, GetMatrix() * CVector(0.0f, 0.0f, 0.0f), dir,
nil, CGeneral::GetRandomNumberInRange(0.1f, 1.0f),
- colors[nFrameGen], rotSpeed, 0, f, 0);
+ colors[nFrameGen&7], rotSpeed, 0, f, 0);
}
}
if(frm >= 40 && frm <= 80 && frm & 1){
@@ -197,17 +225,18 @@ CPlane::ProcessControl(void)
colors[6] = CRGBA(0, 0, 0, 255);
colors[7] = CRGBA(252, 66, 66, 255);
+ CVector dir;
for(i = 0; i < 40; i++){
+ dir.x = CGeneral::GetRandomNumberInRange(-2.0f, 2.0f);
+ dir.y = CGeneral::GetRandomNumberInRange(-2.0f, 2.0f);
+ dir.z = CGeneral::GetRandomNumberInRange(0.0f, 2.0f);
int rotSpeed = CGeneral::GetRandomNumberInRange(30.0f, 20.0f);
if(CGeneral::GetRandomNumber() & 1)
rotSpeed = -rotSpeed;
int f = ++nFrameGen & 3;
- CParticle::AddParticle(PARTICLE_HELI_DEBRIS, GetMatrix() * CVector(0.0f, 0.0f, 0.0f),
- CVector(CGeneral::GetRandomNumberInRange(-2.0f, 2.0f),
- CGeneral::GetRandomNumberInRange(-2.0f, 2.0f),
- CGeneral::GetRandomNumberInRange(0.0f, 2.0f)),
+ CParticle::AddParticle(PARTICLE_HELI_DEBRIS, GetMatrix() * CVector(0.0f, 0.0f, 0.0f), dir,
nil, CGeneral::GetRandomNumberInRange(0.1f, 1.0f),
- colors[nFrameGen], rotSpeed, 0, f, 0);
+ colors[nFrameGen&7], rotSpeed, 0, f, 0);
}
}
if(frm >= 40 && frm <= 60 && frm & 1){
@@ -226,7 +255,7 @@ CPlane::ProcessControl(void)
}
if(frm == 30)
bRenderScorched = true;
- if(frm == 61){
+ if(frm == 62){
TheCamera.SetFadeColour(200, 200, 200);
TheCamera.Fade(0.0f, FADE_OUT);
TheCamera.ProcessFade();
@@ -363,7 +392,7 @@ CPlane::ProcessControl(void)
CVector posFront2 = (1.0f - f)*pPathNodes[curPathNodeFront2].p + f*pPathNodes[nextPathNodeFront2].p;
// Now set matrix
- GetMatrix().GetPosition() = (posRear + posFront) / 2.0f;
+ GetMatrix().SetTranslateOnly((posRear + posFront) / 2.0f);
GetMatrix().GetPosition().z += 4.3f;
CVector fwd = posFront - posRear;
fwd.Normalise();
@@ -382,13 +411,12 @@ CPlane::ProcessControl(void)
GetMatrix().GetRight() = right;
GetMatrix().GetUp() = up;
GetMatrix().GetForward() = fwd;
-
// Set speed
m_vecMoveSpeed = fwd*PlanePathSpeed[m_nPlaneId]/60.0f;
m_fSpeed = PlanePathSpeed[m_nPlaneId]/60.0f;
m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f);
- m_isFarAway = !((posFront - TheCamera.GetPosition()).Magnitude2D() < sq(300.0f));
+ m_isFarAway = !((posFront - TheCamera.GetPosition()).MagnitudeSqr2D() < sq(300.0f));
}else{
float planePathPosition;
float totalLengthOfFlightPath;
@@ -396,26 +424,12 @@ CPlane::ProcessControl(void)
float planePathSpeed;
int numPathNodes;
- if(m_bIsDrugRunCesna){
- planePathPosition = PlanePath3Position;
+ if(GetModelIndex() == MI_CHOPPER){
+ planePathPosition = PlanePath3Position[m_nPlaneId];
totalLengthOfFlightPath = TotalLengthOfFlightPath3;
pathNodes = pPath3Nodes;
- planePathSpeed = PlanePath3Speed;
+ planePathSpeed = PlanePath3Speed[m_nPlaneId];
numPathNodes = NumPath3Nodes;
- if(CesnaMissionStatus == CESNA_STATUS_LANDED){
- pDrugRunCesna = nil;
- FlagToDestroyWhenNextProcessed();
- }
- }else if(m_bIsDropOffCesna){
- planePathPosition = PlanePath4Position;
- totalLengthOfFlightPath = TotalLengthOfFlightPath4;
- pathNodes = pPath4Nodes;
- planePathSpeed = PlanePath4Speed;
- numPathNodes = NumPath4Nodes;
- if(DropOffCesnaMissionStatus == CESNA_STATUS_LANDED){
- pDropOffCesna = nil;
- FlagToDestroyWhenNextProcessed();
- }
}else{
planePathPosition = PlanePath2Position[m_nPlaneId];
totalLengthOfFlightPath = TotalLengthOfFlightPath2;
@@ -484,7 +498,7 @@ CPlane::ProcessControl(void)
f = (pathPositionFront - pathNodes[curPathNodeFront].t)/dist;
CVector posFront = (1.0f - f)*pathNodes[curPathNodeFront].p + f*pathNodes[nextPathNodeFront].p;
- // And for another point 60 units in front of the plane, used to calculate roll
+ // And for another point 30 units in front of the plane, used to calculate roll
float pathPositionFront2 = pathPositionFront + 30.0f;
if(pathPositionFront2 > totalLengthOfFlightPath)
pathPositionFront2 -= totalLengthOfFlightPath;
@@ -515,7 +529,7 @@ CPlane::ProcessControl(void)
CVector posFront2 = (1.0f - f)*pathNodes[curPathNodeFront2].p + f*pathNodes[nextPathNodeFront2].p;
// Now set matrix
- GetMatrix().GetPosition() = (posRear + posFront) / 2.0f;
+ GetMatrix().SetTranslateOnly((posRear + posFront) / 2.0f);
GetMatrix().GetPosition().z += 1.0f;
CVector fwd = posFront - posRear;
fwd.Normalise();
@@ -535,7 +549,7 @@ CPlane::ProcessControl(void)
m_fSpeed = planePathSpeed/60.0f;
m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f);
- m_isFarAway = !((posFront - TheCamera.GetPosition()).Magnitude2D() < sq(300.0f));
+ m_isFarAway = !((posFront - TheCamera.GetPosition()).MagnitudeSqr2D() < sq(300.0f));
}
}
@@ -634,12 +648,36 @@ CPlane::PreRender(void)
CCoronas::TYPE_NORMAL, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
}
+
+#ifdef CPLANE_ROTORS
+ CMatrix mat;
+ CVector pos;
+ m_fRotorRotation += 3.14f/6.5f;
+ if(m_fRotorRotation > 6.28f)
+ m_fRotorRotation -= 6.28f;
+
+ if(m_aPlaneNodes[PLANE_TOPROTOR]){
+ mat.Attach(RwFrameGetMatrix(m_aPlaneNodes[PLANE_TOPROTOR]));
+ pos = mat.GetPosition();
+ mat.SetRotateZ(m_fRotorRotation);
+ mat.Translate(pos);
+ mat.UpdateRW();
+ }
+ if(m_aPlaneNodes[PLANE_BACKROTOR]){
+ mat.Attach(RwFrameGetMatrix(m_aPlaneNodes[PLANE_BACKROTOR]));
+ pos = mat.GetPosition();
+ mat.SetRotateX(m_fRotorRotation);
+ mat.Translate(pos);
+ mat.UpdateRW();
+ }
+#endif
}
void
CPlane::Render(void)
{
- CEntity::Render();
+ if(!CCutsceneMgr::IsRunning())
+ CEntity::Render();
}
#define CRUISE_SPEED (50.0f)
@@ -657,11 +695,9 @@ CPlane::InitPlanes(void)
pPathNodes = LoadPath("data\\paths\\flight.dat", NumPathNodes, TotalLengthOfFlightPath, true);
// Figure out which nodes are on ground
- CColPoint colpoint;
- CEntity *entity;
for(i = 0; i < NumPathNodes; i++){
- if(CWorld::ProcessVerticalLine(pPathNodes[i].p, 1000.0f, colpoint, entity, true, false, false, false, true, false, nil)){
- pPathNodes[i].p.z = colpoint.point.z;
+ if(pPathNodes[i].p.z < 14.0f){
+ pPathNodes[i].p.z = 14.0f;
pPathNodes[i].bOnGround = true;
}else
pPathNodes[i].bOnGround = false;
@@ -688,7 +724,7 @@ CPlane::InitPlanes(void)
aPlaneLineBits[0].position = position;
aPlaneLineBits[0].speed = TAXI_SPEED;
aPlaneLineBits[0].acceleration = 0.0f;
- float dist = (TakeOffPoint-600.0f) - position;
+ float dist = (TakeOffPoint-500.0f) - position;
time += dist/TAXI_SPEED;
position += dist;
@@ -697,9 +733,9 @@ CPlane::InitPlanes(void)
aPlaneLineBits[1].time = time;
aPlaneLineBits[1].position = position;
aPlaneLineBits[1].speed = TAXI_SPEED;
- aPlaneLineBits[1].acceleration = 33.0f/32.0f;
- time += 600.0f/((CRUISE_SPEED+TAXI_SPEED)/2.0f);
- position += 600.0f;
+ aPlaneLineBits[1].acceleration = 618.75f/500.0f;
+ time += 500.0f/((CRUISE_SPEED+TAXI_SPEED)/2.0f);
+ position += 500.0f;
// Fly at cruise speed
aPlaneLineBits[2].type = 1;
@@ -716,9 +752,9 @@ CPlane::InitPlanes(void)
aPlaneLineBits[3].time = time;
aPlaneLineBits[3].position = position;
aPlaneLineBits[3].speed = CRUISE_SPEED;
- aPlaneLineBits[3].acceleration = -33.0f/32.0f;
- time += 600.0f/((CRUISE_SPEED+TAXI_SPEED)/2.0f);
- position += 600.0f;
+ aPlaneLineBits[3].acceleration = -618.75f/500.0f;
+ time += 500.0f/((CRUISE_SPEED+TAXI_SPEED)/2.0f);
+ position += 500.0f;
// Taxi
aPlaneLineBits[4].type = 1;
@@ -739,24 +775,17 @@ CPlane::InitPlanes(void)
TotalDurationOfFlightPath2 = TotalLengthOfFlightPath2/CRUISE_SPEED;
}
-/*
- // Mission Cesna
+ // Heli
if(pPath3Nodes == nil){
pPath3Nodes = LoadPath("data\\paths\\flight3.dat", NumPath3Nodes, TotalLengthOfFlightPath3, false);
TotalDurationOfFlightPath3 = TotalLengthOfFlightPath3/CRUISE_SPEED;
}
- // Mission Cesna
- if(pPath4Nodes == nil){
- pPath4Nodes = LoadPath("data\\paths\\flight4.dat", NumPath4Nodes, TotalLengthOfFlightPath4, false);
- TotalDurationOfFlightPath4 = TotalLengthOfFlightPath4/CRUISE_SPEED;
- }
-*/
-
CStreaming::LoadAllRequestedModels(false);
CStreaming::RequestModel(MI_AIRTRAIN, 0);
CStreaming::LoadAllRequestedModels(false);
+ // NB: 3 hardcoded also in CPlaneTrails
for(i = 0; i < 3; i++){
CPlane *plane = new CPlane(MI_AIRTRAIN, PERMANENT_VEHICLE);
plane->GetMatrix().SetTranslate(0.0f, 0.0f, 0.0f);
@@ -766,20 +795,6 @@ CPlane::InitPlanes(void)
plane->m_nCurPathNode = 0;
CWorld::Add(plane);
}
-
-
- CStreaming::RequestModel(MI_DEADDODO, 0);
- CStreaming::LoadAllRequestedModels(false);
-
- for(i = 0; i < 3; i++){
- CPlane *plane = new CPlane(MI_DEADDODO, PERMANENT_VEHICLE);
- plane->GetMatrix().SetTranslate(0.0f, 0.0f, 0.0f);
- plane->SetStatus(STATUS_ABANDONED);
- plane->bIsLocked = true;
- plane->m_nPlaneId = i;
- plane->m_nCurPathNode = 0;
- CWorld::Add(plane);
- }
}
void
@@ -811,7 +826,6 @@ CPlane::LoadPath(char const *filename, int32 &numNodes, float &totalLength, bool
CPlaneNode *nodes = new CPlaneNode[numNodes];
for(i = 0; i < numNodes; i++){
- *gString = '\0';
for(lp = 0; work_buff[bp] != '\n' && work_buff[bp] != '\0'; bp++, lp++)
gString[lp] = work_buff[bp];
bp++;
@@ -833,6 +847,10 @@ CPlane::LoadPath(char const *filename, int32 &numNodes, float &totalLength, bool
return nodes;
}
+int32 LastTimeInPlane, LastTimeNotInPlane;
+bool bCesnasActivated;
+bool bHelisActivated;
+
void
CPlane::UpdatePlanes(void)
{
@@ -875,25 +893,87 @@ CPlane::UpdatePlanes(void)
t = TotalDurationOfFlightPath2/0x80000;
PlanePath2Position[0] = CRUISE_SPEED * (time & 0x7FFFF)*t;
- PlanePath2Position[1] = CRUISE_SPEED * ((time + 0x80000/3) & 0x7FFFF)*t;
- PlanePath2Position[2] = CRUISE_SPEED * ((time + 0x80000/3*2) & 0x7FFFF)*t;
+ PlanePath2Position[1] = CRUISE_SPEED * ((time + 0x80000/5) & 0x7FFFF)*t;
+ PlanePath2Position[2] = CRUISE_SPEED * ((time + 0x80000/5*2) & 0x7FFFF)*t;
+ PlanePath2Position[3] = CRUISE_SPEED * ((time + 0x80000/5*3) & 0x7FFFF)*t;
+ PlanePath2Position[4] = CRUISE_SPEED * ((time + 0x80000/5*4) & 0x7FFFF)*t;
PlanePath2Speed[0] = CRUISE_SPEED*t;
PlanePath2Speed[1] = CRUISE_SPEED*t;
PlanePath2Speed[2] = CRUISE_SPEED*t;
+ PlanePath2Speed[3] = CRUISE_SPEED*t;
+ PlanePath2Speed[4] = CRUISE_SPEED*t;
+
+ t = TotalDurationOfFlightPath3/0x80000;
+ PlanePath3Position[0] = CRUISE_SPEED * (time & 0x7FFFF)*t;
+ PlanePath3Position[1] = CRUISE_SPEED * ((time + 0x80000/4) & 0x7FFFF)*t;
+ PlanePath3Position[2] = CRUISE_SPEED * ((time + 0x80000/4*2) & 0x7FFFF)*t;
+ PlanePath3Position[3] = CRUISE_SPEED * ((time + 0x80000/4*3) & 0x7FFFF)*t;
+ PlanePath3Speed[0] = CRUISE_SPEED*t;
+ PlanePath3Speed[1] = CRUISE_SPEED*t;
+ PlanePath3Speed[2] = CRUISE_SPEED*t;
+ PlanePath3Speed[3] = CRUISE_SPEED*t;
+
+ if(FindPlayerVehicle() && (FindPlayerVehicle()->GetVehicleAppearance() == VEHICLE_APPEARANCE_HELI ||
+ FindPlayerVehicle()->GetVehicleAppearance() == VEHICLE_APPEARANCE_PLANE))
+ LastTimeInPlane = CTimer::GetTimeInMilliseconds();
+ else
+ LastTimeNotInPlane = CTimer::GetTimeInMilliseconds();
+
+ if(CTimer::GetTimeInMilliseconds() - LastTimeNotInPlane > 10000){
+ if(!bCesnasActivated){
+ if(CStreaming::HasModelLoaded(MI_DEADDODO)){
+ for(i = 0; i < 5; i++){
+ CPlane *plane = new CPlane(MI_DEADDODO, PERMANENT_VEHICLE);
+ plane->GetMatrix().SetTranslate(0.0f, 0.0f, 0.0f);
+ plane->SetStatus(STATUS_ABANDONED);
+ plane->bIsLocked = true;
+ plane->m_nPlaneId = i;
+ plane->m_nCurPathNode = 0;
+ plane->m_bTempPlane = true;
+ CWorld::Add(plane);
+ }
+ bCesnasActivated = true;
+ }else
+ CStreaming::RequestModel(MI_DEADDODO, 0);
+ }
- if(CesnaMissionStatus == CESNA_STATUS_FLYING){
- PlanePath3Speed = CRUISE_SPEED*TotalDurationOfFlightPath3/0x20000;
- PlanePath3Position = PlanePath3Speed * ((time - CesnaMissionStartTime) & 0x1FFFF);
- if(time - CesnaMissionStartTime >= 128072)
- CesnaMissionStatus = CESNA_STATUS_LANDED;
- }
+ if(!bHelisActivated){
+ if(CStreaming::HasModelLoaded(MI_CHOPPER)){
+ for(i = 0; i < 4; i++){
+ CPlane *plane = new CPlane(MI_CHOPPER, PERMANENT_VEHICLE);
+ plane->GetMatrix().SetTranslate(0.0f, 0.0f, 0.0f);
+ plane->SetStatus(STATUS_ABANDONED);
+ plane->bIsLocked = true;
+ plane->m_nPlaneId = i;
+ plane->m_nCurPathNode = 0;
+ plane->m_bTempPlane = true;
+ CWorld::Add(plane);
+ }
+ bHelisActivated = true;
+ }else
+ CStreaming::RequestModel(MI_CHOPPER, 0);
+ }
+ }else if(CTimer::GetTimeInMilliseconds() - LastTimeInPlane > 10000)
+ RemoveTemporaryPlanes();
+}
- if(DropOffCesnaMissionStatus == CESNA_STATUS_FLYING){
- PlanePath4Speed = CRUISE_SPEED*TotalDurationOfFlightPath4/0x80000;
- PlanePath4Position = PlanePath4Speed * ((time - DropOffCesnaMissionStartTime) & 0x7FFFF);
- if(time - DropOffCesnaMissionStartTime >= 521288)
- DropOffCesnaMissionStatus = CESNA_STATUS_LANDED;
+void
+CPlane::RemoveTemporaryPlanes(void)
+{
+ int i;
+ if(!bHelisActivated && !bCesnasActivated)
+ return;
+
+ i = CPools::GetVehiclePool()->GetSize();
+ while(--i >= 0){
+ CPlane *plane = (CPlane*)CPools::GetVehiclePool()->GetSlot(i);
+ if(plane && plane->IsPlane() && plane->m_bTempPlane){
+ CWorld::Remove(plane);
+ delete plane;
+ }
}
+ bCesnasActivated = false;
+ bHelisActivated = false;
}
bool
@@ -921,6 +1001,7 @@ CPlane::TestRocketCollision(CVector *rocketPos)
return false;
}
+//--MIAMI: unused
// BUG: not in CPlane in the game
void
CPlane::CreateIncomingCesna(void)
@@ -944,6 +1025,7 @@ CPlane::CreateIncomingCesna(void)
printf("CPlane::CreateIncomingCesna(void)\n");
}
+//--MIAMI: unused
void
CPlane::CreateDropOffCesna(void)
{
@@ -966,8 +1048,21 @@ CPlane::CreateDropOffCesna(void)
printf("CPlane::CreateDropOffCesna(void)\n");
}
+//--MIAMI: all unused
const CVector CPlane::FindDrugPlaneCoordinates(void) { return pDrugRunCesna->GetPosition(); }
const CVector CPlane::FindDropOffCesnaCoordinates(void) { return pDropOffCesna->GetPosition(); }
bool CPlane::HasCesnaLanded(void) { return CesnaMissionStatus == CESNA_STATUS_LANDED; }
bool CPlane::HasCesnaBeenDestroyed(void) { return CesnaMissionStatus == CESNA_STATUS_DESTROYED; }
bool CPlane::HasDropOffCesnaBeenShotDown(void) { return DropOffCesnaMissionStatus == CESNA_STATUS_DESTROYED; }
+
+void
+CPlane::Load(void)
+{
+ RemoveTemporaryPlanes();
+}
+
+void
+CPlane::Save(void)
+{
+ RemoveTemporaryPlanes();
+}
diff --git a/src/vehicles/Plane.h b/src/vehicles/Plane.h
index e9456bcd..c8f02048 100644
--- a/src/vehicles/Plane.h
+++ b/src/vehicles/Plane.h
@@ -4,6 +4,11 @@
enum ePlaneNodes
{
+#ifdef CPLANE_ROTORS
+ // for heli
+ PLANE_TOPROTOR,
+ PLANE_BACKROTOR,
+#endif
PLANE_WHEEL_FRONT = 2,
PLANE_WHEEL_READ,
NUM_PLANE_NODES
@@ -29,7 +34,10 @@ struct CPlaneInterpolationLine
class CPlane : public CVehicle
{
public:
- // 0x288
+#ifdef CPLANE_ROTORS
+ RwFrame *m_aPlaneNodes[NUM_PLANE_NODES];
+ float m_fRotorRotation;
+#endif
int16 m_nPlaneId;
int16 m_isFarAway;
int16 m_nCurPathNode;
@@ -38,6 +46,7 @@ public:
bool m_bHasBeenHit;
bool m_bIsDrugRunCesna;
bool m_bIsDropOffCesna;
+ bool m_bTempPlane;
CPlane(int32 id, uint8 CreatedBy);
~CPlane(void);
@@ -53,6 +62,7 @@ public:
static void InitPlanes(void);
static void Shutdown(void);
static CPlaneNode *LoadPath(char const *filename, int32 &numNodes, float &totalLength, bool loop);
+ static void RemoveTemporaryPlanes(void);
static void UpdatePlanes(void);
static bool TestRocketCollision(CVector *rocketPos);
static void CreateIncomingCesna(void);
@@ -62,6 +72,8 @@ public:
static bool HasCesnaLanded(void);
static bool HasCesnaBeenDestroyed(void);
static bool HasDropOffCesnaBeenShotDown(void);
+ static void Load(void);
+ static void Save(void);
};
extern float LandingPoint;
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 360b843b..378a4c0a 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -232,7 +232,7 @@ CVehicle::SetupLighting(void)
}else{
CVector coors = GetPosition();
float lighting = CPointLights::GenerateLightsAffectingObject(&coors);
- if(!bHasBlip && lighting != 1.0f){
+ if(lighting != 1.0f){
SetAmbientAndDirectionalColours(lighting);
return true;
}
@@ -1512,7 +1512,7 @@ CVehicle::MakeNonDraggedPedsLeaveVehicle(CPed *ped1, CPed *ped2, CPlayerPed *&pl
for(i = 0; i < numPeds2; i++)
if(peds2[i]->IsFemale() || CGeneral::GetRandomTrueFalse()){
peds2[i]->m_leaveCarTimer = CTimer::GetTimeInMilliseconds() + 10000;
- peds2[i]->b156_8 = true;
+ peds2[i]->bHeldHostageInCar = true;
peds2[i]->bFleeAfterExitingCar = true;
}
}
@@ -1557,9 +1557,9 @@ CVehicle::IsLawEnforcementVehicle(void)
}
bool
-CVehicle::UsesSiren(uint32 id)
+CVehicle::UsesSiren(void)
{
- switch(id){
+ switch(GetModelIndex()){
case MI_FIRETRUCK:
case MI_AMBULAN:
case MI_FBICAR:
@@ -2239,7 +2239,7 @@ CVehicle::DoSunGlare(void)
int a2 = colmodel->triangles[i+1].a;
int b2 = colmodel->triangles[i+1].b;
int c2 = colmodel->triangles[i+1].c;
- CVector vert1 = colmodel->vertices[a1];
+ CVector vert1 = colmodel->vertices[a1].Get();
CVector vert4;
// Need an upward surface
if(vert1.z <= 0.0f)
@@ -2250,23 +2250,23 @@ CVehicle::DoSunGlare(void)
if(a2 != a1 && a2 != b1 && a2 != c1){
// a2 is not in tri1
numTri2Verts++;
- vert4 = colmodel->vertices[a2];
+ vert4 = colmodel->vertices[a2].Get();
}
if(b2 != a1 && b2 != b1 && b2 != c1){
// b2 is not in tri1
numTri2Verts++;
- vert4 = colmodel->vertices[b2];
+ vert4 = colmodel->vertices[b2].Get();
}
if(c2 != a1 && c2 != b1 && c2 != c1){
// c2 is not in tri1
numTri2Verts++;
- vert4 = colmodel->vertices[c2];
+ vert4 = colmodel->vertices[c2].Get();
}
// Need exactly one vertex from tri2 for a quad with tri1
if(numTri2Verts != 1)
continue;
- CVector mid = (vert1 + colmodel->vertices[b1] + colmodel->vertices[c1] + vert4)/4.0f;
+ CVector mid = (vert1 + colmodel->vertices[b1].Get() + colmodel->vertices[c1].Get() + vert4)/4.0f;
float dy = mid.y - vert1.y;
float dx = mid.x - vert1.x;
float dist = 1.4f * Min(Abs(dx), Abs(dy));
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index b1e3d803..34106327 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -345,7 +345,7 @@ public:
int FindTyreNearestPoint(float x, float y);
bool IsLawEnforcementVehicle(void);
void ChangeLawEnforcerState(uint8 enable);
- bool UsesSiren(uint32 id);
+ bool UsesSiren(void);
bool IsVehicleNormal(void);
bool CarHasRoof(void);
bool IsUpsideDown(void);
diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp
index f4ad346d..74af1375 100644
--- a/src/weapons/Explosion.cpp
+++ b/src/weapons/Explosion.cpp
@@ -170,6 +170,7 @@ CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionT
break;
case EXPLOSION_CAR:
case EXPLOSION_CAR_QUICK:
+ case EXPLOSION_BOAT:
explosion.m_fRadius = 9.0f;
explosion.m_fPower = 300.0f;
explosion.m_fStopTime = lifetime + CTimer::GetTimeInMilliseconds() + 4250;
@@ -205,6 +206,7 @@ CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionT
}
break;
case EXPLOSION_HELI:
+ case EXPLOSION_HELI2:
explosion.m_fRadius = 6.0f;
explosion.m_fPower = 300.0f;
explosion.m_fStopTime = lifetime + CTimer::GetTimeInMilliseconds() + 750;
diff --git a/src/weapons/Explosion.h b/src/weapons/Explosion.h
index c8539cca..cfa75ec1 100644
--- a/src/weapons/Explosion.h
+++ b/src/weapons/Explosion.h
@@ -10,7 +10,9 @@ enum eExplosionType
EXPLOSION_ROCKET,
EXPLOSION_CAR,
EXPLOSION_CAR_QUICK,
+ EXPLOSION_BOAT,
EXPLOSION_HELI,
+ EXPLOSION_HELI2,
EXPLOSION_MINE,
EXPLOSION_BARREL,
EXPLOSION_TANK_GRENADE,
diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp
index bd53d8c5..0f71aeda 100644
--- a/src/weapons/WeaponInfo.cpp
+++ b/src/weapons/WeaponInfo.cpp
@@ -114,7 +114,7 @@ CWeaponInfo::LoadWeaponData(void)
char line[256], weaponName[32], fireType[32];
char animToPlay[32];
- int bp, buflen;
+ size_t bp, buflen;
int lp, linelen;
CFileMgr::SetDir("DATA");