diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..85d1e584
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,24 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior.
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Version**
+Tell us what version you're running. Find out using the debug menu (Ctrl-M, Debug -> Version Text)
+If you send a screenshot just enable it beforehand.
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 00000000..f458bd43
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,13 @@
+As long as it's not linux/cross-platform skeleton/compatibility layer, all of the code on the repo that's not behind a preprocessor condition(like FIX_BUGS) are **completely** reversed code from original binaries.
+
+We **don't** accept custom codes, as long as it's not wrapped via preprocessor conditions, or it's linux/cross-platform skeleton/compatibility layer.
+
+We accept only these kinds of PRs;
+
+- A new feature that exists in at least one of the GTAs (if it wasn't in III/VC then it doesn't have to be decompilation)
+- Game, UI or UX bug fixes (if it's a fix to R* code, it should be behind FIX_BUGS)
+- Platform-specific and/or unused code that's not been reversed yet
+- Makes reversed code more understandable/accurate, as in "which code would produce this assembly".
+- A new cross-platform skeleton/compatibility layer, or improvements to them
+- Translation fixes, for languages R* supported/outsourced
+- Code that increase maintainability
diff --git a/.github/workflows/build-switch.yml b/.github/workflows/build-switch.yml
new file mode 100644
index 00000000..46e1d501
--- /dev/null
+++ b/.github/workflows/build-switch.yml
@@ -0,0 +1,28 @@
+name: re3 cmake devkitA64 (Nintendo Switch)
+on:
+ pull_request:
+ push:
+ release:
+ types: published
+jobs:
+ build-nintendo-switch:
+ runs-on: ubuntu-latest
+ container: devkitpro/devkita64:latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: 'true'
+ - name: "Build files"
+ run: |
+ /opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild -DRE3_AUDIO=OAL -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=GLFW -DRE3_WITH_OPUS=False -DRE3_VENDORED_LIBRW=True -DRE3_INSTALL=True
+ cmake --build build --parallel
+ - name: "Create binary package (cpack)"
+ working-directory: ./build
+ run: |
+ cpack
+ - name: "Archive binary package (github artifacts)"
+ uses: actions/upload-artifact@v2
+ with:
+ name: "switch-gl3"
+ path: build/*.zip
+ if-no-files-found: error
diff --git a/.gitignore b/.gitignore
index dadc9da8..20266255 100644
--- a/.gitignore
+++ b/.gitignore
@@ -355,9 +355,13 @@ vendor/glfw-3.3.2.bin.WIN64/
sdk/
-*.rpx
-*.elf
-/.vscode
+codewarrior/re3.mcp
codewarrior/re3_Data/
codewarrior/Release/
codewarrior/Debug/
+
+src/extras/GitSHA1.cpp
+
+*.rpx
+*.elf
+/.vscode
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d753d80..adf3c29f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,26 @@
-cmake_minimum_required(VERSION 3.8)
+cmake_minimum_required(VERSION 3.14)
set(EXECUTABLE re3)
set(PROJECT RE3)
project(${EXECUTABLE} C CXX)
+set(${PROJECT}_AUTHOR "${PROJECT} Team")
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+include(GetGitRevisionDescription)
+get_git_head_revision(GIT_REFSPEC GIT_SHA1 "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR")
+message(STATUS "Building ${CMAKE_PROJECT_NAME} GIT SHA1: ${GIT_SHA1}")
+
+if(NINTENDO_SWITCH)
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/nx")
+ include(NXFunctions)
+endif()
+
+if(NOT COMMAND re3_platform_target)
+ function(re3_platform_target)
+ endfunction()
+endif()
+
if(WIN32)
set(${PROJECT}_AUDIOS "OAL" "MSS")
else()
@@ -62,6 +77,8 @@ if(${PROJECT}_INSTALL)
set(os "-apple")
elseif(UNIX)
set(os "-linux")
+ elseif(NINTENDO_SWITCH)
+ set(os "-switch")
else()
set(compiler "-UNK")
message(WARNING "Unknown os. Created cpack package will be wrong. (override using cpack -P)")
diff --git a/README.md b/README.md
index cfb685aa..09d62021 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# re3-wiiu
-
+
This is a port of GTA III to the Nintendo Wii U.
@@ -15,36 +15,102 @@ Then clone this repo using `git clone --recursive https://github.com/GaryOderNic
To build the channel edit `CHANNEL_BUILD := 0` to `CHANNEL_BUILD := 1` in the `Makefile`.
# Original README
-
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGTAmodding%2Fre3%2Fbadge%3Fref%3Dmaster&style=flat)](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=master)
-
+
## Intro
-The aim of this project is to reverse GTA III for PC by replacing
-parts of the game [one by one](https://en.wikipedia.org/wiki/Ship_of_Theseus)
-such that we have a working game at all times.
+In this repository you'll find the fully reversed source code for GTA III ([master](https://github.com/GTAmodding/re3/tree/master/) branch) and GTA VC ([miami](https://github.com/GTAmodding/re3/tree/miami/) branch).
-## How can I try it?
+It has been tested and works on Windows, Linux, MacOS and FreeBSD, on x86, amd64, arm and arm64.\
+Rendering is handled either by original RenderWare (D3D8)
+or the reimplementation [librw](https://github.com/aap/librw) (D3D9, OpenGL 2.1 or above, OpenGL ES 2.0 or above).\
+Audio is done with MSS (using dlls from original GTA) or OpenAL.
-- re3 requires game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).
-- Build re3 or download [the latest nightly build](https://github.com/GTAmodding/re3/actions) (You must be logged in.)
-- (Optional) If you want to use optional features like Russian language or menu map, copy the files in /gamefiles folder to your game root folder.
-- Move re3.exe to GTA 3 directory and run it.
+The project has also been ported to the [Nintendo Switch](https://github.com/AGraber/re3-nx/),
+[Playstation Vita](https://github.com/Rinnegatamante/re3) and
+[Nintendo Wii U](https://github.com/GaryOderNichts/re3-wiiu/).
-## Latest standalone executables to download
+We cannot build for PS2 or Xbox yet. If you're interested in doing so, get in touch with us.
-(Put content of selected archive into gamedir)
+## Installation
-- [MacOS 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/macos-latest-gl3.zip)
-- [Linux 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/ubuntu-latest-gl3.zip)
-- [Windows D3D9 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/windows-latest-d3d9.zip)
-- [Windows OpenGL 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/windows-latest-gl3.zip)
-- [Windows D3D9 MSS 32bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_x86/master/re3_Release_win-x86-librw_d3d9-mss.zip)
+- re3 requires PC game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).
+- Build re3 or download the latest build:
+ - [Windows D3D9 MSS 32bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_x86/master/re3_Release_win-x86-librw_d3d9-mss.zip)
+ - [Windows D3D9 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_d3d9-oal.zip)
+ - [Windows OpenGL 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_gl3_glfw-oal.zip)
+ - [Linux 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/ubuntu-18.04-gl3.zip)
+ - [MacOS 64bit x86-64](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/macos-latest-gl3.zip)
+- Extract the downloaded zip over your GTA 3 directory and run re3. The zip includes the binary, updated and additional gamefiles and in case of OpenAL the required dlls.
+
+## Screenshots
+
+![re3 2021-02-11 22-57-03-23](https://user-images.githubusercontent.com/1521437/107704085-fbdabd00-6cbc-11eb-8406-8951a80ccb16.png)
+![re3 2021-02-11 22-43-44-98](https://user-images.githubusercontent.com/1521437/107703339-cbdeea00-6cbb-11eb-8f0b-07daa105d470.png)
+![re3 2021-02-11 22-46-33-76](https://user-images.githubusercontent.com/1521437/107703343-cd101700-6cbb-11eb-9ccd-012cb90524b7.png)
+![re3 2021-02-11 22-50-29-54](https://user-images.githubusercontent.com/1521437/107703348-d00b0780-6cbb-11eb-8afd-054249c2b95e.png)
+
+## Improvements
+
+We have implemented a number of changes and improvements to the original game.
+They can be configured in `core/config.h`.
+Some of them can be toggled at runtime, some cannot.
+
+* Fixed a lot of smaller and bigger bugs
+* User files (saves and settings) stored in GTA root directory
+* Settings stored in re3.ini file instead of gta3.set
+* Debug menu to do and change various things (Ctrl-M to open)
+* Debug camera (Ctrl-B to toggle)
+* Rotatable camera
+* XInput controller support (Windows)
+* No loading screens between islands ("map memory usage" in menu)
+* Skinned ped support (models from Xbox or Mobile)
+* Rendering
+ * Widescreen support (properly scaled HUD, Menu and FOV)
+ * PS2 MatFX (vehicle reflections)
+ * PS2 alpha test (better rendering of transparency)
+ * PS2 particles
+ * Xbox vehicle rendering
+ * Xbox world lightmap rendering (needs Xbox map)
+ * Xbox ped rim light
+ * Xbox screen rain droplets
+ * More customizable colourfilter
+* Menu
+ * Map
+ * More options
+ * Controller configuration menu
+ * ...
+* Can load DFFs and TXDs from other platforms, possibly with a performance penalty
+* ...
+
+## To-Do
+
+The following things would be nice to have/do:
+
+* Fix physics for high FPS
+* Improve performance on lower end devices, especially the OpenGL layer on the Raspberry Pi (if you have experience with this, please get in touch)
+* Compare code with PS2 code (tedious, no good decompiler)
+* [PS2 port](https://github.com/GTAmodding/re3/wiki/PS2-port)
+* Xbox port (not quite as important)
+* reverse remaining unused/debug functions
+* compare CodeWarrior build with original binary for more accurate code (very tedious)
+
+## Modding
+
+Asset modifications (models, texture, handling, script, ...) should work the same way as with original GTA for the most part.
+
+Mods that make changes to the code (dll/asi, CLEO, limit adjusters) will *not* work.
+Some things these mods do are already implemented in re3 (much of SkyGFX, GInput, SilentPatch, Widescreen fix),
+others can easily be achieved (increasing limis, see `config.h`),
+others will simply have to be rewritten and integrated into the code directly.
+Sorry for the inconvenience.
## Building from Source
-If you gonna use premake, then before starting you may want to point GTA_III_RE_DIR environment variable to GTA3 root folder, if you want executable to be moved there via post-build script.
+When using premake, you may want to point GTA_III_RE_DIR environment variable to GTA3 root folder if you want the executable to be moved there via post-build script.
+
+Clone the repository with `git clone --recursive https://github.com/GTAmodding/re3.git`. Then `cd re3` into the cloned repository.
Linux Premake
@@ -54,13 +120,6 @@ For Linux using premake, proceed: [Building on Linux](https://github.com/GTAmodd
Linux Conan
-Obtain source code.
-```
-git clone https://github.com/GTAmodding/re3.git
-cd re3
-git submodule init
-git submodule update --recursive
-```
Install python and conan, and then run build.
```
conan export vendor/librw librw/master@
@@ -71,6 +130,12 @@ conan build .. -if build -bf build -pf package
```
+MacOS Premake
+
+For MacOS using premake, proceed: [Building on MacOS](https://github.com/GTAmodding/re3/wiki/Building-on-MacOS)
+
+
+
FreeBSD
For FreeBSD using premake, proceed: [Building on FreeBSD](https://github.com/GTAmodding/re3/wiki/Building-on-FreeBSD)
@@ -79,35 +144,76 @@ For FreeBSD using premake, proceed: [Building on FreeBSD](https://github.com/GTA
Windows
-Assuming you have Visual Studio:
-- Clone the repo using the argument `--recursive`.
+Assuming you have Visual Studio 2015/2017/2019:
- Run one of the `premake-vsXXXX.cmd` variants on root folder.
-- Open the project via Visual Studio
-
-**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)
+- Open build/re3.sln with Visual Studio and compile the solution.
+
+Microsoft recently discontinued its downloads of the DX9 SDK. You can download an archived version here: https://archive.org/details/dxsdk_jun10
**If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).
-> :information_source: 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.
+> :information_source: premake has an `--with-lto` option if you want the project to be compiled with Link Time Optimization.
-> :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.
+> :information_source: There are various settings in [config.h](https://github.com/GTAmodding/re3/tree/master/src/core/config.h), you may want to take a look there.
+
+> :information_source: 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.
+
+If you feel the need, you can also use CodeWarrior 7 to compile re3 using the supplied codewarrior/re3.mcp project - this requires the original RW33 libraries, and the DX8 SDK. The build is unstable compared to the MSVC builds though, and is mostly meant to serve as a reference.
## Contributing
-Please read the [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) Document
+As long as it's not linux/cross-platform skeleton/compatibility layer, all of the code on the repo that's not behind a preprocessor condition(like FIX_BUGS) are **completely** reversed code from original binaries.
-### Unreversed / incomplete classes (at least the ones we know)
-The following classes have only unused or practically unused code left:
-```
-NameGrid.cpp - only on mobile (a player name grid, either a very early player name code ala GTA1 or a multiplayer leftover)
-PedDebug.cpp - only on mobile (debug code)
-HandlingMgr.cpp - debug functions from mobile
-CFormationInfo - unused PedAI class that could be found on mobile
-CVehicle::ProcessBikeWheel - early bike code (only on mobile)
-CAutomobile::DebugCode - debug function from mobile
-CBoat::DebugCode - debug function from mobile
-CBoat::ModifyHandlingValue - debug function from mobile
-CBoat::DisplayHandlingData - debug function from mobile
-CStreaming::PrintRequestList - debug function from mobile
-d3d8raster.c - only on PC (slight RW modification that we don't actually need)
-```
+We **don't** accept custom codes, as long as it's not wrapped via preprocessor conditions, or it's linux/cross-platform skeleton/compatibility layer.
+
+We accept only these kinds of PRs;
+
+- A new feature that exists in at least one of the GTAs (if it wasn't in III/VC then it doesn't have to be decompilation)
+- Game, UI or UX bug fixes (if it's a fix to original code, it should be behind FIX_BUGS)
+- Platform-specific and/or unused code that's not been reversed yet
+- Makes reversed code more understandable/accurate, as in "which code would produce this assembly".
+- A new cross-platform skeleton/compatibility layer, or improvements to them
+- Translation fixes, for languages original game supported
+- Code that increase maintainability
+
+We have a [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) document that isn't followed or enforced very well.
+
+Do not use features from C++11 or later.
+
+
+## History
+
+re3 was started sometime in the spring of 2018,
+initially as a way to test reversed collision and physics code
+inside the game.
+This was done by replacing single functions of the game
+with their reversed counterparts using a dll.
+
+After a bit of work the project lay dormant for about a year
+and was picked up again and pushed to github in May 2019.
+At the time I (aap) had reversed around 10k lines of code and estimated
+the final game to have around 200-250k.
+Others quickly joined the effort (Fire_Head, shfil, erorcun and Nick007J
+in time order, and Serge a bit later) and we made very quick progress
+throughout the summer of 2019
+after which the pace slowed down a bit.
+
+Due to everyone staying home during the start of the Corona pandemic
+everybody had a lot of time to work on re3 again and
+we finally got a standalone exe in April 2020 (around 180k lines by then).
+
+After the initial excitement and fixing and polishing the code further,
+reVC was started in early May 2020 by starting from re3 code,
+not by starting from scratch replacing functions with a dll.
+After a few months of mostly steady progress we considered reVC
+finished in December.
+
+Since then we have started reLCS, which is currently work in progress.
+
+
+## License
+
+We don't feel like we're in a position to give this code a license.\
+The code should only be used for educational, documentation and modding purposes.\
+We do not encourage piracy or commercial use.\
+Please keep derivate work open source and give proper credit.
diff --git a/autoconf/LICENSE.txt b/autoconf/LICENSE.txt
new file mode 100644
index 00000000..eb1b1720
--- /dev/null
+++ b/autoconf/LICENSE.txt
@@ -0,0 +1,27 @@
+Copyright (c) 2016 Blizzard Entertainment and individual contributors.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. 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.
+
+ 3. Neither the name of Premake nor the names of its 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 HOLDER 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.
diff --git a/autoconf/api.lua b/autoconf/api.lua
new file mode 100644
index 00000000..064ea795
--- /dev/null
+++ b/autoconf/api.lua
@@ -0,0 +1,305 @@
+---
+-- Autoconfiguration.
+-- Copyright (c) 2016 Blizzard Entertainment
+-- Enhanced by re3
+---
+local p = premake
+local autoconf = p.modules.autoconf
+autoconf.cache = {}
+autoconf.parameters = ""
+
+
+---
+-- register autoconfigure api.
+---
+p.api.register {
+ name = "autoconfigure",
+ scope = "config",
+ kind = "table"
+}
+
+---
+-- Check for a particular include file.
+--
+-- @cfg : Current config.
+-- @variable : The variable to store the result, such as 'HAVE_STDINT_H'.
+-- @filename : The header file to check for.
+---
+function check_include(cfg, variable, filename)
+ local res = autoconf.cache_compile(cfg, variable, function ()
+ p.outln('#include <' .. filename .. '>')
+ p.outln('int main(void) { return 0; }')
+ end)
+
+ if res.value then
+ autoconf.set_value(cfg, variable, 1)
+ end
+end
+
+
+---
+-- Check for size of a particular type.
+--
+-- @cfg : Current config.
+-- @variable : The variable to use, such as 'SIZEOF_SIZE_T', this method will also add "'HAVE_' .. variable".
+-- @type : The type to check.
+-- @headers : An optional array of header files to include.
+-- @defines : An optional array of defines to define.
+---
+function check_type_size(cfg, variable, type, headers, defines)
+ check_include(cfg, 'HAVE_SYS_TYPES_H', 'sys/types.h')
+ check_include(cfg, 'HAVE_STDINT_H', 'stdint.h')
+ check_include(cfg, 'HAVE_STDDEF_H', 'stddef.h')
+
+ local res = autoconf.cache_compile(cfg, variable .. cfg.platform,
+ function ()
+ if cfg.autoconf['HAVE_SYS_TYPES_H'] then
+ p.outln('#include ')
+ end
+
+ if cfg.autoconf['HAVE_STDINT_H'] then
+ p.outln('#include ')
+ end
+
+ if cfg.autoconf['HAVE_STDDEF_H'] then
+ p.outln('#include ')
+ end
+
+ autoconf.include_defines(defines)
+ autoconf.include_headers(headers)
+ p.outln("")
+ p.outln("#define SIZE (sizeof(" .. type .. "))")
+ p.outln("char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',")
+ p.outln(" ('0' + ((SIZE / 10000)%10)),")
+ p.outln(" ('0' + ((SIZE / 1000)%10)),")
+ p.outln(" ('0' + ((SIZE / 100)%10)),")
+ p.outln(" ('0' + ((SIZE / 10)%10)),")
+ p.outln(" ('0' + (SIZE %10)),")
+ p.outln(" ']', '\\0'};")
+ p.outln("")
+ p.outln("int main(int argc, char *argv[]) {")
+ p.outln(" int require = 0;")
+ p.outln(" require += info_size[argc];")
+ p.outln(" (void)argv;")
+ p.outln(" return require;")
+ p.outln("}")
+ end,
+ function (e)
+ -- if the compile step succeeded, we should have a binary with 'INFO:size[*****]'
+ -- somewhere in there.
+ local content = io.readfile(e.binary)
+ if content then
+ local size = string.find(content, 'INFO:size')
+ if size then
+ e.size = tonumber(string.sub(content, size+10, size+14))
+ end
+ end
+ end
+ )
+
+ if res.size then
+ autoconf.set_value(cfg, 'HAVE_' .. variable, 1)
+ autoconf.set_value(cfg, variable, res.size)
+ end
+end
+
+
+---
+-- Check if the given struct or class has the specified member variable
+--
+-- @cfg : current config.
+-- @variable : variable to store the result.
+-- @type : the name of the struct or class you are interested in
+-- @member : the member which existence you want to check
+-- @headers : an optional array of header files to include.
+-- @defines : An optional array of defines to define.
+---
+function check_struct_has_member(cfg, variable, type, member, headers, defines)
+ local res = autoconf.cache_compile(cfg, variable, function ()
+ autoconf.include_defines(defines)
+ autoconf.include_headers(headers)
+ p.outln('int main(void) {')
+ p.outln(' (void)sizeof(((' .. type .. '*)0)->' .. member ..');')
+ p.outln(' return 0;')
+ p.outln('}')
+ end)
+
+ if res.value then
+ autoconf.set_value(cfg, variable, 1)
+ end
+end
+
+
+---
+-- Check if a symbol exists as a function, variable, or macro
+--
+-- @cfg : current config.
+-- @variable : variable to store the result.
+-- @symbol : The symbol to check for.
+-- @headers : an optional array of header files to include.
+-- @defines : An optional array of defines to define.
+---
+function check_symbol_exists(cfg, variable, symbol, headers, defines)
+ local h = headers
+ local res = autoconf.cache_compile(cfg, variable, function ()
+ autoconf.include_defines(defines)
+ autoconf.include_headers(headers)
+ p.outln('int main(int argc, char** argv) {')
+ p.outln(' (void)argv;')
+ p.outln('#ifndef ' .. symbol)
+ p.outln(' return ((int*)(&' .. symbol .. '))[argc];')
+ p.outln('#else')
+ p.outln(' (void)argc;')
+ p.outln(' return 0;')
+ p.outln('#endif')
+ p.outln('}')
+ end)
+
+ if res.value then
+ autoconf.set_value(cfg, variable, 1)
+ end
+end
+
+
+---
+-- try compiling a piece of c/c++
+---
+function autoconf.try_compile(cfg, cpp)
+ local ts = autoconf.toolset(cfg)
+ if ts then
+ return ts.try_compile(cfg, cpp, autoconf.parameters)
+ else
+ p.warnOnce('autoconf', 'no toolset found, autoconf always failing.')
+ end
+end
+
+
+function autoconf.cache_compile(cfg, entry, func, post)
+ if not autoconf.cache[entry] then
+ local cpp = p.capture(func)
+ local res = autoconf.try_compile(cfg, cpp)
+ if res then
+ local e = { binary = res, value = true }
+ if post then
+ post(e)
+ end
+ autoconf.cache[entry] = e
+ else
+ autoconf.cache[entry] = { }
+ end
+ end
+ return autoconf.cache[entry]
+end
+
+
+---
+-- get the current configured toolset, or the default.
+---
+function autoconf.toolset(cfg)
+ local ts = p.config.toolset(cfg)
+ if not ts then
+ local tools = {
+ -- Actually we always return nil on msc. see msc.lua
+ ['vs2010'] = p.tools.msc,
+ ['vs2012'] = p.tools.msc,
+ ['vs2013'] = p.tools.msc,
+ ['vs2015'] = p.tools.msc,
+ ['vs2017'] = p.tools.msc,
+ ['vs2019'] = p.tools.msc,
+ ['gmake'] = premake.tools.gcc,
+ ['gmake2'] = premake.tools.gcc,
+ ['codelite'] = premake.tools.gcc,
+ ['xcode4'] = premake.tools.clang,
+ }
+ ts = tools[_ACTION]
+ end
+ return ts
+end
+
+
+---
+-- store the value of the variable in the configuration
+---
+function autoconf.set_value(cfg, variable, value)
+ cfg.autoconf[variable] = value
+end
+
+
+---
+-- write the cfg.autoconf table to the file
+---
+function autoconf.writefile(cfg, filename)
+ if cfg.autoconf then
+ local file = io.open(filename, "w+")
+ for variable, value in pairs(cfg.autoconf) do
+ file:write('#define ' .. variable .. ' ' .. tostring(value) .. (_eol or '\n'))
+ end
+ file:close()
+ end
+end
+
+
+---
+-- Utility method to add a table of headers.
+---
+function autoconf.include_headers(headers)
+ if headers ~= nil then
+ if type(headers) == "table" then
+ for _, v in ipairs(headers) do
+ p.outln('#include <' .. v .. '>')
+ end
+ else
+ p.outln('#include <' .. headers .. '>')
+ end
+ end
+end
+
+function autoconf.include_defines(defines)
+ if defines ~= nil then
+ if type(defines) == "table" then
+ for _, v in ipairs(defines) do
+ p.outln('#define ' .. v)
+ end
+ else
+ p.outln('#define ' .. defines)
+ end
+ end
+end
+
+---
+-- attach ourselfs to the running action.
+---
+p.override(p.action, 'call', function (base, name)
+ local a = p.action.get(name)
+
+ -- store the old callback.
+ local onBaseProject = a.onProject or a.onproject
+
+ -- override it with our own.
+ a.onProject = function(prj)
+ -- go through each configuration, and call the setup configuration methods.
+ for cfg in p.project.eachconfig(prj) do
+ cfg.autoconf = {}
+ if cfg.autoconfigure then
+ verbosef('Running auto config steps for "%s/%s".', prj.name, cfg.name)
+ for file, func in pairs(cfg.autoconfigure) do
+ func(cfg)
+
+ if not (file ~= "dontWrite") then
+ os.mkdir(cfg.objdir)
+ local filename = path.join(cfg.objdir, file)
+ autoconf.writefile(cfg, filename)
+ end
+ end
+ end
+ end
+
+ -- then call the old onProject.
+ if onBaseProject then
+ onBaseProject(prj)
+ end
+ end
+
+ -- now call the original action.call methods
+ base(name)
+end)
diff --git a/autoconf/autoconf.lua b/autoconf/autoconf.lua
new file mode 100644
index 00000000..6c99f9da
--- /dev/null
+++ b/autoconf/autoconf.lua
@@ -0,0 +1,18 @@
+---
+-- Autoconfiguration.
+-- Copyright (c) 2016 Blizzard Entertainment
+---
+ local p = premake
+
+ if not premake.modules.autoconf then
+ p.modules.autoconf = {}
+ p.modules.autoconf._VERSION = p._VERSION
+
+ verbosef('Loading autoconf module...')
+ include('api.lua')
+ include('msc.lua')
+ include('clang.lua')
+ include('gcc.lua')
+ end
+
+ return p.modules.autoconf
diff --git a/autoconf/clang.lua b/autoconf/clang.lua
new file mode 100644
index 00000000..fdb5f405
--- /dev/null
+++ b/autoconf/clang.lua
@@ -0,0 +1,27 @@
+---
+-- Autoconfiguration.
+-- Copyright (c) 2016 Blizzard Entertainment
+---
+local p = premake
+local clang = p.tools.clang
+
+function clang.try_compile(cfg, text, parameters)
+ -- write the text to a temporary file.
+ local cppFile = path.join(cfg.objdir, "temp.cpp")
+ if not io.writefile(cppFile, text) then
+ return nil
+ end
+
+ if parameters == nil then
+ parameters = ""
+ end
+
+ local outFile = path.join(cfg.objdir, "temp.out")
+
+ -- compile that text file.
+ if os.execute('clang "' .. cppFile .. '" ' .. parameters .. ' -o "' .. outFile ..'" &> /dev/null') then
+ return outFile
+ else
+ return nil
+ end
+end
diff --git a/autoconf/gcc.lua b/autoconf/gcc.lua
new file mode 100644
index 00000000..34520139
--- /dev/null
+++ b/autoconf/gcc.lua
@@ -0,0 +1,27 @@
+---
+-- Autoconfiguration.
+-- Copyright (c) 2016 Blizzard Entertainment
+---
+local p = premake
+local gcc = p.tools.gcc
+
+function gcc.try_compile(cfg, text, parameters)
+ -- write the text to a temporary file.
+ local cppFile = path.join(cfg.objdir, "temp.cpp")
+ if not io.writefile(cppFile, text) then
+ return nil
+ end
+
+ if parameters == nil then
+ parameters = ""
+ end
+
+ local outFile = path.join(cfg.objdir, "temp.out")
+
+ -- compile that text file.
+ if os.execute('gcc "' .. cppFile .. '" ' .. parameters .. ' -o "' .. outFile ..'" &> /dev/null') then
+ return outFile
+ else
+ return nil
+ end
+end
diff --git a/autoconf/msc.lua b/autoconf/msc.lua
new file mode 100644
index 00000000..b96a82ec
--- /dev/null
+++ b/autoconf/msc.lua
@@ -0,0 +1,62 @@
+---
+-- Autoconfiguration.
+-- Copyright (c) 2016 Blizzard Entertainment
+---
+local p = premake
+local msc = p.tools.msc
+
+-- "parameters" is unused, matter of fact this file is unused - re3
+function msc.try_compile(cfg, text, parameters)
+
+ return nil
+--[[
+ -- write the text to a temporary file.
+ local cppFile = path.join(cfg.objdir, "temp.cpp")
+ if not io.writefile(cppFile, text) then
+ return nil
+ end
+
+ -- write out a batch file.
+ local batch = p.capture(function ()
+ p.outln('@echo off')
+ p.outln('SET mypath=%~dp0')
+ p.outln('pushd %mypath%')
+
+ local map = {
+ vs2010 = 'VS100COMNTOOLS',
+ vs2012 = 'VS110COMNTOOLS',
+ vs2013 = 'VS120COMNTOOLS',
+ vs2015 = 'VS140COMNTOOLS',
+ vs2017 = 'VS141COMNTOOLS',
+ vs2019 = 'VS142COMNTOOLS',
+ }
+
+ local a = map[_ACTION]
+ if a then
+ a = path.translate(os.getenv(a), '/')
+ a = path.join(a, '../../VC/vcvarsall.bat')
+
+ if cfg.platform == 'x86' then
+ p.outln('call "' .. a .. '" > NUL')
+ else
+ p.outln('call "' .. a .. '" amd64 > NUL')
+ end
+
+ p.outln('cl.exe /nologo temp.cpp > NUL')
+ else
+ error('Unsupported Visual Studio version: ' .. _ACTION)
+ end
+ end)
+
+ local batchFile = path.join(cfg.objdir, "compile.bat")
+ if not io.writefile(batchFile, batch) then
+ return nil
+ end
+
+ if os.execute(batchFile) then
+ return path.join(cfg.objdir, "temp.exe")
+ else
+ return nil
+ end
+--]]
+end
diff --git a/cmake/FindMilesSDK.cmake b/cmake/FindMilesSDK.cmake
index 57da3a6e..dcf4da33 100644
--- a/cmake/FindMilesSDK.cmake
+++ b/cmake/FindMilesSDK.cmake
@@ -28,7 +28,7 @@ find_package_handle_standard_args(MilesSDK DEFAULT_MSG MilesSDK_LIBRARIES MilesS
if(NOT TARGET MilesSDK::MilesSDK)
add_library(MilesSDK::MilesSDK UNKNOWN IMPORTED)
set_target_properties(MilesSDK::MilesSDK PROPERTIES
- IMPORTED_LOCATION "${MilesSDK_LIBRARIES}
+ IMPORTED_LOCATION "${MilesSDK_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${MilesSDK_INCLUDE_DIR}"
)
endif()
diff --git a/cmake/Findmpg123.cmake b/cmake/Findmpg123.cmake
index c6fe56bb..aa59ad82 100644
--- a/cmake/Findmpg123.cmake
+++ b/cmake/Findmpg123.cmake
@@ -18,7 +18,7 @@ find_path(mpg123_INCLUDE_DIR mpg123.h
PATH_SUFFIXES include
)
-find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0
+find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0 libmpg123-0
HINTS ${PKG_MPG123_LIBRARIES}
PATHS "${mpg123_DIR}"
PATH_SUFFIXES lib
diff --git a/cmake/GetGitRevisionDescription.cmake b/cmake/GetGitRevisionDescription.cmake
new file mode 100644
index 00000000..87f691ad
--- /dev/null
+++ b/cmake/GetGitRevisionDescription.cmake
@@ -0,0 +1,284 @@
+# - Returns a version string from Git
+#
+# These functions force a re-configure on each git commit so that you can
+# trust the values of the variables in your build system.
+#
+# get_git_head_revision( [ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR])
+#
+# Returns the refspec and sha hash of the current head revision
+#
+# git_describe( [ ...])
+#
+# Returns the results of git describe on the source tree, and adjusting
+# the output so that it tests false if an error occurs.
+#
+# git_describe_working_tree( [ ...])
+#
+# Returns the results of git describe on the working tree (--dirty option),
+# and adjusting the output so that it tests false if an error occurs.
+#
+# git_get_exact_tag( [ ...])
+#
+# Returns the results of git describe --exact-match on the source tree,
+# and adjusting the output so that it tests false if there was no exact
+# matching tag.
+#
+# git_local_changes()
+#
+# Returns either "CLEAN" or "DIRTY" with respect to uncommitted changes.
+# Uses the return code of "git diff-index --quiet HEAD --".
+# Does not regard untracked files.
+#
+# Requires CMake 2.6 or newer (uses the 'function' command)
+#
+# Original Author:
+# 2009-2020 Ryan Pavlik
+# http://academic.cleardefinition.com
+#
+# Copyright 2009-2013, Iowa State University.
+# Copyright 2013-2020, Ryan Pavlik
+# Copyright 2013-2020, Contributors
+# SPDX-License-Identifier: BSL-1.0
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+if(__get_git_revision_description)
+ return()
+endif()
+set(__get_git_revision_description YES)
+
+# We must run the following at "include" time, not at function call time,
+# to find the path to this module rather than the path to a calling list file
+get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
+
+# Function _git_find_closest_git_dir finds the next closest .git directory
+# that is part of any directory in the path defined by _start_dir.
+# The result is returned in the parent scope variable whose name is passed
+# as variable _git_dir_var. If no .git directory can be found, the
+# function returns an empty string via _git_dir_var.
+#
+# Example: Given a path C:/bla/foo/bar and assuming C:/bla/.git exists and
+# neither foo nor bar contain a file/directory .git. This wil return
+# C:/bla/.git
+#
+function(_git_find_closest_git_dir _start_dir _git_dir_var)
+ set(cur_dir "${_start_dir}")
+ set(git_dir "${_start_dir}/.git")
+ while(NOT EXISTS "${git_dir}")
+ # .git dir not found, search parent directories
+ set(git_previous_parent "${cur_dir}")
+ get_filename_component(cur_dir ${cur_dir} DIRECTORY)
+ if(cur_dir STREQUAL git_previous_parent)
+ # We have reached the root directory, we are not in git
+ set(${_git_dir_var}
+ ""
+ PARENT_SCOPE)
+ return()
+ endif()
+ set(git_dir "${cur_dir}/.git")
+ endwhile()
+ set(${_git_dir_var}
+ "${git_dir}"
+ PARENT_SCOPE)
+endfunction()
+
+function(get_git_head_revision _refspecvar _hashvar)
+ _git_find_closest_git_dir("${CMAKE_CURRENT_SOURCE_DIR}" GIT_DIR)
+
+ if("${ARGN}" STREQUAL "ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR")
+ set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR TRUE)
+ else()
+ set(ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR FALSE)
+ endif()
+ if(NOT "${GIT_DIR}" STREQUAL "")
+ file(RELATIVE_PATH _relative_to_source_dir "${CMAKE_SOURCE_DIR}"
+ "${GIT_DIR}")
+ if("${_relative_to_source_dir}" MATCHES "[.][.]" AND NOT ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR)
+ # We've gone above the CMake root dir.
+ set(GIT_DIR "")
+ endif()
+ endif()
+ if("${GIT_DIR}" STREQUAL "")
+ set(${_refspecvar}
+ "GITDIR-NOTFOUND"
+ PARENT_SCOPE)
+ set(${_hashvar}
+ "GITDIR-NOTFOUND"
+ PARENT_SCOPE)
+ return()
+ endif()
+
+ # Check if the current source dir is a git submodule or a worktree.
+ # In both cases .git is a file instead of a directory.
+ #
+ if(NOT IS_DIRECTORY ${GIT_DIR})
+ # The following git command will return a non empty string that
+ # points to the super project working tree if the current
+ # source dir is inside a git submodule.
+ # Otherwise the command will return an empty string.
+ #
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" rev-parse
+ --show-superproject-working-tree
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ OUTPUT_VARIABLE out
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(NOT "${out}" STREQUAL "")
+ # If out is empty, GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a submodule
+ file(READ ${GIT_DIR} submodule)
+ string(REGEX REPLACE "gitdir: (.*)$" "\\1" GIT_DIR_RELATIVE
+ ${submodule})
+ string(STRIP ${GIT_DIR_RELATIVE} GIT_DIR_RELATIVE)
+ get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
+ get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE}
+ ABSOLUTE)
+ set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
+ else()
+ # GIT_DIR/CMAKE_CURRENT_SOURCE_DIR is in a worktree
+ file(READ ${GIT_DIR} worktree_ref)
+ # The .git directory contains a path to the worktree information directory
+ # inside the parent git repo of the worktree.
+ #
+ string(REGEX REPLACE "gitdir: (.*)$" "\\1" git_worktree_dir
+ ${worktree_ref})
+ string(STRIP ${git_worktree_dir} git_worktree_dir)
+ _git_find_closest_git_dir("${git_worktree_dir}" GIT_DIR)
+ set(HEAD_SOURCE_FILE "${git_worktree_dir}/HEAD")
+ endif()
+ else()
+ set(HEAD_SOURCE_FILE "${GIT_DIR}/HEAD")
+ endif()
+ set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
+ if(NOT EXISTS "${GIT_DATA}")
+ file(MAKE_DIRECTORY "${GIT_DATA}")
+ endif()
+
+ if(NOT EXISTS "${HEAD_SOURCE_FILE}")
+ return()
+ endif()
+ set(HEAD_FILE "${GIT_DATA}/HEAD")
+ configure_file("${HEAD_SOURCE_FILE}" "${HEAD_FILE}" COPYONLY)
+
+ configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
+ "${GIT_DATA}/grabRef.cmake" @ONLY)
+ include("${GIT_DATA}/grabRef.cmake")
+
+ set(${_refspecvar}
+ "${HEAD_REF}"
+ PARENT_SCOPE)
+ set(${_hashvar}
+ "${HEAD_HASH}"
+ PARENT_SCOPE)
+endfunction()
+
+function(git_describe _var)
+ if(NOT GIT_FOUND)
+ find_package(Git QUIET)
+ endif()
+ get_git_head_revision(refspec hash)
+ if(NOT GIT_FOUND)
+ set(${_var}
+ "GIT-NOTFOUND"
+ PARENT_SCOPE)
+ return()
+ endif()
+ if(NOT hash)
+ set(${_var}
+ "HEAD-HASH-NOTFOUND"
+ PARENT_SCOPE)
+ return()
+ endif()
+
+ # TODO sanitize
+ #if((${ARGN}" MATCHES "&&") OR
+ # (ARGN MATCHES "||") OR
+ # (ARGN MATCHES "\\;"))
+ # message("Please report the following error to the project!")
+ # message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
+ #endif()
+
+ #message(STATUS "Arguments to execute_process: ${ARGN}")
+
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" describe --tags --always ${hash} ${ARGN}
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ RESULT_VARIABLE res
+ OUTPUT_VARIABLE out
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(NOT res EQUAL 0)
+ set(out "${out}-${res}-NOTFOUND")
+ endif()
+
+ set(${_var}
+ "${out}"
+ PARENT_SCOPE)
+endfunction()
+
+function(git_describe_working_tree _var)
+ if(NOT GIT_FOUND)
+ find_package(Git QUIET)
+ endif()
+ if(NOT GIT_FOUND)
+ set(${_var}
+ "GIT-NOTFOUND"
+ PARENT_SCOPE)
+ return()
+ endif()
+
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" describe --dirty ${ARGN}
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ RESULT_VARIABLE res
+ OUTPUT_VARIABLE out
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(NOT res EQUAL 0)
+ set(out "${out}-${res}-NOTFOUND")
+ endif()
+
+ set(${_var}
+ "${out}"
+ PARENT_SCOPE)
+endfunction()
+
+function(git_get_exact_tag _var)
+ git_describe(out --exact-match ${ARGN})
+ set(${_var}
+ "${out}"
+ PARENT_SCOPE)
+endfunction()
+
+function(git_local_changes _var)
+ if(NOT GIT_FOUND)
+ find_package(Git QUIET)
+ endif()
+ get_git_head_revision(refspec hash)
+ if(NOT GIT_FOUND)
+ set(${_var}
+ "GIT-NOTFOUND"
+ PARENT_SCOPE)
+ return()
+ endif()
+ if(NOT hash)
+ set(${_var}
+ "HEAD-HASH-NOTFOUND"
+ PARENT_SCOPE)
+ return()
+ endif()
+
+ execute_process(
+ COMMAND "${GIT_EXECUTABLE}" diff-index --quiet HEAD --
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ RESULT_VARIABLE res
+ OUTPUT_VARIABLE out
+ ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(res EQUAL 0)
+ set(${_var}
+ "CLEAN"
+ PARENT_SCOPE)
+ else()
+ set(${_var}
+ "DIRTY"
+ PARENT_SCOPE)
+ endif()
+endfunction()
diff --git a/cmake/GetGitRevisionDescription.cmake.in b/cmake/GetGitRevisionDescription.cmake.in
new file mode 100644
index 00000000..116efc4e
--- /dev/null
+++ b/cmake/GetGitRevisionDescription.cmake.in
@@ -0,0 +1,43 @@
+#
+# Internal file for GetGitRevisionDescription.cmake
+#
+# Requires CMake 2.6 or newer (uses the 'function' command)
+#
+# Original Author:
+# 2009-2010 Ryan Pavlik
+# http://academic.cleardefinition.com
+# Iowa State University HCI Graduate Program/VRAC
+#
+# Copyright 2009-2012, Iowa State University
+# Copyright 2011-2015, Contributors
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+# SPDX-License-Identifier: BSL-1.0
+
+set(HEAD_HASH)
+
+file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
+
+string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
+if(HEAD_CONTENTS MATCHES "ref")
+ # named branch
+ string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
+ if(EXISTS "@GIT_DIR@/${HEAD_REF}")
+ configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
+ else()
+ configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
+ file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
+ if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
+ set(HEAD_HASH "${CMAKE_MATCH_1}")
+ endif()
+ endif()
+else()
+ # detached HEAD
+ configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
+endif()
+
+if(NOT HEAD_HASH)
+ file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
+ string(STRIP "${HEAD_HASH}" HEAD_HASH)
+endif()
diff --git a/cmake/nx/NXFunctions.cmake b/cmake/nx/NXFunctions.cmake
new file mode 100644
index 00000000..cf3f974b
--- /dev/null
+++ b/cmake/nx/NXFunctions.cmake
@@ -0,0 +1,38 @@
+if(NOT COMMAND nx_generate_nacp)
+ message(FATAL_ERROR "The `nx_generate_nacp` cmake command is not available. Please use an appropriate Nintendo Switch toolchain.")
+endif()
+
+if(NOT COMMAND nx_create_nro)
+ message(FATAL_ERROR "The `nx_create_nro` cmake command is not available. Please use an appropriate Nintendo Switch toolchain.")
+endif()
+
+set(CMAKE_EXECUTABLE_SUFFIX ".elf")
+
+function(re3_platform_target TARGET)
+ cmake_parse_arguments(RPT "INSTALL" "" "" ${ARGN})
+
+ get_target_property(TARGET_TYPE "${TARGET}" TYPE)
+ if(TARGET_TYPE STREQUAL "EXECUTABLE")
+ nx_generate_nacp(${TARGET}.nacp
+ NAME "${TARGET}"
+ AUTHOR "${${PROJECT}_AUTHOR}"
+ VERSION "1.0.0-${GIT_SHA1}"
+ )
+
+ nx_create_nro(${TARGET}
+ NACP ${TARGET}.nacp
+ ICON "${PROJECT_SOURCE_DIR}/res/images/logo_256.jpg"
+ )
+
+ if(${PROJECT}_INSTALL AND RPT_INSTALL)
+ get_target_property(TARGET_OUTPUT_NAME ${TARGET} OUTPUT_NAME)
+ if(NOT TARGET_OUTPUT_NAME)
+ set(TARGET_OUTPUT_NAME "${TARGET}")
+ endif()
+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_OUTPUT_NAME}.nro"
+ DESTINATION "."
+ )
+ endif()
+ endif()
+endfunction()
diff --git a/codewarrior/re3.mcp b/codewarrior/re3.mcp
deleted file mode 100644
index fc1f2104..00000000
Binary files a/codewarrior/re3.mcp and /dev/null differ
diff --git a/codewarrior/re3.mcp.xml b/codewarrior/re3.mcp.xml
new file mode 100644
index 00000000..9a41471b
--- /dev/null
+++ b/codewarrior/re3.mcp.xml
@@ -0,0 +1,15378 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
+
+
+
+
+ Debug
+
+
+
+ UserSourceTrees
+
+
+ AlwaysSearchUserPathsfalse
+ InterpretDOSAndUnixPathstrue
+ RequireFrameworkStyleIncludesfalse
+ UserSearchPaths
+
+ SearchPath
+ Path
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\animation
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\audio
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\buildings
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\collision
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\control
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\core
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\entities
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\math
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\modelinfo
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\objects
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\peds
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\renderer
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\rw
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\save
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\skel
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\text
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\vehicles
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\weapons
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\vendor\milessdk\lib
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\vendor\milessdk\include
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\dx8sdk\Lib
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\rwsdk\lib\d3d8\release
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\rwsdk\include\d3d8
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\extras
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SystemSearchPaths
+
+ SearchPath
+ Path..\sdk\rwsdk\include\d3d8
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\dx8sdk\Include
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ PathWin32-x86 Support\Headers\
+ PathFormatWindows
+ PathRootCodeWarrior
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ PathWin32-x86 Support\Libraries\
+ PathFormatWindows
+ PathRootCodeWarrior
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ PathMSL
+ PathFormatWindows
+ PathRootCodeWarrior
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\audio\eax
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+
+
+ MWRuntimeSettings_WorkingDirectory
+ MWRuntimeSettings_CommandLine
+ MWRuntimeSettings_HostApplication
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+ MWRuntimeSettings_EnvVars
+
+
+ LinkerWin32 x86 Linker
+ PreLinker
+ PostLinker
+ TargetnameDebug
+ OutputDirectory
+ Path
+ PathFormatWindows
+ PathRootProject
+
+ SaveEntriesUsingRelativePathsfalse
+
+
+ FileMappings
+
+ FileTypeTEXT
+ FileExtension.c
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.c++
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.cc
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.cp
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.cpp
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.def
+ Compiler
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.h
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMaketrue
+
+
+ FileTypeTEXT
+ FileExtension.p
+ CompilerMW Pascal x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.pas
+ CompilerMW Pascal x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.pch
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompiletrue
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.pch++
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompiletrue
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.ppu
+ CompilerMW Pascal x86
+ EditLanguage
+ Precompiletrue
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.rc
+ CompilerMW WinRC
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.res
+ CompilerWinRes Import
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileExtension.doc
+ Compiler
+ EditLanguage
+ Precompilefalse
+ Launchabletrue
+ ResourceFilefalse
+ IgnoredByMaketrue
+
+
+ FileExtension.lib
+ CompilerLib Import x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileExtension.obj
+ CompilerObj Import x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileExtension.res
+ CompilerWinRes Import
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+
+
+ CacheModDatestrue
+ ActivateBrowsertrue
+ DumpBrowserInfofalse
+ CacheSubprojectstrue
+ UseThirdPartyDebuggerfalse
+ DebuggerAppPath
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+ DebuggerCmdLineArgs
+ DebuggerWorkingDir
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+
+
+ LogSystemMessagesfalse
+ AutoTargetDLLsfalse
+ StopAtWatchpointstrue
+ PauseWhileRunningfalse
+ PauseInterval5
+ PauseUIFlags0
+ AltExePath
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+ StopAtTempBPOnLaunchtrue
+ CacheSymbolicstrue
+ TempBPFunctionNamemain
+ TempBPType0
+
+
+ Enabledfalse
+ ConnectionName
+ DownloadPath
+ LaunchRemoteAppfalse
+ RemoteAppPath
+
+
+ OtherExecutables
+
+
+ CustomColor1
+ Red0
+ Green32767
+ Blue0
+
+ CustomColor2
+ Red0
+ Green32767
+ Blue0
+
+ CustomColor3
+ Red0
+ Green32767
+ Blue0
+
+ CustomColor4
+ Red0
+ Green32767
+ Blue0
+
+
+
+ MWCodeGen_X86_processorPentiumII
+ MWCodeGen_X86_alignmentbytes8
+ MWCodeGen_X86_exceptionsZeroOverhead
+ MWCodeGen_X86_extinst_mmx0
+ MWCodeGen_X86_extinst_3dnow0
+ MWCodeGen_X86_use_mmx_3dnow_convention0
+ MWCodeGen_X86_machinecodelisting0
+ MWCodeGen_X86_intrinsics0
+ MWCodeGen_X86_syminfo0
+ MWCodeGen_X86_codeviewinfo1
+ MWCodeGen_X86_extinst_cmov_fcomi0
+ MWCodeGen_X86_extinst_sse0
+
+
+ MWDebugger_X86_Exceptions
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ PDisasmX86_showHeaderstrue
+ PDisasmX86_showSymTabtrue
+ PDisasmX86_showCodetrue
+ PDisasmX86_showSourcefalse
+ PDisasmX86_showHextrue
+ PDisasmX86_showRelocationtrue
+ PDisasmX86_showCommentsfalse
+ PDisasmX86_showDebugfalse
+ PDisasmX86_showExceptionsfalse
+ PDisasmX86_showDatatrue
+ PDisasmX86_showRawfalse
+ PDisasmX86_verbosefalse
+
+
+ MWFrontEnd_C_cplusplus1
+ MWFrontEnd_C_checkprotos0
+ MWFrontEnd_C_arm0
+ MWFrontEnd_C_trigraphs0
+ MWFrontEnd_C_onlystdkeywords0
+ MWFrontEnd_C_enumsalwaysint1
+ MWFrontEnd_C_mpwpointerstyle0
+ MWFrontEnd_C_prefixname
+ MWFrontEnd_C_ansistrict0
+ MWFrontEnd_C_mpwcnewline0
+ MWFrontEnd_C_wchar_type1
+ MWFrontEnd_C_enableexceptions1
+ MWFrontEnd_C_dontreusestrings0
+ MWFrontEnd_C_poolstrings1
+ MWFrontEnd_C_dontinline1
+ MWFrontEnd_C_useRTTI1
+ MWFrontEnd_C_multibyteaware1
+ MWFrontEnd_C_unsignedchars0
+ MWFrontEnd_C_autoinline0
+ MWFrontEnd_C_booltruefalse1
+ MWFrontEnd_C_direct_to_som0
+ MWFrontEnd_C_som_env_check0
+ MWFrontEnd_C_alwaysinline0
+ MWFrontEnd_C_inlinelevel0
+ MWFrontEnd_C_ecplusplus0
+ MWFrontEnd_C_objective_c0
+ MWFrontEnd_C_defer_codegen0
+
+
+ MWLinker_X86_entrypointusageDefault
+ MWLinker_X86_entrypoint
+ MWLinker_X86_subsystemWinGUI
+ MWLinker_X86_subsysmajorid4
+ MWLinker_X86_subsysminorid0
+ MWLinker_X86_usrmajorid0
+ MWLinker_X86_usrminorid0
+ MWLinker_X86_commandfile
+ MWLinker_X86_generatemap0
+ MWLinker_X86_linksym0
+ MWLinker_X86_linkCV1
+
+
+ MWProject_X86_typeApplication
+ MWProject_X86_outfileDebug\gta3.exe
+ MWProject_X86_baseaddress4194304
+ MWProject_X86_maxstacksize1024
+ MWProject_X86_minstacksize4
+ MWProject_X86_size1024
+ MWProject_X86_minsize4
+ MWProject_X86_importlib
+
+
+ MWWarning_C_warn_illpragma0
+ MWWarning_C_warn_emptydecl0
+ MWWarning_C_warn_possunwant1
+ MWWarning_C_warn_unusedvar1
+ MWWarning_C_warn_unusedarg0
+ MWWarning_C_warn_extracomma1
+ MWWarning_C_pedantic0
+ MWWarning_C_warningerrors0
+ MWWarning_C_warn_hidevirtual1
+ MWWarning_C_warn_implicitconv0
+ MWWarning_C_warn_notinlined0
+ MWWarning_C_warn_structclass0
+
+
+ MWWinRC_prefixnameResourcePrefix.h
+
+
+ GlobalOptimizer_X86__optimizationlevelLevel0
+ GlobalOptimizer_X86__optforSize
+
+
+
+ Name
+ Comdlg32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ Gdi32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ Kernel32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ User32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ MSL_All_x86_D.lib
+ MacOS
+ Unknown
+ Debug
+
+
+ Name
+ AnimationId.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendAssocGroup.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendAssocGroup.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendAssociation.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendAssociation.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendClumpData.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendClumpData.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendHierarchy.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendHierarchy.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendList.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendNode.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendNode.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendSequence.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendSequence.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimManager.h
+ Windows
+ Text
+
+
+
+ Name
+ Bones.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Bones.h
+ Windows
+ Text
+
+
+
+ Name
+ CutsceneMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CutsceneMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ FrameUpdate.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RpAnimBlend.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RpAnimBlend.h
+ Windows
+ Text
+
+
+
+ Name
+ audio_enums.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioCollision.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AudioCollision.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioLogic.cpp
+ Windows
+ Text
+
+
+
+ Name
+ AudioManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AudioManager.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioSamples.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioScriptObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AudioScriptObject.h
+ Windows
+ Text
+
+
+
+ Name
+ DMAudio.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ DMAudio.h
+ Windows
+ Text
+
+
+
+ Name
+ MusicManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MusicManager.h
+ Windows
+ Text
+
+
+
+ Name
+ PolRadio.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PolRadio.h
+ Windows
+ Text
+
+
+
+ Name
+ sampman.h
+ Windows
+ Text
+
+
+
+ Name
+ sampman_miles.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ soundlist.h
+ Windows
+ Text
+
+
+
+ Name
+ eax.h
+ Windows
+ Text
+
+
+
+ Name
+ eax-util.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ eax-util.h
+ Windows
+ Text
+
+
+
+ Name
+ Building.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Building.h
+ Windows
+ Text
+
+
+
+ Name
+ Solid.h
+ Windows
+ Text
+
+
+
+ Name
+ Treadable.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Treadable.h
+ Windows
+ Text
+
+
+
+ Name
+ ColBox.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColBox.h
+ Windows
+ Text
+
+
+
+ Name
+ ColLine.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColLine.h
+ Windows
+ Text
+
+
+
+ Name
+ Collision.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Collision.h
+ Windows
+ Text
+
+
+
+ Name
+ ColModel.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColModel.h
+ Windows
+ Text
+
+
+
+ Name
+ ColPoint.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColPoint.h
+ Windows
+ Text
+
+
+
+ Name
+ ColSphere.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColSphere.h
+ Windows
+ Text
+
+
+
+ Name
+ ColTriangle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColTriangle.h
+ Windows
+ Text
+
+
+
+ Name
+ CompressedVector.h
+ Windows
+ Text
+
+
+
+ Name
+ TempColModels.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TempColModels.h
+ Windows
+ Text
+
+
+
+ Name
+ VuCollision.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ VuCollision.h
+ Windows
+ Text
+
+
+
+ Name
+ AutoPilot.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AutoPilot.h
+ Windows
+ Text
+
+
+
+ Name
+ Bridge.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Bridge.h
+ Windows
+ Text
+
+
+
+ Name
+ CarAI.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CarAI.h
+ Windows
+ Text
+
+
+
+ Name
+ CarCtrl.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CarCtrl.h
+ Windows
+ Text
+
+
+
+ Name
+ Curves.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Curves.h
+ Windows
+ Text
+
+
+
+ Name
+ Darkel.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Darkel.h
+ Windows
+ Text
+
+
+
+ Name
+ GameLogic.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ GameLogic.h
+ Windows
+ Text
+
+
+
+ Name
+ Garages.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Garages.h
+ Windows
+ Text
+
+
+
+ Name
+ NameGrid.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ NameGrid.h
+ Windows
+ Text
+
+
+
+ Name
+ OnscreenTimer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ OnscreenTimer.h
+ Windows
+ Text
+
+
+
+ Name
+ PathFind.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PathFind.h
+ Windows
+ Text
+
+
+
+ Name
+ Phones.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Phones.h
+ Windows
+ Text
+
+
+
+ Name
+ Pickups.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pickups.h
+ Windows
+ Text
+
+
+
+ Name
+ PowerPoints.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PowerPoints.h
+ Windows
+ Text
+
+
+
+ Name
+ Record.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Record.h
+ Windows
+ Text
+
+
+
+ Name
+ Remote.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Remote.h
+ Windows
+ Text
+
+
+
+ Name
+ Replay.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Replay.h
+ Windows
+ Text
+
+
+
+ Name
+ Restart.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Restart.h
+ Windows
+ Text
+
+
+
+ Name
+ RoadBlocks.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RoadBlocks.h
+ Windows
+ Text
+
+
+
+ Name
+ SceneEdit.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SceneEdit.h
+ Windows
+ Text
+
+
+
+ Name
+ ScriptDebug.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script.h
+ Windows
+ Text
+
+
+
+ Name
+ Script2.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script3.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script4.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script5.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script6.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ScriptCommands.h
+ Windows
+ Text
+
+
+
+ Name
+ TrafficLights.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TrafficLights.h
+ Windows
+ Text
+
+
+
+ Name
+ Accident.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Accident.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimViewer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimViewer.h
+ Windows
+ Text
+
+
+
+ Name
+ Cam.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Camera.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Camera.h
+ Windows
+ Text
+
+
+
+ Name
+ CdStream.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CdStream.h
+ Windows
+ Text
+
+
+
+ Name
+ CdStreamPosix.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Clock.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Clock.h
+ Windows
+ Text
+
+
+
+ Name
+ common.h
+ Windows
+ Text
+
+
+
+ Name
+ config.h
+ Windows
+ Text
+
+
+
+ Name
+ ControllerConfig.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ControllerConfig.h
+ Windows
+ Text
+
+
+
+ Name
+ Crime.h
+ Windows
+ Text
+
+
+
+ Name
+ Debug.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Debug.h
+ Windows
+ Text
+
+
+
+ Name
+ Directory.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Directory.h
+ Windows
+ Text
+
+
+
+ Name
+ EventList.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ EventList.h
+ Windows
+ Text
+
+
+
+ Name
+ FileLoader.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ FileLoader.h
+ Windows
+ Text
+
+
+
+ Name
+ FileMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ FileMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ Fire.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Fire.h
+ Windows
+ Text
+
+
+
+ Name
+ Frontend.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Frontend.h
+ Windows
+ Text
+
+
+
+ Name
+ Frontend_PS2.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Frontend_PS2.h
+ Windows
+ Text
+
+
+
+ Name
+ FrontEndControls.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ FrontEndControls.h
+ Windows
+ Text
+
+
+
+ Name
+ FrontendTriggers.h
+ Windows
+ Text
+
+
+
+ Name
+ Game.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Game.h
+ Windows
+ Text
+
+
+
+ Name
+ General.h
+ Windows
+ Text
+
+
+
+ Name
+ IniFile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ IniFile.h
+ Windows
+ Text
+
+
+
+ Name
+ Lists.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lists.h
+ Windows
+ Text
+
+
+
+ Name
+ main.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ main.h
+ Windows
+ Text
+
+
+
+ Name
+ MenuScreens.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MenuScreensCustom.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ obrstr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ obrstr.h
+ Windows
+ Text
+
+
+
+ Name
+ Pad.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pad.h
+ Windows
+ Text
+
+
+
+ Name
+ Placeable.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Placeable.h
+ Windows
+ Text
+
+
+
+ Name
+ PlayerInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PlayerInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ Pools.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pools.h
+ Windows
+ Text
+
+
+
+ Name
+ Profile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Profile.h
+ Windows
+ Text
+
+
+
+ Name
+ Radar.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Radar.h
+ Windows
+ Text
+
+
+
+ Name
+ Range2D.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Range2D.h
+ Windows
+ Text
+
+
+
+ Name
+ Range3D.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Range3D.h
+ Windows
+ Text
+
+
+
+ Name
+ re3.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ References.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ References.h
+ Windows
+ Text
+
+
+
+ Name
+ Stats.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Stats.h
+ Windows
+ Text
+
+
+
+ Name
+ Streaming.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Streaming.h
+ Windows
+ Text
+
+
+
+ Name
+ SurfaceTable.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SurfaceTable.h
+ Windows
+ Text
+
+
+
+ Name
+ templates.h
+ Windows
+ Text
+
+
+
+ Name
+ timebars.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ timebars.h
+ Windows
+ Text
+
+
+
+ Name
+ Timer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Timer.h
+ Windows
+ Text
+
+
+
+ Name
+ TimeStep.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TimeStep.h
+ Windows
+ Text
+
+
+
+ Name
+ User.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ User.h
+ Windows
+ Text
+
+
+
+ Name
+ Wanted.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Wanted.h
+ Windows
+ Text
+
+
+
+ Name
+ World.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ World.h
+ Windows
+ Text
+
+
+
+ Name
+ ZoneCull.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ZoneCull.h
+ Windows
+ Text
+
+
+
+ Name
+ Zones.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Zones.h
+ Windows
+ Text
+
+
+
+ Name
+ Dummy.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Dummy.h
+ Windows
+ Text
+
+
+
+ Name
+ Entity.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Entity.h
+ Windows
+ Text
+
+
+
+ Name
+ Physical.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Physical.h
+ Windows
+ Text
+
+
+
+ Name
+ math.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ maths.h
+ Windows
+ Text
+
+
+
+ Name
+ Matrix.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Matrix.h
+ Windows
+ Text
+
+
+
+ Name
+ Quaternion.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Quaternion.h
+ Windows
+ Text
+
+
+
+ Name
+ Rect.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Rect.h
+ Windows
+ Text
+
+
+
+ Name
+ Vector.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Vector.h
+ Windows
+ Text
+
+
+
+ Name
+ Vector2D.h
+ Windows
+ Text
+
+
+
+ Name
+ VuVector.h
+ Windows
+ Text
+
+
+
+ Name
+ BaseModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ BaseModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ ClumpModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ClumpModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ MloModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MloModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ ModelIndices.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ModelIndices.h
+ Windows
+ Text
+
+
+
+ Name
+ ModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ PedModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ SimpleModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SimpleModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ TimeModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TimeModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ VehicleModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ VehicleModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ XtraCompsModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ CutsceneHead.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CutsceneHead.h
+ Windows
+ Text
+
+
+
+ Name
+ CutsceneObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CutsceneObject.h
+ Windows
+ Text
+
+
+
+ Name
+ DummyObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ DummyObject.h
+ Windows
+ Text
+
+
+
+ Name
+ Object.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Object.h
+ Windows
+ Text
+
+
+
+ Name
+ ObjectData.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ObjectData.h
+ Windows
+ Text
+
+
+
+ Name
+ ParticleObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ParticleObject.h
+ Windows
+ Text
+
+
+
+ Name
+ Projectile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Projectile.h
+ Windows
+ Text
+
+
+
+ Name
+ CivilianPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CivilianPed.h
+ Windows
+ Text
+
+
+
+ Name
+ CopPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CopPed.h
+ Windows
+ Text
+
+
+
+ Name
+ DummyPed.h
+ Windows
+ Text
+
+
+
+ Name
+ EmergencyPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ EmergencyPed.h
+ Windows
+ Text
+
+
+
+ Name
+ Gangs.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Gangs.h
+ Windows
+ Text
+
+
+
+ Name
+ Ped.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Ped.h
+ Windows
+ Text
+
+
+
+ Name
+ PedAI.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedChat.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedDebug.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedFight.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedIK.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedIK.h
+ Windows
+ Text
+
+
+
+ Name
+ PedPlacement.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedPlacement.h
+ Windows
+ Text
+
+
+
+ Name
+ PedRoutes.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedRoutes.h
+ Windows
+ Text
+
+
+
+ Name
+ PedType.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedType.h
+ Windows
+ Text
+
+
+
+ Name
+ PlayerPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PlayerPed.h
+ Windows
+ Text
+
+
+
+ Name
+ Population.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Population.h
+ Windows
+ Text
+
+
+
+ Name
+ 2dEffect.h
+ Windows
+ Text
+
+
+
+ Name
+ Antennas.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Antennas.h
+ Windows
+ Text
+
+
+
+ Name
+ Clouds.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Clouds.h
+ Windows
+ Text
+
+
+
+ Name
+ Console.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Console.h
+ Windows
+ Text
+
+
+
+ Name
+ Coronas.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Coronas.h
+ Windows
+ Text
+
+
+
+ Name
+ Credits.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Credits.h
+ Windows
+ Text
+
+
+
+ Name
+ Draw.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Draw.h
+ Windows
+ Text
+
+
+
+ Name
+ Fluff.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Fluff.h
+ Windows
+ Text
+
+
+
+ Name
+ Font.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Font.h
+ Windows
+ Text
+
+
+
+ Name
+ Glass.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Glass.h
+ Windows
+ Text
+
+
+
+ Name
+ Hud.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Hud.h
+ Windows
+ Text
+
+
+
+ Name
+ Instance.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Instance.h
+ Windows
+ Text
+
+
+
+ Name
+ Lines.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lines.h
+ Windows
+ Text
+
+
+
+ Name
+ MBlur.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MBlur.h
+ Windows
+ Text
+
+
+
+ Name
+ Particle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Particle.h
+ Windows
+ Text
+
+
+
+ Name
+ ParticleMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ParticleMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ ParticleType.h
+ Windows
+ Text
+
+
+
+ Name
+ PlayerSkin.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PlayerSkin.h
+ Windows
+ Text
+
+
+
+ Name
+ PointLights.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PointLights.h
+ Windows
+ Text
+
+
+
+ Name
+ RenderBuffer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RenderBuffer.h
+ Windows
+ Text
+
+
+
+ Name
+ Renderer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Renderer.h
+ Windows
+ Text
+
+
+
+ Name
+ Rubbish.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Rubbish.h
+ Windows
+ Text
+
+
+
+ Name
+ Shadows.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Shadows.h
+ Windows
+ Text
+
+
+
+ Name
+ Skidmarks.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Skidmarks.h
+ Windows
+ Text
+
+
+
+ Name
+ SpecialFX.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SpecialFX.h
+ Windows
+ Text
+
+
+
+ Name
+ Sprite.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Sprite.h
+ Windows
+ Text
+
+
+
+ Name
+ Sprite2d.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Sprite2d.h
+ Windows
+ Text
+
+
+
+ Name
+ TexList.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexList.h
+ Windows
+ Text
+
+
+
+ Name
+ Timecycle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Timecycle.h
+ Windows
+ Text
+
+
+
+ Name
+ WaterCannon.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WaterCannon.h
+ Windows
+ Text
+
+
+
+ Name
+ WaterLevel.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WaterLevel.h
+ Windows
+ Text
+
+
+
+ Name
+ Weather.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Weather.h
+ Windows
+ Text
+
+
+
+ Name
+ ClumpRead.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lights.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lights.h
+ Windows
+ Text
+
+
+
+ Name
+ MemoryHeap.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MemoryHeap.h
+ Windows
+ Text
+
+
+
+ Name
+ MemoryMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MemoryMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ NodeName.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ NodeName.h
+ Windows
+ Text
+
+
+
+ Name
+ RwHelper.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RwHelper.h
+ Windows
+ Text
+
+
+
+ Name
+ RwMatFX.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RwPS2AlphaTest.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexRead.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexturePools.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexturePools.h
+ Windows
+ Text
+
+
+
+ Name
+ TxdStore.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TxdStore.h
+ Windows
+ Text
+
+
+
+ Name
+ VisibilityPlugins.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ VisibilityPlugins.h
+ Windows
+ Text
+
+
+
+ Name
+ Date.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Date.h
+ Windows
+ Text
+
+
+
+ Name
+ GenericGameStorage.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ GenericGameStorage.h
+ Windows
+ Text
+
+
+
+ Name
+ MemoryCard.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MemoryCard.h
+ Windows
+ Text
+
+
+
+ Name
+ PCSave.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PCSave.h
+ Windows
+ Text
+
+
+
+ Name
+ crossplatform.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ crossplatform.h
+ Windows
+ Text
+
+
+
+ Name
+ events.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ events.h
+ Windows
+ Text
+
+
+
+ Name
+ platform.h
+ Windows
+ Text
+
+
+
+ Name
+ skeleton.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ skeleton.h
+ Windows
+ Text
+
+
+
+ Name
+ resource.h
+ Windows
+ Text
+
+
+
+ Name
+ win.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ win.h
+ Windows
+ Text
+
+
+
+ Name
+ win.rc
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Messages.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Messages.h
+ Windows
+ Text
+
+
+
+ Name
+ Pager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pager.h
+ Windows
+ Text
+
+
+
+ Name
+ Text.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Text.h
+ Windows
+ Text
+
+
+
+ Name
+ Automobile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Automobile.h
+ Windows
+ Text
+
+
+
+ Name
+ Bike.h
+ Windows
+ Text
+
+
+
+ Name
+ Boat.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Boat.h
+ Windows
+ Text
+
+
+
+ Name
+ CarGen.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CarGen.h
+ Windows
+ Text
+
+
+
+ Name
+ Cranes.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Cranes.h
+ Windows
+ Text
+
+
+
+ Name
+ DamageManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ DamageManager.h
+ Windows
+ Text
+
+
+
+ Name
+ Door.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Door.h
+ Windows
+ Text
+
+
+
+ Name
+ Floater.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Floater.h
+ Windows
+ Text
+
+
+
+ Name
+ HandlingMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ HandlingMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ Heli.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Heli.h
+ Windows
+ Text
+
+
+
+ Name
+ Plane.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Plane.h
+ Windows
+ Text
+
+
+
+ Name
+ Train.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Train.h
+ Windows
+ Text
+
+
+
+ Name
+ Transmission.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Transmission.h
+ Windows
+ Text
+
+
+
+ Name
+ Vehicle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Vehicle.h
+ Windows
+ Text
+
+
+
+ Name
+ BulletInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ BulletInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ Explosion.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Explosion.h
+ Windows
+ Text
+
+
+
+ Name
+ ProjectileInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ProjectileInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ ShotInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ShotInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ Weapon.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Weapon.h
+ Windows
+ Text
+
+
+
+ Name
+ WeaponEffects.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WeaponEffects.h
+ Windows
+ Text
+
+
+
+ Name
+ WeaponInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WeaponInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ WeaponType.h
+ Windows
+ Text
+
+
+
+ Name
+ mss32.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ d3d8.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ ddraw.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ dxguid.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ strmiids.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ dinput8.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ winmm.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rwcore.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rpworld.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rpmatfx.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rpskin.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rphanim.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rtbmp.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rtquat.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rtcharse.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ ole32.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ shell32.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ uuid.lib
+ Windows
+ Library
+ Debug
+
+
+
+
+ Name
+ AnimationId.h
+ Windows
+
+
+ Name
+ AnimBlendAssocGroup.cpp
+ Windows
+
+
+ Name
+ AnimBlendAssocGroup.h
+ Windows
+
+
+ Name
+ AnimBlendAssociation.cpp
+ Windows
+
+
+ Name
+ AnimBlendAssociation.h
+ Windows
+
+
+ Name
+ AnimBlendClumpData.cpp
+ Windows
+
+
+ Name
+ AnimBlendClumpData.h
+ Windows
+
+
+ Name
+ AnimBlendHierarchy.cpp
+ Windows
+
+
+ Name
+ AnimBlendHierarchy.h
+ Windows
+
+
+ Name
+ AnimBlendList.h
+ Windows
+
+
+ Name
+ AnimBlendNode.cpp
+ Windows
+
+
+ Name
+ AnimBlendNode.h
+ Windows
+
+
+ Name
+ AnimBlendSequence.cpp
+ Windows
+
+
+ Name
+ AnimBlendSequence.h
+ Windows
+
+
+ Name
+ AnimManager.cpp
+ Windows
+
+
+ Name
+ AnimManager.h
+ Windows
+
+
+ Name
+ Bones.cpp
+ Windows
+
+
+ Name
+ Bones.h
+ Windows
+
+
+ Name
+ CutsceneMgr.cpp
+ Windows
+
+
+ Name
+ CutsceneMgr.h
+ Windows
+
+
+ Name
+ FrameUpdate.cpp
+ Windows
+
+
+ Name
+ RpAnimBlend.cpp
+ Windows
+
+
+ Name
+ RpAnimBlend.h
+ Windows
+
+
+ Name
+ audio_enums.h
+ Windows
+
+
+ Name
+ AudioCollision.cpp
+ Windows
+
+
+ Name
+ AudioCollision.h
+ Windows
+
+
+ Name
+ AudioLogic.cpp
+ Windows
+
+
+ Name
+ AudioManager.cpp
+ Windows
+
+
+ Name
+ AudioManager.h
+ Windows
+
+
+ Name
+ AudioSamples.h
+ Windows
+
+
+ Name
+ AudioScriptObject.cpp
+ Windows
+
+
+ Name
+ AudioScriptObject.h
+ Windows
+
+
+ Name
+ DMAudio.cpp
+ Windows
+
+
+ Name
+ DMAudio.h
+ Windows
+
+
+ Name
+ MusicManager.cpp
+ Windows
+
+
+ Name
+ MusicManager.h
+ Windows
+
+
+ Name
+ PolRadio.cpp
+ Windows
+
+
+ Name
+ PolRadio.h
+ Windows
+
+
+ Name
+ sampman.h
+ Windows
+
+
+ Name
+ sampman_miles.cpp
+ Windows
+
+
+ Name
+ soundlist.h
+ Windows
+
+
+ Name
+ eax.h
+ Windows
+
+
+ Name
+ eax-util.cpp
+ Windows
+
+
+ Name
+ eax-util.h
+ Windows
+
+
+ Name
+ Building.cpp
+ Windows
+
+
+ Name
+ Building.h
+ Windows
+
+
+ Name
+ Solid.h
+ Windows
+
+
+ Name
+ Treadable.cpp
+ Windows
+
+
+ Name
+ Treadable.h
+ Windows
+
+
+ Name
+ ColBox.cpp
+ Windows
+
+
+ Name
+ ColBox.h
+ Windows
+
+
+ Name
+ ColLine.cpp
+ Windows
+
+
+ Name
+ ColLine.h
+ Windows
+
+
+ Name
+ Collision.cpp
+ Windows
+
+
+ Name
+ Collision.h
+ Windows
+
+
+ Name
+ ColModel.cpp
+ Windows
+
+
+ Name
+ ColModel.h
+ Windows
+
+
+ Name
+ ColPoint.cpp
+ Windows
+
+
+ Name
+ ColPoint.h
+ Windows
+
+
+ Name
+ ColSphere.cpp
+ Windows
+
+
+ Name
+ ColSphere.h
+ Windows
+
+
+ Name
+ ColTriangle.cpp
+ Windows
+
+
+ Name
+ ColTriangle.h
+ Windows
+
+
+ Name
+ CompressedVector.h
+ Windows
+
+
+ Name
+ TempColModels.cpp
+ Windows
+
+
+ Name
+ TempColModels.h
+ Windows
+
+
+ Name
+ VuCollision.cpp
+ Windows
+
+
+ Name
+ VuCollision.h
+ Windows
+
+
+ Name
+ AutoPilot.cpp
+ Windows
+
+
+ Name
+ AutoPilot.h
+ Windows
+
+
+ Name
+ Bridge.cpp
+ Windows
+
+
+ Name
+ Bridge.h
+ Windows
+
+
+ Name
+ CarAI.cpp
+ Windows
+
+
+ Name
+ CarAI.h
+ Windows
+
+
+ Name
+ CarCtrl.cpp
+ Windows
+
+
+ Name
+ CarCtrl.h
+ Windows
+
+
+ Name
+ Curves.cpp
+ Windows
+
+
+ Name
+ Curves.h
+ Windows
+
+
+ Name
+ Darkel.cpp
+ Windows
+
+
+ Name
+ Darkel.h
+ Windows
+
+
+ Name
+ GameLogic.cpp
+ Windows
+
+
+ Name
+ GameLogic.h
+ Windows
+
+
+ Name
+ Garages.cpp
+ Windows
+
+
+ Name
+ Garages.h
+ Windows
+
+
+ Name
+ NameGrid.cpp
+ Windows
+
+
+ Name
+ NameGrid.h
+ Windows
+
+
+ Name
+ OnscreenTimer.cpp
+ Windows
+
+
+ Name
+ OnscreenTimer.h
+ Windows
+
+
+ Name
+ PathFind.cpp
+ Windows
+
+
+ Name
+ PathFind.h
+ Windows
+
+
+ Name
+ Phones.cpp
+ Windows
+
+
+ Name
+ Phones.h
+ Windows
+
+
+ Name
+ Pickups.cpp
+ Windows
+
+
+ Name
+ Pickups.h
+ Windows
+
+
+ Name
+ PowerPoints.cpp
+ Windows
+
+
+ Name
+ PowerPoints.h
+ Windows
+
+
+ Name
+ Record.cpp
+ Windows
+
+
+ Name
+ Record.h
+ Windows
+
+
+ Name
+ Remote.cpp
+ Windows
+
+
+ Name
+ Remote.h
+ Windows
+
+
+ Name
+ Replay.cpp
+ Windows
+
+
+ Name
+ Replay.h
+ Windows
+
+
+ Name
+ Restart.cpp
+ Windows
+
+
+ Name
+ Restart.h
+ Windows
+
+
+ Name
+ RoadBlocks.cpp
+ Windows
+
+
+ Name
+ RoadBlocks.h
+ Windows
+
+
+ Name
+ SceneEdit.cpp
+ Windows
+
+
+ Name
+ SceneEdit.h
+ Windows
+
+
+ Name
+ ScriptDebug.cpp
+ Windows
+
+
+ Name
+ Script.cpp
+ Windows
+
+
+ Name
+ Script.h
+ Windows
+
+
+ Name
+ Script2.cpp
+ Windows
+
+
+ Name
+ Script3.cpp
+ Windows
+
+
+ Name
+ Script4.cpp
+ Windows
+
+
+ Name
+ Script5.cpp
+ Windows
+
+
+ Name
+ Script6.cpp
+ Windows
+
+
+ Name
+ ScriptCommands.h
+ Windows
+
+
+ Name
+ TrafficLights.cpp
+ Windows
+
+
+ Name
+ TrafficLights.h
+ Windows
+
+
+ Name
+ Accident.cpp
+ Windows
+
+
+ Name
+ Accident.h
+ Windows
+
+
+ Name
+ AnimViewer.cpp
+ Windows
+
+
+ Name
+ AnimViewer.h
+ Windows
+
+
+ Name
+ Cam.cpp
+ Windows
+
+
+ Name
+ Camera.cpp
+ Windows
+
+
+ Name
+ Camera.h
+ Windows
+
+
+ Name
+ CdStream.cpp
+ Windows
+
+
+ Name
+ CdStream.h
+ Windows
+
+
+ Name
+ CdStreamPosix.cpp
+ Windows
+
+
+ Name
+ Clock.cpp
+ Windows
+
+
+ Name
+ Clock.h
+ Windows
+
+
+ Name
+ common.h
+ Windows
+
+
+ Name
+ config.h
+ Windows
+
+
+ Name
+ ControllerConfig.cpp
+ Windows
+
+
+ Name
+ ControllerConfig.h
+ Windows
+
+
+ Name
+ Crime.h
+ Windows
+
+
+ Name
+ Debug.cpp
+ Windows
+
+
+ Name
+ Debug.h
+ Windows
+
+
+ Name
+ Directory.cpp
+ Windows
+
+
+ Name
+ Directory.h
+ Windows
+
+
+ Name
+ EventList.cpp
+ Windows
+
+
+ Name
+ EventList.h
+ Windows
+
+
+ Name
+ FileLoader.cpp
+ Windows
+
+
+ Name
+ FileLoader.h
+ Windows
+
+
+ Name
+ FileMgr.cpp
+ Windows
+
+
+ Name
+ FileMgr.h
+ Windows
+
+
+ Name
+ Fire.cpp
+ Windows
+
+
+ Name
+ Fire.h
+ Windows
+
+
+ Name
+ Frontend.cpp
+ Windows
+
+
+ Name
+ Frontend.h
+ Windows
+
+
+ Name
+ Frontend_PS2.cpp
+ Windows
+
+
+ Name
+ Frontend_PS2.h
+ Windows
+
+
+ Name
+ FrontEndControls.cpp
+ Windows
+
+
+ Name
+ FrontEndControls.h
+ Windows
+
+
+ Name
+ FrontendTriggers.h
+ Windows
+
+
+ Name
+ Game.cpp
+ Windows
+
+
+ Name
+ Game.h
+ Windows
+
+
+ Name
+ General.h
+ Windows
+
+
+ Name
+ IniFile.cpp
+ Windows
+
+
+ Name
+ IniFile.h
+ Windows
+
+
+ Name
+ Lists.cpp
+ Windows
+
+
+ Name
+ Lists.h
+ Windows
+
+
+ Name
+ main.cpp
+ Windows
+
+
+ Name
+ main.h
+ Windows
+
+
+ Name
+ MenuScreens.cpp
+ Windows
+
+
+ Name
+ MenuScreensCustom.cpp
+ Windows
+
+
+ Name
+ obrstr.cpp
+ Windows
+
+
+ Name
+ obrstr.h
+ Windows
+
+
+ Name
+ Pad.cpp
+ Windows
+
+
+ Name
+ Pad.h
+ Windows
+
+
+ Name
+ Placeable.cpp
+ Windows
+
+
+ Name
+ Placeable.h
+ Windows
+
+
+ Name
+ PlayerInfo.cpp
+ Windows
+
+
+ Name
+ PlayerInfo.h
+ Windows
+
+
+ Name
+ Pools.cpp
+ Windows
+
+
+ Name
+ Pools.h
+ Windows
+
+
+ Name
+ Profile.cpp
+ Windows
+
+
+ Name
+ Profile.h
+ Windows
+
+
+ Name
+ Radar.cpp
+ Windows
+
+
+ Name
+ Radar.h
+ Windows
+
+
+ Name
+ Range2D.cpp
+ Windows
+
+
+ Name
+ Range2D.h
+ Windows
+
+
+ Name
+ Range3D.cpp
+ Windows
+
+
+ Name
+ Range3D.h
+ Windows
+
+
+ Name
+ re3.cpp
+ Windows
+
+
+ Name
+ References.cpp
+ Windows
+
+
+ Name
+ References.h
+ Windows
+
+
+ Name
+ Stats.cpp
+ Windows
+
+
+ Name
+ Stats.h
+ Windows
+
+
+ Name
+ Streaming.cpp
+ Windows
+
+
+ Name
+ Streaming.h
+ Windows
+
+
+ Name
+ SurfaceTable.cpp
+ Windows
+
+
+ Name
+ SurfaceTable.h
+ Windows
+
+
+ Name
+ templates.h
+ Windows
+
+
+ Name
+ timebars.cpp
+ Windows
+
+
+ Name
+ timebars.h
+ Windows
+
+
+ Name
+ Timer.cpp
+ Windows
+
+
+ Name
+ Timer.h
+ Windows
+
+
+ Name
+ TimeStep.cpp
+ Windows
+
+
+ Name
+ TimeStep.h
+ Windows
+
+
+ Name
+ User.cpp
+ Windows
+
+
+ Name
+ User.h
+ Windows
+
+
+ Name
+ Wanted.cpp
+ Windows
+
+
+ Name
+ Wanted.h
+ Windows
+
+
+ Name
+ World.cpp
+ Windows
+
+
+ Name
+ World.h
+ Windows
+
+
+ Name
+ ZoneCull.cpp
+ Windows
+
+
+ Name
+ ZoneCull.h
+ Windows
+
+
+ Name
+ Zones.cpp
+ Windows
+
+
+ Name
+ Zones.h
+ Windows
+
+
+ Name
+ Dummy.cpp
+ Windows
+
+
+ Name
+ Dummy.h
+ Windows
+
+
+ Name
+ Entity.cpp
+ Windows
+
+
+ Name
+ Entity.h
+ Windows
+
+
+ Name
+ Physical.cpp
+ Windows
+
+
+ Name
+ Physical.h
+ Windows
+
+
+ Name
+ math.cpp
+ Windows
+
+
+ Name
+ maths.h
+ Windows
+
+
+ Name
+ Matrix.cpp
+ Windows
+
+
+ Name
+ Matrix.h
+ Windows
+
+
+ Name
+ Quaternion.cpp
+ Windows
+
+
+ Name
+ Quaternion.h
+ Windows
+
+
+ Name
+ Rect.cpp
+ Windows
+
+
+ Name
+ Rect.h
+ Windows
+
+
+ Name
+ Vector.cpp
+ Windows
+
+
+ Name
+ Vector.h
+ Windows
+
+
+ Name
+ Vector2D.h
+ Windows
+
+
+ Name
+ VuVector.h
+ Windows
+
+
+ Name
+ BaseModelInfo.cpp
+ Windows
+
+
+ Name
+ BaseModelInfo.h
+ Windows
+
+
+ Name
+ ClumpModelInfo.cpp
+ Windows
+
+
+ Name
+ ClumpModelInfo.h
+ Windows
+
+
+ Name
+ MloModelInfo.cpp
+ Windows
+
+
+ Name
+ MloModelInfo.h
+ Windows
+
+
+ Name
+ ModelIndices.cpp
+ Windows
+
+
+ Name
+ ModelIndices.h
+ Windows
+
+
+ Name
+ ModelInfo.cpp
+ Windows
+
+
+ Name
+ ModelInfo.h
+ Windows
+
+
+ Name
+ PedModelInfo.cpp
+ Windows
+
+
+ Name
+ PedModelInfo.h
+ Windows
+
+
+ Name
+ SimpleModelInfo.cpp
+ Windows
+
+
+ Name
+ SimpleModelInfo.h
+ Windows
+
+
+ Name
+ TimeModelInfo.cpp
+ Windows
+
+
+ Name
+ TimeModelInfo.h
+ Windows
+
+
+ Name
+ VehicleModelInfo.cpp
+ Windows
+
+
+ Name
+ VehicleModelInfo.h
+ Windows
+
+
+ Name
+ XtraCompsModelInfo.h
+ Windows
+
+
+ Name
+ CutsceneHead.cpp
+ Windows
+
+
+ Name
+ CutsceneHead.h
+ Windows
+
+
+ Name
+ CutsceneObject.cpp
+ Windows
+
+
+ Name
+ CutsceneObject.h
+ Windows
+
+
+ Name
+ DummyObject.cpp
+ Windows
+
+
+ Name
+ DummyObject.h
+ Windows
+
+
+ Name
+ Object.cpp
+ Windows
+
+
+ Name
+ Object.h
+ Windows
+
+
+ Name
+ ObjectData.cpp
+ Windows
+
+
+ Name
+ ObjectData.h
+ Windows
+
+
+ Name
+ ParticleObject.cpp
+ Windows
+
+
+ Name
+ ParticleObject.h
+ Windows
+
+
+ Name
+ Projectile.cpp
+ Windows
+
+
+ Name
+ Projectile.h
+ Windows
+
+
+ Name
+ CivilianPed.cpp
+ Windows
+
+
+ Name
+ CivilianPed.h
+ Windows
+
+
+ Name
+ CopPed.cpp
+ Windows
+
+
+ Name
+ CopPed.h
+ Windows
+
+
+ Name
+ DummyPed.h
+ Windows
+
+
+ Name
+ EmergencyPed.cpp
+ Windows
+
+
+ Name
+ EmergencyPed.h
+ Windows
+
+
+ Name
+ Gangs.cpp
+ Windows
+
+
+ Name
+ Gangs.h
+ Windows
+
+
+ Name
+ Ped.cpp
+ Windows
+
+
+ Name
+ Ped.h
+ Windows
+
+
+ Name
+ PedAI.cpp
+ Windows
+
+
+ Name
+ PedChat.cpp
+ Windows
+
+
+ Name
+ PedDebug.cpp
+ Windows
+
+
+ Name
+ PedFight.cpp
+ Windows
+
+
+ Name
+ PedIK.cpp
+ Windows
+
+
+ Name
+ PedIK.h
+ Windows
+
+
+ Name
+ PedPlacement.cpp
+ Windows
+
+
+ Name
+ PedPlacement.h
+ Windows
+
+
+ Name
+ PedRoutes.cpp
+ Windows
+
+
+ Name
+ PedRoutes.h
+ Windows
+
+
+ Name
+ PedType.cpp
+ Windows
+
+
+ Name
+ PedType.h
+ Windows
+
+
+ Name
+ PlayerPed.cpp
+ Windows
+
+
+ Name
+ PlayerPed.h
+ Windows
+
+
+ Name
+ Population.cpp
+ Windows
+
+
+ Name
+ Population.h
+ Windows
+
+
+ Name
+ 2dEffect.h
+ Windows
+
+
+ Name
+ Antennas.cpp
+ Windows
+
+
+ Name
+ Antennas.h
+ Windows
+
+
+ Name
+ Clouds.cpp
+ Windows
+
+
+ Name
+ Clouds.h
+ Windows
+
+
+ Name
+ Console.cpp
+ Windows
+
+
+ Name
+ Console.h
+ Windows
+
+
+ Name
+ Coronas.cpp
+ Windows
+
+
+ Name
+ Coronas.h
+ Windows
+
+
+ Name
+ Credits.cpp
+ Windows
+
+
+ Name
+ Credits.h
+ Windows
+
+
+ Name
+ Draw.cpp
+ Windows
+
+
+ Name
+ Draw.h
+ Windows
+
+
+ Name
+ Fluff.cpp
+ Windows
+
+
+ Name
+ Fluff.h
+ Windows
+
+
+ Name
+ Font.cpp
+ Windows
+
+
+ Name
+ Font.h
+ Windows
+
+
+ Name
+ Glass.cpp
+ Windows
+
+
+ Name
+ Glass.h
+ Windows
+
+
+ Name
+ Hud.cpp
+ Windows
+
+
+ Name
+ Hud.h
+ Windows
+
+
+ Name
+ Instance.cpp
+ Windows
+
+
+ Name
+ Instance.h
+ Windows
+
+
+ Name
+ Lines.cpp
+ Windows
+
+
+ Name
+ Lines.h
+ Windows
+
+
+ Name
+ MBlur.cpp
+ Windows
+
+
+ Name
+ MBlur.h
+ Windows
+
+
+ Name
+ Particle.cpp
+ Windows
+
+
+ Name
+ Particle.h
+ Windows
+
+
+ Name
+ ParticleMgr.cpp
+ Windows
+
+
+ Name
+ ParticleMgr.h
+ Windows
+
+
+ Name
+ ParticleType.h
+ Windows
+
+
+ Name
+ PlayerSkin.cpp
+ Windows
+
+
+ Name
+ PlayerSkin.h
+ Windows
+
+
+ Name
+ PointLights.cpp
+ Windows
+
+
+ Name
+ PointLights.h
+ Windows
+
+
+ Name
+ RenderBuffer.cpp
+ Windows
+
+
+ Name
+ RenderBuffer.h
+ Windows
+
+
+ Name
+ Renderer.cpp
+ Windows
+
+
+ Name
+ Renderer.h
+ Windows
+
+
+ Name
+ Rubbish.cpp
+ Windows
+
+
+ Name
+ Rubbish.h
+ Windows
+
+
+ Name
+ Shadows.cpp
+ Windows
+
+
+ Name
+ Shadows.h
+ Windows
+
+
+ Name
+ Skidmarks.cpp
+ Windows
+
+
+ Name
+ Skidmarks.h
+ Windows
+
+
+ Name
+ SpecialFX.cpp
+ Windows
+
+
+ Name
+ SpecialFX.h
+ Windows
+
+
+ Name
+ Sprite.cpp
+ Windows
+
+
+ Name
+ Sprite.h
+ Windows
+
+
+ Name
+ Sprite2d.cpp
+ Windows
+
+
+ Name
+ Sprite2d.h
+ Windows
+
+
+ Name
+ TexList.cpp
+ Windows
+
+
+ Name
+ TexList.h
+ Windows
+
+
+ Name
+ Timecycle.cpp
+ Windows
+
+
+ Name
+ Timecycle.h
+ Windows
+
+
+ Name
+ WaterCannon.cpp
+ Windows
+
+
+ Name
+ WaterCannon.h
+ Windows
+
+
+ Name
+ WaterLevel.cpp
+ Windows
+
+
+ Name
+ WaterLevel.h
+ Windows
+
+
+ Name
+ Weather.cpp
+ Windows
+
+
+ Name
+ Weather.h
+ Windows
+
+
+ Name
+ ClumpRead.cpp
+ Windows
+
+
+ Name
+ Lights.cpp
+ Windows
+
+
+ Name
+ Lights.h
+ Windows
+
+
+ Name
+ MemoryHeap.cpp
+ Windows
+
+
+ Name
+ MemoryHeap.h
+ Windows
+
+
+ Name
+ MemoryMgr.cpp
+ Windows
+
+
+ Name
+ MemoryMgr.h
+ Windows
+
+
+ Name
+ NodeName.cpp
+ Windows
+
+
+ Name
+ NodeName.h
+ Windows
+
+
+ Name
+ RwHelper.cpp
+ Windows
+
+
+ Name
+ RwHelper.h
+ Windows
+
+
+ Name
+ RwMatFX.cpp
+ Windows
+
+
+ Name
+ RwPS2AlphaTest.cpp
+ Windows
+
+
+ Name
+ TexRead.cpp
+ Windows
+
+
+ Name
+ TexturePools.cpp
+ Windows
+
+
+ Name
+ TexturePools.h
+ Windows
+
+
+ Name
+ TxdStore.cpp
+ Windows
+
+
+ Name
+ TxdStore.h
+ Windows
+
+
+ Name
+ VisibilityPlugins.cpp
+ Windows
+
+
+ Name
+ VisibilityPlugins.h
+ Windows
+
+
+ Name
+ Date.cpp
+ Windows
+
+
+ Name
+ Date.h
+ Windows
+
+
+ Name
+ GenericGameStorage.cpp
+ Windows
+
+
+ Name
+ GenericGameStorage.h
+ Windows
+
+
+ Name
+ MemoryCard.cpp
+ Windows
+
+
+ Name
+ MemoryCard.h
+ Windows
+
+
+ Name
+ PCSave.cpp
+ Windows
+
+
+ Name
+ PCSave.h
+ Windows
+
+
+ Name
+ crossplatform.cpp
+ Windows
+
+
+ Name
+ crossplatform.h
+ Windows
+
+
+ Name
+ events.cpp
+ Windows
+
+
+ Name
+ events.h
+ Windows
+
+
+ Name
+ platform.h
+ Windows
+
+
+ Name
+ skeleton.cpp
+ Windows
+
+
+ Name
+ skeleton.h
+ Windows
+
+
+ Name
+ resource.h
+ Windows
+
+
+ Name
+ win.cpp
+ Windows
+
+
+ Name
+ win.h
+ Windows
+
+
+ Name
+ win.rc
+ Windows
+
+
+ Name
+ Messages.cpp
+ Windows
+
+
+ Name
+ Messages.h
+ Windows
+
+
+ Name
+ Pager.cpp
+ Windows
+
+
+ Name
+ Pager.h
+ Windows
+
+
+ Name
+ Text.cpp
+ Windows
+
+
+ Name
+ Text.h
+ Windows
+
+
+ Name
+ Automobile.cpp
+ Windows
+
+
+ Name
+ Automobile.h
+ Windows
+
+
+ Name
+ Bike.h
+ Windows
+
+
+ Name
+ Boat.cpp
+ Windows
+
+
+ Name
+ Boat.h
+ Windows
+
+
+ Name
+ CarGen.cpp
+ Windows
+
+
+ Name
+ CarGen.h
+ Windows
+
+
+ Name
+ Cranes.cpp
+ Windows
+
+
+ Name
+ Cranes.h
+ Windows
+
+
+ Name
+ DamageManager.cpp
+ Windows
+
+
+ Name
+ DamageManager.h
+ Windows
+
+
+ Name
+ Door.cpp
+ Windows
+
+
+ Name
+ Door.h
+ Windows
+
+
+ Name
+ Floater.cpp
+ Windows
+
+
+ Name
+ Floater.h
+ Windows
+
+
+ Name
+ HandlingMgr.cpp
+ Windows
+
+
+ Name
+ HandlingMgr.h
+ Windows
+
+
+ Name
+ Heli.cpp
+ Windows
+
+
+ Name
+ Heli.h
+ Windows
+
+
+ Name
+ Plane.cpp
+ Windows
+
+
+ Name
+ Plane.h
+ Windows
+
+
+ Name
+ Train.cpp
+ Windows
+
+
+ Name
+ Train.h
+ Windows
+
+
+ Name
+ Transmission.cpp
+ Windows
+
+
+ Name
+ Transmission.h
+ Windows
+
+
+ Name
+ Vehicle.cpp
+ Windows
+
+
+ Name
+ Vehicle.h
+ Windows
+
+
+ Name
+ BulletInfo.cpp
+ Windows
+
+
+ Name
+ BulletInfo.h
+ Windows
+
+
+ Name
+ Explosion.cpp
+ Windows
+
+
+ Name
+ Explosion.h
+ Windows
+
+
+ Name
+ ProjectileInfo.cpp
+ Windows
+
+
+ Name
+ ProjectileInfo.h
+ Windows
+
+
+ Name
+ ShotInfo.cpp
+ Windows
+
+
+ Name
+ ShotInfo.h
+ Windows
+
+
+ Name
+ Weapon.cpp
+ Windows
+
+
+ Name
+ Weapon.h
+ Windows
+
+
+ Name
+ WeaponEffects.cpp
+ Windows
+
+
+ Name
+ WeaponEffects.h
+ Windows
+
+
+ Name
+ WeaponInfo.cpp
+ Windows
+
+
+ Name
+ WeaponInfo.h
+ Windows
+
+
+ Name
+ WeaponType.h
+ Windows
+
+
+ Name
+ mss32.lib
+ Windows
+
+
+ Name
+ d3d8.lib
+ Windows
+
+
+ Name
+ ddraw.lib
+ Windows
+
+
+ Name
+ dxguid.lib
+ Windows
+
+
+ Name
+ strmiids.lib
+ Windows
+
+
+ Name
+ dinput8.lib
+ Windows
+
+
+ Name
+ winmm.lib
+ Windows
+
+
+ Name
+ rwcore.lib
+ Windows
+
+
+ Name
+ rpworld.lib
+ Windows
+
+
+ Name
+ rpmatfx.lib
+ Windows
+
+
+ Name
+ rpskin.lib
+ Windows
+
+
+ Name
+ rphanim.lib
+ Windows
+
+
+ Name
+ rtbmp.lib
+ Windows
+
+
+ Name
+ rtquat.lib
+ Windows
+
+
+ Name
+ rtcharse.lib
+ Windows
+
+
+ Name
+ ole32.lib
+ Windows
+
+
+ Name
+ shell32.lib
+ Windows
+
+
+ Name
+ uuid.lib
+ Windows
+
+
+ Name
+ MSL_All_x86_D.lib
+ MacOS
+
+
+ Name
+ Comdlg32.lib
+ MacOS
+
+
+ Name
+ Gdi32.lib
+ MacOS
+
+
+ Name
+ Kernel32.lib
+ MacOS
+
+
+ Name
+ User32.lib
+ MacOS
+
+
+
+
+ Release
+
+
+
+ UserSourceTrees
+
+
+ AlwaysSearchUserPathsfalse
+ InterpretDOSAndUnixPathstrue
+ RequireFrameworkStyleIncludesfalse
+ UserSearchPaths
+
+ SearchPath
+ Path
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\animation
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\audio
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\buildings
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\collision
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\control
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\core
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\entities
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\math
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\modelinfo
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\objects
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\peds
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\renderer
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\rw
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\save
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\skel
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\text
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\vehicles
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\weapons
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\vendor\milessdk\lib
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\vendor\milessdk\include
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\dx8sdk\Lib
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\rwsdk\lib\d3d8\release
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\rwsdk\include\d3d8
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\extras
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SystemSearchPaths
+
+ SearchPath
+ Path..\sdk\rwsdk\include\d3d8
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\sdk\dx8sdk\Include
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ PathWin32-x86 Support\Headers\
+ PathFormatWindows
+ PathRootCodeWarrior
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ PathWin32-x86 Support\Libraries\
+ PathFormatWindows
+ PathRootCodeWarrior
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ PathMSL
+ PathFormatWindows
+ PathRootCodeWarrior
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+ SearchPath
+ Path..\src\audio\eax
+ PathFormatWindows
+ PathRootProject
+
+ Recursivetrue
+ FrameworkPathfalse
+ HostFlagsAll
+
+
+
+
+ MWRuntimeSettings_WorkingDirectory
+ MWRuntimeSettings_CommandLine
+ MWRuntimeSettings_HostApplication
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+ MWRuntimeSettings_EnvVars
+
+
+ LinkerWin32 x86 Linker
+ PreLinker
+ PostLinker
+ TargetnameRelease
+ OutputDirectory
+ Path
+ PathFormatWindows
+ PathRootProject
+
+ SaveEntriesUsingRelativePathsfalse
+
+
+ FileMappings
+
+ FileTypeTEXT
+ FileExtension.c
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.c++
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.cc
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.cp
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.cpp
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.def
+ Compiler
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.h
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMaketrue
+
+
+ FileTypeTEXT
+ FileExtension.p
+ CompilerMW Pascal x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.pas
+ CompilerMW Pascal x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.pch
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompiletrue
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.pch++
+ CompilerMW C/C++ x86
+ EditLanguageC/C++
+ Precompiletrue
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.ppu
+ CompilerMW Pascal x86
+ EditLanguage
+ Precompiletrue
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.rc
+ CompilerMW WinRC
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileTypeTEXT
+ FileExtension.res
+ CompilerWinRes Import
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileExtension.doc
+ Compiler
+ EditLanguage
+ Precompilefalse
+ Launchabletrue
+ ResourceFilefalse
+ IgnoredByMaketrue
+
+
+ FileExtension.lib
+ CompilerLib Import x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileExtension.obj
+ CompilerObj Import x86
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+ FileExtension.res
+ CompilerWinRes Import
+ EditLanguage
+ Precompilefalse
+ Launchablefalse
+ ResourceFilefalse
+ IgnoredByMakefalse
+
+
+
+
+ CacheModDatestrue
+ ActivateBrowserfalse
+ DumpBrowserInfofalse
+ CacheSubprojectstrue
+ UseThirdPartyDebuggerfalse
+ DebuggerAppPath
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+ DebuggerCmdLineArgs
+ DebuggerWorkingDir
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+
+
+ LogSystemMessagesfalse
+ AutoTargetDLLsfalse
+ StopAtWatchpointstrue
+ PauseWhileRunningfalse
+ PauseInterval5
+ PauseUIFlags0
+ AltExePath
+ Path
+ PathFormatGeneric
+ PathRootAbsolute
+
+ StopAtTempBPOnLaunchtrue
+ CacheSymbolicstrue
+ TempBPFunctionNamemain
+ TempBPType0
+
+
+ Enabledfalse
+ ConnectionName
+ DownloadPath
+ LaunchRemoteAppfalse
+ RemoteAppPath
+
+
+ OtherExecutables
+
+
+ CustomColor1
+ Red0
+ Green32767
+ Blue0
+
+ CustomColor2
+ Red0
+ Green32767
+ Blue0
+
+ CustomColor3
+ Red0
+ Green32767
+ Blue0
+
+ CustomColor4
+ Red0
+ Green32767
+ Blue0
+
+
+
+ MWCodeGen_X86_processorPentiumII
+ MWCodeGen_X86_alignmentbytes8
+ MWCodeGen_X86_exceptionsZeroOverhead
+ MWCodeGen_X86_extinst_mmx0
+ MWCodeGen_X86_extinst_3dnow0
+ MWCodeGen_X86_use_mmx_3dnow_convention0
+ MWCodeGen_X86_machinecodelisting0
+ MWCodeGen_X86_intrinsics1
+ MWCodeGen_X86_syminfo0
+ MWCodeGen_X86_codeviewinfo1
+ MWCodeGen_X86_extinst_cmov_fcomi0
+ MWCodeGen_X86_extinst_sse0
+
+
+ MWDebugger_X86_Exceptions
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ PDisasmX86_showHeaderstrue
+ PDisasmX86_showSymTabtrue
+ PDisasmX86_showCodetrue
+ PDisasmX86_showSourcefalse
+ PDisasmX86_showHextrue
+ PDisasmX86_showRelocationtrue
+ PDisasmX86_showCommentsfalse
+ PDisasmX86_showDebugfalse
+ PDisasmX86_showExceptionsfalse
+ PDisasmX86_showDatatrue
+ PDisasmX86_showRawfalse
+ PDisasmX86_verbosefalse
+
+
+ MWFrontEnd_C_cplusplus1
+ MWFrontEnd_C_checkprotos0
+ MWFrontEnd_C_arm0
+ MWFrontEnd_C_trigraphs0
+ MWFrontEnd_C_onlystdkeywords0
+ MWFrontEnd_C_enumsalwaysint1
+ MWFrontEnd_C_mpwpointerstyle0
+ MWFrontEnd_C_prefixname
+ MWFrontEnd_C_ansistrict0
+ MWFrontEnd_C_mpwcnewline0
+ MWFrontEnd_C_wchar_type1
+ MWFrontEnd_C_enableexceptions1
+ MWFrontEnd_C_dontreusestrings0
+ MWFrontEnd_C_poolstrings1
+ MWFrontEnd_C_dontinline0
+ MWFrontEnd_C_useRTTI1
+ MWFrontEnd_C_multibyteaware1
+ MWFrontEnd_C_unsignedchars0
+ MWFrontEnd_C_autoinline0
+ MWFrontEnd_C_booltruefalse1
+ MWFrontEnd_C_direct_to_som0
+ MWFrontEnd_C_som_env_check0
+ MWFrontEnd_C_alwaysinline0
+ MWFrontEnd_C_inlinelevel0
+ MWFrontEnd_C_ecplusplus0
+ MWFrontEnd_C_objective_c0
+ MWFrontEnd_C_defer_codegen0
+
+
+ MWLinker_X86_entrypointusageDefault
+ MWLinker_X86_entrypoint
+ MWLinker_X86_subsystemWinGUI
+ MWLinker_X86_subsysmajorid4
+ MWLinker_X86_subsysminorid0
+ MWLinker_X86_usrmajorid0
+ MWLinker_X86_usrminorid0
+ MWLinker_X86_commandfile
+ MWLinker_X86_generatemap0
+ MWLinker_X86_linksym0
+ MWLinker_X86_linkCV1
+
+
+ MWProject_X86_typeApplication
+ MWProject_X86_outfileRelease\gta3.exe
+ MWProject_X86_baseaddress4194304
+ MWProject_X86_maxstacksize1024
+ MWProject_X86_minstacksize4
+ MWProject_X86_size1024
+ MWProject_X86_minsize4
+ MWProject_X86_importlib
+
+
+ MWWarning_C_warn_illpragma0
+ MWWarning_C_warn_emptydecl0
+ MWWarning_C_warn_possunwant1
+ MWWarning_C_warn_unusedvar1
+ MWWarning_C_warn_unusedarg0
+ MWWarning_C_warn_extracomma1
+ MWWarning_C_pedantic0
+ MWWarning_C_warningerrors0
+ MWWarning_C_warn_hidevirtual1
+ MWWarning_C_warn_implicitconv0
+ MWWarning_C_warn_notinlined0
+ MWWarning_C_warn_structclass0
+
+
+ MWWinRC_prefixnameResourcePrefix.h
+
+
+ GlobalOptimizer_X86__optimizationlevelLevel4
+ GlobalOptimizer_X86__optforSpeed
+
+
+
+ Name
+ MSL_All_x86.lib
+ MacOS
+ Library
+
+
+
+ Name
+ Comdlg32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ Gdi32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ Kernel32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ User32.lib
+ MacOS
+ Library
+
+
+
+ Name
+ AnimationId.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendAssocGroup.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendAssocGroup.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendAssociation.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendAssociation.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendClumpData.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendClumpData.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendHierarchy.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendHierarchy.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendList.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendNode.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendNode.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimBlendSequence.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimBlendSequence.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimManager.h
+ Windows
+ Text
+
+
+
+ Name
+ Bones.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Bones.h
+ Windows
+ Text
+
+
+
+ Name
+ CutsceneMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CutsceneMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ FrameUpdate.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RpAnimBlend.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RpAnimBlend.h
+ Windows
+ Text
+
+
+
+ Name
+ audio_enums.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioCollision.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AudioCollision.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioLogic.cpp
+ Windows
+ Text
+
+
+
+ Name
+ AudioManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AudioManager.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioSamples.h
+ Windows
+ Text
+
+
+
+ Name
+ AudioScriptObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AudioScriptObject.h
+ Windows
+ Text
+
+
+
+ Name
+ DMAudio.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ DMAudio.h
+ Windows
+ Text
+
+
+
+ Name
+ MusicManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MusicManager.h
+ Windows
+ Text
+
+
+
+ Name
+ PolRadio.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PolRadio.h
+ Windows
+ Text
+
+
+
+ Name
+ sampman.h
+ Windows
+ Text
+
+
+
+ Name
+ sampman_miles.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ soundlist.h
+ Windows
+ Text
+
+
+
+ Name
+ eax.h
+ Windows
+ Text
+
+
+
+ Name
+ eax-util.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ eax-util.h
+ Windows
+ Text
+
+
+
+ Name
+ Building.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Building.h
+ Windows
+ Text
+
+
+
+ Name
+ Solid.h
+ Windows
+ Text
+
+
+
+ Name
+ Treadable.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Treadable.h
+ Windows
+ Text
+
+
+
+ Name
+ ColBox.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColBox.h
+ Windows
+ Text
+
+
+
+ Name
+ ColLine.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColLine.h
+ Windows
+ Text
+
+
+
+ Name
+ Collision.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Collision.h
+ Windows
+ Text
+
+
+
+ Name
+ ColModel.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColModel.h
+ Windows
+ Text
+
+
+
+ Name
+ ColPoint.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColPoint.h
+ Windows
+ Text
+
+
+
+ Name
+ ColSphere.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColSphere.h
+ Windows
+ Text
+
+
+
+ Name
+ ColTriangle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ColTriangle.h
+ Windows
+ Text
+
+
+
+ Name
+ CompressedVector.h
+ Windows
+ Text
+
+
+
+ Name
+ TempColModels.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TempColModels.h
+ Windows
+ Text
+
+
+
+ Name
+ VuCollision.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ VuCollision.h
+ Windows
+ Text
+
+
+
+ Name
+ AutoPilot.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AutoPilot.h
+ Windows
+ Text
+
+
+
+ Name
+ Bridge.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Bridge.h
+ Windows
+ Text
+
+
+
+ Name
+ CarAI.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CarAI.h
+ Windows
+ Text
+
+
+
+ Name
+ CarCtrl.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CarCtrl.h
+ Windows
+ Text
+
+
+
+ Name
+ Curves.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Curves.h
+ Windows
+ Text
+
+
+
+ Name
+ Darkel.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Darkel.h
+ Windows
+ Text
+
+
+
+ Name
+ GameLogic.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ GameLogic.h
+ Windows
+ Text
+
+
+
+ Name
+ Garages.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Garages.h
+ Windows
+ Text
+
+
+
+ Name
+ NameGrid.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ NameGrid.h
+ Windows
+ Text
+
+
+
+ Name
+ OnscreenTimer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ OnscreenTimer.h
+ Windows
+ Text
+
+
+
+ Name
+ PathFind.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PathFind.h
+ Windows
+ Text
+
+
+
+ Name
+ Phones.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Phones.h
+ Windows
+ Text
+
+
+
+ Name
+ Pickups.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pickups.h
+ Windows
+ Text
+
+
+
+ Name
+ PowerPoints.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PowerPoints.h
+ Windows
+ Text
+
+
+
+ Name
+ Record.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Record.h
+ Windows
+ Text
+
+
+
+ Name
+ Remote.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Remote.h
+ Windows
+ Text
+
+
+
+ Name
+ Replay.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Replay.h
+ Windows
+ Text
+
+
+
+ Name
+ Restart.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Restart.h
+ Windows
+ Text
+
+
+
+ Name
+ RoadBlocks.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RoadBlocks.h
+ Windows
+ Text
+
+
+
+ Name
+ SceneEdit.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SceneEdit.h
+ Windows
+ Text
+
+
+
+ Name
+ ScriptDebug.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script.h
+ Windows
+ Text
+
+
+
+ Name
+ Script2.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script3.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script4.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script5.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Script6.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ScriptCommands.h
+ Windows
+ Text
+
+
+
+ Name
+ TrafficLights.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TrafficLights.h
+ Windows
+ Text
+
+
+
+ Name
+ Accident.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Accident.h
+ Windows
+ Text
+
+
+
+ Name
+ AnimViewer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ AnimViewer.h
+ Windows
+ Text
+
+
+
+ Name
+ Cam.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Camera.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Camera.h
+ Windows
+ Text
+
+
+
+ Name
+ CdStream.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CdStream.h
+ Windows
+ Text
+
+
+
+ Name
+ CdStreamPosix.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Clock.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Clock.h
+ Windows
+ Text
+
+
+
+ Name
+ common.h
+ Windows
+ Text
+
+
+
+ Name
+ config.h
+ Windows
+ Text
+
+
+
+ Name
+ ControllerConfig.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ControllerConfig.h
+ Windows
+ Text
+
+
+
+ Name
+ Crime.h
+ Windows
+ Text
+
+
+
+ Name
+ Debug.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Debug.h
+ Windows
+ Text
+
+
+
+ Name
+ Directory.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Directory.h
+ Windows
+ Text
+
+
+
+ Name
+ EventList.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ EventList.h
+ Windows
+ Text
+
+
+
+ Name
+ FileLoader.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ FileLoader.h
+ Windows
+ Text
+
+
+
+ Name
+ FileMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ FileMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ Fire.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Fire.h
+ Windows
+ Text
+
+
+
+ Name
+ Frontend.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Frontend.h
+ Windows
+ Text
+
+
+
+ Name
+ Frontend_PS2.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Frontend_PS2.h
+ Windows
+ Text
+
+
+
+ Name
+ FrontEndControls.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ FrontEndControls.h
+ Windows
+ Text
+
+
+
+ Name
+ FrontendTriggers.h
+ Windows
+ Text
+
+
+
+ Name
+ Game.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Game.h
+ Windows
+ Text
+
+
+
+ Name
+ General.h
+ Windows
+ Text
+
+
+
+ Name
+ IniFile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ IniFile.h
+ Windows
+ Text
+
+
+
+ Name
+ Lists.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lists.h
+ Windows
+ Text
+
+
+
+ Name
+ main.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ main.h
+ Windows
+ Text
+
+
+
+ Name
+ MenuScreens.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MenuScreensCustom.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ obrstr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ obrstr.h
+ Windows
+ Text
+
+
+
+ Name
+ Pad.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pad.h
+ Windows
+ Text
+
+
+
+ Name
+ Placeable.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Placeable.h
+ Windows
+ Text
+
+
+
+ Name
+ PlayerInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PlayerInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ Pools.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pools.h
+ Windows
+ Text
+
+
+
+ Name
+ Profile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Profile.h
+ Windows
+ Text
+
+
+
+ Name
+ Radar.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Radar.h
+ Windows
+ Text
+
+
+
+ Name
+ Range2D.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Range2D.h
+ Windows
+ Text
+
+
+
+ Name
+ Range3D.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Range3D.h
+ Windows
+ Text
+
+
+
+ Name
+ re3.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ References.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ References.h
+ Windows
+ Text
+
+
+
+ Name
+ Stats.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Stats.h
+ Windows
+ Text
+
+
+
+ Name
+ Streaming.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Streaming.h
+ Windows
+ Text
+
+
+
+ Name
+ SurfaceTable.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SurfaceTable.h
+ Windows
+ Text
+
+
+
+ Name
+ templates.h
+ Windows
+ Text
+
+
+
+ Name
+ timebars.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ timebars.h
+ Windows
+ Text
+
+
+
+ Name
+ Timer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Timer.h
+ Windows
+ Text
+
+
+
+ Name
+ TimeStep.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TimeStep.h
+ Windows
+ Text
+
+
+
+ Name
+ User.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ User.h
+ Windows
+ Text
+
+
+
+ Name
+ Wanted.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Wanted.h
+ Windows
+ Text
+
+
+
+ Name
+ World.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ World.h
+ Windows
+ Text
+
+
+
+ Name
+ ZoneCull.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ZoneCull.h
+ Windows
+ Text
+
+
+
+ Name
+ Zones.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Zones.h
+ Windows
+ Text
+
+
+
+ Name
+ Dummy.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Dummy.h
+ Windows
+ Text
+
+
+
+ Name
+ Entity.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Entity.h
+ Windows
+ Text
+
+
+
+ Name
+ Physical.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Physical.h
+ Windows
+ Text
+
+
+
+ Name
+ math.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ maths.h
+ Windows
+ Text
+
+
+
+ Name
+ Matrix.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Matrix.h
+ Windows
+ Text
+
+
+
+ Name
+ Quaternion.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Quaternion.h
+ Windows
+ Text
+
+
+
+ Name
+ Rect.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Rect.h
+ Windows
+ Text
+
+
+
+ Name
+ Vector.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Vector.h
+ Windows
+ Text
+
+
+
+ Name
+ Vector2D.h
+ Windows
+ Text
+
+
+
+ Name
+ VuVector.h
+ Windows
+ Text
+
+
+
+ Name
+ BaseModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ BaseModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ ClumpModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ClumpModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ MloModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MloModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ ModelIndices.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ModelIndices.h
+ Windows
+ Text
+
+
+
+ Name
+ ModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ PedModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ SimpleModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SimpleModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ TimeModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TimeModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ VehicleModelInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ VehicleModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ XtraCompsModelInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ CutsceneHead.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CutsceneHead.h
+ Windows
+ Text
+
+
+
+ Name
+ CutsceneObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CutsceneObject.h
+ Windows
+ Text
+
+
+
+ Name
+ DummyObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ DummyObject.h
+ Windows
+ Text
+
+
+
+ Name
+ Object.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Object.h
+ Windows
+ Text
+
+
+
+ Name
+ ObjectData.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ObjectData.h
+ Windows
+ Text
+
+
+
+ Name
+ ParticleObject.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ParticleObject.h
+ Windows
+ Text
+
+
+
+ Name
+ Projectile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Projectile.h
+ Windows
+ Text
+
+
+
+ Name
+ CivilianPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CivilianPed.h
+ Windows
+ Text
+
+
+
+ Name
+ CopPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CopPed.h
+ Windows
+ Text
+
+
+
+ Name
+ DummyPed.h
+ Windows
+ Text
+
+
+
+ Name
+ EmergencyPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ EmergencyPed.h
+ Windows
+ Text
+
+
+
+ Name
+ Gangs.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Gangs.h
+ Windows
+ Text
+
+
+
+ Name
+ Ped.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Ped.h
+ Windows
+ Text
+
+
+
+ Name
+ PedAI.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedChat.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedDebug.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedFight.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedIK.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedIK.h
+ Windows
+ Text
+
+
+
+ Name
+ PedPlacement.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedPlacement.h
+ Windows
+ Text
+
+
+
+ Name
+ PedRoutes.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedRoutes.h
+ Windows
+ Text
+
+
+
+ Name
+ PedType.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PedType.h
+ Windows
+ Text
+
+
+
+ Name
+ PlayerPed.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PlayerPed.h
+ Windows
+ Text
+
+
+
+ Name
+ Population.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Population.h
+ Windows
+ Text
+
+
+
+ Name
+ 2dEffect.h
+ Windows
+ Text
+
+
+
+ Name
+ Antennas.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Antennas.h
+ Windows
+ Text
+
+
+
+ Name
+ Clouds.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Clouds.h
+ Windows
+ Text
+
+
+
+ Name
+ Console.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Console.h
+ Windows
+ Text
+
+
+
+ Name
+ Coronas.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Coronas.h
+ Windows
+ Text
+
+
+
+ Name
+ Credits.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Credits.h
+ Windows
+ Text
+
+
+
+ Name
+ Draw.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Draw.h
+ Windows
+ Text
+
+
+
+ Name
+ Fluff.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Fluff.h
+ Windows
+ Text
+
+
+
+ Name
+ Font.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Font.h
+ Windows
+ Text
+
+
+
+ Name
+ Glass.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Glass.h
+ Windows
+ Text
+
+
+
+ Name
+ Hud.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Hud.h
+ Windows
+ Text
+
+
+
+ Name
+ Instance.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Instance.h
+ Windows
+ Text
+
+
+
+ Name
+ Lines.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lines.h
+ Windows
+ Text
+
+
+
+ Name
+ MBlur.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MBlur.h
+ Windows
+ Text
+
+
+
+ Name
+ Particle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Particle.h
+ Windows
+ Text
+
+
+
+ Name
+ ParticleMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ParticleMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ ParticleType.h
+ Windows
+ Text
+
+
+
+ Name
+ PlayerSkin.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PlayerSkin.h
+ Windows
+ Text
+
+
+
+ Name
+ PointLights.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PointLights.h
+ Windows
+ Text
+
+
+
+ Name
+ RenderBuffer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RenderBuffer.h
+ Windows
+ Text
+
+
+
+ Name
+ Renderer.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Renderer.h
+ Windows
+ Text
+
+
+
+ Name
+ Rubbish.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Rubbish.h
+ Windows
+ Text
+
+
+
+ Name
+ Shadows.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Shadows.h
+ Windows
+ Text
+
+
+
+ Name
+ Skidmarks.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Skidmarks.h
+ Windows
+ Text
+
+
+
+ Name
+ SpecialFX.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ SpecialFX.h
+ Windows
+ Text
+
+
+
+ Name
+ Sprite.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Sprite.h
+ Windows
+ Text
+
+
+
+ Name
+ Sprite2d.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Sprite2d.h
+ Windows
+ Text
+
+
+
+ Name
+ TexList.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexList.h
+ Windows
+ Text
+
+
+
+ Name
+ Timecycle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Timecycle.h
+ Windows
+ Text
+
+
+
+ Name
+ WaterCannon.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WaterCannon.h
+ Windows
+ Text
+
+
+
+ Name
+ WaterLevel.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WaterLevel.h
+ Windows
+ Text
+
+
+
+ Name
+ Weather.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Weather.h
+ Windows
+ Text
+
+
+
+ Name
+ ClumpRead.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lights.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Lights.h
+ Windows
+ Text
+
+
+
+ Name
+ MemoryHeap.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MemoryHeap.h
+ Windows
+ Text
+
+
+
+ Name
+ MemoryMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MemoryMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ NodeName.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ NodeName.h
+ Windows
+ Text
+
+
+
+ Name
+ RwHelper.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RwHelper.h
+ Windows
+ Text
+
+
+
+ Name
+ RwMatFX.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ RwPS2AlphaTest.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexRead.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexturePools.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TexturePools.h
+ Windows
+ Text
+
+
+
+ Name
+ TxdStore.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ TxdStore.h
+ Windows
+ Text
+
+
+
+ Name
+ VisibilityPlugins.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ VisibilityPlugins.h
+ Windows
+ Text
+
+
+
+ Name
+ Date.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Date.h
+ Windows
+ Text
+
+
+
+ Name
+ GenericGameStorage.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ GenericGameStorage.h
+ Windows
+ Text
+
+
+
+ Name
+ MemoryCard.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ MemoryCard.h
+ Windows
+ Text
+
+
+
+ Name
+ PCSave.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ PCSave.h
+ Windows
+ Text
+
+
+
+ Name
+ crossplatform.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ crossplatform.h
+ Windows
+ Text
+
+
+
+ Name
+ events.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ events.h
+ Windows
+ Text
+
+
+
+ Name
+ platform.h
+ Windows
+ Text
+
+
+
+ Name
+ skeleton.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ skeleton.h
+ Windows
+ Text
+
+
+
+ Name
+ resource.h
+ Windows
+ Text
+
+
+
+ Name
+ win.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ win.h
+ Windows
+ Text
+
+
+
+ Name
+ win.rc
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Messages.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Messages.h
+ Windows
+ Text
+
+
+
+ Name
+ Pager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Pager.h
+ Windows
+ Text
+
+
+
+ Name
+ Text.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Text.h
+ Windows
+ Text
+
+
+
+ Name
+ Automobile.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Automobile.h
+ Windows
+ Text
+
+
+
+ Name
+ Bike.h
+ Windows
+ Text
+
+
+
+ Name
+ Boat.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Boat.h
+ Windows
+ Text
+
+
+
+ Name
+ CarGen.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ CarGen.h
+ Windows
+ Text
+
+
+
+ Name
+ Cranes.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Cranes.h
+ Windows
+ Text
+
+
+
+ Name
+ DamageManager.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ DamageManager.h
+ Windows
+ Text
+
+
+
+ Name
+ Door.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Door.h
+ Windows
+ Text
+
+
+
+ Name
+ Floater.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Floater.h
+ Windows
+ Text
+
+
+
+ Name
+ HandlingMgr.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ HandlingMgr.h
+ Windows
+ Text
+
+
+
+ Name
+ Heli.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Heli.h
+ Windows
+ Text
+
+
+
+ Name
+ Plane.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Plane.h
+ Windows
+ Text
+
+
+
+ Name
+ Train.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Train.h
+ Windows
+ Text
+
+
+
+ Name
+ Transmission.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Transmission.h
+ Windows
+ Text
+
+
+
+ Name
+ Vehicle.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Vehicle.h
+ Windows
+ Text
+
+
+
+ Name
+ BulletInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ BulletInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ Explosion.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Explosion.h
+ Windows
+ Text
+
+
+
+ Name
+ ProjectileInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ProjectileInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ ShotInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ ShotInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ Weapon.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ Weapon.h
+ Windows
+ Text
+
+
+
+ Name
+ WeaponEffects.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WeaponEffects.h
+ Windows
+ Text
+
+
+
+ Name
+ WeaponInfo.cpp
+ Windows
+ Text
+ Debug
+
+
+ Name
+ WeaponInfo.h
+ Windows
+ Text
+
+
+
+ Name
+ WeaponType.h
+ Windows
+ Text
+
+
+
+ Name
+ mss32.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ d3d8.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ ddraw.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ dxguid.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ strmiids.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ dinput8.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ winmm.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rwcore.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rpworld.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rpmatfx.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rpskin.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rphanim.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rtbmp.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rtquat.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ rtcharse.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ ole32.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ shell32.lib
+ Windows
+ Library
+ Debug
+
+
+ Name
+ uuid.lib
+ Windows
+ Library
+ Debug
+
+
+
+
+ Name
+ AnimationId.h
+ Windows
+
+
+ Name
+ AnimBlendAssocGroup.cpp
+ Windows
+
+
+ Name
+ AnimBlendAssocGroup.h
+ Windows
+
+
+ Name
+ AnimBlendAssociation.cpp
+ Windows
+
+
+ Name
+ AnimBlendAssociation.h
+ Windows
+
+
+ Name
+ AnimBlendClumpData.cpp
+ Windows
+
+
+ Name
+ AnimBlendClumpData.h
+ Windows
+
+
+ Name
+ AnimBlendHierarchy.cpp
+ Windows
+
+
+ Name
+ AnimBlendHierarchy.h
+ Windows
+
+
+ Name
+ AnimBlendList.h
+ Windows
+
+
+ Name
+ AnimBlendNode.cpp
+ Windows
+
+
+ Name
+ AnimBlendNode.h
+ Windows
+
+
+ Name
+ AnimBlendSequence.cpp
+ Windows
+
+
+ Name
+ AnimBlendSequence.h
+ Windows
+
+
+ Name
+ AnimManager.cpp
+ Windows
+
+
+ Name
+ AnimManager.h
+ Windows
+
+
+ Name
+ Bones.cpp
+ Windows
+
+
+ Name
+ Bones.h
+ Windows
+
+
+ Name
+ CutsceneMgr.cpp
+ Windows
+
+
+ Name
+ CutsceneMgr.h
+ Windows
+
+
+ Name
+ FrameUpdate.cpp
+ Windows
+
+
+ Name
+ RpAnimBlend.cpp
+ Windows
+
+
+ Name
+ RpAnimBlend.h
+ Windows
+
+
+ Name
+ audio_enums.h
+ Windows
+
+
+ Name
+ AudioCollision.cpp
+ Windows
+
+
+ Name
+ AudioCollision.h
+ Windows
+
+
+ Name
+ AudioLogic.cpp
+ Windows
+
+
+ Name
+ AudioManager.cpp
+ Windows
+
+
+ Name
+ AudioManager.h
+ Windows
+
+
+ Name
+ AudioSamples.h
+ Windows
+
+
+ Name
+ AudioScriptObject.cpp
+ Windows
+
+
+ Name
+ AudioScriptObject.h
+ Windows
+
+
+ Name
+ DMAudio.cpp
+ Windows
+
+
+ Name
+ DMAudio.h
+ Windows
+
+
+ Name
+ MusicManager.cpp
+ Windows
+
+
+ Name
+ MusicManager.h
+ Windows
+
+
+ Name
+ PolRadio.cpp
+ Windows
+
+
+ Name
+ PolRadio.h
+ Windows
+
+
+ Name
+ sampman.h
+ Windows
+
+
+ Name
+ sampman_miles.cpp
+ Windows
+
+
+ Name
+ soundlist.h
+ Windows
+
+
+ Name
+ eax.h
+ Windows
+
+
+ Name
+ eax-util.cpp
+ Windows
+
+
+ Name
+ eax-util.h
+ Windows
+
+
+ Name
+ Building.cpp
+ Windows
+
+
+ Name
+ Building.h
+ Windows
+
+
+ Name
+ Solid.h
+ Windows
+
+
+ Name
+ Treadable.cpp
+ Windows
+
+
+ Name
+ Treadable.h
+ Windows
+
+
+ Name
+ ColBox.cpp
+ Windows
+
+
+ Name
+ ColBox.h
+ Windows
+
+
+ Name
+ ColLine.cpp
+ Windows
+
+
+ Name
+ ColLine.h
+ Windows
+
+
+ Name
+ Collision.cpp
+ Windows
+
+
+ Name
+ Collision.h
+ Windows
+
+
+ Name
+ ColModel.cpp
+ Windows
+
+
+ Name
+ ColModel.h
+ Windows
+
+
+ Name
+ ColPoint.cpp
+ Windows
+
+
+ Name
+ ColPoint.h
+ Windows
+
+
+ Name
+ ColSphere.cpp
+ Windows
+
+
+ Name
+ ColSphere.h
+ Windows
+
+
+ Name
+ ColTriangle.cpp
+ Windows
+
+
+ Name
+ ColTriangle.h
+ Windows
+
+
+ Name
+ CompressedVector.h
+ Windows
+
+
+ Name
+ TempColModels.cpp
+ Windows
+
+
+ Name
+ TempColModels.h
+ Windows
+
+
+ Name
+ VuCollision.cpp
+ Windows
+
+
+ Name
+ VuCollision.h
+ Windows
+
+
+ Name
+ AutoPilot.cpp
+ Windows
+
+
+ Name
+ AutoPilot.h
+ Windows
+
+
+ Name
+ Bridge.cpp
+ Windows
+
+
+ Name
+ Bridge.h
+ Windows
+
+
+ Name
+ CarAI.cpp
+ Windows
+
+
+ Name
+ CarAI.h
+ Windows
+
+
+ Name
+ CarCtrl.cpp
+ Windows
+
+
+ Name
+ CarCtrl.h
+ Windows
+
+
+ Name
+ Curves.cpp
+ Windows
+
+
+ Name
+ Curves.h
+ Windows
+
+
+ Name
+ Darkel.cpp
+ Windows
+
+
+ Name
+ Darkel.h
+ Windows
+
+
+ Name
+ GameLogic.cpp
+ Windows
+
+
+ Name
+ GameLogic.h
+ Windows
+
+
+ Name
+ Garages.cpp
+ Windows
+
+
+ Name
+ Garages.h
+ Windows
+
+
+ Name
+ NameGrid.cpp
+ Windows
+
+
+ Name
+ NameGrid.h
+ Windows
+
+
+ Name
+ OnscreenTimer.cpp
+ Windows
+
+
+ Name
+ OnscreenTimer.h
+ Windows
+
+
+ Name
+ PathFind.cpp
+ Windows
+
+
+ Name
+ PathFind.h
+ Windows
+
+
+ Name
+ Phones.cpp
+ Windows
+
+
+ Name
+ Phones.h
+ Windows
+
+
+ Name
+ Pickups.cpp
+ Windows
+
+
+ Name
+ Pickups.h
+ Windows
+
+
+ Name
+ PowerPoints.cpp
+ Windows
+
+
+ Name
+ PowerPoints.h
+ Windows
+
+
+ Name
+ Record.cpp
+ Windows
+
+
+ Name
+ Record.h
+ Windows
+
+
+ Name
+ Remote.cpp
+ Windows
+
+
+ Name
+ Remote.h
+ Windows
+
+
+ Name
+ Replay.cpp
+ Windows
+
+
+ Name
+ Replay.h
+ Windows
+
+
+ Name
+ Restart.cpp
+ Windows
+
+
+ Name
+ Restart.h
+ Windows
+
+
+ Name
+ RoadBlocks.cpp
+ Windows
+
+
+ Name
+ RoadBlocks.h
+ Windows
+
+
+ Name
+ SceneEdit.cpp
+ Windows
+
+
+ Name
+ SceneEdit.h
+ Windows
+
+
+ Name
+ ScriptDebug.cpp
+ Windows
+
+
+ Name
+ Script.cpp
+ Windows
+
+
+ Name
+ Script.h
+ Windows
+
+
+ Name
+ Script2.cpp
+ Windows
+
+
+ Name
+ Script3.cpp
+ Windows
+
+
+ Name
+ Script4.cpp
+ Windows
+
+
+ Name
+ Script5.cpp
+ Windows
+
+
+ Name
+ Script6.cpp
+ Windows
+
+
+ Name
+ ScriptCommands.h
+ Windows
+
+
+ Name
+ TrafficLights.cpp
+ Windows
+
+
+ Name
+ TrafficLights.h
+ Windows
+
+
+ Name
+ Accident.cpp
+ Windows
+
+
+ Name
+ Accident.h
+ Windows
+
+
+ Name
+ AnimViewer.cpp
+ Windows
+
+
+ Name
+ AnimViewer.h
+ Windows
+
+
+ Name
+ Cam.cpp
+ Windows
+
+
+ Name
+ Camera.cpp
+ Windows
+
+
+ Name
+ Camera.h
+ Windows
+
+
+ Name
+ CdStream.cpp
+ Windows
+
+
+ Name
+ CdStream.h
+ Windows
+
+
+ Name
+ CdStreamPosix.cpp
+ Windows
+
+
+ Name
+ Clock.cpp
+ Windows
+
+
+ Name
+ Clock.h
+ Windows
+
+
+ Name
+ common.h
+ Windows
+
+
+ Name
+ config.h
+ Windows
+
+
+ Name
+ ControllerConfig.cpp
+ Windows
+
+
+ Name
+ ControllerConfig.h
+ Windows
+
+
+ Name
+ Crime.h
+ Windows
+
+
+ Name
+ Debug.cpp
+ Windows
+
+
+ Name
+ Debug.h
+ Windows
+
+
+ Name
+ Directory.cpp
+ Windows
+
+
+ Name
+ Directory.h
+ Windows
+
+
+ Name
+ EventList.cpp
+ Windows
+
+
+ Name
+ EventList.h
+ Windows
+
+
+ Name
+ FileLoader.cpp
+ Windows
+
+
+ Name
+ FileLoader.h
+ Windows
+
+
+ Name
+ FileMgr.cpp
+ Windows
+
+
+ Name
+ FileMgr.h
+ Windows
+
+
+ Name
+ Fire.cpp
+ Windows
+
+
+ Name
+ Fire.h
+ Windows
+
+
+ Name
+ Frontend.cpp
+ Windows
+
+
+ Name
+ Frontend.h
+ Windows
+
+
+ Name
+ Frontend_PS2.cpp
+ Windows
+
+
+ Name
+ Frontend_PS2.h
+ Windows
+
+
+ Name
+ FrontEndControls.cpp
+ Windows
+
+
+ Name
+ FrontEndControls.h
+ Windows
+
+
+ Name
+ FrontendTriggers.h
+ Windows
+
+
+ Name
+ Game.cpp
+ Windows
+
+
+ Name
+ Game.h
+ Windows
+
+
+ Name
+ General.h
+ Windows
+
+
+ Name
+ IniFile.cpp
+ Windows
+
+
+ Name
+ IniFile.h
+ Windows
+
+
+ Name
+ Lists.cpp
+ Windows
+
+
+ Name
+ Lists.h
+ Windows
+
+
+ Name
+ main.cpp
+ Windows
+
+
+ Name
+ main.h
+ Windows
+
+
+ Name
+ MenuScreens.cpp
+ Windows
+
+
+ Name
+ MenuScreensCustom.cpp
+ Windows
+
+
+ Name
+ obrstr.cpp
+ Windows
+
+
+ Name
+ obrstr.h
+ Windows
+
+
+ Name
+ Pad.cpp
+ Windows
+
+
+ Name
+ Pad.h
+ Windows
+
+
+ Name
+ Placeable.cpp
+ Windows
+
+
+ Name
+ Placeable.h
+ Windows
+
+
+ Name
+ PlayerInfo.cpp
+ Windows
+
+
+ Name
+ PlayerInfo.h
+ Windows
+
+
+ Name
+ Pools.cpp
+ Windows
+
+
+ Name
+ Pools.h
+ Windows
+
+
+ Name
+ Profile.cpp
+ Windows
+
+
+ Name
+ Profile.h
+ Windows
+
+
+ Name
+ Radar.cpp
+ Windows
+
+
+ Name
+ Radar.h
+ Windows
+
+
+ Name
+ Range2D.cpp
+ Windows
+
+
+ Name
+ Range2D.h
+ Windows
+
+
+ Name
+ Range3D.cpp
+ Windows
+
+
+ Name
+ Range3D.h
+ Windows
+
+
+ Name
+ re3.cpp
+ Windows
+
+
+ Name
+ References.cpp
+ Windows
+
+
+ Name
+ References.h
+ Windows
+
+
+ Name
+ Stats.cpp
+ Windows
+
+
+ Name
+ Stats.h
+ Windows
+
+
+ Name
+ Streaming.cpp
+ Windows
+
+
+ Name
+ Streaming.h
+ Windows
+
+
+ Name
+ SurfaceTable.cpp
+ Windows
+
+
+ Name
+ SurfaceTable.h
+ Windows
+
+
+ Name
+ templates.h
+ Windows
+
+
+ Name
+ timebars.cpp
+ Windows
+
+
+ Name
+ timebars.h
+ Windows
+
+
+ Name
+ Timer.cpp
+ Windows
+
+
+ Name
+ Timer.h
+ Windows
+
+
+ Name
+ TimeStep.cpp
+ Windows
+
+
+ Name
+ TimeStep.h
+ Windows
+
+
+ Name
+ User.cpp
+ Windows
+
+
+ Name
+ User.h
+ Windows
+
+
+ Name
+ Wanted.cpp
+ Windows
+
+
+ Name
+ Wanted.h
+ Windows
+
+
+ Name
+ World.cpp
+ Windows
+
+
+ Name
+ World.h
+ Windows
+
+
+ Name
+ ZoneCull.cpp
+ Windows
+
+
+ Name
+ ZoneCull.h
+ Windows
+
+
+ Name
+ Zones.cpp
+ Windows
+
+
+ Name
+ Zones.h
+ Windows
+
+
+ Name
+ Dummy.cpp
+ Windows
+
+
+ Name
+ Dummy.h
+ Windows
+
+
+ Name
+ Entity.cpp
+ Windows
+
+
+ Name
+ Entity.h
+ Windows
+
+
+ Name
+ Physical.cpp
+ Windows
+
+
+ Name
+ Physical.h
+ Windows
+
+
+ Name
+ math.cpp
+ Windows
+
+
+ Name
+ maths.h
+ Windows
+
+
+ Name
+ Matrix.cpp
+ Windows
+
+
+ Name
+ Matrix.h
+ Windows
+
+
+ Name
+ Quaternion.cpp
+ Windows
+
+
+ Name
+ Quaternion.h
+ Windows
+
+
+ Name
+ Rect.cpp
+ Windows
+
+
+ Name
+ Rect.h
+ Windows
+
+
+ Name
+ Vector.cpp
+ Windows
+
+
+ Name
+ Vector.h
+ Windows
+
+
+ Name
+ Vector2D.h
+ Windows
+
+
+ Name
+ VuVector.h
+ Windows
+
+
+ Name
+ BaseModelInfo.cpp
+ Windows
+
+
+ Name
+ BaseModelInfo.h
+ Windows
+
+
+ Name
+ ClumpModelInfo.cpp
+ Windows
+
+
+ Name
+ ClumpModelInfo.h
+ Windows
+
+
+ Name
+ MloModelInfo.cpp
+ Windows
+
+
+ Name
+ MloModelInfo.h
+ Windows
+
+
+ Name
+ ModelIndices.cpp
+ Windows
+
+
+ Name
+ ModelIndices.h
+ Windows
+
+
+ Name
+ ModelInfo.cpp
+ Windows
+
+
+ Name
+ ModelInfo.h
+ Windows
+
+
+ Name
+ PedModelInfo.cpp
+ Windows
+
+
+ Name
+ PedModelInfo.h
+ Windows
+
+
+ Name
+ SimpleModelInfo.cpp
+ Windows
+
+
+ Name
+ SimpleModelInfo.h
+ Windows
+
+
+ Name
+ TimeModelInfo.cpp
+ Windows
+
+
+ Name
+ TimeModelInfo.h
+ Windows
+
+
+ Name
+ VehicleModelInfo.cpp
+ Windows
+
+
+ Name
+ VehicleModelInfo.h
+ Windows
+
+
+ Name
+ XtraCompsModelInfo.h
+ Windows
+
+
+ Name
+ CutsceneHead.cpp
+ Windows
+
+
+ Name
+ CutsceneHead.h
+ Windows
+
+
+ Name
+ CutsceneObject.cpp
+ Windows
+
+
+ Name
+ CutsceneObject.h
+ Windows
+
+
+ Name
+ DummyObject.cpp
+ Windows
+
+
+ Name
+ DummyObject.h
+ Windows
+
+
+ Name
+ Object.cpp
+ Windows
+
+
+ Name
+ Object.h
+ Windows
+
+
+ Name
+ ObjectData.cpp
+ Windows
+
+
+ Name
+ ObjectData.h
+ Windows
+
+
+ Name
+ ParticleObject.cpp
+ Windows
+
+
+ Name
+ ParticleObject.h
+ Windows
+
+
+ Name
+ Projectile.cpp
+ Windows
+
+
+ Name
+ Projectile.h
+ Windows
+
+
+ Name
+ CivilianPed.cpp
+ Windows
+
+
+ Name
+ CivilianPed.h
+ Windows
+
+
+ Name
+ CopPed.cpp
+ Windows
+
+
+ Name
+ CopPed.h
+ Windows
+
+
+ Name
+ DummyPed.h
+ Windows
+
+
+ Name
+ EmergencyPed.cpp
+ Windows
+
+
+ Name
+ EmergencyPed.h
+ Windows
+
+
+ Name
+ Gangs.cpp
+ Windows
+
+
+ Name
+ Gangs.h
+ Windows
+
+
+ Name
+ Ped.cpp
+ Windows
+
+
+ Name
+ Ped.h
+ Windows
+
+
+ Name
+ PedAI.cpp
+ Windows
+
+
+ Name
+ PedChat.cpp
+ Windows
+
+
+ Name
+ PedDebug.cpp
+ Windows
+
+
+ Name
+ PedFight.cpp
+ Windows
+
+
+ Name
+ PedIK.cpp
+ Windows
+
+
+ Name
+ PedIK.h
+ Windows
+
+
+ Name
+ PedPlacement.cpp
+ Windows
+
+
+ Name
+ PedPlacement.h
+ Windows
+
+
+ Name
+ PedRoutes.cpp
+ Windows
+
+
+ Name
+ PedRoutes.h
+ Windows
+
+
+ Name
+ PedType.cpp
+ Windows
+
+
+ Name
+ PedType.h
+ Windows
+
+
+ Name
+ PlayerPed.cpp
+ Windows
+
+
+ Name
+ PlayerPed.h
+ Windows
+
+
+ Name
+ Population.cpp
+ Windows
+
+
+ Name
+ Population.h
+ Windows
+
+
+ Name
+ 2dEffect.h
+ Windows
+
+
+ Name
+ Antennas.cpp
+ Windows
+
+
+ Name
+ Antennas.h
+ Windows
+
+
+ Name
+ Clouds.cpp
+ Windows
+
+
+ Name
+ Clouds.h
+ Windows
+
+
+ Name
+ Console.cpp
+ Windows
+
+
+ Name
+ Console.h
+ Windows
+
+
+ Name
+ Coronas.cpp
+ Windows
+
+
+ Name
+ Coronas.h
+ Windows
+
+
+ Name
+ Credits.cpp
+ Windows
+
+
+ Name
+ Credits.h
+ Windows
+
+
+ Name
+ Draw.cpp
+ Windows
+
+
+ Name
+ Draw.h
+ Windows
+
+
+ Name
+ Fluff.cpp
+ Windows
+
+
+ Name
+ Fluff.h
+ Windows
+
+
+ Name
+ Font.cpp
+ Windows
+
+
+ Name
+ Font.h
+ Windows
+
+
+ Name
+ Glass.cpp
+ Windows
+
+
+ Name
+ Glass.h
+ Windows
+
+
+ Name
+ Hud.cpp
+ Windows
+
+
+ Name
+ Hud.h
+ Windows
+
+
+ Name
+ Instance.cpp
+ Windows
+
+
+ Name
+ Instance.h
+ Windows
+
+
+ Name
+ Lines.cpp
+ Windows
+
+
+ Name
+ Lines.h
+ Windows
+
+
+ Name
+ MBlur.cpp
+ Windows
+
+
+ Name
+ MBlur.h
+ Windows
+
+
+ Name
+ Particle.cpp
+ Windows
+
+
+ Name
+ Particle.h
+ Windows
+
+
+ Name
+ ParticleMgr.cpp
+ Windows
+
+
+ Name
+ ParticleMgr.h
+ Windows
+
+
+ Name
+ ParticleType.h
+ Windows
+
+
+ Name
+ PlayerSkin.cpp
+ Windows
+
+
+ Name
+ PlayerSkin.h
+ Windows
+
+
+ Name
+ PointLights.cpp
+ Windows
+
+
+ Name
+ PointLights.h
+ Windows
+
+
+ Name
+ RenderBuffer.cpp
+ Windows
+
+
+ Name
+ RenderBuffer.h
+ Windows
+
+
+ Name
+ Renderer.cpp
+ Windows
+
+
+ Name
+ Renderer.h
+ Windows
+
+
+ Name
+ Rubbish.cpp
+ Windows
+
+
+ Name
+ Rubbish.h
+ Windows
+
+
+ Name
+ Shadows.cpp
+ Windows
+
+
+ Name
+ Shadows.h
+ Windows
+
+
+ Name
+ Skidmarks.cpp
+ Windows
+
+
+ Name
+ Skidmarks.h
+ Windows
+
+
+ Name
+ SpecialFX.cpp
+ Windows
+
+
+ Name
+ SpecialFX.h
+ Windows
+
+
+ Name
+ Sprite.cpp
+ Windows
+
+
+ Name
+ Sprite.h
+ Windows
+
+
+ Name
+ Sprite2d.cpp
+ Windows
+
+
+ Name
+ Sprite2d.h
+ Windows
+
+
+ Name
+ TexList.cpp
+ Windows
+
+
+ Name
+ TexList.h
+ Windows
+
+
+ Name
+ Timecycle.cpp
+ Windows
+
+
+ Name
+ Timecycle.h
+ Windows
+
+
+ Name
+ WaterCannon.cpp
+ Windows
+
+
+ Name
+ WaterCannon.h
+ Windows
+
+
+ Name
+ WaterLevel.cpp
+ Windows
+
+
+ Name
+ WaterLevel.h
+ Windows
+
+
+ Name
+ Weather.cpp
+ Windows
+
+
+ Name
+ Weather.h
+ Windows
+
+
+ Name
+ ClumpRead.cpp
+ Windows
+
+
+ Name
+ Lights.cpp
+ Windows
+
+
+ Name
+ Lights.h
+ Windows
+
+
+ Name
+ MemoryHeap.cpp
+ Windows
+
+
+ Name
+ MemoryHeap.h
+ Windows
+
+
+ Name
+ MemoryMgr.cpp
+ Windows
+
+
+ Name
+ MemoryMgr.h
+ Windows
+
+
+ Name
+ NodeName.cpp
+ Windows
+
+
+ Name
+ NodeName.h
+ Windows
+
+
+ Name
+ RwHelper.cpp
+ Windows
+
+
+ Name
+ RwHelper.h
+ Windows
+
+
+ Name
+ RwMatFX.cpp
+ Windows
+
+
+ Name
+ RwPS2AlphaTest.cpp
+ Windows
+
+
+ Name
+ TexRead.cpp
+ Windows
+
+
+ Name
+ TexturePools.cpp
+ Windows
+
+
+ Name
+ TexturePools.h
+ Windows
+
+
+ Name
+ TxdStore.cpp
+ Windows
+
+
+ Name
+ TxdStore.h
+ Windows
+
+
+ Name
+ VisibilityPlugins.cpp
+ Windows
+
+
+ Name
+ VisibilityPlugins.h
+ Windows
+
+
+ Name
+ Date.cpp
+ Windows
+
+
+ Name
+ Date.h
+ Windows
+
+
+ Name
+ GenericGameStorage.cpp
+ Windows
+
+
+ Name
+ GenericGameStorage.h
+ Windows
+
+
+ Name
+ MemoryCard.cpp
+ Windows
+
+
+ Name
+ MemoryCard.h
+ Windows
+
+
+ Name
+ PCSave.cpp
+ Windows
+
+
+ Name
+ PCSave.h
+ Windows
+
+
+ Name
+ crossplatform.cpp
+ Windows
+
+
+ Name
+ crossplatform.h
+ Windows
+
+
+ Name
+ events.cpp
+ Windows
+
+
+ Name
+ events.h
+ Windows
+
+
+ Name
+ platform.h
+ Windows
+
+
+ Name
+ skeleton.cpp
+ Windows
+
+
+ Name
+ skeleton.h
+ Windows
+
+
+ Name
+ resource.h
+ Windows
+
+
+ Name
+ win.cpp
+ Windows
+
+
+ Name
+ win.h
+ Windows
+
+
+ Name
+ win.rc
+ Windows
+
+
+ Name
+ Messages.cpp
+ Windows
+
+
+ Name
+ Messages.h
+ Windows
+
+
+ Name
+ Pager.cpp
+ Windows
+
+
+ Name
+ Pager.h
+ Windows
+
+
+ Name
+ Text.cpp
+ Windows
+
+
+ Name
+ Text.h
+ Windows
+
+
+ Name
+ Automobile.cpp
+ Windows
+
+
+ Name
+ Automobile.h
+ Windows
+
+
+ Name
+ Bike.h
+ Windows
+
+
+ Name
+ Boat.cpp
+ Windows
+
+
+ Name
+ Boat.h
+ Windows
+
+
+ Name
+ CarGen.cpp
+ Windows
+
+
+ Name
+ CarGen.h
+ Windows
+
+
+ Name
+ Cranes.cpp
+ Windows
+
+
+ Name
+ Cranes.h
+ Windows
+
+
+ Name
+ DamageManager.cpp
+ Windows
+
+
+ Name
+ DamageManager.h
+ Windows
+
+
+ Name
+ Door.cpp
+ Windows
+
+
+ Name
+ Door.h
+ Windows
+
+
+ Name
+ Floater.cpp
+ Windows
+
+
+ Name
+ Floater.h
+ Windows
+
+
+ Name
+ HandlingMgr.cpp
+ Windows
+
+
+ Name
+ HandlingMgr.h
+ Windows
+
+
+ Name
+ Heli.cpp
+ Windows
+
+
+ Name
+ Heli.h
+ Windows
+
+
+ Name
+ Plane.cpp
+ Windows
+
+
+ Name
+ Plane.h
+ Windows
+
+
+ Name
+ Train.cpp
+ Windows
+
+
+ Name
+ Train.h
+ Windows
+
+
+ Name
+ Transmission.cpp
+ Windows
+
+
+ Name
+ Transmission.h
+ Windows
+
+
+ Name
+ Vehicle.cpp
+ Windows
+
+
+ Name
+ Vehicle.h
+ Windows
+
+
+ Name
+ BulletInfo.cpp
+ Windows
+
+
+ Name
+ BulletInfo.h
+ Windows
+
+
+ Name
+ Explosion.cpp
+ Windows
+
+
+ Name
+ Explosion.h
+ Windows
+
+
+ Name
+ ProjectileInfo.cpp
+ Windows
+
+
+ Name
+ ProjectileInfo.h
+ Windows
+
+
+ Name
+ ShotInfo.cpp
+ Windows
+
+
+ Name
+ ShotInfo.h
+ Windows
+
+
+ Name
+ Weapon.cpp
+ Windows
+
+
+ Name
+ Weapon.h
+ Windows
+
+
+ Name
+ WeaponEffects.cpp
+ Windows
+
+
+ Name
+ WeaponEffects.h
+ Windows
+
+
+ Name
+ WeaponInfo.cpp
+ Windows
+
+
+ Name
+ WeaponInfo.h
+ Windows
+
+
+ Name
+ WeaponType.h
+ Windows
+
+
+ Name
+ mss32.lib
+ Windows
+
+
+ Name
+ d3d8.lib
+ Windows
+
+
+ Name
+ ddraw.lib
+ Windows
+
+
+ Name
+ dxguid.lib
+ Windows
+
+
+ Name
+ strmiids.lib
+ Windows
+
+
+ Name
+ dinput8.lib
+ Windows
+
+
+ Name
+ winmm.lib
+ Windows
+
+
+ Name
+ rwcore.lib
+ Windows
+
+
+ Name
+ rpworld.lib
+ Windows
+
+
+ Name
+ rpmatfx.lib
+ Windows
+
+
+ Name
+ rpskin.lib
+ Windows
+
+
+ Name
+ rphanim.lib
+ Windows
+
+
+ Name
+ rtbmp.lib
+ Windows
+
+
+ Name
+ rtquat.lib
+ Windows
+
+
+ Name
+ rtcharse.lib
+ Windows
+
+
+ Name
+ MSL_All_x86.lib
+ MacOS
+
+
+ Name
+ Comdlg32.lib
+ MacOS
+
+
+ Name
+ Gdi32.lib
+ MacOS
+
+
+ Name
+ Kernel32.lib
+ MacOS
+
+
+ Name
+ User32.lib
+ MacOS
+
+
+ Name
+ ole32.lib
+ Windows
+
+
+ Name
+ shell32.lib
+ Windows
+
+
+ Name
+ uuid.lib
+ Windows
+
+
+
+
+
+
+ Debug
+ Release
+
+
+
+ animation
+
+ Debug
+ Name
+ AnimationId.h
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendAssocGroup.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendAssocGroup.h
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendAssociation.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendAssociation.h
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendClumpData.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendClumpData.h
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendHierarchy.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendHierarchy.h
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendList.h
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendNode.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendNode.h
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendSequence.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimBlendSequence.h
+ Windows
+
+
+ Debug
+ Name
+ AnimManager.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimManager.h
+ Windows
+
+
+ Debug
+ Name
+ Bones.cpp
+ Windows
+
+
+ Debug
+ Name
+ Bones.h
+ Windows
+
+
+ Debug
+ Name
+ CutsceneMgr.cpp
+ Windows
+
+
+ Debug
+ Name
+ CutsceneMgr.h
+ Windows
+
+
+ Debug
+ Name
+ FrameUpdate.cpp
+ Windows
+
+
+ Debug
+ Name
+ RpAnimBlend.cpp
+ Windows
+
+
+ Debug
+ Name
+ RpAnimBlend.h
+ Windows
+
+
+ audio
+
+ Debug
+ Name
+ audio_enums.h
+ Windows
+
+
+ Debug
+ Name
+ AudioCollision.cpp
+ Windows
+
+
+ Debug
+ Name
+ AudioCollision.h
+ Windows
+
+
+ Debug
+ Name
+ AudioLogic.cpp
+ Windows
+
+
+ Debug
+ Name
+ AudioManager.cpp
+ Windows
+
+
+ Debug
+ Name
+ AudioManager.h
+ Windows
+
+
+ Debug
+ Name
+ AudioSamples.h
+ Windows
+
+
+ Debug
+ Name
+ AudioScriptObject.cpp
+ Windows
+
+
+ Debug
+ Name
+ AudioScriptObject.h
+ Windows
+
+
+ Debug
+ Name
+ DMAudio.cpp
+ Windows
+
+
+ Debug
+ Name
+ DMAudio.h
+ Windows
+
+
+ Debug
+ Name
+ MusicManager.cpp
+ Windows
+
+
+ Debug
+ Name
+ MusicManager.h
+ Windows
+
+
+ Release
+ Name
+ PolRadio.cpp
+ Windows
+
+
+ Release
+ Name
+ PolRadio.h
+ Windows
+
+
+ Debug
+ Name
+ sampman.h
+ Windows
+
+
+ Debug
+ Name
+ sampman_miles.cpp
+ Windows
+
+
+ Debug
+ Name
+ soundlist.h
+ Windows
+
+
+ Debug
+ Name
+ eax.h
+ Windows
+
+
+ Debug
+ Name
+ eax-util.cpp
+ Windows
+
+
+ Debug
+ Name
+ eax-util.h
+ Windows
+
+
+ buildings
+
+ Debug
+ Name
+ Building.cpp
+ Windows
+
+
+ Debug
+ Name
+ Building.h
+ Windows
+
+
+ Debug
+ Name
+ Solid.h
+ Windows
+
+
+ Debug
+ Name
+ Treadable.cpp
+ Windows
+
+
+ Debug
+ Name
+ Treadable.h
+ Windows
+
+
+ collision
+
+ Debug
+ Name
+ ColBox.cpp
+ Windows
+
+
+ Debug
+ Name
+ ColBox.h
+ Windows
+
+
+ Debug
+ Name
+ ColLine.cpp
+ Windows
+
+
+ Debug
+ Name
+ ColLine.h
+ Windows
+
+
+ Debug
+ Name
+ Collision.cpp
+ Windows
+
+
+ Debug
+ Name
+ Collision.h
+ Windows
+
+
+ Debug
+ Name
+ ColModel.cpp
+ Windows
+
+
+ Debug
+ Name
+ ColModel.h
+ Windows
+
+
+ Debug
+ Name
+ ColPoint.cpp
+ Windows
+
+
+ Debug
+ Name
+ ColPoint.h
+ Windows
+
+
+ Debug
+ Name
+ ColSphere.cpp
+ Windows
+
+
+ Debug
+ Name
+ ColSphere.h
+ Windows
+
+
+ Debug
+ Name
+ ColTriangle.cpp
+ Windows
+
+
+ Debug
+ Name
+ ColTriangle.h
+ Windows
+
+
+ Debug
+ Name
+ CompressedVector.h
+ Windows
+
+
+ Debug
+ Name
+ TempColModels.cpp
+ Windows
+
+
+ Debug
+ Name
+ TempColModels.h
+ Windows
+
+
+ Debug
+ Name
+ VuCollision.cpp
+ Windows
+
+
+ Debug
+ Name
+ VuCollision.h
+ Windows
+
+
+ control
+
+ Debug
+ Name
+ AutoPilot.cpp
+ Windows
+
+
+ Debug
+ Name
+ AutoPilot.h
+ Windows
+
+
+ Debug
+ Name
+ Bridge.cpp
+ Windows
+
+
+ Debug
+ Name
+ Bridge.h
+ Windows
+
+
+ Debug
+ Name
+ CarAI.cpp
+ Windows
+
+
+ Debug
+ Name
+ CarAI.h
+ Windows
+
+
+ Debug
+ Name
+ CarCtrl.cpp
+ Windows
+
+
+ Debug
+ Name
+ CarCtrl.h
+ Windows
+
+
+ Debug
+ Name
+ Curves.cpp
+ Windows
+
+
+ Debug
+ Name
+ Curves.h
+ Windows
+
+
+ Debug
+ Name
+ Darkel.cpp
+ Windows
+
+
+ Debug
+ Name
+ Darkel.h
+ Windows
+
+
+ Debug
+ Name
+ GameLogic.cpp
+ Windows
+
+
+ Debug
+ Name
+ GameLogic.h
+ Windows
+
+
+ Debug
+ Name
+ Garages.cpp
+ Windows
+
+
+ Debug
+ Name
+ Garages.h
+ Windows
+
+
+ Debug
+ Name
+ NameGrid.cpp
+ Windows
+
+
+ Debug
+ Name
+ NameGrid.h
+ Windows
+
+
+ Debug
+ Name
+ OnscreenTimer.cpp
+ Windows
+
+
+ Debug
+ Name
+ OnscreenTimer.h
+ Windows
+
+
+ Debug
+ Name
+ PathFind.cpp
+ Windows
+
+
+ Debug
+ Name
+ PathFind.h
+ Windows
+
+
+ Debug
+ Name
+ Phones.cpp
+ Windows
+
+
+ Debug
+ Name
+ Phones.h
+ Windows
+
+
+ Debug
+ Name
+ Pickups.cpp
+ Windows
+
+
+ Debug
+ Name
+ Pickups.h
+ Windows
+
+
+ Debug
+ Name
+ PowerPoints.cpp
+ Windows
+
+
+ Debug
+ Name
+ PowerPoints.h
+ Windows
+
+
+ Debug
+ Name
+ Record.cpp
+ Windows
+
+
+ Debug
+ Name
+ Record.h
+ Windows
+
+
+ Debug
+ Name
+ Remote.cpp
+ Windows
+
+
+ Debug
+ Name
+ Remote.h
+ Windows
+
+
+ Debug
+ Name
+ Replay.cpp
+ Windows
+
+
+ Debug
+ Name
+ Replay.h
+ Windows
+
+
+ Debug
+ Name
+ Restart.cpp
+ Windows
+
+
+ Debug
+ Name
+ Restart.h
+ Windows
+
+
+ Debug
+ Name
+ RoadBlocks.cpp
+ Windows
+
+
+ Debug
+ Name
+ RoadBlocks.h
+ Windows
+
+
+ Debug
+ Name
+ SceneEdit.cpp
+ Windows
+
+
+ Debug
+ Name
+ SceneEdit.h
+ Windows
+
+
+ Debug
+ Name
+ ScriptDebug.cpp
+ Windows
+
+
+ Debug
+ Name
+ Script.cpp
+ Windows
+
+
+ Debug
+ Name
+ Script.h
+ Windows
+
+
+ Debug
+ Name
+ Script2.cpp
+ Windows
+
+
+ Debug
+ Name
+ Script3.cpp
+ Windows
+
+
+ Debug
+ Name
+ Script4.cpp
+ Windows
+
+
+ Debug
+ Name
+ Script5.cpp
+ Windows
+
+
+ Debug
+ Name
+ Script6.cpp
+ Windows
+
+
+ Debug
+ Name
+ ScriptCommands.h
+ Windows
+
+
+ Debug
+ Name
+ TrafficLights.cpp
+ Windows
+
+
+ Debug
+ Name
+ TrafficLights.h
+ Windows
+
+
+ core
+
+ Debug
+ Name
+ Accident.cpp
+ Windows
+
+
+ Debug
+ Name
+ Accident.h
+ Windows
+
+
+ Debug
+ Name
+ AnimViewer.cpp
+ Windows
+
+
+ Debug
+ Name
+ AnimViewer.h
+ Windows
+
+
+ Debug
+ Name
+ Cam.cpp
+ Windows
+
+
+ Debug
+ Name
+ Camera.cpp
+ Windows
+
+
+ Debug
+ Name
+ Camera.h
+ Windows
+
+
+ Debug
+ Name
+ CdStream.cpp
+ Windows
+
+
+ Debug
+ Name
+ CdStream.h
+ Windows
+
+
+ Debug
+ Name
+ CdStreamPosix.cpp
+ Windows
+
+
+ Debug
+ Name
+ Clock.cpp
+ Windows
+
+
+ Debug
+ Name
+ Clock.h
+ Windows
+
+
+ Debug
+ Name
+ common.h
+ Windows
+
+
+ Debug
+ Name
+ config.h
+ Windows
+
+
+ Debug
+ Name
+ ControllerConfig.cpp
+ Windows
+
+
+ Debug
+ Name
+ ControllerConfig.h
+ Windows
+
+
+ Debug
+ Name
+ Crime.h
+ Windows
+
+
+ Debug
+ Name
+ Debug.cpp
+ Windows
+
+
+ Debug
+ Name
+ Debug.h
+ Windows
+
+
+ Debug
+ Name
+ Directory.cpp
+ Windows
+
+
+ Debug
+ Name
+ Directory.h
+ Windows
+
+
+ Debug
+ Name
+ EventList.cpp
+ Windows
+
+
+ Debug
+ Name
+ EventList.h
+ Windows
+
+
+ Debug
+ Name
+ FileLoader.cpp
+ Windows
+
+
+ Debug
+ Name
+ FileLoader.h
+ Windows
+
+
+ Debug
+ Name
+ FileMgr.cpp
+ Windows
+
+
+ Debug
+ Name
+ FileMgr.h
+ Windows
+
+
+ Debug
+ Name
+ Fire.cpp
+ Windows
+
+
+ Debug
+ Name
+ Fire.h
+ Windows
+
+
+ Debug
+ Name
+ Frontend.cpp
+ Windows
+
+
+ Debug
+ Name
+ Frontend.h
+ Windows
+
+
+ Debug
+ Name
+ Frontend_PS2.cpp
+ Windows
+
+
+ Debug
+ Name
+ Frontend_PS2.h
+ Windows
+
+
+ Debug
+ Name
+ FrontEndControls.cpp
+ Windows
+
+
+ Debug
+ Name
+ FrontEndControls.h
+ Windows
+
+
+ Debug
+ Name
+ FrontendTriggers.h
+ Windows
+
+
+ Debug
+ Name
+ Game.cpp
+ Windows
+
+
+ Debug
+ Name
+ Game.h
+ Windows
+
+
+ Debug
+ Name
+ General.h
+ Windows
+
+
+ Debug
+ Name
+ IniFile.cpp
+ Windows
+
+
+ Debug
+ Name
+ IniFile.h
+ Windows
+
+
+ Debug
+ Name
+ Lists.cpp
+ Windows
+
+
+ Debug
+ Name
+ Lists.h
+ Windows
+
+
+ Debug
+ Name
+ main.cpp
+ Windows
+
+
+ Debug
+ Name
+ main.h
+ Windows
+
+
+ Debug
+ Name
+ MenuScreens.cpp
+ Windows
+
+
+ Debug
+ Name
+ MenuScreensCustom.cpp
+ Windows
+
+
+ Debug
+ Name
+ obrstr.cpp
+ Windows
+
+
+ Debug
+ Name
+ obrstr.h
+ Windows
+
+
+ Debug
+ Name
+ Pad.cpp
+ Windows
+
+
+ Debug
+ Name
+ Pad.h
+ Windows
+
+
+ Debug
+ Name
+ Placeable.cpp
+ Windows
+
+
+ Debug
+ Name
+ Placeable.h
+ Windows
+
+
+ Debug
+ Name
+ PlayerInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ PlayerInfo.h
+ Windows
+
+
+ Debug
+ Name
+ Pools.cpp
+ Windows
+
+
+ Debug
+ Name
+ Pools.h
+ Windows
+
+
+ Debug
+ Name
+ Profile.cpp
+ Windows
+
+
+ Debug
+ Name
+ Profile.h
+ Windows
+
+
+ Debug
+ Name
+ Radar.cpp
+ Windows
+
+
+ Debug
+ Name
+ Radar.h
+ Windows
+
+
+ Debug
+ Name
+ Range2D.cpp
+ Windows
+
+
+ Debug
+ Name
+ Range2D.h
+ Windows
+
+
+ Debug
+ Name
+ Range3D.cpp
+ Windows
+
+
+ Debug
+ Name
+ Range3D.h
+ Windows
+
+
+ Debug
+ Name
+ re3.cpp
+ Windows
+
+
+ Debug
+ Name
+ References.cpp
+ Windows
+
+
+ Debug
+ Name
+ References.h
+ Windows
+
+
+ Debug
+ Name
+ Stats.cpp
+ Windows
+
+
+ Debug
+ Name
+ Stats.h
+ Windows
+
+
+ Debug
+ Name
+ Streaming.cpp
+ Windows
+
+
+ Debug
+ Name
+ Streaming.h
+ Windows
+
+
+ Debug
+ Name
+ SurfaceTable.cpp
+ Windows
+
+
+ Debug
+ Name
+ SurfaceTable.h
+ Windows
+
+
+ Debug
+ Name
+ templates.h
+ Windows
+
+
+ Debug
+ Name
+ timebars.cpp
+ Windows
+
+
+ Debug
+ Name
+ timebars.h
+ Windows
+
+
+ Debug
+ Name
+ Timer.cpp
+ Windows
+
+
+ Debug
+ Name
+ Timer.h
+ Windows
+
+
+ Debug
+ Name
+ TimeStep.cpp
+ Windows
+
+
+ Debug
+ Name
+ TimeStep.h
+ Windows
+
+
+ Debug
+ Name
+ User.cpp
+ Windows
+
+
+ Debug
+ Name
+ User.h
+ Windows
+
+
+ Debug
+ Name
+ Wanted.cpp
+ Windows
+
+
+ Debug
+ Name
+ Wanted.h
+ Windows
+
+
+ Debug
+ Name
+ World.cpp
+ Windows
+
+
+ Debug
+ Name
+ World.h
+ Windows
+
+
+ Debug
+ Name
+ ZoneCull.cpp
+ Windows
+
+
+ Debug
+ Name
+ ZoneCull.h
+ Windows
+
+
+ Debug
+ Name
+ Zones.cpp
+ Windows
+
+
+ Debug
+ Name
+ Zones.h
+ Windows
+
+
+ entities
+
+ Debug
+ Name
+ Dummy.cpp
+ Windows
+
+
+ Debug
+ Name
+ Dummy.h
+ Windows
+
+
+ Debug
+ Name
+ Entity.cpp
+ Windows
+
+
+ Debug
+ Name
+ Entity.h
+ Windows
+
+
+ Debug
+ Name
+ Physical.cpp
+ Windows
+
+
+ Debug
+ Name
+ Physical.h
+ Windows
+
+
+ extras
+
+ math
+
+ Debug
+ Name
+ math.cpp
+ Windows
+
+
+ Debug
+ Name
+ maths.h
+ Windows
+
+
+ Debug
+ Name
+ Matrix.cpp
+ Windows
+
+
+ Debug
+ Name
+ Matrix.h
+ Windows
+
+
+ Debug
+ Name
+ Quaternion.cpp
+ Windows
+
+
+ Debug
+ Name
+ Quaternion.h
+ Windows
+
+
+ Debug
+ Name
+ Rect.cpp
+ Windows
+
+
+ Debug
+ Name
+ Rect.h
+ Windows
+
+
+ Debug
+ Name
+ Vector.cpp
+ Windows
+
+
+ Debug
+ Name
+ Vector.h
+ Windows
+
+
+ Debug
+ Name
+ Vector2D.h
+ Windows
+
+
+ Debug
+ Name
+ VuVector.h
+ Windows
+
+
+ modelinfo
+
+ Debug
+ Name
+ BaseModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ BaseModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ ClumpModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ ClumpModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ MloModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ MloModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ ModelIndices.cpp
+ Windows
+
+
+ Debug
+ Name
+ ModelIndices.h
+ Windows
+
+
+ Debug
+ Name
+ ModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ ModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ PedModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ SimpleModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ SimpleModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ TimeModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ TimeModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ VehicleModelInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ VehicleModelInfo.h
+ Windows
+
+
+ Debug
+ Name
+ XtraCompsModelInfo.h
+ Windows
+
+
+ objects
+
+ Debug
+ Name
+ CutsceneHead.cpp
+ Windows
+
+
+ Debug
+ Name
+ CutsceneHead.h
+ Windows
+
+
+ Debug
+ Name
+ CutsceneObject.cpp
+ Windows
+
+
+ Debug
+ Name
+ CutsceneObject.h
+ Windows
+
+
+ Debug
+ Name
+ DummyObject.cpp
+ Windows
+
+
+ Debug
+ Name
+ DummyObject.h
+ Windows
+
+
+ Debug
+ Name
+ Object.cpp
+ Windows
+
+
+ Debug
+ Name
+ Object.h
+ Windows
+
+
+ Debug
+ Name
+ ObjectData.cpp
+ Windows
+
+
+ Debug
+ Name
+ ObjectData.h
+ Windows
+
+
+ Debug
+ Name
+ ParticleObject.cpp
+ Windows
+
+
+ Debug
+ Name
+ ParticleObject.h
+ Windows
+
+
+ Debug
+ Name
+ Projectile.cpp
+ Windows
+
+
+ Debug
+ Name
+ Projectile.h
+ Windows
+
+
+ peds
+
+ Debug
+ Name
+ CivilianPed.cpp
+ Windows
+
+
+ Debug
+ Name
+ CivilianPed.h
+ Windows
+
+
+ Debug
+ Name
+ CopPed.cpp
+ Windows
+
+
+ Debug
+ Name
+ CopPed.h
+ Windows
+
+
+ Debug
+ Name
+ DummyPed.h
+ Windows
+
+
+ Debug
+ Name
+ EmergencyPed.cpp
+ Windows
+
+
+ Debug
+ Name
+ EmergencyPed.h
+ Windows
+
+
+ Debug
+ Name
+ Gangs.cpp
+ Windows
+
+
+ Debug
+ Name
+ Gangs.h
+ Windows
+
+
+ Debug
+ Name
+ Ped.cpp
+ Windows
+
+
+ Debug
+ Name
+ Ped.h
+ Windows
+
+
+ Debug
+ Name
+ PedAI.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedChat.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedDebug.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedFight.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedIK.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedIK.h
+ Windows
+
+
+ Debug
+ Name
+ PedPlacement.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedPlacement.h
+ Windows
+
+
+ Debug
+ Name
+ PedRoutes.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedRoutes.h
+ Windows
+
+
+ Debug
+ Name
+ PedType.cpp
+ Windows
+
+
+ Debug
+ Name
+ PedType.h
+ Windows
+
+
+ Debug
+ Name
+ PlayerPed.cpp
+ Windows
+
+
+ Debug
+ Name
+ PlayerPed.h
+ Windows
+
+
+ Debug
+ Name
+ Population.cpp
+ Windows
+
+
+ Debug
+ Name
+ Population.h
+ Windows
+
+
+ renderer
+
+ Debug
+ Name
+ 2dEffect.h
+ Windows
+
+
+ Debug
+ Name
+ Antennas.cpp
+ Windows
+
+
+ Debug
+ Name
+ Antennas.h
+ Windows
+
+
+ Debug
+ Name
+ Clouds.cpp
+ Windows
+
+
+ Debug
+ Name
+ Clouds.h
+ Windows
+
+
+ Debug
+ Name
+ Console.cpp
+ Windows
+
+
+ Debug
+ Name
+ Console.h
+ Windows
+
+
+ Debug
+ Name
+ Coronas.cpp
+ Windows
+
+
+ Debug
+ Name
+ Coronas.h
+ Windows
+
+
+ Debug
+ Name
+ Credits.cpp
+ Windows
+
+
+ Debug
+ Name
+ Credits.h
+ Windows
+
+
+ Debug
+ Name
+ Draw.cpp
+ Windows
+
+
+ Debug
+ Name
+ Draw.h
+ Windows
+
+
+ Debug
+ Name
+ Fluff.cpp
+ Windows
+
+
+ Debug
+ Name
+ Fluff.h
+ Windows
+
+
+ Debug
+ Name
+ Font.cpp
+ Windows
+
+
+ Debug
+ Name
+ Font.h
+ Windows
+
+
+ Debug
+ Name
+ Glass.cpp
+ Windows
+
+
+ Debug
+ Name
+ Glass.h
+ Windows
+
+
+ Debug
+ Name
+ Hud.cpp
+ Windows
+
+
+ Debug
+ Name
+ Hud.h
+ Windows
+
+
+ Debug
+ Name
+ Instance.cpp
+ Windows
+
+
+ Debug
+ Name
+ Instance.h
+ Windows
+
+
+ Debug
+ Name
+ Lines.cpp
+ Windows
+
+
+ Debug
+ Name
+ Lines.h
+ Windows
+
+
+ Debug
+ Name
+ MBlur.cpp
+ Windows
+
+
+ Debug
+ Name
+ MBlur.h
+ Windows
+
+
+ Debug
+ Name
+ Particle.cpp
+ Windows
+
+
+ Debug
+ Name
+ Particle.h
+ Windows
+
+
+ Debug
+ Name
+ ParticleMgr.cpp
+ Windows
+
+
+ Debug
+ Name
+ ParticleMgr.h
+ Windows
+
+
+ Debug
+ Name
+ ParticleType.h
+ Windows
+
+
+ Debug
+ Name
+ PlayerSkin.cpp
+ Windows
+
+
+ Debug
+ Name
+ PlayerSkin.h
+ Windows
+
+
+ Debug
+ Name
+ PointLights.cpp
+ Windows
+
+
+ Debug
+ Name
+ PointLights.h
+ Windows
+
+
+ Debug
+ Name
+ RenderBuffer.cpp
+ Windows
+
+
+ Debug
+ Name
+ RenderBuffer.h
+ Windows
+
+
+ Debug
+ Name
+ Renderer.cpp
+ Windows
+
+
+ Debug
+ Name
+ Renderer.h
+ Windows
+
+
+ Debug
+ Name
+ Rubbish.cpp
+ Windows
+
+
+ Debug
+ Name
+ Rubbish.h
+ Windows
+
+
+ Debug
+ Name
+ Shadows.cpp
+ Windows
+
+
+ Debug
+ Name
+ Shadows.h
+ Windows
+
+
+ Debug
+ Name
+ Skidmarks.cpp
+ Windows
+
+
+ Debug
+ Name
+ Skidmarks.h
+ Windows
+
+
+ Debug
+ Name
+ SpecialFX.cpp
+ Windows
+
+
+ Debug
+ Name
+ SpecialFX.h
+ Windows
+
+
+ Debug
+ Name
+ Sprite.cpp
+ Windows
+
+
+ Debug
+ Name
+ Sprite.h
+ Windows
+
+
+ Debug
+ Name
+ Sprite2d.cpp
+ Windows
+
+
+ Debug
+ Name
+ Sprite2d.h
+ Windows
+
+
+ Debug
+ Name
+ TexList.cpp
+ Windows
+
+
+ Debug
+ Name
+ TexList.h
+ Windows
+
+
+ Debug
+ Name
+ Timecycle.cpp
+ Windows
+
+
+ Debug
+ Name
+ Timecycle.h
+ Windows
+
+
+ Debug
+ Name
+ WaterCannon.cpp
+ Windows
+
+
+ Debug
+ Name
+ WaterCannon.h
+ Windows
+
+
+ Debug
+ Name
+ WaterLevel.cpp
+ Windows
+
+
+ Debug
+ Name
+ WaterLevel.h
+ Windows
+
+
+ Debug
+ Name
+ Weather.cpp
+ Windows
+
+
+ Debug
+ Name
+ Weather.h
+ Windows
+
+
+ rw
+
+ Debug
+ Name
+ ClumpRead.cpp
+ Windows
+
+
+ Debug
+ Name
+ Lights.cpp
+ Windows
+
+
+ Debug
+ Name
+ Lights.h
+ Windows
+
+
+ Debug
+ Name
+ MemoryHeap.cpp
+ Windows
+
+
+ Debug
+ Name
+ MemoryHeap.h
+ Windows
+
+
+ Debug
+ Name
+ MemoryMgr.cpp
+ Windows
+
+
+ Debug
+ Name
+ MemoryMgr.h
+ Windows
+
+
+ Debug
+ Name
+ NodeName.cpp
+ Windows
+
+
+ Debug
+ Name
+ NodeName.h
+ Windows
+
+
+ Debug
+ Name
+ RwHelper.cpp
+ Windows
+
+
+ Debug
+ Name
+ RwHelper.h
+ Windows
+
+
+ Debug
+ Name
+ RwMatFX.cpp
+ Windows
+
+
+ Debug
+ Name
+ RwPS2AlphaTest.cpp
+ Windows
+
+
+ Debug
+ Name
+ TexRead.cpp
+ Windows
+
+
+ Debug
+ Name
+ TexturePools.cpp
+ Windows
+
+
+ Debug
+ Name
+ TexturePools.h
+ Windows
+
+
+ Debug
+ Name
+ TxdStore.cpp
+ Windows
+
+
+ Debug
+ Name
+ TxdStore.h
+ Windows
+
+
+ Debug
+ Name
+ VisibilityPlugins.cpp
+ Windows
+
+
+ Debug
+ Name
+ VisibilityPlugins.h
+ Windows
+
+
+ save
+
+ Debug
+ Name
+ Date.cpp
+ Windows
+
+
+ Debug
+ Name
+ Date.h
+ Windows
+
+
+ Debug
+ Name
+ GenericGameStorage.cpp
+ Windows
+
+
+ Debug
+ Name
+ GenericGameStorage.h
+ Windows
+
+
+ Debug
+ Name
+ MemoryCard.cpp
+ Windows
+
+
+ Debug
+ Name
+ MemoryCard.h
+ Windows
+
+
+ Debug
+ Name
+ PCSave.cpp
+ Windows
+
+
+ Debug
+ Name
+ PCSave.h
+ Windows
+
+
+ skel
+
+ Debug
+ Name
+ crossplatform.cpp
+ Windows
+
+
+ Debug
+ Name
+ crossplatform.h
+ Windows
+
+
+ Debug
+ Name
+ events.cpp
+ Windows
+
+
+ Debug
+ Name
+ events.h
+ Windows
+
+
+ Debug
+ Name
+ platform.h
+ Windows
+
+
+ Debug
+ Name
+ skeleton.cpp
+ Windows
+
+
+ Debug
+ Name
+ skeleton.h
+ Windows
+
+
+ Debug
+ Name
+ resource.h
+ Windows
+
+
+ Debug
+ Name
+ win.cpp
+ Windows
+
+
+ Debug
+ Name
+ win.h
+ Windows
+
+
+ Debug
+ Name
+ win.rc
+ Windows
+
+
+ text
+
+ Debug
+ Name
+ Messages.cpp
+ Windows
+
+
+ Debug
+ Name
+ Messages.h
+ Windows
+
+
+ Debug
+ Name
+ Pager.cpp
+ Windows
+
+
+ Debug
+ Name
+ Pager.h
+ Windows
+
+
+ Debug
+ Name
+ Text.cpp
+ Windows
+
+
+ Debug
+ Name
+ Text.h
+ Windows
+
+
+ vehicles
+
+ Debug
+ Name
+ Automobile.cpp
+ Windows
+
+
+ Debug
+ Name
+ Automobile.h
+ Windows
+
+
+ Debug
+ Name
+ Bike.h
+ Windows
+
+
+ Debug
+ Name
+ Boat.cpp
+ Windows
+
+
+ Debug
+ Name
+ Boat.h
+ Windows
+
+
+ Debug
+ Name
+ CarGen.cpp
+ Windows
+
+
+ Debug
+ Name
+ CarGen.h
+ Windows
+
+
+ Debug
+ Name
+ Cranes.cpp
+ Windows
+
+
+ Debug
+ Name
+ Cranes.h
+ Windows
+
+
+ Debug
+ Name
+ DamageManager.cpp
+ Windows
+
+
+ Debug
+ Name
+ DamageManager.h
+ Windows
+
+
+ Debug
+ Name
+ Door.cpp
+ Windows
+
+
+ Debug
+ Name
+ Door.h
+ Windows
+
+
+ Debug
+ Name
+ Floater.cpp
+ Windows
+
+
+ Debug
+ Name
+ Floater.h
+ Windows
+
+
+ Debug
+ Name
+ HandlingMgr.cpp
+ Windows
+
+
+ Debug
+ Name
+ HandlingMgr.h
+ Windows
+
+
+ Debug
+ Name
+ Heli.cpp
+ Windows
+
+
+ Debug
+ Name
+ Heli.h
+ Windows
+
+
+ Debug
+ Name
+ Plane.cpp
+ Windows
+
+
+ Debug
+ Name
+ Plane.h
+ Windows
+
+
+ Debug
+ Name
+ Train.cpp
+ Windows
+
+
+ Debug
+ Name
+ Train.h
+ Windows
+
+
+ Debug
+ Name
+ Transmission.cpp
+ Windows
+
+
+ Debug
+ Name
+ Transmission.h
+ Windows
+
+
+ Debug
+ Name
+ Vehicle.cpp
+ Windows
+
+
+ Debug
+ Name
+ Vehicle.h
+ Windows
+
+
+ weapons
+
+ Debug
+ Name
+ BulletInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ BulletInfo.h
+ Windows
+
+
+ Debug
+ Name
+ Explosion.cpp
+ Windows
+
+
+ Debug
+ Name
+ Explosion.h
+ Windows
+
+
+ Debug
+ Name
+ ProjectileInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ ProjectileInfo.h
+ Windows
+
+
+ Debug
+ Name
+ ShotInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ ShotInfo.h
+ Windows
+
+
+ Debug
+ Name
+ Weapon.cpp
+ Windows
+
+
+ Debug
+ Name
+ Weapon.h
+ Windows
+
+
+ Debug
+ Name
+ WeaponEffects.cpp
+ Windows
+
+
+ Debug
+ Name
+ WeaponEffects.h
+ Windows
+
+
+ Debug
+ Name
+ WeaponInfo.cpp
+ Windows
+
+
+ Debug
+ Name
+ WeaponInfo.h
+ Windows
+
+
+ Debug
+ Name
+ WeaponType.h
+ Windows
+
+
+ RenderWare
+
+ Debug
+ Name
+ rwcore.lib
+ Windows
+
+
+ Debug
+ Name
+ rpworld.lib
+ Windows
+
+
+ Debug
+ Name
+ rpmatfx.lib
+ Windows
+
+
+ Debug
+ Name
+ rpskin.lib
+ Windows
+
+
+ Debug
+ Name
+ rphanim.lib
+ Windows
+
+
+ Debug
+ Name
+ rtbmp.lib
+ Windows
+
+
+ Debug
+ Name
+ rtquat.lib
+ Windows
+
+
+ Debug
+ Name
+ rtcharse.lib
+ Windows
+
+
+ DirectX
+
+ Debug
+ Name
+ d3d8.lib
+ Windows
+
+
+ Debug
+ Name
+ ddraw.lib
+ Windows
+
+
+ Debug
+ Name
+ dxguid.lib
+ Windows
+
+
+ Debug
+ Name
+ strmiids.lib
+ Windows
+
+
+ Debug
+ Name
+ dinput8.lib
+ Windows
+
+
+ Miles
+
+ Debug
+ Name
+ mss32.lib
+ Windows
+
+
+ MSL ANSI Libraries
+
+ Debug
+ Name
+ MSL_All_x86_D.lib
+ MacOS
+
+
+ Release
+ Name
+ MSL_All_x86.lib
+ MacOS
+
+
+ Win32 SDK Libraries
+
+ Debug
+ Name
+ Gdi32.lib
+ MacOS
+
+
+ Debug
+ Name
+ Kernel32.lib
+ MacOS
+
+
+ Debug
+ Name
+ User32.lib
+ MacOS
+
+
+ Debug
+ Name
+ Comdlg32.lib
+ MacOS
+
+
+ Debug
+ Name
+ winmm.lib
+ Windows
+
+
+ Debug
+ Name
+ ole32.lib
+ Windows
+
+
+ Debug
+ Name
+ shell32.lib
+ Windows
+
+
+ Debug
+ Name
+ uuid.lib
+ Windows
+
+
+
+
+
diff --git a/gamefiles/TEXT/american.gxt b/gamefiles/TEXT/american.gxt
index 756fafa3..d7b7c956 100644
Binary files a/gamefiles/TEXT/american.gxt and b/gamefiles/TEXT/american.gxt differ
diff --git a/gamefiles/TEXT/french.gxt b/gamefiles/TEXT/french.gxt
index cb2874f9..3dece994 100644
Binary files a/gamefiles/TEXT/french.gxt and b/gamefiles/TEXT/french.gxt differ
diff --git a/gamefiles/TEXT/german.gxt b/gamefiles/TEXT/german.gxt
index d5a986cf..7f25bd05 100644
Binary files a/gamefiles/TEXT/german.gxt and b/gamefiles/TEXT/german.gxt differ
diff --git a/gamefiles/TEXT/italian.gxt b/gamefiles/TEXT/italian.gxt
index 95e2dd36..5a060a9a 100644
Binary files a/gamefiles/TEXT/italian.gxt and b/gamefiles/TEXT/italian.gxt differ
diff --git a/gamefiles/TEXT/polish.gxt b/gamefiles/TEXT/polish.gxt
old mode 100644
new mode 100755
index 1782ef87..782f656d
Binary files a/gamefiles/TEXT/polish.gxt and b/gamefiles/TEXT/polish.gxt differ
diff --git a/gamefiles/TEXT/russian.gxt b/gamefiles/TEXT/russian.gxt
index 026222ac..914f5b52 100644
Binary files a/gamefiles/TEXT/russian.gxt and b/gamefiles/TEXT/russian.gxt differ
diff --git a/gamefiles/TEXT/spanish.gxt b/gamefiles/TEXT/spanish.gxt
index 6b188fc6..cb884689 100644
Binary files a/gamefiles/TEXT/spanish.gxt and b/gamefiles/TEXT/spanish.gxt differ
diff --git a/gamefiles/models/frontend_ds3.txd b/gamefiles/models/frontend_ds3.txd
new file mode 100644
index 00000000..7481e9b9
Binary files /dev/null and b/gamefiles/models/frontend_ds3.txd differ
diff --git a/gamefiles/models/frontend_ds4.txd b/gamefiles/models/frontend_ds4.txd
new file mode 100644
index 00000000..594de328
Binary files /dev/null and b/gamefiles/models/frontend_ds4.txd differ
diff --git a/gamefiles/models/frontend_nsw.txd b/gamefiles/models/frontend_nsw.txd
new file mode 100644
index 00000000..1379a1a7
Binary files /dev/null and b/gamefiles/models/frontend_nsw.txd differ
diff --git a/gamefiles/models/frontend_x360.txd b/gamefiles/models/frontend_x360.txd
new file mode 100644
index 00000000..a57b8d13
Binary files /dev/null and b/gamefiles/models/frontend_x360.txd differ
diff --git a/gamefiles/models/frontend_xone.txd b/gamefiles/models/frontend_xone.txd
new file mode 100644
index 00000000..03dfefda
Binary files /dev/null and b/gamefiles/models/frontend_xone.txd differ
diff --git a/gamefiles/models/generic.txd b/gamefiles/models/generic.txd
new file mode 100644
index 00000000..8e0d60f3
Binary files /dev/null and b/gamefiles/models/generic.txd differ
diff --git a/gamefiles/models/nswbtns.txd b/gamefiles/models/nswbtns.txd
new file mode 100644
index 00000000..0b1756ee
Binary files /dev/null and b/gamefiles/models/nswbtns.txd differ
diff --git a/gamefiles/models/particle.txd b/gamefiles/models/particle.txd
new file mode 100644
index 00000000..e908ba4e
Binary files /dev/null and b/gamefiles/models/particle.txd differ
diff --git a/gamefiles/models/ps3btns.txd b/gamefiles/models/ps3btns.txd
new file mode 100644
index 00000000..ed216263
Binary files /dev/null and b/gamefiles/models/ps3btns.txd differ
diff --git a/gamefiles/models/x360btns.txd b/gamefiles/models/x360btns.txd
index 27837c2f..95a68c8b 100644
Binary files a/gamefiles/models/x360btns.txd and b/gamefiles/models/x360btns.txd differ
diff --git a/premake5.lua b/premake5.lua
index f715f1e5..a33623fc 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -1,10 +1,3 @@
-newoption {
- trigger = "glewdir",
- value = "PATH",
- description = "Directory of GLEW",
- default = "vendor/glew-2.1.0"
-}
-
newoption {
trigger = "glfwdir64",
value = "PATH",
@@ -35,10 +28,22 @@ newoption {
}
newoption {
- trigger = "lto",
- description = "Use link time optimization"
+ trigger = "with-lto",
+ description = "Build with link time optimization"
}
+newoption {
+ trigger = "no-git-hash",
+ description = "Don't print git commit hash into binary"
+}
+
+newoption {
+ trigger = "no-full-paths",
+ description = "Don't print full paths into binary"
+}
+
+require("autoconf")
+
if(_OPTIONS["with-librw"]) then
Librw = "vendor/librw"
else
@@ -65,7 +70,7 @@ end
workspace "re3"
language "C++"
- configurations { "Debug", "Release", "Vanilla" }
+ configurations { "Debug", "Release" }
startproject "re3"
location "build"
symbols "Full"
@@ -77,6 +82,7 @@ workspace "re3"
end
filter { "system:windows" }
+ configurations { "Vanilla" }
platforms {
"win-x86-RW33_d3d8-mss",
"win-x86-librw_d3d9-mss",
@@ -112,68 +118,67 @@ workspace "re3"
filter "configurations:Debug"
defines { "DEBUG" }
-
+
filter "configurations:not Debug"
defines { "NDEBUG" }
optimize "Speed"
- if(_OPTIONS["lto"]) then
+ if(_OPTIONS["with-lto"]) then
flags { "LinkTimeOptimization" }
end
- filter "configurations:Vanilla"
- defines { "VANILLA_DEFINES" }
-
filter { "platforms:win*" }
system "windows"
filter { "platforms:linux*" }
system "linux"
-
+
filter { "platforms:bsd*" }
system "bsd"
filter { "platforms:macosx*" }
system "macosx"
-
+
filter { "platforms:*x86*" }
architecture "x86"
-
+
filter { "platforms:*amd64*" }
architecture "amd64"
filter { "platforms:*arm*" }
architecture "ARM"
- filter { "platforms:macosx-arm64-*" }
+ filter { "platforms:macosx-arm64-*", "files:**.cpp"}
buildoptions { "-target", "arm64-apple-macos11", "-std=gnu++14" }
- filter { "platforms:macosx-amd64-*" }
+ filter { "platforms:macosx-arm64-*", "files:**.c"}
+ buildoptions { "-target", "arm64-apple-macos11" }
+
+ filter { "platforms:macosx-amd64-*", "files:**.cpp"}
buildoptions { "-target", "x86_64-apple-macos10.12", "-std=gnu++14" }
+ filter { "platforms:macosx-amd64-*", "files:**.c"}
+ buildoptions { "-target", "x86_64-apple-macos10.12" }
+
filter { "platforms:*librw_d3d9*" }
defines { "RW_D3D9" }
if(not _OPTIONS["with-librw"]) then
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["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" }
-
filter {}
-
+
function setpaths (gamepath, exepath)
if (gamepath) then
postbuildcommands {
@@ -196,7 +201,8 @@ project "librw"
targetdir(path.join(Librw, "lib/%{cfg.platform}/%{cfg.buildcfg}"))
files { path.join(Librw, "src/*.*") }
files { path.join(Librw, "src/*/*.*") }
-
+ files { path.join(Librw, "src/gl/*/*.*") }
+
filter { "platforms:*x86*" }
architecture "x86"
@@ -204,6 +210,7 @@ project "librw"
architecture "amd64"
filter "platforms:win*"
+ defines { "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE" }
staticruntime "on"
buildoptions { "/Zc:sizedDealloc-" }
@@ -211,16 +218,22 @@ project "librw"
includedirs { "/usr/local/include" }
libdirs { "/usr/local/lib" }
- filter "platforms:macosx*"
- -- Support MacPorts and Homebrew
+ -- Support MacPorts and Homebrew
+ filter "platforms:macosx-arm64-*"
+ includedirs { "/opt/local/include" }
+ includedirs {"/opt/homebrew/include" }
+ libdirs { "/opt/local/lib" }
+ libdirs { "/opt/homebrew/lib" }
+
+ filter "platforms:macosx-amd64-*"
includedirs { "/opt/local/include" }
includedirs {"/usr/local/include" }
libdirs { "/opt/local/lib" }
libdirs { "/usr/local/lib" }
-
+
filter "platforms:*gl3_glfw*"
staticruntime "off"
-
+
filter "platforms:*RW33*"
flags { "ExcludeFromBuild" }
filter {}
@@ -235,6 +248,10 @@ project "re3"
targetname "re3"
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
+ if(_OPTIONS["with-librw"]) then
+ dependson "librw"
+ end
+
files { addSrcFiles("src") }
files { addSrcFiles("src/animation") }
files { addSrcFiles("src/audio") }
@@ -249,7 +266,7 @@ project "re3"
files { addSrcFiles("src/modelinfo") }
files { addSrcFiles("src/objects") }
files { addSrcFiles("src/peds") }
- files { addSrcFiles("src/render") }
+ files { addSrcFiles("src/renderer") }
files { addSrcFiles("src/rw") }
files { addSrcFiles("src/save") }
files { addSrcFiles("src/skel") }
@@ -258,6 +275,11 @@ project "re3"
files { addSrcFiles("src/vehicles") }
files { addSrcFiles("src/weapons") }
files { addSrcFiles("src/extras") }
+ if(not _OPTIONS["no-git-hash"]) then
+ files { "src/extras/GitSHA1.cpp" } -- this won't be in repo in first build
+ else
+ removefiles { "src/extras/GitSHA1.cpp" } -- but it will be everytime after
+ end
includedirs { "src" }
includedirs { "src/animation" }
@@ -273,7 +295,7 @@ project "re3"
includedirs { "src/modelinfo" }
includedirs { "src/objects" }
includedirs { "src/peds" }
- includedirs { "src/render" }
+ includedirs { "src/renderer" }
includedirs { "src/rw" }
includedirs { "src/save/" }
includedirs { "src/skel/" }
@@ -282,18 +304,25 @@ project "re3"
includedirs { "src/vehicles" }
includedirs { "src/weapons" }
includedirs { "src/extras" }
-
+
+ if(not _OPTIONS["no-git-hash"]) then
+ defines { "USE_OUR_VERSIONING" }
+ end
+
if _OPTIONS["with-opus"] then
includedirs { "vendor/ogg/include" }
includedirs { "vendor/opus/include" }
includedirs { "vendor/opusfile/include" }
end
+ filter "configurations:Vanilla"
+ defines { "VANILLA_DEFINES" }
+
filter "platforms:*mss"
defines { "AUDIO_MSS" }
includedirs { "vendor/milessdk/include" }
libdirs { "vendor/milessdk/lib" }
-
+
if _OPTIONS["with-opus"] then
filter "platforms:win*"
libdirs { "vendor/ogg/win32/VS2015/Win32/%{cfg.buildcfg}" }
@@ -302,15 +331,15 @@ project "re3"
filter {}
defines { "AUDIO_OPUS" }
end
-
+
filter "platforms:*oal"
defines { "AUDIO_OAL" }
-
+
filter {}
if(os.getenv("GTA_III_RE_DIR")) then
- setpaths("$(GTA_III_RE_DIR)/", "%(cfg.buildtarget.name)")
+ setpaths(os.getenv("GTA_III_RE_DIR") .. "/", "%(cfg.buildtarget.name)")
end
-
+
filter "platforms:win*"
files { addSrcFiles("src/skel/win") }
includedirs { "src/skel/win" }
@@ -318,24 +347,49 @@ project "re3"
linkoptions "/SAFESEH:NO"
characterset ("MBCS")
targetextension ".exe"
+ if(_OPTIONS["no-full-paths"]) then
+ usefullpaths "off"
+ linkoptions "/PDBALTPATH:%_PDB%"
+ end
if(_OPTIONS["with-librw"]) then
-- external librw is dynamic
staticruntime "on"
end
+ if(not _OPTIONS["no-git-hash"]) then
+ prebuildcommands { '"%{prj.location}..\\printHash.bat" "%{prj.location}..\\src\\extras\\GitSHA1.cpp"' }
+ end
+
+ filter "platforms:not win*"
+ if(not _OPTIONS["no-git-hash"]) then
+ prebuildcommands { '"%{prj.location}/../printHash.sh" "%{prj.location}/../src/extras/GitSHA1.cpp"' }
+ end
filter "platforms:win*glfw*"
staticruntime "off"
+ filter "platforms:*glfw*"
+ premake.modules.autoconf.parameters = "-lglfw -lX11"
+ autoconfigure {
+ -- iterates all configs and runs on them
+ ["dontWrite"] = function (cfg)
+ check_symbol_exists(cfg, "haveX11", "glfwGetX11Display", { "X11/Xlib.h", "X11/XKBlib.h", "GLFW/glfw3.h", "GLFW/glfw3native.h" }, "GLFW_EXPOSE_NATIVE_X11")
+ if cfg.autoconf["haveX11"] then
+ table.insert(cfg.links, "X11")
+ table.insert(cfg.defines, "GET_KEYBOARD_INPUT_FROM_X11")
+ end
+ end
+ }
+
filter "platforms:win*oal"
includedirs { "vendor/openal-soft/include" }
includedirs { "vendor/libsndfile/include" }
includedirs { "vendor/mpg123/include" }
-
+
filter "platforms:win-x86*oal"
libdirs { "vendor/mpg123/lib/Win32" }
libdirs { "vendor/libsndfile/lib/Win32" }
libdirs { "vendor/openal-soft/libs/Win32" }
-
+
filter "platforms:win-amd64*oal"
libdirs { "vendor/mpg123/lib/Win64" }
libdirs { "vendor/libsndfile/lib/Win64" }
@@ -349,9 +403,15 @@ project "re3"
filter "platforms:macosx*oal"
links { "openal", "mpg123", "sndfile", "pthread" }
+
+ filter "platforms:macosx-arm64-*oal"
+ includedirs { "/opt/homebrew/opt/openal-soft/include" }
+ libdirs { "/opt/homebrew/opt/openal-soft/lib" }
+
+ filter "platforms:macosx-amd64-*oal"
includedirs { "/usr/local/opt/openal-soft/include" }
libdirs { "/usr/local/opt/openal-soft/lib" }
-
+
if _OPTIONS["with-opus"] then
filter {}
links { "libogg" }
@@ -365,7 +425,7 @@ project "re3"
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtcharse", "rpanisot" }
defines { "RWLIBS" }
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"
-
+
filter "platforms:*librw*"
defines { "LIBRW" }
files { addSrcFiles("src/fakerw") }
@@ -379,33 +439,39 @@ project "re3"
filter "platforms:*d3d9*"
defines { "USE_D3D9" }
links { "d3d9" }
-
+
filter "platforms:*x86*d3d*"
includedirs { "sdk/dx8sdk/include" }
libdirs { "sdk/dx8sdk/lib" }
-
+
filter "platforms:win-x86*gl3_glfw*"
- libdirs { path.join(_OPTIONS["glewdir"], "lib/Release/Win32") }
libdirs { path.join(_OPTIONS["glfwdir32"], "lib-" .. string.gsub(_ACTION or '', "vs", "vc")) }
- links { "opengl32", "glew32s", "glfw3" }
-
+ links { "opengl32", "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" }
+ links { "opengl32", "glfw3" }
filter "platforms:linux*gl3_glfw*"
- links { "GL", "GLEW", "glfw" }
-
+ links { "GL", "glfw" }
+
filter "platforms:bsd*gl3_glfw*"
- links { "GL", "GLEW", "glfw", "sysinfo" }
+ links { "GL", "glfw", "sysinfo" }
includedirs { "/usr/local/include" }
libdirs { "/usr/local/lib" }
- filter "platforms:macosx*gl3_glfw*"
- links { "GLEW", "glfw" }
+ filter "platforms:macosx-arm64-*gl3_glfw*"
+ links { "glfw" }
linkoptions { "-framework OpenGL" }
includedirs { "/opt/local/include" }
- includedirs { "/usr/local/include" }
+ includedirs {"/opt/homebrew/include" }
+ libdirs { "/opt/local/lib" }
+ libdirs { "/opt/homebrew/lib" }
+
+ filter "platforms:macosx-amd64-*gl3_glfw*"
+ links { "glfw" }
+ linkoptions { "-framework OpenGL" }
+ includedirs { "/opt/local/include" }
+ includedirs {"/usr/local/include" }
libdirs { "/opt/local/lib" }
libdirs { "/usr/local/lib" }
diff --git a/printHash.bat b/printHash.bat
new file mode 100644
index 00000000..ef1cd9d6
--- /dev/null
+++ b/printHash.bat
@@ -0,0 +1,26 @@
+@echo off
+
+REM creates version.h with HEAD commit hash
+REM params: $1=full path to output file (usually points version.h)
+
+setlocal enableextensions enabledelayedexpansion
+
+cd /d "%~dp0"
+
+break> %1
+
+ %1
+
+where git
+if "%errorlevel%" == "0" ( goto :havegit ) else ( goto :writeending )
+
+:havegit
+for /f %%v in ('git rev-parse --short HEAD') do set version=%%v
+> %1
+
+:writeending
+
+echo ^" >> %1
+echo const char* g_GIT_SHA1 = GIT_SHA1; >> %1
+
+EXIT /B
\ No newline at end of file
diff --git a/printHash.sh b/printHash.sh
new file mode 100755
index 00000000..213d9353
--- /dev/null
+++ b/printHash.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env sh
+if [ -z "${1}" ]
+ then
+ printf "%s\n" "Input the path to the file for writing the commit hash to."
+ else
+ printf "%s" "#define GIT_SHA1 \"" > $1
+
+ if (command -v "git" >/dev/null) then
+ git rev-parse --short HEAD | tr -d '\n' >> $1
+ fi
+
+ printf "%s\n" "\"" >> $1
+ printf "%s\n" "const char* g_GIT_SHA1 = GIT_SHA1;" >> $1
+fi
diff --git a/logo.svg b/res/images/logo.svg
similarity index 100%
rename from logo.svg
rename to res/images/logo.svg
diff --git a/logo.png b/res/images/logo_1024.png
similarity index 100%
rename from logo.png
rename to res/images/logo_1024.png
diff --git a/res/images/logo_256.jpg b/res/images/logo_256.jpg
new file mode 100644
index 00000000..595d2c3b
Binary files /dev/null and b/res/images/logo_256.jpg differ
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index df39c7c9..818d180f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,5 +1,5 @@
-set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
file(GLOB_RECURSE ${PROJECT}_SOURCES "*.cpp" "*.h" "*.rc")
@@ -17,6 +17,9 @@ endfunction()
header_directories(${PROJECT}_INCLUDES)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/extras/GitSHA1.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/extras/GitSHA1.cpp" @ONLY)
+list(APPEND ${PROJECT}_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/extras/GitSHA1.cpp")
+
add_executable(${EXECUTABLE} WIN32
${${PROJECT}_SOURCES}
)
@@ -36,7 +39,7 @@ target_compile_definitions(${EXECUTABLE}
PRIVATE
$,DEBUG,NDEBUG>
LIBRW
- ${PROJECT}_NO_AUTOLINK
+ CMAKE_NO_AUTOLINK
)
if(LIBRW_PLATFORM_D3D9)
@@ -46,11 +49,18 @@ if(LIBRW_PLATFORM_D3D9)
)
endif()
+target_compile_definitions(${EXECUTABLE} PRIVATE CMAKE_BUILD)
+target_compile_definitions(${EXECUTABLE} PRIVATE USE_OUR_VERSIONING)
+
if(${PROJECT}_AUDIO STREQUAL "OAL")
find_package(OpenAL REQUIRED)
- target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})
- target_link_libraries(${EXECUTABLE} PRIVATE ${OPENAL_LIBRARY})
- target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS})
+ if(TARGET OpenAL::OpenAL)
+ target_link_libraries(${EXECUTABLE} PRIVATE OpenAL::OpenAL)
+ else()
+ target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})
+ target_link_libraries(${EXECUTABLE} PRIVATE ${OPENAL_LIBRARY})
+ target_compile_definitions(${EXECUTABLE} PRIVATE ${OPENAL_DEFINITIONS})
+ endif()
target_compile_definitions(${EXECUTABLE} PRIVATE AUDIO_OAL)
elseif(${PROJECT}_AUDIO STREQUAL "MSS")
find_package(MilesSDK REQUIRED)
@@ -114,13 +124,35 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
)
endif()
+if(NINTENDO_SWITCH)
+ set(${PROJECT}_C_CXX_EXTENSIONS ON)
+else()
+ set(${PROJECT}_C_CXX_EXTENSIONS OFF)
+endif()
+
+if(LIBRW_PLATFORM_GL3 AND LIBRW_GL3_GFXLIB STREQUAL "GLFW")
+ include(CheckSymbolExists)
+
+ set(CMAKE_REQUIRED_LIBRARIES glfw)
+ set(CMAKE_REQUIRED_DEFINITIONS -DGLFW_EXPOSE_NATIVE_X11)
+ check_symbol_exists(glfwGetX11Display "GLFW/glfw3.h;GLFW/glfw3native.h" GLFW_HAS_X11)
+ unset(CMAKE_REQUIRED_DEFINITIONS)
+ unset(CMAKE_REQUIRED_LIBRARIES)
+
+ if (GLFW_HAS_X11)
+ find_package(X11 REQUIRED)
+ target_link_libraries(${EXECUTABLE} PRIVATE X11::X11)
+ target_compile_definitions(${EXECUTABLE} PRIVATE GET_KEYBOARD_INPUT_FROM_X11)
+ endif (GLFW_HAS_X11)
+endif()
+
set_target_properties(${EXECUTABLE}
PROPERTIES
C_STANDARD 11
- C_EXTENSIONS OFF
+ C_EXTENSIONS ${${PROJECT}_C_CXX_EXTENSIONS}
C_STANDARD_REQUIRED ON
CXX_STANDARD 11
- CXX_EXTENSIONS OFF
+ CXX_EXTENSIONS ${${PROJECT}_C_CXX_EXTENSIONS}
CXX_STANDARD_REQUIRED ON
)
@@ -134,3 +166,5 @@ if(${PROJECT}_INSTALL)
install(FILES $ DESTINATION "." OPTIONAL)
endif()
endif()
+
+re3_platform_target(${EXECUTABLE} INSTALL)
diff --git a/src/animation/AnimBlendAssociation.h b/src/animation/AnimBlendAssociation.h
index 80927da2..45720b6f 100644
--- a/src/animation/AnimBlendAssociation.h
+++ b/src/animation/AnimBlendAssociation.h
@@ -35,7 +35,7 @@ public:
CAnimBlendLink link;
- int numNodes; // taken from CAnimBlendClumpData::numFrames
+ int32 numNodes; // taken from CAnimBlendClumpData::numFrames
// NB: Order of these depends on order of nodes in Clump this was built from
CAnimBlendNode *nodes;
CAnimBlendHierarchy *hierarchy;
diff --git a/src/animation/AnimBlendClumpData.cpp b/src/animation/AnimBlendClumpData.cpp
index 702ee811..b333a449 100644
--- a/src/animation/AnimBlendClumpData.cpp
+++ b/src/animation/AnimBlendClumpData.cpp
@@ -3,7 +3,6 @@
#include "AnimBlendClumpData.h"
#include "MemoryMgr.h"
-
CAnimBlendClumpData::CAnimBlendClumpData(void)
{
numFrames = 0;
diff --git a/src/animation/AnimManager.cpp b/src/animation/AnimManager.cpp
index 6a5148ab..4c4bea64 100644
--- a/src/animation/AnimManager.cpp
+++ b/src/animation/AnimManager.cpp
@@ -19,68 +19,68 @@ CAnimBlendAssocGroup *CAnimManager::ms_aAnimAssocGroups;
CLinkList CAnimManager::ms_animCache;
AnimAssocDesc aStdAnimDescs[] = {
- { ANIM_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK },
- { ANIM_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK },
- { ANIM_SPRINT, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK },
- { ANIM_IDLE_STANCE, ASSOC_REPEAT },
- { ANIM_WALK_START, ASSOC_HAS_TRANSLATION },
- { ANIM_RUN_STOP, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION },
- { ANIM_RUN_STOP_R, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION },
- { ANIM_IDLE_CAM, ASSOC_REPEAT | ASSOC_PARTIAL },
- { ANIM_IDLE_HBHB, ASSOC_REPEAT | ASSOC_PARTIAL },
- { ANIM_IDLE_TIRED, ASSOC_REPEAT },
- { ANIM_IDLE_ARMED, ASSOC_REPEAT | ASSOC_PARTIAL },
- { ANIM_IDLE_CHAT, ASSOC_REPEAT | ASSOC_PARTIAL },
- { ANIM_IDLE_TAXI, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_KO_SHOT_FRONT1, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
- { ANIM_KO_SHOT_FRONT2, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
- { ANIM_KO_SHOT_FRONT3, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
- { ANIM_KO_SHOT_FRONT4, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
- { ANIM_KO_SHOT_FACE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
- { ANIM_KO_SHOT_STOM, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_KO_SHOT_ARML, ASSOC_PARTIAL | ASSOC_FRONTAL },
- { ANIM_KO_SHOT_ARMR, ASSOC_PARTIAL | ASSOC_FRONTAL },
- { ANIM_KO_SHOT_LEGL, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_KO_SHOT_LEGR, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_KD_LEFT, ASSOC_PARTIAL | ASSOC_FRONTAL },
- { ANIM_KD_RIGHT, ASSOC_PARTIAL | ASSOC_FRONTAL },
- { ANIM_KO_SKID_FRONT, ASSOC_PARTIAL },
- { ANIM_KO_SPIN_R, ASSOC_PARTIAL },
- { ANIM_KO_SKID_BACK, ASSOC_PARTIAL | ASSOC_FRONTAL },
- { ANIM_KO_SPIN_L, ASSOC_PARTIAL },
- { ANIM_SHOT_FRONT_PARTIAL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_SHOT_LEFT_PARTIAL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_SHOT_BACK_PARTIAL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_SHOT_RIGHT_PARTIAL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_HIT_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_HIT_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_HIT_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_HIT_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FLOOR_HIT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK },
+ { ANIM_STD_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK },
+ { ANIM_STD_RUNFAST, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK },
+ { ANIM_STD_IDLE, ASSOC_REPEAT },
+ { ANIM_STD_STARTWALK, ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_RUNSTOP1, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_RUNSTOP2, ASSOC_DELETEFADEDOUT | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_IDLE_CAM, ASSOC_REPEAT | ASSOC_PARTIAL },
+ { ANIM_STD_IDLE_HBHB, ASSOC_REPEAT | ASSOC_PARTIAL },
+ { ANIM_STD_IDLE_TIRED, ASSOC_REPEAT },
+ { ANIM_STD_IDLE_BIGGUN, ASSOC_REPEAT | ASSOC_PARTIAL },
+ { ANIM_STD_CHAT, ASSOC_REPEAT | ASSOC_PARTIAL },
+ { ANIM_STD_HAILTAXI, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_KO_FRONT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
+ { ANIM_STD_KO_LEFT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
+ { ANIM_STD_KO_BACK, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
+ { ANIM_STD_KO_RIGHT, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
+ { ANIM_STD_KO_SHOT_FACE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
+ { ANIM_STD_KO_SHOT_STOMACH, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_KO_SHOT_ARM_L, ASSOC_PARTIAL | ASSOC_FRONTAL },
+ { ANIM_STD_KO_SHOT_ARM_R, ASSOC_PARTIAL | ASSOC_FRONTAL },
+ { ANIM_STD_KO_SHOT_LEG_L, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_KO_SHOT_LEG_R, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_SPINFORWARD_LEFT, ASSOC_PARTIAL | ASSOC_FRONTAL },
+ { ANIM_STD_SPINFORWARD_RIGHT, ASSOC_PARTIAL | ASSOC_FRONTAL },
+ { ANIM_STD_HIGHIMPACT_FRONT, ASSOC_PARTIAL },
+ { ANIM_STD_HIGHIMPACT_LEFT, ASSOC_PARTIAL },
+ { ANIM_STD_HIGHIMPACT_BACK, ASSOC_PARTIAL | ASSOC_FRONTAL },
+ { ANIM_STD_HIGHIMPACT_RIGHT, ASSOC_PARTIAL },
+ { ANIM_STD_HITBYGUN_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_HITBYGUN_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_HITBYGUN_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_HITBYGUN_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_HIT_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HIT_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_HIT_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HIT_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_HIT_FLOOR, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
#if GTA_VERSION <= GTA3_PS2_160
- { ANIM_HIT_BODY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_HIT_BODY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
#endif
- { ANIM_HIT_BODYBLOW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_HIT_CHEST, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_HIT_HEAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_HIT_WALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_HIT_WALL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_FLOOR_HIT_F, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL },
- { ANIM_HIT_BEHIND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_PUNCH_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_KICK_FLOOR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_BAT_H, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_BAT_V, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_HGUN_BODY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_WEAPON_AK_BODY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_PUMP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_SNIPER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_THROW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_THROWU, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_WEAPON_START_THROW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_BOMBER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_HGUN_RELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_AK_RELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_HIT_BODYBLOW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HIT_CHEST, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HIT_HEAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HIT_WALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HIT_WALL, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HIT_FLOOR_FRONT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL },
+ { ANIM_STD_HIT_BEHIND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_KICKGROUND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_WEAPON_BAT_H, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_WEAPON_BAT_V, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_WEAPON_HGUN_BODY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_WEAPON_AK_BODY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_WEAPON_PUMP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_WEAPON_SNIPER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_WEAPON_THROW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_THROW_UNDER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_START_THROW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_DETONATE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_HGUN_RELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_AK_RELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
#ifdef PC_PLAYER_CONTROLS
// maybe wrong define, but unused anyway
{ ANIM_FPS_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
@@ -91,121 +91,121 @@ AnimAssocDesc aStdAnimDescs[] = {
{ ANIM_FPS_M16, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
{ ANIM_FPS_ROCKET, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
#endif
- { ANIM_FIGHT_IDLE, ASSOC_REPEAT },
- { ANIM_FIGHT2_IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FIGHT_SH_F, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_FIGHT_BODYBLOW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FIGHT_HEAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FIGHT_KICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FIGHT_KNEE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FIGHT_LHOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FIGHT_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_FIGHT_ROUNDHOUSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_FIGHT_LONGKICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_FIGHT_PPUNCH, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_CAR_JACKED_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_CAR_LJACKED_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_CAR_JACKED_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_CAR_LJACKED_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_CAR_QJACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_QJACKED, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_CAR_ALIGN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_ALIGNHI_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_OPEN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_DOORLOCKED_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_PULLOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_PULLOUT_LOW_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_GETIN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_GETIN_LOW_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CLOSEDOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CLOSEDOOR_LOW_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_ROLLDOOR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_ROLLDOOR_LOW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_GETOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_GETOUT_LOW_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CLOSE_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_ALIGN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_ALIGNHI_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_OPEN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_DOORLOCKED_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_PULLOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_PULLOUT_LOW_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_GETIN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_GETIN_LOW_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CLOSEDOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CLOSEDOOR_LOW_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_SHUFFLE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_LSHUFFLE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_SIT, ASSOC_DELETEFADEDOUT },
- { ANIM_CAR_LSIT, ASSOC_DELETEFADEDOUT },
- { ANIM_CAR_SITP, ASSOC_DELETEFADEDOUT },
- { ANIM_CAR_SITPLO, ASSOC_DELETEFADEDOUT },
- { ANIM_DRIVE_L, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_DRIVE_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_DRIVE_LOW_L, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_DRIVE_LOW_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_DRIVEBY_L, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_DRIVEBY_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_CAR_LB, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_DRIVE_BOAT, ASSOC_DELETEFADEDOUT },
- { ANIM_CAR_GETOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_GETOUT_LOW_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CLOSE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_HOOKERTALK, ASSOC_REPEAT | ASSOC_PARTIAL },
- { ANIM_COACH_OPEN_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_COACH_OPEN_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_COACH_IN_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_COACH_IN_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_COACH_OUT_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_TRAIN_GETIN, ASSOC_PARTIAL },
- { ANIM_TRAIN_GETOUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CRAWLOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_CAR_CRAWLOUT_RHS2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_OPEN_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_GETIN_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_CLOSE_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_GETOUT_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_OPEN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_GETIN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_CLOSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_VAN_GETOUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_GETUP1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_GETUP2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_GETUP3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_GETUP_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_JUMP_LAUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_JUMP_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_JUMP_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_FALL_FALL, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_FALL_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_FALL_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_FALL_COLLAPSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_EV_STEP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_EV_DIVE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
- { ANIM_XPRESS_SCRATCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
- { ANIM_ROAD_CROSS, ASSOC_REPEAT | ASSOC_PARTIAL },
- { ANIM_TURN_180, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_ARREST_GUN, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_DROWN, ASSOC_PARTIAL },
- { ANIM_CPR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_DUCK_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_DUCK_LOW, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_RBLOCK_CSHOOT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
- { ANIM_WEAPON_THROWU2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_HANDSUP, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_HANDSCOWER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
- { ANIM_FUCKU, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
- { ANIM_PHONE_IN, ASSOC_PARTIAL },
- { ANIM_PHONE_OUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
- { ANIM_PHONE_TALK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_IDLE, ASSOC_REPEAT },
+ { ANIM_STD_FIGHT_2IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_SHUFFLE_F, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_FIGHT_BODYBLOW, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_HEAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_KICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_KNEE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_LHOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_FIGHT_ROUNDHOUSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_FIGHT_LONGKICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_PARTIAL_PUNCH, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_JACKEDCAR_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_JACKEDCAR_LO_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_JACKEDCAR_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_JACKEDCAR_LO_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_QUICKJACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_QUICKJACKED, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_ALIGN_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_ALIGNHI_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_OPEN_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CARDOOR_LOCKED_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_PULL_OUT_PED_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_PULL_OUT_PED_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_GET_IN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_GET_IN_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_DOOR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_DOOR_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_GETOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_GETOUT_LO_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_ALIGN_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_ALIGNHI_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_OPEN_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CARDOOR_LOCKED_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_PULL_OUT_PED_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_PULL_OUT_PED_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_GET_IN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_GET_IN_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_DOOR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_DOOR_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_SHUFFLE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_SHUFFLE_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_SIT, ASSOC_DELETEFADEDOUT },
+ { ANIM_STD_CAR_SIT_LO, ASSOC_DELETEFADEDOUT },
+ { ANIM_STD_CAR_SIT_P, ASSOC_DELETEFADEDOUT },
+ { ANIM_STD_CAR_SIT_P_LO, ASSOC_DELETEFADEDOUT },
+ { ANIM_STD_CAR_DRIVE_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_DRIVE_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_DRIVE_LEFT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_DRIVE_RIGHT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_DRIVEBY_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_DRIVEBY_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_LOOKBEHIND, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_BOAT_DRIVE, ASSOC_DELETEFADEDOUT },
+ { ANIM_STD_GETOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_GETOUT_LO_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_CLOSE_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CAR_HOOKERTALK, ASSOC_REPEAT | ASSOC_PARTIAL },
+ { ANIM_STD_COACH_OPEN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_COACH_OPEN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_COACH_GET_IN_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_COACH_GET_IN_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_COACH_GET_OUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_TRAIN_GETIN, ASSOC_PARTIAL },
+ { ANIM_STD_TRAIN_GETOUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CRAWLOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_CRAWLOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_OPEN_DOOR_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_GET_IN_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_GET_OUT_REAR_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_OPEN_DOOR_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_GET_IN_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_VAN_GET_OUT_REAR_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_GET_UP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_GET_UP_LEFT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_GET_UP_RIGHT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_GET_UP_FRONT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_JUMP_LAUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_JUMP_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_JUMP_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_FALL, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_FALL_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_FALL_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_FALL_COLLAPSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_EVADE_STEP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_EVADE_DIVE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
+ { ANIM_STD_XPRESS_SCRATCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
+ { ANIM_STD_ROADCROSS, ASSOC_REPEAT | ASSOC_PARTIAL },
+ { ANIM_STD_TURN180, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_ARREST, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_DROWN, ASSOC_PARTIAL },
+ { ANIM_MEDIC_CPR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_DUCK_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_DUCK_LOW, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_RBLOCK_SHOOT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
+ { ANIM_STD_THROW_UNDER2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_HANDSUP, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_HANDSCOWER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
+ { ANIM_STD_PARTIAL_FUCKU, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_NOWALK },
+ { ANIM_STD_PHONE_IN, ASSOC_PARTIAL },
+ { ANIM_STD_PHONE_OUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
+ { ANIM_STD_PHONE_TALK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
};
#ifdef PC_PLAYER_CONTROLS
AnimAssocDesc aStdAnimDescsSide[] = {
- { ANIM_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK | ASSOC_HAS_X_TRANSLATION },
- { ANIM_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK | ASSOC_HAS_X_TRANSLATION },
- { ANIM_SPRINT, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK | ASSOC_HAS_X_TRANSLATION },
- { ANIM_IDLE_STANCE, ASSOC_REPEAT },
- { ANIM_WALK_START, ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION },
+ { ANIM_STD_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK | ASSOC_HAS_X_TRANSLATION },
+ { ANIM_STD_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK | ASSOC_HAS_X_TRANSLATION },
+ { ANIM_STD_RUNFAST, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_WALK | ASSOC_HAS_X_TRANSLATION },
+ { ANIM_STD_IDLE, ASSOC_REPEAT },
+ { ANIM_STD_STARTWALK, ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION },
};
#endif
char const *aStdAnimations[] = {
diff --git a/src/animation/AnimationId.h b/src/animation/AnimationId.h
index 4b3dd92d..baf6eb33 100644
--- a/src/animation/AnimationId.h
+++ b/src/animation/AnimationId.h
@@ -2,68 +2,82 @@
enum AnimationId
{
- ANIM_WALK,
- ANIM_RUN,
- ANIM_SPRINT,
- ANIM_IDLE_STANCE,
- ANIM_WALK_START,
- ANIM_RUN_STOP,
- ANIM_RUN_STOP_R,
- ANIM_IDLE_CAM,
- ANIM_IDLE_HBHB,
- ANIM_IDLE_TIRED,
- ANIM_IDLE_ARMED,
- ANIM_IDLE_CHAT,
- ANIM_IDLE_TAXI,
- ANIM_KO_SHOT_FRONT1,
- ANIM_KO_SHOT_FRONT2,
- ANIM_KO_SHOT_FRONT3,
- ANIM_KO_SHOT_FRONT4,
- ANIM_KO_SHOT_FACE,
- ANIM_KO_SHOT_STOM,
- ANIM_KO_SHOT_ARML,
- ANIM_KO_SHOT_ARMR,
- ANIM_KO_SHOT_LEGL,
- ANIM_KO_SHOT_LEGR,
- ANIM_KD_LEFT,
- ANIM_KD_RIGHT,
- ANIM_KO_SKID_FRONT,
- ANIM_KO_SPIN_R, // named left in VC
- ANIM_KO_SKID_BACK,
- ANIM_KO_SPIN_L, // named right in VC
- ANIM_SHOT_FRONT_PARTIAL,
- ANIM_SHOT_LEFT_PARTIAL,
- ANIM_SHOT_BACK_PARTIAL,
- ANIM_SHOT_RIGHT_PARTIAL,
- ANIM_HIT_FRONT,
- ANIM_HIT_LEFT,
- ANIM_HIT_BACK,
- ANIM_HIT_RIGHT,
- ANIM_FLOOR_HIT,
+ ANIM_STD_WALK,
+ ANIM_STD_RUN,
+ ANIM_STD_RUNFAST,
+ ANIM_STD_IDLE,
+ ANIM_STD_STARTWALK,
+ ANIM_STD_RUNSTOP1,
+ ANIM_STD_RUNSTOP2,
+ ANIM_STD_IDLE_CAM,
+ ANIM_STD_IDLE_HBHB,
+ ANIM_STD_IDLE_TIRED,
+ ANIM_STD_IDLE_BIGGUN,
+ ANIM_STD_CHAT,
+ ANIM_STD_HAILTAXI,
+ ANIM_STD_KO_FRONT,
+ ANIM_STD_KO_LEFT,
+ ANIM_STD_KO_BACK,
+ ANIM_STD_KO_RIGHT,
+ ANIM_STD_KO_SHOT_FACE,
+ ANIM_STD_KO_SHOT_STOMACH,
+ ANIM_STD_KO_SHOT_ARM_L,
+ ANIM_STD_KO_SHOT_ARM_R,
+ ANIM_STD_KO_SHOT_LEG_L,
+ ANIM_STD_KO_SHOT_LEG_R,
+ ANIM_STD_SPINFORWARD_LEFT,
+ ANIM_STD_SPINFORWARD_RIGHT,
+ ANIM_STD_HIGHIMPACT_FRONT,
+ ANIM_STD_HIGHIMPACT_LEFT,
+ ANIM_STD_HIGHIMPACT_BACK,
+ ANIM_STD_HIGHIMPACT_RIGHT,
+ ANIM_STD_HITBYGUN_FRONT,
+ ANIM_STD_HITBYGUN_LEFT,
+ ANIM_STD_HITBYGUN_BACK,
+ ANIM_STD_HITBYGUN_RIGHT,
+ ANIM_STD_HIT_FRONT,
+ ANIM_STD_HIT_LEFT,
+ ANIM_STD_HIT_BACK,
+ ANIM_STD_HIT_RIGHT,
+ ANIM_STD_HIT_FLOOR,
+
+ /* names made up */
#if GTA_VERSION <= GTA3_PS2_160
- ANIM_HIT_BODY,
+ ANIM_STD_HIT_BODY,
#endif
- ANIM_HIT_BODYBLOW,
- ANIM_HIT_CHEST,
- ANIM_HIT_HEAD,
- ANIM_HIT_WALK,
- ANIM_HIT_WALL,
- ANIM_FLOOR_HIT_F,
- ANIM_HIT_BEHIND,
- ANIM_PUNCH_R,
- ANIM_KICK_FLOOR,
- ANIM_WEAPON_BAT_H,
- ANIM_WEAPON_BAT_V,
- ANIM_WEAPON_HGUN_BODY,
- ANIM_WEAPON_AK_BODY,
- ANIM_WEAPON_PUMP,
- ANIM_WEAPON_SNIPER,
- ANIM_WEAPON_THROW,
- ANIM_WEAPON_THROWU,
- ANIM_WEAPON_START_THROW,
- ANIM_BOMBER,
- ANIM_HGUN_RELOAD,
- ANIM_AK_RELOAD,
+ ANIM_STD_HIT_BODYBLOW,
+ ANIM_STD_HIT_CHEST,
+ ANIM_STD_HIT_HEAD,
+ ANIM_STD_HIT_WALK,
+ /**/
+
+ ANIM_STD_HIT_WALL,
+ ANIM_STD_HIT_FLOOR_FRONT,
+ ANIM_STD_HIT_BEHIND,
+ ANIM_STD_PUNCH,
+ ANIM_STD_KICKGROUND,
+
+ /* names made up */
+ ANIM_STD_WEAPON_BAT_H,
+ ANIM_STD_WEAPON_BAT_V,
+ ANIM_STD_WEAPON_HGUN_BODY,
+ ANIM_STD_WEAPON_AK_BODY,
+ ANIM_STD_WEAPON_PUMP,
+ ANIM_STD_WEAPON_SNIPER,
+ ANIM_STD_WEAPON_THROW,
+ /**/
+
+ ANIM_STD_THROW_UNDER,
+
+ /* names made up */
+ ANIM_STD_START_THROW,
+ /**/
+
+ ANIM_STD_DETONATE,
+
+ /* names made up */
+ ANIM_STD_HGUN_RELOAD,
+ ANIM_STD_AK_RELOAD,
#ifdef PC_PLAYER_CONTROLS
// maybe wrong define, but unused anyway
ANIM_FPS_PUNCH,
@@ -74,113 +88,123 @@ enum AnimationId
ANIM_FPS_M16,
ANIM_FPS_ROCKET,
#endif
- ANIM_FIGHT_IDLE,
- ANIM_FIGHT2_IDLE,
- ANIM_FIGHT_SH_F,
- ANIM_FIGHT_BODYBLOW,
- ANIM_FIGHT_HEAD,
- ANIM_FIGHT_KICK,
- ANIM_FIGHT_KNEE,
- ANIM_FIGHT_LHOOK,
- ANIM_FIGHT_PUNCH,
- ANIM_FIGHT_ROUNDHOUSE,
- ANIM_FIGHT_LONGKICK,
- ANIM_FIGHT_PPUNCH,
- ANIM_CAR_JACKED_RHS,
- ANIM_CAR_LJACKED_RHS,
- ANIM_CAR_JACKED_LHS,
- ANIM_CAR_LJACKED_LHS,
- ANIM_CAR_QJACK,
- ANIM_CAR_QJACKED,
- ANIM_CAR_ALIGN_LHS,
- ANIM_CAR_ALIGNHI_LHS,
- ANIM_CAR_OPEN_LHS,
- ANIM_CAR_DOORLOCKED_LHS,
- ANIM_CAR_PULLOUT_LHS,
- ANIM_CAR_PULLOUT_LOW_LHS,
- ANIM_CAR_GETIN_LHS,
- ANIM_CAR_GETIN_LOW_LHS,
- ANIM_CAR_CLOSEDOOR_LHS,
- ANIM_CAR_CLOSEDOOR_LOW_LHS,
- ANIM_CAR_ROLLDOOR,
- ANIM_CAR_ROLLDOOR_LOW,
- ANIM_CAR_GETOUT_LHS,
- ANIM_CAR_GETOUT_LOW_LHS,
- ANIM_CAR_CLOSE_LHS,
- ANIM_CAR_ALIGN_RHS,
- ANIM_CAR_ALIGNHI_RHS,
- ANIM_CAR_OPEN_RHS,
- ANIM_CAR_DOORLOCKED_RHS,
- ANIM_CAR_PULLOUT_RHS,
- ANIM_CAR_PULLOUT_LOW_RHS,
- ANIM_CAR_GETIN_RHS,
- ANIM_CAR_GETIN_LOW_RHS,
- ANIM_CAR_CLOSEDOOR_RHS,
- ANIM_CAR_CLOSEDOOR_LOW_RHS,
- ANIM_CAR_SHUFFLE_RHS,
- ANIM_CAR_LSHUFFLE_RHS,
- ANIM_CAR_SIT,
- ANIM_CAR_LSIT,
- ANIM_CAR_SITP,
- ANIM_CAR_SITPLO,
- ANIM_DRIVE_L,
- ANIM_DRIVE_R,
- ANIM_DRIVE_LOW_L,
- ANIM_DRIVE_LOW_R,
- ANIM_DRIVEBY_L,
- ANIM_DRIVEBY_R,
- ANIM_CAR_LB,
- ANIM_DRIVE_BOAT,
- ANIM_CAR_GETOUT_RHS,
- ANIM_CAR_GETOUT_LOW_RHS,
- ANIM_CAR_CLOSE_RHS,
- ANIM_CAR_HOOKERTALK,
- ANIM_COACH_OPEN_L,
- ANIM_COACH_OPEN_R,
- ANIM_COACH_IN_L,
- ANIM_COACH_IN_R,
- ANIM_COACH_OUT_L,
- ANIM_TRAIN_GETIN,
- ANIM_TRAIN_GETOUT,
- ANIM_CAR_CRAWLOUT_RHS,
- ANIM_CAR_CRAWLOUT_RHS2,
- ANIM_VAN_OPEN_L,
- ANIM_VAN_GETIN_L,
- ANIM_VAN_CLOSE_L,
- ANIM_VAN_GETOUT_L,
- ANIM_VAN_OPEN,
- ANIM_VAN_GETIN,
- ANIM_VAN_CLOSE,
- ANIM_VAN_GETOUT,
- ANIM_GETUP1,
- ANIM_GETUP2,
- ANIM_GETUP3,
- ANIM_GETUP_FRONT,
- ANIM_JUMP_LAUNCH,
- ANIM_JUMP_GLIDE,
- ANIM_JUMP_LAND,
- ANIM_FALL_FALL,
- ANIM_FALL_GLIDE,
- ANIM_FALL_LAND,
- ANIM_FALL_COLLAPSE,
- ANIM_EV_STEP,
- ANIM_EV_DIVE,
- ANIM_XPRESS_SCRATCH,
- ANIM_ROAD_CROSS,
- ANIM_TURN_180,
- ANIM_ARREST_GUN,
- ANIM_DROWN,
- ANIM_CPR,
- ANIM_DUCK_DOWN,
- ANIM_DUCK_LOW,
- ANIM_RBLOCK_CSHOOT,
- ANIM_WEAPON_THROWU2,
- ANIM_HANDSUP,
- ANIM_HANDSCOWER,
- ANIM_FUCKU,
- ANIM_PHONE_IN,
- ANIM_PHONE_OUT,
- ANIM_PHONE_TALK,
+ /**/
- NUM_ANIMS
+ ANIM_STD_FIGHT_IDLE,
+ ANIM_STD_FIGHT_2IDLE,
+ ANIM_STD_FIGHT_SHUFFLE_F,
+
+ /* names made up */
+ ANIM_STD_FIGHT_BODYBLOW,
+ ANIM_STD_FIGHT_HEAD,
+ ANIM_STD_FIGHT_KICK,
+ ANIM_STD_FIGHT_KNEE,
+ ANIM_STD_FIGHT_LHOOK,
+ ANIM_STD_FIGHT_PUNCH,
+ ANIM_STD_FIGHT_ROUNDHOUSE,
+ ANIM_STD_FIGHT_LONGKICK,
+ /**/
+
+ ANIM_STD_PARTIAL_PUNCH,
+ ANIM_STD_JACKEDCAR_RHS,
+ ANIM_STD_JACKEDCAR_LO_RHS,
+ ANIM_STD_JACKEDCAR_LHS,
+ ANIM_STD_JACKEDCAR_LO_LHS,
+ ANIM_STD_QUICKJACK,
+ ANIM_STD_QUICKJACKED,
+ ANIM_STD_CAR_ALIGN_DOOR_LHS,
+ ANIM_STD_CAR_ALIGNHI_DOOR_LHS,
+ ANIM_STD_CAR_OPEN_DOOR_LHS,
+ ANIM_STD_CARDOOR_LOCKED_LHS,
+ ANIM_STD_CAR_PULL_OUT_PED_LHS,
+ ANIM_STD_CAR_PULL_OUT_PED_LO_LHS,
+ ANIM_STD_CAR_GET_IN_LHS,
+ ANIM_STD_CAR_GET_IN_LO_LHS,
+ ANIM_STD_CAR_CLOSE_DOOR_LHS,
+ ANIM_STD_CAR_CLOSE_DOOR_LO_LHS,
+ ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS,
+ ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS,
+ ANIM_STD_GETOUT_LHS,
+ ANIM_STD_GETOUT_LO_LHS,
+ ANIM_STD_CAR_CLOSE_LHS,
+ ANIM_STD_CAR_ALIGN_DOOR_RHS,
+ ANIM_STD_CAR_ALIGNHI_DOOR_RHS,
+ ANIM_STD_CAR_OPEN_DOOR_RHS,
+ ANIM_STD_CARDOOR_LOCKED_RHS,
+ ANIM_STD_CAR_PULL_OUT_PED_RHS,
+ ANIM_STD_CAR_PULL_OUT_PED_LO_RHS,
+ ANIM_STD_CAR_GET_IN_RHS,
+ ANIM_STD_CAR_GET_IN_LO_RHS,
+ ANIM_STD_CAR_CLOSE_DOOR_RHS,
+ ANIM_STD_CAR_CLOSE_DOOR_LO_RHS,
+ ANIM_STD_CAR_SHUFFLE_RHS,
+ ANIM_STD_CAR_SHUFFLE_LO_RHS,
+ ANIM_STD_CAR_SIT,
+ ANIM_STD_CAR_SIT_LO,
+ ANIM_STD_CAR_SIT_P,
+ ANIM_STD_CAR_SIT_P_LO,
+ ANIM_STD_CAR_DRIVE_LEFT,
+ ANIM_STD_CAR_DRIVE_RIGHT,
+ ANIM_STD_CAR_DRIVE_LEFT_LO,
+ ANIM_STD_CAR_DRIVE_RIGHT_LO,
+ ANIM_STD_CAR_DRIVEBY_LEFT,
+ ANIM_STD_CAR_DRIVEBY_RIGHT,
+ ANIM_STD_CAR_LOOKBEHIND,
+ ANIM_STD_BOAT_DRIVE,
+ ANIM_STD_GETOUT_RHS,
+ ANIM_STD_GETOUT_LO_RHS,
+ ANIM_STD_CAR_CLOSE_RHS,
+ ANIM_STD_CAR_HOOKERTALK,
+ ANIM_STD_COACH_OPEN_LHS,
+ ANIM_STD_COACH_OPEN_RHS,
+ ANIM_STD_COACH_GET_IN_LHS,
+ ANIM_STD_COACH_GET_IN_RHS,
+ ANIM_STD_COACH_GET_OUT_LHS,
+ ANIM_STD_TRAIN_GETIN,
+ ANIM_STD_TRAIN_GETOUT,
+ ANIM_STD_CRAWLOUT_LHS,
+ ANIM_STD_CRAWLOUT_RHS,
+ ANIM_STD_VAN_OPEN_DOOR_REAR_LHS,
+ ANIM_STD_VAN_GET_IN_REAR_LHS,
+ ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS,
+ ANIM_STD_VAN_GET_OUT_REAR_LHS,
+ ANIM_STD_VAN_OPEN_DOOR_REAR_RHS,
+ ANIM_STD_VAN_GET_IN_REAR_RHS,
+ ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS,
+ ANIM_STD_VAN_GET_OUT_REAR_RHS,
+ ANIM_STD_GET_UP,
+ ANIM_STD_GET_UP_LEFT,
+ ANIM_STD_GET_UP_RIGHT,
+ ANIM_STD_GET_UP_FRONT,
+ ANIM_STD_JUMP_LAUNCH,
+ ANIM_STD_JUMP_GLIDE,
+ ANIM_STD_JUMP_LAND,
+ ANIM_STD_FALL,
+ ANIM_STD_FALL_GLIDE,
+ ANIM_STD_FALL_LAND,
+ ANIM_STD_FALL_COLLAPSE,
+ ANIM_STD_EVADE_STEP,
+ ANIM_STD_EVADE_DIVE,
+ ANIM_STD_XPRESS_SCRATCH,
+ ANIM_STD_ROADCROSS,
+ ANIM_STD_TURN180,
+ ANIM_STD_ARREST,
+ ANIM_STD_DROWN,
+ ANIM_MEDIC_CPR,
+ ANIM_STD_DUCK_DOWN,
+ ANIM_STD_DUCK_LOW,
+ ANIM_STD_RBLOCK_SHOOT,
+
+ /* names made up */
+ ANIM_STD_THROW_UNDER2,
+ /**/
+
+ ANIM_STD_HANDSUP,
+ ANIM_STD_HANDSCOWER,
+ ANIM_STD_PARTIAL_FUCKU,
+ ANIM_STD_PHONE_IN,
+ ANIM_STD_PHONE_OUT,
+ ANIM_STD_PHONE_TALK,
+
+ ANIM_STD_NUM
};
\ No newline at end of file
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index 6ce7bbac..5af762f9 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -10,20 +10,39 @@
const int CollisionSoundIntensity = 60;
-cAudioCollisionManager::cAudioCollisionManager()
+void
+cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower,
+ float velocity)
{
- m_sQueue.m_pEntity1 = nil;
- m_sQueue.m_pEntity2 = nil;
- m_sQueue.m_bSurface1 = SURFACE_DEFAULT;
- m_sQueue.m_bSurface2 = SURFACE_DEFAULT;
- m_sQueue.m_fIntensity2 = 0.0f;
- m_sQueue.m_fIntensity1 = 0.0f;
- m_sQueue.m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
+ float distSquared;
+ CVector v1;
+ CVector v2;
- for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
- m_bIndicesTable[i] = NUMAUDIOCOLLISIONS;
+ if(!m_bIsInitialised || m_nCollisionEntity < 0 || m_nUserPause ||
+ (velocity < 0.0016f && collisionPower < 0.01f))
+ return;
- m_bCollisionsInQueue = 0;
+ if(entity1->IsBuilding()) {
+ v1 = v2 = entity2->GetPosition();
+ } else if(entity2->IsBuilding()) {
+ v1 = v2 = entity1->GetPosition();
+ } else {
+ v1 = entity1->GetPosition();
+ v2 = entity2->GetPosition();
+ }
+ CVector pos = (v1 + v2) * 0.5f;
+ distSquared = GetDistanceSquared(pos);
+ if(distSquared < SQR(CollisionSoundIntensity)) {
+ m_sCollisionManager.m_sQueue.m_pEntity1 = entity1;
+ m_sCollisionManager.m_sQueue.m_pEntity2 = entity2;
+ m_sCollisionManager.m_sQueue.m_bSurface1 = surface1;
+ m_sCollisionManager.m_sQueue.m_bSurface2 = surface2;
+ m_sCollisionManager.m_sQueue.m_fIntensity1 = collisionPower;
+ m_sCollisionManager.m_sQueue.m_fIntensity2 = velocity;
+ m_sCollisionManager.m_sQueue.m_vecPosition = pos;
+ m_sCollisionManager.m_sQueue.m_fDistance = distSquared;
+ m_sCollisionManager.AddCollisionToRequestedQueue();
+ }
}
void
@@ -55,136 +74,71 @@ cAudioCollisionManager::AddCollisionToRequestedQueue()
m_bIndicesTable[i] = collisionsIndex;
}
-float
-cAudioManager::GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const
-{
- return GetCollisionRatio(c, 0.0f, 0.02f, 0.02f);
-}
-
-float
-cAudioManager::GetCollisionOneShotRatio(int32 a, float b) const
-{
- float result;
-
- switch(a) {
- case SURFACE_DEFAULT:
- case SURFACE_TARMAC:
- case SURFACE_PAVEMENT:
- case SURFACE_STEEP_CLIFF:
- case SURFACE_TRANSPARENT_STONE: result = GetCollisionRatio(b, 10.f, 60.f, 50.f); break;
- case SURFACE_GRASS:
- case SURFACE_CARDBOARDBOX: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
- case SURFACE_GRAVEL: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
- case SURFACE_MUD_DRY: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
- case SURFACE_CAR: result = GetCollisionRatio(b, 6.f, 50.f, 44.f); break;
- case SURFACE_GLASS: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
- case SURFACE_TRANSPARENT_CLOTH:
- case SURFACE_THICK_METAL_PLATE: result = GetCollisionRatio(b, 30.f, 130.f, 100.f); break;
- case SURFACE_GARAGE_DOOR: result = GetCollisionRatio(b, 20.f, 100.f, 80.f); break;
- case SURFACE_CAR_PANEL: result = GetCollisionRatio(b, 0.f, 4.f, 4.f); break;
- case SURFACE_SCAFFOLD_POLE:
- case SURFACE_METAL_GATE: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
- case SURFACE_LAMP_POST: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
- case SURFACE_FIRE_HYDRANT: result = GetCollisionRatio(b, 1.f, 15.f, 14.f); break;
- case SURFACE_GIRDER: result = GetCollisionRatio(b, 8.f, 50.f, 42.f); break;
- case SURFACE_METAL_CHAIN_FENCE: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
- case SURFACE_PED: result = GetCollisionRatio(b, 0.f, 20.f, 20.f); break;
- case SURFACE_SAND: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
- case SURFACE_WATER: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
- case SURFACE_WOOD_CRATES: result = GetCollisionRatio(b, 1.f, 4.f, 3.f); break;
- case SURFACE_WOOD_BENCH: result = GetCollisionRatio(b, 0.1f, 5.f, 4.9f); break;
- case SURFACE_WOOD_SOLID: result = GetCollisionRatio(b, 0.1f, 40.f, 39.9f); break;
- case SURFACE_RUBBER:
- case SURFACE_WHEELBASE: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
- case SURFACE_PLASTIC: result = GetCollisionRatio(b, 0.1f, 4.f, 3.9f); break;
- case SURFACE_HEDGE: result = GetCollisionRatio(b, 0.f, 0.5f, 0.5f); break;
- case SURFACE_CONTAINER: result = GetCollisionRatio(b, 4.f, 40.f, 36.f); break;
- case SURFACE_NEWS_VENDOR: result = GetCollisionRatio(b, 0.f, 5.f, 5.f); break;
- default: result = 0.f; break;
- }
-
- return result;
-}
-
-float
-cAudioManager::GetCollisionRatio(float a, float b, float c, float d) const
-{
- float e;
- e = a;
- if(a <= b) return 0.0f;
- if(c <= a) e = c;
- return (e - b) / d;
-}
-
-uint32
-cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision)
-{
- uint8 surface1 = audioCollision.m_bSurface1;
- uint8 surface2 = audioCollision.m_bSurface2;
- int32 vol;
- float ratio;
-
- if(surface1 == SURFACE_GRASS || surface2 == SURFACE_GRASS || surface1 == SURFACE_HEDGE ||
- surface2 == SURFACE_HEDGE) {
- ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
- m_sQueueSample.m_nSampleIndex = SFX_RAIN;
- m_sQueueSample.m_nFrequency = 13000.f * ratio + 35000;
- vol = 50.f * ratio;
- } else if(surface1 == SURFACE_WATER || surface2 == SURFACE_WATER) {
- ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
- m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
- m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000;
- vol = 30.f * ratio;
- } else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY ||
- surface2 == SURFACE_MUD_DRY || surface1 == SURFACE_SAND || surface2 == SURFACE_SAND) {
- ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
- m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID;
- m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000;
- vol = 50.f * ratio;
- } else if(surface1 == SURFACE_PED || surface2 == SURFACE_PED) {
- return 0;
- } else {
- ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
- m_sQueueSample.m_nSampleIndex = SFX_SCRAPE_CAR_1;
- m_sQueueSample.m_nFrequency = 10000.f * ratio + 10000;
- vol = 40.f * ratio;
- }
- if(audioCollision.m_nBaseVolume < 2) vol = audioCollision.m_nBaseVolume * vol / 2;
- return vol;
-}
-
void
-cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
+cAudioManager::ServiceCollisions()
{
- if(col.m_fIntensity2 > 0.0016f) {
- uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
- if(emittingVol) {
- m_sQueueSample.m_fDistance = Sqrt(col.m_fDistance);
- m_sQueueSample.m_nVolume =
- ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
- if(m_sQueueSample.m_nVolume) {
- m_sQueueSample.m_nCounter = counter;
- m_sQueueSample.m_vecPos = col.m_vecPosition;
- m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
- m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart =
- SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd =
- SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
- AddSampleToRequestedQueue();
+ int i, j;
+ bool8 abRepeatedCollision1[NUMAUDIOCOLLISIONS];
+ bool8 abRepeatedCollision2[NUMAUDIOCOLLISIONS];
+
+ m_sQueueSample.m_nEntityIndex = m_nCollisionEntity;
+
+ for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
+ abRepeatedCollision1[i] = abRepeatedCollision2[i] = FALSE;
+
+ for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
+ for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
+ int index = m_sCollisionManager.m_bIndicesTable[i];
+ if ((m_sCollisionManager.m_asCollisions1[index].m_pEntity1 == m_sCollisionManager.m_asCollisions2[j].m_pEntity1)
+ && (m_sCollisionManager.m_asCollisions1[index].m_pEntity2 == m_sCollisionManager.m_asCollisions2[j].m_pEntity2)
+ && (m_sCollisionManager.m_asCollisions1[index].m_bSurface1 == m_sCollisionManager.m_asCollisions2[j].m_bSurface1)
+ && (m_sCollisionManager.m_asCollisions1[index].m_bSurface2 == m_sCollisionManager.m_asCollisions2[j].m_bSurface2)
+ ) {
+ abRepeatedCollision1[index] = TRUE;
+ abRepeatedCollision2[j] = TRUE;
+ m_sCollisionManager.m_asCollisions1[index].m_nBaseVolume = ++m_sCollisionManager.m_asCollisions2[j].m_nBaseVolume;
+ SetUpLoopingCollisionSound(m_sCollisionManager.m_asCollisions1[index], j);
+ break;
}
}
}
+
+ for (i = 0; i < NUMAUDIOCOLLISIONS; i++) {
+ if (!abRepeatedCollision2[i]) {
+ m_sCollisionManager.m_asCollisions2[i].m_pEntity1 = nil;
+ m_sCollisionManager.m_asCollisions2[i].m_pEntity2 = nil;
+ m_sCollisionManager.m_asCollisions2[i].m_bSurface1 = SURFACE_DEFAULT;
+ m_sCollisionManager.m_asCollisions2[i].m_bSurface2 = SURFACE_DEFAULT;
+ m_sCollisionManager.m_asCollisions2[i].m_fIntensity2 = 0.0f;
+ m_sCollisionManager.m_asCollisions2[i].m_fIntensity1 = 0.0f;
+ m_sCollisionManager.m_asCollisions2[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
+ m_sCollisionManager.m_asCollisions2[i].m_fDistance = 0.0f;
+ }
+ }
+
+ for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
+ int index = m_sCollisionManager.m_bIndicesTable[i];
+ if (!abRepeatedCollision1[index]) {
+ for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
+ if (!abRepeatedCollision2[j]) {
+ m_sCollisionManager.m_asCollisions2[j].m_nBaseVolume = 1;
+ m_sCollisionManager.m_asCollisions2[j].m_pEntity1 = m_sCollisionManager.m_asCollisions1[index].m_pEntity1;
+ m_sCollisionManager.m_asCollisions2[j].m_pEntity2 = m_sCollisionManager.m_asCollisions1[index].m_pEntity2;
+ m_sCollisionManager.m_asCollisions2[j].m_bSurface1 = m_sCollisionManager.m_asCollisions1[index].m_bSurface1;
+ m_sCollisionManager.m_asCollisions2[j].m_bSurface2 = m_sCollisionManager.m_asCollisions1[index].m_bSurface2;
+ break;
+ }
+ }
+ SetUpOneShotCollisionSound(m_sCollisionManager.m_asCollisions1[index]);
+ SetUpLoopingCollisionSound(m_sCollisionManager.m_asCollisions1[index], j);
+ }
+ }
+
+ for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
+ m_sCollisionManager.m_bIndicesTable[i] = NUMAUDIOCOLLISIONS;
+ m_sCollisionManager.m_bCollisionsInQueue = 0;
}
+
static const int32 gOneShotCol[] = {SFX_COL_TARMAC_1,
SFX_COL_TARMAC_1,
SFX_COL_GRASS_1,
@@ -222,9 +176,8 @@ static const int32 gOneShotCol[] = {SFX_COL_TARMAC_1,
void
cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
{
-
- int16 s1;
- int16 s2;
+ uint16 s1;
+ uint16 s2;
int32 emittingVol;
float ratio;
@@ -250,7 +203,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
m_sQueueSample.m_fDistance = Sqrt(col.m_fDistance);
m_sQueueSample.m_nVolume =
ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
- if(m_sQueueSample.m_nVolume) {
+ if(m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = gOneShotCol[s1];
switch(m_sQueueSample.m_nSampleIndex) {
case SFX_COL_TARMAC_1:
@@ -307,17 +260,16 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
if(counter >= 255) counter = 28;
m_sQueueSample.m_vecPos = col.m_vecPosition;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 11;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 11;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ SET_EMITTING_VOLUME(emittingVol);
+ RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = CollisionSoundIntensity;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -325,101 +277,127 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
}
void
-cAudioManager::ServiceCollisions()
+cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
{
- int i, j;
- bool abRepeatedCollision1[NUMAUDIOCOLLISIONS];
- bool abRepeatedCollision2[NUMAUDIOCOLLISIONS];
-
- m_sQueueSample.m_nEntityIndex = m_nCollisionEntity;
-
- for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
- abRepeatedCollision1[i] = abRepeatedCollision2[i] = false;
-
- for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
- for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
- int index = m_sCollisionManager.m_bIndicesTable[i];
- if ((m_sCollisionManager.m_asCollisions1[index].m_pEntity1 == m_sCollisionManager.m_asCollisions2[j].m_pEntity1)
- && (m_sCollisionManager.m_asCollisions1[index].m_pEntity2 == m_sCollisionManager.m_asCollisions2[j].m_pEntity2)
- && (m_sCollisionManager.m_asCollisions1[index].m_bSurface1 == m_sCollisionManager.m_asCollisions2[j].m_bSurface1)
- && (m_sCollisionManager.m_asCollisions1[index].m_bSurface2 == m_sCollisionManager.m_asCollisions2[j].m_bSurface2)
- ) {
- abRepeatedCollision1[index] = true;
- abRepeatedCollision2[j] = true;
- m_sCollisionManager.m_asCollisions1[index].m_nBaseVolume = ++m_sCollisionManager.m_asCollisions2[j].m_nBaseVolume;
- SetUpLoopingCollisionSound(m_sCollisionManager.m_asCollisions1[index], j);
- break;
+ if(col.m_fIntensity2 > 0.0016f) {
+ uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
+ if(emittingVol) {
+ m_sQueueSample.m_fDistance = Sqrt(col.m_fDistance);
+ m_sQueueSample.m_nVolume =
+ ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
+ if(m_sQueueSample.m_nVolume > 0) {
+ m_sQueueSample.m_nCounter = counter;
+ m_sQueueSample.m_vecPos = col.m_vecPosition;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 7;
+ m_sQueueSample.m_nLoopCount = 0;
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
+ m_sQueueSample.m_MaxDistance = CollisionSoundIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
+ AddSampleToRequestedQueue();
}
}
}
-
- for (i = 0; i < NUMAUDIOCOLLISIONS; i++) {
- if (!abRepeatedCollision2[i]) {
- m_sCollisionManager.m_asCollisions2[i].m_pEntity1 = nil;
- m_sCollisionManager.m_asCollisions2[i].m_pEntity2 = nil;
- m_sCollisionManager.m_asCollisions2[i].m_bSurface1 = SURFACE_DEFAULT;
- m_sCollisionManager.m_asCollisions2[i].m_bSurface2 = SURFACE_DEFAULT;
- m_sCollisionManager.m_asCollisions2[i].m_fIntensity2 = 0.0f;
- m_sCollisionManager.m_asCollisions2[i].m_fIntensity1 = 0.0f;
- m_sCollisionManager.m_asCollisions2[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
- m_sCollisionManager.m_asCollisions2[i].m_fDistance = 0.0f;
- }
- }
-
- for (i = 0; i < m_sCollisionManager.m_bCollisionsInQueue; i++) {
- int index = m_sCollisionManager.m_bIndicesTable[i];
- if (!abRepeatedCollision1[index]) {
- for (j = 0; j < NUMAUDIOCOLLISIONS; j++) {
- if (!abRepeatedCollision2[j]) {
- m_sCollisionManager.m_asCollisions2[j].m_nBaseVolume = 1;
- m_sCollisionManager.m_asCollisions2[j].m_pEntity1 = m_sCollisionManager.m_asCollisions1[index].m_pEntity1;
- m_sCollisionManager.m_asCollisions2[j].m_pEntity2 = m_sCollisionManager.m_asCollisions1[index].m_pEntity2;
- m_sCollisionManager.m_asCollisions2[j].m_bSurface1 = m_sCollisionManager.m_asCollisions1[index].m_bSurface1;
- m_sCollisionManager.m_asCollisions2[j].m_bSurface2 = m_sCollisionManager.m_asCollisions1[index].m_bSurface2;
- break;
- }
- }
- SetUpOneShotCollisionSound(m_sCollisionManager.m_asCollisions1[index]);
- SetUpLoopingCollisionSound(m_sCollisionManager.m_asCollisions1[index], j);
- }
- }
-
- for (int i = 0; i < NUMAUDIOCOLLISIONS; i++)
- m_sCollisionManager.m_bIndicesTable[i] = NUMAUDIOCOLLISIONS;
- m_sCollisionManager.m_bCollisionsInQueue = 0;
}
-void
-cAudioManager::ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower,
- float velocity)
+uint32
+cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision)
{
- float distSquared;
- CVector v1;
- CVector v2;
+ uint8 surface1 = audioCollision.m_bSurface1;
+ uint8 surface2 = audioCollision.m_bSurface2;
+ int32 vol;
+ float ratio;
- if(!m_bIsInitialised || m_nCollisionEntity < 0 || m_nUserPause ||
- (velocity < 0.0016f && collisionPower < 0.01f))
- return;
-
- if(entity1->IsBuilding()) {
- v1 = v2 = entity2->GetPosition();
- } else if(entity2->IsBuilding()) {
- v1 = v2 = entity1->GetPosition();
+ if(surface1 == SURFACE_GRASS || surface2 == SURFACE_GRASS || surface1 == SURFACE_HEDGE ||
+ surface2 == SURFACE_HEDGE) {
+ ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
+ m_sQueueSample.m_nSampleIndex = SFX_RAIN;
+ m_sQueueSample.m_nFrequency = 13000.f * ratio + 35000;
+ vol = 50.f * ratio;
+ } else if(surface1 == SURFACE_WATER || surface2 == SURFACE_WATER) {
+ ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
+ m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
+ m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000;
+ vol = 30.f * ratio;
+ } else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY ||
+ surface2 == SURFACE_MUD_DRY || surface1 == SURFACE_SAND || surface2 == SURFACE_SAND) {
+ ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
+ m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID;
+ m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000;
+ vol = 50.f * ratio;
+ } else if(surface1 == SURFACE_PED || surface2 == SURFACE_PED) {
+ return 0;
} else {
- v1 = entity1->GetPosition();
- v2 = entity2->GetPosition();
- }
- CVector pos = (v1 + v2) * 0.5f;
- distSquared = GetDistanceSquared(pos);
- if(distSquared < SQR(CollisionSoundIntensity)) {
- m_sCollisionManager.m_sQueue.m_pEntity1 = entity1;
- m_sCollisionManager.m_sQueue.m_pEntity2 = entity2;
- m_sCollisionManager.m_sQueue.m_bSurface1 = surface1;
- m_sCollisionManager.m_sQueue.m_bSurface2 = surface2;
- m_sCollisionManager.m_sQueue.m_fIntensity1 = collisionPower;
- m_sCollisionManager.m_sQueue.m_fIntensity2 = velocity;
- m_sCollisionManager.m_sQueue.m_vecPosition = pos;
- m_sCollisionManager.m_sQueue.m_fDistance = distSquared;
- m_sCollisionManager.AddCollisionToRequestedQueue();
+ ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
+ m_sQueueSample.m_nSampleIndex = SFX_SCRAPE_CAR_1;
+ m_sQueueSample.m_nFrequency = 10000.f * ratio + 10000;
+ vol = 40.f * ratio;
}
+ if(audioCollision.m_nBaseVolume < 2) vol = audioCollision.m_nBaseVolume * vol / 2;
+ return vol;
+}
+
+float
+cAudioManager::GetCollisionOneShotRatio(uint32 a, float b)
+{
+ switch(a) {
+ case SURFACE_DEFAULT:
+ case SURFACE_TARMAC:
+ case SURFACE_PAVEMENT:
+ case SURFACE_STEEP_CLIFF:
+ case SURFACE_TRANSPARENT_STONE: return GetCollisionRatio(b, 10.f, 60.f, 50.f);
+ case SURFACE_GRASS:
+ case SURFACE_CARDBOARDBOX:
+ case SURFACE_GRAVEL:
+ case SURFACE_MUD_DRY: return GetCollisionRatio(b, 0.f, 2.f, 2.f);
+ case SURFACE_CAR: return GetCollisionRatio(b, 6.f, 50.f, 44.f);
+ case SURFACE_GLASS:
+ case SURFACE_METAL_CHAIN_FENCE: return GetCollisionRatio(b, 0.1f, 10.f, 9.9f);
+ case SURFACE_TRANSPARENT_CLOTH:
+ case SURFACE_THICK_METAL_PLATE: return GetCollisionRatio(b, 30.f, 130.f, 100.f);
+ case SURFACE_GARAGE_DOOR: return GetCollisionRatio(b, 20.f, 100.f, 80.f);
+ case SURFACE_CAR_PANEL: return GetCollisionRatio(b, 0.f, 4.f, 4.f);
+ case SURFACE_SCAFFOLD_POLE:
+ case SURFACE_METAL_GATE:
+ case SURFACE_LAMP_POST: return GetCollisionRatio(b, 1.f, 10.f, 9.f);
+ case SURFACE_FIRE_HYDRANT: return GetCollisionRatio(b, 1.f, 15.f, 14.f);
+ case SURFACE_GIRDER: return GetCollisionRatio(b, 8.f, 50.f, 42.f);
+ case SURFACE_PED: return GetCollisionRatio(b, 0.f, 20.f, 20.f);
+ case SURFACE_SAND:
+ case SURFACE_WATER:
+ case SURFACE_RUBBER:
+ case SURFACE_WHEELBASE: return GetCollisionRatio(b, 0.f, 10.f, 10.f);
+ case SURFACE_WOOD_CRATES: return GetCollisionRatio(b, 1.f, 4.f, 3.f);
+ case SURFACE_WOOD_BENCH: return GetCollisionRatio(b, 0.1f, 5.f, 4.9f);
+ case SURFACE_WOOD_SOLID: return GetCollisionRatio(b, 0.1f, 40.f, 39.9f);
+ case SURFACE_PLASTIC: return GetCollisionRatio(b, 0.1f, 4.f, 3.9f);
+ case SURFACE_HEDGE: return GetCollisionRatio(b, 0.f, 0.5f, 0.5f);
+ case SURFACE_CONTAINER: return GetCollisionRatio(b, 4.f, 40.f, 36.f);
+ case SURFACE_NEWS_VENDOR: return GetCollisionRatio(b, 0.f, 5.f, 5.f);
+ default: break;
+ }
+
+ return 0.f;
+}
+
+float
+cAudioManager::GetCollisionLoopingRatio(uint32 a, uint32 b, float c)
+{
+ return GetCollisionRatio(c, 0.0f, 0.02f, 0.02f);
+}
+
+float
+cAudioManager::GetCollisionRatio(float a, float b, float c, float d)
+{
+ float e;
+ e = a;
+ if(a <= b) return 0.0f;
+ if(c <= a) e = c;
+ return (e - b) / d;
}
diff --git a/src/audio/AudioCollision.h b/src/audio/AudioCollision.h
index 0a058916..a201d500 100644
--- a/src/audio/AudioCollision.h
+++ b/src/audio/AudioCollision.h
@@ -17,7 +17,18 @@ public:
float m_fDistance;
int32 m_nBaseVolume;
- // no methods
+ cAudioCollision() { Reset(); }
+
+ void Reset()
+ {
+ m_pEntity1 = nil;
+ m_pEntity2 = nil;
+ m_bSurface1 = 0;
+ m_bSurface2 = 0;
+ m_fIntensity1 = m_fIntensity2 = 0.0f;
+ m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
+ m_fDistance = 0.0f;
+ }
};
VALIDATE_SIZE(cAudioCollision, 40);
@@ -31,7 +42,15 @@ public:
uint8 m_bCollisionsInQueue;
cAudioCollision m_sQueue;
- cAudioCollisionManager();
+ cAudioCollisionManager()
+ {
+ m_sQueue.Reset();
+
+ for(int i = 0; i < NUMAUDIOCOLLISIONS; i++)
+ m_bIndicesTable[i] = NUMAUDIOCOLLISIONS;
+
+ m_bCollisionsInQueue = 0;
+ }
void AddCollisionToRequestedQueue();
};
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index eab14ce6..d09352be 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -38,9 +38,12 @@
#include "ZoneCull.h"
#include "sampman.h"
-const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
-const int policeChannel = channels + 1;
-const int allChannels = channels + 2;
+// TODO: Get rid of *intensity* consts (and get rid of term 'intensity' in general)
+// Make them defines, not floats because they were not floats on PS2
+
+#ifndef GTA_PS2
+#define CHANNEL_PLAYER_VEHICLE_ENGINE m_nActiveSamples
+#endif
uint32 gPornNextTime;
uint32 gSawMillNextTime;
@@ -52,11 +55,8 @@ uint32 gHomeNextTime;
uint32 gCellNextTime;
uint32 gNextCryTime;
-enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
-enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
-
void
-cAudioManager::PreInitialiseGameSpecificSetup() const
+cAudioManager::PreInitialiseGameSpecificSetup()
{
BankStartOffset[SFX_BANK_0] = SAMPLEBANK_START;
#ifdef GTA_PS2
@@ -128,41 +128,42 @@ cAudioManager::PostInitialiseGameSpecificSetup()
{
m_nFireAudioEntity = CreateEntity(AUDIOTYPE_FIRE, &gFireManager);
if (m_nFireAudioEntity >= 0)
- SetEntityStatus(m_nFireAudioEntity, true);
+ SetEntityStatus(m_nFireAudioEntity, TRUE);
m_nCollisionEntity = CreateEntity(AUDIOTYPE_COLLISION, (void *)1);
if (m_nCollisionEntity >= 0)
- SetEntityStatus(m_nCollisionEntity, true);
+ SetEntityStatus(m_nCollisionEntity, TRUE);
m_nFrontEndEntity = CreateEntity(AUDIOTYPE_FRONTEND, (void *)1);
if (m_nFrontEndEntity >= 0)
- SetEntityStatus(m_nFrontEndEntity, true);
+ SetEntityStatus(m_nFrontEndEntity, TRUE);
m_nProjectileEntity = CreateEntity(AUDIOTYPE_PROJECTILE, (void *)1);
if (m_nProjectileEntity >= 0)
- SetEntityStatus(m_nProjectileEntity, true);
+ SetEntityStatus(m_nProjectileEntity, TRUE);
m_nWaterCannonEntity = CreateEntity(AUDIOTYPE_WATERCANNON, (void *)1);
if (m_nWaterCannonEntity >= 0)
- SetEntityStatus(m_nWaterCannonEntity, true);
+ SetEntityStatus(m_nWaterCannonEntity, TRUE);
m_nPoliceChannelEntity = CreateEntity(AUDIOTYPE_POLICERADIO, (void *)1);
if (m_nPoliceChannelEntity >= 0)
- SetEntityStatus(m_nPoliceChannelEntity, true);
+ SetEntityStatus(m_nPoliceChannelEntity, TRUE);
m_nBridgeEntity = CreateEntity(AUDIOTYPE_BRIDGE, (void *)1);
if (m_nBridgeEntity >= 0)
- SetEntityStatus(m_nBridgeEntity, true);
+ SetEntityStatus(m_nBridgeEntity, TRUE);
- m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
- m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_NOT_LOADED;
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying = false;
- m_sMissionAudio.m_bIsPlayed = false;
- m_sMissionAudio.m_bPredefinedProperties = true;
- m_sMissionAudio.m_nMissionAudioCounter = 0;
+ m_nMissionAudioSampleIndex = NO_SAMPLE;
+ m_nMissionAudioLoadingStatus = LOADING_STATUS_NOT_LOADED;
+ m_nMissionAudioPlayStatus = PLAY_STATUS_STOPPED;
+ m_bIsMissionAudioPlaying = FALSE;
+ m_bIsMissionAudioAllowedToPlay = FALSE;
+ m_bIsMissionAudio2D = TRUE;
+ m_nMissionAudioFramesToPlay = 0;
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
}
+
void
cAudioManager::PreTerminateGameSpecificShutdown()
{
@@ -224,40 +225,53 @@ cAudioManager::ResetAudioLogicTimers(uint32 timer)
}
}
ClearMissionAudio();
- SampleManager.StopChannel(policeChannel);
+ SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
}
void
-cAudioManager::ProcessReverb() const
+cAudioManager::ProcessReverb()
{
+#ifdef EXTERNAL_3D_SOUND
if (SampleManager.UpdateReverb() && m_bDynamicAcousticModelingStatus) {
+#ifndef GTA_PS2
for (uint32 i = 0; i <
#ifdef FIX_BUGS
- channels
+ NUM_CHANNELS_GENERIC
#else
- 28
+ NUM_CHANNELS_GENERIC+1
#endif
;
i++) {
- if (m_asActiveSamples[i].m_bReverbFlag)
- SampleManager.SetChannelReverbFlag(i, true);
+ if (m_asActiveSamples[i].m_bReverb)
+ SampleManager.SetChannelReverbFlag(i, TRUE);
}
+#endif
}
+#else
+ // TODO: PS2 code
+
+ static uint8 OldVolL = 0;
+ static uint8 OldVolR = 0;
+
+ // SoundDistUp, SoundDistLeft, SoundDistRight used in here from TheCamera
+
+ SampleManager.UpdateReverb();
+#endif
}
float
-cAudioManager::GetDistanceSquared(const CVector &v) const
+cAudioManager::GetDistanceSquared(const CVector &v)
{
const CVector &c = TheCamera.GetPosition();
return sq(v.x - c.x) + sq(v.y - c.y) + sq((v.z - c.z) * 0.2f);
}
void
-cAudioManager::CalculateDistance(bool &distCalculated, float dist)
+cAudioManager::CalculateDistance(bool8 &distCalculated, float dist)
{
if (!distCalculated) {
m_sQueueSample.m_fDistance = Sqrt(dist);
- distCalculated = true;
+ distCalculated = TRUE;
}
}
@@ -277,8 +291,8 @@ cAudioManager::ProcessSpecial()
}
CPlayerPed *playerPed = FindPlayerPed();
if (playerPed) {
- if(playerPed->EnteringCar() && !playerPed->bInVehicle)
- SampleManager.StopChannel(m_nActiveSamples);
+ if(!playerPed->EnteringCar() && !playerPed->bInVehicle)
+ SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE);
}
}
}
@@ -291,53 +305,53 @@ cAudioManager::ProcessEntity(int32 id)
switch (m_asAudioEntities[id].m_nType) {
case AUDIOTYPE_PHYSICAL:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessPhysical(id);
}
break;
case AUDIOTYPE_EXPLOSION:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessExplosions(id);
}
break;
case AUDIOTYPE_FIRE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessFires(id);
}
break;
case AUDIOTYPE_WEATHER:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessWeather(id);
}
break;
case AUDIOTYPE_CRANE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessCrane();
}
break;
case AUDIOTYPE_SCRIPTOBJECT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessScriptObject(id);
}
break;
case AUDIOTYPE_BRIDGE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessBridge();
}
break;
case AUDIOTYPE_FRONTEND:
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverb = FALSE;
ProcessFrontEnd();
break;
case AUDIOTYPE_PROJECTILE:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessProjectiles();
}
break;
@@ -347,13 +361,13 @@ cAudioManager::ProcessEntity(int32 id)
break;
case AUDIOTYPE_FIREHYDRANT:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessFireHydrant();
}
break;
case AUDIOTYPE_WATERCANNON:
if (!m_nUserPause) {
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
ProcessWaterCannon(id);
}
break;
@@ -548,25 +562,25 @@ const tVehicleSampleData aVehicleSettings[MAX_CARS] = {
{SFX_CAR_REV_1, SFX_BANK_PACARD, SFX_CAR_HORN_JEEP, 21043, SFX_CAR_ALARM_1, 9935, OLD_DOOR}};
-bool bPlayerJustEnteredCar;
+bool8 bPlayerJustEnteredCar;
-const bool hornPatternsArray[8][44] = {
- {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false,
- false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false},
- {false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true,
- true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false},
- {false, false, true, true, true, true, true, true, true, true, true, true, false, false, false, false, true, true, true, true, true, false,
- false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false},
- {false, false, true, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true,
- true, true, true, true, true, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false},
- {false, false, true, true, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},
- {false, false, true, true, true, false, false, false, true, true, true, false, false, false, false, false, false, false, false, false, false, false,
- false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false},
- {false, false, true, true, true, true, false, false, false, false, true, true, true, false, false, true, true, true, false, false, true, true,
- true, true, true, true, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, false, false},
- {false, false, true, true, true, true, false, false, true, true, true, true, true, false, false, false, true, true, true, true, true, true,
- false, false, false, false, true, true, true, true, true, true, true, true, true, true, true, true, true, false, false, false, false, false},
+const bool8 hornPatternsArray[8][44] = {
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE,
+ FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE,
+ TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE},
+ {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
+ FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE},
};
@@ -578,7 +592,7 @@ cAudioManager::ProcessVehicle(CVehicle *veh)
cVehicleParams params;
m_sQueueSample.m_vecPos = veh->GetPosition();
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_pVehicle = veh;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
@@ -671,31 +685,30 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams& params)
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
float emittingVol = 30.f * CWeather::Rain;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, rainOnVehicleIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = veh->m_bRainSamplesCounter++;
if (veh->m_bRainSamplesCounter > 4)
veh->m_bRainSamplesCounter = 68;
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_CAR_RAIN_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 9;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 4000 + 28000;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = (uint8)emittingVol;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ SET_EMITTING_VOLUME((uint8)emittingVol);
+ RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = rainOnVehicleIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = rainOnVehicleIntensity;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
}
}
-bool
+bool8
cAudioManager::ProcessReverseGear(cVehicleParams& params)
{
const int reverseGearIntensity = 30;
@@ -706,7 +719,7 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
float modificator;
if (params.m_fDistance >= SQR(reverseGearIntensity))
- return false;
+ return FALSE;
veh = params.m_pVehicle;
if (veh->bEngineOn && (veh->m_fGasPedal < 0.0f || veh->m_nCurrentGear == 0)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -721,7 +734,7 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
modificator = Abs(modificator);
emittingVol = (24.f * modificator);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, reverseGearIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
if (params.m_pVehicle->m_fGasPedal >= 0.0f) {
m_sQueueSample.m_nCounter = 62;
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_GEAR_2;
@@ -730,23 +743,22 @@ cAudioManager::ProcessReverseGear(cVehicleParams& params)
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_GEAR;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nFrequency = (6000.f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_fSoundIntensity = reverseGearIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = reverseGearIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
void
@@ -777,23 +789,22 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams& params)
if (emittingVol) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, 30.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_REMOTE_CONTROLLED_CAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = (11025.f * velocityChange / params.m_pTransmission->fMaxVelocity + 11025.f);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -802,9 +813,7 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams& params)
}
}
-
-
-bool
+bool8
cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 95.0f;
@@ -816,7 +825,7 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
float velocity;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pTransmission != nil) {
if (((CAutomobile*)params.m_pVehicle)->m_nDriveWheelsOnGround != 0) {
velocity = Abs(params.m_fVelocityChange);
@@ -824,11 +833,11 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
emittingVol = 30.f * Min(1.f, velocity / (0.5f * params.m_pTransmission->fMaxVelocity));
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
if (params.m_pVehicle->m_nSurfaceTouched == SURFACE_WATER) {
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
freq = 6050 * emittingVol / 30 + 16000;
@@ -840,24 +849,23 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams& params)
}
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 30.0f;
@@ -869,7 +877,7 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
float velChange;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_pTransmission != nil) {
if (((CAutomobile *)params.m_pVehicle)->m_nDriveWheelsOnGround != 0) {
velChange = Abs(params.m_fVelocityChange);
@@ -878,38 +886,33 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams& params)
relativeVelocity = Min(1.0f, velChange / (0.5f * params.m_pTransmission->fMaxVelocity));
emittingVol = 23.0f * relativeVelocity * CWeather::WetRoads;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_ROAD_NOISE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
-#ifdef FIX_BUGS
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
multiplier = (m_sQueueSample.m_fDistance / SOUND_INTENSITY) * 0.5f;
-#else
- multiplier = (m_sQueueSample.m_fDistance / 3.0f) * 0.5f;
-#endif
freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE);
m_sQueueSample.m_nFrequency = freq + freq * multiplier;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
}
}
- return true;
+ return TRUE;
}
-void
+bool8
cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
{
const float SOUND_INTENSITY = 50.0f;
@@ -931,19 +934,19 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
playerVeh = FindPlayerVehicle();
veh = params.m_pVehicle;
if (playerVeh == veh && veh->GetStatus() == STATUS_WRECKED) {
- SampleManager.StopChannel(m_nActiveSamples);
- return;
+ SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE);
+ return TRUE;
}
if (veh->bEngineOn) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
automobile = (CAutomobile *)params.m_pVehicle;
if (params.m_nIndex == DODO) {
ProcessCesna(params);
- return;
+ return TRUE;
}
if (FindPlayerVehicle() == veh) {
ProcessPlayersVehicleEngine(params, automobile);
- return;
+ return TRUE;
}
transmission = params.m_pTransmission;
if (transmission != nil) {
@@ -1012,7 +1015,7 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
volume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
}
m_sQueueSample.m_nVolume = volume;
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
if (automobile->GetStatus() == STATUS_SIMPLE) {
if (modificator < 0.02f) {
m_sQueueSample.m_nSampleIndex = aVehicleSettings[params.m_nIndex].m_nBank - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1;
@@ -1033,25 +1036,26 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams& params)
}
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nFrequency = freq + 100 * m_sQueueSample.m_nEntityIndex % 1000;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_6 || m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_6)
m_sQueueSample.m_nFrequency /= 2;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 8;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
+ return TRUE;
}
+ return FALSE;
}
void
@@ -1067,23 +1071,23 @@ cAudioManager::UpdateGasPedalAudio(CAutomobile *automobile)
}
void
-cAudioManager::PlayerJustGotInCar() const
+cAudioManager::PlayerJustGotInCar()
{
if (m_bIsInitialised)
- bPlayerJustEnteredCar = true;
+ bPlayerJustEnteredCar = TRUE;
}
void
-cAudioManager::PlayerJustLeftCar(void) const
+cAudioManager::PlayerJustLeftCar(void)
{
// UNUSED: This is a perfectly empty function.
}
void
-cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping)
+cAudioManager::AddPlayerCarSample(uint8 emittingVolume, uint32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping)
{
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, 50.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = counter;
m_sQueueSample.m_nSampleIndex = sample;
#ifdef GTA_PS2
@@ -1091,23 +1095,22 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
#else
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
#endif // GTA_PS2
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = freq;
if (notLooping) {
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
+ m_sQueueSample.m_nFramesToPlay = 8;
} else {
m_sQueueSample.m_nLoopCount = 1;
}
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVolume);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 50.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -1127,52 +1130,50 @@ cAudioManager::ProcessCesna(cVehicleParams& params)
} else if (nAccel < 60) {
++nAccel;
}
- AddPlayerCarSample(85 * (60 - nAccel) / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, true);
- AddPlayerCarSample(85 * nAccel / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_REV, SFX_BANK_0, 2, true);
+ AddPlayerCarSample(85 * (60 - nAccel) / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, TRUE);
+ AddPlayerCarSample(85 * nAccel / 60 + 20, 8500 * nAccel / 60 + 17000, SFX_CESNA_REV, SFX_BANK_0, 2, TRUE);
}
} else if (params.m_nIndex == DODO) {
- AddPlayerCarSample(105, 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, true);
+ AddPlayerCarSample(105, 17000, SFX_CESNA_IDLE, SFX_BANK_0, 52, TRUE);
} else if (params.m_fDistance < SQR(200)) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, 200.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 52;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_IDLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = 12500;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_nEmittingVolume = 80;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nFramesToPlay = 8;
+ SET_EMITTING_VOLUME(80);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 8.0f;
- m_sQueueSample.m_fSoundIntensity = 200.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 200.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
if (params.m_fDistance < SQR(90)) {
m_sQueueSample.m_nVolume = ComputeVolume(80, 90.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_nEmittingVolume = 80;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_nFramesToPlay = 4;
+ SET_EMITTING_VOLUME(80);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 8.0f;
- m_sQueueSample.m_fSoundIntensity = 90.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 90.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -1199,44 +1200,46 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
int soundOffset;
uint8 engineSoundType;
int16 accelerateState;
- bool channelUsed;
- bool lostTraction;
- bool processedAccelSampleStopped;
+ bool8 channelUsed;
+ bool8 lostTraction;
+ bool8 processedAccelSampleStopped;
uint8 currentGear;
float gasPedalAudio;
CVector pos;
+ bool8 slowingDown;
static int16 LastAccel = 0;
static int16 LastBrake = 0;
static uint8 CurrentPretendGear = 1;
- static bool bLostTractionLastFrame = false;
- static bool bHandbrakeOnLastFrame = false;
+ static bool8 bLostTractionLastFrame = FALSE;
+ static bool8 bHandbrakeOnLastFrame = FALSE;
static int32 nCruising = 0;
- static bool bAccelSampleStopped = true;
+ static bool8 bAccelSampleStopped = TRUE;
- lostTraction = false;
- processedAccelSampleStopped = false;
+ lostTraction = FALSE;
+ processedAccelSampleStopped = FALSE;
if (bPlayerJustEnteredCar) {
- bAccelSampleStopped = true;
- bPlayerJustEnteredCar = false;
+ bAccelSampleStopped = TRUE;
+ bPlayerJustEnteredCar = FALSE;
nCruising = 0;
LastAccel = 0;
- bLostTractionLastFrame = false;
+ bLostTractionLastFrame = FALSE;
LastBrake = 0;
- bHandbrakeOnLastFrame = false;
+ bHandbrakeOnLastFrame = FALSE;
CurrentPretendGear = 1;
}
if (CReplay::IsPlayingBack())
- accelerateState = 255.f * clamp(automobile->m_fGasPedal, 0.0f, 1.0f);
+ accelerateState = 255.f * Clamp(automobile->m_fGasPedal, 0.0f, 1.0f);
else
accelerateState = Pads[0].GetAccelerate();
- channelUsed = SampleManager.GetChannelUsedFlag(m_nActiveSamples);
+ slowingDown = params.m_fVelocityChange < -0.001f;
+ channelUsed = SampleManager.GetChannelUsedFlag(CHANNEL_PLAYER_VEHICLE_ENGINE);
transmission = params.m_pTransmission;
velocityChange = params.m_fVelocityChange;
relativeVelocityChange = 2.0f * velocityChange / transmission->fMaxVelocity;
- accelerationMultipler = clamp(relativeVelocityChange, 0.0f, 1.0f);
+ accelerationMultipler = Clamp(relativeVelocityChange, 0.0f, 1.0f);
gasPedalAudio = accelerationMultipler;
currentGear = params.m_pVehicle->m_nCurrentGear;
@@ -1249,16 +1252,16 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
++wheelInUseCounter;
}
if (wheelInUseCounter > 2)
- lostTraction = true;
+ lostTraction = TRUE;
break;
case 'F':
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;
+ lostTraction = TRUE;
break;
case 'R':
if ((automobile->m_aWheelState[CARWHEEL_REAR_LEFT] != WHEEL_STATE_NORMAL) || (automobile->m_aWheelState[CARWHEEL_REAR_RIGHT] != WHEEL_STATE_NORMAL))
- lostTraction = true;
+ lostTraction = TRUE;
break;
}
@@ -1268,7 +1271,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
freqModifier = -(Min(0.2f, time) * 3000.0f * 5.0f);
else
freqModifier = -(Max(-0.2f, time) * 3000.0f * 5.0f);
- if (params.m_fVelocityChange < -0.001f)
+ if (slowingDown)
freqModifier = -freqModifier;
} else
freqModifier = 0;
@@ -1276,10 +1279,10 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
engineSoundType = aVehicleSettings[params.m_nIndex].m_nBank;
soundOffset = 3 * (engineSoundType - CAR_SFX_BANKS_OFFSET);
if (accelerateState <= 0) {
- if (params.m_fVelocityChange < -0.001f) {
+ if (slowingDown) {
if (channelUsed) {
- SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE);
+ bAccelSampleStopped = TRUE;
}
if (automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction)
gasPedalAudio = automobile->m_fGasPedalAudio;
@@ -1290,8 +1293,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
automobile->m_fGasPedalAudio = gasPedalAudio;
} else if (LastAccel > 0) {
if (channelUsed) {
- SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE);
+ bAccelSampleStopped = TRUE;
}
nCruising = 0;
if (automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction ||
@@ -1304,13 +1307,13 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
AddPlayerCarSample((25.f * (gasPedalAudio - 0.05f) * 20.f / 19) + 40, freq, (soundOffset + SFX_CAR_FINGER_OFF_ACCEL_1), engineSoundType, 63,
- false);
+ FALSE);
}
}
freq = (10000.f * gasPedalAudio) + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(110 - (40.f * gasPedalAudio), freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1), SFX_BANK_0, 52, true);
+ AddPlayerCarSample(110 - (40.f * gasPedalAudio), freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_IDLE_1), SFX_BANK_0, 52, TRUE);
CurrentPretendGear = Max(1, currentGear);
} else {
@@ -1334,12 +1337,15 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
if (channelUsed) {
- SampleManager.StopChannel(m_nActiveSamples);
- bAccelSampleStopped = true;
+ SampleManager.StopChannel(CHANNEL_PLAYER_VEHICLE_ENGINE);
+ bAccelSampleStopped = TRUE;
}
- AddPlayerCarSample(vol, freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1), SFX_BANK_0, 2, true);
+ AddPlayerCarSample(vol, freq, (engineSoundType - CAR_SFX_BANKS_OFFSET + SFX_CAR_REV_1), SFX_BANK_0, 2, TRUE);
} else {
TranslateEntity(&m_sQueueSample.m_vecPos, &pos);
+#ifndef EXTERNAL_3D_SOUND
+ m_sQueueSample.m_nPan = ComputePan(m_sQueueSample.m_fDistance, &pos);
+#endif
if (bAccelSampleStopped) {
if (CurrentPretendGear != 1 || currentGear != 2) {
gearNr = currentGear - 1;
@@ -1347,8 +1353,8 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
gearNr = 1;
CurrentPretendGear = gearNr;
}
- processedAccelSampleStopped = true;
- bAccelSampleStopped = false;
+ processedAccelSampleStopped = TRUE;
+ bAccelSampleStopped = FALSE;
}
if (!channelUsed) {
@@ -1361,28 +1367,42 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
}
}
- if (!SampleManager.InitialiseChannel(m_nActiveSamples, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
+#ifdef GTA_PS2
+ SampleManager.InitialiseChannel(CHANNEL_PLAYER_VEHICLE_ENGINE, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0);
+#else
+ if (!SampleManager.InitialiseChannel(CHANNEL_PLAYER_VEHICLE_ENGINE, soundOffset + SFX_CAR_ACCEL_1, SFX_BANK_0))
return;
- SampleManager.SetChannelLoopCount(m_nActiveSamples, 1);
- SampleManager.SetChannelLoopPoints(m_nActiveSamples, 0, -1);
+ SampleManager.SetChannelLoopCount(CHANNEL_PLAYER_VEHICLE_ENGINE, 1);
+ SampleManager.SetChannelLoopPoints(CHANNEL_PLAYER_VEHICLE_ENGINE, 0, -1);
+#endif
}
- SampleManager.SetChannelEmittingVolume(m_nActiveSamples, 85);
- SampleManager.SetChannel3DPosition(m_nActiveSamples, pos.x, pos.y, pos.z);
- SampleManager.SetChannel3DDistances(m_nActiveSamples, 50.f, 12.5f);
+#ifdef EXTERNAL_3D_SOUND
+ SampleManager.SetChannelEmittingVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, 85);
+ SampleManager.SetChannel3DPosition(CHANNEL_PLAYER_VEHICLE_ENGINE, pos.x, pos.y, pos.z);
+ SampleManager.SetChannel3DDistances(CHANNEL_PLAYER_VEHICLE_ENGINE, 50.0f, 50.0f * 0.25f);
+#else
+
+ SampleManager.SetChannelVolume(CHANNEL_PLAYER_VEHICLE_ENGINE, ComputeVolume(85, 50.0f, m_sQueueSample.m_fDistance));
+ SampleManager.SetChannelPan(CHANNEL_PLAYER_VEHICLE_ENGINE, m_sQueueSample.m_nPan);
+#endif
freq = GearFreqAdj[CurrentPretendGear] + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- SampleManager.SetChannelFrequency(m_nActiveSamples, freq);
+ SampleManager.SetChannelFrequency(CHANNEL_PLAYER_VEHICLE_ENGINE, freq);
if (!channelUsed) {
- SampleManager.SetChannelReverbFlag(m_nActiveSamples, m_bDynamicAcousticModelingStatus != false);
- SampleManager.StartChannel(m_nActiveSamples);
+#if GTA_VERSION >= GTA3_PC_10
+ SampleManager.SetChannelReverbFlag(CHANNEL_PLAYER_VEHICLE_ENGINE, m_bDynamicAcousticModelingStatus != FALSE);
+#else
+ SampleManager.SetChannelReverbFlag(CHANNEL_PLAYER_VEHICLE_ENGINE, TRUE);
+#endif
+ SampleManager.StartChannel(CHANNEL_PLAYER_VEHICLE_ENGINE);
}
}
break;
}
if (nCruising != 0) {
- bAccelSampleStopped = true;
+ bAccelSampleStopped = TRUE;
if (accelerateState < 150 || automobile->m_nWheelsOnGround == 0 || automobile->bIsHandbrakeOn || lostTraction ||
currentGear < params.m_pTransmission->nNumberOfGears - 1) {
nCruising = 0;
@@ -1396,7 +1416,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
freq = 27 * nCruising + freqModifier + 22050;
if (engineSoundType == SFX_BANK_TRUCK)
freq /= 2;
- AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType, 64, true);
+ AddPlayerCarSample(85, freq, (soundOffset + SFX_CAR_AFTER_ACCEL_1), engineSoundType, 64, TRUE);
}
}
}
@@ -1406,7 +1426,7 @@ cAudioManager::ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *
bLostTractionLastFrame = lostTraction;
}
-bool
+bool8
cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -1418,10 +1438,10 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
float skidVal = 0.0f;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
if (automobile->m_nWheelsOnGround == 0)
- return true;
+ 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)
@@ -1452,7 +1472,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
if (skidVal > 0.0f) {
emittingVol = 50.f * skidVal;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 3;
switch (params.m_pVehicle->m_nSurfaceTouched) {
case SURFACE_GRASS:
@@ -1462,7 +1482,7 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
m_sQueueSample.m_nFrequency = 13000.f * skidVal + 35000.f;
m_sQueueSample.m_nVolume /= 4;
if (m_sQueueSample.m_nVolume == 0)
- return true;
+ return TRUE;
break;
case SURFACE_GRAVEL:
case SURFACE_MUD_DRY:
@@ -1479,22 +1499,21 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams& params)
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 8;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
float
@@ -1565,23 +1584,22 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 4;
m_sQueueSample.m_nSampleIndex = aVehicleSettings[params.m_nIndex].m_nHornSample;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nHornFrequency;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 80;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(80);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -1589,8 +1607,8 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams& params)
}
}
-bool
-cAudioManager::UsesSiren(int32 model) const
+bool8
+cAudioManager::UsesSiren(uint32 model)
{
switch (model) {
case FIRETRUK:
@@ -1599,43 +1617,43 @@ cAudioManager::UsesSiren(int32 model) const
case POLICE:
case ENFORCER:
case PREDATOR:
- return true;
+ return TRUE;
default:
- return false;
+ return FALSE;
}
}
-bool
-cAudioManager::UsesSirenSwitching(int32 model) const
+bool8
+cAudioManager::UsesSirenSwitching(uint32 model)
{
switch (model) {
case AMBULAN:
case POLICE:
case ENFORCER:
case PREDATOR:
- return true;
+ return TRUE;
default:
- return false;
+ return FALSE;
}
}
-bool
+bool8
cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
{
const float SOUND_INTENSITY = 110.0f;
if (params.m_fDistance < SQR(SOUND_INTENSITY)) {
CVehicle *veh = params.m_pVehicle;
- if (veh->m_bSirenOrAlarm == false && !veh->IsAlarmOn())
- return true;
+ if (veh->m_bSirenOrAlarm == FALSE && !veh->IsAlarmOn())
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 5;
if (UsesSiren(params.m_nIndex)) {
if (params.m_pVehicle->GetStatus() == STATUS_ABANDONED)
- return true;
+ return TRUE;
if (veh->m_nCarHornTimer && params.m_nIndex != FIRETRUK) {
m_sQueueSample.m_nSampleIndex = SFX_SIREN_FAST;
if (params.m_nIndex == FBICAR)
@@ -1652,33 +1670,32 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams& params)
m_sQueueSample.m_nFrequency = aVehicleSettings[params.m_nIndex].m_nSirenOrAlarmFrequency;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 80;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(80);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 7.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
- return true;
+ return TRUE;
} else
- return true;
+ return TRUE;
} else
- return false;
+ return FALSE;
}
-bool
-cAudioManager::UsesReverseWarning(int32 model) const
+bool8
+cAudioManager::UsesReverseWarning(uint32 model)
{
return model == LINERUN || model == FIRETRUK || model == TRASH || model == BUS || model == COACH;
}
-bool
+bool8
cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
{
const float SOUND_INTENSITY = 50.0f;
@@ -1686,35 +1703,34 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams& params)
CVehicle *veh = params.m_pVehicle;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (veh->bEngineOn && veh->m_fGasPedal < 0.0f) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(60, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 12;
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_WARNING;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = (100 * m_sQueueSample.m_nEntityIndex & 1023) + SampleManager.GetSampleBaseFrequency(SFX_REVERSE_WARNING);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 60;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(60);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
{
const float SOUND_INTENSITY = 40.0f;
@@ -1725,7 +1741,7 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
float velocity;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -1737,80 +1753,78 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams& params)
if (velocity > 0.0035f) {
emittingVol = (100.f * velocity * 10.f / 3.f);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i + 6;
m_sQueueSample.m_nSampleIndex = m_anRandomTable[1] % 6 + SFX_COL_CAR_PANEL_1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) + RandomDisplacement(1000);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ SET_EMITTING_VOLUME(emittingVol);
+ RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 1.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
}
}
}
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessAirBrakes(cVehicleParams& params)
{
CAutomobile *automobile;
uint8 rand;
if (params.m_fDistance > SQR(30))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
if (!automobile->bEngineOn)
- return true;
+ return TRUE;
if ((automobile->m_fVelocityChangeForAudio < 0.025f || params.m_fVelocityChange >= 0.025f) &&
(automobile->m_fVelocityChangeForAudio > -0.025f || params.m_fVelocityChange <= 0.025f))
- return true;
+ return TRUE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
rand = m_anRandomTable[0] % 10 + 70;
m_sQueueSample.m_nVolume = ComputeVolume(rand, 30.0f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 13;
m_sQueueSample.m_nSampleIndex = SFX_AIR_BRAKES;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AIR_BRAKES);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = rand;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ SET_EMITTING_VOLUME(rand);
+ RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 30.0f;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 30.0f;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
-cAudioManager::HasAirBrakes(int32 model) const
+bool8
+cAudioManager::HasAirBrakes(uint32 model)
{
return model == LINERUN || model == FIRETRUK || model == TRASH || model == BUS || model == COACH;
}
-bool
+bool8
cAudioManager::ProcessEngineDamage(cVehicleParams& params)
{
const int engineDamageIntensity = 40;
@@ -1820,77 +1834,75 @@ cAudioManager::ProcessEngineDamage(cVehicleParams& params)
uint8 emittingVolume;
if (params.m_fDistance >= SQR(engineDamageIntensity))
- return false;
+ return FALSE;
veh = (CAutomobile *)params.m_pVehicle;
if (veh->bEngineOn) {
engineStatus = veh->Damage.GetEngineStatus();
if (engineStatus > 250 || engineStatus < 100)
- return true;
+ return TRUE;
if (engineStatus < 225) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
emittingVolume = 6;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_nFrequency = 40000;
} else {
emittingVolume = 60;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, engineDamageIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 28;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVolume);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = engineDamageIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = engineDamageIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessCarBombTick(cVehicleParams& params)
{
CAutomobile *automobile;
if (params.m_fDistance >= SQR(40.f))
- return false;
+ return FALSE;
automobile = (CAutomobile *)params.m_pVehicle;
if (automobile->bEngineOn && automobile->m_bombType == CARBOMB_TIMEDACTIVE) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(60, 40.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 35;
m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 60;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(60);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = 40.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 40.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
void
@@ -1900,7 +1912,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
uint8 emittingVol;
float relVol;
float vol;
- bool noReflections;
+ bool8 noReflections;
float maxDist;
static uint8 WaveIndex = 41;
@@ -1908,9 +1920,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
static uint8 iWheelIndex = 82;
static uint8 CrunchOffset = 0;
- for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- noReflections = 0;
- m_sQueueSample.m_bRequireReflection = false;
+ for (uint16 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
+ noReflections = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
event = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
switch (event) {
case SOUND_CAR_DOOR_CLOSE_BONNET:
@@ -1947,10 +1959,10 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
#endif
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ SET_SOUND_REFLECTION(TRUE);
break;
}
case SOUND_CAR_DOOR_OPEN_BONNET:
@@ -1985,10 +1997,10 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
#endif
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ SET_SOUND_REFLECTION(TRUE);
break;
}
case SOUND_CAR_WINDSHIELD_CRACK: {
@@ -1999,9 +2011,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 68;
emittingVol = m_anRandomTable[1] % 30 + 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
} break;
case SOUND_CAR_JUMP: {
const float SOUND_INTENSITY = 35.0f;
@@ -2018,9 +2030,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nFrequency *= 2;
emittingVol /= 2;
}
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_nPriority = 6;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
break;
}
case SOUND_CAR_ENGINE_START: {
@@ -2031,10 +2043,10 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 33;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_STARTER);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ SET_SOUND_REFLECTION(TRUE);
break;
}
case SOUND_CAR_LIGHT_BREAK: {
@@ -2044,9 +2056,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 37;
m_sQueueSample.m_nFrequency = 9 * SampleManager.GetSampleBaseFrequency(SFX_GLASS_SHARD_1) / 10;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 10 + 30;
break;
@@ -2062,9 +2074,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 51;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[0] % 15 + 55;
break;
@@ -2075,11 +2087,11 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 86;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SUSPENSION_SLOW_MOVE_LOOP);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
- noReflections = true;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_nFramesToPlay = 7;
+ noReflections = TRUE;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[0] % 15 + 55;
break;
@@ -2091,9 +2103,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 87;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHAG_SUSPENSION);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[1] % 15 + 55;
break;
@@ -2112,9 +2124,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
if (WaveIndex > 46)
WaveIndex = 41;
m_sQueueSample.m_nFrequency = (7000.f * relVol) + 6000;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
emittingVol = (55.f * relVol);
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -2125,9 +2137,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 47;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BOAT_THUMB_OFF) + RandomDisplacement(600);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
emittingVol = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_afVolume[i];
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -2139,9 +2151,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 59;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 11025;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 5.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[1] % 20 + 70;
break;
@@ -2155,13 +2167,13 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 79;
m_sQueueSample.m_nFrequency = (3000.f * vol * 2500.0f / 96.0f) + 9000;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
emittingVol = (37.f * vol * 2500.0f / 96.0f) + 90;
maxDist = SQR(SOUND_INTENSITY);
- noReflections = true;
+ noReflections = TRUE;
break;
}
case SOUND_CAR_BOMB_TICK: {
@@ -2170,11 +2182,11 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BOMB_BEEP);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
- m_sQueueSample.m_bRequireReflection = true;
+ SET_SOUND_REFLECTION(TRUE);
emittingVol = 60;
break;
}
@@ -2184,9 +2196,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 81;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_LAND_WHEELS);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 25 + 75;
break;
@@ -2203,9 +2215,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
GunIndex = 53;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
break;
}
case SOUND_WEAPON_HIT_VEHICLE: {
@@ -2215,9 +2227,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nCounter = 34;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[3] % 20 + 90;
break;
@@ -2231,10 +2243,10 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 36;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ARM_BOMB);
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ SET_SOUND_REFLECTION(TRUE);
emittingVol = 50;
maxDist = SQR(SOUND_INTENSITY);
break;
@@ -2261,11 +2273,11 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 15;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 16000;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
- m_sQueueSample.m_bRequireReflection = true;
+ SET_SOUND_REFLECTION(TRUE);
emittingVol = m_anRandomTable[4] % 20 + 90;
break;
}
@@ -2275,14 +2287,14 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 48;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PED_CRUNCH_1) + RandomDisplacement(600);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
++CrunchOffset;
maxDist = SQR(SOUND_INTENSITY);
emittingVol = m_anRandomTable[4] % 20 + 55;
CrunchOffset %= 2;
- m_sQueueSample.m_bRequireReflection = true;
+ SET_SOUND_REFLECTION(TRUE);
break;
}
case SOUND_CAR_PED_COLLISION: {
@@ -2296,9 +2308,9 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = 50;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) / 2;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
maxDist = SQR(SOUND_INTENSITY);
break;
}
@@ -2307,27 +2319,26 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params)
}
if (params.m_fDistance < maxDist) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
if (noReflections) {
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_bStatic = FALSE;
} else {
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bStatic = TRUE;
}
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bIs2D = false;
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bReverb = TRUE;
+ m_sQueueSample.m_bIs2D = FALSE;
AddSampleToRequestedQueue();
}
}
}
}
-bool
+bool8
cAudioManager::ProcessTrainNoise(cVehicleParams& params)
{
const float SOUND_INTENSITY = 300.0f;
@@ -2337,7 +2348,7 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
float speedMultipler;
if (params.m_fDistance >= SQR(SOUND_INTENSITY))
- return false;
+ return FALSE;
if (params.m_fVelocityChange > 0.0f) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
@@ -2346,54 +2357,52 @@ cAudioManager::ProcessTrainNoise(cVehicleParams& params)
emittingVol = (75.f * speedMultipler);
if (train->m_fWagonPosition == 0.0f) {
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 32;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_FAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_FAR);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 3.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
const float SOUND_INTENSITY = 70.0f;
if (params.m_fDistance < SQR(SOUND_INTENSITY)) {
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 33;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) + 100 * m_sQueueSample.m_nEntityIndex % 987;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::ProcessBoatEngine(cVehicleParams& params)
{
CBoat *boat;
@@ -2413,24 +2422,23 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
if (params.m_nIndex == REEFER) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(80, intensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 39;
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE;
m_sQueueSample.m_nFrequency = 10386;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 80;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(80);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
if (FindPlayerVehicle() == params.m_pVehicle) {
@@ -2453,24 +2461,24 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
}
}
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, intensity, m_sQueueSample.m_fDistance);
- if (!m_sQueueSample.m_nVolume)
- return true;
- m_sQueueSample.m_nCounter = 40;
- m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_ACCEL;
- m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
- m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ if (m_sQueueSample.m_nVolume > 0) {
+ m_sQueueSample.m_nCounter = 40;
+ m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_ACCEL;
+ m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nLoopCount = 0;
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
+ AddSampleToRequestedQueue();
+ }
} else {
if (FindPlayerVehicle() == params.m_pVehicle) {
padAccelerate = Max(Pads[0].GetAccelerate(), Pads[0].GetBrake());
@@ -2511,30 +2519,29 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
}
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, intensity, m_sQueueSample.m_fDistance);
- if (!m_sQueueSample.m_nVolume)
- return true;
- m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
- m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 7;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ if (m_sQueueSample.m_nVolume > 0) {
+ m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nLoopCount = 0;
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 7;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
+ AddSampleToRequestedQueue();
+ }
}
- AddSampleToRequestedQueue();
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-bool
+bool8
cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
{
float velocityChange;
@@ -2542,38 +2549,37 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams& params)
float multiplier;
if (params.m_fDistance > SQR(50))
- return false;
+ return FALSE;
velocityChange = Abs(params.m_fVelocityChange);
if (velocityChange <= 0.0005f && ((CBoat*)params.m_pVehicle)->bBoatInWater)
- return true;
+ return TRUE;
velocityChange = Min(0.75f, velocityChange);
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);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 38;
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_nFrequency = (6050.f * multiplier) + 16000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = vol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(vol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 50.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
struct tHelicopterSampleData {
@@ -2582,7 +2588,7 @@ struct tHelicopterSampleData {
uint8 m_bBaseVolume;
};
-bool
+bool8
cAudioManager::ProcessHelicopter(cVehicleParams& params)
{
CHeli *heli;
@@ -2593,7 +2599,7 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
static const tHelicopterSampleData gHeliSfxRanges[3] = {{400.f, 380.f, 100}, {100.f, 70.f, MAX_VOLUME}, {60.f, 30.f, MAX_VOLUME}};
if (SQR(gHeliSfxRanges[0].m_fMaxDistance) <= params.m_fDistance)
- return false;
+ return FALSE;
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
heli = (CHeli *)params.m_pVehicle;
@@ -2601,7 +2607,7 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
MaxDist = gHeliSfxRanges[i].m_fMaxDistance;
dist = m_sQueueSample.m_fDistance;
if (dist >= MaxDist)
- return true;
+ return TRUE;
baseDist = gHeliSfxRanges[i].m_fBaseDistance;
if (dist < baseDist)
emittingVol = (gHeliSfxRanges[i].m_bBaseVolume * ((MaxDist - dist) / (MaxDist - baseDist)));
@@ -2609,27 +2615,26 @@ cAudioManager::ProcessHelicopter(cVehicleParams& params)
emittingVol = gHeliSfxRanges[i].m_bBaseVolume;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, gHeliSfxRanges[i].m_fMaxDistance, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i + 65;
m_sQueueSample.m_nSampleIndex = i + SFX_HELI_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nFrequency = 1200 * heli->m_nHeliId + SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 6.0f;
- m_sQueueSample.m_fSoundIntensity = gHeliSfxRanges[i].m_fMaxDistance;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = gHeliSfxRanges[i].m_fMaxDistance;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
- return true;
+ return TRUE;
}
void
@@ -2654,8 +2659,8 @@ uint8 gJumboVolOffsetPercentage;
void
DoJumboVolOffset()
{
- if (!(AudioManager.GetFrameCounter() % (AudioManager.GetRandomNumber(0) % 6 + 3)))
- gJumboVolOffsetPercentage = AudioManager.GetRandomNumber(1) % 60;
+ if (!(AudioManager.m_FrameCounter % (AudioManager.m_anRandomTable[0] % 6 + 3)))
+ gJumboVolOffsetPercentage = AudioManager.m_anRandomTable[1] % 60;
}
void
@@ -2771,12 +2776,12 @@ cAudioManager::ProcessJumboDecel(CPlane *plane)
}
}
-bool
+bool8
cAudioManager::SetupJumboTaxiSound(uint8 vol)
{
const float SOUND_INTENSITY = 180.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
uint8 emittingVol = (vol / 2) + ((vol / 2) * m_sQueueSample.m_fDistance / SOUND_INTENSITY);
@@ -2784,160 +2789,156 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
emittingVol -= emittingVol * gJumboVolOffsetPercentage / 100;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = GetJumboTaxiFreq();
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboWhineSound(uint8 emittingVol, uint32 freq)
{
const float SOUND_INTENSITY = 170.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_WHINE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboEngineSound(uint8 vol, uint32 freq)
{
const float SOUND_INTENSITY = 180.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
uint8 emittingVol = vol - gJumboVolOffsetPercentage / 100;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 3;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_ENGINE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 4;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 4;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboFlySound(uint8 emittingVol)
{
const float SOUND_INTENSITY = 440.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
int32 vol = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
m_sQueueSample.m_nVolume = vol;
- if (m_sQueueSample.m_nVolume != 0) {
- m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 0;
+ m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopCount = 0;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nLoopCount = 0;
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
-bool
+bool8
cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
{
const float SOUND_INTENSITY = 240.0f;
if (m_sQueueSample.m_fDistance >= SOUND_INTENSITY)
- return false;
+ return FALSE;
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 5;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = TRUE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_RUMBLE);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 12;
- m_sQueueSample.m_nOffset = 0;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 12;
+ m_sQueueSample.m_nPan = 0;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
m_sQueueSample.m_nCounter = 6;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_nFrequency += 200;
- m_sQueueSample.m_nOffset = MAX_VOLUME;
+ m_sQueueSample.m_nPan = 127;
AddSampleToRequestedQueue();
}
- return true;
+ return TRUE;
}
int32
-cAudioManager::GetJumboTaxiFreq() const
+cAudioManager::GetJumboTaxiFreq()
{
return (60.833f * m_sQueueSample.m_fDistance) + 22050;
}
@@ -2954,7 +2955,7 @@ cAudioManager::ProcessPed(CPhysical *ped)
m_sQueueSample.m_vecPos = ped->GetPosition();
- params.m_bDistanceCalculated = false;
+ params.m_bDistanceCalculated = FALSE;
params.m_pPed = (CPed *)ped;
params.m_fDistance = GetDistanceSquared(m_sQueueSample.m_vecPos);
if (ped->GetModelIndex() == MI_FATMALE02)
@@ -2989,23 +2990,22 @@ cAudioManager::ProcessPedHeadphones(cPedParams ¶ms)
}
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, 7.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 64;
m_sQueueSample.m_nSampleIndex = SFX_HEADPHONES;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_HEADPHONES);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = 7.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 5;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 7.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 5;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
return;
@@ -3021,9 +3021,9 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
CPed *ped = params.m_pPed;
- bool narrowSoundRange;
+ bool8 narrowSoundRange;
int16 sound;
- bool stereo;
+ bool8 stereo;
CWeapon *weapon;
float maxDist = 0.f; // uninitialized variable
@@ -3031,9 +3031,9 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
weapon = params.m_pPed->GetWeapon();
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- stereo = false;
- narrowSoundRange = false;
- m_sQueueSample.m_bRequireReflection = false;
+ stereo = FALSE;
+ narrowSoundRange = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
sound = m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i];
switch (sound) {
case SOUND_STEP_START:
@@ -3103,16 +3103,15 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
default:
break;
}
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ RESET_LOOP_OFFSETS
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_FALL_LAND:
case SOUND_FALL_COLLAPSE:
@@ -3131,16 +3130,15 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 17);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ RESET_LOOP_OFFSETS
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_FIGHT_PUNCH_33:
m_sQueueSample.m_nSampleIndex = SFX_FIGHT_1;
@@ -3192,42 +3190,42 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
AddFightSound:
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
++iSound;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 26 + 100;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_WEAPON_BAT_ATTACK:
m_sQueueSample.m_nSampleIndex = SFX_BAT_HIT_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 22000;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 20 + 100;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReflections = TRUE;
else
- stereo = true;
+#endif
+ stereo = TRUE;
break;
case SOUND_WEAPON_SHOT_FIRED:
weapon = ped->GetWeapon();
@@ -3236,150 +3234,151 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
m_sQueueSample.m_nSampleIndex = SFX_COLT45_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COLT45_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
maxDist = SQR(50);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[1] % 10 + 90;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReflections = TRUE;
else
- stereo = true;
+#endif
+ stereo = TRUE;
break;
case WEAPONTYPE_UZI:
m_sQueueSample.m_nSampleIndex = SFX_UZI_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[3] % 15 + 70;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case WEAPONTYPE_SHOTGUN:
m_sQueueSample.m_nSampleIndex = SFX_SHOTGUN_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOTGUN_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 10 + 100;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReflections = TRUE;
else
- stereo = true;
+#endif
+ stereo = TRUE;
break;
case WEAPONTYPE_AK47:
m_sQueueSample.m_nSampleIndex = SFX_AK47_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AK47_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[1] % 15 + 70;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case WEAPONTYPE_M16:
m_sQueueSample.m_nSampleIndex = SFX_M16_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_M16_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 15 + 70;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case WEAPONTYPE_SNIPERRIFLE:
m_sQueueSample.m_nSampleIndex = SFX_SNIPER_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SNIPER_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 10 + 110;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReflections = TRUE;
else
- stereo = true;
+#endif
+ stereo = TRUE;
break;
case WEAPONTYPE_ROCKETLAUNCHER:
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ROCKET_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 90.0f;
+ m_sQueueSample.m_MaxDistance = 90.0f;
maxDist = SQR(90);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[0] % 20 + 80;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReflections = TRUE;
else
- stereo = true;
+#endif
+ stereo = TRUE;
break;
case WEAPONTYPE_FLAMETHROWER:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_LEFT;
@@ -3387,21 +3386,22 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
m_sQueueSample.m_nCounter = 9;
emittingVol = 90;
m_sQueueSample.m_nFrequency = (10 * m_sQueueSample.m_nEntityIndex & 2047) + SampleManager.GetSampleBaseFrequency(SFX_FLAMETHROWER_LEFT);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nEmittingVolume = 90;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 6;
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ SET_EMITTING_VOLUME(90);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 6;
+#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReflections = TRUE;
else
- stereo = true;
+#endif
+ stereo = TRUE;
break;
default:
continue;
@@ -3444,20 +3444,19 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
}
emittingVol = 75;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency += RandomDisplacement(300);
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = 75;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ RESET_LOOP_OFFSETS
+ SET_EMITTING_VOLUME(75);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
break;
case SOUND_WEAPON_AK47_BULLET_ECHO:
case SOUND_WEAPON_UZI_BULLET_ECHO:
@@ -3465,24 +3464,25 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
m_sQueueSample.m_nSampleIndex = SFX_UZI_END_LEFT;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_UZI_END_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
maxDist = SQR(80);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[4] % 10 + 40;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+#ifdef AUDIO_REFLECTIONS
if (m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bReflections = TRUE;
else
- stereo = true;
+#endif
+ stereo = TRUE;
break;
case SOUND_WEAPON_FLAMETHROWER_FIRE:
m_sQueueSample.m_nSampleIndex = SFX_FLAMETHROWER_START_LEFT;
@@ -3490,55 +3490,52 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_FLAMETHROWER_START_LEFT);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
maxDist = SQR(60);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
emittingVol = 70;
- m_sQueueSample.m_nEmittingVolume = 70;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(70);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case SOUND_WEAPON_HIT_PED:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_PED;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BULLET_PED);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 30.0f;
+ m_sQueueSample.m_MaxDistance = 30.0f;
maxDist = SQR(30);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[0] % 20 + 90;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
break;
case SOUND_SPLASH:
m_sQueueSample.m_nSampleIndex = SFX_SPLASH_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nCounter = iSound++;
- narrowSoundRange = true;
+ narrowSoundRange = TRUE;
m_sQueueSample.m_nFrequency = RandomDisplacement(1400) + 20000;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
maxDist = SQR(40);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
+ RESET_LOOP_OFFSETS
emittingVol = m_anRandomTable[2] % 30 + 70;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ SET_EMITTING_VOLUME(emittingVol);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
break;
default:
SetupPedComments(params, sound);
@@ -3549,20 +3546,20 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
iSound = 21;
if (params.m_fDistance < maxDist) {
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
if (stereo) {
- if (m_sQueueSample.m_fDistance < 0.2f * m_sQueueSample.m_fSoundIntensity) {
- m_sQueueSample.m_bIs2D = true;
- m_sQueueSample.m_nOffset = 0;
+ if (m_sQueueSample.m_fDistance < 0.2f * m_sQueueSample.m_MaxDistance) {
+ m_sQueueSample.m_bIs2D = TRUE;
+ m_sQueueSample.m_nPan = 0;
} else {
- stereo = false;
+ stereo = FALSE;
}
}
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bReverb = TRUE;
AddSampleToRequestedQueue();
if (stereo) {
- m_sQueueSample.m_nOffset = 127;
+ m_sQueueSample.m_nPan = 127;
++m_sQueueSample.m_nSampleIndex;
if (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i] != SOUND_WEAPON_SHOT_FIRED ||
weapon->m_eWeaponType != WEAPONTYPE_FLAMETHROWER) {
@@ -3610,23 +3607,23 @@ cAudioManager::SetupPedComments(cPedParams ¶ms, uint16 sound)
switch (sound) {
case SOUND_PED_HELI_PLAYER_FOUND:
soundIntensity = 400.0f;
- pedComment.m_nSampleIndex = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_POLICE_HELI_1, SFX_POLICE_HELI_29);
+ pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 29 + SFX_POLICE_HELI_1;
break;
case SOUND_PED_BODYCAST_HIT:
if (CTimer::GetTimeInMilliseconds() <= gNextCryTime)
return;
soundIntensity = 50.0f;
gNextCryTime = CTimer::GetTimeInMilliseconds() + 500;
- pedComment.m_nSampleIndex = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_PLASTER_BLOKE_1, SFX_PLASTER_BLOKE_4);
+ pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 4 + SFX_PLASTER_BLOKE_1;
break;
case SOUND_INJURED_PED_MALE_OUCH:
case SOUND_INJURED_PED_MALE_PRISON:
soundIntensity = 50.0f;
- pedComment.m_nSampleIndex = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_GENERIC_MALE_GRUNT_1, SFX_GENERIC_MALE_GRUNT_15);
+ pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 15 + SFX_GENERIC_MALE_GRUNT_1;
break;
case SOUND_INJURED_PED_FEMALE:
soundIntensity = 50.0f;
- pedComment.m_nSampleIndex = GetRandomNumberInRange(m_sQueueSample.m_nEntityIndex % 4, SFX_GENERIC_FEMALE_GRUNT_1, SFX_GENERIC_FEMALE_GRUNT_11);
+ pedComment.m_nSampleIndex = m_anRandomTable[m_sQueueSample.m_nEntityIndex % 4] % 11 + SFX_GENERIC_FEMALE_GRUNT_1;
break;
default:
return;
@@ -3651,11 +3648,14 @@ cAudioManager::SetupPedComments(cPedParams ¶ms, uint16 sound)
}
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, soundIntensity, m_sQueueSample.m_fDistance);
pedComment.m_nProcess = 10;
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
pedComment.m_nEntityIndex = m_sQueueSample.m_nEntityIndex;
pedComment.m_vecPos = m_sQueueSample.m_vecPos;
pedComment.m_fDistance = m_sQueueSample.m_fDistance;
- pedComment.m_bVolume = m_sQueueSample.m_nVolume;
+ pedComment.m_nVolume = m_sQueueSample.m_nVolume;
+#if defined(EXTERNAL_3D_SOUND) && defined(FIX_BUGS)
+ pedComment.m_nEmittingVolume = emittingVol;
+#endif
m_sPedComments.Add(&pedComment);
}
}
@@ -3663,7 +3663,7 @@ cAudioManager::SetupPedComments(cPedParams ¶ms, uint16 sound)
}
int32
-cAudioManager::GetPedCommentSfx(CPed *ped, int32 sound)
+cAudioManager::GetPedCommentSfx(CPed *ped, uint16 sound)
{
if (ped->IsPlayer())
return GetPlayerTalkSfx(sound);
@@ -3684,7 +3684,7 @@ cAudioManager::GetPedCommentSfx(CPed *ped, int32 sound)
case MI_MALE01:
return GetNormalMaleTalkSfx(sound);
case MI_TAXI_D:
- return GetTaxiDriverTalkSfx(sound);
+ return GetAsianTaxiDriverTalkSfx(sound);
case MI_PIMP:
return GetPimpTalkSfx(sound);
case MI_GANG01:
@@ -3718,7 +3718,7 @@ cAudioManager::GetPedCommentSfx(CPed *ped, int32 sound)
case MI_SPECIAL04:
return GetSpecialCharacterTalkSfx(ped->GetModelIndex(), sound);
case MI_MALE02:
- return GetMaleNo2TalkSfx(sound);
+ return GetCasualMaleOldTalkSfx(sound);
case MI_MALE03:
case MI_P_MAN1:
case MI_P_MAN2:
@@ -3813,14 +3813,14 @@ cAudioManager::GetPedCommentSfx(CPed *ped, int32 sound)
case MI_STUD_WOM:
return GetStudentFemaleTalkSfx(sound);
case MI_CAS_MAN:
- return GetCasualMaleOldTalkSfx(sound);
+ return GetCasualMaleYoungTalkSfx(sound);
default:
return GetGenericMaleTalkSfx(sound);
}
}
void
-cAudioManager::GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const
+cAudioManager::GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset)
{
phrase = sample + m_anRandomTable[m_sQueueSample.m_nEntityIndex & 3] % maxOffset;
@@ -3834,7 +3834,7 @@ cAudioManager::GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint
#pragma region PED_COMMENTS
uint32
-cAudioManager::GetPlayerTalkSfx(int16 sound)
+cAudioManager::GetPlayerTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -3857,7 +3857,7 @@ cAudioManager::GetPlayerTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetCopTalkSfx(int16 sound)
+cAudioManager::GetCopTalkSfx(uint16 sound)
{
uint32 sfx;
PedState pedState;
@@ -3881,7 +3881,7 @@ cAudioManager::GetCopTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetSwatTalkSfx(int16 sound)
+cAudioManager::GetSwatTalkSfx(uint16 sound)
{
uint32 sfx;
PedState pedState;
@@ -3905,7 +3905,7 @@ cAudioManager::GetSwatTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetFBITalkSfx(int16 sound)
+cAudioManager::GetFBITalkSfx(uint16 sound)
{
uint32 sfx;
PedState pedState;
@@ -3929,7 +3929,7 @@ cAudioManager::GetFBITalkSfx(int16 sound)
}
uint32
-cAudioManager::GetArmyTalkSfx(int16 sound)
+cAudioManager::GetArmyTalkSfx(uint16 sound)
{
uint32 sfx;
PedState pedState;
@@ -3948,7 +3948,7 @@ cAudioManager::GetArmyTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetMedicTalkSfx(int16 sound)
+cAudioManager::GetMedicTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -3976,41 +3976,41 @@ cAudioManager::GetMedicTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetFiremanTalkSfx(int16 sound)
+cAudioManager::GetFiremanTalkSfx(uint16 sound)
{
return GetGenericMaleTalkSfx(sound);
}
uint32
-cAudioManager::GetNormalMaleTalkSfx(int16 sound)
+cAudioManager::GetBusinessMaleOldTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
switch (sound) {
case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_GUN_PANIC_1, 7);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_GUN_PANIC_1, 3);
break;
case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_CARJACKED_1, 7);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_FIGHT_1, 5);
break;
case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_DODGE_1, 9);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_DODGE_1, 4);
break;
case SOUND_PED_FLEE_RUN:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_RUN_FROM_FIGHT_1, 5);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_MRUN_FROM_FIGHT_1, 5);
break;
case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_DRIVER_ABUSE_1, 12);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_EYING_1, 8);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_SHOCKED_1, 10);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 5);
break;
case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_CHAT_1, 25);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_CHAT_1, 5);
break;
default:
return GetGenericMaleTalkSfx(sound);
@@ -4019,61 +4019,47 @@ cAudioManager::GetNormalMaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetTaxiDriverTalkSfx(int16 sound)
+cAudioManager::GetBusinessMaleYoungTalkSfx(uint16 sound, uint32 model)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
switch (sound) {
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_CARJACKED_1, 7);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
-
- return (SFX_ASIAN_TAXI_DRIVER_VOICE_2_DRIVER_ABUSE_1 - SFX_ASIAN_TAXI_DRIVER_VOICE_1_DRIVER_ABUSE_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
-}
-
-uint32
-cAudioManager::GetPimpTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_UP:
- GetPhrase(sfx, lastSfx, SFX_PIMP_GUN_COOL_1, 7);
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_GUN_PANIC_1, 3);
break;
case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_PIMP_CARJACKED_1, 4);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_CARJACKED_1, 2);
break;
- case SOUND_PED_DEFEND:
- GetPhrase(sfx, lastSfx, SFX_PIMP_FIGHT_1, 9);
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_FIGHT_1, 4);
break;
case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_PIMP_DODGE_1, 6);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_DODGE_1, 4);
+ break;
+ case SOUND_PED_FLEE_RUN:
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_RUN_FROM_FIGHT_1, 5);
break;
case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_PIMP_DRIVER_ABUSE_1, 5);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_PIMP_SHOCKED_1, 2);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
break;
case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_PIMP_CHAT_1, 17);
+ GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_CHAT_1, 6);
break;
default:
return GetGenericMaleTalkSfx(sound);
}
+
+ if (model == MI_B_MAN3)
+ sfx += (SFX_BUSINESS_MALE_YOUNG_VOICE_2_DRIVER_ABUSE_1 - SFX_BUSINESS_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1);
return sfx;
}
uint32
-cAudioManager::GetMafiaTalkSfx(int16 sound)
+cAudioManager::GetMafiaTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4107,7 +4093,7 @@ cAudioManager::GetMafiaTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetTriadTalkSfx(int16 sound)
+cAudioManager::GetTriadTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4144,7 +4130,7 @@ cAudioManager::GetTriadTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetDiabloTalkSfx(int16 sound)
+cAudioManager::GetDiabloTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4185,7 +4171,7 @@ cAudioManager::GetDiabloTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetYakuzaTalkSfx(int16 sound)
+cAudioManager::GetYakuzaTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4216,7 +4202,7 @@ cAudioManager::GetYakuzaTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetYardieTalkSfx(int16 sound)
+cAudioManager::GetYardieTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4253,7 +4239,7 @@ cAudioManager::GetYardieTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetColumbianTalkSfx(int16 sound)
+cAudioManager::GetColumbianTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4287,7 +4273,7 @@ cAudioManager::GetColumbianTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetHoodTalkSfx(int16 sound)
+cAudioManager::GetHoodTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4326,7 +4312,7 @@ cAudioManager::GetHoodTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetBlackCriminalTalkSfx(int16 sound)
+cAudioManager::GetBlackCriminalTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4358,7 +4344,7 @@ cAudioManager::GetBlackCriminalTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetWhiteCriminalTalkSfx(int16 sound)
+cAudioManager::GetWhiteCriminalTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4390,7 +4376,7 @@ cAudioManager::GetWhiteCriminalTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetMaleNo2TalkSfx(int16 sound)
+cAudioManager::GetCasualMaleOldTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4424,79 +4410,13 @@ cAudioManager::GetMaleNo2TalkSfx(int16 sound)
}
uint32
-cAudioManager::GetBlackProjectMaleTalkSfx(int16 sound, int32 model)
+cAudioManager::GetCasualMaleYoungTalkSfx(uint16 sound)
{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch(sound) {
- case SOUND_PED_HANDS_UP: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_GUN_COOL_1, 3); break;
- case SOUND_PED_CAR_JACKED: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_CARJACKED_1, 2); break;
- case SOUND_PED_ROBBED: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_MUGGED_1, 2); break;
- case SOUND_PED_ATTACK: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_FIGHT_1, 6); break;
- case SOUND_PED_EVADE: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DODGE_1, 5); break;
- case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DRIVER_ABUSE_1, 7); break;
- case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_EYING_1, 3); break;
- case SOUND_PED_CHAT: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_CHAT_1, 6); break;
- default: return GetGenericMaleTalkSfx(sound);
- }
-
- if (model == MI_P_MAN2)
- sfx += (SFX_BLACK_PROJECT_MALE_VOICE_2_DRIVER_ABUSE_1 - SFX_BLACK_PROJECT_MALE_VOICE_1_DRIVER_ABUSE_1);
- return sfx;
+ return GetGenericMaleTalkSfx(sound);
}
uint32
-cAudioManager::GetWhiteFatMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch(sound) {
- case SOUND_PED_CAR_JACKED: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_CARJACKED_1, 3); break;
- case SOUND_PED_ROBBED: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_MUGGED_1, 3); break;
- case SOUND_PED_EVADE: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DODGE_1, 9); break;
- case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 9); break;
- case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_LOST_1, 2); break;
- case SOUND_PED_CHAT: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_CHAT_1, 9); break;
- default: return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetBlackFatMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_CARJACKED_1, 4);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_MUGGED_1, 3);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DODGE_1, 7);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_WAIT_DOUBLEBACK:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_LOST_1, 3);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_CHAT_1, 8);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetBlackCasualFemaleTalkSfx(int16 sound)
+cAudioManager::GetBlackCasualFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4533,7 +4453,7 @@ cAudioManager::GetBlackCasualFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetWhiteCasualFemaleTalkSfx(int16 sound)
+cAudioManager::GetWhiteCasualFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4570,7 +4490,7 @@ cAudioManager::GetWhiteCasualFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetFemaleNo3TalkSfx(int16 sound)
+cAudioManager::GetFemaleNo3TalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -4607,703 +4527,7 @@ cAudioManager::GetFemaleNo3TalkSfx(int16 sound)
}
uint32
-cAudioManager::GetBlackFatFemaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_GUN_PANIC_1, 4);
- break;
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DODGE_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_SHOCKED_1, 5);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_CHAT_1, 7);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetWhiteFatFemaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DODGE_1, 6);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 8);
- break;
- case SOUND_PED_WAIT_DOUBLEBACK:
- GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_LOST_1, 2);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_SHOCKED_1, 4);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_CHAT_1, 8);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetBlackFemaleProstituteTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_UP:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_GUN_COOL_1, 4);
- break;
- case SOUND_PED_ROBBED:
- sfx = SFX_BLACK_PROSTITUTE_VOICE_1_MUGGED_1;
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_FIGHT_1, 4);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DODGE_1, 3);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4);
- break;
- case SOUND_PED_SOLICIT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_SOLICIT_1, 8);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_CHAT_1, 4);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return (SFX_BLACK_PROSTITUTE_VOICE_2_CHAT_1 - SFX_BLACK_PROSTITUTE_VOICE_1_CHAT_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
-}
-
-uint32
-cAudioManager::GetWhiteFemaleProstituteTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_FIGHT_1, 4);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DODGE_1, 3);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4);
- break;
- case SOUND_PED_SOLICIT:
- GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_SOLICIT_1, 8);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_CHAT_1, 4);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return (SFX_WHITE_PROSTITUTE_VOICE_2_CHAT_1 - SFX_WHITE_PROSTITUTE_VOICE_1_CHAT_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
-}
-
-uint32
-cAudioManager::GetBlackProjectFemaleOldTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_CARJACKED_1, 6);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_DODGE_1, 10);
- break;
- case SOUND_PED_FLEE_RUN:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_RUN_FROM_FIGHT_1, 6);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_DRIVER_ABUSE_1, 7);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_SHOCKED_1, 2);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_CHAT_1, 10);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetBlackProjectFemaleYoungTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_GUN_PANIC_1, 4);
- break;
- case SOUND_PED_CAR_JACKED:
- sfx = SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_CARJACKED_1;
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DODGE_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_SHOCKED_1, 5);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_CHAT_1, 7);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetChinatownMaleOldTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_GUN_PANIC_1, 3);
- break;
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_FIGHT_1, 5);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DODGE_1, 6);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_EYING_1, 3);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_CHAT_1, 7);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetChinatownMaleYoungTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_GUN_PANIC_1, 2);
- break;
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_FIGHT_1, 6);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DODGE_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_EYING_1, 3);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_CHAT_1, 6);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetChinatownFemaleOldTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_GUN_PANIC_1, 3);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DODGE_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
- break;
- case SOUND_PED_CHAT_EVENT:
- sfx = SFX_CHINATOWN_OLD_FEMALE_VOICE_1_SHOCKED_1;
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_CHAT_1, 6);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetChinatownFemaleYoungTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DODGE_1, 6);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_SHOCKED_1, 4);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_CHAT_1, 7);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetLittleItalyMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_GUN_PANIC_1, 3);
- break;
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_FIGHT_1, 5);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DODGE_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DRIVER_ABUSE_1, 7);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_CHAT_1, 6);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return (SFX_LITTLE_ITALY_MALE_VOICE_2_DRIVER_ABUSE_1 - SFX_LITTLE_ITALY_MALE_VOICE_1_DRIVER_ABUSE_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
-}
-
-uint32
-cAudioManager::GetLittleItalyFemaleOldTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DODGE_1, 6);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_SHOCKED_1, 4);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_CHAT_1, 7);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetLittleItalyFemaleYoungTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DODGE_1, 7);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT_EVENT:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_SHOCKED_1, 4);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_CHAT_1, 6);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetWhiteDockerMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_GUN_PANIC_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_FIGHT_1, 3);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DODGE_1, 4);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_EYING_1, 3);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_CHAT_1, 5);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetBlackDockerMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_GUN_PANIC_1, 3);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_FIGHT_1, 5);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_DODGE_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_EYING_1, 3);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_CHAT_1, 5);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetScumMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_GUN_PANIC_1, 5);
- break;
- case SOUND_PED_ROBBED:
- sfx = SFX_SCUM_MALE_VOICE_1_MUGGED_1;
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_FIGHT_1, 10);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_DODGE_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_WAIT_DOUBLEBACK:
- GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_LOST_1, 3);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_EYING_1, 5);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_CHAT_1, 9);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetScumFemaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_GUN_PANIC_1, 4);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_FIGHT_1, 4);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_DODGE_1, 8);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_CHAT_1, 13);
- break;
- default:
- return GetGenericFemaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetWhiteWorkerMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_GUN_PANIC_1, 3);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_FIGHT_1, 3);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DODGE_1, 4);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_EYING_1, 2);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_CHAT_1, 6);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetBlackWorkerMaleTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_GUN_PANIC_1, 4);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_FIGHT_1, 3);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DODGE_1, 3);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4);
- break;
- case SOUND_PED_CHAT_SEXY:
- GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_EYING_1, 3);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_CHAT_1, 4);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetBusinessMaleYoungTalkSfx(int16 sound, int32 model)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_GUN_PANIC_1, 3);
- break;
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_FIGHT_1, 4);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_DODGE_1, 4);
- break;
- case SOUND_PED_FLEE_RUN:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_RUN_FROM_FIGHT_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_YOUNG_VOICE_1_CHAT_1, 6);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
-
- if (model == MI_B_MAN3)
- sfx += (SFX_BUSINESS_MALE_YOUNG_VOICE_2_DRIVER_ABUSE_1 - SFX_BUSINESS_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1);
- return sfx;
-}
-
-uint32
-cAudioManager::GetBusinessMaleOldTalkSfx(int16 sound)
-{
- uint32 sfx;
- static uint32 lastSfx = NO_SAMPLE;
-
- switch (sound) {
- case SOUND_PED_HANDS_COWER:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_GUN_PANIC_1, 3);
- break;
- case SOUND_PED_CAR_JACKED:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_CARJACKED_1, 2);
- break;
- case SOUND_PED_ROBBED:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_MUGGED_1, 2);
- break;
- case SOUND_PED_ATTACK:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_FIGHT_1, 5);
- break;
- case SOUND_PED_EVADE:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_DODGE_1, 4);
- break;
- case SOUND_PED_FLEE_RUN:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_MRUN_FROM_FIGHT_1, 5);
- break;
- case SOUND_PED_ANNOYED_DRIVER:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 5);
- break;
- case SOUND_PED_CHAT:
- GetPhrase(sfx, lastSfx, SFX_BUSINESS_MALE_OLD_VOICE_1_CHAT_1, 5);
- break;
- default:
- return GetGenericMaleTalkSfx(sound);
- }
- return sfx;
-}
-
-uint32
-cAudioManager::GetWhiteBusinessFemaleTalkSfx(int16 sound, int32 model)
+cAudioManager::GetWhiteBusinessFemaleTalkSfx(uint16 sound, uint32 model)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5343,7 +4567,698 @@ cAudioManager::GetWhiteBusinessFemaleTalkSfx(int16 sound, int32 model)
}
uint32
-cAudioManager::GetBlackBusinessFemaleTalkSfx(int16 sound)
+cAudioManager::GetBlackFatFemaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_GUN_PANIC_1, 4);
+ break;
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DODGE_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_SHOCKED_1, 5);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_FEMALE_VOICE_1_CHAT_1, 7);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetWhiteFatMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch(sound) {
+ case SOUND_PED_CAR_JACKED: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_CARJACKED_1, 3); break;
+ case SOUND_PED_ROBBED: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_MUGGED_1, 3); break;
+ case SOUND_PED_EVADE: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DODGE_1, 9); break;
+ case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 9); break;
+ case SOUND_PED_WAIT_DOUBLEBACK: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_LOST_1, 2); break;
+ case SOUND_PED_CHAT: GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_MALE_VOICE_1_CHAT_1, 9); break;
+ default: return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetBlackFatMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_CARJACKED_1, 4);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_MUGGED_1, 3);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DODGE_1, 7);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_WAIT_DOUBLEBACK:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_LOST_1, 3);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_FAT_MALE_VOICE_1_CHAT_1, 8);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetWhiteFatFemaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DODGE_1, 6);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_DRIVER_ABUSE_1, 8);
+ break;
+ case SOUND_PED_WAIT_DOUBLEBACK:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_LOST_1, 2);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_SHOCKED_1, 4);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_FAT_FEMALE_VOICE_1_CHAT_1, 8);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetBlackFemaleProstituteTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_UP:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_GUN_COOL_1, 4);
+ break;
+ case SOUND_PED_ROBBED:
+ sfx = SFX_BLACK_PROSTITUTE_VOICE_1_MUGGED_1;
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_FIGHT_1, 4);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DODGE_1, 3);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4);
+ break;
+ case SOUND_PED_SOLICIT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_SOLICIT_1, 8);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROSTITUTE_VOICE_1_CHAT_1, 4);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return (SFX_BLACK_PROSTITUTE_VOICE_2_CHAT_1 - SFX_BLACK_PROSTITUTE_VOICE_1_CHAT_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
+}
+
+uint32
+cAudioManager::GetWhiteFemaleProstituteTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_FIGHT_1, 4);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DODGE_1, 3);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_DRIVER_ABUSE_1, 4);
+ break;
+ case SOUND_PED_SOLICIT:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_SOLICIT_1, 8);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_PROSTITUTE_VOICE_1_CHAT_1, 4);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return (SFX_WHITE_PROSTITUTE_VOICE_2_CHAT_1 - SFX_WHITE_PROSTITUTE_VOICE_1_CHAT_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
+}
+
+uint32
+cAudioManager::GetBlackProjectMaleTalkSfx(uint16 sound, uint32 model)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch(sound) {
+ case SOUND_PED_HANDS_UP: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_GUN_COOL_1, 3); break;
+ case SOUND_PED_CAR_JACKED: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_CARJACKED_1, 2); break;
+ case SOUND_PED_ROBBED: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_MUGGED_1, 2); break;
+ case SOUND_PED_ATTACK: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_FIGHT_1, 6); break;
+ case SOUND_PED_EVADE: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DODGE_1, 5); break;
+ case SOUND_PED_ANNOYED_DRIVER: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_DRIVER_ABUSE_1, 7); break;
+ case SOUND_PED_CHAT_SEXY: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_EYING_1, 3); break;
+ case SOUND_PED_CHAT: GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_MALE_VOICE_1_CHAT_1, 6); break;
+ default: return GetGenericMaleTalkSfx(sound);
+ }
+
+ if (model == MI_P_MAN2)
+ sfx += (SFX_BLACK_PROJECT_MALE_VOICE_2_DRIVER_ABUSE_1 - SFX_BLACK_PROJECT_MALE_VOICE_1_DRIVER_ABUSE_1);
+ return sfx;
+}
+
+uint32
+cAudioManager::GetBlackProjectFemaleOldTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_CARJACKED_1, 6);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_DODGE_1, 10);
+ break;
+ case SOUND_PED_FLEE_RUN:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_RUN_FROM_FIGHT_1, 6);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_DRIVER_ABUSE_1, 7);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_SHOCKED_1, 2);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_OLD_VOICE_1_CHAT_1, 10);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetBlackProjectFemaleYoungTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_GUN_PANIC_1, 4);
+ break;
+ case SOUND_PED_CAR_JACKED:
+ sfx = SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_CARJACKED_1;
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DODGE_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_SHOCKED_1, 5);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_PROJECT_FEMALE_YOUNG_VOICE_1_CHAT_1, 7);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetChinatownMaleOldTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_GUN_PANIC_1, 3);
+ break;
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_FIGHT_1, 5);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DODGE_1, 6);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_EYING_1, 3);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_OLD_VOICE_1_CHAT_1, 7);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetChinatownMaleYoungTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_GUN_PANIC_1, 2);
+ break;
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_FIGHT_1, 6);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DODGE_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_EYING_1, 3);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_MALE_YOUNG_VOICE_1_CHAT_1, 6);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetChinatownFemaleOldTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_GUN_PANIC_1, 3);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DODGE_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ sfx = SFX_CHINATOWN_OLD_FEMALE_VOICE_1_SHOCKED_1;
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_OLD_FEMALE_VOICE_1_CHAT_1, 6);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetChinatownFemaleYoungTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DODGE_1, 6);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_SHOCKED_1, 4);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_CHINATOWN_YOUNG_FEMALE_VOICE_1_CHAT_1, 7);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetLittleItalyMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_GUN_PANIC_1, 3);
+ break;
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_FIGHT_1, 5);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DODGE_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_DRIVER_ABUSE_1, 7);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_MALE_VOICE_1_CHAT_1, 6);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return (SFX_LITTLE_ITALY_MALE_VOICE_2_DRIVER_ABUSE_1 - SFX_LITTLE_ITALY_MALE_VOICE_1_DRIVER_ABUSE_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
+}
+
+uint32
+cAudioManager::GetLittleItalyFemaleOldTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DODGE_1, 6);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_DRIVER_ABUSE_1, 7);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_SHOCKED_1, 4);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_OLD_FEMALE_VOICE_1_CHAT_1, 7);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetLittleItalyFemaleYoungTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_CARJACKED_1, 2);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DODGE_1, 7);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_SHOCKED_1, 4);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_LITTLE_ITALY_YOUNG_FEMALE_VOICE_1_CHAT_1, 6);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetWhiteDockerMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_GUN_PANIC_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_FIGHT_1, 3);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DODGE_1, 4);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_EYING_1, 3);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_DOCKER_MALE_VOICE_1_CHAT_1, 5);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetBlackDockerMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_GUN_PANIC_1, 3);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_FIGHT_1, 5);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_DODGE_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_EYING_1, 3);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_DOCKER_VOICE_1_CHAT_1, 5);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetScumMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_GUN_PANIC_1, 5);
+ break;
+ case SOUND_PED_ROBBED:
+ sfx = SFX_SCUM_MALE_VOICE_1_MUGGED_1;
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_FIGHT_1, 10);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_DODGE_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_WAIT_DOUBLEBACK:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_LOST_1, 3);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_EYING_1, 5);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_MALE_VOICE_1_CHAT_1, 9);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetScumFemaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_GUN_PANIC_1, 4);
+ break;
+ case SOUND_PED_ROBBED:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_MUGGED_1, 2);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_FIGHT_1, 4);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_DODGE_1, 8);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_DRIVER_ABUSE_1, 5);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_SCUM_FEMALE_VOICE_1_CHAT_1, 13);
+ break;
+ default:
+ return GetGenericFemaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetWhiteWorkerMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_GUN_PANIC_1, 3);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_FIGHT_1, 3);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DODGE_1, 4);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_EYING_1, 2);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_WHITE_WORKER_MALE_VOICE_1_CHAT_1, 6);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetBlackWorkerMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_GUN_PANIC_1, 4);
+ break;
+ case SOUND_PED_ATTACK:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_FIGHT_1, 3);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DODGE_1, 3);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_DRIVER_ABUSE_1, 4);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_EYING_1, 3);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_BLACK_WORKER_MALE_VOICE_1_CHAT_1, 4);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetBlackBusinessFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5380,7 +5295,7 @@ cAudioManager::GetBlackBusinessFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetSupermodelMaleTalkSfx(int16 sound)
+cAudioManager::GetSupermodelMaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5414,7 +5329,7 @@ cAudioManager::GetSupermodelMaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetSupermodelFemaleTalkSfx(int16 sound)
+cAudioManager::GetSupermodelFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5445,7 +5360,7 @@ cAudioManager::GetSupermodelFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetStewardMaleTalkSfx(int16 sound)
+cAudioManager::GetStewardMaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5473,7 +5388,7 @@ cAudioManager::GetStewardMaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetStewardFemaleTalkSfx(int16 sound)
+cAudioManager::GetStewardFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5498,7 +5413,7 @@ cAudioManager::GetStewardFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetFanMaleTalkSfx(int16 sound, int32 model)
+cAudioManager::GetFanMaleTalkSfx(uint16 sound, uint32 model)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5529,7 +5444,7 @@ cAudioManager::GetFanMaleTalkSfx(int16 sound, int32 model)
}
uint32
-cAudioManager::GetFanFemaleTalkSfx(int16 sound)
+cAudioManager::GetFanFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5557,7 +5472,7 @@ cAudioManager::GetFanFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetHospitalMaleTalkSfx(int16 sound)
+cAudioManager::GetHospitalMaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5585,7 +5500,7 @@ cAudioManager::GetHospitalMaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetHospitalFemaleTalkSfx(int16 sound)
+cAudioManager::GetHospitalFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5607,7 +5522,7 @@ cAudioManager::GetHospitalFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetWhiteConstructionWorkerTalkSfx(int16 sound)
+cAudioManager::GetWhiteConstructionWorkerTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5641,7 +5556,7 @@ cAudioManager::GetWhiteConstructionWorkerTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetBlackConstructionWorkerTalkSfx(int16 sound)
+cAudioManager::GetBlackConstructionWorkerTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5675,7 +5590,7 @@ cAudioManager::GetBlackConstructionWorkerTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetShopperFemaleTalkSfx(int16 sound, int32 model)
+cAudioManager::GetShopperFemaleTalkSfx(uint16 sound, uint32 model)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5712,7 +5627,7 @@ cAudioManager::GetShopperFemaleTalkSfx(int16 sound, int32 model)
}
uint32
-cAudioManager::GetStudentMaleTalkSfx(int16 sound)
+cAudioManager::GetStudentMaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5746,7 +5661,7 @@ cAudioManager::GetStudentMaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetStudentFemaleTalkSfx(int16 sound)
+cAudioManager::GetStudentFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5780,29 +5695,23 @@ cAudioManager::GetStudentFemaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetCasualMaleOldTalkSfx(int16 sound)
-{
- return GetGenericMaleTalkSfx(sound);
-}
-
-uint32
-cAudioManager::GetSpecialCharacterTalkSfx(int32 modelIndex, int32 sound)
+cAudioManager::GetSpecialCharacterTalkSfx(uint32 modelIndex, uint16 sound)
{
char *modelName = CModelInfo::GetModelInfo(modelIndex)->GetModelName();
if (!CGeneral::faststricmp(modelName, "eight") || !CGeneral::faststricmp(modelName, "eight2")) {
- return GetEightTalkSfx(sound);
+ return GetEightBallTalkSfx(sound);
}
if (!CGeneral::faststricmp(modelName, "frankie")) {
- return GetFrankieTalkSfx(sound);
+ return GetSalvatoreTalkSfx(sound);
}
if (!CGeneral::faststricmp(modelName, "misty")) {
return GetMistyTalkSfx(sound);
}
if (!CGeneral::faststricmp(modelName, "ojg") || !CGeneral::faststricmp(modelName, "ojg_p")) {
- return GetOJGTalkSfx(sound);
+ return GetOldJapTalkSfx(sound);
}
if (!CGeneral::faststricmp(modelName, "cat")) {
- return GetCatatalinaTalkSfx(sound);
+ return GetCatalinaTalkSfx(sound);
}
if (!CGeneral::faststricmp(modelName, "bomber")) {
return GetBomberTalkSfx(sound);
@@ -5822,8 +5731,9 @@ cAudioManager::GetSpecialCharacterTalkSfx(int32 modelIndex, int32 sound)
return GetGenericMaleTalkSfx(sound);
}
+
uint32
-cAudioManager::GetEightTalkSfx(int16 sound)
+cAudioManager::GetEightBallTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5848,7 +5758,7 @@ cAudioManager::GetEightTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetFrankieTalkSfx(int16 sound)
+cAudioManager::GetSalvatoreTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5873,7 +5783,7 @@ cAudioManager::GetFrankieTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetMistyTalkSfx(int16 sound)
+cAudioManager::GetMistyTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5902,19 +5812,19 @@ cAudioManager::GetMistyTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetOJGTalkSfx(int16 sound)
+cAudioManager::GetOldJapTalkSfx(uint16 sound)
{
return GetGenericMaleTalkSfx(sound);
}
uint32
-cAudioManager::GetCatatalinaTalkSfx(int16 sound)
+cAudioManager::GetCatalinaTalkSfx(uint16 sound)
{
return GetGenericFemaleTalkSfx(sound);
}
uint32
-cAudioManager::GetBomberTalkSfx(int16 sound)
+cAudioManager::GetBomberTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5931,7 +5841,7 @@ cAudioManager::GetBomberTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetSecurityGuardTalkSfx(int16 sound)
+cAudioManager::GetSecurityGuardTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5964,7 +5874,7 @@ cAudioManager::GetSecurityGuardTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetChunkyTalkSfx(int16 sound)
+cAudioManager::GetChunkyTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -5984,7 +5894,98 @@ cAudioManager::GetChunkyTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetGenericMaleTalkSfx(int16 sound)
+cAudioManager::GetAsianTaxiDriverTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_CARJACKED_1, 7);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_ASIAN_TAXI_DRIVER_VOICE_1_DRIVER_ABUSE_1, 6);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+
+ return (SFX_ASIAN_TAXI_DRIVER_VOICE_2_DRIVER_ABUSE_1 - SFX_ASIAN_TAXI_DRIVER_VOICE_1_DRIVER_ABUSE_1) * (m_sQueueSample.m_nEntityIndex % 2) + sfx;
+}
+
+uint32
+cAudioManager::GetPimpTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_UP:
+ GetPhrase(sfx, lastSfx, SFX_PIMP_GUN_COOL_1, 7);
+ break;
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_PIMP_CARJACKED_1, 4);
+ break;
+ case SOUND_PED_DEFEND:
+ GetPhrase(sfx, lastSfx, SFX_PIMP_FIGHT_1, 9);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_PIMP_DODGE_1, 6);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_PIMP_DRIVER_ABUSE_1, 5);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_PIMP_SHOCKED_1, 2);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_PIMP_CHAT_1, 17);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetNormalMaleTalkSfx(uint16 sound)
+{
+ uint32 sfx;
+ static uint32 lastSfx = NO_SAMPLE;
+
+ switch (sound) {
+ case SOUND_PED_HANDS_COWER:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_GUN_PANIC_1, 7);
+ break;
+ case SOUND_PED_CAR_JACKED:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_CARJACKED_1, 7);
+ break;
+ case SOUND_PED_EVADE:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_DODGE_1, 9);
+ break;
+ case SOUND_PED_FLEE_RUN:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_RUN_FROM_FIGHT_1, 5);
+ break;
+ case SOUND_PED_ANNOYED_DRIVER:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_DRIVER_ABUSE_1, 12);
+ break;
+ case SOUND_PED_CHAT_SEXY:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_EYING_1, 8);
+ break;
+ case SOUND_PED_CHAT_EVENT:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_SHOCKED_1, 10);
+ break;
+ case SOUND_PED_CHAT:
+ GetPhrase(sfx, lastSfx, SFX_NORMAL_MALE_CHAT_1, 25);
+ break;
+ default:
+ return GetGenericMaleTalkSfx(sound);
+ }
+ return sfx;
+}
+
+uint32
+cAudioManager::GetGenericMaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -6010,7 +6011,7 @@ cAudioManager::GetGenericMaleTalkSfx(int16 sound)
}
uint32
-cAudioManager::GetGenericFemaleTalkSfx(int16 sound)
+cAudioManager::GetGenericFemaleTalkSfx(uint16 sound)
{
uint32 sfx;
static uint32 lastSfx = NO_SAMPLE;
@@ -6042,7 +6043,7 @@ cPedComments::Add(tPedComment *com)
if (m_nCommentsInBank[m_nActiveBank] >= NUM_PED_COMMENTS_SLOTS) {
index = m_nIndexMap[m_nActiveBank][NUM_PED_COMMENTS_SLOTS - 1];
- if (m_asPedComments[m_nActiveBank][index].m_bVolume > com->m_bVolume)
+ if (m_asPedComments[m_nActiveBank][index].m_nVolume > com->m_nVolume)
return;
} else {
index = m_nCommentsInBank[m_nActiveBank]++;
@@ -6053,7 +6054,7 @@ cPedComments::Add(tPedComment *com)
uint32 i = 0;
if (index != 0) {
for (i = 0; i < index; i++) {
- if (m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][i]].m_bVolume < m_asPedComments[m_nActiveBank][index].m_bVolume) {
+ if (m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][i]].m_nVolume < m_asPedComments[m_nActiveBank][index].m_nVolume) {
break;
}
}
@@ -6072,7 +6073,7 @@ cPedComments::Process()
uint8 actualUsedBank;
tPedComment *comment;
- if (AudioManager.m_nUserPause != 0) return;
+ if (AudioManager.m_nUserPause) return;
if (m_nCommentsInBank[m_nActiveBank]) {
sampleIndex = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nSampleIndex;
@@ -6083,36 +6084,83 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_nCounter = 0;
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
AudioManager.m_sQueueSample.m_nBankIndex = SFX_BANK_PED_COMMENTS;
- AudioManager.m_sQueueSample.m_nReleasingVolumeModificator = 3;
- AudioManager.m_sQueueSample.m_nVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_bVolume;
+ AudioManager.m_sQueueSample.m_nPriority = 3;
+ AudioManager.m_sQueueSample.m_nVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nVolume;
AudioManager.m_sQueueSample.m_fDistance = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_fDistance;
AudioManager.m_sQueueSample.m_nLoopCount = 1;
+#ifndef GTA_PS2
AudioManager.m_sQueueSample.m_nLoopStart = 0;
AudioManager.m_sQueueSample.m_nLoopEnd = -1;
+#endif // !GTA_PS2
+#ifdef EXTERNAL_3D_SOUND
+ #ifdef FIX_BUGS
+ AudioManager.m_sQueueSample.m_nEmittingVolume = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nEmittingVolume;
+ #else
AudioManager.m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
+ #endif // FIX_BUGS
+#endif // EXTERNAL_3D_SOUND
AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
switch (sampleIndex) {
case SFX_POLICE_HELI_1:
case SFX_POLICE_HELI_2:
case SFX_POLICE_HELI_3:
- AudioManager.m_sQueueSample.m_fSoundIntensity = 400.0f;
+#ifdef FIX_BUGS
+ case SFX_POLICE_HELI_4:
+ case SFX_POLICE_HELI_5:
+ case SFX_POLICE_HELI_6:
+ case SFX_POLICE_HELI_7:
+ case SFX_POLICE_HELI_8:
+ case SFX_POLICE_HELI_9:
+ case SFX_POLICE_HELI_10:
+ case SFX_POLICE_HELI_11:
+ case SFX_POLICE_HELI_12:
+ case SFX_POLICE_HELI_13:
+ case SFX_POLICE_HELI_14:
+ case SFX_POLICE_HELI_15:
+ case SFX_POLICE_HELI_16:
+ case SFX_POLICE_HELI_17:
+ case SFX_POLICE_HELI_18:
+ case SFX_POLICE_HELI_19:
+ case SFX_POLICE_HELI_20:
+ case SFX_POLICE_HELI_21:
+ case SFX_POLICE_HELI_22:
+ case SFX_POLICE_HELI_23:
+ case SFX_POLICE_HELI_24:
+ case SFX_POLICE_HELI_25:
+ case SFX_POLICE_HELI_26:
+ case SFX_POLICE_HELI_27:
+ case SFX_POLICE_HELI_28:
+ case SFX_POLICE_HELI_29:
+#endif
+ AudioManager.m_sQueueSample.m_MaxDistance = 400.0f;
break;
default:
- AudioManager.m_sQueueSample.m_fSoundIntensity = 50.0f;
+ AudioManager.m_sQueueSample.m_MaxDistance = 50.0f;
break;
}
- AudioManager.m_sQueueSample.m_bReleasingSoundFlag = true;
+ AudioManager.m_sQueueSample.m_bStatic = TRUE;
AudioManager.m_sQueueSample.m_vecPos = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos;
if (sampleIndex >= SFX_AMMU_D && sampleIndex <= SFX_AMMU_F) {
- AudioManager.m_sQueueSample.m_bReverbFlag = false;
- AudioManager.m_sQueueSample.m_bRequireReflection = false;
+ AudioManager.m_sQueueSample.m_bReverb = FALSE;
+#ifdef AUDIO_REFLECTIONS
+ AudioManager.m_sQueueSample.m_bReflections = FALSE;
+#endif
+#ifdef FIX_BUGS
+ } else if (sampleIndex >= SFX_POLICE_HELI_1 && sampleIndex <= SFX_POLICE_HELI_29) {
+ AudioManager.m_sQueueSample.m_bReverb = TRUE;
+#ifdef AUDIO_REFLECTIONS
+ AudioManager.m_sQueueSample.m_bReflections = FALSE;
+#endif // AUDIO_REFLECTIONS
+#endif // FIX_BUGS
} else {
- AudioManager.m_sQueueSample.m_bReverbFlag = true;
- AudioManager.m_sQueueSample.m_bRequireReflection = true;
+ AudioManager.m_sQueueSample.m_bReverb = TRUE;
+#ifdef AUDIO_REFLECTIONS
+ AudioManager.m_sQueueSample.m_bReflections = TRUE;
+#endif
}
- AudioManager.m_sQueueSample.m_bIs2D = false;
+ AudioManager.m_sQueueSample.m_bIs2D = FALSE;
AudioManager.m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(AudioManager.m_sQueueSample.m_nSampleIndex) + AudioManager.RandomDisplacement(750);
if (CTimer::GetIsSlowMotionActive())
@@ -6122,12 +6170,12 @@ cPedComments::Process()
}
// Switch bank
- if (m_nActiveBank) {
- actualUsedBank = SFX_BANK_PED_COMMENTS;
- m_nActiveBank = SFX_BANK_0;
+ if (m_nActiveBank == 0) {
+ actualUsedBank = 0;
+ m_nActiveBank = 1;
} else {
- actualUsedBank = SFX_BANK_0;
- m_nActiveBank = SFX_BANK_PED_COMMENTS;
+ actualUsedBank = 1;
+ m_nActiveBank = 0;
}
comment = m_asPedComments[actualUsedBank];
for (uint32 i = 0; i < m_nCommentsInBank[actualUsedBank]; i++) {
@@ -6163,55 +6211,54 @@ cAudioManager::ProcessExplosions(int32 explosion)
case EXPLOSION_ROCKET:
case EXPLOSION_BARREL:
case EXPLOSION_TANK_GRENADE:
- m_sQueueSample.m_fSoundIntensity = 400.0f;
+ m_sQueueSample.m_MaxDistance = 400.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 38000;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
break;
case EXPLOSION_MOLOTOV:
- m_sQueueSample.m_fSoundIntensity = 200.0f;
+ m_sQueueSample.m_MaxDistance = 200.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_3;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
break;
case EXPLOSION_MINE:
case EXPLOSION_HELI_BOMB:
- m_sQueueSample.m_fSoundIntensity = 300.0f;
+ m_sQueueSample.m_MaxDistance = 300.0f;
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 12347;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
break;
default:
- m_sQueueSample.m_fSoundIntensity = 400.0f;
+ m_sQueueSample.m_MaxDistance = 400.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 38000;
if (type == EXPLOSION_HELI)
m_sQueueSample.m_nFrequency = 8 * m_sQueueSample.m_nFrequency / 10;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
break;
}
pos = CExplosion::GetExplosionPosition(i);
m_sQueueSample.m_vecPos = *pos;
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_EMITTING_VOLUME(MAX_VOLUME);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
}
}
@@ -6232,55 +6279,54 @@ cAudioManager::ProcessFires(int32)
if (entity) {
switch (entity->GetType()) {
case ENTITY_TYPE_BUILDING:
- m_sQueueSample.m_fSoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
emittingVol = 100;
m_sQueueSample.m_nFrequency = 8 * SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE) / 10;
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_nPriority = 6;
break;
case ENTITY_TYPE_PED:
- m_sQueueSample.m_fSoundIntensity = 25.0f;
+ m_sQueueSample.m_MaxDistance = 25.0f;
m_sQueueSample.m_nSampleIndex = SFX_PED_ON_FIRE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PED_ON_FIRE);
emittingVol = 60;
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_nPriority = 10;
break;
default:
- m_sQueueSample.m_fSoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
emittingVol = 80;
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
+ m_sQueueSample.m_nPriority = 8;
}
} else {
- m_sQueueSample.m_fSoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
m_sQueueSample.m_nFrequency += i * (m_sQueueSample.m_nFrequency / 64);
emittingVol = 80;
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
+ m_sQueueSample.m_nPriority = 8;
}
m_sQueueSample.m_vecPos = gFireManager.m_aFires[i].m_vecPos;
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 10;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nFramesToPlay = 10;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bStatic = FALSE;
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -6302,29 +6348,28 @@ cAudioManager::ProcessWaterCannon(int32)
#ifdef FIX_BUGS
m_sQueueSample.m_nVolume = ComputeVolume(50, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
#else
- m_sQueueSample.m_nVolume = ComputeVolume(50, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
+ m_sQueueSample.m_nVolume = ComputeVolume(50, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
#endif
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
#ifdef FIX_BUGS
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
#else
- m_sQueueSample.m_fSoundIntensity = SQR(SOUND_INTENSITY);
+ m_sQueueSample.m_MaxDistance = SQR(SOUND_INTENSITY);
#endif
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 15591;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nFramesToPlay = 8;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nEmittingVolume = 50;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bStatic = FALSE;
+ SET_EMITTING_VOLUME(50);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -6377,141 +6422,141 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
}
case SCRIPT_SOUND_GATE_START_CLUNK:
case SCRIPT_SOUND_GATE_STOP_CLUNK:
- m_sQueueSample.m_fSoundIntensity = 40.0f;
+ m_sQueueSample.m_MaxDistance = 40.0f;
m_sQueueSample.m_nSampleIndex = SFX_COL_GATE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
if (sound == SCRIPT_SOUND_GATE_START_CLUNK)
m_sQueueSample.m_nFrequency = 10600;
else
m_sQueueSample.m_nFrequency = 9000;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ SET_SOUND_REFLECTION(TRUE);
emittingVolume = RandomDisplacement(10) + 50;
break;
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
case SCRIPT_SOUND_BULLET_HIT_GROUND_2:
case SCRIPT_SOUND_BULLET_HIT_GROUND_3:
- m_sQueueSample.m_fSoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = m_anRandomTable[iSound % 5] % 3 + SFX_BULLET_WALL_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_nPriority = 9;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 90;
break;
case SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1:
case SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2:
if (!SampleManager.IsSampleBankLoaded(SFX_BANK_TRAIN))
return;
- m_sQueueSample.m_fSoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_STATION_ANNOUNCE;
m_sQueueSample.m_nBankIndex = SFX_BANK_TRAIN;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_STATION_ANNOUNCE);
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_nPriority = 0;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_PAYPHONE_RINGING:
- m_sQueueSample.m_fSoundIntensity = 80.0f;
+ m_sQueueSample.m_MaxDistance = 80.0f;
m_sQueueSample.m_nSampleIndex = SFX_PHONE_RING;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING);
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bIs2D = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
break;
case SCRIPT_SOUND_GLASS_BREAK_L:
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_GLASS_BREAK_S:
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
break;
case SCRIPT_SOUND_GLASS_CRACK:
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_GLASS_CRACK;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ SET_SOUND_REFLECTION(TRUE);
break;
case SCRIPT_SOUND_GLASS_LIGHT_BREAK:
- m_sQueueSample.m_fSoundIntensity = 55.0f;
+ m_sQueueSample.m_MaxDistance = 55.0f;
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[4] & 3) + SFX_GLASS_SHARD_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 19000;
- m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_nPriority = 9;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = RandomDisplacement(11) + 25;
break;
case SCRIPT_SOUND_BOX_DESTROYED_1:
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_WOODEN_BOX_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ SET_SOUND_REFLECTION(TRUE);
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_BOX_DESTROYED_2:
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_CARDBOARD_BOX_SMASH;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ SET_SOUND_REFLECTION(TRUE);
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
case SCRIPT_SOUND_METAL_COLLISION:
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 5 + SFX_COL_CAR_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ SET_SOUND_REFLECTION(TRUE);
emittingVolume = m_anRandomTable[2] % 30 + 70;
break;
case SCRIPT_SOUND_TIRE_COLLISION:
- m_sQueueSample.m_fSoundIntensity = 60.0f;
+ m_sQueueSample.m_MaxDistance = 60.0f;
m_sQueueSample.m_nSampleIndex = SFX_TYRE_BUMP;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bIs2D = FALSE;
+ SET_SOUND_REFLECTION(TRUE);
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
case SCRIPT_SOUND_GUNSHELL_DROP:
@@ -6528,35 +6573,35 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
case SURFACE_HEDGE:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 11000;
- m_sQueueSample.m_nReleasingVolumeModificator = 18;
+ m_sQueueSample.m_nPriority = 18;
break;
case SURFACE_WATER:
return;
default:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(750) + 18000;
- m_sQueueSample.m_nReleasingVolumeModificator = 15;
+ m_sQueueSample.m_nPriority = 15;
break;
}
} else {
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(750) + 18000;
- m_sQueueSample.m_nReleasingVolumeModificator = 15;
+ m_sQueueSample.m_nPriority = 15;
}
- m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
case SCRIPT_SOUND_GUNSHELL_DROP_SOFT:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 11000;
- m_sQueueSample.m_nReleasingVolumeModificator = 18;
- m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_nPriority = 18;
+ m_sQueueSample.m_MaxDistance = 20.0f;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
default:
@@ -6564,17 +6609,16 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bStatic = TRUE;
+ SET_EMITTING_VOLUME(emittingVolume);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
AddSampleToRequestedQueue();
}
}
@@ -6588,303 +6632,303 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_PARTY_1_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_1_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_2_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_2_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_3_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_3;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_3_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_3;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_3;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_4_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_4;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_4_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_4;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_4;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_5_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_5;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_5;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_5_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_5;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_5;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_6_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_6;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_6;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_6_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_6;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_6;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_7_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_7;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_7;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_7_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_7;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_7;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_8_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_8;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_8;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_8_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_8;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_8;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_9_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_9;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_9;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_9_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_9;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_9;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_10_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_10;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_10;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_10_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_10;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_10;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_11_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_11;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_11;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_11_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_11;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_11;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_12_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_12;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_12;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_12_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_12;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_12;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_13_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_RAGGA;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_RAGGA;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_13_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_RAGGA;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_RAGGA;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_1_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_1_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_2_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_2_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_STRIP_CLUB_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_STRIP_CLUB_2;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_WORK_SHOP_LOOP_S:
@@ -6896,23 +6940,23 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessSawMillScriptObject(sound);
return;
case SCRIPT_SOUND_38:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_DOG_FOOD_FACTORY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_DOG_FOOD_FACTORY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 6;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_39:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_DOG_FOOD_FACTORY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_DOG_FOOD_FACTORY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 6;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_LAUNDERETTE_LOOP_S:
@@ -6920,83 +6964,83 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessLaunderetteScriptObject(sound);
return;
case SCRIPT_SOUND_CHINATOWN_RESTAURANT_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_CHINATOWN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_CHINATOWN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CHINATOWN_RESTAURANT_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_CHINATOWN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_CHINATOWN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CIPRIANI_RESAURANT_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_ITALY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_ITALY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CIPRIANI_RESAURANT_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_ITALY;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_ITALY;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_46_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_1;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_47_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_1;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_MARCO_BISTRO_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_2;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_MARCO_BISTRO_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RESTAURANT_GENERIC_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RESTAURANT_GENERIC_2;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_AIRPORT_LOOP_S:
@@ -7020,23 +7064,23 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessHomeScriptObject(sound);
return;
case SCRIPT_SOUND_FRANKIE_PIANO:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_PIANO_BAR_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PIANO_BAR;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PIANO_BAR_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_1_LOOP:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CLUB_1;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_1_S:
@@ -7050,63 +7094,63 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ProcessPornCinema(sound);
return;
case SCRIPT_SOUND_BANK_ALARM_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_BANK_ALARM_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BANK_ALARM;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_BANK_ALARM_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_BANK_ALARM_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_BANK_ALARM;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_BALL_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BALL_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_POLICE_BALL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_BALL_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BALL_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_POLICE_BALL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 2;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_INDUSTRIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_INDUSTRIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_INDUSTRIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_INDUSTRIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S:
@@ -7115,54 +7159,54 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
return;
case SCRIPT_SOUND_RAVE_1_LOOP_S:
case SCRIPT_SOUND_RAVE_2_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_COMMERCIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_COMMERCIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_1_LOOP_L:
case SCRIPT_SOUND_RAVE_2_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_COMMERCIAL;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_COMMERCIAL;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_3_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_SUBURBAN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_SUBURBAN;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_3_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
m_sQueueSample.m_nSampleIndex = SFX_RAVE_SUBURBAN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_RAVE_SUBURBAN;
emittingVolume = MAX_VOLUME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nPriority = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PRETEND_FIRE_LOOP:
- m_sQueueSample.m_fSoundIntensity = 50.0f;
+ m_sQueueSample.m_MaxDistance = 50.0f;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
- m_sQueueSample.m_nReleasingVolumeModificator = 8;
- m_sQueueSample.m_nReleasingVolumeDivider = 10;
+ m_sQueueSample.m_nPriority = 8;
+ m_sQueueSample.m_nFramesToPlay = 10;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
default:
@@ -7170,19 +7214,18 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_EMITTING_VOLUME(emittingVolume);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -7203,82 +7246,83 @@ cAudioManager::ProcessPornCinema(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_PORN_1_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_1;
sample = SFX_PORN_1_GROAN_1;
- m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_1_L:
case SCRIPT_SOUND_MISTY_SEX_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_1_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_1;
sample = SFX_PORN_1_GROAN_1;
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
case SCRIPT_SOUND_PORN_CINEMA_2_S:
m_sQueueSample.m_nSampleIndex = SFX_PORN_2_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_2;
sample = SFX_PORN_2_GROAN_1;
- m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_2_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_2_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_2;
sample = SFX_PORN_2_GROAN_1;
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
case SCRIPT_SOUND_PORN_CINEMA_3_S:
m_sQueueSample.m_nSampleIndex = SFX_PORN_3_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_3;
- m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
sample = SFX_PORN_3_GROAN_1;
break;
case SCRIPT_SOUND_PORN_CINEMA_3_L:
m_sQueueSample.m_nSampleIndex = SFX_PORN_3_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_PORN_3;
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
sample = SFX_PORN_3_GROAN_1;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
if (sound != SCRIPT_SOUND_MISTY_SEX_S && sound != SCRIPT_SOUND_MISTY_SEX_L) {
- m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(MAX_VOLUME);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
time = CTimer::GetTimeInMilliseconds();
if (time > gPornNextTime) {
- m_sQueueSample.m_nVolume = ComputeVolume(90, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(90, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
rand = m_anRandomTable[1] & 1;
m_sQueueSample.m_nSampleIndex = rand + sample;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nCounter = rand + 1;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 6;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+#ifdef FIX_BUGS
+ SET_EMITTING_VOLUME(90);
+#endif
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gPornNextTime = time + 2000 + m_anRandomTable[3] % 6000;
}
@@ -7294,30 +7338,29 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_WORK_SHOP_LOOP_S:
case SCRIPT_SOUND_WORK_SHOP_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = 20.0f;
+ m_sQueueSample.m_MaxDistance = 20.0f;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_WORKSHOP_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_WORKSHOP;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_WORKSHOP_1);
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = 30;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(30);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -7333,49 +7376,50 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_SAWMILL_LOOP_S:
case SCRIPT_SOUND_SAWMILL_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_SAWMILL_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SAWMILL;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SAWMILL_LOOP);
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = 30;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(30);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
time = CTimer::GetTimeInMilliseconds();
if (time > gSawMillNextTime) {
- m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_SAWMILL_CUT_WOOD;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SAWMILL;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = 1;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+#ifdef FIX_BUGS
+ SET_EMITTING_VOLUME(70);
+#endif
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gSawMillNextTime = time + 2000 + m_anRandomTable[3] % 4000;
}
@@ -7389,48 +7433,46 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_LAUNDERETTE_LOOP_S:
case SCRIPT_SOUND_LAUNDERETTE_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
default:
return;
}
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(45, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(45, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_LAUNDERETTE_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_LAUNDERETTE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_LOOP);
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = 45;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(45);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_LAUNDERETTE_SONG_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_LAUNDERETTE;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_SONG_LOOP);
m_sQueueSample.m_nCounter = 1;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = 110;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(110);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -7446,51 +7488,49 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
switch (sound) {
case SCRIPT_SOUND_SHOP_LOOP_S:
case SCRIPT_SOUND_SHOP_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(30, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_SHOP_LOOP;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SHOP;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOP_LOOP);
m_sQueueSample.m_nCounter = 0;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nPriority = 5;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = 30;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(30);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
time = CTimer::GetTimeInMilliseconds();
if (time > gShopNextTime) {
- m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(70, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
rand = m_anRandomTable[1] & 1;
m_sQueueSample.m_nSampleIndex = rand + SFX_SHOP_TILL_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_SHOP;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = rand + 1;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = 70;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(70);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gShopNextTime = time + 3000 + m_anRandomTable[3] % 7000;
}
@@ -7507,33 +7547,32 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
if (time > gAirportNextTime) {
switch (sound) {
case SCRIPT_SOUND_AIRPORT_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_AIRPORT_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(110, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_AIRPORT_ANNOUNCEMENT_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_AIRPORT;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = 110;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(110);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gAirportNextTime = time + 10000 + m_anRandomTable[3] % 20000;
}
@@ -7552,35 +7591,34 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
if (time > gCinemaNextTime) {
switch (sound) {
case SCRIPT_SOUND_CINEMA_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_CINEMA_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
rand = m_anRandomTable[0] % 90 + 30;
- m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = iSound % 3 + SFX_CINEMA_BASS_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_CINEMA;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 4);
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = rand;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(rand);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gCinemaNextTime = time + 1000 + m_anRandomTable[3] % 4000;
}
@@ -7601,35 +7639,34 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
if (time > gDocksNextTime) {
switch (sound) {
case SCRIPT_SOUND_DOCKS_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_DOCKS_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
rand = m_anRandomTable[0] % 60 + 40;
- m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = SFX_DOCKS_FOGHORN;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_DOCKS;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOCKS_FOGHORN);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 8);
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_nEmittingVolume = rand;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(rand);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
gDocksNextTime = time + 10000 + m_anRandomTable[3] % 40000;
}
@@ -7649,35 +7686,34 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
if (time > gHomeNextTime) {
switch (sound) {
case SCRIPT_SOUND_HOME_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_HOME_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
dist = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (dist < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (dist < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(dist);
rand = m_anRandomTable[0] % 30 + 40;
- m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(rand, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nSampleIndex = m_anRandomTable[0] % 5 + SFX_HOME_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_BUILDING_HOME;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_nEmittingVolume = rand;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ SET_EMITTING_VOLUME(rand);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
gHomeNextTime = time + 1000 + m_anRandomTable[3] % 4000;
}
@@ -7697,16 +7733,16 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
if (time > gCellNextTime) {
switch (sound) {
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_S;
break;
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_L:
- m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_L;
+ m_sQueueSample.m_MaxDistance = SCRIPT_OBJECT_INTENSITY_L;
break;
default:
return;
}
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
if (m_FrameCounter & 1)
sampleIndex = (m_anRandomTable[1] & 3) + SFX_FIGHT_1;
@@ -7714,25 +7750,24 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
sampleIndex = (m_anRandomTable[3] & 1) + SFX_BAT_HIT_LEFT;
m_sQueueSample.m_nSampleIndex = sampleIndex;
emittingVol = m_anRandomTable[0] % 50 + 55;
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_nPriority = 3;
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(emittingVol);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
cPedParams params;
- params.m_bDistanceCalculated = true;
+ params.m_bDistanceCalculated = TRUE;
params.m_fDistance = distSquared;
SetupPedComments(params, SOUND_INJURED_PED_MALE_PRISON);
}
@@ -7748,53 +7783,53 @@ cAudioManager::ProcessWeather(int32 id)
uint8 vol;
static uint8 iSound = 0;
- if (m_asAudioEntities[id].m_AudioEvents && m_asAudioEntities[id].m_awAudioEvent[0] == SOUND_LIGHTNING) {
- if (m_asAudioEntities[id].m_afVolume[0] >= 10.f) {
- m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
- m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
- m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000;
- vol = (m_asAudioEntities[id].m_afVolume[0] - 10.f) + 40;
- } else {
+ if (m_asAudioEntities[id].m_AudioEvents > 0 && m_asAudioEntities[id].m_awAudioEvent[0] == SOUND_LIGHTNING) {
+ if (m_asAudioEntities[id].m_afVolume[0] < 10.f) {
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000;
- vol = (m_asAudioEntities[id].m_afVolume[0]) + 35;
+ vol = (m_asAudioEntities[id].m_afVolume[0] * 10.0f * 0.1f);
+ vol += 35;
+ } else {
+ m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_1;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
+ m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 4000;
+ vol = ((m_asAudioEntities[id].m_afVolume[0] - 10.0f) * 10.0f * 0.1f);
+ vol += 40;
}
m_sQueueSample.m_nVolume = vol;
- if (TheCamera.SoundDistUp < 20.f)
- m_sQueueSample.m_nVolume /= 2;
+ if (TheCamera.SoundDistUp < 20.0f)
+ m_sQueueSample.m_nVolume <<= 1;
if (iSound == 4)
iSound = 0;
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_nOffset = (m_anRandomTable[2] & 15) + 55;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_nPriority = 0;
+ m_sQueueSample.m_nPan = (m_anRandomTable[2] & 15) + 55;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bStatic = TRUE;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
+ RESET_LOOP_OFFSETS
+ m_sQueueSample.m_bReverb = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
if (CWeather::Rain > 0.0f && (!CCullZones::CamNoRain() || !CCullZones::PlayerNoRain())) {
m_sQueueSample.m_nSampleIndex = SFX_RAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAIN);
- m_sQueueSample.m_nVolume = (int32)(25.f * CWeather::Rain);
+ m_sQueueSample.m_nVolume = (uint8)(25.0f * CWeather::Rain);
m_sQueueSample.m_nCounter = 4;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_nPriority = 0;
+ m_sQueueSample.m_nPan = 63;
+ m_sQueueSample.m_bIs2D = TRUE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 30;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 30;
+ m_sQueueSample.m_bReverb = FALSE;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -7802,10 +7837,10 @@ cAudioManager::ProcessWeather(int32 id)
void
cAudioManager::ProcessFrontEnd()
{
- bool stereo;
- bool processedPickup;
- bool processedMission;
- bool frontendBank;
+ bool8 stereo;
+ bool8 processedPickup;
+ bool8 processedMission;
+ bool8 frontendBank;
int16 sample;
static uint8 iSound = 0;
@@ -7813,10 +7848,10 @@ cAudioManager::ProcessFrontEnd()
static uint32 cPartMisComNextFrame = 0;
for (uint32 i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
- processedPickup = false;
- stereo = false;
- processedMission = false;
- frontendBank = false;
+ processedPickup = FALSE;
+ stereo = FALSE;
+ processedMission = FALSE;
+ frontendBank = FALSE;
switch (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_awAudioEvent[i]) {
case SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_FIRE_RIFLE;
@@ -7828,7 +7863,7 @@ cAudioManager::ProcessFrontEnd()
case SOUND_GARAGE_BAD_VEHICLE:
case SOUND_GARAGE_BOMB_ALREADY_SET:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_GARAGE_OPENING:
case SOUND_GARAGE_BOMB1_SET:
@@ -7844,19 +7879,19 @@ cAudioManager::ProcessFrontEnd()
case SOUND_EVIDENCE_PICKUP:
case SOUND_UNLOAD_GOLD:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_2_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PICKUP_WEAPON_BOUGHT:
case SOUND_PICKUP_WEAPON:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_1_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PICKUP_ERROR:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_ERROR_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PICKUP_BONUS:
case SOUND_PICKUP_MONEY:
@@ -7865,8 +7900,8 @@ cAudioManager::ProcessFrontEnd()
case SOUND_PICKUP_PACMAN_PACKAGE:
case SOUND_PICKUP_FLOAT_PACKAGE:
m_sQueueSample.m_nSampleIndex = SFX_PICKUP_3_LEFT;
- processedPickup = true;
- stereo = true;
+ processedPickup = TRUE;
+ stereo = TRUE;
break;
case SOUND_PAGER:
// TODO: ps2 code
@@ -7883,51 +7918,51 @@ cAudioManager::ProcessFrontEnd()
break;
case SOUND_PART_MISSION_COMPLETE:
m_sQueueSample.m_nSampleIndex = SFX_PART_MISSION_COMPLETE;
- processedMission = true;
+ processedMission = TRUE;
break;
case SOUND_FRONTEND_MENU_STARTING:
m_sQueueSample.m_nSampleIndex = SFX_START_BUTTON_LEFT;
- stereo = true;
+ stereo = TRUE;
break;
case SOUND_FRONTEND_MENU_NEW_PAGE:
m_sQueueSample.m_nSampleIndex = SFX_PAGE_CHANGE_AND_BACK_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MENU_NAVIGATION:
m_sQueueSample.m_nSampleIndex = SFX_HIGHLIGHT_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MENU_SETTING_CHANGE:
m_sQueueSample.m_nSampleIndex = SFX_SELECT_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MENU_BACK:
m_sQueueSample.m_nSampleIndex = SFX_SUB_MENU_BACK_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_STEREO:
m_sQueueSample.m_nSampleIndex = SFX_STEREO_LEFT;
- stereo = true;
- frontendBank = true;
+ stereo = TRUE;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_MONO:
m_sQueueSample.m_nSampleIndex = SFX_MONO;
- frontendBank = true;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_AUDIO_TEST:
m_sQueueSample.m_nSampleIndex = m_anRandomTable[0] % 3 + SFX_NOISE_BURST_1;
- frontendBank = true;
+ frontendBank = TRUE;
break;
case SOUND_FRONTEND_FAIL:
m_sQueueSample.m_nSampleIndex = SFX_ERROR_LEFT;
- frontendBank = true;
- stereo = true;
+ frontendBank = TRUE;
+ stereo = TRUE;
break;
- case SOUND_FRONTEND_NO_RADIO:
+ case SOUND_FRONTEND_RADIO_TURN_OFF:
case SOUND_FRONTEND_RADIO_CHANGE:
m_sQueueSample.m_nSampleIndex = SFX_RADIO_CLICK;
break;
@@ -7962,24 +7997,23 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_nVolume = 110;
m_sQueueSample.m_nCounter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bStatic = TRUE;
m_sQueueSample.m_nBankIndex = frontendBank ? SFX_BANK_FRONT_END_MENU : SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 0;
- m_sQueueSample.m_bIs2D = true;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ m_sQueueSample.m_nPriority = 0;
+ m_sQueueSample.m_bIs2D = TRUE;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
+ RESET_LOOP_OFFSETS
if (stereo)
- m_sQueueSample.m_nOffset = m_anRandomTable[0] & 31;
+ m_sQueueSample.m_nPan = m_anRandomTable[0] & 31;
else
- m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_nPan = 63;
+ m_sQueueSample.m_bReverb = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
if (stereo) {
++m_sQueueSample.m_nSampleIndex;
m_sQueueSample.m_nCounter = iSound++;
- m_sQueueSample.m_nOffset = MAX_VOLUME - m_sQueueSample.m_nOffset;
+ m_sQueueSample.m_nPan = 127 - m_sQueueSample.m_nPan;
AddSampleToRequestedQueue();
}
}
@@ -7990,7 +8024,7 @@ cAudioManager::ProcessCrane()
{
CCrane *crane = (CCrane *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity;
float distSquared;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
static const int intensity = 80;
if (crane) {
@@ -8001,33 +8035,32 @@ cAudioManager::ProcessCrane()
if (distSquared < SQR(intensity)) {
CalculateDistance(distCalculated, distSquared);
m_sQueueSample.m_nVolume = ComputeVolume(100, 80.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_CRANE_MAGNET;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 2;
m_sQueueSample.m_nFrequency = 6000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(100);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
- if (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents) {
+ if (m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents > 0) {
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_COL_CAR_2;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COL_CAR_2);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = true;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
}
}
@@ -8049,40 +8082,39 @@ cAudioManager::ProcessProjectiles()
switch (CProjectileInfo::GetProjectileInfo(i)->m_eWeaponType) {
case WEAPONTYPE_ROCKETLAUNCHER:
emittingVol = MAX_VOLUME;
- m_sQueueSample.m_fSoundIntensity = rocketLauncherIntensity;
+ m_sQueueSample.m_MaxDistance = rocketLauncherIntensity;
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_FLY;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_ROCKET_FLY);
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nPriority = 3;
break;
case WEAPONTYPE_MOLOTOV:
emittingVol = molotovVolume;
- m_sQueueSample.m_fSoundIntensity = molotovIntensity;
+ m_sQueueSample.m_MaxDistance = molotovIntensity;
m_sQueueSample.m_nSampleIndex = SFX_PED_ON_FIRE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
m_sQueueSample.m_nFrequency = 32 * SampleManager.GetSampleBaseFrequency(SFX_PED_ON_FIRE) / 25;
- m_sQueueSample.m_nReleasingVolumeModificator = 7;
+ m_sQueueSample.m_nPriority = 7;
break;
default:
return;
}
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_nFramesToPlay = 3;
m_sQueueSample.m_vecPos = CProjectileInfo::ms_apProjectile[i]->GetPosition();
float distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
- if (distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
+ if (distSquared < SQR(m_sQueueSample.m_MaxDistance)) {
m_sQueueSample.m_fDistance = Sqrt(distSquared);
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = i;
- m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_bIs2D = FALSE;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = emittingVol;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(emittingVol);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -8100,7 +8132,7 @@ cAudioManager::ProcessGarages()
uint32 sampleIndex;
uint8 j;
float distSquared;
- bool distCalculated;
+ bool8 distCalculated;
static uint8 iSound = 32;
@@ -8111,7 +8143,7 @@ cAudioManager::ProcessGarages()
if (entity == nil)
continue;
m_sQueueSample.m_vecPos = entity->GetPosition();
- distCalculated = false;
+ distCalculated = FALSE;
distSquared = GetDistanceSquared(m_sQueueSample.m_vecPos);
if (distSquared < SQR(SOUND_INTENSITY)) {
state = CGarages::aGarages[i].m_eGarageState;
@@ -8119,7 +8151,7 @@ cAudioManager::ProcessGarages()
while (state == GS_OPENING || state == GS_CLOSING || state == GS_AFTERDROPOFF) {
CalculateDistance(distCalculated, distSquared);
m_sQueueSample.m_nVolume = ComputeVolume(90, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
if (CGarages::aGarages[i].m_eGarageType == GARAGE_CRUSHER) {
if (CGarages::aGarages[i].m_eGarageState == GS_AFTERDROPOFF) {
if (m_FrameCounter & 1) {
@@ -8131,7 +8163,7 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) / 2;
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_bStatic = TRUE;
m_sQueueSample.m_nCounter = iSound++;
if (iSound < 32)
iSound = 32;
@@ -8142,8 +8174,8 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bStatic = FALSE;
}
} else {
m_sQueueSample.m_nSampleIndex = SFX_GARAGE_DOOR_LOOP;
@@ -8151,20 +8183,19 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nCounter = i;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReleasingSoundFlag = false;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bStatic = FALSE;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 3;
- m_sQueueSample.m_nEmittingVolume = 90;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 3;
+ SET_EMITTING_VOLUME(90);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
break;
@@ -8177,7 +8208,7 @@ cAudioManager::ProcessGarages()
if (distSquared < SQR(SOUND_INTENSITY)) {
CalculateDistance(distCalculated, distSquared);
m_sQueueSample.m_nVolume = ComputeVolume(60, SOUND_INTENSITY, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
if (CGarages::aGarages[i].m_eGarageType == GARAGE_CRUSHER) {
m_sQueueSample.m_nSampleIndex = SFX_COL_CAR_PANEL_2;
m_sQueueSample.m_nFrequency = 6735;
@@ -8189,20 +8220,19 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nFrequency = 18000;
}
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
- m_sQueueSample.m_nEmittingVolume = 60;
+ m_sQueueSample.m_nPriority = 4;
+ SET_EMITTING_VOLUME(60);
m_sQueueSample.m_fSpeedMultiplier = 0.0f;
- m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_bReleasingSoundFlag = true;
+ m_sQueueSample.m_MaxDistance = SOUND_INTENSITY;
+ m_sQueueSample.m_bReverb = TRUE;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_bStatic = TRUE;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ RESET_LOOP_OFFSETS
m_sQueueSample.m_nCounter = iSound++;
if (iSound < 32)
iSound = 32;
- m_sQueueSample.m_bRequireReflection = true;
+ SET_SOUND_REFLECTION(TRUE);
AddSampleToRequestedQueue();
}
}
@@ -8218,7 +8248,7 @@ void
cAudioManager::ProcessFireHydrant()
{
float distSquared;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
static const int intensity = 35;
m_sQueueSample.m_vecPos = ((CEntity *)m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_pEntity)->GetPosition();
@@ -8226,23 +8256,22 @@ cAudioManager::ProcessFireHydrant()
if (distSquared < SQR(intensity)) {
CalculateDistance(distCalculated, distSquared);
m_sQueueSample.m_nVolume = ComputeVolume(40, 35.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 4;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 4;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 40;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(40);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = intensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = TRUE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -8255,7 +8284,7 @@ void
cAudioManager::ProcessBridge()
{
float dist;
- bool distCalculated = false;
+ bool8 distCalculated = FALSE;
if (CBridge::pLiftRoad) {
m_sQueueSample.m_vecPos = CBridge::pLiftRoad->GetPosition();
@@ -8286,23 +8315,22 @@ cAudioManager::ProcessBridgeWarning()
{
if (CStats::CommercialPassed && m_sQueueSample.m_fDistance < 450.f) {
m_sQueueSample.m_nVolume = ComputeVolume(100, 450.f, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_nBankIndex = SFX_BANK_GENERIC_EXTRA;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = 100;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(100);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = 450.0f;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 8;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = 450.0f;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 8;
+ m_sQueueSample.m_bReverb = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -8313,22 +8341,21 @@ cAudioManager::ProcessBridgeMotor()
{
if (m_sQueueSample.m_fDistance < bridgeIntensity) {
m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, bridgeIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 1;
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE; // todo check sfx name
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = 5500;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
+ SET_EMITTING_VOLUME(MAX_VOLUME);
+ SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = bridgeIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_MaxDistance = bridgeIntensity;
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ m_sQueueSample.m_bReverb = FALSE;
AddSampleToRequestedQueue();
}
}
@@ -8349,21 +8376,20 @@ cAudioManager::ProcessBridgeOneShots()
if (m_sQueueSample.m_fDistance < bridgeIntensity) {
m_sQueueSample.m_nVolume = ComputeVolume(MAX_VOLUME, bridgeIntensity, m_sQueueSample.m_fDistance);
- if (m_sQueueSample.m_nVolume != 0) {
+ if (m_sQueueSample.m_nVolume > 0) {
m_sQueueSample.m_nCounter = 2;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = false;
- m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_bIs2D = FALSE;
+ m_sQueueSample.m_nPriority = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.m_nEmittingVolume = MAX_VOLUME;
- m_sQueueSample.m_nLoopStart = 0;
- m_sQueueSample.m_nLoopEnd = -1;
+ SET_EMITTING_VOLUME(MAX_VOLUME);
+ RESET_LOOP_OFFSETS
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- m_sQueueSample.m_fSoundIntensity = bridgeIntensity;
- m_sQueueSample.m_bReleasingSoundFlag = true;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_MaxDistance = bridgeIntensity;
+ m_sQueueSample.m_bStatic = TRUE;
+ m_sQueueSample.m_bReverb = FALSE;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
}
@@ -8371,7 +8397,7 @@ cAudioManager::ProcessBridgeOneShots()
#pragma endregion
#pragma region MISSION_AUDIO
-bool g_bMissionAudioLoadFailed;
+bool8 g_bMissionAudioLoadFailed;
struct MissionAudioData {
const char *m_pName;
@@ -8425,8 +8451,8 @@ FindMissionAudioSfx(const char *name)
return NO_SAMPLE;
}
-bool
-cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
+bool8
+cAudioManager::MissionScriptAudioUsesPoliceChannel(uint32 soundMission)
{
switch (soundMission) {
case STREAMED_SOUND_MISSION_J6_D:
@@ -8441,9 +8467,9 @@ cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
case STREAMED_SOUND_MISSION_R5_A:
case STREAMED_SOUND_MISSION_LO2_A:
case STREAMED_SOUND_MISSION_LO6_A:
- return true;
+ return TRUE;
default:
- return false;
+ return FALSE;
}
}
@@ -8453,24 +8479,24 @@ cAudioManager::PreloadMissionAudio(Const char *name)
if (m_bIsInitialised) {
int32 missionAudioSfx = FindMissionAudioSfx(name);
if (missionAudioSfx != NO_SAMPLE) {
- m_sMissionAudio.m_nSampleIndex = missionAudioSfx;
- m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_NOT_LOADED;
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying = false;
- m_sMissionAudio.m_nMissionAudioCounter = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
- m_sMissionAudio.m_nMissionAudioCounter *= 4;
- m_sMissionAudio.m_bIsPlayed = false;
- m_sMissionAudio.m_bPredefinedProperties = true;
- g_bMissionAudioLoadFailed = false;
+ m_nMissionAudioSampleIndex = missionAudioSfx;
+ m_nMissionAudioLoadingStatus = LOADING_STATUS_NOT_LOADED;
+ m_nMissionAudioPlayStatus = PLAY_STATUS_STOPPED;
+ m_bIsMissionAudioPlaying = FALSE;
+ m_nMissionAudioFramesToPlay = m_nTimeSpent * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
+ m_nMissionAudioFramesToPlay *= 4;
+ m_bIsMissionAudioAllowedToPlay = FALSE;
+ m_bIsMissionAudio2D = TRUE;
+ g_bMissionAudioLoadFailed = FALSE;
}
}
}
uint8
-cAudioManager::GetMissionAudioLoadingStatus() const
+cAudioManager::GetMissionAudioLoadingStatus()
{
if (m_bIsInitialised)
- return m_sMissionAudio.m_nLoadingStatus;
+ return m_nMissionAudioLoadingStatus;
return LOADING_STATUS_LOADED;
}
@@ -8479,24 +8505,24 @@ void
cAudioManager::SetMissionAudioLocation(float x, float y, float z)
{
if (m_bIsInitialised) {
- m_sMissionAudio.m_bPredefinedProperties = false;
- m_sMissionAudio.m_vecPos = CVector(x, y, z);
+ m_bIsMissionAudio2D = FALSE;
+ m_vecMissionAudioPosition = CVector(x, y, z);
}
}
void
cAudioManager::PlayLoadedMissionAudio()
{
- if (m_bIsInitialised && m_sMissionAudio.m_nSampleIndex != NO_SAMPLE && m_sMissionAudio.m_nLoadingStatus == LOADING_STATUS_LOADED &&
- m_sMissionAudio.m_nPlayStatus == PLAY_STATUS_STOPPED)
- m_sMissionAudio.m_bIsPlayed = true;
+ if (m_bIsInitialised && m_nMissionAudioSampleIndex != NO_SAMPLE && m_nMissionAudioLoadingStatus == LOADING_STATUS_LOADED &&
+ m_nMissionAudioPlayStatus == PLAY_STATUS_STOPPED)
+ m_bIsMissionAudioAllowedToPlay = TRUE;
}
-bool
+bool8
cAudioManager::IsMissionAudioSampleFinished()
{
if (m_bIsInitialised)
- return m_sMissionAudio.m_nPlayStatus == PLAY_STATUS_FINISHED;
+ return m_nMissionAudioPlayStatus == PLAY_STATUS_FINISHED;
static int32 cPretendFrame = 1;
@@ -8507,13 +8533,13 @@ void
cAudioManager::ClearMissionAudio()
{
if (m_bIsInitialised) {
- m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
- m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_NOT_LOADED;
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_STOPPED;
- m_sMissionAudio.m_bIsPlaying = false;
- m_sMissionAudio.m_bIsPlayed = false;
- m_sMissionAudio.m_bPredefinedProperties = true;
- m_sMissionAudio.m_nMissionAudioCounter = 0;
+ m_nMissionAudioSampleIndex = NO_SAMPLE;
+ m_nMissionAudioLoadingStatus = LOADING_STATUS_NOT_LOADED;
+ m_nMissionAudioPlayStatus = PLAY_STATUS_STOPPED;
+ m_bIsMissionAudioPlaying = FALSE;
+ m_bIsMissionAudioAllowedToPlay = FALSE;
+ m_bIsMissionAudio2D = TRUE;
+ m_nMissionAudioFramesToPlay = 0;
}
}
@@ -8531,16 +8557,16 @@ cAudioManager::ProcessMissionAudio()
static uint8 nFramesForPretendPlaying = 0;
if (!m_bIsInitialised) return;
- if (m_sMissionAudio.m_nSampleIndex == NO_SAMPLE) return;
+ if (m_nMissionAudioSampleIndex == NO_SAMPLE) return;
- switch (m_sMissionAudio.m_nLoadingStatus) {
+ switch (m_nMissionAudioLoadingStatus) {
case LOADING_STATUS_NOT_LOADED:
- SampleManager.PreloadStreamedFile(m_sMissionAudio.m_nSampleIndex, 1);
- m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_LOADED;
+ SampleManager.PreloadStreamedFile(m_nMissionAudioSampleIndex, 1);
+ m_nMissionAudioLoadingStatus = LOADING_STATUS_LOADED;
nFramesUntilFailedLoad = 0;
break;
case LOADING_STATUS_LOADED:
- if (!m_sMissionAudio.m_bIsPlayed)
+ if (!m_bIsMissionAudioAllowedToPlay)
return;
if (g_bMissionAudioLoadFailed) {
if (m_bTimerJustReset) {
@@ -8551,39 +8577,39 @@ cAudioManager::ProcessMissionAudio()
nFramesUntilFailedLoad = 0;
} else if (!m_nUserPause) {
if (++nFramesForPretendPlaying < 120) {
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_PLAYING;
+ m_nMissionAudioPlayStatus = PLAY_STATUS_PLAYING;
} else {
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_FINISHED;
- m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
+ m_nMissionAudioPlayStatus = PLAY_STATUS_FINISHED;
+ m_nMissionAudioSampleIndex = NO_SAMPLE;
}
}
break;
}
- switch (m_sMissionAudio.m_nPlayStatus) {
+ switch (m_nMissionAudioPlayStatus) {
case PLAY_STATUS_STOPPED:
- if (MissionScriptAudioUsesPoliceChannel(m_sMissionAudio.m_nSampleIndex)) {
- SetMissionScriptPoliceAudio(m_sMissionAudio.m_nSampleIndex);
+ if (MissionScriptAudioUsesPoliceChannel(m_nMissionAudioSampleIndex)) {
+ SetMissionScriptPoliceAudio(m_nMissionAudioSampleIndex);
} else {
if (m_nUserPause)
- SampleManager.PauseStream(1, 1);
- if (m_sMissionAudio.m_bPredefinedProperties) {
- SampleManager.SetStreamedVolumeAndPan(80, 63, 1, 1);
+ SampleManager.PauseStream(TRUE, 1);
+ if (m_bIsMissionAudio2D) {
+ SampleManager.SetStreamedVolumeAndPan(80, 63, TRUE, 1);
} else {
- distSquared = GetDistanceSquared(m_sMissionAudio.m_vecPos);
+ distSquared = GetDistanceSquared(m_vecMissionAudioPosition);
if (distSquared >= SQR(50.0f)) {
emittingVol = 0;
pan = 63;
} else {
dist = Sqrt(distSquared);
emittingVol = ComputeVolume(80, 50.0f, dist);
- TranslateEntity(&m_sMissionAudio.m_vecPos, &vec);
+ TranslateEntity(&m_vecMissionAudioPosition, &vec);
pan = ComputePan(50.f, &vec);
}
- SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, 1, 1);
+ SampleManager.SetStreamedVolumeAndPan(emittingVol, pan, TRUE, 1);
}
SampleManager.StartPreloadedStreamedFile(1);
}
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_PLAYING;
+ m_nMissionAudioPlayStatus = PLAY_STATUS_PLAYING;
nCheckPlayingDelay = 30;
break;
case PLAY_STATUS_PLAYING:
@@ -8592,28 +8618,28 @@ cAudioManager::ProcessMissionAudio()
SampleManager.StopStreamedFile(1);
break;
}
- if (MissionScriptAudioUsesPoliceChannel(m_sMissionAudio.m_nSampleIndex)) {
+ if (MissionScriptAudioUsesPoliceChannel(m_nMissionAudioSampleIndex)) {
if (!m_nUserPause) {
if (nCheckPlayingDelay) {
--nCheckPlayingDelay;
- } else if (GetMissionScriptPoliceAudioPlayingStatus() == PLAY_STATUS_FINISHED || m_sMissionAudio.m_nMissionAudioCounter-- == 0) {
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_FINISHED;
- m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
+ } else if (GetMissionScriptPoliceAudioPlayingStatus() == PLAY_STATUS_FINISHED || m_nMissionAudioFramesToPlay-- == 0) {
+ m_nMissionAudioPlayStatus = PLAY_STATUS_FINISHED;
+ m_nMissionAudioSampleIndex = NO_SAMPLE;
SampleManager.StopStreamedFile(1);
- m_sMissionAudio.m_nMissionAudioCounter = 0;
+ m_nMissionAudioFramesToPlay = 0;
}
}
- } else if (m_sMissionAudio.m_bIsPlaying) {
+ } else if (m_bIsMissionAudioPlaying) {
if (SampleManager.IsStreamPlaying(1) || m_nUserPause || m_nPreviousUserPause) {
if (m_nUserPause)
- SampleManager.PauseStream(1, 1);
+ SampleManager.PauseStream(TRUE, 1);
else
- SampleManager.PauseStream(0, 1);
+ SampleManager.PauseStream(FALSE, 1);
} else {
- m_sMissionAudio.m_nPlayStatus = PLAY_STATUS_FINISHED;
- m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
+ m_nMissionAudioPlayStatus = PLAY_STATUS_FINISHED;
+ m_nMissionAudioSampleIndex = NO_SAMPLE;
SampleManager.StopStreamedFile(1);
- m_sMissionAudio.m_nMissionAudioCounter = 0;
+ m_nMissionAudioFramesToPlay = 0;
}
} else {
if (m_nUserPause)
@@ -8623,7 +8649,7 @@ cAudioManager::ProcessMissionAudio()
break;
nCheckPlayingDelay = 0;
}
- m_sMissionAudio.m_bIsPlaying = true;
+ m_bIsMissionAudioPlaying = TRUE;
}
break;
default:
@@ -8633,9 +8659,9 @@ cAudioManager::ProcessMissionAudio()
case LOADING_STATUS_FAILED:
if (++nFramesUntilFailedLoad >= 90) {
nFramesForPretendPlaying = 0;
- g_bMissionAudioLoadFailed = true;
+ g_bMissionAudioLoadFailed = TRUE;
nFramesUntilFailedLoad = 0;
- m_sMissionAudio.m_nLoadingStatus = LOADING_STATUS_LOADED;
+ m_nMissionAudioLoadingStatus = LOADING_STATUS_LOADED;
}
break;
default:
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index f61350fb..425a897d 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -13,37 +13,35 @@
cAudioManager AudioManager;
-const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
-const int policeChannel = channels + 1;
-const int allChannels = channels + 2;
-
#define SPEED_OF_SOUND 343.f
#define TIME_SPENT 50
cAudioManager::cAudioManager()
{
- m_bIsInitialised = false;
- m_bReverb = true;
+ m_bIsInitialised = FALSE;
+ m_bIsSurround = TRUE;
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
m_nTimeSpent = TIME_SPENT;
- m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
+ m_nActiveSamples = NUM_CHANNELS_GENERIC;
m_nActiveSampleQueue = 1;
ClearRequestedQueue();
m_nActiveSampleQueue = 0;
ClearRequestedQueue();
ClearActiveSamples();
GenerateIntegerRandomNumberTable();
- field_4 = 0;
- m_bDynamicAcousticModelingStatus = true;
+ m_bDoubleVolume = FALSE;
+#ifdef AUDIO_REFLECTIONS
+ m_bDynamicAcousticModelingStatus = TRUE;
+#endif
for (int i = 0; i < NUM_AUDIOENTITIES; i++) {
- m_asAudioEntities[i].m_bIsUsed = false;
+ m_asAudioEntities[i].m_bIsUsed = FALSE;
m_anAudioEntityIndices[i] = NUM_AUDIOENTITIES;
}
m_nAudioEntitiesTotal = 0;
m_FrameCounter = 0;
- m_bFifthFrameFlag = false;
- m_bTimerJustReset = false;
+ m_bReduceReleasingPriority = FALSE;
+ m_bTimerJustReset = FALSE;
m_nTimer = 0;
}
@@ -60,11 +58,16 @@ cAudioManager::Initialise()
PreInitialiseGameSpecificSetup();
m_bIsInitialised = SampleManager.Initialise();
if (m_bIsInitialised) {
+#ifdef EXTERNAL_3D_SOUND
m_nActiveSamples = SampleManager.GetMaximumSupportedChannels();
if (m_nActiveSamples <= 1) {
Terminate();
} else {
--m_nActiveSamples;
+#else
+ {
+ m_nActiveSamples = NUM_CHANNELS_GENERIC;
+#endif
PostInitialiseGameSpecificSetup();
InitialisePoliceRadioZones();
InitialisePoliceRadio();
@@ -81,7 +84,7 @@ cAudioManager::Terminate()
MusicManager.Terminate();
for (uint32 i = 0; i < NUM_AUDIOENTITIES; i++) {
- m_asAudioEntities[i].m_bIsUsed = false;
+ m_asAudioEntities[i].m_bIsUsed = FALSE;
m_anAudioEntityIndices[i] = ARRAY_SIZE(m_anAudioEntityIndices);
}
@@ -96,7 +99,7 @@ cAudioManager::Terminate()
SampleManager.Terminate();
- m_bIsInitialised = false;
+ m_bIsInitialised = FALSE;
PostTerminateGameSpecificShutdown();
}
}
@@ -108,12 +111,14 @@ cAudioManager::Service()
if (m_bTimerJustReset) {
ResetAudioLogicTimers(m_nTimer);
MusicManager.ResetTimers(m_nTimer);
- m_bTimerJustReset = false;
+ m_bTimerJustReset = FALSE;
}
if (m_bIsInitialised) {
m_nPreviousUserPause = m_nUserPause;
m_nUserPause = CTimer::GetIsUserPaused();
+#ifdef AUDIO_REFLECTIONS
UpdateReflections();
+#endif
ServiceSoundEffects();
MusicManager.Service();
}
@@ -130,8 +135,8 @@ cAudioManager::CreateEntity(eAudioType type, void *entity)
return AEHANDLE_ERROR_BADAUDIOTYPE;
for (uint32 i = 0; i < ARRAY_SIZE(m_asAudioEntities); i++) {
if (!m_asAudioEntities[i].m_bIsUsed) {
- m_asAudioEntities[i].m_bIsUsed = true;
- m_asAudioEntities[i].m_bStatus = false;
+ m_asAudioEntities[i].m_bIsUsed = TRUE;
+ m_asAudioEntities[i].m_bStatus = FALSE;
m_asAudioEntities[i].m_nType = type;
m_asAudioEntities[i].m_pEntity = entity;
m_asAudioEntities[i].m_awAudioEvent[0] = SOUND_NO_SOUND;
@@ -150,7 +155,7 @@ void
cAudioManager::DestroyEntity(int32 id)
{
if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed) {
- m_asAudioEntities[id].m_bIsUsed = false;
+ m_asAudioEntities[id].m_bIsUsed = FALSE;
for (int32 i = 0; i < m_nAudioEntitiesTotal; ++i) {
if (id == m_anAudioEntityIndices[i]) {
if (i < NUM_AUDIOENTITIES - 1)
@@ -162,13 +167,29 @@ cAudioManager::DestroyEntity(int32 id)
}
}
+bool8
+cAudioManager::GetEntityStatus(int32 id)
+{
+ if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed)
+ return m_asAudioEntities[id].m_bStatus;
+ return FALSE;
+}
+
void
-cAudioManager::SetEntityStatus(int32 id, uint8 status)
+cAudioManager::SetEntityStatus(int32 id, bool8 status)
{
if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed)
m_asAudioEntities[id].m_bStatus = status;
}
+void *
+cAudioManager::GetEntityPointer(int32 id)
+{
+ if (m_bIsInitialised && id >= 0 && id < NUM_AUDIOENTITIES && m_asAudioEntities[id].m_bIsUsed)
+ return m_asAudioEntities[id].m_pEntity;
+ return NULL;
+}
+
void
cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
{
@@ -191,7 +212,7 @@ cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
}
} else {
int32 i = 0;
- while (true) {
+ while (TRUE) {
if (i >= entity.m_AudioEvents) {
if (entity.m_AudioEvents < ARRAY_SIZE(entity.m_awAudioEvent)) {
entity.m_awAudioEvent[i] = sound;
@@ -220,40 +241,40 @@ cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
}
void
-cAudioManager::SetEffectsMasterVolume(uint8 volume) const
+cAudioManager::SetEffectsMasterVolume(uint8 volume)
{
SampleManager.SetEffectsMasterVolume(volume);
}
void
-cAudioManager::SetMusicMasterVolume(uint8 volume) const
+cAudioManager::SetMusicMasterVolume(uint8 volume)
{
SampleManager.SetMusicMasterVolume(volume);
}
void
-cAudioManager::SetEffectsFadeVol(uint8 volume) const
+cAudioManager::SetEffectsFadeVol(uint8 volume)
{
SampleManager.SetEffectsFadeVolume(volume);
}
void
-cAudioManager::SetMonoMode(uint8 mono)
+cAudioManager::SetMusicFadeVol(uint8 volume)
{
- SampleManager.SetMonoMode(mono);
+ SampleManager.SetMusicFadeVolume(volume);
}
void
-cAudioManager::SetMusicFadeVol(uint8 volume) const
+cAudioManager::SetMonoMode(bool8 mono)
{
- SampleManager.SetMusicFadeVolume(volume);
+ SampleManager.SetMonoMode(mono);
}
void
cAudioManager::ResetTimers(uint32 time)
{
if (m_bIsInitialised) {
- m_bTimerJustReset = true;
+ m_bTimerJustReset = TRUE;
m_nTimer = time;
ClearRequestedQueue();
if (m_nActiveSampleQueue) {
@@ -267,7 +288,7 @@ cAudioManager::ResetTimers(uint32 time)
}
ClearActiveSamples();
ClearMissionAudio();
- SampleManager.StopChannel(policeChannel);
+ SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
SampleManager.SetEffectsFadeVolume(0);
SampleManager.SetMusicFadeVolume(0);
MusicManager.ResetMusicAfterReload();
@@ -311,34 +332,44 @@ cAudioManager::DestroyAllGameCreatedEntities()
}
}
+#ifdef GTA_PC
+
uint8
-cAudioManager::GetNum3DProvidersAvailable() const
+cAudioManager::GetNum3DProvidersAvailable()
{
+#ifdef EXTERNAL_3D_SOUND
if (m_bIsInitialised)
return SampleManager.GetNum3DProvidersAvailable();
+#endif
return 0;
}
char *
-cAudioManager::Get3DProviderName(uint8 id) const
+cAudioManager::Get3DProviderName(uint8 id)
{
+#ifndef EXTERNAL_3D_SOUND
+ return nil;
+#else
if (!m_bIsInitialised)
return nil;
#ifdef AUDIO_OAL
- id = clamp(id, 0, SampleManager.GetNum3DProvidersAvailable() - 1);
+ id = Clamp(id, 0, SampleManager.GetNum3DProvidersAvailable() - 1);
#else
// We don't want that either since it will crash the game, but skipping for now
if (id >= SampleManager.GetNum3DProvidersAvailable())
return nil;
#endif
return SampleManager.Get3DProviderName(id);
+#endif
}
int8
-cAudioManager::GetCurrent3DProviderIndex() const
+cAudioManager::GetCurrent3DProviderIndex()
{
+#ifdef EXTERNAL_3D_SOUND
if (m_bIsInitialised)
return SampleManager.GetCurrent3DProviderIndex();
+#endif
return -1;
}
@@ -346,6 +377,9 @@ cAudioManager::GetCurrent3DProviderIndex() const
int8
cAudioManager::SetCurrent3DProvider(uint8 which)
{
+#ifndef EXTERNAL_3D_SOUND
+ return -1;
+#else
if (!m_bIsInitialised)
return -1;
for (uint8 i = 0; i < m_nActiveSamples + 1; ++i)
@@ -359,30 +393,35 @@ cAudioManager::SetCurrent3DProvider(uint8 which)
ClearActiveSamples();
int8 current = SampleManager.SetCurrent3DProvider(which);
if (current > 0) {
+#ifdef EXTERNAL_3D_SOUND
m_nActiveSamples = SampleManager.GetMaximumSupportedChannels();
if (m_nActiveSamples > 1)
--m_nActiveSamples;
+#endif
}
return current;
+#endif
}
void
-cAudioManager::SetSpeakerConfig(int32 conf) const
+cAudioManager::SetSpeakerConfig(int32 conf)
{
+#ifdef EXTERNAL_3D_SOUND
SampleManager.SetSpeakerConfig(conf);
+#endif
}
-bool
-cAudioManager::IsMP3RadioChannelAvailable() const
+bool8
+cAudioManager::IsMP3RadioChannelAvailable()
{
if (m_bIsInitialised)
return SampleManager.IsMP3RadioChannelAvailable();
- return false;
+ return FALSE;
}
void
-cAudioManager::ReleaseDigitalHandle() const
+cAudioManager::ReleaseDigitalHandle()
{
if (m_bIsInitialised) {
SampleManager.ReleaseDigitalHandle();
@@ -390,46 +429,53 @@ cAudioManager::ReleaseDigitalHandle() const
}
void
-cAudioManager::ReacquireDigitalHandle() const
+cAudioManager::ReacquireDigitalHandle()
{
if (m_bIsInitialised) {
SampleManager.ReacquireDigitalHandle();
}
}
+#ifdef AUDIO_REFLECTIONS
void
-cAudioManager::SetDynamicAcousticModelingStatus(uint8 status)
+cAudioManager::SetDynamicAcousticModelingStatus(bool8 status)
{
- m_bDynamicAcousticModelingStatus = status!=0;
+ m_bDynamicAcousticModelingStatus = status;
}
+#endif
-bool
-cAudioManager::CheckForAnAudioFileOnCD() const
+bool8
+cAudioManager::CheckForAnAudioFileOnCD()
{
return SampleManager.CheckForAnAudioFileOnCD();
}
-uint8
-cAudioManager::GetCDAudioDriveLetter() const
+char
+cAudioManager::GetCDAudioDriveLetter()
{
if (m_bIsInitialised)
return SampleManager.GetCDAudioDriveLetter();
- return 0;
+ return '\0';
}
-bool
-cAudioManager::IsAudioInitialised() const
+bool8
+cAudioManager::IsAudioInitialised()
{
return m_bIsInitialised;
}
+#endif // GTA_PC
+
void
cAudioManager::ServiceSoundEffects()
{
- m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
+#ifdef FIX_BUGS
+ if(CTimer::GetLogicalFramesPassed() != 0)
+#endif
+ m_bReduceReleasingPriority = (m_FrameCounter++ % 5) == 0;
if (m_nUserPause && !m_nPreviousUserPause) {
- for (int32 i = 0; i < allChannels; i++)
+ for (int32 i = 0; i < NUM_CHANNELS; i++)
SampleManager.StopChannel(i);
ClearRequestedQueue();
@@ -454,7 +500,7 @@ cAudioManager::ServiceSoundEffects()
ServiceCollisions();
AddReleasingSounds();
ProcessMissionAudio();
-#ifdef GTA_PC
+#ifdef EXTERNAL_3D_SOUND
AdjustSamplesVolume();
#endif
ProcessActiveQueues();
@@ -470,20 +516,26 @@ cAudioManager::ServiceSoundEffects()
m_sAudioScriptObjectManager.m_nScriptObjectEntityTotal = 0;
}
-uint8
-cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const
+uint32
+cAudioManager::FL(float f)
{
- float newSoundIntensity;
- if (soundIntensity <= 0.0f)
+ return SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex) * f;
+}
+
+uint8
+cAudioManager::ComputeVolume(uint8 emittingVolume, float maxDistance, float distance)
+{
+ float minDistance;
+ if (maxDistance <= 0.0f)
return 0;
- newSoundIntensity = soundIntensity / 5.0f;
- if (newSoundIntensity <= distance)
- emittingVolume = sq((soundIntensity - newSoundIntensity - (distance - newSoundIntensity)) / (soundIntensity - newSoundIntensity)) * emittingVolume;
+ minDistance = maxDistance / 5.0f;
+ if (minDistance <= distance)
+ emittingVolume = sq((maxDistance - minDistance - (distance - minDistance)) / (maxDistance - minDistance)) * emittingVolume;
return emittingVolume;
}
void
-cAudioManager::TranslateEntity(Const CVector *in, CVector *out) const
+cAudioManager::TranslateEntity(Const CVector *in, CVector *out)
{
*out = MultiplyInverse(TheCamera.GetMatrix(), *in);
}
@@ -491,18 +543,19 @@ cAudioManager::TranslateEntity(Const CVector *in, CVector *out) const
int32
cAudioManager::ComputePan(float dist, CVector *vec)
{
- const uint8 PanTable[64] = {0, 3, 8, 12, 16, 19, 22, 24, 26, 28, 30, 31, 33, 34, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 53,
- 54, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63};
+ Const static uint8 PanTable[64] = {0, 3, 8, 12, 16, 19, 22, 24, 26, 28, 30, 31, 33, 34, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 53,
+ 54, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63};
- int32 index = Min(63, Abs(vec->x / (dist / 64.f)));
+ int32 index = vec->x / (dist / 64.f);
+ index = Min(63, ABS(index));
if (vec->x > 0.f)
- return Max(20, 63 - PanTable[index]);
+ return Max(20, 63 - (int8)PanTable[index]);
return Min(107, PanTable[index] + 63);
}
-int32
-cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const
+uint32
+cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier)
{
uint32 newFreq = oldFreq;
if (!TheCamera.Get_Just_Switched_Status() && speedMultiplier != 0.0f) {
@@ -510,11 +563,7 @@ cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1,
if (dist != 0.0f) {
float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier;
if (m_fSpeedOfSound > Abs(speedOfSource)) {
- if (speedOfSource < 0.0f) {
- speedOfSource = Max(speedOfSource, -1.5f);
- } else {
- speedOfSource = Min(speedOfSource, 1.5f);
- }
+ speedOfSource = Clamp2(speedOfSource, 0.0f, 1.5f);
newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
}
}
@@ -523,11 +572,11 @@ cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1,
}
int32
-cAudioManager::RandomDisplacement(uint32 seed) const
+cAudioManager::RandomDisplacement(uint32 seed)
{
int32 value;
- static bool bPos = true;
+ static bool8 bPos = TRUE;
static uint32 Adjustment = 0;
if (!seed)
@@ -556,52 +605,67 @@ cAudioManager::InterrogateAudioEntities()
void
cAudioManager::AddSampleToRequestedQueue()
{
- int32 calculatedVolume;
+ uint32 finalPriority;
uint8 sampleIndex;
- bool bReflections;
+#ifdef AUDIO_REFLECTIONS
+ bool8 bReflections;
+#endif
if (m_sQueueSample.m_nSampleIndex < TOTAL_AUDIO_SAMPLES) {
- calculatedVolume = m_sQueueSample.m_nReleasingVolumeModificator * (MAX_VOLUME - m_sQueueSample.m_nVolume);
+ finalPriority = m_sQueueSample.m_nPriority * (MAX_VOLUME - m_sQueueSample.m_nVolume);
sampleIndex = m_SampleRequestQueuesStatus[m_nActiveSampleQueue];
if (sampleIndex >= m_nActiveSamples) {
sampleIndex = m_abSampleQueueIndexTable[m_nActiveSampleQueue][m_nActiveSamples - 1];
- if (m_asSamples[m_nActiveSampleQueue][sampleIndex].m_nCalculatedVolume <= calculatedVolume)
+ if (m_asSamples[m_nActiveSampleQueue][sampleIndex].m_nFinalPriority <= finalPriority)
return;
} else {
++m_SampleRequestQueuesStatus[m_nActiveSampleQueue];
}
- m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
- m_sQueueSample.m_bLoopEnded = false;
+#if GTA_VERSION < GTA3_PC_10
+ if (m_sQueueSample.m_bStatic) {
+ if (m_sQueueSample.m_nLoopCount > 0)
+ m_sQueueSample.unk = m_nTimeSpent * SampleManager.GetSampleLength(m_sQueueSample.m_nSampleIndex) / m_sQueueSample.m_nFrequency;
+ else
+ m_sQueueSample.unk = -3;
+ }
+#endif
+ m_sQueueSample.m_nFinalPriority = finalPriority;
+ m_sQueueSample.m_bIsPlayingFinished = FALSE;
+#ifdef AUDIO_REFLECTIONS
if (m_sQueueSample.m_bIs2D) {
- m_sQueueSample.m_bRequireReflection = false;
- m_sQueueSample.m_nLoopsRemaining = 0;
+ m_sQueueSample.m_bReflections = FALSE;
+ m_sQueueSample.m_nReflectionDelay = 0;
}
- if (m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount) {
- bReflections = m_sQueueSample.m_bRequireReflection;
+ if (m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount > 0) {
+ bReflections = m_sQueueSample.m_bReflections;
} else {
- bReflections = false;
- m_sQueueSample.m_nLoopsRemaining = 0;
+ bReflections = FALSE;
+ m_sQueueSample.m_nReflectionDelay = 0;
}
- m_sQueueSample.m_bRequireReflection = false;
+ m_sQueueSample.m_bReflections = FALSE;
if (!m_bDynamicAcousticModelingStatus)
- m_sQueueSample.m_bReverbFlag = false;
+ m_sQueueSample.m_bReverb = FALSE;
+#endif
m_asSamples[m_nActiveSampleQueue][sampleIndex] = m_sQueueSample;
AddDetailsToRequestedOrderList(sampleIndex);
+#ifdef AUDIO_REFLECTIONS
if (bReflections)
AddReflectionsToRequestedQueue();
+#endif
}
}
+
void
cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
{
uint32 i = 0;
if (sample != 0) {
for (; i < sample; i++) {
- if (m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]].m_nCalculatedVolume >
- m_asSamples[m_nActiveSampleQueue][sample].m_nCalculatedVolume)
+ if (m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]].m_nFinalPriority >
+ m_asSamples[m_nActiveSampleQueue][sample].m_nFinalPriority)
break;
}
if (i < sample) {
@@ -611,6 +675,7 @@ cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
m_abSampleQueueIndexTable[m_nActiveSampleQueue][i] = sample;
}
+#ifdef AUDIO_REFLECTIONS
void
cAudioManager::AddReflectionsToRequestedQueue()
{
@@ -620,22 +685,22 @@ cAudioManager::AddReflectionsToRequestedQueue()
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
reflectionDistance = m_afReflectionsDistances[i];
- if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_fSoundIntensity) {
- m_sQueueSample.m_nLoopsRemaining = (reflectionDistance * 500.f / 1029.f);
- if (m_sQueueSample.m_nLoopsRemaining > 5) {
+ if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_MaxDistance) {
+ m_sQueueSample.m_nReflectionDelay = (reflectionDistance * 500.f / 1029.f);
+ if (m_sQueueSample.m_nReflectionDelay > 5) {
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
- m_sQueueSample.m_nEmittingVolume = emittingVolume;
- m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
+ SET_EMITTING_VOLUME(emittingVolume);
+ m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_MaxDistance, m_sQueueSample.m_fDistance);
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
m_sQueueSample.m_nCounter += (i + 1) * 256;
- if (m_sQueueSample.m_nLoopCount) {
+ if (m_sQueueSample.m_nLoopCount > 0) {
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
- if (noise <= 0)
- m_sQueueSample.m_nFrequency += noise;
- else
+ if (noise > 0)
m_sQueueSample.m_nFrequency -= noise;
+ else
+ m_sQueueSample.m_nFrequency += noise;
}
- m_sQueueSample.m_nReleasingVolumeModificator += 20;
+ m_sQueueSample.m_nPriority += 20;
m_sQueueSample.m_vecPos = m_avecReflectionsPos[i];
AddSampleToRequestedQueue();
}
@@ -647,18 +712,20 @@ cAudioManager::AddReflectionsToRequestedQueue()
void
cAudioManager::UpdateReflections()
{
- const CVector &camPos = TheCamera.GetPosition();
+ CVector camPos;
CColPoint colpoint;
CEntity *ent;
if (m_FrameCounter % 8 == 0) {
+ camPos = TheCamera.GetPosition();
m_avecReflectionsPos[0] = camPos;
- m_avecReflectionsPos[0].y += 50.f;
+ m_avecReflectionsPos[0].y += 50.0f;
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[0], colpoint, ent, true, false, false, true, false, true, true))
m_afReflectionsDistances[0] = Distance(camPos, colpoint.point);
else
m_afReflectionsDistances[0] = 50.0f;
} else if ((m_FrameCounter + 1) % 8 == 0) {
+ camPos = TheCamera.GetPosition();
m_avecReflectionsPos[1] = camPos;
m_avecReflectionsPos[1].y -= 50.0f;
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[1], colpoint, ent, true, false, false, true, false, true, true))
@@ -666,6 +733,7 @@ cAudioManager::UpdateReflections()
else
m_afReflectionsDistances[1] = 50.0f;
} else if ((m_FrameCounter + 2) % 8 == 0) {
+ camPos = TheCamera.GetPosition();
m_avecReflectionsPos[2] = camPos;
m_avecReflectionsPos[2].x -= 50.0f;
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[2], colpoint, ent, true, false, false, true, false, true, true))
@@ -673,6 +741,7 @@ cAudioManager::UpdateReflections()
else
m_afReflectionsDistances[2] = 50.0f;
} else if ((m_FrameCounter + 3) % 8 == 0) {
+ camPos = TheCamera.GetPosition();
m_avecReflectionsPos[3] = camPos;
m_avecReflectionsPos[3].x += 50.0f;
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[3], colpoint, ent, true, false, false, true, false, true, true))
@@ -680,6 +749,7 @@ cAudioManager::UpdateReflections()
else
m_afReflectionsDistances[3] = 50.0f;
} else if ((m_FrameCounter + 4) % 8 == 0) {
+ camPos = TheCamera.GetPosition();
m_avecReflectionsPos[4] = camPos;
m_avecReflectionsPos[4].z += 50.0f;
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[4].z, colpoint, ent, true, false, false, false, true, false, nil))
@@ -688,49 +758,73 @@ cAudioManager::UpdateReflections()
m_afReflectionsDistances[4] = 50.0f;
}
}
+#endif // AUDIO_REFLECTIONS
void
cAudioManager::AddReleasingSounds()
{
- bool toProcess[44]; // why not 27?
+ // in case someone would want to increase it
+#ifdef FIX_BUGS
+ bool8 toProcess[NUM_CHANNELS_GENERIC];
+#else
+ bool8 toProcess[44];
+#endif
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]];
- if (sample.m_bLoopEnded)
+ if (sample.m_bIsPlayingFinished)
continue;
- toProcess[i] = false;
+ toProcess[i] = FALSE;
for (int32 j = 0; j < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; j++) {
if (sample.m_nEntityIndex == m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][j]].m_nEntityIndex &&
sample.m_nCounter == m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][j]].m_nCounter) {
- toProcess[i] = true;
+ toProcess[i] = TRUE;
break;
}
}
if (!toProcess[i]) {
- if (sample.m_nCounter <= 255 || !sample.m_nLoopsRemaining) {
- if (!sample.m_nReleasingVolumeDivider)
+#ifdef AUDIO_REFLECTIONS
+ if (sample.m_nCounter <= 255 || sample.m_nReflectionDelay == 0) // check if not delayed reflection
+#endif
+ {
+ if (sample.m_nFramesToPlay == 0)
continue;
- if (!sample.m_nLoopCount) {
+ if (sample.m_nLoopCount == 0) {
if (sample.m_nVolumeChange == -1) {
- sample.m_nVolumeChange = sample.m_nVolume / sample.m_nReleasingVolumeDivider;
+#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
+ sample.m_nVolumeChange = sample.m_nEmittingVolume / sample.m_nFramesToPlay;
+#else
+ sample.m_nVolumeChange = sample.m_nVolume / sample.m_nFramesToPlay;
+#endif
if (sample.m_nVolumeChange <= 0)
sample.m_nVolumeChange = 1;
}
+#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
+ if (sample.m_nEmittingVolume <= sample.m_nVolumeChange) {
+#else
if (sample.m_nVolume <= sample.m_nVolumeChange) {
- sample.m_nReleasingVolumeDivider = 0;
+#endif
+ sample.m_nFramesToPlay = 0;
continue;
}
+#if defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
+ sample.m_nEmittingVolume -= sample.m_nVolumeChange;
+#else
sample.m_nVolume -= sample.m_nVolumeChange;
+#endif
}
- --sample.m_nReleasingVolumeDivider;
- if (m_bFifthFrameFlag) {
- if (sample.m_nReleasingVolumeModificator < 20)
- ++sample.m_nReleasingVolumeModificator;
+#ifdef FIX_BUGS
+ if(CTimer::GetLogicalFramesPassed() != 0)
+#endif
+ --sample.m_nFramesToPlay;
+ if (m_bReduceReleasingPriority) {
+ if (sample.m_nPriority < 20)
+ ++sample.m_nPriority;
}
- sample.m_bReleasingSoundFlag = 0;
+ sample.m_bStatic = FALSE;
}
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
AddSampleToRequestedQueue();
@@ -741,169 +835,196 @@ cAudioManager::AddReleasingSounds()
void
cAudioManager::ProcessActiveQueues()
{
- bool flag;
+ bool8 flag;
float position2;
float position1;
- uint32 v28;
- uint32 v29;
+ uint32 samplesPerFrame;
+ uint32 samplesToPlay;
+#ifdef EXTERNAL_3D_SOUND
float x;
float usedX;
float usedY;
float usedZ;
+#endif
uint8 vol;
uint8 emittingVol;
CVector position;
for (int32 i = 0; i < m_nActiveSamples; i++) {
- m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false;
- m_asActiveSamples[i].m_bIsProcessed = false;
+ m_asSamples[m_nActiveSampleQueue][i].m_bIsBeingPlayed = FALSE;
+ m_asActiveSamples[i].m_bIsBeingPlayed = FALSE;
}
- for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) {
+ for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
if (sample.m_nSampleIndex != NO_SAMPLE) {
- for (int32 j = 0; j < m_nActiveSamples; ++j) {
+ for (int32 j = 0; j < m_nActiveSamples; j++) {
if (sample.m_nEntityIndex == m_asActiveSamples[j].m_nEntityIndex && sample.m_nCounter == m_asActiveSamples[j].m_nCounter &&
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
- if (sample.m_nLoopCount) {
- if (m_FrameCounter & 1) {
+ if (sample.m_nLoopCount > 0) {
+#if GTA_VERSION >= GTA3_PC_10
+ if (m_FrameCounter & 1)
flag = !!(j & 1);
- } else {
+ else
flag = !(j & 1);
- }
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
- sample.m_bLoopEnded = true;
- m_asActiveSamples[j].m_bLoopEnded = true;
+#else
+ if (m_asActiveSamples[j].unk != 0)
+ m_asActiveSamples[j].unk--;
+ else if (SampleManager.GetChannelUsedFlag(j))
+ m_asActiveSamples[j].unk = m_nTimeSpent * SampleManager.GetSampleLength(m_asActiveSamples[j].m_nSampleIndex) / m_asActiveSamples[j].m_nFrequency;
+ else {
+#endif
+ sample.m_bIsPlayingFinished = TRUE;
+ m_asActiveSamples[j].m_bIsPlayingFinished = TRUE;
m_asActiveSamples[j].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
continue;
}
}
- sample.m_bIsProcessed = true;
- m_asActiveSamples[j].m_bIsProcessed = true;
+ sample.m_bIsBeingPlayed = TRUE;
+ m_asActiveSamples[j].m_bIsBeingPlayed = TRUE;
sample.m_nVolumeChange = -1;
- if (!sample.m_bReleasingSoundFlag) {
+ if (!sample.m_bStatic) {
if (sample.m_bIs2D) {
- if (field_4) {
- emittingVol = 2 * Min(63, sample.m_nEmittingVolume);
- } else {
- emittingVol = sample.m_nEmittingVolume;
- }
+#ifdef EXTERNAL_3D_SOUND
+ emittingVol = m_bDoubleVolume ? 2 * Min(63, sample.m_nEmittingVolume) : sample.m_nEmittingVolume;
+#else
+ emittingVol = m_bDoubleVolume ? 2 * Min(63, sample.m_nVolume) : sample.m_nVolume;
+#endif
SampleManager.SetChannelFrequency(j, sample.m_nFrequency);
+#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannelEmittingVolume(j, emittingVol);
+#else
+ SampleManager.SetChannelPan(j, sample.m_nPan);
+ SampleManager.SetChannelVolume(j, sample.m_nVolume);
+#endif
} else {
- m_asActiveSamples[j].m_fDistance = sample.m_fDistance;
position2 = sample.m_fDistance;
position1 = m_asActiveSamples[j].m_fDistance;
+ m_asActiveSamples[j].m_fDistance = sample.m_fDistance;
sample.m_nFrequency = ComputeDopplerEffectedFrequency(sample.m_nFrequency, position1, position2, sample.m_fSpeedMultiplier);
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
- int32 freq;
- if (sample.m_nFrequency <= m_asActiveSamples[j].m_nFrequency) {
-#ifdef FIX_BUGS
- freq = Max((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency - 6000);
-#else
- freq = Max((int32)sample.m_nFrequency, int32(m_asActiveSamples[j].m_nFrequency - 6000));
-#endif
- } else {
- freq = Min(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency + 6000);
- }
+ uint32 freq = Clamp2((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency, 6000);
m_asActiveSamples[j].m_nFrequency = freq;
SampleManager.SetChannelFrequency(j, freq);
}
+#ifdef EXTERNAL_3D_SOUND
if (sample.m_nEmittingVolume != m_asActiveSamples[j].m_nEmittingVolume) {
- if (sample.m_nEmittingVolume <= m_asActiveSamples[j].m_nEmittingVolume) {
- vol = Max(m_asActiveSamples[j].m_nEmittingVolume - 10, sample.m_nEmittingVolume);
- } else {
- vol = Min(m_asActiveSamples[j].m_nEmittingVolume + 10, sample.m_nEmittingVolume);
- }
-
- uint8 emittingVol;
- if (field_4) {
- emittingVol = 2 * Min(63, vol);
- } else {
- emittingVol = vol;
- }
- SampleManager.SetChannelEmittingVolume(j, emittingVol);
+ vol = Clamp2((int8)sample.m_nEmittingVolume, (int8)m_asActiveSamples[j].m_nEmittingVolume, 10);
+ SampleManager.SetChannelEmittingVolume(j, m_bDoubleVolume ? 2 * Min(63, vol) : vol);
m_asActiveSamples[j].m_nEmittingVolume = vol;
}
+#else
+ if (sample.m_nVolume != m_asActiveSamples[j].m_nVolume) {
+ vol = Clamp2((int8)sample.m_nVolume, (int8)m_asActiveSamples[j].m_nVolume, 10);
+ m_asActiveSamples[j].m_nVolume = vol;
+ SampleManager.SetChannelVolume(j, m_bDoubleVolume ? 2 * Min(63, vol) : vol);
+ }
+#endif
TranslateEntity(&sample.m_vecPos, &position);
+#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannel3DPosition(j, position.x, position.y, position.z);
- SampleManager.SetChannel3DDistances(j, sample.m_fSoundIntensity, 0.25f * sample.m_fSoundIntensity);
+ SampleManager.SetChannel3DDistances(j, sample.m_MaxDistance, 0.25f * sample.m_MaxDistance);
+#else
+ sample.m_nPan = ComputePan(sample.m_fDistance, &position);
+ SampleManager.SetChannelPan(j, sample.m_nPan);
+#endif
}
- SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
+ SampleManager.SetChannelReverbFlag(j, sample.m_bReverb);
break;
}
- sample.m_bIsProcessed = false;
- m_asActiveSamples[j].m_bIsProcessed = false;
+ sample.m_bIsBeingPlayed = FALSE;
+ m_asActiveSamples[j].m_bIsBeingPlayed = FALSE;
}
}
}
}
for (int32 i = 0; i < m_nActiveSamples; i++) {
- if (m_asActiveSamples[i].m_nSampleIndex != NO_SAMPLE && !m_asActiveSamples[i].m_bIsProcessed) {
+ if (m_asActiveSamples[i].m_nSampleIndex != NO_SAMPLE && !m_asActiveSamples[i].m_bIsBeingPlayed) {
SampleManager.StopChannel(i);
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
}
}
- for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) {
+ for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
- if (!sample.m_bIsProcessed && !sample.m_bLoopEnded && m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
- if (sample.m_nCounter > 255 && sample.m_nLoopCount && sample.m_nLoopsRemaining) {
- --sample.m_nLoopsRemaining;
- sample.m_nReleasingVolumeDivider = 1;
- } else {
- for (uint8 j = 0; j < m_nActiveSamples; ++j) {
- if (!m_asActiveSamples[j].m_bIsProcessed) {
- if (sample.m_nLoopCount) {
- v28 = sample.m_nFrequency / m_nTimeSpent;
- v29 = sample.m_nLoopCount * SampleManager.GetSampleLength(sample.m_nSampleIndex);
- if (v28 == 0)
+ if (!sample.m_bIsBeingPlayed && !sample.m_bIsPlayingFinished && m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
+#ifdef AUDIO_REFLECTIONS
+ if (sample.m_nCounter > 255 && sample.m_nLoopCount > 0 && sample.m_nReflectionDelay > 0) { // check if reflection
+ sample.m_nReflectionDelay--;
+ sample.m_nFramesToPlay = 1;
+ } else
+#endif
+ {
+ for (uint8 j = 0; j < m_nActiveSamples; j++) {
+ if (!m_asActiveSamples[j].m_bIsBeingPlayed) {
+ if (sample.m_nLoopCount > 0) {
+ samplesPerFrame = sample.m_nFrequency / m_nTimeSpent;
+ samplesToPlay = sample.m_nLoopCount * SampleManager.GetSampleLength(sample.m_nSampleIndex);
+ if (samplesPerFrame == 0)
continue;
- sample.m_nReleasingVolumeDivider = v29 / v28 + 1;
+ sample.m_nFramesToPlay = samplesToPlay / samplesPerFrame + 1;
}
memcpy(&m_asActiveSamples[j], &sample, sizeof(tSound));
- if (!m_asActiveSamples[j].m_bIs2D)
+ if (!m_asActiveSamples[j].m_bIs2D) {
TranslateEntity(&m_asActiveSamples[j].m_vecPos, &position);
- if (field_4) {
- emittingVol = 2 * Min(63, m_asActiveSamples[j].m_nEmittingVolume);
- } else {
- emittingVol = m_asActiveSamples[j].m_nEmittingVolume;
+#ifndef EXTERNAL_3D_SOUND
+ m_asActiveSamples[j].m_nPan = ComputePan(m_asActiveSamples[j].m_fDistance, &position);
+#endif
}
+#ifdef EXTERNAL_3D_SOUND
+ emittingVol = m_bDoubleVolume ? 2 * Min(63, m_asActiveSamples[j].m_nEmittingVolume) : m_asActiveSamples[j].m_nEmittingVolume;
+#else
+ emittingVol = m_bDoubleVolume ? 2 * Min(63, m_asActiveSamples[j].m_nVolume) : m_asActiveSamples[j].m_nVolume;
+#endif
+#ifdef GTA_PS2
+ {
+ SampleManager.InitialiseChannel(j, m_asActiveSamples[j].m_nSampleIndex, m_asActiveSamples[j].m_nBankIndex);
+#else
if (SampleManager.InitialiseChannel(j, m_asActiveSamples[j].m_nSampleIndex, m_asActiveSamples[j].m_nBankIndex)) {
+#endif
SampleManager.SetChannelFrequency(j, m_asActiveSamples[j].m_nFrequency);
+#ifdef EXTERNAL_3D_SOUND
SampleManager.SetChannelEmittingVolume(j, emittingVol);
+#else
+ SampleManager.SetChannelVolume(j, emittingVol);
+ SampleManager.SetChannelPan(j, m_asActiveSamples[j].m_nPan);
+#endif
+#ifndef GTA_PS2
SampleManager.SetChannelLoopPoints(j, m_asActiveSamples[j].m_nLoopStart, m_asActiveSamples[j].m_nLoopEnd);
SampleManager.SetChannelLoopCount(j, m_asActiveSamples[j].m_nLoopCount);
- SampleManager.SetChannelReverbFlag(j, m_asActiveSamples[j].m_bReverbFlag);
+#endif
+ SampleManager.SetChannelReverbFlag(j, m_asActiveSamples[j].m_bReverb);
+#ifdef EXTERNAL_3D_SOUND
if (m_asActiveSamples[j].m_bIs2D) {
- uint8 offset = m_asActiveSamples[j].m_nOffset;
- if (offset == 63) {
+ uint8 offset = m_asActiveSamples[j].m_nPan;
+ if (offset == 63)
x = 0.f;
- } else if (offset >= 63) {
- x = (offset - 63) * 1000.f / 63;
- } else {
- x = -(63 - offset) * 1000.f / 63;
- }
+ else if (offset >= 63)
+ x = (offset - 63) * 1000.0f / 63;
+ else
+ x = -(63 - offset) * 1000.0f / 63;
usedX = x;
- usedY = 0.f;
- usedZ = 0.f;
- m_asActiveSamples[j].m_fSoundIntensity = 100000.0f;
+ usedY = 0.0f;
+ usedZ = 0.0f;
+ m_asActiveSamples[j].m_MaxDistance = 100000.0f;
} else {
usedX = position.x;
usedY = position.y;
usedZ = position.z;
}
SampleManager.SetChannel3DPosition(j, usedX, usedY, usedZ);
- SampleManager.SetChannel3DDistances(j, m_asActiveSamples[j].m_fSoundIntensity, 0.25f * m_asActiveSamples[j].m_fSoundIntensity);
+ SampleManager.SetChannel3DDistances(j, m_asActiveSamples[j].m_MaxDistance, 0.25f * m_asActiveSamples[j].m_MaxDistance);
+#endif
SampleManager.StartChannel(j);
}
- m_asActiveSamples[j].m_bIsProcessed = true;
- sample.m_bIsProcessed = true;
+ m_asActiveSamples[j].m_bIsBeingPlayed = TRUE;
+ sample.m_bIsBeingPlayed = TRUE;
sample.m_nVolumeChange = -1;
break;
}
@@ -925,36 +1046,52 @@ cAudioManager::ClearRequestedQueue()
void
cAudioManager::ClearActiveSamples()
{
- for (int32 i = 0; i < m_nActiveSamples; i++) {
+ for (uint8 i = 0; i < m_nActiveSamples; i++) {
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
m_asActiveSamples[i].m_nCounter = 0;
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[i].m_nBankIndex = INVALID_SFX_BANK;
- m_asActiveSamples[i].m_bIs2D = false;
- m_asActiveSamples[i].m_nReleasingVolumeModificator = 5;
+ m_asActiveSamples[i].m_bIs2D = FALSE;
+ m_asActiveSamples[i].m_nPriority = 5;
m_asActiveSamples[i].m_nFrequency = 0;
m_asActiveSamples[i].m_nVolume = 0;
+#ifdef EXTERNAL_3D_SOUND
m_asActiveSamples[i].m_nEmittingVolume = 0;
+#endif
m_asActiveSamples[i].m_fDistance = 0.0f;
- m_asActiveSamples[i].m_bIsProcessed = false;
- m_asActiveSamples[i].m_bLoopEnded = false;
+ m_asActiveSamples[i].m_bIsBeingPlayed = FALSE;
+ m_asActiveSamples[i].m_bIsPlayingFinished = FALSE;
m_asActiveSamples[i].m_nLoopCount = 1;
+#ifndef GTA_PS2
m_asActiveSamples[i].m_nLoopStart = 0;
m_asActiveSamples[i].m_nLoopEnd = -1;
+#endif
m_asActiveSamples[i].m_fSpeedMultiplier = 0.0f;
- m_asActiveSamples[i].m_fSoundIntensity = 200.0f;
- m_asActiveSamples[i].m_nOffset = 63;
- m_asActiveSamples[i].m_bReleasingSoundFlag = false;
- m_asActiveSamples[i].m_nCalculatedVolume = 0;
- m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
+ m_asActiveSamples[i].m_MaxDistance = 200.0f;
+ m_asActiveSamples[i].m_nPan = 63;
+ m_asActiveSamples[i].m_bStatic = FALSE;
+#if GTA_VERSION < GTA3_PC_10
+ m_asActiveSamples[i].unk = -3;
+#endif
+ m_asActiveSamples[i].m_nFinalPriority = 0;
+ m_asActiveSamples[i].m_nFramesToPlay = 0;
m_asActiveSamples[i].m_nVolumeChange = -1;
m_asActiveSamples[i].m_vecPos = CVector(0.0f, 0.0f, 0.0f);
- m_asActiveSamples[i].m_bReverbFlag = false;
- m_asActiveSamples[i].m_nLoopsRemaining = 0;
- m_asActiveSamples[i].m_bRequireReflection = false;
+ m_asActiveSamples[i].m_bReverb = FALSE;
+#ifdef AUDIO_REFLECTIONS
+ m_asActiveSamples[i].m_nReflectionDelay = 0;
+ m_asActiveSamples[i].m_bReflections = FALSE;
+#endif
}
}
+void
+cAudioManager::LoadBankIfNecessary(uint8 bank)
+{
+ if(!SampleManager.IsSampleBankLoaded(bank))
+ SampleManager.LoadSampleBank(bank);
+}
+
void
cAudioManager::GenerateIntegerRandomNumberTable()
{
@@ -963,25 +1100,25 @@ cAudioManager::GenerateIntegerRandomNumberTable()
}
}
-#ifdef GTA_PC
+#ifdef EXTERNAL_3D_SOUND
void
cAudioManager::AdjustSamplesVolume()
{
for (int i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
- tSound *pSample = &m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i] + 1];
+ tSound *pSample = &m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
if (!pSample->m_bIs2D)
- pSample->m_nEmittingVolume = ComputeEmittingVolume(pSample->m_nEmittingVolume, pSample->m_fSoundIntensity, pSample->m_fDistance);
+ pSample->m_nEmittingVolume = ComputeEmittingVolume(pSample->m_nEmittingVolume, pSample->m_MaxDistance, pSample->m_fDistance);
}
}
uint8
-cAudioManager::ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist)
+cAudioManager::ComputeEmittingVolume(uint8 emittingVolume, float maxDistance, float distance)
{
- float quatIntensity = intensity / 4.0f;
- float diffIntensity = intensity - quatIntensity;
- if (dist > diffIntensity)
- return (quatIntensity - (dist - diffIntensity)) * (float)emittingVolume / quatIntensity;
+ float minDistance = maxDistance / 4.0f;
+ float diffDistance = maxDistance - minDistance;
+ if (distance > diffDistance)
+ return (minDistance - (distance - diffDistance)) * (float)emittingVolume / minDistance;
return emittingVolume;
}
-#endif
\ No newline at end of file
+#endif
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 2f86ee98..39fa9288 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -2,37 +2,64 @@
#include "audio_enums.h"
#include "AudioCollision.h"
-#include "PoliceRadio.h"
+#include "PolRadio.h"
class tSound
{
public:
- int32 m_nEntityIndex;
- int32 m_nCounter;
- int32 m_nSampleIndex;
- uint8 m_nBankIndex;
- bool m_bIs2D;
- int32 m_nReleasingVolumeModificator;
- uint32 m_nFrequency;
- uint8 m_nVolume;
- float m_fDistance;
- int32 m_nLoopCount;
- int32 m_nLoopStart;
+ int32 m_nEntityIndex; // audio entity index
+#if GTA_VERSION >= GTA3_PC_10
+ uint32 m_nCounter; // I'm not sure what this is but it looks like a virtual counter to determine the same sound in queue
+ // Values higher than 255 are used by reflections
+#else
+ uint8 m_nCounter;
+#endif
+ uint32 m_nSampleIndex; // An index of sample from AudioSamples.h
+ uint8 m_nBankIndex; // A sound bank index. IDK what's the point of it here since samples are hardcoded anyway
+ bool8 m_bIs2D; // If TRUE then sound is played in 2D space (such as frontend or police radio)
+ uint32 m_nPriority; // The multiplier for the sound priority (see m_nFinalPriority below). Lesser value means higher priority
+ uint32 m_nFrequency; // Sound frequency, plain and simple
+ uint8 m_nVolume; // Sound volume (0..127), only used as an actual volume without EXTERNAL_3D_SOUND (see m_nEmittingVolume)
+ float m_fDistance; // Distance to camera (useless if m_bIs2D == TRUE)
+ uint32 m_nLoopCount; // 0 - always loop, 1 - don't loop, other values never seen
+#ifndef GTA_PS2
+ // Loop offsets
+ uint32 m_nLoopStart;
int32 m_nLoopEnd;
- uint8 m_nEmittingVolume;
- float m_fSpeedMultiplier;
- float m_fSoundIntensity;
- bool m_bReleasingSoundFlag;
- CVector m_vecPos;
- bool m_bReverbFlag;
- uint8 m_nLoopsRemaining;
- bool m_bRequireReflection; // Used for oneshots
- uint8 m_nOffset;
- int32 m_nReleasingVolumeDivider;
- bool m_bIsProcessed;
- bool m_bLoopEnded;
- int32 m_nCalculatedVolume;
- int8 m_nVolumeChange;
+#endif
+#ifdef EXTERNAL_3D_SOUND
+ uint8 m_nEmittingVolume; // The volume in 3D space, provided to 3D audio engine
+#endif
+ float m_fSpeedMultiplier; // Used for doppler effect. 0.0f - unaffected by doppler
+#if GTA_VERSION >= GTA3_PC_10
+ float m_MaxDistance; // The maximum distance at which sound could be heard. Minimum distance = MaxDistance / 5 or MaxDistance / 4 in case of emitting volume (useless if m_bIs2D == TRUE)
+#else
+ uint32 m_MaxDistance;
+#endif
+ bool8 m_bStatic; // If TRUE then sound parameters cannot be changed during playback (frequency, position, etc.)
+ CVector m_vecPos; // Position of sound in 3D space. Unused if m_bIs2D == TRUE
+ bool8 m_bReverb; // Toggles reverb effect
+#ifdef AUDIO_REFLECTIONS
+ uint8 m_nReflectionDelay; // Number of frames before reflection could be played. This is calculated internally by AudioManager and shouldn't be set by queued sample
+ bool8 m_bReflections; // Add sound reflections
+#endif
+ uint8 m_nPan; // Sound panning (0-127). Controls the volume of the playback coming from left and right speaker. Calculated internally unless m_bIs2D==TRUE.
+ // 0 = L 100% R 0%
+ // 63 = L 100% R 100%
+ // 127 = L 0% R 100%
+ uint32 m_nFramesToPlay; // Number of frames the sound would be played (if it stops being queued).
+ // This one is being set by queued sample for looping sounds, otherwise calculated inside AudioManager
+
+ // all fields below are internal to AudioManager calculations and aren't set by queued sample
+ bool8 m_bIsBeingPlayed; // Set to TRUE when the sound was added or changed on current frame to avoid it being overwritten
+ bool8 m_bIsPlayingFinished; // Not sure about the name. Set to TRUE when sampman channel becomes free
+#if GTA_VERSION < GTA3_PC_10
+ int32 unk; // Only on PS2, used by static non-looped sounds (AFAIK)
+ // Looks like it's keeping a number of frames left to play with the purpose of setting m_bIsPlayingFinished=TRUE once value reaches 0
+ // Default value is -3 for whatever reason
+#endif
+ uint32 m_nFinalPriority; // Actual value used to compare priority, calculated using volume and m_nPriority. Lesser value means higher priority
+ int8 m_nVolumeChange; // How much m_nVolume should reduce per each frame.
};
VALIDATE_SIZE(tSound, 92);
@@ -45,8 +72,8 @@ class tAudioEntity
public:
eAudioType m_nType;
void *m_pEntity;
- bool m_bIsUsed;
- uint8 m_bStatus;
+ bool8 m_bIsUsed;
+ bool8 m_bStatus;
int16 m_awAudioEvent[NUM_AUDIOENTITY_EVENTS];
float m_afVolume[NUM_AUDIOENTITY_EVENTS];
uint8 m_AudioEvents;
@@ -57,12 +84,15 @@ VALIDATE_SIZE(tAudioEntity, 40);
class tPedComment
{
public:
- int32 m_nSampleIndex;
+ uint32 m_nSampleIndex;
int32 m_nEntityIndex;
CVector m_vecPos;
float m_fDistance;
- uint8 m_bVolume;
+ uint8 m_nVolume;
int8 m_nProcess;
+#if defined(EXTERNAL_3D_SOUND) && defined(FIX_BUGS)
+ uint8 m_nEmittingVolume;
+#endif
};
VALIDATE_SIZE(tPedComment, 28);
@@ -93,22 +123,6 @@ public:
VALIDATE_SIZE(cPedComments, 1164);
-class CEntity;
-
-class cMissionAudio
-{
-public:
- CVector m_vecPos;
- bool m_bPredefinedProperties;
- int32 m_nSampleIndex;
- uint8 m_nLoadingStatus;
- uint8 m_nPlayStatus;
- bool m_bIsPlaying;
- int32 m_nMissionAudioCounter;
- bool m_bIsPlayed;
-};
-VALIDATE_SIZE(cMissionAudio, 32);
-
// name made up
class cAudioScriptObjectManager
{
@@ -122,6 +136,7 @@ public:
class cTransmission;
+class CEntity;
class CPlane;
class CVehicle;
class CPed;
@@ -129,7 +144,7 @@ class CPed;
class cPedParams
{
public:
- bool m_bDistanceCalculated;
+ bool8 m_bDistanceCalculated;
float m_fDistance;
CPed *m_pPed;
@@ -144,11 +159,11 @@ public:
class cVehicleParams
{
public:
- bool m_bDistanceCalculated;
+ bool8 m_bDistanceCalculated;
float m_fDistance;
CVehicle *m_pVehicle;
cTransmission *m_pTransmission;
- int32 m_nIndex;
+ uint32 m_nIndex;
float m_fVelocityChange;
cVehicleParams()
@@ -181,324 +196,375 @@ enum {
MAX_REFLECTIONS,
};
+enum PLAY_STATUS { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
+enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
+
class cAudioManager
{
public:
- bool m_bIsInitialised;
- bool m_bReverb; // unused
- bool m_bFifthFrameFlag;
+ bool8 m_bIsInitialised;
+ bool8 m_bIsSurround; // unused until VC
+ bool8 m_bReduceReleasingPriority;
uint8 m_nActiveSamples;
- uint8 field_4; // unused
- bool m_bDynamicAcousticModelingStatus;
+ bool8 m_bDoubleVolume; // unused
+#if GTA_VERSION >= GTA3_PC_10
+ bool8 m_bDynamicAcousticModelingStatus;
+#endif
float m_fSpeedOfSound;
- bool m_bTimerJustReset;
+ bool8 m_bTimerJustReset;
int32 m_nTimer;
tSound m_sQueueSample;
uint8 m_nActiveSampleQueue;
- tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
- uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
+ tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_CHANNELS_GENERIC];
+ uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_CHANNELS_GENERIC];
uint8 m_SampleRequestQueuesStatus[NUM_SOUNDS_SAMPLES_BANKS];
- tSound m_asActiveSamples[NUM_SOUNDS_SAMPLES_SLOTS];
+ tSound m_asActiveSamples[NUM_CHANNELS_GENERIC];
tAudioEntity m_asAudioEntities[NUM_AUDIOENTITIES];
int32 m_anAudioEntityIndices[NUM_AUDIOENTITIES];
int32 m_nAudioEntitiesTotal;
- CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
- float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
+#ifdef AUDIO_REFLECTIONS
+ CVector m_avecReflectionsPos[MAX_REFLECTIONS];
+ float m_afReflectionsDistances[MAX_REFLECTIONS];
+#endif
cAudioScriptObjectManager m_sAudioScriptObjectManager;
cPedComments m_sPedComments;
int32 m_nFireAudioEntity;
int32 m_nWaterCannonEntity;
int32 m_nPoliceChannelEntity;
cPoliceRadioQueue m_sPoliceRadioQueue;
+ cAMCrime m_aCrimes[10];
int32 m_nFrontEndEntity;
int32 m_nCollisionEntity;
cAudioCollisionManager m_sCollisionManager;
int32 m_nProjectileEntity;
int32 m_nBridgeEntity;
- cMissionAudio m_sMissionAudio;
+
+ // Mission audio stuff
+ CVector m_vecMissionAudioPosition;
+ bool8 m_bIsMissionAudio2D;
+ uint32 m_nMissionAudioSampleIndex;
+ uint8 m_nMissionAudioLoadingStatus;
+ uint8 m_nMissionAudioPlayStatus;
+ bool8 m_bIsMissionAudioPlaying;
+ int32 m_nMissionAudioFramesToPlay;
+ bool8 m_bIsMissionAudioAllowedToPlay;
+
int32 m_anRandomTable[5];
uint8 m_nTimeSpent;
- uint8 m_nUserPause;
- uint8 m_nPreviousUserPause;
+ bool8 m_nUserPause;
+ bool8 m_nPreviousUserPause;
uint32 m_FrameCounter;
cAudioManager();
~cAudioManager();
- // getters
- uint32 GetFrameCounter() const { return m_FrameCounter; }
- float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
- int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
- int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
- bool ShouldDuckMissionAudio() const { return m_sMissionAudio.m_nPlayStatus == 1; }
-
- // "Should" be in alphabetic order, except "getXTalkSfx"
- void AddDetailsToRequestedOrderList(uint8 sample);
- void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank,
- uint8 counter, bool notLooping);
- void AddReflectionsToRequestedQueue();
- void AddReleasingSounds();
- void AddSampleToRequestedQueue();
- void AgeCrimes();
-
- void CalculateDistance(bool &condition, float dist);
- bool CheckForAnAudioFileOnCD() const;
- void ClearActiveSamples();
- void ClearMissionAudio();
- void ClearRequestedQueue();
- int32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2,
- float speedMultiplier) const;
- int32 ComputePan(float, CVector *);
- uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const;
- int32 CreateEntity(eAudioType type, void *entity);
-
- void DestroyAllGameCreatedEntities();
- void DestroyEntity(int32 id);
- void DoPoliceRadioCrackle();
-
- // functions returning talk sfx,
- // order from GetPedCommentSfx
- uint32 GetPlayerTalkSfx(int16 sound);
- uint32 GetCopTalkSfx(int16 sound);
- uint32 GetSwatTalkSfx(int16 sound);
- uint32 GetFBITalkSfx(int16 sound);
- uint32 GetArmyTalkSfx(int16 sound);
- uint32 GetMedicTalkSfx(int16 sound);
- uint32 GetFiremanTalkSfx(int16 sound);
- uint32 GetNormalMaleTalkSfx(int16 sound);
- uint32 GetTaxiDriverTalkSfx(int16 sound);
- uint32 GetPimpTalkSfx(int16 sound);
- uint32 GetMafiaTalkSfx(int16 sound);
- uint32 GetTriadTalkSfx(int16 sound);
- uint32 GetDiabloTalkSfx(int16 sound);
- uint32 GetYakuzaTalkSfx(int16 sound);
- uint32 GetYardieTalkSfx(int16 sound);
- uint32 GetColumbianTalkSfx(int16 sound);
- uint32 GetHoodTalkSfx(int16 sound);
- uint32 GetBlackCriminalTalkSfx(int16 sound);
- uint32 GetWhiteCriminalTalkSfx(int16 sound);
- uint32 GetMaleNo2TalkSfx(int16 sound);
- uint32 GetBlackProjectMaleTalkSfx(int16 sound, int32 model);
- uint32 GetWhiteFatMaleTalkSfx(int16 sound);
- uint32 GetBlackFatMaleTalkSfx(int16 sound);
- uint32 GetBlackCasualFemaleTalkSfx(int16 sound);
- uint32 GetWhiteCasualFemaleTalkSfx(int16 sound);
- uint32 GetFemaleNo3TalkSfx(int16 sound);
- uint32 GetBlackFatFemaleTalkSfx(int16 sound);
- uint32 GetWhiteFatFemaleTalkSfx(int16 sound);
- uint32 GetBlackFemaleProstituteTalkSfx(int16 sound);
- uint32 GetWhiteFemaleProstituteTalkSfx(int16 sound);
- uint32 GetBlackProjectFemaleOldTalkSfx(int16 sound);
- uint32 GetBlackProjectFemaleYoungTalkSfx(int16 sound);
- uint32 GetChinatownMaleOldTalkSfx(int16 sound);
- uint32 GetChinatownMaleYoungTalkSfx(int16 sound);
- uint32 GetChinatownFemaleOldTalkSfx(int16 sound);
- uint32 GetChinatownFemaleYoungTalkSfx(int16 sound);
- uint32 GetLittleItalyMaleTalkSfx(int16 sound);
- uint32 GetLittleItalyFemaleOldTalkSfx(int16 sound);
- uint32 GetLittleItalyFemaleYoungTalkSfx(int16 sound);
- uint32 GetWhiteDockerMaleTalkSfx(int16 sound);
- uint32 GetBlackDockerMaleTalkSfx(int16 sound);
- uint32 GetScumMaleTalkSfx(int16 sound);
- uint32 GetScumFemaleTalkSfx(int16 sound);
- uint32 GetWhiteWorkerMaleTalkSfx(int16 sound);
- uint32 GetBlackWorkerMaleTalkSfx(int16 sound);
- uint32 GetBusinessMaleYoungTalkSfx(int16 sound, int32 model);
- uint32 GetBusinessMaleOldTalkSfx(int16 sound);
- uint32 GetWhiteBusinessFemaleTalkSfx(int16 sound, int32 model);
- uint32 GetBlackBusinessFemaleTalkSfx(int16 sound);
- uint32 GetSupermodelMaleTalkSfx(int16 sound);
- uint32 GetSupermodelFemaleTalkSfx(int16 sound);
- uint32 GetStewardMaleTalkSfx(int16 sound);
- uint32 GetStewardFemaleTalkSfx(int16 sound);
- uint32 GetFanMaleTalkSfx(int16 sound, int32 model);
- uint32 GetFanFemaleTalkSfx(int16 sound);
- uint32 GetHospitalMaleTalkSfx(int16 sound);
- uint32 GetHospitalFemaleTalkSfx(int16 sound);
- uint32 GetWhiteConstructionWorkerTalkSfx(int16 sound);
- uint32 GetBlackConstructionWorkerTalkSfx(int16 sound);
- uint32 GetShopperFemaleTalkSfx(int16 sound, int32 model);
- uint32 GetStudentMaleTalkSfx(int16 sound);
- uint32 GetStudentFemaleTalkSfx(int16 sound);
- uint32 GetCasualMaleOldTalkSfx(int16 sound);
-
- uint32 GetSpecialCharacterTalkSfx(int32 modelIndex, int32 sound);
- uint32 GetEightTalkSfx(int16 sound);
- uint32 GetFrankieTalkSfx(int16 sound);
- uint32 GetMistyTalkSfx(int16 sound);
- uint32 GetOJGTalkSfx(int16 sound);
- uint32 GetCatatalinaTalkSfx(int16 sound);
- uint32 GetBomberTalkSfx(int16 sound);
- uint32 GetSecurityGuardTalkSfx(int16 sound);
- uint32 GetChunkyTalkSfx(int16 sound);
-
- uint32 GetGenericMaleTalkSfx(int16 sound);
- uint32 GetGenericFemaleTalkSfx(int16 sound);
- // end of functions returning talk sfx
-
- void GenerateIntegerRandomNumberTable();
- char *Get3DProviderName(uint8 id) const;
- uint8 GetCDAudioDriveLetter() const;
- int8 GetCurrent3DProviderIndex() const;
- float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
- float GetCollisionOneShotRatio(int32 a, float b) const;
- float GetCollisionRatio(float a, float b, float c, float d) const;
- float GetDistanceSquared(const CVector &v) const;
- int32 GetJumboTaxiFreq() const;
- uint8 GetMissionAudioLoadingStatus() const;
- int8 GetMissionScriptPoliceAudioPlayingStatus() const;
- uint8 GetNum3DProvidersAvailable() const;
- int32 GetPedCommentSfx(CPed *ped, int32 sound);
- void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const;
- float GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
- cTransmission *transmission, float velocityChange);
- float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
- cTransmission *transmission, float velocityChange);
-
- bool HasAirBrakes(int32 model) const;
-
void Initialise();
- void InitialisePoliceRadio();
- void InitialisePoliceRadioZones();
- void InterrogateAudioEntities();
- bool IsAudioInitialised() const;
- bool IsMissionAudioSampleFinished();
- bool IsMP3RadioChannelAvailable() const;
-
- bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const;
-
- void PlayLoadedMissionAudio();
- void PlayOneShot(int32 index, uint16 sound, float vol);
- void PlaySuspectLastSeen(float x, float y, float z);
- void PlayerJustGotInCar() const;
- void PlayerJustLeftCar() const;
- void PostInitialiseGameSpecificSetup();
- void PostTerminateGameSpecificShutdown();
- void PreInitialiseGameSpecificSetup() const;
- void PreloadMissionAudio(Const char *name);
- void PreTerminateGameSpecificShutdown();
- /// processX - main logic of adding new sounds
- void ProcessActiveQueues();
- bool ProcessAirBrakes(cVehicleParams& params);
- void ProcessAirportScriptObject(uint8 sound);
- bool ProcessBoatEngine(cVehicleParams& params);
- bool ProcessBoatMovingOverWater(cVehicleParams& params);
- void ProcessBridge();
- void ProcessBridgeMotor();
- void ProcessBridgeOneShots();
- void ProcessBridgeWarning();
- bool ProcessCarBombTick(cVehicleParams& params);
- void ProcessCesna(cVehicleParams& params);
- void ProcessCinemaScriptObject(uint8 sound);
- void ProcessCrane();
- void ProcessDocksScriptObject(uint8 sound);
- bool ProcessEngineDamage(cVehicleParams& params);
- void ProcessEntity(int32 sound);
- void ProcessExplosions(int32 explosion);
- void ProcessFireHydrant();
- void ProcessFires(int32 entity);
- void ProcessFrontEnd();
- void ProcessGarages();
- bool ProcessHelicopter(cVehicleParams& params);
- void ProcessHomeScriptObject(uint8 sound);
- void ProcessJumbo(cVehicleParams& params);
- void ProcessJumboAccel(CPlane *plane);
- void ProcessJumboDecel(CPlane *plane);
- void ProcessJumboFlying();
- void ProcessJumboLanding(CPlane *plane);
- void ProcessJumboTakeOff(CPlane *plane);
- void ProcessJumboTaxi();
- void ProcessLaunderetteScriptObject(uint8 sound);
- void ProcessLoopingScriptObject(uint8 sound);
- void ProcessMissionAudio();
- void ProcessModelCarEngine(cVehicleParams& params);
- void ProcessOneShotScriptObject(uint8 sound);
- void ProcessPed(CPhysical *ped);
- void ProcessPedHeadphones(cPedParams ¶ms);
- void ProcessPedOneShots(cPedParams ¶ms);
- void ProcessPhysical(int32 id);
- void ProcessPlane(cVehicleParams& params);
- void ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *automobile);
- void ProcessPoliceCellBeatingScriptObject(uint8 sound);
- void ProcessPornCinema(uint8 sound);
- void ProcessProjectiles();
- void ProcessRainOnVehicle(cVehicleParams& params);
- void ProcessReverb() const;
- bool ProcessReverseGear(cVehicleParams& params);
- void ProcessSawMillScriptObject(uint8 sound);
- void ProcessScriptObject(int32 id);
- void ProcessShopScriptObject(uint8 sound);
- void ProcessSpecial();
- bool ProcessTrainNoise(cVehicleParams& params);
- void ProcessVehicle(CVehicle *vehicle);
- bool ProcessVehicleDoors(cVehicleParams& params);
- void ProcessVehicleEngine(cVehicleParams& params);
- void ProcessVehicleHorn(cVehicleParams& params);
- void ProcessVehicleOneShots(cVehicleParams& params);
- bool ProcessVehicleReverseWarning(cVehicleParams& params);
- bool ProcessVehicleRoadNoise(cVehicleParams& params);
- bool ProcessVehicleSirenOrAlarm(cVehicleParams& params);
- bool ProcessVehicleSkidding(cVehicleParams& params);
- void ProcessWaterCannon(int32);
- void ProcessWeather(int32 id);
- bool ProcessWetRoadNoise(cVehicleParams& params);
- void ProcessWorkShopScriptObject(uint8 sound);
-
- int32 RandomDisplacement(uint32 seed) const;
- void ReacquireDigitalHandle() const;
- void ReleaseDigitalHandle() const;
- void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2,
- float collisionPower, float intensity2);
- void ReportCrime(eCrimeType crime, const CVector &pos);
- void ResetAudioLogicTimers(uint32 timer);
- void ResetPoliceRadio();
- void ResetTimers(uint32 time);
-
- void Service();
- void ServiceCollisions();
- void ServicePoliceRadio();
- void ServicePoliceRadioChannel(uint8 wantedLevel);
- void ServiceSoundEffects();
- int8 SetCurrent3DProvider(uint8 which);
- void SetDynamicAcousticModelingStatus(uint8 status);
- void SetEffectsFadeVol(uint8 volume) const;
- void SetEffectsMasterVolume(uint8 volume) const;
- void SetEntityStatus(int32 id, uint8 status);
- uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision);
- void SetMissionAudioLocation(float x, float y, float z);
- void SetMissionScriptPoliceAudio(int32 sfx) const;
- void SetMonoMode(uint8 mono);
- void SetMusicFadeVol(uint8 volume) const;
- void SetMusicMasterVolume(uint8 volume) const;
- void SetSpeakerConfig(int32 conf) const;
- void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
- void SetUpOneShotCollisionSound(const cAudioCollision &col);
- bool SetupCrimeReport();
- bool SetupJumboEngineSound(uint8 vol, uint32 freq);
- bool SetupJumboFlySound(uint8 emittingVol);
- bool SetupJumboRumbleSound(uint8 emittingVol);
- bool SetupJumboTaxiSound(uint8 vol);
- bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
- void SetupPedComments(cPedParams ¶ms, uint16 sound);
- void SetupSuspectLastSeenReport();
-
void Terminate();
- void TranslateEntity(Const CVector *v1, CVector *v2) const;
-
- void UpdateGasPedalAudio(CAutomobile *automobile);
- void UpdateReflections();
- bool UsesReverseWarning(int32 model) const;
- bool UsesSiren(int32 model) const;
- bool UsesSirenSwitching(int32 model) const;
+ void Service();
+ int32 CreateEntity(eAudioType type, void *entity);
+ void DestroyEntity(int32 id);
+ bool8 GetEntityStatus(int32 id);
+ void SetEntityStatus(int32 id, bool8 status);
+ void *GetEntityPointer(int32 id);
+ void PlayOneShot(int32 index, uint16 sound, float vol);
+ void SetEffectsMasterVolume(uint8 volume);
+ void SetMusicMasterVolume(uint8 volume);
+ void SetEffectsFadeVol(uint8 volume);
+ void SetMusicFadeVol(uint8 volume);
+ void SetMonoMode(bool8 mono);
+ void ResetTimers(uint32 time);
+ void DestroyAllGameCreatedEntities();
#ifdef GTA_PC
- // only used in pc
- void AdjustSamplesVolume();
- uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist);
+ uint8 GetNum3DProvidersAvailable();
+ char *Get3DProviderName(uint8 id);
+ int8 GetCurrent3DProviderIndex();
+ int8 SetCurrent3DProvider(uint8 which);
+ void SetSpeakerConfig(int32 conf);
+ bool8 IsMP3RadioChannelAvailable();
+ void ReleaseDigitalHandle();
+ void ReacquireDigitalHandle();
+#ifdef AUDIO_REFLECTIONS
+ void SetDynamicAcousticModelingStatus(bool8 status);
#endif
+ bool8 CheckForAnAudioFileOnCD();
+ char GetCDAudioDriveLetter();
+ bool8 IsAudioInitialised();
+#endif
+
+ void ServiceSoundEffects();
+ uint32 FL(float f); // not used
+ uint8 ComputeVolume(uint8 emittingVolume, float maxDistance, float distance);
+ void TranslateEntity(Const CVector *v1, CVector *v2);
+ int32 ComputePan(float, CVector *);
+ uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier); // inlined on PS2
+ int32 RandomDisplacement(uint32 seed);
+ void InterrogateAudioEntities(); // inlined on PS2
+ void AddSampleToRequestedQueue();
+ void AddDetailsToRequestedOrderList(uint8 sample); // inlined on PS2
+#ifdef AUDIO_REFLECTIONS
+ void AddReflectionsToRequestedQueue();
+ void UpdateReflections();
+#endif
+ void AddReleasingSounds();
+ void ProcessActiveQueues();
+ void ClearRequestedQueue(); // inlined on PS2
+ void ClearActiveSamples();
+ void GenerateIntegerRandomNumberTable(); // inlined on PS2
+ void LoadBankIfNecessary(uint8 bank); // this is used only on PS2 but technically not a platform code
+
+#ifdef EXTERNAL_3D_SOUND // actually must have been && AUDIO_MSS as well
+ void AdjustSamplesVolume();
+ uint8 ComputeEmittingVolume(uint8 emittingVolume, float maxDistance, float distance);
+#endif
+
+ // audio logic
+ void PreInitialiseGameSpecificSetup();
+ void PostInitialiseGameSpecificSetup();
+ void PreTerminateGameSpecificShutdown();
+ void PostTerminateGameSpecificShutdown();
+ void ResetAudioLogicTimers(uint32 timer);
+ void ProcessReverb();
+ float GetDistanceSquared(const CVector &v);
+ void CalculateDistance(bool8 &condition, float dist);
+ void ProcessSpecial();
+ void ProcessEntity(int32 sound);
+ void ProcessPhysical(int32 id);
+
+ // vehicles
+ void ProcessVehicle(CVehicle *vehicle);
+ void ProcessRainOnVehicle(cVehicleParams ¶ms);
+ bool8 ProcessReverseGear(cVehicleParams ¶ms);
+ void ProcessModelCarEngine(cVehicleParams ¶ms);
+ bool8 ProcessVehicleRoadNoise(cVehicleParams ¶ms);
+ bool8 ProcessWetRoadNoise(cVehicleParams ¶ms);
+ bool8 ProcessVehicleEngine(cVehicleParams ¶ms);
+ void UpdateGasPedalAudio(CAutomobile *automobile); // inlined on PS2
+ void PlayerJustGotInCar();
+ void PlayerJustLeftCar();
+ void AddPlayerCarSample(uint8 emittingVolume, uint32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping);
+ void ProcessCesna(cVehicleParams ¶ms);
+ void ProcessPlayersVehicleEngine(cVehicleParams ¶ms, CAutomobile *automobile);
+ bool8 ProcessVehicleSkidding(cVehicleParams ¶ms);
+ float GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange);
+ float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile, cTransmission *transmission, float velocityChange); // inlined on PS2
+ void ProcessVehicleHorn(cVehicleParams ¶ms);
+ bool8 UsesSiren(uint32 model); // inlined on PS2
+ bool8 UsesSirenSwitching(uint32 model); // inlined on PS2
+ bool8 ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms);
+ bool8 UsesReverseWarning(uint32 model); // inlined on PS2
+ bool8 ProcessVehicleReverseWarning(cVehicleParams ¶ms);
+ bool8 ProcessVehicleDoors(cVehicleParams ¶ms);
+ bool8 ProcessAirBrakes(cVehicleParams ¶ms);
+ bool8 HasAirBrakes(uint32 model); // inlined on PS2
+ bool8 ProcessEngineDamage(cVehicleParams ¶ms);
+ bool8 ProcessCarBombTick(cVehicleParams ¶ms);
+ void ProcessVehicleOneShots(cVehicleParams ¶ms);
+ bool8 ProcessTrainNoise(cVehicleParams ¶ms);
+ bool8 ProcessBoatEngine(cVehicleParams ¶ms);
+ bool8 ProcessBoatMovingOverWater(cVehicleParams ¶ms);
+ bool8 ProcessHelicopter(cVehicleParams ¶ms);
+ void ProcessPlane(cVehicleParams ¶ms); // inlined on PS2
+ void ProcessJumbo(cVehicleParams ¶ms);
+ void ProcessJumboTaxi(); // inlined on PS2
+ void ProcessJumboAccel(CPlane *plane);
+ void ProcessJumboTakeOff(CPlane *plane); // inlined on PS2
+ void ProcessJumboFlying(); // inlined on PS2
+ void ProcessJumboLanding(CPlane *plane); // inlined on PS2
+ void ProcessJumboDecel(CPlane *plane); // inlined on PS2
+ bool8 SetupJumboTaxiSound(uint8 vol);
+ bool8 SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
+ bool8 SetupJumboEngineSound(uint8 vol, uint32 freq);
+ bool8 SetupJumboFlySound(uint8 emittingVol);
+ bool8 SetupJumboRumbleSound(uint8 emittingVol);
+ int32 GetJumboTaxiFreq(); // inlined on PS2
+
+ // peds
+ void ProcessPed(CPhysical *ped); // inlined on PS2
+ void ProcessPedHeadphones(cPedParams ¶ms);
+ void ProcessPedOneShots(cPedParams ¶ms);
+
+ // ped comments
+ void SetupPedComments(cPedParams ¶ms, uint16 sound);
+ int32 GetPedCommentSfx(CPed *ped, uint16 sound);
+ void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset); // inlined on PS2
+ uint32 GetPlayerTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetCopTalkSfx(uint16 sound);
+ uint32 GetSwatTalkSfx(uint16 sound);
+ uint32 GetFBITalkSfx(uint16 sound);
+ uint32 GetArmyTalkSfx(uint16 sound);
+ uint32 GetMedicTalkSfx(uint16 sound);
+ uint32 GetFiremanTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetBusinessMaleOldTalkSfx(uint16 sound);
+ uint32 GetBusinessMaleYoungTalkSfx(uint16 sound, uint32 model);
+ uint32 GetMafiaTalkSfx(uint16 sound);
+ uint32 GetTriadTalkSfx(uint16 sound);
+ uint32 GetDiabloTalkSfx(uint16 sound);
+ uint32 GetYakuzaTalkSfx(uint16 sound);
+ uint32 GetYardieTalkSfx(uint16 sound);
+ uint32 GetColumbianTalkSfx(uint16 sound);
+ uint32 GetHoodTalkSfx(uint16 sound);
+ uint32 GetBlackCriminalTalkSfx(uint16 sound);
+ uint32 GetWhiteCriminalTalkSfx(uint16 sound);
+ uint32 GetCasualMaleOldTalkSfx(uint16 sound);
+ uint32 GetCasualMaleYoungTalkSfx(uint16 sound);
+ uint32 GetBlackCasualFemaleTalkSfx(uint16 sound);
+ uint32 GetWhiteCasualFemaleTalkSfx(uint16 sound);
+ uint32 GetFemaleNo3TalkSfx(uint16 sound);
+ uint32 GetWhiteBusinessFemaleTalkSfx(uint16 sound, uint32 model);
+ uint32 GetBlackFatFemaleTalkSfx(uint16 sound);
+ uint32 GetWhiteFatMaleTalkSfx(uint16 sound);
+ uint32 GetBlackFatMaleTalkSfx(uint16 sound);
+ uint32 GetWhiteFatFemaleTalkSfx(uint16 sound);
+ uint32 GetBlackFemaleProstituteTalkSfx(uint16 sound);
+ uint32 GetWhiteFemaleProstituteTalkSfx(uint16 sound);
+ uint32 GetBlackProjectMaleTalkSfx(uint16 sound, uint32 model);
+ uint32 GetBlackProjectFemaleOldTalkSfx(uint16 sound);
+ uint32 GetBlackProjectFemaleYoungTalkSfx(uint16 sound);
+ uint32 GetChinatownMaleOldTalkSfx(uint16 sound);
+ uint32 GetChinatownMaleYoungTalkSfx(uint16 sound);
+ uint32 GetChinatownFemaleOldTalkSfx(uint16 sound);
+ uint32 GetChinatownFemaleYoungTalkSfx(uint16 sound);
+ uint32 GetLittleItalyMaleTalkSfx(uint16 sound);
+ uint32 GetLittleItalyFemaleOldTalkSfx(uint16 sound);
+ uint32 GetLittleItalyFemaleYoungTalkSfx(uint16 sound);
+ uint32 GetWhiteDockerMaleTalkSfx(uint16 sound);
+ uint32 GetBlackDockerMaleTalkSfx(uint16 sound);
+ uint32 GetScumMaleTalkSfx(uint16 sound);
+ uint32 GetScumFemaleTalkSfx(uint16 sound);
+ uint32 GetWhiteWorkerMaleTalkSfx(uint16 sound);
+ uint32 GetBlackWorkerMaleTalkSfx(uint16 sound);
+ uint32 GetBlackBusinessFemaleTalkSfx(uint16 sound);
+ uint32 GetSupermodelMaleTalkSfx(uint16 sound);
+ uint32 GetSupermodelFemaleTalkSfx(uint16 sound);
+ uint32 GetStewardMaleTalkSfx(uint16 sound);
+ uint32 GetStewardFemaleTalkSfx(uint16 sound);
+ uint32 GetFanMaleTalkSfx(uint16 sound, uint32 model);
+ uint32 GetFanFemaleTalkSfx(uint16 sound);
+ uint32 GetHospitalMaleTalkSfx(uint16 sound);
+ uint32 GetHospitalFemaleTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetWhiteConstructionWorkerTalkSfx(uint16 sound);
+ uint32 GetBlackConstructionWorkerTalkSfx(uint16 sound);
+ uint32 GetShopperFemaleTalkSfx(uint16 sound, uint32 model);
+ uint32 GetStudentMaleTalkSfx(uint16 sound);
+ uint32 GetStudentFemaleTalkSfx(uint16 sound);
+
+ uint32 GetSpecialCharacterTalkSfx(uint32 modelIndex, uint16 sound);
+ uint32 GetEightBallTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetSalvatoreTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetMistyTalkSfx(uint16 sound);
+ uint32 GetOldJapTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetCatalinaTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetBomberTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetSecurityGuardTalkSfx(uint16 sound);
+ uint32 GetChunkyTalkSfx(uint16 sound); // inlined on PS2
+
+ uint32 GetAsianTaxiDriverTalkSfx(uint16 sound); // inlined on PS2
+ uint32 GetPimpTalkSfx(uint16 sound);
+ uint32 GetNormalMaleTalkSfx(uint16 sound);
+ uint32 GetGenericMaleTalkSfx(uint16 sound);
+ uint32 GetGenericFemaleTalkSfx(uint16 sound);
+
+ // particles
+ void ProcessExplosions(int32 explosion);
+ void ProcessFires(int32 entity);
+ void ProcessWaterCannon(int32);
+
+ // script objects
+ void ProcessScriptObject(int32 id); // inlined on PS2
+ void ProcessOneShotScriptObject(uint8 sound);
+ void ProcessLoopingScriptObject(uint8 sound);
+ void ProcessPornCinema(uint8 sound);
+ void ProcessWorkShopScriptObject(uint8 sound);
+ void ProcessSawMillScriptObject(uint8 sound);
+ void ProcessLaunderetteScriptObject(uint8 sound);
+ void ProcessShopScriptObject(uint8 sound);
+ void ProcessAirportScriptObject(uint8 sound);
+ void ProcessCinemaScriptObject(uint8 sound);
+ void ProcessDocksScriptObject(uint8 sound);
+ void ProcessHomeScriptObject(uint8 sound);
+ void ProcessPoliceCellBeatingScriptObject(uint8 sound);
+
+ // misc
+ void ProcessWeather(int32 id);
+ void ProcessFrontEnd();
+ void ProcessCrane();
+ void ProcessProjectiles();
+ void ProcessGarages();
+ void ProcessFireHydrant();
+
+ // bridge
+ void ProcessBridge(); // inlined on PS2
+ void ProcessBridgeWarning();
+ void ProcessBridgeMotor();
+ void ProcessBridgeOneShots();
+
+ // mission audio
+ bool8 MissionScriptAudioUsesPoliceChannel(uint32 soundMission);
+ void PreloadMissionAudio(Const char *name);
+ uint8 GetMissionAudioLoadingStatus();
+ void SetMissionAudioLocation(float x, float y, float z);
+ void PlayLoadedMissionAudio();
+ bool8 IsMissionAudioSampleFinished();
+ bool8 IsMissionAudioSamplePlaying() { return m_nMissionAudioPlayStatus == PLAY_STATUS_PLAYING; }
+ bool8 ShouldDuckMissionAudio() { return IsMissionAudioSamplePlaying(); }
+ void ClearMissionAudio();
+ void ProcessMissionAudio();
+
+ // police radio
+ void InitialisePoliceRadioZones();
+ void InitialisePoliceRadio();
+ void ResetPoliceRadio();
+ void SetMissionScriptPoliceAudio(uint32 sfx);
+ int8 GetMissionScriptPoliceAudioPlayingStatus();
+ void DoPoliceRadioCrackle();
+ void ServicePoliceRadio();
+ void ServicePoliceRadioChannel(uint8 wantedLevel);
+ bool8 SetupCrimeReport();
+ void SetupSuspectLastSeenReport();
+ void ReportCrime(eCrimeType crime, const CVector &pos);
+ void PlaySuspectLastSeen(float x, float y, float z);
+ void AgeCrimes(); // inlined on PS2
+
+ // collision stuff
+ void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2);
+ void ServiceCollisions();
+ void SetUpOneShotCollisionSound(const cAudioCollision &col);
+ void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
+ uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision);
+ float GetCollisionOneShotRatio(uint32 a, float b);
+ float GetCollisionLoopingRatio(uint32 a, uint32 b, float c); // not used
+ float GetCollisionRatio(float a, float b, float c, float d); // inlined on PS2
};
-#ifdef AUDIO_MSS
+/*
+ Manual loop points are not on PS2 so let's have these macros to avoid massive ifndefs.
+ Setting these manually was pointless anyway since they never change from sdt values.
+ What were they thinking?
+*/
+#ifndef GTA_PS2
+#define RESET_LOOP_OFFSETS \
+ m_sQueueSample.m_nLoopStart = 0; \
+ m_sQueueSample.m_nLoopEnd = -1;
+#define SET_LOOP_OFFSETS(sample) \
+ m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(sample); \
+ m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(sample);
+#else
+#define RESET_LOOP_OFFSETS
+#define SET_LOOP_OFFSETS(sample)
+#endif
+#ifdef EXTERNAL_3D_SOUND
+#define SET_EMITTING_VOLUME(vol) m_sQueueSample.m_nEmittingVolume = vol
+#else
+#define SET_EMITTING_VOLUME(vol)
+#endif
+#ifdef AUDIO_REFLECTIONS
+#define SET_SOUND_REFLECTION(b) m_sQueueSample.m_bReflections = b
+#else
+#define SET_SOUND_REFLECTION(b)
+#endif
+
+#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS)
static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
#endif
diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp
index ac30f757..03efdea9 100644
--- a/src/audio/AudioScriptObject.cpp
+++ b/src/audio/AudioScriptObject.cpp
@@ -3,6 +3,7 @@
#include "AudioScriptObject.h"
#include "Pools.h"
#include "DMAudio.h"
+#include "SaveBuf.h"
cAudioScriptObject::cAudioScriptObject()
{
@@ -23,25 +24,25 @@ cAudioScriptObject::Reset()
}
void *
-cAudioScriptObject::operator new(size_t sz)
+cAudioScriptObject::operator new(size_t sz) throw()
{
return CPools::GetAudioScriptObjectPool()->New();
}
void *
-cAudioScriptObject::operator new(size_t sz, int handle)
+cAudioScriptObject::operator new(size_t sz, int handle) throw()
{
return CPools::GetAudioScriptObjectPool()->New(handle);
}
void
-cAudioScriptObject::operator delete(void *p, size_t sz)
+cAudioScriptObject::operator delete(void *p, size_t sz) throw()
{
CPools::GetAudioScriptObjectPool()->Delete((cAudioScriptObject *)p);
}
void
-cAudioScriptObject::operator delete(void *p, int handle)
+cAudioScriptObject::operator delete(void *p, int handle) throw()
{
CPools::GetAudioScriptObjectPool()->Delete((cAudioScriptObject *)p);
}
@@ -53,12 +54,14 @@ cAudioScriptObject::LoadAllAudioScriptObjects(uint8 *buf, uint32 size)
CheckSaveHeader(buf, 'A', 'U', 'D', '\0', size - SAVE_HEADER_SIZE);
- int32 pool_size = ReadSaveBuf(buf);
+ int32 pool_size;
+ ReadSaveBuf(&pool_size, buf);
for (int32 i = 0; i < pool_size; i++) {
- int handle = ReadSaveBuf(buf);
+ int32 handle;
+ ReadSaveBuf(&handle, buf);
cAudioScriptObject *p = new(handle) cAudioScriptObject;
assert(p != nil);
- *p = ReadSaveBuf(buf);
+ ReadSaveBuf(p, buf);
p->AudioEntity = DMAudio.CreateLoopingScriptObject(p);
}
diff --git a/src/audio/AudioScriptObject.h b/src/audio/AudioScriptObject.h
index 8110b2bb..b9a7e61b 100644
--- a/src/audio/AudioScriptObject.h
+++ b/src/audio/AudioScriptObject.h
@@ -12,10 +12,10 @@ public:
void Reset(); /// ok
- static void* operator new(size_t);
- static void* operator new(size_t, int);
- static void operator delete(void*, size_t);
- static void operator delete(void*, int);
+ static void* operator new(size_t) throw();
+ static void* operator new(size_t, int) throw();
+ static void operator delete(void*, size_t) throw();
+ static void operator delete(void*, int) throw();
static void LoadAllAudioScriptObjects(uint8 *buf, uint32 size);
static void SaveAllAudioScriptObjects(uint8 *buf, uint32 *size);
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 1027a084..d88bfddd 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -38,8 +38,14 @@ cDMAudio::DestroyEntity(int32 audioEntity)
AudioManager.DestroyEntity(audioEntity);
}
+bool8
+cDMAudio::GetEntityStatus(int32 audioEntity)
+{
+ return AudioManager.GetEntityStatus(audioEntity);
+}
+
void
-cDMAudio::SetEntityStatus(int32 audioEntity, uint8 status)
+cDMAudio::SetEntityStatus(int32 audioEntity, bool8 status)
{
AudioManager.SetEntityStatus(audioEntity, status);
}
@@ -57,7 +63,7 @@ cDMAudio::DestroyAllGameCreatedEntities(void)
}
void
-cDMAudio::SetMonoMode(uint8 mono)
+cDMAudio::SetMonoMode(bool8 mono)
{
AudioManager.SetMonoMode(mono);
}
@@ -128,7 +134,7 @@ cDMAudio::SetSpeakerConfig(int32 config)
AudioManager.SetSpeakerConfig(config);
}
-bool
+bool8
cDMAudio::IsMP3RadioChannelAvailable(void)
{
return AudioManager.IsMP3RadioChannelAvailable();
@@ -147,12 +153,14 @@ cDMAudio::ReacquireDigitalHandle(void)
}
void
-cDMAudio::SetDynamicAcousticModelingStatus(uint8 status)
+cDMAudio::SetDynamicAcousticModelingStatus(bool8 status)
{
+#ifdef AUDIO_REFLECTIONS
AudioManager.SetDynamicAcousticModelingStatus(status);
+#endif
}
-bool
+bool8
cDMAudio::CheckForAnAudioFileOnCD(void)
{
return AudioManager.CheckForAnAudioFileOnCD();
@@ -164,12 +172,18 @@ cDMAudio::GetCDAudioDriveLetter(void)
return AudioManager.GetCDAudioDriveLetter();
}
-bool
+bool8
cDMAudio::IsAudioInitialised(void)
{
return AudioManager.IsAudioInitialised();
}
+void
+cDMAudio::ResetPoliceRadio()
+{
+ AudioManager.ResetPoliceRadio();
+}
+
void
cDMAudio::ReportCrime(eCrimeType crime, const CVector &pos)
{
@@ -182,7 +196,7 @@ cDMAudio::CreateLoopingScriptObject(cAudioScriptObject *scriptObject)
int32 audioEntity = AudioManager.CreateEntity(AUDIOTYPE_SCRIPTOBJECT, scriptObject);
if ( AEHANDLE_IS_OK(audioEntity) )
- AudioManager.SetEntityStatus(audioEntity, true);
+ AudioManager.SetEntityStatus(audioEntity, TRUE);
return audioEntity;
}
@@ -200,7 +214,7 @@ cDMAudio::CreateOneShotScriptObject(cAudioScriptObject *scriptObject)
if ( AEHANDLE_IS_OK(audioEntity) )
{
- AudioManager.SetEntityStatus(audioEntity, true);
+ AudioManager.SetEntityStatus(audioEntity, TRUE);
AudioManager.PlayOneShot(audioEntity, scriptObject->AudioId, 0.0f);
}
}
@@ -230,7 +244,7 @@ cDMAudio::PlayRadioAnnouncement(uint8 announcement)
}
void
-cDMAudio::PlayFrontEndTrack(uint8 track, uint8 frontendFlag)
+cDMAudio::PlayFrontEndTrack(uint8 track, bool8 frontendFlag)
{
MusicManager.PlayFrontEndTrack(track, frontendFlag);
}
@@ -295,7 +309,7 @@ cDMAudio::PlayLoadedMissionAudio(void)
AudioManager.PlayLoadedMissionAudio();
}
-bool
+bool8
cDMAudio::IsMissionAudioSampleFinished(void)
{
return AudioManager.IsMissionAudioSampleFinished();
diff --git a/src/audio/DMAudio.h b/src/audio/DMAudio.h
index 3e6d5603..9f427272 100644
--- a/src/audio/DMAudio.h
+++ b/src/audio/DMAudio.h
@@ -22,11 +22,12 @@ public:
int32 CreateEntity(eAudioType type, void *UID);
void DestroyEntity(int32 audioEntity);
- void SetEntityStatus(int32 audioEntity, uint8 status);
+ bool8 GetEntityStatus(int32 audioEntity);
+ void SetEntityStatus(int32 audioEntity, bool8 status);
void PlayOneShot(int32 audioEntity, uint16 oneShot, float volume);
void DestroyAllGameCreatedEntities(void);
- void SetMonoMode(uint8 mono);
+ void SetMonoMode(bool8 mono);
void SetEffectsMasterVolume(uint8 volume);
void SetMusicMasterVolume(uint8 volume);
void SetEffectsFadeVol(uint8 volume);
@@ -40,18 +41,19 @@ public:
void SetSpeakerConfig(int32 config);
- bool IsMP3RadioChannelAvailable(void);
+ bool8 IsMP3RadioChannelAvailable(void);
void ReleaseDigitalHandle(void);
void ReacquireDigitalHandle(void);
- void SetDynamicAcousticModelingStatus(uint8 status);
+ void SetDynamicAcousticModelingStatus(bool8 status);
- bool CheckForAnAudioFileOnCD(void);
+ bool8 CheckForAnAudioFileOnCD(void);
char GetCDAudioDriveLetter(void);
- bool IsAudioInitialised(void);
-
+ bool8 IsAudioInitialised(void);
+
+ void ResetPoliceRadio();
void ReportCrime(eCrimeType crime, CVector const &pos);
int32 CreateLoopingScriptObject(cAudioScriptObject *scriptObject);
@@ -64,7 +66,7 @@ public:
void PlayFrontEndSound(uint16 frontend, uint32 volume);
void PlayRadioAnnouncement(uint8 announcement);
- void PlayFrontEndTrack(uint8 track, uint8 frontendFlag);
+ void PlayFrontEndTrack(uint8 track, bool8 frontendFlag);
void StopFrontEndTrack(void);
void ResetTimers(uint32 time);
@@ -79,7 +81,7 @@ public:
uint8 GetMissionAudioLoadingStatus(void);
void SetMissionAudioLocation(float x, float y, float z);
void PlayLoadedMissionAudio(void);
- bool IsMissionAudioSampleFinished(void);
+ bool8 IsMissionAudioSampleFinished(void);
void ClearMissionAudio(void);
uint8 GetRadioInCar(void);
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index ad304985..0752a5d8 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -15,46 +15,49 @@
#include "World.h"
#include "sampman.h"
+#if !defined FIX_BUGS && (defined RADIO_SCROLL_TO_PREV_STATION || defined RADIO_OFF_TEXT)
+static_assert(false, "RADIO_SCROLL_TO_PREV_STATION and RADIO_OFF_TEXT won't work correctly without FIX_BUGS");
+#endif
cMusicManager MusicManager;
int32 gNumRetunePresses;
int32 gRetuneCounter;
-bool bHasStarted;
+bool8 bHasStarted;
cMusicManager::cMusicManager()
{
- m_bIsInitialised = false;
- m_bDisabled = false;
+ m_bIsInitialised = FALSE;
+ m_bDisabled = FALSE;
m_nMusicMode = MUSICMODE_DISABLED;
- m_nCurrentStreamedSound = NO_TRACK;
- m_nPreviousStreamedSound = NO_TRACK;
- m_bFrontendTrackFinished = false;
- m_bPlayInFrontend = false;
- m_bSetNextStation = false;
+ m_nNextTrack = NO_TRACK;
+ m_nPlayingTrack = NO_TRACK;
+ m_bFrontendTrackFinished = FALSE;
+ m_bPlayInFrontend = FALSE;
+ m_bSetNextStation = FALSE;
m_nAnnouncement = NO_TRACK;
- m_bPreviousPlayerInCar = false;
- m_bPlayerInCar = false;
- m_bAnnouncementInProgress = false;
- m_bDontServiceAmbienceTrack = false;
- bHasStarted = false;
+ m_bPreviousPlayerInCar = FALSE;
+ m_bPlayerInCar = FALSE;
+ m_bAnnouncementInProgress = FALSE;
+ m_bVerifyAmbienceTrackStartedToPlay = FALSE;
+ bHasStarted = FALSE;
}
-bool
+bool8
cMusicManager::PlayerInCar()
{
if(!FindPlayerVehicle())
- return false;
+ return FALSE;
int32 State = FindPlayerPed()->m_nPedState;
if(State == PED_DRAG_FROM_CAR || State == PED_EXIT_CAR || State == PED_ARRESTED)
- return false;
+ return FALSE;
if (!FindPlayerVehicle())
- return true;
+ return TRUE;
if (FindPlayerVehicle()->GetStatus() == STATUS_WRECKED)
- return false;
+ return FALSE;
switch (FindPlayerVehicle()->GetModelIndex()) {
case MI_FIRETRUCK:
@@ -64,8 +67,8 @@ cMusicManager::PlayerInCar()
case MI_TRAIN:
case MI_SPEEDER:
case MI_REEFER:
- case MI_GHOST: return false;
- default: return true;
+ case MI_GHOST: return FALSE;
+ default: return TRUE;
}
}
@@ -83,16 +86,15 @@ cMusicManager::DisplayRadioStationName()
if(m_bPlayerInCar && !m_bPreviousPlayerInCar)
pCurrentStation = nil;
+#ifdef FIX_BUGS
+ const int curRadio = GetCarTuning();
+#else
+ const int curRadio = m_nNextTrack;
+#endif
+
#ifdef RADIO_SCROLL_TO_PREV_STATION
if(gNumRetunePresses < 0) {
- gStreamedSound = m_nCurrentStreamedSound;
-
- if(gStreamedSound == STREAMED_SOUND_CITY_AMBIENT ||
- gStreamedSound == STREAMED_SOUND_WATER_AMBIENT) {
- gStreamedSound = POLICE_RADIO; // which means OFF
-
- } else if(gStreamedSound > STREAMED_SOUND_RADIO_MP3_PLAYER)
- return;
+ gStreamedSound = curRadio;
gRetuneCounter = gNumRetunePresses;
pRetune = gStreamedSound;
@@ -100,7 +102,7 @@ cMusicManager::DisplayRadioStationName()
while(gRetuneCounter < 0) {
if(pRetune == HEAD_RADIO) {
pRetune = RADIO_OFF;
- } else if(pRetune == RADIO_OFF || pRetune == POLICE_RADIO) {
+ } else if(pRetune == RADIO_OFF || pRetune == NUM_RADIOS) {
pRetune = SampleManager.IsMP3RadioChannelAvailable() ? USERTRACK : USERTRACK - 1;
} else
pRetune--;
@@ -110,31 +112,38 @@ cMusicManager::DisplayRadioStationName()
} else
#endif
if(SampleManager.IsMP3RadioChannelAvailable()) {
- gStreamedSound = m_nCurrentStreamedSound;
+ gStreamedSound = curRadio;
if(gStreamedSound == STREAMED_SOUND_CITY_AMBIENT ||
- gStreamedSound == STREAMED_SOUND_WATER_AMBIENT) {
- gStreamedSound = POLICE_RADIO; // which means OFF
+ gStreamedSound == STREAMED_SOUND_WATER_AMBIENT) { // which means OFF
+ gStreamedSound = NUM_RADIOS;
} else if(gStreamedSound > STREAMED_SOUND_RADIO_MP3_PLAYER)
return;
pRetune = gNumRetunePresses + gStreamedSound;
- if(pRetune == POLICE_RADIO) {
+#ifdef FIX_BUGS
+ while(pRetune > NUM_RADIOS)
+ pRetune -= (NUM_RADIOS + 1);
+#endif
+ if(pRetune == NUM_RADIOS) {
pRetune = RADIO_OFF;
- } else if(pRetune > POLICE_RADIO) {
- pRetune = pRetune - RADIO_OFF;
}
+#ifndef FIX_BUGS
+ else if(pRetune > NUM_RADIOS) {
+ pRetune = pRetune - (NUM_RADIOS + 1);
+ }
+#endif
} else {
- gStreamedSound = m_nCurrentStreamedSound;
+ gStreamedSound = curRadio;
pRetune = gNumRetunePresses + gStreamedSound;
if(pRetune >= USERTRACK) {
gRetuneCounter = gNumRetunePresses;
- pRetune = m_nCurrentStreamedSound;
+ pRetune = curRadio;
if(gStreamedSound == STREAMED_SOUND_WATER_AMBIENT)
- pRetune = RADIO_OFF;
+ pRetune = STREAMED_SOUND_CITY_AMBIENT; // which is RADIO_OFF
while(gRetuneCounter) {
if(pRetune == RADIO_OFF) {
@@ -149,7 +158,7 @@ cMusicManager::DisplayRadioStationName()
}
}
- wchar *string = nil;
+ wchar *string;
switch(pRetune) {
case HEAD_RADIO: string = TheText.Get("FEA_FM0"); break;
@@ -161,27 +170,36 @@ cMusicManager::DisplayRadioStationName()
case MSX_FM: string = TheText.Get("FEA_FM6"); break;
case FLASHBACK: string = TheText.Get("FEA_FM7"); break;
case CHATTERBOX: string = TheText.Get("FEA_FM8"); break;
- case USERTRACK: string = TheText.Get("FEA_FM9"); break;
+ case USERTRACK:
+ if (!SampleManager.IsMP3RadioChannelAvailable())
+ return;
+ string = TheText.Get("FEA_FM9"); break;
#ifdef RADIO_OFF_TEXT
- case RADIO_OFF: case POLICE_RADIO: string = TheText.Get("FEA_FMN"); break;
+ case RADIO_OFF: {
+ extern wchar WideErrorString[];
+
+ string = TheText.Get("FEA_FMN");
+ if(string == WideErrorString) {
+ pCurrentStation = nil;
+ return;
+ }
+ break;
+ }
#endif
default: return;
};
-#ifdef RADIO_OFF_TEXT
- if(pRetune == USERTRACK && !SampleManager.IsMP3RadioChannelAvailable()) { string = TheText.Get("FEA_FMN"); }
-#else
- if(pRetune > CHATTERBOX && !SampleManager.IsMP3RadioChannelAvailable()) { return; }
-#endif
-
- if(string && pCurrentStation != string ||
- m_nCurrentStreamedSound == STREAMED_SOUND_RADIO_MP3_PLAYER &&
- m_nPreviousStreamedSound != STREAMED_SOUND_RADIO_MP3_PLAYER) {
+ if(pCurrentStation != string ||
+ m_nNextTrack == STREAMED_SOUND_RADIO_MP3_PLAYER && m_nPlayingTrack != STREAMED_SOUND_RADIO_MP3_PLAYER) {
pCurrentStation = string;
cDisplay = 60;
} else {
if(cDisplay == 0) return;
+#ifdef FIX_BUGS
+ cDisplay -= CTimer::GetLogicalFramesPassed();
+#else
cDisplay--;
+#endif
}
CFont::SetJustifyOff();
@@ -210,7 +228,7 @@ cMusicManager::DisplayRadioStationName()
}
}
-bool
+bool8
cMusicManager::Initialise()
{
int pos;
@@ -218,23 +236,23 @@ cMusicManager::Initialise()
if (!IsInitialised()) {
time_t timevalue = time(0);
if (timevalue == -1) {
- pos = AudioManager.GetRandomNumber(0);
+ pos = AudioManager.m_anRandomTable[0];
} else {
tm *pTm = localtime(&timevalue);
if (pTm->tm_sec == 0)
- pTm->tm_sec = AudioManager.GetRandomNumber(0);
+ pTm->tm_sec = AudioManager.m_anRandomTable[0];
if (pTm->tm_min == 0)
- pTm->tm_min = AudioManager.GetRandomNumber(1);
+ pTm->tm_min = AudioManager.m_anRandomTable[1];
if (pTm->tm_hour == 0)
- pTm->tm_hour = AudioManager.GetRandomNumber(2);
+ pTm->tm_hour = AudioManager.m_anRandomTable[2];
if (pTm->tm_mday == 0)
- pTm->tm_mday = AudioManager.GetRandomNumber(3);
+ pTm->tm_mday = AudioManager.m_anRandomTable[3];
if (pTm->tm_mon == 0)
- pTm->tm_mon = AudioManager.GetRandomNumber(4);
+ pTm->tm_mon = AudioManager.m_anRandomTable[4];
if (pTm->tm_year == 0)
- pTm->tm_year = AudioManager.GetRandomNumber(3);
+ pTm->tm_year = AudioManager.m_anRandomTable[3];
if (pTm->tm_wday == 0)
- pTm->tm_wday = AudioManager.GetRandomNumber(2);
+ pTm->tm_wday = AudioManager.m_anRandomTable[2];
pos = pTm->tm_yday
* pTm->tm_wday
* pTm->tm_year
@@ -247,22 +265,22 @@ cMusicManager::Initialise()
for (int i = 0; i < TOTAL_STREAMED_SOUNDS; i++) {
m_aTracks[i].m_nLength = SampleManager.GetStreamedFileLength(i);
- m_aTracks[i].m_nPosition = pos * AudioManager.GetRandomNumber(i % 5) % m_aTracks[i].m_nLength;
+ m_aTracks[i].m_nPosition = pos * AudioManager.m_anRandomTable[i % 5] % m_aTracks[i].m_nLength;
m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
- m_bResetTimers = false;
+ m_bResetTimers = FALSE;
m_nResetTime = 0;
m_nTimer = m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
- m_bDoTrackService = false;
- m_bIgnoreTimeDelay = false;
- m_bRadioSetByScript = false;
- m_nRadioStation = HEAD_RADIO;
+ m_bDoTrackService = FALSE;
+ m_bIgnoreTimeDelay = FALSE;
+ m_bRadioSetByScript = FALSE;
+ m_nRadioStationScript = HEAD_RADIO;
m_nRadioPosition = -1;
m_nRadioInCar = NO_TRACK;
gNumRetunePresses = 0;
gRetuneCounter = 0;
- m_bIsInitialised = true;
+ m_bIsInitialised = TRUE;
}
return m_bIsInitialised;
}
@@ -272,12 +290,12 @@ cMusicManager::Terminate()
{
if (!IsInitialised()) return;
- if (SampleManager.IsStreamPlaying(0)) {
- SampleManager.StopStreamedFile(0);
- m_nCurrentStreamedSound = NO_TRACK;
- m_nPreviousStreamedSound = NO_TRACK;
+ if (SampleManager.IsStreamPlaying()) {
+ SampleManager.StopStreamedFile();
+ m_nNextTrack = NO_TRACK;
+ m_nPlayingTrack = NO_TRACK;
}
- m_bIsInitialised = false;
+ m_bIsInitialised = FALSE;
}
void
@@ -288,7 +306,16 @@ cMusicManager::ChangeMusicMode(uint8 mode)
uint8 mode2;
switch (mode)
{
- case MUSICMODE_FRONTEND: mode2 = MUSICMODE_FRONTEND; break;
+ case MUSICMODE_FRONTEND:
+ mode2 = MUSICMODE_FRONTEND;
+#ifdef PAUSE_RADIO_IN_FRONTEND
+ // rewind those streams we weren't listening right now
+ for (uint32 i = STREAMED_SOUND_RADIO_HEAD; i < STREAMED_SOUND_CUTSCENE_LUIGI1_LG; i++) {
+ m_aTracks[i].m_nPosition = GetTrackStartPos(i);
+ m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ }
+#endif
+ break;
case MUSICMODE_GAME: mode2 = MUSICMODE_GAME; break;
case MUSICMODE_CUTSCENE: mode2 = MUSICMODE_CUTSCENE; break;
case MUSICMODE_DISABLE: mode2 = MUSICMODE_DISABLED; break;
@@ -302,25 +329,25 @@ cMusicManager::ChangeMusicMode(uint8 mode)
case MUSICMODE_GAME:
case MUSICMODE_CUTSCENE:
case MUSICMODE_DISABLED:
- if (SampleManager.IsStreamPlaying(0)) {
- if (m_nCurrentStreamedSound < TOTAL_STREAMED_SOUNDS) {
- m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ if (SampleManager.IsStreamPlaying()) {
+ if (m_nNextTrack < TOTAL_STREAMED_SOUNDS) {
+ m_aTracks[m_nNextTrack].m_nPosition = SampleManager.GetStreamedFilePosition();
+ m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
- SampleManager.StopStreamedFile(0);
+ SampleManager.StopStreamedFile();
}
- m_nCurrentStreamedSound = NO_TRACK;
- m_nPreviousStreamedSound = NO_TRACK;
- m_bFrontendTrackFinished = false;
- m_bPlayInFrontend = false;
- m_bSetNextStation = false;
- m_bPreviousPlayerInCar = false;
- m_bPlayerInCar = false;
- m_bAnnouncementInProgress = false;
+ m_nNextTrack = NO_TRACK;
+ m_nPlayingTrack = NO_TRACK;
+ m_bFrontendTrackFinished = FALSE;
+ m_bPlayInFrontend = FALSE;
+ m_bSetNextStation = FALSE;
+ m_bPreviousPlayerInCar = FALSE;
+ m_bPlayerInCar = FALSE;
+ m_bAnnouncementInProgress = FALSE;
m_nTimer = m_nLastTrackServiceTime = CTimer::GetTimeInMillisecondsPauseMode();
- m_bDoTrackService = false;
- m_bIgnoreTimeDelay = true;
- m_bDontServiceAmbienceTrack = false;
+ m_bDoTrackService = FALSE;
+ m_bIgnoreTimeDelay = TRUE;
+ m_bVerifyAmbienceTrackStartedToPlay = FALSE;
m_nMusicMode = mode2;
break;
default: return;
@@ -336,14 +363,14 @@ cMusicManager::GetRadioInCar(void)
CVehicle *veh = FindPlayerVehicle();
if (veh != nil){
if (UsesPoliceRadio(veh)) {
- if (m_nRadioInCar == NO_TRACK || (CReplay::IsPlayingBack() && AudioManager.m_nUserPause == 0))
+ if (m_nRadioInCar == NO_TRACK || (CReplay::IsPlayingBack() && !AudioManager.m_nUserPause))
return POLICE_RADIO;
return m_nRadioInCar;
} else return veh->m_nRadioStation;
}
}
- if (m_nRadioInCar == NO_TRACK || (CReplay::IsPlayingBack() && AudioManager.m_nUserPause == 0))
+ if (m_nRadioInCar == NO_TRACK || (CReplay::IsPlayingBack() && !AudioManager.m_nUserPause))
return RADIO_OFF;
return m_nRadioInCar;
}
@@ -369,8 +396,8 @@ void
cMusicManager::SetRadioChannelByScript(uint8 station, int32 pos)
{
if (m_bIsInitialised && station < RADIO_OFF) {
- m_bRadioSetByScript = true;
- m_nRadioStation = station;
+ m_bRadioSetByScript = TRUE;
+ m_nRadioStationScript = station;
m_nRadioPosition = pos == -1 ? -1 : pos % m_aTracks[station].m_nLength;
}
}
@@ -379,12 +406,12 @@ cMusicManager::SetRadioChannelByScript(uint8 station, int32 pos)
void
cMusicManager::ResetMusicAfterReload()
{
- m_bRadioSetByScript = false;
- m_nRadioStation = 0;
+ m_bRadioSetByScript = FALSE;
+ m_nRadioStationScript = 0;
m_nRadioPosition = -1;
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
- m_bSetNextStation = false;
+ m_bAnnouncementInProgress = FALSE;
+ m_bSetNextStation = FALSE;
gRetuneCounter = 0;
gNumRetunePresses = 0;
}
@@ -393,7 +420,7 @@ cMusicManager::ResetMusicAfterReload()
void
cMusicManager::ResetTimers(int32 time)
{
- m_bResetTimers = true;
+ m_bResetTimers = TRUE;
m_nResetTime = time;
}
@@ -401,26 +428,26 @@ void
cMusicManager::Service()
{
if (m_bResetTimers) {
- m_bResetTimers = false;
+ m_bResetTimers = FALSE;
m_nLastTrackServiceTime = m_nResetTime;
}
if (!m_bIsInitialised || m_bDisabled) return;
if (m_nMusicMode == MUSICMODE_CUTSCENE) {
- SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 0);
+ SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE);
return;
}
m_nTimer = CTimer::GetTimeInMillisecondsPauseMode();
if (m_nTimer > (m_nLastTrackServiceTime + 2000) || m_bIgnoreTimeDelay) {
- m_bIgnoreTimeDelay = false;
- m_bDoTrackService = true;
+ m_bIgnoreTimeDelay = FALSE;
+ m_bDoTrackService = TRUE;
m_nLastTrackServiceTime = m_nTimer;
- } else m_bDoTrackService = false;
+ } else m_bDoTrackService = FALSE;
- if (m_nCurrentStreamedSound == NO_TRACK && SampleManager.IsStreamPlaying(0))
- SampleManager.StopStreamedFile(0);
+ if (m_nNextTrack == NO_TRACK && SampleManager.IsStreamPlaying())
+ SampleManager.StopStreamedFile();
else switch (m_nMusicMode) {
case MUSICMODE_FRONTEND: ServiceFrontEndMode(); break;
case MUSICMODE_GAME: ServiceGameMode(); break;
@@ -430,10 +457,16 @@ cMusicManager::Service()
void
cMusicManager::ServiceFrontEndMode()
{
- if (m_nCurrentStreamedSound < TOTAL_STREAMED_SOUNDS) {
+#ifdef PAUSE_RADIO_IN_FRONTEND
+ // pause radio
+ for (uint32 i = STREAMED_SOUND_RADIO_HEAD; i < STREAMED_SOUND_CUTSCENE_LUIGI1_LG; i++)
+ m_aTracks[i].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+#endif
+
+ if (m_nNextTrack < TOTAL_STREAMED_SOUNDS) {
if (m_bFrontendTrackFinished) {
- if (!SampleManager.IsStreamPlaying(0)) {
- switch (m_nCurrentStreamedSound)
+ if (!SampleManager.IsStreamPlaying()) {
+ switch (m_nNextTrack)
{
case STREAMED_SOUND_MISSION_COMPLETED:
if (!AudioManager.m_nUserPause)
@@ -445,35 +478,35 @@ cMusicManager::ServiceFrontEndMode()
default:
break;
}
- m_nCurrentStreamedSound = NO_TRACK;
- m_nPreviousStreamedSound = NO_TRACK;
+ m_nNextTrack = NO_TRACK;
+ m_nPlayingTrack = NO_TRACK;
}
} else if (bHasStarted) {
- if (!SampleManager.IsStreamPlaying(0))
- SampleManager.StartStreamedFile(m_nCurrentStreamedSound, 0, 0);
+ if (!SampleManager.IsStreamPlaying())
+ SampleManager.StartStreamedFile(m_nNextTrack, 0);
} else {
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
- if (!SampleManager.StartStreamedFile(m_nCurrentStreamedSound, m_nCurrentStreamedSound < STREAMED_SOUND_RADIO_POLICE ? GetTrackStartPos(m_nCurrentStreamedSound) : 0, 0))
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE);
+ if (!SampleManager.StartStreamedFile(m_nNextTrack, m_nNextTrack < NUM_RADIOS ? GetTrackStartPos(m_nNextTrack) : 0))
return;
- SampleManager.SetStreamedVolumeAndPan(100, 63, 0, 0);
- if (m_bPlayInFrontend) bHasStarted = true;
- else m_bFrontendTrackFinished = true;
+ SampleManager.SetStreamedVolumeAndPan(100, 63, FALSE);
+ if (m_bPlayInFrontend) bHasStarted = TRUE;
+ else m_bFrontendTrackFinished = TRUE;
}
}
- if (SampleManager.IsStreamPlaying(0))
- SampleManager.SetStreamedVolumeAndPan((CPad::GetPad(0)->bDisplayNoControllerMessage || CPad::GetPad(0)->bObsoleteControllerMessage) ? 0 : 100, 63, 0, 0);
+ if (SampleManager.IsStreamPlaying())
+ SampleManager.SetStreamedVolumeAndPan((CPad::GetPad(0)->bDisplayNoControllerMessage || CPad::GetPad(0)->bObsoleteControllerMessage) ? 0 : 100, 63, FALSE);
}
void
cMusicManager::ServiceGameMode()
{
- bool bRadioOff = false;
+ bool8 bRadioOff = FALSE;
static int8 nFramesSinceCutsceneEnded = -1;
uint8 volume;
m_bPreviousPlayerInCar = m_bPlayerInCar;
m_bPlayerInCar = PlayerInCar();
- m_nPreviousStreamedSound = m_nCurrentStreamedSound;
+ m_nPlayingTrack = m_nNextTrack;
if (m_bPlayerInCar) {
if (FindPlayerPed() != nil
&& !FindPlayerPed()->DyingOrDead()
@@ -485,13 +518,16 @@ cMusicManager::ServiceGameMode()
gRetuneCounter = 30;
gNumRetunePresses++;
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 1.0f);
+ // This needs loop, and this is not the right place. Now done elsewhere.
+#ifndef FIX_BUGS
if (SampleManager.IsMP3RadioChannelAvailable()) {
if (gNumRetunePresses > RADIO_OFF)
gNumRetunePresses -= RADIO_OFF;
}
+#endif
}
#ifdef RADIO_SCROLL_TO_PREV_STATION
- else if(CPad::GetPad(0)->GetMouseWheelDownJustDown() || CPad::GetPad(0)->GetMouseWheelUpJustDown()) {
+ else if(!CPad::GetPad(0)->ArePlayerControlsDisabled() && (CPad::GetPad(0)->GetMouseWheelDownJustDown() || CPad::GetPad(0)->GetMouseWheelUpJustDown())) {
int scrollNext = ControlsManager.GetControllerKeyAssociatedWithAction(VEHICLE_CHANGE_RADIO_STATION, MOUSE);
int scrollPrev = scrollNext == rsMOUSEWHEELUPBUTTON ? rsMOUSEWHEELDOWNBUTTON : scrollNext == rsMOUSEWHEELDOWNBUTTON ? rsMOUSEWHEELUPBUTTON : -1;
@@ -508,11 +544,11 @@ cMusicManager::ServiceGameMode()
}
if (AudioManager.m_nPreviousUserPause)
- m_bPreviousPlayerInCar = false;
+ m_bPreviousPlayerInCar = FALSE;
if (!m_bPlayerInCar) {
if (m_bPreviousPlayerInCar) {
- if (m_nCurrentStreamedSound != STREAMED_SOUND_RADIO_POLICE)
- m_nRadioInCar = m_nCurrentStreamedSound;
+ if (m_nNextTrack != STREAMED_SOUND_RADIO_POLICE)
+ m_nRadioInCar = m_nNextTrack;
}
ServiceAmbience();
return;
@@ -520,28 +556,28 @@ cMusicManager::ServiceGameMode()
if (m_bPreviousPlayerInCar) {
if (m_nAnnouncement < TOTAL_STREAMED_SOUNDS
- && (m_nCurrentStreamedSound < STREAMED_SOUND_CITY_AMBIENT || m_bAnnouncementInProgress)
+ && (m_nNextTrack < RADIO_OFF || m_bAnnouncementInProgress)
&& ServiceAnnouncement())
{
if (m_bAnnouncementInProgress) {
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
return;
}
- m_nPreviousStreamedSound = m_nCurrentStreamedSound;
- m_nCurrentStreamedSound = GetCarTuning();
+ m_nPlayingTrack = m_nNextTrack;
+ m_nNextTrack = GetCarTuning();
}
if (SampleManager.IsMP3RadioChannelAvailable()
- && m_nCurrentStreamedSound != STREAMED_SOUND_RADIO_MP3_PLAYER
+ && m_nNextTrack != STREAMED_SOUND_RADIO_MP3_PLAYER
&& ControlsManager.GetIsKeyboardKeyJustDown(rsF9))
{
- m_nPreviousStreamedSound = m_nCurrentStreamedSound;
- m_nCurrentStreamedSound = STREAMED_SOUND_RADIO_MP3_PLAYER;
+ m_nPlayingTrack = m_nNextTrack;
+ m_nNextTrack = STREAMED_SOUND_RADIO_MP3_PLAYER;
if (FindPlayerVehicle() != nil)
FindPlayerVehicle()->m_nRadioStation = STREAMED_SOUND_RADIO_MP3_PLAYER;
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 1.0f);
gRetuneCounter = 0;
gNumRetunePresses = 0;
- m_bSetNextStation = false;
+ m_bSetNextStation = FALSE;
}
// Because when you switch radio back and forth, gNumRetunePresses will be 0 but gRetuneCounter won't.
#ifdef RADIO_SCROLL_TO_PREV_STATION
@@ -549,42 +585,42 @@ cMusicManager::ServiceGameMode()
if (gRetuneCounter > 1) gRetuneCounter--;
else if (gRetuneCounter == 1) gRetuneCounter = -1;
else if (gRetuneCounter == -1) {
- m_bSetNextStation = true;
+ m_bSetNextStation = TRUE;
gRetuneCounter = 0;
}
}
#else
if (gNumRetunePresses) {
if (gRetuneCounter != 0) gRetuneCounter--;
- else m_bSetNextStation = true;
+ else m_bSetNextStation = TRUE;
}
#endif
if (gRetuneCounter)
AudioManager.DoPoliceRadioCrackle();
if (m_bSetNextStation) {
- m_bSetNextStation = false;
- m_nPreviousStreamedSound = m_nCurrentStreamedSound;
- m_nCurrentStreamedSound = GetNextCarTuning();
- if (m_nCurrentStreamedSound == STREAMED_SOUND_CITY_AMBIENT || m_nCurrentStreamedSound == STREAMED_SOUND_WATER_AMBIENT)
- bRadioOff = true;
+ m_bSetNextStation = FALSE;
+ m_nPlayingTrack = m_nNextTrack;
+ m_nNextTrack = GetNextCarTuning();
+ if (m_nNextTrack == STREAMED_SOUND_CITY_AMBIENT || m_nNextTrack == STREAMED_SOUND_WATER_AMBIENT)
+ bRadioOff = TRUE;
- if (m_nPreviousStreamedSound == STREAMED_SOUND_CITY_AMBIENT || m_nPreviousStreamedSound == STREAMED_SOUND_WATER_AMBIENT)
+ if (m_nPlayingTrack == STREAMED_SOUND_CITY_AMBIENT || m_nPlayingTrack == STREAMED_SOUND_WATER_AMBIENT)
AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_CHANGE, 0.0f);
}
- if (m_nCurrentStreamedSound < STREAMED_SOUND_CITY_AMBIENT) {
+ if (m_nNextTrack < RADIO_OFF) {
if (ChangeRadioChannel()) {
ServiceTrack();
} else {
- m_bPlayerInCar = false;
+ m_bPlayerInCar = FALSE;
if (FindPlayerVehicle())
- FindPlayerVehicle()->m_nRadioStation = m_nCurrentStreamedSound;
- m_nCurrentStreamedSound = NO_TRACK;
+ FindPlayerVehicle()->m_nRadioStation = m_nNextTrack;
+ m_nNextTrack = NO_TRACK;
}
if (CTimer::GetIsSlowMotionActive()) {
if (TheCamera.pTargetEntity != nil) {
float DistToTargetSq = (TheCamera.pTargetEntity->GetPosition() - TheCamera.GetPosition()).MagnitudeSqr();
if (DistToTargetSq >= SQR(55.0f)) {
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE);
} else if (DistToTargetSq >= SQR(10.0f)) {
volume = ((45.0f - (Sqrt(DistToTargetSq) - 10.0f)) / 45.0f * 100.0f);
uint8 pan;
@@ -599,17 +635,17 @@ cMusicManager::ServiceGameMode()
}
if (gRetuneCounter)
volume /= 4;
- SampleManager.SetStreamedVolumeAndPan(volume, pan, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(volume, pan, FALSE);
} else if (AudioManager.ShouldDuckMissionAudio()) {
- SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(25, 63, FALSE);
} else if (gRetuneCounter) {
- SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(25, 63, FALSE);
} else {
- SampleManager.SetStreamedVolumeAndPan(100, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(100, 63, FALSE);
}
}
} else if (AudioManager.ShouldDuckMissionAudio()) {
- SampleManager.SetStreamedVolumeAndPan(25, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(25, 63, FALSE);
nFramesSinceCutsceneEnded = 0;
} else {
if (nFramesSinceCutsceneEnded == -1) {
@@ -626,61 +662,61 @@ cMusicManager::ServiceGameMode()
}
if (gRetuneCounter != 0)
volume /= 4;
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 0, 0);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, FALSE);
}
return;
}
if (bRadioOff) {
- m_nCurrentStreamedSound = m_nPreviousStreamedSound;
+ m_nNextTrack = m_nPlayingTrack;
if (FindPlayerVehicle() != nil)
FindPlayerVehicle()->m_nRadioStation = RADIO_OFF;
- AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_NO_RADIO, 0.0f);
+ AudioManager.PlayOneShot(AudioManager.m_nFrontEndEntity, SOUND_FRONTEND_RADIO_TURN_OFF, 0.0f);
}
ServiceAmbience();
return;
}
if (m_bRadioSetByScript) {
if (UsesPoliceRadio(FindPlayerVehicle())) {
- m_nCurrentStreamedSound = STREAMED_SOUND_RADIO_POLICE;
+ m_nNextTrack = STREAMED_SOUND_RADIO_POLICE;
} else {
- m_nCurrentStreamedSound = m_nRadioStation;
- if (FindPlayerVehicle()->m_nRadioStation == m_nCurrentStreamedSound) {
- m_nPreviousStreamedSound = NO_TRACK;
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
- SampleManager.StopStreamedFile(0);
+ m_nNextTrack = m_nRadioStationScript;
+ if (FindPlayerVehicle()->m_nRadioStation == m_nNextTrack) {
+ m_nPlayingTrack = NO_TRACK;
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE);
+ SampleManager.StopStreamedFile();
}
if (m_nRadioPosition != -1) {
- m_aTracks[m_nCurrentStreamedSound].m_nPosition = m_nRadioPosition;
- m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ m_aTracks[m_nNextTrack].m_nPosition = m_nRadioPosition;
+ m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
}
} else {
- m_nCurrentStreamedSound = GetCarTuning();
+ m_nNextTrack = GetCarTuning();
}
- if (m_nCurrentStreamedSound >= RADIO_OFF) {
+ if (m_nNextTrack >= RADIO_OFF) {
ServiceAmbience();
return;
}
if (ChangeRadioChannel()) {
if (m_bRadioSetByScript) {
- m_bRadioSetByScript = false;
- FindPlayerVehicle()->m_nRadioStation = m_nCurrentStreamedSound;
+ m_bRadioSetByScript = FALSE;
+ FindPlayerVehicle()->m_nRadioStation = m_nNextTrack;
}
} else {
- m_bPlayerInCar = false;
- m_nCurrentStreamedSound = NO_TRACK;
+ m_bPlayerInCar = FALSE;
+ m_nNextTrack = NO_TRACK;
}
}
void
cMusicManager::StopFrontEndTrack()
{
- if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_FRONTEND && m_nCurrentStreamedSound != NO_TRACK) {
- m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- SampleManager.StopStreamedFile(0);
- m_nPreviousStreamedSound = NO_TRACK;
- m_nCurrentStreamedSound = NO_TRACK;
+ if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_FRONTEND && m_nNextTrack != NO_TRACK) {
+ m_aTracks[m_nNextTrack].m_nPosition = SampleManager.GetStreamedFilePosition();
+ m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile();
+ m_nPlayingTrack = NO_TRACK;
+ m_nNextTrack = NO_TRACK;
}
}
@@ -692,34 +728,34 @@ cMusicManager::PlayAnnouncement(uint8 announcement)
}
void
-cMusicManager::PlayFrontEndTrack(uint8 track, uint8 bPlayInFrontend)
+cMusicManager::PlayFrontEndTrack(uint8 track, bool8 bPlayInFrontend)
{
if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS) {
if (m_nMusicMode == MUSICMODE_GAME) {
- if (m_nCurrentStreamedSound != NO_TRACK) {
+ if (m_nNextTrack != NO_TRACK) {
if (m_bAnnouncementInProgress) {
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
}
- m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ m_aTracks[m_nNextTrack].m_nPosition = SampleManager.GetStreamedFilePosition();
+ m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
- SampleManager.StopStreamedFile(0);
+ SampleManager.StopStreamedFile();
} else if (m_nMusicMode == MUSICMODE_FRONTEND) {
- if (m_nCurrentStreamedSound != NO_TRACK) {
- m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ if (m_nNextTrack != NO_TRACK) {
+ m_aTracks[m_nNextTrack].m_nPosition = SampleManager.GetStreamedFilePosition();
+ m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
}
- SampleManager.StopStreamedFile(0);
+ SampleManager.StopStreamedFile();
}
- m_nPreviousStreamedSound = m_nCurrentStreamedSound;
- m_nCurrentStreamedSound = track;
- m_bPlayInFrontend = !!bPlayInFrontend;
- m_bFrontendTrackFinished = false;
- m_bDoTrackService = true;
- bHasStarted = false;
- if (m_nCurrentStreamedSound < STREAMED_SOUND_RADIO_POLICE) {
+ m_nPlayingTrack = m_nNextTrack;
+ m_nNextTrack = track;
+ m_bPlayInFrontend = bPlayInFrontend;
+ m_bFrontendTrackFinished = FALSE;
+ m_bDoTrackService = TRUE;
+ bHasStarted = FALSE;
+ if (m_nNextTrack < NUM_RADIOS) {
gRetuneCounter = 0;
gNumRetunePresses = 0;
}
@@ -731,11 +767,11 @@ cMusicManager::PreloadCutSceneMusic(uint8 track)
{
if (IsInitialised() && !m_bDisabled && track < TOTAL_STREAMED_SOUNDS && m_nMusicMode == MUSICMODE_CUTSCENE) {
AudioManager.ResetPoliceRadio();
- while (SampleManager.IsStreamPlaying(0))
- SampleManager.StopStreamedFile(0);
- SampleManager.PreloadStreamedFile(track, 0);
- SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 0);
- m_nCurrentStreamedSound = track;
+ while (SampleManager.IsStreamPlaying())
+ SampleManager.StopStreamedFile();
+ SampleManager.PreloadStreamedFile(track);
+ SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE);
+ m_nNextTrack = track;
}
}
@@ -743,15 +779,15 @@ void
cMusicManager::PlayPreloadedCutSceneMusic(void)
{
if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_CUTSCENE)
- SampleManager.StartPreloadedStreamedFile(0);
+ SampleManager.StartPreloadedStreamedFile();
}
void
cMusicManager::StopCutSceneMusic(void)
{
if (IsInitialised() && !m_bDisabled && m_nMusicMode == MUSICMODE_CUTSCENE) {
- SampleManager.StopStreamedFile(0);
- m_nCurrentStreamedSound = NO_TRACK;
+ SampleManager.StopStreamedFile();
+ m_nNextTrack = NO_TRACK;
}
}
@@ -770,7 +806,7 @@ cMusicManager::GetTrackStartPos(uint8 track)
}
-bool
+bool8
cMusicManager::UsesPoliceRadio(CVehicle *veh)
{
switch (veh->GetModelIndex())
@@ -781,9 +817,9 @@ cMusicManager::UsesPoliceRadio(CVehicle *veh)
case MI_PREDATOR:
case MI_RHINO:
case MI_BARRACKS:
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -793,52 +829,52 @@ cMusicManager::ServiceAmbience()
if (m_bAnnouncementInProgress) {
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
}
- if (m_nCurrentStreamedSound < STREAMED_SOUND_CITY_AMBIENT) {
- if (SampleManager.IsStreamPlaying(0)) {
- m_aTracks[m_nCurrentStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- SampleManager.StopStreamedFile(0);
- m_nCurrentStreamedSound = NO_TRACK;
+ if (m_nNextTrack < RADIO_OFF) {
+ if (SampleManager.IsStreamPlaying()) {
+ m_aTracks[m_nNextTrack].m_nPosition = SampleManager.GetStreamedFilePosition();
+ m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile();
+ m_nNextTrack = NO_TRACK;
return;
}
- m_nCurrentStreamedSound = STREAMED_SOUND_CITY_AMBIENT;
+ m_nNextTrack = RADIO_OFF;
}
- if (CWorld::Players[CWorld::PlayerInFocus].m_WBState != WBSTATE_PLAYING && !SampleManager.IsStreamPlaying(0)) {
- m_nCurrentStreamedSound = NO_TRACK;
+ if (CWorld::Players[CWorld::PlayerInFocus].m_WBState != WBSTATE_PLAYING && !SampleManager.IsStreamPlaying()) {
+ m_nNextTrack = NO_TRACK;
return;
}
- m_nPreviousStreamedSound = m_nCurrentStreamedSound;
- m_nCurrentStreamedSound = TheCamera.DistanceToWater <= 45.0f ? STREAMED_SOUND_WATER_AMBIENT : STREAMED_SOUND_CITY_AMBIENT;
+ m_nPlayingTrack = m_nNextTrack;
+ m_nNextTrack = TheCamera.DistanceToWater <= 45.0f ? STREAMED_SOUND_WATER_AMBIENT : STREAMED_SOUND_CITY_AMBIENT;
- if (m_nCurrentStreamedSound == m_nPreviousStreamedSound) {
- ComputeAmbienceVol(false, volume);
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
- if (m_bDontServiceAmbienceTrack) {
- if (SampleManager.IsStreamPlaying(0))
- m_bDontServiceAmbienceTrack = false;
+ if (m_nNextTrack == m_nPlayingTrack) {
+ ComputeAmbienceVol(FALSE, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE);
+ if (m_bVerifyAmbienceTrackStartedToPlay) {
+ if (SampleManager.IsStreamPlaying())
+ m_bVerifyAmbienceTrackStartedToPlay = FALSE;
} else ServiceTrack();
} else {
- if (m_nPreviousStreamedSound < TOTAL_STREAMED_SOUNDS) {
- m_aTracks[m_nPreviousStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- m_aTracks[m_nPreviousStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- SampleManager.StopStreamedFile(0);
+ if (m_nPlayingTrack < TOTAL_STREAMED_SOUNDS) {
+ m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition();
+ m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile();
}
- uint32 pos = GetTrackStartPos(m_nCurrentStreamedSound);
- SampleManager.SetStreamedVolumeAndPan(0, 63, 1, 0);
- if (SampleManager.StartStreamedFile(m_nCurrentStreamedSound, pos, 0)) {
- ComputeAmbienceVol(true, volume);
- SampleManager.SetStreamedVolumeAndPan(volume, 63, 1, 0);
- m_bDontServiceAmbienceTrack = true;
+ uint32 pos = GetTrackStartPos(m_nNextTrack);
+ SampleManager.SetStreamedVolumeAndPan(0, 63, TRUE);
+ if (SampleManager.StartStreamedFile(m_nNextTrack, pos)) {
+ ComputeAmbienceVol(TRUE, volume);
+ SampleManager.SetStreamedVolumeAndPan(volume, 63, TRUE);
+ m_bVerifyAmbienceTrackStartedToPlay = TRUE;
} else
- m_nCurrentStreamedSound = NO_TRACK;
+ m_nNextTrack = NO_TRACK;
}
}
void
-cMusicManager::ComputeAmbienceVol(uint8 reset, uint8 &outVolume)
+cMusicManager::ComputeAmbienceVol(bool8 reset, uint8 &outVolume)
{
static float fVol = 0.0f;
@@ -861,49 +897,49 @@ void
cMusicManager::ServiceTrack()
{
if (m_bDoTrackService) {
- if (!SampleManager.IsStreamPlaying(0))
- SampleManager.StartStreamedFile(m_nCurrentStreamedSound, 0, 0);
+ if (!SampleManager.IsStreamPlaying())
+ SampleManager.StartStreamedFile(m_nNextTrack, 0);
}
}
-bool
+bool8
cMusicManager::ServiceAnnouncement()
{
static int8 cCheck = 0;
if (m_bAnnouncementInProgress) {
- if (!SampleManager.IsStreamPlaying(0)) {
+ if (!SampleManager.IsStreamPlaying()) {
m_nAnnouncement = NO_TRACK;
- m_bAnnouncementInProgress = false;
+ m_bAnnouncementInProgress = FALSE;
}
- return true;
+ return TRUE;
}
if (++cCheck >= 30) {
cCheck = 0;
- int pos = SampleManager.GetStreamedFilePosition(0);
- if (SampleManager.IsStreamPlaying(0)) {
- if (m_nCurrentStreamedSound != NO_TRACK) {
- m_aTracks[m_nCurrentStreamedSound].m_nPosition = pos;
- m_aTracks[m_nCurrentStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- SampleManager.StopStreamedFile(0);
+ int pos = SampleManager.GetStreamedFilePosition();
+ if (SampleManager.IsStreamPlaying()) {
+ if (m_nNextTrack != NO_TRACK) {
+ m_aTracks[m_nNextTrack].m_nPosition = pos;
+ m_aTracks[m_nNextTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.StopStreamedFile();
}
}
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
- if (SampleManager.StartStreamedFile(m_nAnnouncement, 0, 0)) {
- SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, 0, 0);
- m_bAnnouncementInProgress = true;
- m_nPreviousStreamedSound = m_nCurrentStreamedSound;
- m_nCurrentStreamedSound = m_nAnnouncement;
- return true;
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE);
+ if (SampleManager.StartStreamedFile(m_nAnnouncement, 0)) {
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, FALSE);
+ m_bAnnouncementInProgress = TRUE;
+ m_nPlayingTrack = m_nNextTrack;
+ m_nNextTrack = m_nAnnouncement;
+ return TRUE;
}
if (cCheck != 0) cCheck--;
else cCheck = 30;
- return false;
+ return FALSE;
}
- return false;
+ return FALSE;
}
uint8
@@ -913,7 +949,7 @@ cMusicManager::GetCarTuning()
if (veh == nil) return RADIO_OFF;
if (UsesPoliceRadio(veh)) return POLICE_RADIO;
if (veh->m_nRadioStation == USERTRACK && !SampleManager.IsMP3RadioChannelAvailable())
- veh->m_nRadioStation = AudioManager.GetRandomNumber(2) % USERTRACK;
+ veh->m_nRadioStation = AudioManager.m_anRandomTable[2] % USERTRACK;
return veh->m_nRadioStation;
}
@@ -929,7 +965,7 @@ cMusicManager::GetNextCarTuning()
while (gNumRetunePresses < 0) {
if(veh->m_nRadioStation == HEAD_RADIO) {
veh->m_nRadioStation = RADIO_OFF;
- } else if(veh->m_nRadioStation == RADIO_OFF || veh->m_nRadioStation == POLICE_RADIO) {
+ } else if(veh->m_nRadioStation == RADIO_OFF || veh->m_nRadioStation == NUM_RADIOS) {
veh->m_nRadioStation = SampleManager.IsMP3RadioChannelAvailable() ? USERTRACK : USERTRACK - 1;
} else
veh->m_nRadioStation--;
@@ -940,12 +976,18 @@ cMusicManager::GetNextCarTuning()
#endif
if (SampleManager.IsMP3RadioChannelAvailable()) {
if (veh->m_nRadioStation == RADIO_OFF)
- veh->m_nRadioStation = POLICE_RADIO;
+ veh->m_nRadioStation = NUM_RADIOS;
veh->m_nRadioStation += gNumRetunePresses;
- if (veh->m_nRadioStation == POLICE_RADIO)
+#ifdef FIX_BUGS
+ while (veh->m_nRadioStation > NUM_RADIOS)
+ veh->m_nRadioStation -= (NUM_RADIOS + 1);
+#endif
+ if (veh->m_nRadioStation == NUM_RADIOS)
veh->m_nRadioStation = RADIO_OFF;
- else if (veh->m_nRadioStation > POLICE_RADIO)
- veh->m_nRadioStation -= RADIO_OFF;
+#ifndef FIX_BUGS
+ else if (veh->m_nRadioStation > NUM_RADIOS)
+ veh->m_nRadioStation -= (NUM_RADIOS + 1);
+#endif
} else if (gNumRetunePresses + veh->m_nRadioStation >= USERTRACK) {
while (gNumRetunePresses) {
if (veh->m_nRadioStation == RADIO_OFF)
@@ -964,21 +1006,21 @@ cMusicManager::GetNextCarTuning()
return veh->m_nRadioStation;
}
-bool
+bool8
cMusicManager::ChangeRadioChannel()
{
- if (m_nCurrentStreamedSound != m_nPreviousStreamedSound) {
- if (m_nPreviousStreamedSound < TOTAL_STREAMED_SOUNDS) {
- m_aTracks[m_nPreviousStreamedSound].m_nPosition = SampleManager.GetStreamedFilePosition(0);
- m_aTracks[m_nPreviousStreamedSound].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
- SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
- SampleManager.StopStreamedFile(0);
+ if (m_nNextTrack != m_nPlayingTrack) {
+ if (m_nPlayingTrack < TOTAL_STREAMED_SOUNDS) {
+ m_aTracks[m_nPlayingTrack].m_nPosition = SampleManager.GetStreamedFilePosition();
+ m_aTracks[m_nPlayingTrack].m_nLastPosCheckTimer = CTimer::GetTimeInMillisecondsPauseMode();
+ SampleManager.SetStreamedVolumeAndPan(0, 63, FALSE);
+ SampleManager.StopStreamedFile();
}
- if (SampleManager.IsStreamPlaying(0))
- return false;
- if (!SampleManager.StartStreamedFile(m_nCurrentStreamedSound, GetTrackStartPos(m_nCurrentStreamedSound), 0))
- return false;
- SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, 0, 0);
+ if (SampleManager.IsStreamPlaying())
+ return FALSE;
+ if (!SampleManager.StartStreamedFile(m_nNextTrack, GetTrackStartPos(m_nNextTrack)))
+ return FALSE;
+ SampleManager.SetStreamedVolumeAndPan(AudioManager.ShouldDuckMissionAudio() ? 25 : 100, 63, FALSE);
}
- return true;
+ return TRUE;
}
diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h
index e8b94da6..4c4447fe 100644
--- a/src/audio/MusicManager.h
+++ b/src/audio/MusicManager.h
@@ -15,48 +15,48 @@ class CVehicle;
class cMusicManager
{
public:
- bool m_bIsInitialised;
- bool m_bDisabled;
+ bool8 m_bIsInitialised;
+ bool8 m_bDisabled;
uint8 m_nMusicMode;
- uint8 m_nCurrentStreamedSound;
- uint8 m_nPreviousStreamedSound;
- bool m_bFrontendTrackFinished;
- bool m_bPlayInFrontend;
- bool m_bSetNextStation;
+ uint8 m_nNextTrack;
+ uint8 m_nPlayingTrack;
+ bool8 m_bFrontendTrackFinished;
+ bool8 m_bPlayInFrontend;
+ bool8 m_bSetNextStation;
uint8 m_nAnnouncement;
- bool m_bPreviousPlayerInCar;
- bool m_bPlayerInCar;
- bool m_bAnnouncementInProgress;
+ bool8 m_bPreviousPlayerInCar;
+ bool8 m_bPlayerInCar;
+ bool8 m_bAnnouncementInProgress;
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
- bool m_bResetTimers;
+ bool8 m_bResetTimers;
uint32 m_nResetTime;
uint32 m_nLastTrackServiceTime;
uint32 m_nTimer;
- bool m_bDoTrackService;
- bool m_bIgnoreTimeDelay;
- bool m_bDontServiceAmbienceTrack;
- bool m_bRadioSetByScript;
- uint8 m_nRadioStation;
+ bool8 m_bDoTrackService;
+ bool8 m_bIgnoreTimeDelay;
+ bool8 m_bVerifyAmbienceTrackStartedToPlay;
+ bool8 m_bRadioSetByScript;
+ uint8 m_nRadioStationScript;
int32 m_nRadioPosition;
uint8 m_nRadioInCar;
public:
cMusicManager();
- bool IsInitialised() { return m_bIsInitialised; }
+ bool8 IsInitialised() { return m_bIsInitialised; }
uint32 GetMusicMode() { return m_nMusicMode; }
- uint8 GetCurrentTrack() { return m_nCurrentStreamedSound; }
+ uint8 GetNextTrack() { return m_nNextTrack; }
- bool Initialise();
+ bool8 Initialise();
void Terminate();
void ChangeMusicMode(uint8 mode);
void StopFrontEndTrack();
- bool PlayerInCar();
+ bool8 PlayerInCar();
void DisplayRadioStationName();
void PlayAnnouncement(uint8);
- void PlayFrontEndTrack(uint8, uint8);
+ void PlayFrontEndTrack(uint8, bool8);
void PreloadCutSceneMusic(uint8);
void PlayPreloadedCutSceneMusic(void);
void StopCutSceneMusic(void);
@@ -73,15 +73,15 @@ public:
void ServiceAmbience();
void ServiceTrack();
- bool UsesPoliceRadio(CVehicle *veh);
+ bool8 UsesPoliceRadio(CVehicle *veh);
uint32 GetTrackStartPos(uint8);
- void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
- bool ServiceAnnouncement();
+ void ComputeAmbienceVol(bool8 reset, uint8& outVolume);
+ bool8 ServiceAnnouncement();
uint8 GetCarTuning();
uint8 GetNextCarTuning();
- bool ChangeRadioChannel();
+ bool8 ChangeRadioChannel();
};
VALIDATE_SIZE(cMusicManager, 0x95C);
diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PolRadio.cpp
similarity index 80%
rename from src/audio/PoliceRadio.cpp
rename to src/audio/PolRadio.cpp
index 785dbf8f..553cf287 100644
--- a/src/audio/PoliceRadio.cpp
+++ b/src/audio/PolRadio.cpp
@@ -7,7 +7,7 @@
#include "AudioSamples.h"
#include "MusicManager.h"
#include "PlayerPed.h"
-#include "PoliceRadio.h"
+#include "PolRadio.h"
#include "Replay.h"
#include "Vehicle.h"
#include "World.h"
@@ -15,9 +15,6 @@
#include "sampman.h"
#include "Wanted.h"
-const int channels = ARRAY_SIZE(AudioManager.m_asActiveSamples);
-const int policeChannel = channels + 1;
-
struct tPoliceRadioZone {
char m_aName[8];
uint32 m_nSampleIndex;
@@ -28,9 +25,9 @@ tPoliceRadioZone ZoneSfx[NUMAUDIOZONES];
char SubZo2Label[8];
char SubZo3Label[8];
-int32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
-int8 g_nMissionAudioPlayingStatus = 2;
-uint8 gSpecialSuspectLastSeenReport;
+uint32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
+int8 g_nMissionAudioPlayingStatus = PLAY_STATUS_FINISHED;
+bool8 gSpecialSuspectLastSeenReport;
uint32 gMinTimeToNextReport[NUM_CRIME_TYPES];
void
@@ -88,14 +85,12 @@ cAudioManager::InitialisePoliceRadioZones()
void
cAudioManager::InitialisePoliceRadio()
{
- m_sPoliceRadioQueue.policeChannelTimer = 0;
- m_sPoliceRadioQueue.policeChannelTimerSeconds = 0;
- m_sPoliceRadioQueue.policeChannelCounterSeconds = 0;
- for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++)
- m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
+ m_sPoliceRadioQueue.Reset();
+ for (int32 i = 0; i < ARRAY_SIZE(m_aCrimes); i++)
+ m_aCrimes[i].type = CRIME_NONE;
- SampleManager.SetChannelReverbFlag(policeChannel, false);
- gSpecialSuspectLastSeenReport = false;
+ SampleManager.SetChannelReverbFlag(CHANNEL_POLICE_RADIO, FALSE);
+ gSpecialSuspectLastSeenReport = FALSE;
for (int32 i = 0; i < ARRAY_SIZE(gMinTimeToNextReport); i++)
gMinTimeToNextReport[i] = m_FrameCounter;
}
@@ -104,22 +99,22 @@ void
cAudioManager::ResetPoliceRadio()
{
if (!m_bIsInitialised) return;
- if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
+ if (SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
InitialisePoliceRadio();
}
void
-cAudioManager::SetMissionScriptPoliceAudio(int32 sfx) const
+cAudioManager::SetMissionScriptPoliceAudio(uint32 sfx)
{
if (!m_bIsInitialised) return;
- if (g_nMissionAudioPlayingStatus != 1) {
- g_nMissionAudioPlayingStatus = 0;
+ if (g_nMissionAudioPlayingStatus != PLAY_STATUS_PLAYING) {
+ g_nMissionAudioPlayingStatus = PLAY_STATUS_STOPPED;
g_nMissionAudioSfx = sfx;
}
}
int8
-cAudioManager::GetMissionScriptPoliceAudioPlayingStatus() const
+cAudioManager::GetMissionScriptPoliceAudioPlayingStatus()
{
return g_nMissionAudioPlayingStatus;
}
@@ -131,19 +126,18 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_nCounter = 0;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;
- m_sQueueSample.m_bIs2D = true;
- m_sQueueSample.m_nReleasingVolumeModificator = 10;
+ m_sQueueSample.m_bIs2D = TRUE;
+ m_sQueueSample.m_nPriority = 10;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_nVolume = m_anRandomTable[2] % 20 + 15;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.m_nEmittingVolume = m_sQueueSample.m_nVolume;
- m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_POLICE_RADIO_CRACKLE);
- m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_POLICE_RADIO_CRACKLE);
- m_sQueueSample.m_bReleasingSoundFlag = false;
- m_sQueueSample.m_bReverbFlag = false;
- m_sQueueSample.m_nOffset = 63;
- m_sQueueSample.m_nReleasingVolumeDivider = 3;
- m_sQueueSample.m_bRequireReflection = false;
+ SET_EMITTING_VOLUME(m_sQueueSample.m_nVolume);
+ SET_LOOP_OFFSETS(SFX_POLICE_RADIO_CRACKLE)
+ m_sQueueSample.m_bStatic = FALSE;
+ m_sQueueSample.m_bReverb = FALSE;
+ m_sQueueSample.m_nPan = 63;
+ m_sQueueSample.m_nFramesToPlay = 3;
+ SET_SOUND_REFLECTION(FALSE);
AddSampleToRequestedQueue();
}
@@ -155,8 +149,8 @@ cAudioManager::ServicePoliceRadio()
if(!m_bIsInitialised) return;
- if(m_nUserPause == 0) {
- bool crimeReport = SetupCrimeReport();
+ if(!m_nUserPause) {
+ bool8 crimeReport = SetupCrimeReport();
#ifdef FIX_BUGS // Crash at 0x5fe6ef
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
return;
@@ -165,7 +159,11 @@ cAudioManager::ServicePoliceRadio()
if(!crimeReport) {
if(wantedLevel != 0) {
if(nLastSeen != 0) {
+#ifdef FIX_BUGS
+ nLastSeen -= CTimer::GetLogicalFramesPassed();
+#else
--nLastSeen;
+#endif
} else {
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
SetupSuspectLastSeenReport();
@@ -179,104 +177,104 @@ cAudioManager::ServicePoliceRadio()
void
cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
{
- bool processed = false;
+ bool8 processed = FALSE;
uint32 sample;
int32 freq;
static int cWait = 0;
- static bool bChannelOpen = false;
- static uint8 bMissionAudioPhysicalPlayingStatus = 0;
+ static bool8 bChannelOpen = FALSE;
+ static uint8 bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_STOPPED;
static int32 PoliceChannelFreq = 5500;
if (!m_bIsInitialised) return;
- if (m_nUserPause != 0) {
- if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
- if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == 1 &&
+ if (m_nUserPause) {
+ if (SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
+ if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING &&
SampleManager.IsStreamPlaying(1)) {
- SampleManager.PauseStream(1, 1);
+ SampleManager.PauseStream(TRUE, 1);
}
} else {
if (m_nPreviousUserPause && g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES &&
- bMissionAudioPhysicalPlayingStatus == 1) {
- SampleManager.PauseStream(0, 1);
+ bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING) {
+ SampleManager.PauseStream(FALSE, 1);
}
- if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = false;
+ if (m_sPoliceRadioQueue.m_nSamplesInQueue == 0) bChannelOpen = FALSE;
if (cWait) {
+#ifdef FIX_BUGS
+ cWait -= CTimer::GetLogicalFramesPassed();
+#else
--cWait;
+#endif
return;
}
if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && !bChannelOpen) {
- if (g_nMissionAudioPlayingStatus) {
- if (g_nMissionAudioPlayingStatus == 1 && !bMissionAudioPhysicalPlayingStatus &&
+ if (g_nMissionAudioPlayingStatus != PLAY_STATUS_STOPPED) {
+ if (g_nMissionAudioPlayingStatus == PLAY_STATUS_PLAYING && bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_STOPPED &&
SampleManager.IsStreamPlaying(1)) {
- bMissionAudioPhysicalPlayingStatus = 1;
+ bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_PLAYING;
}
- if (bMissionAudioPhysicalPlayingStatus == 1) {
+ if (bMissionAudioPhysicalPlayingStatus == PLAY_STATUS_PLAYING) {
if (SampleManager.IsStreamPlaying(1)) {
DoPoliceRadioCrackle();
} else {
- bMissionAudioPhysicalPlayingStatus = 2;
- g_nMissionAudioPlayingStatus = 2;
+ bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_FINISHED;
+ g_nMissionAudioPlayingStatus = PLAY_STATUS_FINISHED;
g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
cWait = 30;
}
return;
}
- } else if (!SampleManager.GetChannelUsedFlag(policeChannel)) {
+ } else if (!SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) {
SampleManager.PreloadStreamedFile(g_nMissionAudioSfx, 1);
- SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, 1, 1);
+ SampleManager.SetStreamedVolumeAndPan(MAX_VOLUME, 63, TRUE, 1);
SampleManager.StartPreloadedStreamedFile(1);
- g_nMissionAudioPlayingStatus = 1;
- bMissionAudioPhysicalPlayingStatus = 0;
+ g_nMissionAudioPlayingStatus = PLAY_STATUS_PLAYING;
+ bMissionAudioPhysicalPlayingStatus = PLAY_STATUS_STOPPED;
return;
}
}
if (bChannelOpen) DoPoliceRadioCrackle();
- if ((g_nMissionAudioSfx == TOTAL_AUDIO_SAMPLES || g_nMissionAudioPlayingStatus != 1) &&
- !SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) {
- if (m_sPoliceRadioQueue.policeChannelTimer) {
- sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds];
- m_sPoliceRadioQueue.policeChannelTimer--;
- m_sPoliceRadioQueue.policeChannelCounterSeconds = (m_sPoliceRadioQueue.policeChannelCounterSeconds + 1) % 60;
- } else {
- sample = TOTAL_AUDIO_SAMPLES;
- }
+ if ((g_nMissionAudioSfx == TOTAL_AUDIO_SAMPLES || g_nMissionAudioPlayingStatus != PLAY_STATUS_PLAYING) &&
+ !SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO) && m_sPoliceRadioQueue.m_nSamplesInQueue != 0) {
+ sample = m_sPoliceRadioQueue.Remove();
if (wantedLevel == 0) {
if (gSpecialSuspectLastSeenReport) {
- gSpecialSuspectLastSeenReport = 0;
+ gSpecialSuspectLastSeenReport = FALSE;
} else if (((sample >= SFX_POLICE_RADIO_MESSAGE_NOISE_1) && (sample <= SFX_POLICE_RADIO_MESSAGE_NOISE_3)) || sample == TOTAL_AUDIO_SAMPLES) {
- bChannelOpen = false;
- processed = true;
+ bChannelOpen = FALSE;
+ processed = TRUE;
}
}
if (sample == TOTAL_AUDIO_SAMPLES) {
if (!processed) cWait = 30;
} else {
- SampleManager.InitialiseChannel(policeChannel, sample, 0);
+ SampleManager.InitialiseChannel(CHANNEL_POLICE_RADIO, sample, SFX_BANK_0);
switch (sample) {
case SFX_POLICE_RADIO_MESSAGE_NOISE_1:
case SFX_POLICE_RADIO_MESSAGE_NOISE_2:
case SFX_POLICE_RADIO_MESSAGE_NOISE_3:
freq = m_anRandomTable[4] % 2000 + 10025;
- bChannelOpen = bChannelOpen == false;
+ bChannelOpen = bChannelOpen == FALSE;
break;
default: freq = SampleManager.GetSampleBaseFrequency(sample); break;
}
PoliceChannelFreq = freq;
- SampleManager.SetChannelFrequency(policeChannel, freq);
- SampleManager.SetChannelVolume(policeChannel, 100);
- SampleManager.SetChannelPan(policeChannel, 63);
- SampleManager.SetChannelLoopCount(policeChannel, 1);
- SampleManager.SetChannelLoopPoints(policeChannel, 0, -1);
- SampleManager.StartChannel(policeChannel);
+ SampleManager.SetChannelFrequency(CHANNEL_POLICE_RADIO, freq);
+ SampleManager.SetChannelVolume(CHANNEL_POLICE_RADIO, 100);
+ SampleManager.SetChannelPan(CHANNEL_POLICE_RADIO, 63);
+#ifndef GTA_PS2
+ SampleManager.SetChannelLoopCount(CHANNEL_POLICE_RADIO, 1);
+ SampleManager.SetChannelLoopPoints(CHANNEL_POLICE_RADIO, 0, -1);
+#endif
+ SampleManager.StartChannel(CHANNEL_POLICE_RADIO);
}
if (processed) ResetPoliceRadio();
}
}
}
-bool
+bool8
cAudioManager::SetupCrimeReport()
{
int16 audioZoneId;
@@ -288,23 +286,23 @@ cAudioManager::SetupCrimeReport()
float quarterX;
float quarterY;
int i;
- int32 sampleIndex;
- bool processed = false;
+ uint32 sampleIndex;
+ bool8 processed = FALSE;
- if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return false;
+ if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) return FALSE;
- if (60 - m_sPoliceRadioQueue.policeChannelTimer <= 9) {
+ if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue <= 9) {
AgeCrimes();
- return true;
+ return TRUE;
}
- for (i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
- if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE)
+ for (i = 0; i < ARRAY_SIZE(m_aCrimes); i++) {
+ if (m_aCrimes[i].type != CRIME_NONE)
break;
}
- if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return false;
- audioZoneId = CTheZones::FindAudioZone(&m_sPoliceRadioQueue.crimes[i].position);
+ if (i == ARRAY_SIZE(m_aCrimes)) return FALSE;
+ audioZoneId = CTheZones::FindAudioZone(&m_aCrimes[i].position);
if (audioZoneId >= 0 && audioZoneId < NUMAUDIOZONES) {
zone = CTheZones::GetAudioZone(audioZoneId);
for (int j = 0; j < NUMAUDIOZONES; j++) {
@@ -313,14 +311,14 @@ cAudioManager::SetupCrimeReport()
m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_WEVE_GOT);
m_sPoliceRadioQueue.Add(m_anRandomTable[1] % 2 + SFX_A_10_1);
- switch (m_sPoliceRadioQueue.crimes[i].type) {
- case CRIME_PED_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_PED; break;
- case CRIME_COP_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_COP; break;
- case CRIME_VEHICLE_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break;
- case CRIME_DESTROYED_CESSNA: m_sPoliceRadioQueue.crimes[i].type = CRIME_SHOOT_HELI; break;
+ switch (m_aCrimes[i].type) {
+ case CRIME_PED_BURNED: m_aCrimes[i].type = CRIME_HIT_PED; break;
+ case CRIME_COP_BURNED: m_aCrimes[i].type = CRIME_HIT_COP; break;
+ case CRIME_VEHICLE_BURNED: m_aCrimes[i].type = CRIME_STEAL_CAR; break;
+ case CRIME_DESTROYED_CESSNA: m_aCrimes[i].type = CRIME_SHOOT_HELI; break;
default: break;
}
- m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1 - 1);
+ m_sPoliceRadioQueue.Add(m_aCrimes[i].type + SFX_CRIME_1 - 1);
m_sPoliceRadioQueue.Add(SFX_IN);
if (sampleIndex == SFX_POLICE_RADIO_SHORESIDE_VALE &&
(strcmp(zone->name, SubZo2Label) == 0 || strcmp(zone->name, SubZo3Label) == 0)) {
@@ -334,17 +332,17 @@ cAudioManager::SetupCrimeReport()
quarterX = 0.25f * rangeX;
quarterY = 0.25f * rangeY;
- if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
+ if (m_aCrimes[i].position.y > halfY + quarterY) {
m_sPoliceRadioQueue.Add(SFX_NORTH);
- processed = true;
- } else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
+ processed = TRUE;
+ } else if (m_aCrimes[i].position.y < halfY - quarterY) {
m_sPoliceRadioQueue.Add(SFX_SOUTH);
- processed = true;
+ processed = TRUE;
}
- if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
+ if (m_aCrimes[i].position.x > halfX + quarterX)
m_sPoliceRadioQueue.Add(SFX_EAST);
- else if (m_sPoliceRadioQueue.crimes[i].position.x < halfX - quarterX)
+ else if (m_aCrimes[i].position.x < halfX - quarterX)
m_sPoliceRadioQueue.Add(SFX_WEST);
else if (!processed)
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
@@ -357,9 +355,9 @@ cAudioManager::SetupCrimeReport()
}
}
}
- m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
+ m_aCrimes[i].type = CRIME_NONE;
AgeCrimes();
- return true;
+ return TRUE;
}
void
@@ -530,7 +528,7 @@ cAudioManager::SetupSuspectLastSeenReport()
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
veh = FindPlayerVehicle();
if (veh != nil) {
- if (60 - m_sPoliceRadioQueue.policeChannelTimer > 9) {
+ if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue > 9) {
color1 = veh->m_currentColour1;
if (color1 >= ARRAY_SIZE(gCarColourTable)) {
debug("\n *** UNKNOWN CAR COLOUR %d *** ", color1);
@@ -663,7 +661,7 @@ cAudioManager::SetupSuspectLastSeenReport()
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
}
}
- } else if (60 - m_sPoliceRadioQueue.policeChannelTimer > 4) {
+ } else if (POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue > 4) {
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_ON_FOOT);
@@ -673,19 +671,17 @@ cAudioManager::SetupSuspectLastSeenReport()
}
}
-
-
void
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
{
- int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
+ int32 lastCrime = ARRAY_SIZE(m_aCrimes);
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 &&
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
- for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
- if (m_sPoliceRadioQueue.crimes[i].type) {
- if (m_sPoliceRadioQueue.crimes[i].type == type) {
- m_sPoliceRadioQueue.crimes[i].position = pos;
- m_sPoliceRadioQueue.crimes[i].timer = 0;
+ for (int32 i = 0; i < ARRAY_SIZE(m_aCrimes); i++) {
+ if (m_aCrimes[i].type != CRIME_NONE) {
+ if (m_aCrimes[i].type == type) {
+ m_aCrimes[i].position = pos;
+ m_aCrimes[i].timer = 0;
return;
}
} else {
@@ -693,10 +689,10 @@ cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
}
}
- if (lastCrime < ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) {
- m_sPoliceRadioQueue.crimes[lastCrime].type = type;
- m_sPoliceRadioQueue.crimes[lastCrime].position = pos;
- m_sPoliceRadioQueue.crimes[lastCrime].timer = 0;
+ if (lastCrime < ARRAY_SIZE(m_aCrimes)) {
+ m_aCrimes[lastCrime].type = type;
+ m_aCrimes[lastCrime].position = pos;
+ m_aCrimes[lastCrime].timer = 0;
gMinTimeToNextReport[type] = m_FrameCounter + 500;
}
}
@@ -714,12 +710,12 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
float quarterX;
float quarterY;
int32 sample;
- bool processed = false;
+ bool8 processed = false;
CVector vec = CVector(x, y, z);
if (!m_bIsInitialised) return;
- if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && 60 - m_sPoliceRadioQueue.policeChannelTimer > 9) {
+ if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && POLICE_RADIO_QUEUE_MAX_SAMPLES - m_sPoliceRadioQueue.m_nSamplesInQueue > 9) {
audioZone = CTheZones::FindAudioZone(&vec);
if (audioZone >= 0 && audioZone < NUMAUDIOZONES) {
zone = CTheZones::GetAudioZone(audioZone);
@@ -745,10 +741,10 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
if (vec.y > halfY + quarterY) {
m_sPoliceRadioQueue.Add(SFX_NORTH);
- processed = true;
+ processed = TRUE;
} else if (vec.y < halfY - quarterY) {
m_sPoliceRadioQueue.Add(SFX_SOUTH);
- processed = true;
+ processed = TRUE;
}
if (vec.x > halfX + quarterX)
@@ -761,7 +757,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
m_sPoliceRadioQueue.Add(sample);
m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
- gSpecialSuspectLastSeenReport = true;
+ gSpecialSuspectLastSeenReport = TRUE;
break;
}
}
@@ -772,9 +768,9 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
void
cAudioManager::AgeCrimes()
{
- for (uint8 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
- if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
- if (++m_sPoliceRadioQueue.crimes[i].timer > 1500) m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
+ for (uint8 i = 0; i < ARRAY_SIZE(m_aCrimes); i++) {
+ if (m_aCrimes[i].type != CRIME_NONE) {
+ if (++m_aCrimes[i].timer > 1500) m_aCrimes[i].type = CRIME_NONE;
}
}
}
diff --git a/src/audio/PolRadio.h b/src/audio/PolRadio.h
new file mode 100644
index 00000000..f402c200
--- /dev/null
+++ b/src/audio/PolRadio.h
@@ -0,0 +1,66 @@
+#pragma once
+
+#include "Crime.h"
+#include "AudioSamples.h"
+
+struct cAMCrime {
+ int32 type;
+ CVector position;
+ uint16 timer;
+
+ cAMCrime()
+ {
+ type = CRIME_NONE;
+ position = CVector(0.0f, 0.0f, 0.0f);
+ timer = 0;
+ }
+};
+
+VALIDATE_SIZE(cAMCrime, 20);
+
+#define POLICE_RADIO_QUEUE_MAX_SAMPLES 60
+
+class cPoliceRadioQueue
+{
+public:
+ int32 m_aSamples[POLICE_RADIO_QUEUE_MAX_SAMPLES];
+ uint8 m_nSamplesInQueue;
+ uint8 m_nAddOffset;
+ uint8 m_nRemoveOffset;
+
+ cPoliceRadioQueue()
+ {
+ Reset();
+ }
+
+ void Reset()
+ {
+ m_nAddOffset = 0;
+ m_nRemoveOffset = 0;
+ m_nSamplesInQueue = 0;
+ }
+
+ bool8 Add(uint32 sample)
+ {
+ if (m_nSamplesInQueue != POLICE_RADIO_QUEUE_MAX_SAMPLES) {
+ m_aSamples[m_nAddOffset] = sample;
+ m_nSamplesInQueue++;
+ m_nAddOffset = (m_nAddOffset + 1) % POLICE_RADIO_QUEUE_MAX_SAMPLES;
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ uint32 Remove()
+ {
+ if (m_nSamplesInQueue != 0) {
+ uint32 sample = m_aSamples[m_nRemoveOffset];
+ m_nSamplesInQueue--;
+ m_nRemoveOffset = (m_nRemoveOffset + 1) % POLICE_RADIO_QUEUE_MAX_SAMPLES;
+ return sample;
+ }
+ return TOTAL_AUDIO_SAMPLES;
+ }
+};
+
+VALIDATE_SIZE(cPoliceRadioQueue, 244);
diff --git a/src/audio/PoliceRadio.h b/src/audio/PoliceRadio.h
deleted file mode 100644
index 368708b6..00000000
--- a/src/audio/PoliceRadio.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#pragma once
-
-#include "Crime.h"
-
-struct cAMCrime {
- int32 type;
- CVector position;
- uint16 timer;
-
- cAMCrime()
- {
- type = CRIME_NONE;
- position = CVector(0.0f, 0.0f, 0.0f);
- timer = 0;
- }
-};
-
-VALIDATE_SIZE(cAMCrime, 20);
-
-class cPoliceRadioQueue
-{
-public:
- int32 crimesSamples[60];
- uint8 policeChannelTimer;
- uint8 policeChannelTimerSeconds;
- uint8 policeChannelCounterSeconds;
- cAMCrime crimes[10];
-
- cPoliceRadioQueue()
- {
- policeChannelTimerSeconds = 0;
- policeChannelCounterSeconds = 0;
- policeChannelTimer = 0;
- }
-
- void Add(uint32 sample)
- {
- if (policeChannelTimer != 60) {
- crimesSamples[policeChannelTimerSeconds] = sample;
- policeChannelTimer++;
- policeChannelTimerSeconds = (policeChannelTimerSeconds + 1) % 60;
- }
- }
-};
-
-VALIDATE_SIZE(cPoliceRadioQueue, 444);
diff --git a/src/audio/audio_enums.h b/src/audio/audio_enums.h
index 8c6d35aa..69d37a64 100644
--- a/src/audio/audio_enums.h
+++ b/src/audio/audio_enums.h
@@ -12,8 +12,9 @@ enum eRadioStation
FLASHBACK,
CHATTERBOX,
USERTRACK,
- POLICE_RADIO,
- RADIO_OFF,
+ POLICE_RADIO = 10,
+ NUM_RADIOS = 10,
+ RADIO_OFF = 11,
};
enum eMusicMode
@@ -253,3 +254,25 @@ enum eAudioType
AUDIOTYPE_POLICERADIO,
TOTAL_AUDIO_TYPES,
};
+
+#ifdef GTA_PS2
+enum
+{
+ NUM_CHANNELS_GENERIC = 43,
+ CHANNEL_POLICE_RADIO = NUM_CHANNELS_GENERIC,
+ CHANNEL_MISSION_AUDIO,
+ CHANNEL_PLAYER_VEHICLE_ENGINE,
+ NUM_CHANNELS
+};
+#else
+enum
+{
+#ifdef PS2_AUDIO_CHANNELS
+ NUM_CHANNELS_GENERIC = 43,
+#else
+ NUM_CHANNELS_GENERIC = 27,
+#endif
+ CHANNEL_POLICE_RADIO,
+ NUM_CHANNELS
+};
+#endif
diff --git a/src/audio/oal/aldlist.cpp b/src/audio/oal/aldlist.cpp
index 881418c1..6024adf2 100644
--- a/src/audio/oal/aldlist.cpp
+++ b/src/audio/oal/aldlist.cpp
@@ -24,12 +24,6 @@
#include "aldlist.h"
-#ifndef _WIN32
-#define _stricmp strcasecmp
-#define _strnicmp strncasecmp
-#define _strdup strdup
-#endif
-
#ifdef AUDIO_OAL
/*
* Init call
@@ -47,8 +41,8 @@ ALDeviceList::ALDeviceList()
defaultDeviceIndex = 0;
if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT")) {
- devices = (char *)alcGetString(NULL, ALC_DEVICE_SPECIFIER);
- defaultDeviceName = (char *)alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
+ devices = (char *)alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
+ defaultDeviceName = (char *)alcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER);
index = 0;
// go through device list (each device terminated with a single NULL, list terminated with double NULL)
@@ -62,17 +56,11 @@ ALDeviceList::ALDeviceList()
if (context) {
alcMakeContextCurrent(context);
// if new actual device name isn't already in the list, then add it...
- actualDeviceName = alcGetString(device, ALC_DEVICE_SPECIFIER);
- bool bNewName = true;
- for (unsigned int i = 0; i < GetNumDevices(); i++) {
- if (strcmp(GetDeviceName(i), actualDeviceName) == 0) {
- bNewName = false;
- }
- }
- if ((bNewName) && (actualDeviceName != NULL) && (strlen(actualDeviceName) > 0)) {
- ALDEVICEINFO ALDeviceInfo;
+ actualDeviceName = alcGetString(device, ALC_ALL_DEVICES_SPECIFIER);
+ if ((actualDeviceName != NULL) && (strlen(actualDeviceName) > 0)) {
+ ALDEVICEINFO &ALDeviceInfo = aDeviceInfo[nNumOfDevices++];
ALDeviceInfo.bSelected = true;
- ALDeviceInfo.strDeviceName = _strdup(actualDeviceName);
+ ALDeviceInfo.SetName(actualDeviceName);
alcGetIntegerv(device, ALC_MAJOR_VERSION, sizeof(int), &ALDeviceInfo.iMajorVersion);
alcGetIntegerv(device, ALC_MINOR_VERSION, sizeof(int), &ALDeviceInfo.iMinorVersion);
@@ -105,8 +93,6 @@ ALDeviceList::ALDeviceList()
// Get Source Count
ALDeviceInfo.uiSourceCount = GetMaxNumSources();
-
- aDeviceInfo[nNumOfDevices++] = ALDeviceInfo;
}
alcMakeContextCurrent(NULL);
alcDestroyContext(context);
diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h
index 417bd314..3ed12d84 100644
--- a/src/audio/oal/aldlist.h
+++ b/src/audio/oal/aldlist.h
@@ -21,7 +21,7 @@ enum
};
struct ALDEVICEINFO {
- const char *strDeviceName;
+ char *strDeviceName;
int iMajorVersion;
int iMinorVersion;
unsigned int uiSourceCount;
@@ -33,6 +33,19 @@ struct ALDEVICEINFO {
strDeviceName = NULL;
Extensions = 0;
}
+
+ ~ALDEVICEINFO()
+ {
+ delete[] strDeviceName;
+ strDeviceName = NULL;
+ }
+
+ void SetName(const char *name)
+ {
+ if(strDeviceName) delete[] strDeviceName;
+ strDeviceName = new char[strlen(name) + 1];
+ strcpy(strDeviceName, name);
+ }
};
typedef ALDEVICEINFO *LPALDEVICEINFO;
diff --git a/src/audio/oal/channel.cpp b/src/audio/oal/channel.cpp
index b700bc4d..6c9cb837 100644
--- a/src/audio/oal/channel.cpp
+++ b/src/audio/oal/channel.cpp
@@ -10,18 +10,22 @@
extern bool IsFXSupported();
-ALuint alSources[MAXCHANNELS+MAX2DCHANNELS];
-ALuint alFilters[MAXCHANNELS+MAX2DCHANNELS];
-ALuint alBuffers[MAXCHANNELS+MAX2DCHANNELS];
+ALuint alSources[NUM_CHANNELS];
+ALuint alFilters[NUM_CHANNELS];
+ALuint alBuffers[NUM_CHANNELS];
bool bChannelsCreated = false;
+int32 CChannel::channelsThatNeedService = 0;
+
+uint8 tempStereoBuffer[PED_BLOCKSIZE * 2];
+
void
CChannel::InitChannels()
{
- alGenSources(MAXCHANNELS+MAX2DCHANNELS, alSources);
- alGenBuffers(MAXCHANNELS+MAX2DCHANNELS, alBuffers);
+ alGenSources(NUM_CHANNELS, alSources);
+ alGenBuffers(NUM_CHANNELS, alBuffers);
if (IsFXSupported())
- alGenFilters(MAXCHANNELS + MAX2DCHANNELS, alFilters);
+ alGenFilters(NUM_CHANNELS, alFilters);
bChannelsCreated = true;
}
@@ -30,13 +34,13 @@ CChannel::DestroyChannels()
{
if (bChannelsCreated)
{
- alDeleteSources(MAXCHANNELS + MAX2DCHANNELS, alSources);
+ alDeleteSources(NUM_CHANNELS, alSources);
memset(alSources, 0, sizeof(alSources));
- alDeleteBuffers(MAXCHANNELS + MAX2DCHANNELS, alBuffers);
+ alDeleteBuffers(NUM_CHANNELS, alBuffers);
memset(alBuffers, 0, sizeof(alBuffers));
if (IsFXSupported())
{
- alDeleteFilters(MAXCHANNELS + MAX2DCHANNELS, alFilters);
+ alDeleteFilters(NUM_CHANNELS, alFilters);
memset(alFilters, 0, sizeof(alFilters));
}
bChannelsCreated = false;
@@ -48,6 +52,7 @@ CChannel::CChannel()
{
Data = nil;
DataSize = 0;
+ bIs2D = false;
SetDefault();
}
@@ -59,7 +64,9 @@ void CChannel::SetDefault()
Position[0] = 0.0f; Position[1] = 0.0f; Position[2] = 0.0f;
Distances[0] = 0.0f; Distances[1] = FLT_MAX;
- LoopCount = 1;
+
+ LoopCount = 1;
+ LastProcessedOffset = UINT32_MAX;
LoopPoints[0] = 0; LoopPoints[1] = -1;
Frequency = MAX_FREQ;
@@ -67,6 +74,10 @@ void CChannel::SetDefault()
void CChannel::Reset()
{
+ // Here is safe because ctor don't call this
+ if (LoopCount > 1)
+ channelsThatNeedService--;
+
ClearBuffer();
SetDefault();
}
@@ -82,6 +93,7 @@ void CChannel::Init(uint32 _id, bool Is2D)
if ( Is2D )
{
+ bIs2D = true;
alSource3f(alSources[id], AL_POSITION, 0.0f, 0.0f, 0.0f);
alSourcef(alSources[id], AL_GAIN, 1.0f);
}
@@ -105,7 +117,20 @@ void CChannel::Start()
if ( !HasSource() ) return;
if ( !Data ) return;
- alBufferData(alBuffers[id], AL_FORMAT_MONO16, Data, DataSize, Frequency);
+ if ( bIs2D )
+ {
+ // convert mono data to stereo
+ int16 *monoData = (int16*)Data;
+ int16 *stereoData = (int16*)tempStereoBuffer;
+ for (size_t i = 0; i < DataSize / 2; i++)
+ {
+ *(stereoData++) = *monoData;
+ *(stereoData++) = *(monoData++);
+ }
+ alBufferData(alBuffers[id], AL_FORMAT_STEREO16, tempStereoBuffer, DataSize * 2, Frequency);
+ }
+ else
+ alBufferData(alBuffers[id], AL_FORMAT_MONO16, Data, DataSize, Frequency);
if ( LoopPoints[0] != 0 && LoopPoints[0] != -1 )
alBufferiv(alBuffers[id], AL_LOOP_POINTS_SOFT, LoopPoints);
alSourcei(alSources[id], AL_BUFFER, alBuffers[id]);
@@ -174,10 +199,51 @@ void CChannel::SetCurrentFreq(uint32 freq)
SetPitch(ALfloat(freq) / Frequency);
}
-void CChannel::SetLoopCount(int32 loopCount) // fake. TODO:
+void CChannel::SetLoopCount(int32 count)
{
if ( !HasSource() ) return;
- alSourcei(alSources[id], AL_LOOPING, loopCount == 1 ? AL_FALSE : AL_TRUE);
+
+ // 0: loop indefinitely, 1: play one time, 2: play two times etc...
+ // only > 1 needs manual processing
+
+ if (LoopCount > 1 && count < 2)
+ channelsThatNeedService--;
+ else if (LoopCount < 2 && count > 1)
+ channelsThatNeedService++;
+
+ alSourcei(alSources[id], AL_LOOPING, count == 1 ? AL_FALSE : AL_TRUE);
+ LoopCount = count;
+}
+
+bool CChannel::Update()
+{
+ if (!HasSource()) return false;
+ if (LoopCount < 2) return false;
+
+ ALint state;
+ alGetSourcei(alSources[id], AL_SOURCE_STATE, &state);
+ if (state == AL_STOPPED) {
+ debug("Looping channels(%d in this case) shouldn't report AL_STOPPED, but nvm\n", id);
+ SetLoopCount(1);
+ return true;
+ }
+
+ assert(channelsThatNeedService > 0 && "Ref counting is broken");
+
+ ALint offset;
+ alGetSourcei(alSources[id], AL_SAMPLE_OFFSET, &offset);
+
+ // Rewound
+ if (offset < LastProcessedOffset) {
+ LoopCount--;
+ if (LoopCount == 1) {
+ // Playing last tune...
+ channelsThatNeedService--;
+ alSourcei(alSources[id], AL_LOOPING, AL_FALSE);
+ }
+ }
+ LastProcessedOffset = offset;
+ return true;
}
void CChannel::SetLoopPoints(ALint start, ALint end)
@@ -209,6 +275,7 @@ void CChannel::SetPan(int32 pan)
void CChannel::ClearBuffer()
{
if ( !HasSource() ) return;
+ alSourcei(alSources[id], AL_LOOPING, AL_FALSE);
alSourcei(alSources[id], AL_BUFFER, AL_NONE);
#ifdef BIGENDIAN
diff --git a/src/audio/oal/channel.h b/src/audio/oal/channel.h
index 81817a32..872646c8 100644
--- a/src/audio/oal/channel.h
+++ b/src/audio/oal/channel.h
@@ -19,7 +19,11 @@ class CChannel
float Distances[2];
int32 LoopCount;
ALint LoopPoints[2];
+ ALint LastProcessedOffset;
+ bool bIs2D;
public:
+ static int32 channelsThatNeedService;
+
static void InitChannels();
static void DestroyChannels();
@@ -37,7 +41,7 @@ public:
void SetVolume(int32 vol);
void SetSampleData(void *_data, size_t _DataSize, int32 freq);
void SetCurrentFreq(uint32 freq);
- void SetLoopCount(int32 loopCount); // fake
+ void SetLoopCount(int32 count);
void SetLoopPoints(ALint start, ALint end);
void SetPosition(float x, float y, float z);
void SetDistances(float max, float min);
@@ -45,6 +49,7 @@ public:
void ClearBuffer();
void SetReverbMix(ALuint slot, float mix);
void UpdateReverb(ALuint slot);
+ bool Update();
};
#endif
\ No newline at end of file
diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp
index 7f3f067e..01cddf17 100644
--- a/src/audio/oal/stream.cpp
+++ b/src/audio/oal/stream.cpp
@@ -1,12 +1,8 @@
#include "common.h"
#ifdef AUDIO_OAL
-#include "stream.h"
-#include "sampman.h"
-#include
-#include
-#if defined _MSC_VER && !defined RE3_NO_AUTOLINK
+#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK
#ifdef AUDIO_OAL_USE_SNDFILE
#pragma comment( lib, "libsndfile-1.lib" )
#endif
@@ -28,6 +24,29 @@
#include
#endif
+#include
+#include
+
+#ifdef MULTITHREADED_AUDIO
+#include
+#include
+#include
+#include
+#include "MusicManager.h"
+#include "stream.h"
+
+std::thread gAudioThread;
+std::mutex gAudioThreadQueueMutex;
+std::condition_variable gAudioThreadCv;
+bool gAudioThreadTerm = false;
+std::queue gStreamsToProcess; // values are not unique, we will handle that ourself
+std::queue> gStreamsToClose;
+#else
+#include "stream.h"
+#endif
+
+#include "sampman.h"
+
#ifndef _WIN32
#include "crossplatform.h"
#endif
@@ -45,6 +64,10 @@ class CSortStereoBuffer
{
uint16* PcmBuf;
size_t BufSize;
+//#ifdef MULTITHREADED_AUDIO
+// std::mutex Mutex;
+//#endif
+
public:
CSortStereoBuffer() : PcmBuf(nil), BufSize(0) {}
~CSortStereoBuffer()
@@ -71,6 +94,9 @@ public:
void SortStereo(void* buf, size_t size)
{
+//#ifdef MULTITHREADED_AUDIO
+// std::lock_guard lock(Mutex);
+//#endif
uint16* InBuf = (uint16*)buf;
uint16* OutBuf = GetBuffer(size);
@@ -140,7 +166,7 @@ public:
else
StepIndex--;
- StepIndex = clamp(StepIndex, 0, 88);
+ StepIndex = Clamp(StepIndex, 0, 88);
int delta = step >> 3;
if (adpcm & 1) delta += step >> 2;
@@ -149,7 +175,7 @@ public:
if (adpcm & 8) delta = -delta;
int newSample = Sample + delta;
- Sample = clamp(newSample, -32768, 32767);
+ Sample = Clamp(newSample, -32768, 32767);
return Sample;
}
};
@@ -285,6 +311,10 @@ public:
#undef CLOSE_ON_ERROR
}
+ void FileOpen()
+ {
+ }
+
~CWavFile()
{
Close();
@@ -295,6 +325,7 @@ public:
return m_bIsOpen;
}
+
uint32 GetSampleSize()
{
return sizeof(uint16);
@@ -466,6 +497,10 @@ public:
m_pfSound = sf_open_virtual(&vio, SFM_READ, &m_soundInfo, m_fileHandle);
}
+ void FileOpen()
+ {
+ }
+
~CSndFile()
{
if ( m_pfSound )
@@ -644,70 +679,75 @@ public:
#endif
#ifdef AUDIO_OAL_USE_MPG123
-// fuzzy seek eliminates stutter when playing ADF but spams errors a lot (nothing breaks though)
-#define MP3_USE_FUZZY_SEEK
-static ssize_t mpg123_read_replacement(void* handle, void* data, size_t size)
-{
- return fread(data, 1, size, (FILE*)handle);
-}
-
-static off_t mpg123_seek_replacement(void* handle, off_t offset, int whence)
-{
- fseek((FILE*)handle, offset, whence);
- return ftell((FILE*)handle);
-}
class CMP3File : public IDecoder
{
+protected:
mpg123_handle *m_pMH;
bool m_bOpened;
uint32 m_nRate;
uint32 m_nChannels;
- FILE* m_fileHandle;
+ const char* m_pPath;
+ bool m_bFileNotOpenedYet;
char* m_buffer;
+
+ CMP3File() :
+ m_pMH(nil),
+ m_bOpened(false),
+ m_nRate(0),
+ m_bFileNotOpenedYet(false),
+ m_nChannels(0),
+ m_buffer(NULL) {}
public:
CMP3File(const char *path) :
m_pMH(nil),
m_bOpened(false),
m_nRate(0),
m_nChannels(0),
- m_fileHandle(NULL),
+ m_pPath(path),
+ m_bFileNotOpenedYet(false),
m_buffer(NULL)
{
m_pMH = mpg123_new(nil, nil);
if ( m_pMH )
{
-#ifdef MP3_USE_FUZZY_SEEK
- mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
+ mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0);
+
+ m_bOpened = true;
+ m_bFileNotOpenedYet = true;
+ // It's possible to move this to audioFileOpsThread(), but effect isn't noticable + probably not compatible with our current cutscene audio handling
+#if 1
+ FileOpen();
#endif
- long rate = 0;
- int channels = 0;
- int encoding = 0;
-
- m_buffer = (char*) memalign(0x40, IO_BUFFER_SIZE);
-
- m_fileHandle = fopen(path, "rb");
- if (!m_fileHandle) {
- m_bOpened = false;
- return;
- }
-
- setvbuf(m_fileHandle, m_buffer, _IOFBF, IO_BUFFER_SIZE);
-
- m_bOpened = mpg123_replace_reader_handle(m_pMH, mpg123_read_replacement, mpg123_seek_replacement, NULL) == MPG123_OK
- && mpg123_open_handle(m_pMH, m_fileHandle) == MPG123_OK
- && mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK;
- m_nRate = rate;
- m_nChannels = channels;
-
- if ( IsOpened() )
- {
- mpg123_format_none(m_pMH);
- mpg123_format(m_pMH, rate, channels, encoding);
- }
}
}
+ void FileOpen()
+ {
+ if(!m_bFileNotOpenedYet) return;
+
+ FILE* f = fopen(m_pPath, "rb");
+
+ m_buffer = (char*) memalign(0x40, IO_BUFFER_SIZE);
+ setvbuf(f, m_buffer, _IOFBF, IO_BUFFER_SIZE);
+
+ long rate = 0;
+ int channels = 0;
+ int encoding = 0;
+ m_bOpened = mpg123_replace_reader_handle(m_pMH, mpg123_read_replacement, mpg123_seek_replacement, mpg123_close_replacement) == MPG123_OK
+ && mpg123_open_handle(m_pMH, f) == MPG123_OK
+ && mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK;
+
+ m_nRate = rate;
+ m_nChannels = channels;
+
+ if(IsOpened()) {
+ mpg123_format_none(m_pMH);
+ mpg123_format(m_pMH, rate, channels, encoding);
+ }
+ m_bFileNotOpenedYet = false;
+ }
+
~CMP3File()
{
if ( m_pMH )
@@ -715,9 +755,6 @@ public:
mpg123_close(m_pMH);
mpg123_delete(m_pMH);
- if (m_fileHandle) {
- fclose(m_fileHandle);
- }
free(m_buffer);
m_pMH = nil;
@@ -736,7 +773,7 @@ public:
uint32 GetSampleCount()
{
- if ( !IsOpened() ) return 0;
+ if ( !IsOpened() || m_bFileNotOpenedYet ) return 0;
return mpg123_length(m_pMH);
}
@@ -752,19 +789,19 @@ public:
void Seek(uint32 milliseconds)
{
- if ( !IsOpened() ) return;
+ if ( !IsOpened() || m_bFileNotOpenedYet ) return;
mpg123_seek(m_pMH, ms2samples(milliseconds), SEEK_SET);
}
uint32 Tell()
{
- if ( !IsOpened() ) return 0;
+ if ( !IsOpened() || m_bFileNotOpenedYet ) return 0;
return samples2ms(mpg123_tell(m_pMH));
}
uint32 Decode(void *buffer)
{
- if ( !IsOpened() ) return 0;
+ if ( !IsOpened() || m_bFileNotOpenedYet ) return 0;
size_t size;
int err = mpg123_read(m_pMH, (unsigned char *)buffer, GetBufferSize(), &size);
@@ -806,7 +843,7 @@ public:
static short quantize(double sample)
{
int a = int(sample + 0.5);
- return short(clamp(a, -32768, 32767));
+ return short(Clamp(a, -32768, 32767));
}
void Decode(void* _inbuf, int16* _outbuf, size_t size)
@@ -895,6 +932,10 @@ public:
m_ppVagBuffers[i] = new uint8[VB_BLOCK_SIZE];
}
+ void FileOpen()
+ {
+ }
+
~CVbFile()
{
if (m_pFile)
@@ -1047,6 +1088,10 @@ public:
m_bOpened = true;
}
}
+
+ void FileOpen()
+ {
+ }
~COpusFile()
{
@@ -1112,11 +1157,173 @@ public:
};
#endif
+
+// For multi-thread: Someone always acquire stream's mutex before entering here
+void
+CStream::BuffersShouldBeFilled()
+{
+#ifdef MULTITHREADED_AUDIO
+ if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
+ std::queue> tempQueue;
+ for(int i = 0; i < NUM_STREAMBUFFERS / 2; i++) {
+ tempQueue.push(std::pair(m_alBuffers[i * 2], m_alBuffers[i * 2 + 1]));
+ }
+ m_fillBuffers.swap(tempQueue);
+
+ FlagAsToBeProcessed();
+
+ m_bActive = true; // to allow Update() to queue the filled buffers & play
+ return;
+ }
+ std::queue>().swap(m_fillBuffers);
+#endif
+ if ( FillBuffers() != 0 )
+ {
+ SetPlay(true);
+ }
+}
+
+// returns whether it's queued (not on multi-thread)
+bool
+CStream::BufferShouldBeFilledAndQueued(std::pair* bufs)
+{
+#ifdef MULTITHREADED_AUDIO
+ if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE)
+ m_fillBuffers.push(*bufs);
+ else
+#endif
+ {
+ ALuint alBuffers[2] = {(*bufs).first, (*bufs).second}; // left - right
+ if (FillBuffer(alBuffers)) {
+ alSourceQueueBuffers(m_pAlSources[0], 1, &alBuffers[0]);
+ alSourceQueueBuffers(m_pAlSources[1], 1, &alBuffers[1]);
+ return true;
+ }
+ }
+ return false;
+}
+
+#ifdef MULTITHREADED_AUDIO
+void
+CStream::FlagAsToBeProcessed(bool close)
+{
+ if (!close && MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE)
+ return;
+
+ gAudioThreadQueueMutex.lock();
+ if (close)
+ gStreamsToClose.push(std::pair(m_pSoundFile ? m_pSoundFile : nil, m_pBuffer ? m_pBuffer : nil));
+ else
+ gStreamsToProcess.push(this);
+
+ gAudioThreadQueueMutex.unlock();
+
+ gAudioThreadCv.notify_one();
+}
+
+void audioFileOpsThread()
+{
+ do
+ {
+ CStream *stream;
+ {
+ // Just a semaphore
+ std::unique_lock queueMutex(gAudioThreadQueueMutex);
+ gAudioThreadCv.wait(queueMutex, [] { return gStreamsToProcess.size() > 0 || gStreamsToClose.size() > 0 || gAudioThreadTerm; });
+ if (gAudioThreadTerm)
+ return;
+
+ if (!gStreamsToClose.empty()) {
+ auto streamToClose = gStreamsToClose.front();
+ gStreamsToClose.pop();
+ if (streamToClose.first) { // pSoundFile
+ delete streamToClose.first;
+ }
+
+ if (streamToClose.second) { // pBuffer
+ free(streamToClose.second);
+ }
+ }
+
+ if (!gStreamsToProcess.empty()) {
+ stream = gStreamsToProcess.front();
+ gStreamsToProcess.pop();
+ } else
+ continue;
+ }
+
+ std::unique_lock lock(stream->m_mutex);
+
+ std::pair buffers, *lastBufAddr;
+ bool insertBufsAfterCheck = false;
+
+ do {
+ if (!stream->IsOpened()) {
+ break;
+ }
+
+ if (stream->m_bReset)
+ break;
+
+ // We gave up this idea for now
+ /*
+ stream->m_pSoundFile->FileOpen();
+
+ // Deffered allocation, do it now
+ if (stream->m_pBuffer == nil) {
+ stream->m_pBuffer = malloc(stream->m_pSoundFile->GetBufferSize());
+ ASSERT(stream->m_pBuffer != nil);
+ }
+ */
+
+ if (stream->m_bDoSeek) {
+ stream->m_bDoSeek = false;
+ int pos = stream->m_SeekPos;
+ lock.unlock();
+ stream->m_pSoundFile->Seek(pos);
+ lock.lock();
+
+ continue; // let's do the checks again, make sure we didn't miss anything while Seeking
+ }
+
+ if (insertBufsAfterCheck) {
+ stream->m_queueBuffers.push(buffers);
+ insertBufsAfterCheck = false;
+ }
+
+ if (!stream->m_fillBuffers.empty()) {
+ lastBufAddr = &stream->m_fillBuffers.front();
+ buffers = *lastBufAddr;
+ lock.unlock();
+
+ ALuint alBuffers[2] = {buffers.first, buffers.second}; // left - right
+ bool filled = stream->FillBuffer(alBuffers);
+
+ lock.lock();
+
+ // Make sure queue isn't touched after we released mutex
+ if (!stream->m_fillBuffers.empty() && lastBufAddr == &stream->m_fillBuffers.front()) {
+ stream->m_fillBuffers.pop();
+ if (filled)
+ insertBufsAfterCheck = true; // Also make sure stream's properties aren't changed. So make one more pass, and push it to m_queueBuffers only if it pass checks again.
+ }
+ } else
+ break;
+
+ } while (true);
+
+ } while(true);
+}
+#endif
+
void CStream::Initialise()
{
#ifdef AUDIO_OAL_USE_MPG123
mpg123_init();
#endif
+#ifdef MULTITHREADED_AUDIO
+ gAudioThread = std::thread(audioFileOpsThread);
+#endif
}
void CStream::Terminate()
@@ -1124,21 +1331,56 @@ void CStream::Terminate()
#ifdef AUDIO_OAL_USE_MPG123
mpg123_exit();
#endif
+#ifdef MULTITHREADED_AUDIO
+ gAudioThreadQueueMutex.lock();
+ gAudioThreadTerm = true;
+ gAudioThreadQueueMutex.unlock();
+
+ gAudioThreadCv.notify_one();
+ gAudioThread.join();
+#endif
}
-CStream::CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS], uint32 overrideSampleRate) :
+CStream::CStream(ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS]) :
m_pAlSources(sources),
m_alBuffers(buffers),
m_pBuffer(nil),
m_bPaused(false),
m_bActive(false),
+#ifdef MULTITHREADED_AUDIO
+ m_bIExist(false),
+ m_bDoSeek(false),
+ m_SeekPos(0),
+#endif
m_pSoundFile(nil),
m_bReset(false),
m_nVolume(0),
m_nPan(0),
- m_nPosBeforeReset(0)
+ m_nPosBeforeReset(0),
+ m_nLoopCount(1)
{
+}
+
+bool CStream::Open(const char* filename, uint32 overrideSampleRate)
+{
+ if (IsOpened()) return false;
+
+#ifdef MULTITHREADED_AUDIO
+ std::unique_lock lock(m_mutex);
+
+ m_bDoSeek = false;
+ m_SeekPos = 0;
+#endif
+
+ m_bPaused = false;
+ m_bActive = false;
+ m_bReset = false;
+ m_nVolume = 0;
+ m_nPan = 0;
+ m_nPosBeforeReset = 0;
+ m_nLoopCount = 1;
+
// Be case-insensitive on linux (from https://github.com/OneSadCookie/fcaseopen/)
#if !defined(_WIN32)
char *real = casepath(filename);
@@ -1175,44 +1417,67 @@ CStream::CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBU
else
m_pSoundFile = nil;
- if ( IsOpened() )
+ if ( m_pSoundFile && m_pSoundFile->IsOpened() )
{
- m_pBuffer = malloc(m_pSoundFile->GetBufferSize());
- ASSERT(m_pBuffer!=nil);
-
- DEV("AvgSamplesPerSec: %d\n", m_pSoundFile->GetAvgSamplesPerSec());
- DEV("SampleCount: %d\n", m_pSoundFile->GetSampleCount());
- DEV("SampleRate: %d\n", m_pSoundFile->GetSampleRate());
- DEV("Channels: %d\n", m_pSoundFile->GetChannels());
- DEV("Buffer Samples: %d\n", m_pSoundFile->GetBufferSamples());
- DEV("Buffer sec: %f\n", (float(m_pSoundFile->GetBufferSamples()) / float(m_pSoundFile->GetChannels())/ float(m_pSoundFile->GetSampleRate())));
- DEV("Length MS: %02d:%02d\n", (m_pSoundFile->GetLength() / 1000) / 60, (m_pSoundFile->GetLength() / 1000) % 60);
-
- return;
+ uint32 bufSize = m_pSoundFile->GetBufferSize();
+ if(bufSize != 0) { // Otherwise it's deferred
+ m_pBuffer = malloc(bufSize);
+ ASSERT(m_pBuffer != nil);
+
+ DEV("AvgSamplesPerSec: %d\n", m_pSoundFile->GetAvgSamplesPerSec());
+ DEV("SampleCount: %d\n", m_pSoundFile->GetSampleCount());
+ DEV("SampleRate: %d\n", m_pSoundFile->GetSampleRate());
+ DEV("Channels: %d\n", m_pSoundFile->GetChannels());
+ DEV("Buffer Samples: %d\n", m_pSoundFile->GetBufferSamples());
+ DEV("Buffer sec: %f\n", (float(m_pSoundFile->GetBufferSamples()) / float(m_pSoundFile->GetChannels())/ float(m_pSoundFile->GetSampleRate())));
+ DEV("Length MS: %02d:%02d\n", (m_pSoundFile->GetLength() / 1000) / 60, (m_pSoundFile->GetLength() / 1000) % 60);
+ }
+#ifdef MULTITHREADED_AUDIO
+ m_bIExist = true;
+#endif
+ return true;
}
+ return false;
}
CStream::~CStream()
{
- Delete();
+ assert(!IsOpened());
}
-void CStream::Delete()
+void CStream::Close()
{
+ if(!IsOpened()) return;
+
+#ifdef MULTITHREADED_AUDIO
+ {
+ std::lock_guard lock(m_mutex);
+
+ Stop();
+ ClearBuffers();
+ m_bIExist = false;
+ std::queue>().swap(m_fillBuffers);
+ tsQueue>().swapNts(m_queueBuffers); // TSness not required, mutex is acquired
+ }
+
+ FlagAsToBeProcessed(true);
+#else
+
Stop();
ClearBuffers();
-
+
if ( m_pSoundFile )
{
delete m_pSoundFile;
m_pSoundFile = nil;
}
-
+
if ( m_pBuffer )
{
free(m_pBuffer);
m_pBuffer = nil;
}
+#endif
}
bool CStream::HasSource()
@@ -1220,9 +1485,14 @@ bool CStream::HasSource()
return (m_pAlSources[0] != AL_NONE) && (m_pAlSources[1] != AL_NONE);
}
+// m_bIExist only written in main thread, thus mutex is not needed on main thread
bool CStream::IsOpened()
{
+#ifdef MULTITHREADED_AUDIO
+ return m_bIExist;
+#else
return m_pSoundFile && m_pSoundFile->IsOpened();
+#endif
}
bool CStream::IsPlaying()
@@ -1234,8 +1504,16 @@ bool CStream::IsPlaying()
ALint sourceState[2];
alGetSourcei(m_pAlSources[0], AL_SOURCE_STATE, &sourceState[0]);
alGetSourcei(m_pAlSources[1], AL_SOURCE_STATE, &sourceState[1]);
- if ( m_bActive || sourceState[0] == AL_PLAYING || sourceState[1] == AL_PLAYING)
+ if (sourceState[0] == AL_PLAYING || sourceState[1] == AL_PLAYING)
return true;
+
+#ifdef MULTITHREADED_AUDIO
+ std::lock_guard lock(m_mutex);
+
+ // Streams are designed in such a way that m_fillBuffers and m_queueBuffers will be *always* filled if audio is playing, and mutex is acquired
+ if (!m_fillBuffers.empty() || !m_queueBuffers.emptyNts())
+ return true;
+#endif
}
return false;
@@ -1297,20 +1575,37 @@ void CStream::SetVolume(uint32 nVol)
void CStream::SetPan(uint8 nPan)
{
- m_nPan = clamp((int8)nPan - 63, 0, 63);
+ m_nPan = Clamp((int8)nPan - 63, 0, 63);
SetPosition(0, (m_nPan - 63) / 64.0f, 0.0f, Sqrt(1.0f - SQR((m_nPan - 63) / 64.0f)));
- m_nPan = clamp((int8)nPan + 64, 64, 127);
+ m_nPan = Clamp((int8)nPan + 64, 64, 127);
SetPosition(1, (m_nPan - 63) / 64.0f, 0.0f, Sqrt(1.0f - SQR((m_nPan - 63) / 64.0f)));
m_nPan = nPan;
}
+// Should only be called if source is stopped
void CStream::SetPosMS(uint32 nPos)
{
if ( !IsOpened() ) return;
- m_pSoundFile->Seek(nPos);
+
+#ifdef MULTITHREADED_AUDIO
+ std::lock_guard lock(m_mutex);
+
+ std::queue>().swap(m_fillBuffers);
+ tsQueue>().swapNts(m_queueBuffers); // TSness not required, second thread always access it when stream mutex acquired
+
+ if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
+ m_bDoSeek = true;
+ m_SeekPos = nPos;
+ } else
+#endif
+ {
+ m_pSoundFile->Seek(nPos);
+ }
ClearBuffers();
+
+ // adding to gStreamsToProcess not needed, someone always calls Start() / BuffersShouldBeFilled() after SetPosMS
}
uint32 CStream::GetPosMS()
@@ -1318,10 +1613,16 @@ uint32 CStream::GetPosMS()
if ( !HasSource() ) return 0;
if ( !IsOpened() ) return 0;
+ // Deferred init causes division by zero
+ if (m_pSoundFile->GetChannels() == 0)
+ return 0;
+
ALint offset;
//alGetSourcei(m_alSource, AL_SAMPLE_OFFSET, &offset);
alGetSourcei(m_pAlSources[0], AL_BYTE_OFFSET, &offset);
+ //std::lock_guard lock(m_mutex);
+
return m_pSoundFile->Tell()
- m_pSoundFile->samples2ms(m_pSoundFile->GetBufferSamples() * (NUM_STREAMBUFFERS/2-1)) / m_pSoundFile->GetChannels()
+ m_pSoundFile->samples2ms(offset/m_pSoundFile->GetSampleSize()) / m_pSoundFile->GetChannels();
@@ -1335,6 +1636,7 @@ uint32 CStream::GetLengthMS()
bool CStream::FillBuffer(ALuint *alBuffer)
{
+#ifndef MULTITHREADED_AUDIO
if ( !HasSource() )
return false;
if ( !IsOpened() )
@@ -1343,7 +1645,8 @@ bool CStream::FillBuffer(ALuint *alBuffer)
return false;
if ( !(alBuffer[1] != AL_NONE && alIsBuffer(alBuffer[1])) )
return false;
-
+#endif
+
uint32 size = m_pSoundFile->Decode(m_pBuffer);
if( size == 0 )
return false;
@@ -1359,6 +1662,26 @@ bool CStream::FillBuffer(ALuint *alBuffer)
return true;
}
+#ifdef MULTITHREADED_AUDIO
+bool CStream::QueueBuffers()
+{
+ bool buffersQueued = false;
+ std::pair buffers;
+ while (m_queueBuffers.peekPop(&buffers)) // beware: m_queueBuffers is tsQueue
+ {
+ ALuint leftBuf = buffers.first;
+ ALuint rightBuf = buffers.second;
+
+ alSourceQueueBuffers(m_pAlSources[0], 1, &leftBuf);
+ alSourceQueueBuffers(m_pAlSources[1], 1, &rightBuf);
+
+ buffersQueued = true;
+ }
+ return buffersQueued;
+}
+#endif
+
+// Only used in single-threaded audio or cutscene audio
int32 CStream::FillBuffers()
{
int32 i = 0;
@@ -1388,11 +1711,33 @@ void CStream::ClearBuffers()
alSourceUnqueueBuffers(m_pAlSources[1], 1, &value);
}
-bool CStream::Setup()
+bool CStream::Setup(bool imSureQueueIsEmpty, bool lock)
{
if ( IsOpened() )
{
+#ifdef MULTITHREADED_AUDIO
+ if (lock)
+ m_mutex.lock();
+#endif
+
+ if (!imSureQueueIsEmpty) {
+ Stop();
+ ClearBuffers();
+ }
+#ifdef MULTITHREADED_AUDIO
+ if (MusicManager.m_nMusicMode == MUSICMODE_CUTSCENE) {
+ m_pSoundFile->Seek(0);
+ } else {
+ m_bDoSeek = true;
+ m_SeekPos = 0;
+ }
+
+ if (lock)
+ m_mutex.unlock();
+#else
m_pSoundFile->Seek(0);
+#endif
+
//SetPosition(0.0f, 0.0f, 0.0f);
SetPitch(1.0f);
//SetPan(m_nPan);
@@ -1402,6 +1747,13 @@ bool CStream::Setup()
return IsOpened();
}
+void CStream::SetLoopCount(int32 count)
+{
+ if ( !HasSource() ) return;
+
+ m_nLoopCount = count;
+}
+
void CStream::SetPlay(bool state)
{
if ( !HasSource() ) return;
@@ -1438,8 +1790,12 @@ void CStream::SetPlay(bool state)
void CStream::Start()
{
if ( !HasSource() ) return;
- if ( FillBuffers() != 0 )
- SetPlay(true);
+
+#ifdef MULTITHREADED_AUDIO
+ std::lock_guard lock(m_mutex);
+ tsQueue>().swapNts(m_queueBuffers); // TSness not required, second thread always access it when stream mutex acquired
+#endif
+ BuffersShouldBeFilled();
}
void CStream::Stop()
@@ -1461,52 +1817,95 @@ void CStream::Update()
if ( !m_bPaused )
{
- ALint sourceState[2];
- ALint buffersProcessed[2] = { 0, 0 };
+ bool buffersQueuedAndStarted = false;
+ bool buffersQueuedButNotStarted = false;
+#ifdef MULTITHREADED_AUDIO
+ // Put it in here because we need totalBuffers after queueing to decide when to loop audio
+ if (m_bActive)
+ {
+ buffersQueuedAndStarted = QueueBuffers();
+ if(buffersQueuedAndStarted) {
+ SetPlay(true);
+ }
+ }
+#endif
+
+ ALint totalBuffers[2] = {0, 0};
+ ALint buffersProcessed[2] = {0, 0};
+
// Relying a lot on left buffer states in here
do
{
//alSourcef(m_pAlSources[0], AL_ROLLOFF_FACTOR, 0.0f);
- alGetSourcei(m_pAlSources[0], AL_SOURCE_STATE, &sourceState[0]);
+ alGetSourcei(m_pAlSources[0], AL_BUFFERS_QUEUED, &totalBuffers[0]);
alGetSourcei(m_pAlSources[0], AL_BUFFERS_PROCESSED, &buffersProcessed[0]);
//alSourcef(m_pAlSources[1], AL_ROLLOFF_FACTOR, 0.0f);
- alGetSourcei(m_pAlSources[1], AL_SOURCE_STATE, &sourceState[1]);
+ alGetSourcei(m_pAlSources[1], AL_BUFFERS_QUEUED, &totalBuffers[1]);
alGetSourcei(m_pAlSources[1], AL_BUFFERS_PROCESSED, &buffersProcessed[1]);
} while (buffersProcessed[0] != buffersProcessed[1]);
-
- ALint looping = AL_FALSE;
- alGetSourcei(m_pAlSources[0], AL_LOOPING, &looping);
-
- if ( looping == AL_TRUE )
- {
- TRACE("stream set looping");
- alSourcei(m_pAlSources[0], AL_LOOPING, AL_TRUE);
- alSourcei(m_pAlSources[1], AL_LOOPING, AL_TRUE);
- }
assert(buffersProcessed[0] == buffersProcessed[1]);
+
+ // Correcting OpenAL concepts here:
+ // AL_BUFFERS_QUEUED = Number of *all* buffers in queue, including processed, processing and pending
+ // AL_BUFFERS_PROCESSED = Index of the buffer being processing right now. Buffers coming after that(have greater index) are pending buffers.
+ // which means: totalBuffers[0] - buffersProcessed[0] = pending buffers
- while( buffersProcessed[0]-- )
+ // We should wait queue to be cleared to loop track, because position calculation relies on queue.
+ if (m_nLoopCount != 1 && m_bActive && totalBuffers[0] == 0)
{
- ALuint buffer[2];
-
- alSourceUnqueueBuffers(m_pAlSources[0], 1, &buffer[0]);
- alSourceUnqueueBuffers(m_pAlSources[1], 1, &buffer[1]);
-
- if (m_bActive && FillBuffer(buffer))
+#ifdef MULTITHREADED_AUDIO
+ std::lock_guard lock(m_mutex);
+
+ if (m_fillBuffers.empty() && m_queueBuffers.emptyNts()) // we already acquired stream mutex, which is enough for second thread. thus Nts variant
+#endif
{
- alSourceQueueBuffers(m_pAlSources[0], 1, &buffer[0]);
- alSourceQueueBuffers(m_pAlSources[1], 1, &buffer[1]);
+ Setup(true, false);
+ BuffersShouldBeFilled(); // will also call SetPlay(true)
+ if (m_nLoopCount != 0)
+ m_nLoopCount--;
}
}
-
- if ( sourceState[0] != AL_PLAYING )
+ else
{
- alGetSourcei(m_pAlSources[0], AL_BUFFERS_PROCESSED, &buffersProcessed[0]);
- SetPlay(buffersProcessed[0]!=0);
+ static std::queue> tempFillBuffer;
+
+ while ( buffersProcessed[0]-- )
+ {
+ ALuint buffer[2];
+
+ alSourceUnqueueBuffers(m_pAlSources[0], 1, &buffer[0]);
+ alSourceUnqueueBuffers(m_pAlSources[1], 1, &buffer[1]);
+
+ if (m_bActive)
+ {
+ tempFillBuffer.push(std::pair(buffer[0], buffer[1]));
+ }
+ }
+
+ if (m_bActive && buffersProcessed[1])
+ {
+#ifdef MULTITHREADED_AUDIO
+ m_mutex.lock();
+#endif
+ while (!tempFillBuffer.empty()) {
+ auto elem = tempFillBuffer.front();
+ tempFillBuffer.pop();
+ buffersQueuedButNotStarted = BufferShouldBeFilledAndQueued(&elem);
+ }
+#ifdef MULTITHREADED_AUDIO
+ m_mutex.unlock();
+ FlagAsToBeProcessed();
+#endif
+
+ }
}
+
+ // Source may be starved to audio and stopped itself
+ if (m_bActive && !buffersQueuedAndStarted && (buffersQueuedButNotStarted || (totalBuffers[1] - buffersProcessed[1] != 0)))
+ SetPlay(true);
}
}
@@ -1514,27 +1913,45 @@ void CStream::ProviderInit()
{
if ( m_bReset )
{
- if ( Setup() )
+ if ( Setup(true, false) ) // lock not needed, thread can't process streams with m_bReset set
{
SetPan(m_nPan);
SetVolume(m_nVolume);
+ SetLoopCount(m_nLoopCount);
SetPosMS(m_nPosBeforeReset);
- if (m_bActive)
- FillBuffers();
- SetPlay(m_bActive);
- if ( m_bPaused )
+#ifdef MULTITHREADED_AUDIO
+ std::unique_lock lock(m_mutex);
+#endif
+ if(m_bActive)
+ BuffersShouldBeFilled();
+
+ if (m_bPaused)
Pause();
+
+ m_bReset = false;
+
+ } else {
+#ifdef MULTITHREADED_AUDIO
+ std::unique_lock lock(m_mutex);
+#endif
+ m_bReset = false;
}
-
- m_bReset = false;
}
}
void CStream::ProviderTerm()
{
+#ifdef MULTITHREADED_AUDIO
+ std::lock_guard lock(m_mutex);
+
+ // unlike Close() we will reuse this stream, so clearing queues are important.
+ std::queue>().swap(m_fillBuffers);
+ tsQueue>().swapNts(m_queueBuffers); // stream mutex is already acquired, thus Nts variant
+#endif
m_bReset = true;
m_nPosBeforeReset = GetPosMS();
-
+
+ Stop();
ClearBuffers();
}
diff --git a/src/audio/oal/stream.h b/src/audio/oal/stream.h
index bcbc5e54..f0456925 100644
--- a/src/audio/oal/stream.h
+++ b/src/audio/oal/stream.h
@@ -11,6 +11,7 @@ public:
virtual ~IDecoder() { }
virtual bool IsOpened() = 0;
+ virtual void FileOpen() = 0;
virtual uint32 GetSampleSize() = 0;
virtual uint32 GetSampleCount() = 0;
@@ -48,12 +49,70 @@ public:
uint32 GetLength()
{
+ FileOpen(); // abort deferred init, we need length now - game has to cache audio file sizes
return float(GetSampleCount()) * 1000.0f / float(GetSampleRate());
}
virtual uint32 Decode(void *buffer) = 0;
};
+#ifdef MULTITHREADED_AUDIO
+template class tsQueue
+{
+public:
+ tsQueue() : count(0) { }
+
+ void push(const T &value)
+ {
+ std::lock_guard lock(m_mutex);
+ m_queue.push(value);
+ count++;
+ }
+ bool peekPop(T *retVal)
+ {
+ std::lock_guard lock(m_mutex);
+ if (count == 0)
+ return false;
+
+ *retVal = m_queue.front();
+ m_queue.pop();
+ count--;
+ return true;
+ }
+
+ void swapNts(tsQueue &replaceWith)
+ {
+ m_queue.swap(replaceWith.m_queue);
+ replaceWith.count = count;
+ }
+
+ /*
+ void swapTs(tsQueue &replaceWith)
+ {
+ std::lock_guard lock(m_mutex);
+ std::lock_guard lock2(replaceWith.m_mutex);
+ swapNts(replaceWith);
+ }
+ */
+
+ bool emptyNts()
+ {
+ return count == 0;
+ }
+
+ /*
+ bool emptyTs()
+ {
+ std::lock_guard lock(m_mutex);
+ return emptyNts();
+ }
+ */
+
+ std::queue m_queue;
+ int count;
+ mutable std::mutex m_mutex;
+};
+#endif
class CStream
{
char m_aFilename[128];
@@ -63,15 +122,34 @@ class CStream
bool m_bPaused;
bool m_bActive;
+public:
+#ifdef MULTITHREADED_AUDIO
+ std::mutex m_mutex;
+ std::queue> m_fillBuffers; // left and right buffer
+ tsQueue> m_queueBuffers;
+// std::condition_variable m_closeCv;
+ bool m_bDoSeek;
+ uint32 m_SeekPos;
+ bool m_bIExist;
+#endif
+
void *m_pBuffer;
bool m_bReset;
uint32 m_nVolume;
uint8 m_nPan;
uint32 m_nPosBeforeReset;
+ int32 m_nLoopCount;
IDecoder *m_pSoundFile;
-
+
+ void BuffersShouldBeFilled(); // all
+ bool BufferShouldBeFilledAndQueued(std::pair*); // two (left-right)
+#ifdef MULTITHREADED_AUDIO
+ void FlagAsToBeProcessed(bool close = false);
+ bool QueueBuffers();
+#endif
+
bool HasSource();
void SetPosition(int i, float x, float y, float z);
void SetPitch(float pitch);
@@ -80,15 +158,17 @@ class CStream
void SetPlay(bool state);
bool FillBuffer(ALuint *alBuffer);
- int32 FillBuffers();
+ int32 FillBuffers();
void ClearBuffers();
-public:
+//public:
static void Initialise();
static void Terminate();
- CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS], uint32 overrideSampleRate = 32000);
+ CStream(ALuint *sources, ALuint (&buffers)[NUM_STREAMBUFFERS]);
~CStream();
void Delete();
+ bool Open(const char *filename, uint32 overrideSampleRate = 32000);
+ void Close();
bool IsOpened();
bool IsPlaying();
@@ -99,10 +179,11 @@ public:
uint32 GetPosMS();
uint32 GetLengthMS();
- bool Setup();
+ bool Setup(bool imSureQueueIsEmpty = false, bool lock = true);
void Start();
void Stop();
void Update(void);
+ void SetLoopCount(int32);
void ProviderInit();
void ProviderTerm();
diff --git a/src/audio/sampman.h b/src/audio/sampman.h
index 4521e0c7..a7e36271 100644
--- a/src/audio/sampman.h
+++ b/src/audio/sampman.h
@@ -1,5 +1,6 @@
#pragma once
#include "AudioSamples.h"
+#include "audio_enums.h"
#define MAX_VOLUME 127
#define MAX_FREQ DIGITALRATE
@@ -99,10 +100,15 @@ enum
#define MAXPROVIDERS 64
-#define MAXCHANNELS 28
-#define MAXCHANNELS_SURROUND 24
+#ifdef EXTERNAL_3D_SOUND
+#define MAXCHANNELS (NUM_CHANNELS_GENERIC+1)
+#define MAXCHANNELS_SURROUND (MAXCHANNELS-4)
#define MAX2DCHANNELS 1
-#define CHANNEL2D MAXCHANNELS
+#else
+#define MAXCHANNELS 0
+#define MAXCHANNELS_SURROUND 0
+#define MAX2DCHANNELS NUM_CHANNELS
+#endif
#define MAX_STREAMS 2
@@ -114,7 +120,13 @@ enum
#define DIGITALBITS 16
#define DIGITALCHANNELS 2
-#define MAX_DIGITAL_MIXER_CHANNELS 32
+#ifdef FIX_BUGS
+#define MAX_DIGITAL_MIXER_CHANNELS (MAXCHANNELS+MAX_STREAMS*2+MAX2DCHANNELS)
+#else
+#define MAX_DIGITAL_MIXER_CHANNELS (MAXCHANNELS+MAX_STREAMS*2)
+#endif
+
+static_assert( NUM_CHANNELS == MAXCHANNELS + MAX2DCHANNELS, "The number of channels doesn't match with an enum" );
class cSampleManager
{
@@ -122,10 +134,10 @@ class cSampleManager
uint8 m_nMusicVolume;
uint8 m_nEffectsFadeVolume;
uint8 m_nMusicFadeVolume;
- uint8 m_nMonoMode;
+ bool8 m_nMonoMode;
char unk;
char m_szCDRomRootPath[80];
- bool m_bInitialised;
+ bool8 m_bInitialised;
uint8 m_nNumberOfProviders;
char *m_aAudioProviders[MAXPROVIDERS];
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
@@ -136,7 +148,8 @@ public:
cSampleManager(void);
~cSampleManager(void);
-
+
+#ifdef EXTERNAL_3D_SOUND
void SetSpeakerConfig(int32 nConfig);
uint32 GetMaximumSupportedChannels(void);
@@ -148,17 +161,18 @@ public:
int8 GetCurrent3DProviderIndex(void);
int8 SetCurrent3DProvider(uint8 which);
+#endif
- bool IsMP3RadioChannelAvailable(void);
+ bool8 IsMP3RadioChannelAvailable(void);
void ReleaseDigitalHandle (void);
void ReacquireDigitalHandle(void);
- bool Initialise(void);
- void Terminate (void);
+ bool8 Initialise(void);
+ void Terminate (void);
- bool CheckForAnAudioFileOnCD(void);
- char GetCDAudioDriveLetter (void);
+ bool8 CheckForAnAudioFileOnCD(void);
+ char GetCDAudioDriveLetter (void);
void UpdateEffectsVolume(void);
@@ -166,14 +180,14 @@ public:
void SetMusicMasterVolume (uint8 nVolume);
void SetEffectsFadeVolume (uint8 nVolume);
void SetMusicFadeVolume (uint8 nVolume);
- void SetMonoMode (uint8 nMode);
+ void SetMonoMode (bool8 nMode);
- bool LoadSampleBank (uint8 nBank);
- void UnloadSampleBank (uint8 nBank);
- bool IsSampleBankLoaded(uint8 nBank);
+ bool8 LoadSampleBank (uint8 nBank);
+ void UnloadSampleBank (uint8 nBank);
+ bool8 IsSampleBankLoaded(uint8 nBank);
- bool IsPedCommentLoaded(uint32 nComment);
- bool LoadPedComment (uint32 nComment);
+ bool8 IsPedCommentLoaded(uint32 nComment);
+ bool8 LoadPedComment (uint32 nComment);
int32 GetBankContainingSound(uint32 offset);
int32 _GetPedCommentSlot(uint32 nComment);
@@ -183,35 +197,37 @@ public:
int32 GetSampleLoopEndOffset (uint32 nSample);
uint32 GetSampleLength (uint32 nSample);
- bool UpdateReverb(void);
+ bool8 UpdateReverb(void);
- void SetChannelReverbFlag (uint32 nChannel, uint8 nReverbFlag);
- bool InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
+ void SetChannelReverbFlag (uint32 nChannel, bool8 nReverbFlag);
+ bool8 InitialiseChannel (uint32 nChannel, uint32 nSfx, uint8 nBank);
+#ifdef EXTERNAL_3D_SOUND
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
+#endif
void SetChannelVolume (uint32 nChannel, uint32 nVolume);
void SetChannelPan (uint32 nChannel, uint32 nPan);
void SetChannelFrequency (uint32 nChannel, uint32 nFreq);
void SetChannelLoopPoints (uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd);
void SetChannelLoopCount (uint32 nChannel, uint32 nLoopCount);
- bool GetChannelUsedFlag (uint32 nChannel);
+ bool8 GetChannelUsedFlag (uint32 nChannel);
void StartChannel (uint32 nChannel);
void StopChannel (uint32 nChannel);
- void PreloadStreamedFile (uint8 nFile, uint8 nStream);
- void PauseStream (uint8 nPauseFlag, uint8 nStream);
- void StartPreloadedStreamedFile (uint8 nStream);
- bool StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream);
- void StopStreamedFile (uint8 nStream);
- int32 GetStreamedFilePosition (uint8 nStream);
- void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream);
- int32 GetStreamedFileLength (uint8 nStream);
- bool IsStreamPlaying (uint8 nStream);
+ void PreloadStreamedFile (uint8 nFile, uint8 nStream = 0);
+ void PauseStream (bool8 nPauseFlag, uint8 nStream = 0);
+ void StartPreloadedStreamedFile (uint8 nStream = 0);
+ bool8 StartStreamedFile (uint8 nFile, uint32 nPos, uint8 nStream = 0);
+ void StopStreamedFile (uint8 nStream = 0);
+ int32 GetStreamedFilePosition (uint8 nStream = 0);
+ void SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream = 0);
+ int32 GetStreamedFileLength (uint8 nStream = 0);
+ bool8 IsStreamPlaying (uint8 nStream = 0);
#ifdef AUDIO_OAL
void Service(void);
#endif
- bool InitialiseSampleBanks(void);
+ bool8 InitialiseSampleBanks(void);
};
extern cSampleManager SampleManager;
@@ -257,8 +273,8 @@ static char StreamedNameTable[][25] = {
"AUDIO\\door_2.OPUS", "AUDIO\\door_3.OPUS", "AUDIO\\door_4.OPUS", "AUDIO\\door_5.OPUS", "AUDIO\\door_6.OPUS", "AUDIO\\t3_a.OPUS",
"AUDIO\\t3_b.OPUS", "AUDIO\\t3_c.OPUS", "AUDIO\\k1_b.OPUS", "AUDIO\\cat1.OPUS"};
#else
-#if defined(PS2_AUDIO_PATHS)
-static char StreamedNameTable[][25]=
+#ifdef PS2_AUDIO_PATHS
+static char PS2StreamedNameTable[][25]=
{
"AUDIO\\MUSIC\\HEAD.VB",
"AUDIO\\MUSIC\\CLASS.VB",
@@ -355,7 +371,110 @@ static char StreamedNameTable[][25]=
"AUDIO\\PHONE\\MT_PH4.VB",
"AUDIO\\MUSIC\\MISCOM.VB",
"AUDIO\\MUSIC\\END.VB",
-#else
+ "AUDIO\\lib_a1.WAV",
+ "AUDIO\\lib_a2.WAV",
+ "AUDIO\\lib_a.WAV",
+ "AUDIO\\lib_b.WAV",
+ "AUDIO\\lib_c.WAV",
+ "AUDIO\\lib_d.WAV",
+ "AUDIO\\l2_a.WAV",
+ "AUDIO\\j4t_1.WAV",
+ "AUDIO\\j4t_2.WAV",
+ "AUDIO\\j4t_3.WAV",
+ "AUDIO\\j4t_4.WAV",
+ "AUDIO\\j4_a.WAV",
+ "AUDIO\\j4_b.WAV",
+ "AUDIO\\j4_c.WAV",
+ "AUDIO\\j4_d.WAV",
+ "AUDIO\\j4_e.WAV",
+ "AUDIO\\j4_f.WAV",
+ "AUDIO\\j6_1.WAV",
+ "AUDIO\\j6_a.WAV",
+ "AUDIO\\j6_b.WAV",
+ "AUDIO\\j6_c.WAV",
+ "AUDIO\\j6_d.WAV",
+ "AUDIO\\t4_a.WAV",
+ "AUDIO\\s1_a.WAV",
+ "AUDIO\\s1_a1.WAV",
+ "AUDIO\\s1_b.WAV",
+ "AUDIO\\s1_c.WAV",
+ "AUDIO\\s1_c1.WAV",
+ "AUDIO\\s1_d.WAV",
+ "AUDIO\\s1_e.WAV",
+ "AUDIO\\s1_f.WAV",
+ "AUDIO\\s1_g.WAV",
+ "AUDIO\\s1_h.WAV",
+ "AUDIO\\s1_i.WAV",
+ "AUDIO\\s1_j.WAV",
+ "AUDIO\\s1_k.WAV",
+ "AUDIO\\s1_l.WAV",
+ "AUDIO\\s3_a.WAV",
+ "AUDIO\\s3_b.WAV",
+ "AUDIO\\el3_a.WAV",
+ "AUDIO\\mf1_a.WAV",
+ "AUDIO\\mf2_a.WAV",
+ "AUDIO\\mf3_a.WAV",
+ "AUDIO\\mf3_b.WAV",
+ "AUDIO\\mf3_b1.WAV",
+ "AUDIO\\mf3_c.WAV",
+ "AUDIO\\mf4_a.WAV",
+ "AUDIO\\mf4_b.WAV",
+ "AUDIO\\mf4_c.WAV",
+ "AUDIO\\a1_a.WAV",
+ "AUDIO\\a3_a.WAV",
+ "AUDIO\\a5_a.WAV",
+ "AUDIO\\a4_a.WAV",
+ "AUDIO\\a4_b.WAV",
+ "AUDIO\\a4_c.WAV",
+ "AUDIO\\a4_d.WAV",
+ "AUDIO\\k1_a.WAV",
+ "AUDIO\\k3_a.WAV",
+ "AUDIO\\r1_a.WAV",
+ "AUDIO\\r2_a.WAV",
+ "AUDIO\\r2_b.WAV",
+ "AUDIO\\r2_c.WAV",
+ "AUDIO\\r2_d.WAV",
+ "AUDIO\\r2_e.WAV",
+ "AUDIO\\r2_f.WAV",
+ "AUDIO\\r2_g.WAV",
+ "AUDIO\\r2_h.WAV",
+ "AUDIO\\r5_a.WAV",
+ "AUDIO\\r6_a.WAV",
+ "AUDIO\\r6_a1.WAV",
+ "AUDIO\\r6_b.WAV",
+ "AUDIO\\lo2_a.WAV",
+ "AUDIO\\lo6_a.WAV",
+ "AUDIO\\yd2_a.WAV",
+ "AUDIO\\yd2_b.WAV",
+ "AUDIO\\yd2_c.WAV",
+ "AUDIO\\yd2_c1.WAV",
+ "AUDIO\\yd2_d.WAV",
+ "AUDIO\\yd2_e.WAV",
+ "AUDIO\\yd2_f.WAV",
+ "AUDIO\\yd2_g.WAV",
+ "AUDIO\\yd2_h.WAV",
+ "AUDIO\\yd2_ass.WAV",
+ "AUDIO\\yd2_ok.WAV",
+ "AUDIO\\h5_a.WAV",
+ "AUDIO\\h5_b.WAV",
+ "AUDIO\\h5_c.WAV",
+ "AUDIO\\ammu_a.WAV",
+ "AUDIO\\ammu_b.WAV",
+ "AUDIO\\ammu_c.WAV",
+ "AUDIO\\door_1.WAV",
+ "AUDIO\\door_2.WAV",
+ "AUDIO\\door_3.WAV",
+ "AUDIO\\door_4.WAV",
+ "AUDIO\\door_5.WAV",
+ "AUDIO\\door_6.WAV",
+ "AUDIO\\t3_a.WAV",
+ "AUDIO\\t3_b.WAV",
+ "AUDIO\\t3_c.WAV",
+ "AUDIO\\k1_b.WAV",
+ "AUDIO\\cat1.WAV"
+};
+#endif
+
static char StreamedNameTable[][25] =
{
"AUDIO\\HEAD.WAV",
@@ -453,7 +572,6 @@ static char StreamedNameTable[][25] =
"AUDIO\\MT_PH4.MP3",
"AUDIO\\MISCOM.WAV",
"AUDIO\\END.MP3",
-#endif
"AUDIO\\lib_a1.WAV",
"AUDIO\\lib_a2.WAV",
"AUDIO\\lib_a.WAV",
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 11e2b0ff..71ff00ee 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -1,3 +1,4 @@
+#define WITHWINDOWS
#include "common.h"
#ifdef AUDIO_MSS
@@ -28,7 +29,7 @@ char SampleBankDataFilename[] = "AUDIO\\SFX.RAW";
FILE *fpSampleDescHandle;
FILE *fpSampleDataHandle;
-bool bSampleBankLoaded [MAX_SFX_BANKS];
+bool8 bSampleBankLoaded [MAX_SFX_BANKS];
int32 nSampleBankDiscStartOffset [MAX_SFX_BANKS];
int32 nSampleBankSize [MAX_SFX_BANKS];
int32 nSampleBankMemoryStartAddress[MAX_SFX_BANKS];
@@ -62,17 +63,17 @@ int8 nStreamPan [MAX_STREAMS];
int8 nStreamVolume[MAX_STREAMS];
uint32 _CurMP3Index;
int32 _CurMP3Pos;
-bool _bIsMp3Active;
+bool8 _bIsMp3Active;
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
-bool _bUseHDDAudio;
+bool8 _bUseHDDAudio;
char _aHDDPath[MAX_PATH];
#endif
///////////////////////////////////////////////////////////////
-bool _bSampmanInitialised = false;
-
+bool8 _bSampmanInitialised = FALSE;
+#ifdef EXTERNAL_3D_SOUND
//
// Miscellaneous globals / defines
@@ -92,13 +93,14 @@ S32 usingEAX=0;
S32 usingEAX3=0;
HPROVIDER opened_provider=0;
H3DSAMPLE opened_samples[MAXCHANNELS] = {0};
+#endif
HSAMPLE opened_2dsamples[MAX2DCHANNELS] = {0};
HDIGDRIVER DIG;
+#ifdef EXTERNAL_3D_SOUND
S32 speaker_type=0;
-
U32 _maxSamples;
float _fPrevEaxRatioDestination;
-bool _usingMilesFast2D;
+bool8 _usingMilesFast2D;
float _fEffectsLevel;
@@ -170,17 +172,17 @@ release_existing()
}
_fPrevEaxRatioDestination = 0.0f;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
_fEffectsLevel = 0.0f;
}
-static bool
+static bool8
set_new_provider(S32 index)
{
DWORD result;
if ( curprovider == index )
- return true;
+ return TRUE;
//close the already opened provider
curprovider = index;
@@ -207,7 +209,7 @@ set_new_provider(S32 index)
release_existing();
- return false;
+ return FALSE;
}
else
{
@@ -238,7 +240,7 @@ set_new_provider(S32 index)
AIL_set_3D_room_type(opened_provider, ENVIRONMENT_CAVE);
if ( !strcmp(providers[index].name, "Miles Fast 2D Positional Audio") )
- _usingMilesFast2D = true;
+ _usingMilesFast2D = TRUE;
}
AIL_3D_provider_attribute(opened_provider, "Maximum supported samples", &_maxSamples);
@@ -256,12 +258,13 @@ set_new_provider(S32 index)
AIL_set_3D_sample_effects_level(opened_samples[i], 0.0f);
}
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
+#endif
cSampleManager::cSampleManager(void) :
m_nNumberOfProviders(0)
@@ -274,6 +277,7 @@ cSampleManager::~cSampleManager(void)
}
+#ifdef EXTERNAL_3D_SOUND
void
cSampleManager::SetSpeakerConfig(int32 which)
{
@@ -352,8 +356,9 @@ cSampleManager::SetCurrent3DProvider(uint8 nProvider)
else
return curprovider;
}
+#endif
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
IShellLink* psl;
@@ -389,7 +394,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -399,15 +404,15 @@ _ResolveLink(char const *path, char *out)
psl->Release();
}
- return false;
+ return FALSE;
}
static void
_FindMP3s(void)
{
tMP3Entry *pList;
- bool bShortcut;
- bool bInitFirstEntry;
+ bool8 bShortcut;
+ bool8 bInitFirstEntry;
HANDLE hFind;
char path[MAX_PATH];
char filepath[MAX_PATH*2];
@@ -474,10 +479,10 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - couldn't resolve shortcut");
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
- bShortcut = false;
+ bShortcut = FALSE;
}
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
@@ -524,7 +529,7 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - OK\n");
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -534,10 +539,10 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -569,11 +574,11 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - couldn't resolve shortcut");
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
if ( filepathlen > MAX_PATH )
{
@@ -620,7 +625,7 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - OK\n");
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -658,11 +663,11 @@ _FindMP3s(void)
if ( f ) fprintf(f, " - couldn't resolve shortcut");
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
}
}
@@ -784,7 +789,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -797,7 +802,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -808,10 +813,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -822,9 +827,11 @@ cSampleManager::ReleaseDigitalHandle(void)
{
if ( DIG )
{
+#ifdef EXTERNAL_3D_SOUND
prevprovider = curprovider;
release_existing();
curprovider = -1;
+#endif
AIL_digital_handle_release(DIG);
}
}
@@ -835,18 +842,20 @@ cSampleManager::ReacquireDigitalHandle(void)
if ( DIG )
{
AIL_digital_handle_reacquire(DIG);
+#ifdef EXTERNAL_3D_SOUND
if ( prevprovider != -1 )
set_new_provider(prevprovider);
+#endif
}
}
-bool
+bool8
cSampleManager::Initialise(void)
{
TRACE("start");
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
{
for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
@@ -865,14 +874,15 @@ cSampleManager::Initialise(void)
m_nMonoMode = 0;
}
-
+
+#ifdef EXTERNAL_3D_SOUND
// miles
TRACE("MILES");
{
curprovider = -1;
prevprovider = -1;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
usingEAX=0;
usingEAX3=0;
@@ -886,6 +896,7 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < MAXCHANNELS; i++ )
opened_samples[i] = NULL;
}
+#endif
// banks
TRACE("banks");
@@ -897,7 +908,7 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < MAX_SFX_BANKS; i++ )
{
- bSampleBankLoaded[i] = false;
+ bSampleBankLoaded[i] = FALSE;
nSampleBankDiscStartOffset[i] = 0;
nSampleBankSize[i] = 0;
nSampleBankMemoryStartAddress[i] = 0;
@@ -936,22 +947,24 @@ cSampleManager::Initialise(void)
{
OutputDebugString(AIL_last_error());
Terminate();
- return false;
+ return FALSE;
}
-
+
+#ifdef EXTERNAL_3D_SOUND
add_providers();
+#endif
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
@@ -964,7 +977,7 @@ cSampleManager::Initialise(void)
if (cacheFile) {
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
fclose(cacheFile);
- m_bInitialised = true;
+ m_bInitialised = TRUE;
}else {
#endif
TRACE("cdrom");
@@ -973,9 +986,9 @@ cSampleManager::Initialise(void)
char filepath[MAX_PATH];
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
- while (true)
+ while (TRUE)
{
int32 drive = 'C';
@@ -991,24 +1004,42 @@ cSampleManager::Initialise(void)
if ( GetDriveType(m_szCDRomRootPath) == DRIVE_CDROM )
{
+ FILE *f;
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, StreamedNameTable[0]);
-
- FILE *f = fopen(filepath, "rb");
+ strcat(filepath, PS2StreamedNameTable[0]);
+ f = fopen(filepath, "rb");
+
+ if ( !f )
+#endif
+ {
+ strcpy(filepath, m_szCDRomRootPath);
+ strcat(filepath, StreamedNameTable[0]);
+ f = fopen(filepath, "rb");
+ }
if ( f )
{
fclose(f);
- bool bFileNotFound = false;
+ bool8 bFileNotFound = FALSE;
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, StreamedNameTable[i]);
-
+ strcat(filepath, PS2StreamedNameTable[i]);
+
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
-
+ if ( !mp3Stream[0] )
+#endif
+ {
+ strcpy(filepath, m_szCDRomRootPath);
+ strcat(filepath, StreamedNameTable[i]);
+
+ mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
+ }
+
if ( mp3Stream[0] )
{
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
@@ -1020,19 +1051,19 @@ cSampleManager::Initialise(void)
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
if ( !bFileNotFound )
{
- m_bInitialised = true;
+ m_bInitialised = TRUE;
break;
}
else
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
continue;
}
}
@@ -1047,11 +1078,11 @@ cSampleManager::Initialise(void)
if ( FrontEndMenuManager.m_bQuitGameNoCD )
{
Terminate();
- return false;
+ return FALSE;
}
continue;
#else
- m_bInitialised = true;
+ m_bInitialised = TRUE;
#endif
}
@@ -1071,13 +1102,20 @@ cSampleManager::Initialise(void)
{
int32 streamLength[TOTAL_STREAMED_SOUNDS];
- bool bFileNotFound = false;
+ bool8 bFileNotFound = FALSE;
char rootpath[MAX_PATH];
strcpy(_aHDDPath, m_szCDRomRootPath);
rootpath[0] = '\0';
- FILE *f = fopen(StreamedNameTable[0], "rb");
+ FILE *f;
+
+#ifdef PS2_AUDIO_PATHS
+ f = fopen(PS2StreamedNameTable[0], "rb");
+ if (!f)
+#endif
+
+ f = fopen(StreamedNameTable[0], "rb");
if ( f )
{
@@ -1085,11 +1123,20 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
{
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, rootpath);
- strcat(filepath, StreamedNameTable[i]);
-
+ strcat(filepath, PS2StreamedNameTable[i]);
+
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
-
+ if ( !mp3Stream[0] )
+#endif
+ {
+ strcpy(filepath, rootpath);
+ strcat(filepath, StreamedNameTable[i]);
+
+ mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
+ }
+
if ( mp3Stream[0] )
{
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
@@ -1101,14 +1148,14 @@ cSampleManager::Initialise(void)
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
}
else
- bFileNotFound = true;
+ bFileNotFound = TRUE;
if ( !bFileNotFound )
{
@@ -1117,10 +1164,10 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
nStreamLength[i] = streamLength[i];
- _bUseHDDAudio = true;
+ _bUseHDDAudio = TRUE;
}
else
- _bUseHDDAudio = false;
+ _bUseHDDAudio = FALSE;
}
#endif
#ifdef AUDIO_CACHE
@@ -1152,8 +1199,9 @@ cSampleManager::Initialise(void)
TRACE("providerset");
{
- _bSampmanInitialised = true;
-
+ _bSampmanInitialised = TRUE;
+
+#ifdef EXTERNAL_3D_SOUND
U32 n = 0;
while ( n < m_nNumberOfProviders )
@@ -1169,8 +1217,9 @@ cSampleManager::Initialise(void)
if ( n == m_nNumberOfProviders )
{
Terminate();
- return false;
+ return FALSE;
}
+#endif
}
TRACE("bank");
@@ -1198,19 +1247,19 @@ cSampleManager::Initialise(void)
time_t t = time(NULL);
tm *localtm;
- bool bUseRandomTable;
+ bool8 bUseRandomTable;
if ( t == -1 )
- bUseRandomTable = true;
+ bUseRandomTable = TRUE;
else
{
- bUseRandomTable = false;
+ bUseRandomTable = FALSE;
localtm = localtime(&t);
}
int32 randval;
if ( bUseRandomTable )
- randval = AudioManager.GetRandomNumber(1);
+ randval = AudioManager.m_anRandomTable[1];
else
randval = localtm->tm_sec * localtm->tm_min;
@@ -1221,7 +1270,7 @@ cSampleManager::Initialise(void)
randmp3 = randmp3->pNext;
if ( bUseRandomTable )
- _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength;
+ _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength;
else
{
if ( localtm->tm_sec > 0 )
@@ -1230,18 +1279,18 @@ cSampleManager::Initialise(void)
_CurMP3Pos = s*s*s*s*s*s*s*s % randmp3->nTrackLength;
}
else
- _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength;
+ _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength;
}
}
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
TRACE("end");
- return true;
+ return TRUE;
}
void
@@ -1265,8 +1314,10 @@ cSampleManager::Terminate(void)
opened_2dsamples[i] = NULL;
}
}
-
+
+#ifdef EXTERNAL_3D_SOUND
release_existing();
+#endif
_DeleteMP3Entries();
@@ -1290,17 +1341,19 @@ cSampleManager::Terminate(void)
AIL_shutdown();
- _bSampmanInitialised = false;
+ _bSampmanInitialised = FALSE;
}
-bool
+bool8
cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
char filepath[MAX_PATH];
+ FILE *f;
+#ifdef PS2_AUDIO_PATHS
#if GTA_VERSION >= GTA3_PC_11
- if (_bUseHDDAudio)
+ if(_bUseHDDAudio)
strcpy(filepath, _aHDDPath);
else
strcpy(filepath, m_szCDRomRootPath);
@@ -1308,21 +1361,36 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
strcpy(filepath, m_szCDRomRootPath);
#endif // #if GTA_VERSION >= GTA3_PC_11
- strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
-
- FILE *f = fopen(filepath, "rb");
+ strcat(filepath, PS2StreamedNameTable[AudioManager.m_anRandomTable[1] % TOTAL_STREAMED_SOUNDS]);
+
+ f = fopen(filepath, "rb");
+ if ( !f )
+#endif // PS2_AUDIO_PATHS
+ {
+#if GTA_VERSION >= GTA3_PC_11
+ if (_bUseHDDAudio)
+ strcpy(filepath, _aHDDPath);
+ else
+ strcpy(filepath, m_szCDRomRootPath);
+#else
+ strcpy(filepath, m_szCDRomRootPath);
+#endif // #if GTA_VERSION >= GTA3_PC_11
+
+ strcat(filepath, StreamedNameTable[AudioManager.m_anRandomTable[1] % TOTAL_STREAMED_SOUNDS]);
+ f = fopen(filepath, "rb");
+ }
if ( f )
{
fclose(f);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
#else
- return true;
+ return TRUE;
#endif // #if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
}
@@ -1359,6 +1427,7 @@ cSampleManager::UpdateEffectsVolume(void) //[Y], cSampleManager::UpdateSoundBuff
{
for ( int32 i = 0; i < MAXCHANNELS+MAX2DCHANNELS; i++ )
{
+#ifdef EXTERNAL_3D_SOUND
if ( i < MAXCHANNELS )
{
if ( opened_samples[i] && GetChannelUsedFlag(i) )
@@ -1371,6 +1440,7 @@ cSampleManager::UpdateEffectsVolume(void) //[Y], cSampleManager::UpdateSoundBuff
}
}
else
+#endif
{
if ( opened_2dsamples[i - MAXCHANNELS] )
{
@@ -1415,48 +1485,48 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
}
void
-cSampleManager::SetMonoMode(uint8 nMode)
+cSampleManager::SetMonoMode(bool8 nMode)
{
m_nMonoMode = nMode;
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
if ( MusicManager.IsInitialised()
&& MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
&& nBank != SFX_BANK_0 )
{
- return false;
+ return FALSE;
}
if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank],fpSampleDataHandle) != nSampleBankSize[nBank] )
- return false;
+ return FALSE;
- bSampleBankLoaded[nBank] = true;
+ bSampleBankLoaded[nBank] = TRUE;
- return true;
+ return TRUE;
}
void
cSampleManager::UnloadSampleBank(uint8 nBank)
{
- bSampleBankLoaded[nBank] = false;
+ bSampleBankLoaded[nBank] = FALSE;
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
int8 slot;
@@ -1469,10 +1539,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32
@@ -1494,11 +1564,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
// no talking peds during cutsenes or the game end
if ( MusicManager.IsInitialised() )
@@ -1507,15 +1577,15 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
case MUSICMODE_FRONTEND:
{
- if ( MusicManager.GetCurrentTrack() == STREAMED_SOUND_GAME_COMPLETED )
- return false;
+ if ( MusicManager.GetNextTrack() == STREAMED_SOUND_GAME_COMPLETED )
+ return FALSE;
break;
}
@@ -1523,10 +1593,10 @@ cSampleManager::LoadPedComment(uint32 nComment)
}
if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize )
- return false;
+ return FALSE;
nPedSlotSfxAddr[nCurrentPedSlot] = nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot;
nPedSlotSfx [nCurrentPedSlot] = nComment;
@@ -1534,7 +1604,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1573,18 +1643,25 @@ cSampleManager::GetSampleLength(uint32 nSample)
return m_aSamples[nSample].nSize >> 1;
}
-bool
+bool8
cSampleManager::UpdateReverb(void)
{
+#ifdef EXTERNAL_3D_SOUND
if ( !usingEAX )
- return false;
+ return FALSE;
- if ( AudioManager.GetFrameCounter() & 15 )
- return false;
-
- float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
- float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
- float z = AudioManager.GetReflectionsDistance(REFLECTION_UP);
+ if ( AudioManager.m_FrameCounter & 15 )
+ return FALSE;
+
+#ifdef AUDIO_REFLECTIONS
+ float y = AudioManager.m_afReflectionsDistances[REFLECTION_TOP] + AudioManager.m_afReflectionsDistances[REFLECTION_BOTTOM];
+ float x = AudioManager.m_afReflectionsDistances[REFLECTION_LEFT] + AudioManager.m_afReflectionsDistances[REFLECTION_RIGHT];
+ float z = AudioManager.m_afReflectionsDistances[REFLECTION_UP];
+#else
+ float x = 0.0f;
+ float y = 0.0f;
+ float z = 0.0f;
+#endif
float normy = norm(y, 5.0f, 40.0f);
float normx = norm(x, 5.0f, 40.0f);
@@ -1624,10 +1701,10 @@ cSampleManager::UpdateReverb(void)
}
}
- fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
+ fRatio = Clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
if ( usingEAX3 )
{
@@ -1647,26 +1724,29 @@ cSampleManager::UpdateReverb(void)
_fPrevEaxRatioDestination = fRatio;
- return true;
+ return TRUE;
+#endif
+ return FALSE;
}
void
-cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
+cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( usingEAX )
{
- if ( nReverbFlag != 0 )
+ if ( nReverbFlag != FALSE )
{
if ( !b2d )
AIL_set_3D_sample_effects_level(opened_samples[nChannel], _fEffectsLevel);
@@ -1677,50 +1757,56 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
AIL_set_3D_sample_effects_level(opened_samples[nChannel], 0.0f);
}
}
+#endif
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
+#endif
int32 addr;
if ( nSfx < SAMPLEBANK_MAX )
{
if ( !IsSampleBankLoaded(nBank) )
- return false;
+ return FALSE;
addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset;
}
else
{
if ( !IsPedCommentLoaded(nSfx) )
- return false;
+ return FALSE;
int32 slot = _GetPedCommentSlot(nSfx);
addr = nPedSlotSfxAddr[slot];
}
-
+
+#ifdef EXTERNAL_3D_SOUND
if ( b2d )
{
+#endif
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
{
AIL_set_sample_address(opened_2dsamples[nChannel - MAXCHANNELS], (void *)addr, m_aSamples[nSfx].nSize);
- return true;
+ return TRUE;
}
else
- return false;
+ return FALSE;
+#ifdef EXTERNAL_3D_SOUND
}
else
{
@@ -1736,13 +1822,15 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( AIL_set_3D_sample_info(opened_samples[nChannel], &info) == 0 )
{
OutputDebugString(AIL_last_error());
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
+#endif
}
+#ifdef EXTERNAL_3D_SOUND
void
cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
{
@@ -1753,8 +1841,8 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
// increase the volume for JB.MP3 and S4_BDBD.MP3
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
{
nChannelVolume[nChannel] >>= 2;
}
@@ -1777,23 +1865,26 @@ cSampleManager::SetChannel3DDistances(uint32 nChannel, float fMax, float fMin)
if ( opened_samples[nChannel] )
AIL_set_3D_sample_distances(opened_samples[nChannel], fMax, fMin);
}
+#endif
void
cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
{
uint32 vol = nVolume;
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
-
+
+#ifdef EXTERNAL_3D_SOUND
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
+#endif
nChannelVolume[nChannel] = vol;
// increase the volume for JB.MP3 and S4_BDBD.MP3
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
{
nChannelVolume[nChannel] >>= 2;
}
@@ -1803,184 +1894,213 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
AIL_set_sample_volume(opened_2dsamples[nChannel - MAXCHANNELS],
m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
}
-
+
+#ifdef EXTERNAL_3D_SOUND
break;
}
}
+#endif
}
void
cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
{
+#ifdef EXTERNAL_3D_SOUND
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
-#ifndef FIX_BUGS
+#endif
+#if !defined(FIX_BUGS) && defined(EXTERNAL_3D_SOUND)
if ( opened_samples[nChannel - MAXCHANNELS] ) // BUG
#else
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
#endif
AIL_set_sample_pan(opened_2dsamples[nChannel - MAXCHANNELS], nPan);
+#ifdef EXTERNAL_3D_SOUND
break;
}
}
+#endif
}
void
cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( b2d )
{
+#endif
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
AIL_set_sample_playback_rate(opened_2dsamples[nChannel - MAXCHANNELS], nFreq);
+#ifdef EXTERNAL_3D_SOUND
}
else
{
if ( opened_samples[nChannel] )
AIL_set_3D_sample_playback_rate(opened_samples[nChannel], nFreq);
}
+#endif
}
void
cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( b2d )
{
+#endif
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
AIL_set_sample_loop_block(opened_2dsamples[nChannel - MAXCHANNELS], nLoopStart, nLoopEnd);
+#ifdef EXTERNAL_3D_SOUND
}
else
{
if ( opened_samples[nChannel] )
AIL_set_3D_sample_loop_block(opened_samples[nChannel], nLoopStart, nLoopEnd);
}
+#endif
}
void
cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( b2d )
{
+#endif
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
AIL_set_sample_loop_count(opened_2dsamples[nChannel - MAXCHANNELS], nLoopCount);
+#ifdef EXTERNAL_3D_SOUND
}
else
{
if ( opened_samples[nChannel] )
AIL_set_3D_sample_loop_count(opened_samples[nChannel], nLoopCount);
}
+#endif
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( b2d )
{
+#endif
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
return AIL_sample_status(opened_2dsamples[nChannel - MAXCHANNELS]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
+#ifdef EXTERNAL_3D_SOUND
}
else
{
if ( opened_samples[nChannel] )
return AIL_3D_sample_status(opened_samples[nChannel]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
}
+#endif
}
void
cSampleManager::StartChannel(uint32 nChannel)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( b2d )
{
+#endif
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
AIL_start_sample(opened_2dsamples[nChannel - MAXCHANNELS]);
+#ifdef EXTERNAL_3D_SOUND
}
else
{
if ( opened_samples[nChannel] )
AIL_start_3D_sample(opened_samples[nChannel]);
}
+#endif
}
void
cSampleManager::StopChannel(uint32 nChannel)
{
- bool b2d = false;
+#ifdef EXTERNAL_3D_SOUND
+ bool8 b2d = FALSE;
switch ( nChannel )
{
- case CHANNEL2D:
+ case CHANNEL_POLICE_RADIO:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( b2d )
{
+#endif
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
AIL_end_sample(opened_2dsamples[nChannel - MAXCHANNELS]);
+#ifdef EXTERNAL_3D_SOUND
}
else
{
@@ -1990,6 +2110,7 @@ cSampleManager::StopChannel(uint32 nChannel)
AIL_end_3D_sample(opened_samples[nChannel]);
}
}
+#endif
}
void
@@ -2006,11 +2127,19 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
char filepath[MAX_PATH];
-
+#ifdef PS2_AUDIO_PATHS
strcpy(filepath, m_szCDRomRootPath);
- strcat(filepath, StreamedNameTable[nFile]);
-
+ strcat(filepath, PS2StreamedNameTable[nFile]);
+
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
+ if ( !mp3Stream[nStream] )
+#endif
+ {
+ strcpy(filepath, m_szCDRomRootPath);
+ strcat(filepath, StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
+ }
if ( mp3Stream[nStream] )
{
@@ -2024,12 +2153,12 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
if ( m_bInitialised )
{
if ( mp3Stream[nStream] )
- AIL_pause_stream(mp3Stream[nStream], nPauseFlag != 0);
+ AIL_pause_stream(mp3Stream[nStream], nPauseFlag != FALSE);
}
}
@@ -2043,145 +2172,162 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
+ uint32 i = 0;
uint32 position = nPos;
char filename[MAX_PATH];
- if ( m_bInitialised && nFile < TOTAL_STREAMED_SOUNDS )
+ if ( !m_bInitialised || nFile >= TOTAL_STREAMED_SOUNDS )
+ return FALSE;
+
+ if ( mp3Stream[nStream] )
{
- if ( mp3Stream[nStream] )
+ AIL_pause_stream(mp3Stream[nStream], 1);
+ AIL_close_stream(mp3Stream[nStream]);
+ }
+ if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER )
+ {
+ do
{
- AIL_pause_stream(mp3Stream[nStream], 1);
- AIL_close_stream(mp3Stream[nStream]);
- }
-
- if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER )
- {
- uint32 i = 0;
- do {
- if(i != 0 || _bIsMp3Active) {
- if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0;
-
- _CurMP3Pos = 0;
-
- tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index);
-
- if(mp3) {
- mp3 = _pMP3List;
- if(mp3 == NULL) {
- _bIsMp3Active = false;
- nFile = 0;
- strcpy(filename, m_szCDRomRootPath);
- strcat(filename, StreamedNameTable[nFile]);
-
- mp3Stream[nStream] =
- AIL_open_stream(DIG, filename, 0);
- if(mp3Stream[nStream]) {
- AIL_set_stream_loop_count(
- mp3Stream[nStream], 1);
- AIL_set_stream_ms_position(
- mp3Stream[nStream], position);
- AIL_pause_stream(mp3Stream[nStream],
- 0);
- return true;
- }
-
- return false;
- }
- }
-
- if(mp3->pLinkPath != NULL)
- mp3Stream[nStream] =
- AIL_open_stream(DIG, mp3->pLinkPath, 0);
- else {
- strcpy(filename, _mp3DirectoryPath);
- strcat(filename, mp3->aFilename);
-
- mp3Stream[nStream] =
- AIL_open_stream(DIG, filename, 0);
- }
-
- if(mp3Stream[nStream]) {
- AIL_set_stream_loop_count(mp3Stream[nStream], 1);
- AIL_set_stream_ms_position(mp3Stream[nStream], 0);
- AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
- }
-
- _bIsMp3Active = false;
- continue;
- }
+ // Just switched to MP3 player
+ if ( !_bIsMp3Active && i == 0 )
+ {
if ( nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER] )
position = 0;
-
- tMP3Entry *e;
- if ( !_GetMP3PosFromStreamPos(&position, &e) )
- {
- if ( e == NULL )
+ tMP3Entry *e = _pMP3List;
+
+ // Try to continue from previous song, if already started
+ if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
+ nFile = 0;
+#ifdef PS2_AUDIO_PATHS
+ strcpy(filename, m_szCDRomRootPath);
+ strcat(filename, PS2StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ if ( !mp3Stream[nStream] )
+#endif
{
- nFile = 0;
strcpy(filename, m_szCDRomRootPath);
strcat(filename, StreamedNameTable[nFile]);
- mp3Stream[nStream] =
- AIL_open_stream(DIG, filename, 0);
- if(mp3Stream[nStream]) {
- AIL_set_stream_loop_count(
- mp3Stream[nStream], 1);
- AIL_set_stream_ms_position(
- mp3Stream[nStream], position);
- AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
- }
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
+ if ( mp3Stream[nStream] )
+ {
+ AIL_set_stream_loop_count(mp3Stream[nStream], 1);
+ AIL_set_stream_ms_position(mp3Stream[nStream], position);
+ AIL_pause_stream(mp3Stream[nStream], 0);
+ return TRUE;
+ }
+ return FALSE;
- return false;
+ } else {
+ if ( e->pLinkPath != NULL )
+ mp3Stream[nStream] = AIL_open_stream(DIG, e->pLinkPath, 0);
+ else {
+ strcpy(filename, _mp3DirectoryPath);
+ strcat(filename, e->aFilename);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
+
+ if ( mp3Stream[nStream] ) {
+ AIL_set_stream_loop_count(mp3Stream[nStream], 1);
+ AIL_set_stream_ms_position(mp3Stream[nStream], position);
+ AIL_pause_stream(mp3Stream[nStream], 0);
+
+ _bIsMp3Active = TRUE;
+
+ return TRUE;
+ }
+ // fall through, start playing from another song
+ }
+ } else {
+ if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0;
+
+ _CurMP3Pos = 0;
+
+ tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index);
+ if ( !mp3 )
+ {
+ mp3 = _pMP3List;
+ if ( !_pMP3List )
+ {
+ nFile = 0;
+ _bIsMp3Active = FALSE;
+#ifdef PS2_AUDIO_PATHS
+ strcpy(filename, m_szCDRomRootPath);
+ strcat(filename, PS2StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ if ( !mp3Stream[nStream] )
+#endif
+ {
+ strcpy(filename, m_szCDRomRootPath);
+ strcat(filename, StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
+ if ( mp3Stream[nStream] )
+ {
+ AIL_set_stream_loop_count(mp3Stream[nStream], 1);
+ AIL_set_stream_ms_position(mp3Stream[nStream], position);
+ AIL_pause_stream(mp3Stream[nStream], 0);
+ return TRUE;
+ }
+ return FALSE;
}
}
-
- if ( e->pLinkPath != NULL )
- mp3Stream[nStream] = AIL_open_stream(DIG, e->pLinkPath, 0);
- else
- {
+ if(mp3->pLinkPath != NULL)
+ mp3Stream[nStream] = AIL_open_stream(DIG, mp3->pLinkPath, 0);
+ else {
strcpy(filename, _mp3DirectoryPath);
- strcat(filename, e->aFilename);
-
- mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ strcat(filename, mp3->aFilename);
+
+ mp3Stream[nStream] =
+ AIL_open_stream(DIG, filename, 0);
}
-
- if ( mp3Stream[nStream] )
- {
+
+ if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
- AIL_set_stream_ms_position(mp3Stream[nStream], position);
+ AIL_set_stream_ms_position(mp3Stream[nStream], 0);
AIL_pause_stream(mp3Stream[nStream], 0);
-
- _bIsMp3Active = true;
-
- return true;
+#ifdef FIX_BUGS
+ _bIsMp3Active = TRUE;
+#endif
+ return TRUE;
}
-
- _bIsMp3Active = false;
- } while(++i < nNumMP3s);
-
- position = 0;
- nFile = 0;
+ }
+ _bIsMp3Active = FALSE;
}
-
+ while ( ++i < nNumMP3s );
+ position = 0;
+ nFile = 0;
+ }
+#ifdef PS2_AUDIO_PATHS
+ strcpy(filename, m_szCDRomRootPath);
+ strcat(filename, PS2StreamedNameTable[nFile]);
+
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ if ( !mp3Stream[nStream] )
+#endif
+ {
strcpy(filename, m_szCDRomRootPath);
strcat(filename, StreamedNameTable[nFile]);
-
- mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
- if ( mp3Stream[nStream] )
- {
- AIL_set_stream_loop_count(mp3Stream[nStream], 1);
- AIL_set_stream_ms_position(mp3Stream[nStream], position);
- AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
- }
- }
- return false;
+ mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
+ }
+ if ( mp3Stream[nStream] )
+ {
+ AIL_set_stream_loop_count(mp3Stream[nStream], 1);
+ AIL_set_stream_ms_position(mp3Stream[nStream], position);
+ AIL_pause_stream(mp3Stream[nStream], 0);
+ return TRUE;
+ }
+ return FALSE;
}
void
@@ -2197,7 +2343,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
mp3Stream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
}
@@ -2235,7 +2381,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
}
void
-cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
+cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream)
{
uint8 vol = nVolume;
@@ -2268,7 +2414,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return 0;
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
if ( m_bInitialised )
@@ -2276,23 +2422,23 @@ cSampleManager::IsStreamPlaying(uint8 nStream)
if ( mp3Stream[nStream] )
{
if ( AIL_stream_status(mp3Stream[nStream]) == SMP_PLAYING )
- return true;
+ return TRUE;
else
- return false;
+ return FALSE;
}
}
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::InitialiseSampleBanks(void)
{
int32 nBank = SFX_BANK_0;
fpSampleDescHandle = fopen(SampleBankDescFilename, "rb");
if ( fpSampleDescHandle == NULL )
- return false;
+ return FALSE;
fpSampleDataHandle = fopen(SampleBankDataFilename, "rb");
if ( fpSampleDataHandle == NULL )
@@ -2300,7 +2446,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2327,7 +2473,7 @@ cSampleManager::InitialiseSampleBanks(void)
nSampleBankSize[SFX_BANK_0] = nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS] - nSampleBankDiscStartOffset[SFX_BANK_0];
nSampleBankSize[SFX_BANK_PED_COMMENTS] = _nSampleDataEndOffset - nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS];
- return true;
+ return TRUE;
}
#endif
diff --git a/src/audio/sampman_null.cpp b/src/audio/sampman_null.cpp
index e44e5b57..6d16e286 100644
--- a/src/audio/sampman_null.cpp
+++ b/src/audio/sampman_null.cpp
@@ -4,7 +4,7 @@
#include "AudioManager.h"
cSampleManager SampleManager;
-bool _bSampmanInitialised = false;
+bool8 _bSampmanInitialised = FALSE;
uint32 BankStartOffset[MAX_SFX_BANKS];
uint32 nNumMP3s;
@@ -19,6 +19,7 @@ cSampleManager::~cSampleManager(void)
}
+#ifdef EXTERNAL_3D_SOUND
void cSampleManager::SetSpeakerConfig(int32 nConfig)
{
@@ -59,8 +60,9 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
{
return 0;
}
+#endif
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -75,10 +77,10 @@ void cSampleManager::ReacquireDigitalHandle(void)
{
}
-bool
+bool8
cSampleManager::Initialise(void)
{
- return true;
+ return TRUE;
}
void
@@ -87,9 +89,9 @@ cSampleManager::Terminate(void)
}
-bool cSampleManager::CheckForAnAudioFileOnCD(void)
+bool8 cSampleManager::CheckForAnAudioFileOnCD(void)
{
- return true;
+ return TRUE;
}
char cSampleManager::GetCDAudioDriveLetter(void)
@@ -128,11 +130,11 @@ cSampleManager::SetMonoMode(uint8 nMode)
{
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS );
- return false;
+ return FALSE;
}
void
@@ -141,20 +143,20 @@ cSampleManager::UnloadSampleBank(uint8 nBank)
ASSERT( nBank < MAX_SFX_BANKS );
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS );
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- return false;
+ return FALSE;
}
@@ -164,11 +166,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- return false;
+ return FALSE;
}
int32
@@ -205,56 +207,58 @@ cSampleManager::GetSampleLength(uint32 nSample)
return 0;
}
-bool cSampleManager::UpdateReverb(void)
+bool8 cSampleManager::UpdateReverb(void)
{
- return false;
+ return FALSE;
}
void
-cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
+cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
- return false;
+ return FALSE;
}
+#ifdef EXTERNAL_3D_SOUND
void
cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
{
- ASSERT( nChannel != CHANNEL2D );
+ ASSERT( nChannel < MAXCHANNELS );
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
void
cSampleManager::SetChannel3DPosition(uint32 nChannel, float fX, float fY, float fZ)
{
- ASSERT( nChannel != CHANNEL2D );
+ ASSERT( nChannel < MAXCHANNELS );
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
void
cSampleManager::SetChannel3DDistances(uint32 nChannel, float fMax, float fMin)
{
- ASSERT( nChannel != CHANNEL2D );
+ ASSERT( nChannel < MAXCHANNELS );
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
+#endif
void
cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
{
- ASSERT( nChannel == CHANNEL2D );
+ ASSERT( nChannel >= MAXCHANNELS );
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
void
cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
{
- ASSERT(nChannel == CHANNEL2D);
+ ASSERT( nChannel >= MAXCHANNELS );
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
@@ -276,12 +280,12 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
- return false;
+ return FALSE;
}
void
@@ -303,7 +307,7 @@ cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
}
@@ -314,12 +318,12 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
ASSERT( nStream < MAX_STREAMS );
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
- return false;
+ return FALSE;
}
void
@@ -350,19 +354,19 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return 1;
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::InitialiseSampleBanks(void)
{
- return true;
+ return TRUE;
}
#endif
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 404c9062..73703276 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -14,8 +14,6 @@
#include
#include
-#pragma comment(lib, "OpenAL32.lib")
-
// for user MP3s
#include
#include
@@ -24,6 +22,10 @@
#define _getcwd getcwd
#endif
+#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK
+#pragma comment( lib, "OpenAL32.lib" )
+#endif
+
#include "common.h"
#include "crossplatform.h"
@@ -32,6 +34,13 @@
#include "oal/oal_utils.h"
#include "oal/aldlist.h"
#include "oal/channel.h"
+
+#include
+#ifdef MULTITHREADED_AUDIO
+#include
+#include
+#include
+#endif
#include "oal/stream.h"
#include "AudioManager.h"
@@ -43,8 +52,6 @@
#endif
//TODO: fix eax3 reverb
-//TODO: max channels
-//TODO: loop count
#ifdef __WIIU__
extern "C" char *_getcwd (char *__buf, size_t __size);
@@ -53,7 +60,7 @@ extern "C" char *_getcwd (char *__buf, size_t __size);
#endif
cSampleManager SampleManager;
-bool _bSampmanInitialised = false;
+bool8 _bSampmanInitialised = FALSE;
uint32 BankStartOffset[MAX_SFX_BANKS];
@@ -66,15 +73,17 @@ ALCdevice *ALDevice = NULL;
ALCcontext *ALContext = NULL;
unsigned int _maxSamples;
float _fPrevEaxRatioDestination;
+bool _effectsSupported = false;
bool _usingEFX;
float _fEffectsLevel;
ALuint ALEffect = AL_EFFECT_NULL;
ALuint ALEffectSlot = AL_EFFECTSLOT_NULL;
struct
{
- char id[256];
+ const char *id;
char name[256];
int sources;
+ bool bSupportsFx;
}providers[MAXPROVIDERS];
int defaultProvider;
@@ -89,7 +98,7 @@ OggOpusFile *fpSampleDataHandle;
#else
FILE *fpSampleDataHandle;
#endif
-bool bSampleBankLoaded [MAX_SFX_BANKS];
+bool8 bSampleBankLoaded [MAX_SFX_BANKS];
int32 nSampleBankDiscStartOffset [MAX_SFX_BANKS];
int32 nSampleBankSize [MAX_SFX_BANKS];
uintptr nSampleBankMemoryStartAddress[MAX_SFX_BANKS];
@@ -99,8 +108,8 @@ int32 nPedSlotSfx [MAX_PEDSFX];
int32 nPedSlotSfxAddr[MAX_PEDSFX];
uint8 nCurrentPedSlot;
-CChannel aChannel[MAXCHANNELS+MAX2DCHANNELS];
-uint8 nChannelVolume[MAXCHANNELS+MAX2DCHANNELS];
+CChannel aChannel[NUM_CHANNELS];
+uint8 nChannelVolume[NUM_CHANNELS];
uint32 nStreamLength[TOTAL_STREAMED_SOUNDS];
ALuint ALStreamSources[MAX_STREAMS][2];
@@ -123,10 +132,9 @@ char _mp3DirectoryPath[MAX_PATH];
CStream *aStream[MAX_STREAMS];
uint8 nStreamPan [MAX_STREAMS];
uint8 nStreamVolume[MAX_STREAMS];
-uint8 nStreamLoopedFlag[MAX_STREAMS];
uint32 _CurMP3Index;
int32 _CurMP3Pos;
-bool _bIsMp3Active;
+bool8 _bIsMp3Active;
///////////////////////////////////////////////////////////////
// Env Size Diffus Room RoomHF RoomLF DecTm DcHF DcLF Refl RefDel Ref Pan Revb RevDel Rev Pan EchTm EchDp ModTm ModDp AirAbs HFRef LFRef RRlOff FLAGS
EAXLISTENERPROPERTIES StartEAX3 =
@@ -140,7 +148,7 @@ EAXLISTENERPROPERTIES EAX3Params;
bool IsFXSupported()
{
- return usingEAX || usingEAX3 || _usingEFX;
+ return _effectsSupported; // usingEAX || usingEAX3 || _usingEFX;
}
void EAX_SetAll(const EAXLISTENERPROPERTIES *allparameters)
@@ -156,47 +164,49 @@ add_providers()
{
SampleManager.SetNum3DProvidersAvailable(0);
- ALDeviceList *pDeviceList = NULL;
- pDeviceList = new ALDeviceList();
+ static ALDeviceList DeviceList;
+ ALDeviceList *pDeviceList = &DeviceList;
if ((pDeviceList) && (pDeviceList->GetNumDevices()))
{
const int devNumber = Min(pDeviceList->GetNumDevices(), MAXPROVIDERS);
int n = 0;
- for (int i = 0; i < devNumber; i++)
+ //for (int i = 0; i < devNumber; i++)
+ int i = pDeviceList->GetDefaultDevice();
{
if ( n < MAXPROVIDERS )
{
- strcpy(providers[n].id, pDeviceList->GetDeviceName(i));
- strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name));
+ providers[n].id = pDeviceList->GetDeviceName(i);
+ strcpy(providers[n].name, "OPENAL SOFT");
providers[n].sources = pDeviceList->GetMaxNumSources(i);
SampleManager.Set3DProviderName(n, providers[n].name);
n++;
}
-
+
if ( alGetEnumValue("AL_EFFECT_EAXREVERB") != 0
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX2)
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX3)
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX4)
|| pDeviceList->IsExtensionSupported(i, ADEXT_EAX5) )
{
+ providers[n - 1].bSupportsFx = true;
if ( n < MAXPROVIDERS )
{
- strcpy(providers[n].id, pDeviceList->GetDeviceName(i));
- strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name));
- strcat(providers[n].name, " EAX");
+ providers[n].id = pDeviceList->GetDeviceName(i);
+ strcpy(providers[n].name, "OPENAL SOFT EAX");
providers[n].sources = pDeviceList->GetMaxNumSources(i);
+ providers[n].bSupportsFx = true;
SampleManager.Set3DProviderName(n, providers[n].name);
n++;
}
if ( n < MAXPROVIDERS )
{
- strcpy(providers[n].id, pDeviceList->GetDeviceName(i));
- strncpy(providers[n].name, pDeviceList->GetDeviceName(i), sizeof(providers[n].name));
- strcat(providers[n].name, " EAX3");
+ providers[n].id = pDeviceList->GetDeviceName(i);
+ strcpy(providers[n].name, "OPENAL SOFT EAX3");
providers[n].sources = pDeviceList->GetMaxNumSources(i);
+ providers[n].bSupportsFx = true;
SampleManager.Set3DProviderName(n, providers[n].name);
n++;
}
@@ -207,75 +217,37 @@ add_providers()
for(int j=n;jGetDefaultDevice();
- if ( defaultProvider > MAXPROVIDERS )
- defaultProvider = 0;
+ // devices are gone now
+ //defaultProvider = pDeviceList->GetDefaultDevice();
+ //if ( defaultProvider > MAXPROVIDERS )
+ defaultProvider = 0;
}
-
- delete pDeviceList;
}
static void
release_existing()
{
- for ( int32 i = 0; i < MAXCHANNELS; i++ )
- aChannel[i].Term();
- aChannel[CHANNEL2D].Term();
-
if ( IsFXSupported() )
{
if ( alIsEffect(ALEffect) )
{
alEffecti(ALEffect, AL_EFFECT_TYPE, AL_EFFECT_NULL);
- alDeleteEffects(1, &ALEffect);
- ALEffect = AL_EFFECT_NULL;
}
if (alIsAuxiliaryEffectSlot(ALEffectSlot))
{
alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL);
-
- alDeleteAuxiliaryEffectSlots(1, &ALEffectSlot);
- ALEffectSlot = AL_EFFECTSLOT_NULL;
}
}
- for ( int32 i = 0; i < MAX_STREAMS; i++ )
- {
- CStream *stream = aStream[i];
- if (stream)
- stream->ProviderTerm();
-
- alDeleteBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
- }
- alDeleteSources(MAX_STREAMS*2, ALStreamSources[0]);
-
- CChannel::DestroyChannels();
-
- if ( ALContext )
- {
- alcMakeContextCurrent(NULL);
- alcSuspendContext(ALContext);
- alcDestroyContext(ALContext);
- }
- if ( ALDevice )
- alcCloseDevice(ALDevice);
-
- ALDevice = NULL;
- ALContext = NULL;
-
- _fPrevEaxRatioDestination = 0.0f;
- _usingEFX = false;
- _fEffectsLevel = 0.0f;
-
DEV("release_existing()\n");
}
-static bool
+static bool8
set_new_provider(int index)
{
if ( curprovider == index )
- return true;
+ return TRUE;
curprovider = index;
@@ -285,61 +257,6 @@ set_new_provider(int index)
{
DEV("set_new_provider()\n");
- //TODO:
- _maxSamples = MAXCHANNELS;
-
- ALCint attr[] = {ALC_FREQUENCY,MAX_FREQ,
- ALC_MONO_SOURCES, MAX_STREAMS * 2 + MAXCHANNELS,
- 0,
- };
-
- ALDevice = alcOpenDevice(providers[index].id);
- ASSERT(ALDevice != NULL);
-
- ALContext = alcCreateContext(ALDevice, attr);
- ASSERT(ALContext != NULL);
-
- alcMakeContextCurrent(ALContext);
-
- const char* ext=(const char*)alGetString(AL_EXTENSIONS);
- ASSERT(strstr(ext,"AL_SOFT_loop_points")!=NULL);
- if ( strstr(ext,"AL_SOFT_loop_points")==NULL )
- {
- curprovider=-1;
- release_existing();
- return false;
- }
-
- alListenerf (AL_GAIN, 1.0f);
- alListener3f(AL_POSITION, 0.0f, 0.0f, 0.0f);
- alListener3f(AL_VELOCITY, 0.0f, 0.0f, 0.0f);
- ALfloat orientation[6] = { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f };
- alListenerfv(AL_ORIENTATION, orientation);
-
- alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED);
-
- if ( alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) )
- {
- alGenAuxiliaryEffectSlots(1, &ALEffectSlot);
- alGenEffects(1, &ALEffect);
- }
-
- alGenSources(MAX_STREAMS*2, ALStreamSources[0]);
- for ( int32 i = 0; i < MAX_STREAMS; i++ )
- {
- alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
- alSourcei(ALStreamSources[i][0], AL_SOURCE_RELATIVE, AL_TRUE);
- alSource3f(ALStreamSources[i][0], AL_POSITION, 0.0f, 0.0f, 0.0f);
- alSourcef(ALStreamSources[i][0], AL_GAIN, 1.0f);
- alSourcei(ALStreamSources[i][1], AL_SOURCE_RELATIVE, AL_TRUE);
- alSource3f(ALStreamSources[i][1], AL_POSITION, 0.0f, 0.0f, 0.0f);
- alSourcef(ALStreamSources[i][1], AL_GAIN, 1.0f);
-
- CStream *stream = aStream[i];
- if (stream)
- stream->ProviderInit();
- }
-
usingEAX = 0;
usingEAX3 = 0;
_usingEFX = false;
@@ -347,16 +264,16 @@ set_new_provider(int index)
if ( !strcmp(&providers[index].name[strlen(providers[index].name) - strlen(" EAX3")], " EAX3")
&& alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) )
{
- EAX_SetAll(&FinishEAX3);
usingEAX = 1;
usingEAX3 = 1;
+ alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect);
+ EAX_SetAll(&FinishEAX3);
DEV("EAX3\n");
}
else if ( alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) )
{
- EAX_SetAll(&EAX30_ORIGINAL_PRESETS[EAX_ENVIRONMENT_CAVE]);
if ( !strcmp(&providers[index].name[strlen(providers[index].name) - strlen(" EAX")], " EAX"))
{
@@ -368,33 +285,25 @@ set_new_provider(int index)
_usingEFX = true;
DEV("EFX\n");
}
+ alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect);
+ EAX_SetAll(&EAX30_ORIGINAL_PRESETS[EAX_ENVIRONMENT_CAVE]);
}
//SampleManager.SetSpeakerConfig(speaker_type);
-
- CChannel::InitChannels();
- for ( int32 i = 0; i < MAXCHANNELS; i++ )
- aChannel[i].Init(i);
- aChannel[CHANNEL2D].Init(CHANNEL2D, true);
-
if ( IsFXSupported() )
{
- /**/
- alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect);
- /**/
-
for ( int32 i = 0; i < MAXCHANNELS; i++ )
aChannel[i].SetReverbMix(ALEffectSlot, 0.0f);
}
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
-static bool
+static bool8
IsThisTrackAt16KHz(uint32 track)
{
return track == STREAMED_SOUND_RADIO_CHAT;
@@ -452,7 +361,7 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
{
int savedprovider = curprovider;
- nProvider = clamp(nProvider, 0, m_nNumberOfProviders - 1);
+ nProvider = Clamp(nProvider, 0, m_nNumberOfProviders - 1);
if ( set_new_provider(nProvider) )
return curprovider;
@@ -462,13 +371,13 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
return curprovider;
}
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
#ifdef _WIN32
size_t len = strlen(path);
if (len < 4 || strcmp(&path[len - 4], ".lnk") != 0)
- return false;
+ return FALSE;
IShellLink* psl;
WIN32_FIND_DATA fd;
@@ -503,7 +412,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -513,33 +422,33 @@ _ResolveLink(char const *path, char *out)
psl->Release();
}
- return false;
+ return FALSE;
#elif defined __WIIU__
- return false;
+ return FALSE;
#else
struct stat sb;
if (lstat(path, &sb) == -1) {
perror("lstat: ");
- return false;
+ return FALSE;
}
if (S_ISLNK(sb.st_mode)) {
char* linkname = (char*)alloca(sb.st_size + 1);
if (linkname == NULL) {
fprintf(stderr, "insufficient memory\n");
- return false;
+ return FALSE;
}
if (readlink(path, linkname, sb.st_size + 1) < 0) {
perror("readlink: ");
- return false;
+ return FALSE;
}
linkname[sb.st_size] = '\0';
strcpy(out, linkname);
- return true;
+ return TRUE;
} else {
- return false;
+ return FALSE;
}
#endif
}
@@ -548,22 +457,36 @@ static void
_FindMP3s(void)
{
tMP3Entry *pList;
- bool bShortcut;
- bool bInitFirstEntry;
+ bool8 bShortcut;
+ bool8 bInitFirstEntry;
HANDLE hFind;
char path[MAX_PATH];
- char filepath[MAX_PATH*2];
int total_ms;
WIN32_FIND_DATA fd;
+ char filepath[MAX_PATH + sizeof(fd.cFileName)];
if (_getcwd(_mp3DirectoryPath, MAX_PATH) == NULL) {
perror("getcwd: ");
return;
}
+
+ if (strlen(_mp3DirectoryPath) + 1 > MAX_PATH - 10) {
+ // This is not gonna end well
+ printf("MP3 folder path is too long, no place left for file names. MP3 finding aborted.\n");
+ return;
+ }
OutputDebugString("Finding MP3s...");
strcpy(path, _mp3DirectoryPath);
strcat(path, "\\MP3\\");
+
+#if !defined(_WIN32)
+ char *actualPath = casepath(path);
+ if (actualPath) {
+ strcpy(path, actualPath);
+ free(actualPath);
+ }
+#endif
strcpy(_mp3DirectoryPath, path);
OutputDebugString(_mp3DirectoryPath);
@@ -576,135 +499,69 @@ _FindMP3s(void)
{
return;
}
-
- strcpy(filepath, _mp3DirectoryPath);
- strcat(filepath, fd.cFileName);
-
- size_t filepathlen = strlen(filepath);
-
- if ( filepathlen <= 0)
- {
- FindClose(hFind);
- return;
- }
- if ( _ResolveLink(filepath, filepath) )
- {
- OutputDebugString("Resolving Link");
- OutputDebugString(filepath);
- bShortcut = true;
- } else
- bShortcut = false;
-
- aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]);
+ bShortcut = FALSE;
+ bInitFirstEntry = TRUE;
- if (aStream[0] && aStream[0]->IsOpened())
- {
- total_ms = aStream[0]->GetLengthMS();
- delete aStream[0];
- aStream[0] = NULL;
+ do
+ {
+ strcpy(filepath, _mp3DirectoryPath);
+ strcat(filepath, fd.cFileName);
+
+ if (!strcmp(fd.cFileName, ".") || !strcmp(fd.cFileName, ".."))
+ continue;
- OutputDebugString(fd.cFileName);
-
- _pMP3List = new tMP3Entry;
-
- if ( _pMP3List == NULL )
- {
- FindClose(hFind);
- return;
- }
-
- nNumMP3s = 1;
-
- strcpy(_pMP3List->aFilename, fd.cFileName);
-
- _pMP3List->nTrackLength = total_ms;
-
- _pMP3List->pNext = NULL;
-
- pList = _pMP3List;
-
- if ( bShortcut )
- {
- _pMP3List->pLinkPath = new char[MAX_PATH*2];
- strcpy(_pMP3List->pLinkPath, filepath);
- }
- else
- {
- _pMP3List->pLinkPath = NULL;
- }
+ size_t filepathlen = strlen(filepath);
- bInitFirstEntry = false;
- }
- else
- {
- strcat(filepath, " - NOT A VALID MP3");
-
- OutputDebugString(filepath);
-
- bInitFirstEntry = true;
- }
-
- while ( true )
- {
- if ( !FindNextFile(hFind, &fd) )
- break;
-
if ( bInitFirstEntry )
{
- strcpy(filepath, _mp3DirectoryPath);
- strcat(filepath, fd.cFileName);
-
- size_t filepathlen = strlen(filepath);
-
- if ( filepathlen > 0 )
+ if (filepathlen > 0)
{
- if ( _ResolveLink(filepath, filepath) )
+ if (_ResolveLink(filepath, filepath))
{
OutputDebugString("Resolving Link");
OutputDebugString(filepath);
- bShortcut = true;
- } else {
- bShortcut = false;
+ bShortcut = TRUE;
+ }
+ else
+ {
+ bShortcut = FALSE;
if (filepathlen > MAX_PATH) {
continue;
}
}
- aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]);
-
- if (aStream[0] && aStream[0]->IsOpened())
+ if (aStream[0] && aStream[0]->Open(filepath))
{
total_ms = aStream[0]->GetLengthMS();
- delete aStream[0];
- aStream[0] = NULL;
+ aStream[0]->Close();
OutputDebugString(fd.cFileName);
-
+
_pMP3List = new tMP3Entry;
-
- if ( _pMP3List == NULL)
+
+ if (_pMP3List == NULL)
break;
-
+
nNumMP3s = 1;
-
+
strcpy(_pMP3List->aFilename, fd.cFileName);
-
+
_pMP3List->nTrackLength = total_ms;
_pMP3List->pNext = NULL;
-
- if ( bShortcut )
+
+ if (bShortcut)
{
- _pMP3List->pLinkPath = new char [MAX_PATH*2];
+ _pMP3List->pLinkPath = new char[MAX_PATH + sizeof(fd.cFileName)];
strcpy(_pMP3List->pLinkPath, filepath);
}
else
{
_pMP3List->pLinkPath = NULL;
}
-
+
pList = _pMP3List;
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -712,31 +569,26 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
}
+ else
+ break;
}
else
{
- strcpy(filepath, _mp3DirectoryPath);
- strcat(filepath, fd.cFileName);
-
- size_t filepathlen = strlen(filepath);
-
if ( filepathlen > 0 )
{
if ( _ResolveLink(filepath, filepath) )
{
OutputDebugString("Resolving Link");
OutputDebugString(filepath);
- bShortcut = true;
- } else
- bShortcut = false;
+ bShortcut = TRUE;
+ }
+ else
+ bShortcut = FALSE;
- aStream[0] = new CStream(filepath, ALStreamSources[0], ALStreamBuffers[0]);
-
- if (aStream[0] && aStream[0]->IsOpened())
+ if (aStream[0] && aStream[0]->Open(filepath))
{
total_ms = aStream[0]->GetLengthMS();
- delete aStream[0];
- aStream[0] = NULL;
+ aStream[0]->Close();
OutputDebugString(fd.cFileName);
@@ -755,7 +607,7 @@ _FindMP3s(void)
if ( bShortcut )
{
- e->pLinkPath = new char [MAX_PATH*2];
+ e->pLinkPath = new char [MAX_PATH + sizeof(fd.cFileName)];
strcpy(e->pLinkPath, filepath);
}
else
@@ -774,7 +626,7 @@ _FindMP3s(void)
}
}
}
- }
+ } while (FindNextFile(hFind, &fd));
FindClose(hFind);
}
@@ -840,7 +692,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -853,7 +705,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -864,10 +716,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -876,30 +728,25 @@ cSampleManager::IsMP3RadioChannelAvailable(void)
void cSampleManager::ReleaseDigitalHandle(void)
{
- if ( ALDevice )
- {
- prevprovider = curprovider;
- release_existing();
- curprovider = -1;
- }
+ // TODO? alcSuspendContext
}
void cSampleManager::ReacquireDigitalHandle(void)
{
- if ( ALDevice )
- {
- if ( prevprovider != -1 )
- set_new_provider(prevprovider);
- }
+ // TODO? alcProcessContext
}
-bool
+bool8
cSampleManager::Initialise(void)
{
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
EFXInit();
+
+ for(int i = 0; i < MAX_STREAMS; i++)
+ aStream[i] = new CStream(ALStreamSources[i], ALStreamBuffers[i]);
+
CStream::Initialise();
{
@@ -907,7 +754,7 @@ cSampleManager::Initialise(void)
{
m_aSamples[i].nOffset = 0;
m_aSamples[i].nSize = 0;
- m_aSamples[i].nFrequency = MAX_FREQ;
+ m_aSamples[i].nFrequency = 22050;
m_aSamples[i].nLoopStart = 0;
m_aSamples[i].nLoopEnd = -1;
}
@@ -942,7 +789,7 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < MAX_SFX_BANKS; i++ )
{
- bSampleBankLoaded[i] = false;
+ bSampleBankLoaded[i] = FALSE;
nSampleBankDiscStartOffset[i] = 0;
nSampleBankSize[i] = 0;
nSampleBankMemoryStartAddress[i] = 0;
@@ -960,16 +807,87 @@ cSampleManager::Initialise(void)
}
{
- for ( int32 i = 0; i < MAXCHANNELS+MAX2DCHANNELS; i++ )
+ for ( int32 i = 0; i < NUM_CHANNELS; i++ )
nChannelVolume[i] = 0;
}
+
+ add_providers();
+
+ {
+ int index = 0;
+ _maxSamples = Min(MAXCHANNELS, providers[index].sources);
+
+ ALCint attr[] = {ALC_FREQUENCY,MAX_FREQ,
+ ALC_MONO_SOURCES, MAX_DIGITAL_MIXER_CHANNELS - MAX2DCHANNELS,
+ ALC_STEREO_SOURCES, MAX2DCHANNELS,
+ 0,
+ };
+
+ ALDevice = alcOpenDevice(providers[index].id);
+ ASSERT(ALDevice != NULL);
+
+ ALContext = alcCreateContext(ALDevice, attr);
+ ASSERT(ALContext != NULL);
+
+ alcMakeContextCurrent(ALContext);
+
+ const char* ext=(const char*)alGetString(AL_EXTENSIONS);
+ ASSERT(strstr(ext,"AL_SOFT_loop_points")!=NULL);
+ if ( strstr(ext,"AL_SOFT_loop_points")==NULL )
+ {
+ Terminate();
+ return FALSE;
+ }
+
+ alListenerf (AL_GAIN, 1.0f);
+ alListener3f(AL_POSITION, 0.0f, 0.0f, 0.0f);
+ alListener3f(AL_VELOCITY, 0.0f, 0.0f, 0.0f);
+ ALfloat orientation[6] = { 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f };
+ alListenerfv(AL_ORIENTATION, orientation);
+
+ alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED);
+
+ if ( alcIsExtensionPresent(ALDevice, (ALCchar*)ALC_EXT_EFX_NAME) )
+ {
+ _effectsSupported = providers[index].bSupportsFx;
+ alGenAuxiliaryEffectSlots(1, &ALEffectSlot);
+ alGenEffects(1, &ALEffect);
+ }
+
+ alGenSources(MAX_STREAMS*2, ALStreamSources[0]);
+ for ( int32 i = 0; i < MAX_STREAMS; i++ )
+ {
+ alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
+ alSourcei(ALStreamSources[i][0], AL_SOURCE_RELATIVE, AL_TRUE);
+ alSource3f(ALStreamSources[i][0], AL_POSITION, 0.0f, 0.0f, 0.0f);
+ alSourcef(ALStreamSources[i][0], AL_GAIN, 1.0f);
+ alSourcei(ALStreamSources[i][1], AL_SOURCE_RELATIVE, AL_TRUE);
+ alSource3f(ALStreamSources[i][1], AL_POSITION, 0.0f, 0.0f, 0.0f);
+ alSourcef(ALStreamSources[i][1], AL_GAIN, 1.0f);
+ }
+
+ CChannel::InitChannels();
+
+ for ( int32 i = 0; i < MAXCHANNELS; i++ )
+ aChannel[i].Init(i);
+ for ( int32 i = 0; i < MAX2DCHANNELS; i++ )
+ aChannel[MAXCHANNELS+i].Init(MAXCHANNELS+i, true);
+
+ if ( IsFXSupported() )
+ {
+ /**/
+ alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect);
+ /**/
+
+ for ( int32 i = 0; i < MAXCHANNELS; i++ )
+ aChannel[i].SetReverbMix(ALEffectSlot, 0.0f);
+ }
+ }
{
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
nStreamLength[i] = 0;
}
-
- add_providers();
#ifdef AUDIO_CACHE
#ifdef WIIU_CHANNEL
@@ -986,14 +904,16 @@ cSampleManager::Initialise(void)
debug("Cannot load audio cache\n");
#endif
- for(int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++) {
- aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000);
-
- if(aStream[0] && aStream[0]->IsOpened()) {
+ for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
+ {
+ if(aStream[0] && (
+#ifdef PS2_AUDIO_PATHS
+ aStream[0]->Open(PS2StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000) ||
+#endif
+ aStream[0]->Open(StreamedNameTable[i], IsThisTrackAt16KHz(i) ? 16000 : 32000)))
+ {
uint32 tatalms = aStream[0]->GetLengthMS();
- delete aStream[0];
- aStream[0] = NULL;
-
+ aStream[0]->Close();
nStreamLength[i] = tatalms;
} else
USERERROR("Can't open '%s'\n", StreamedNameTable[i]);
@@ -1018,7 +938,7 @@ cSampleManager::Initialise(void)
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (uintptr)malloc(nSampleBankSize[SFX_BANK_0]);
@@ -1027,7 +947,7 @@ cSampleManager::Initialise(void)
if ( nSampleBankMemoryStartAddress[SFX_BANK_0] == 0 )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (uintptr)malloc(PED_BLOCKSIZE*MAX_PEDSFX);
@@ -1039,14 +959,15 @@ cSampleManager::Initialise(void)
{
for ( int32 i = 0; i < MAX_STREAMS; i++ )
{
- aStream[i] = NULL;
+ aStream[i]->Close();
+
nStreamVolume[i] = 100;
nStreamPan[i] = 63;
}
}
-
+
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
if ( defaultProvider >= 0 && defaultProvider < m_nNumberOfProviders )
{
@@ -1055,7 +976,7 @@ cSampleManager::Initialise(void)
else
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1078,19 +999,19 @@ cSampleManager::Initialise(void)
time_t t = time(NULL);
tm *localtm;
- bool bUseRandomTable;
+ bool8 bUseRandomTable;
if ( t == -1 )
- bUseRandomTable = true;
+ bUseRandomTable = TRUE;
else
{
- bUseRandomTable = false;
+ bUseRandomTable = FALSE;
localtm = localtime(&t);
}
int32 randval;
if ( bUseRandomTable )
- randval = AudioManager.GetRandomNumber(1);
+ randval = AudioManager.m_anRandomTable[1];
else
randval = localtm->tm_sec * localtm->tm_min;
@@ -1101,7 +1022,7 @@ cSampleManager::Initialise(void)
randmp3 = randmp3->pNext;
if ( bUseRandomTable )
- _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength;
+ _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength;
else
{
if ( localtm->tm_sec > 0 )
@@ -1110,37 +1031,76 @@ cSampleManager::Initialise(void)
_CurMP3Pos = s*s*s*s*s*s*s*s % randmp3->nTrackLength;
}
else
- _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength;
+ _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength;
}
}
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
- return true;
+ return TRUE;
}
void
cSampleManager::Terminate(void)
{
for (int32 i = 0; i < MAX_STREAMS; i++)
+ aStream[i]->Close();
+
+ for ( int32 i = 0; i < NUM_CHANNELS; i++ )
+ aChannel[i].Term();
+
+ if ( IsFXSupported() )
{
- CStream *stream = aStream[i];
- if (stream)
+ if ( alIsEffect(ALEffect) )
{
- delete stream;
- aStream[i] = NULL;
+ alEffecti(ALEffect, AL_EFFECT_TYPE, AL_EFFECT_NULL);
+ alDeleteEffects(1, &ALEffect);
+ ALEffect = AL_EFFECT_NULL;
+ }
+
+ if (alIsAuxiliaryEffectSlot(ALEffectSlot))
+ {
+ alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, AL_EFFECT_NULL);
+
+ alDeleteAuxiliaryEffectSlots(1, &ALEffectSlot);
+ ALEffectSlot = AL_EFFECTSLOT_NULL;
}
}
-
- release_existing();
+
+ for ( int32 i = 0; i < MAX_STREAMS; i++ )
+ {
+ alDeleteBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
+ }
+ alDeleteSources(MAX_STREAMS*2, ALStreamSources[0]);
+
+ CChannel::DestroyChannels();
+
+ if ( ALContext )
+ {
+ alcMakeContextCurrent(NULL);
+ alcSuspendContext(ALContext);
+ alcDestroyContext(ALContext);
+ }
+ if ( ALDevice )
+ alcCloseDevice(ALDevice);
+
+ ALDevice = NULL;
+ ALContext = NULL;
+
+ _fPrevEaxRatioDestination = 0.0f;
+ _usingEFX = false;
+ _fEffectsLevel = 0.0f;
_DeleteMP3Entries();
CStream::Terminate();
+ for(int32 i = 0; i < MAX_STREAMS; i++)
+ delete aStream[i];
+
if ( nSampleBankMemoryStartAddress[SFX_BANK_0] != 0 )
{
free((void *)nSampleBankMemoryStartAddress[SFX_BANK_0]);
@@ -1153,12 +1113,12 @@ cSampleManager::Terminate(void)
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = 0;
}
- _bSampmanInitialised = false;
+ _bSampmanInitialised = FALSE;
}
-bool cSampleManager::CheckForAnAudioFileOnCD(void)
+bool8 cSampleManager::CheckForAnAudioFileOnCD(void)
{
- return true;
+ return TRUE;
}
char cSampleManager::GetCDAudioDriveLetter(void)
@@ -1171,7 +1131,7 @@ cSampleManager::UpdateEffectsVolume(void)
{
if ( _bSampmanInitialised )
{
- for ( int32 i = 0; i < MAXCHANNELS+MAX2DCHANNELS; i++ )
+ for ( int32 i = 0; i < NUM_CHANNELS; i++ )
{
if ( GetChannelUsedFlag(i) )
{
@@ -1214,19 +1174,19 @@ cSampleManager::SetMonoMode(uint8 nMode)
m_nMonoMode = nMode;
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
if ( MusicManager.IsInitialised()
&& MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
&& nBank != SFX_BANK_0 )
{
- return false;
+ return FALSE;
}
#ifdef OPUS_SFX
@@ -1245,14 +1205,14 @@ cSampleManager::LoadSampleBank(uint8 nBank)
}
#else
if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank], fpSampleDataHandle) != nSampleBankSize[nBank] )
- return false;
+ return FALSE;
#endif
- bSampleBankLoaded[nBank] = true;
+ bSampleBankLoaded[nBank] = TRUE;
- return true;
+ return TRUE;
}
void
@@ -1260,10 +1220,10 @@ cSampleManager::UnloadSampleBank(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
- bSampleBankLoaded[nBank] = false;
+ bSampleBankLoaded[nBank] = FALSE;
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
ASSERT( nBank < MAX_SFX_BANKS);
@@ -1271,39 +1231,39 @@ cSampleManager::IsSampleBankLoaded(uint8 nBank)
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- int8 slot;
-
for ( int32 i = 0; i < _TODOCONST(3); i++ )
{
- slot = nCurrentPedSlot - i - 1;
#ifdef FIX_BUGS
+ int8 slot = (int8)nCurrentPedSlot - i - 1;
if (slot < 0)
slot += ARRAY_SIZE(nPedSlotSfx);
+#else
+ uint8 slot = nCurrentPedSlot - i - 1;
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32
cSampleManager::_GetPedCommentSlot(uint32 nComment)
{
- int8 slot;
-
for (int32 i = 0; i < _TODOCONST(3); i++)
{
- slot = nCurrentPedSlot - i - 1;
#ifdef FIX_BUGS
+ int8 slot = (int8)nCurrentPedSlot - i - 1;
if (slot < 0)
slot += ARRAY_SIZE(nPedSlotSfx);
+#else
+ uint8 slot = nCurrentPedSlot - i - 1;
#endif
if (nComment == nPedSlotSfx[slot])
return slot;
@@ -1312,13 +1272,13 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
// no talking peds during cutsenes or the game end
if ( MusicManager.IsInitialised() )
@@ -1327,15 +1287,15 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
case MUSICMODE_FRONTEND:
{
- if ( MusicManager.GetCurrentTrack() == STREAMED_SOUND_GAME_COMPLETED )
- return false;
+ if ( MusicManager.GetNextTrack() == STREAMED_SOUND_GAME_COMPLETED )
+ return FALSE;
break;
}
@@ -1350,17 +1310,17 @@ cSampleManager::LoadPedComment(uint32 nComment)
int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead),
samplesSize, NULL);
if (size <= 0) {
- return false;
+ return FALSE;
}
samplesRead += size * 2;
samplesSize -= size;
}
#else
if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize )
- return false;
+ return FALSE;
#endif
nPedSlotSfx[nCurrentPedSlot] = nComment;
@@ -1368,7 +1328,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1411,17 +1371,23 @@ cSampleManager::GetSampleLength(uint32 nSample)
return m_aSamples[nSample].nSize / sizeof(uint16);
}
-bool cSampleManager::UpdateReverb(void)
+bool8 cSampleManager::UpdateReverb(void)
{
if ( !usingEAX && !_usingEFX )
- return false;
+ return FALSE;
- if ( AudioManager.GetFrameCounter() & 15 )
- return false;
-
- float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
- float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
- float z = AudioManager.GetReflectionsDistance(REFLECTION_UP);
+ if ( AudioManager.m_FrameCounter & 15 )
+ return FALSE;
+
+#ifdef AUDIO_REFLECTIONS
+ float y = AudioManager.m_afReflectionsDistances[REFLECTION_TOP] + AudioManager.m_afReflectionsDistances[REFLECTION_BOTTOM];
+ float x = AudioManager.m_afReflectionsDistances[REFLECTION_LEFT] + AudioManager.m_afReflectionsDistances[REFLECTION_RIGHT];
+ float z = AudioManager.m_afReflectionsDistances[REFLECTION_UP];
+#else
+ float x = 0.0f;
+ float y = 0.0f;
+ float z = 0.0f;
+#endif
float normy = norm(y, 5.0f, 40.0f);
float normx = norm(x, 5.0f, 40.0f);
@@ -1433,12 +1399,12 @@ bool cSampleManager::UpdateReverb(void)
float fRatio = CALCRATIO(normx, normy, normz, 0.3f, 0.5f, (normy+normx+normz)/3.0f);
#undef CALCRATIO
- #undef ZE
+ #undef ZR
- fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
+ fRatio = Clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
#ifdef JUICY_OAL
if ( usingEAX3 || _usingEFX )
@@ -1473,13 +1439,13 @@ bool cSampleManager::UpdateReverb(void)
_fPrevEaxRatioDestination = fRatio;
- return true;
+ return TRUE;
}
void
-cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
+cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
if ( usingEAX || _usingEFX )
{
@@ -1487,7 +1453,7 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
{
alAuxiliaryEffectSloti(ALEffectSlot, AL_EFFECTSLOT_EFFECT, ALEffect);
- if ( nReverbFlag != 0 )
+ if ( nReverbFlag != FALSE )
aChannel[nChannel].SetReverbMix(ALEffectSlot, _fEffectsLevel);
else
aChannel[nChannel].SetReverbMix(ALEffectSlot, 0.0f);
@@ -1495,24 +1461,24 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
}
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
uintptr addr;
if ( nSfx < SAMPLEBANK_MAX )
{
if ( !IsSampleBankLoaded(nBank) )
- return false;
+ return FALSE;
addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset;
}
else
{
if ( !IsPedCommentLoaded(nSfx) )
- return false;
+ return FALSE;
int32 slot = _GetPedCommentSlot(nSfx);
addr = (nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE * slot);
@@ -1530,17 +1496,16 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
aChannel[nChannel].SetSampleData ((void*)addr, m_aSamples[nSfx].nSize, m_aSamples[nSfx].nFrequency);
aChannel[nChannel].SetLoopPoints (0, -1);
aChannel[nChannel].SetPitch (1.0f);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
{
- ASSERT( nChannel != CHANNEL2D );
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < MAXCHANNELS );
uint32 vol = nVolume;
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
@@ -1549,8 +1514,8 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
// reduce channel volume when JB.MP3 or S4_BDBD.MP3 playing
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
{
nChannelVolume[nChannel] = vol / 4;
}
@@ -1562,8 +1527,7 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
void
cSampleManager::SetChannel3DPosition(uint32 nChannel, float fX, float fY, float fZ)
{
- ASSERT( nChannel != CHANNEL2D );
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < MAXCHANNELS );
aChannel[nChannel].SetPosition(-fX, fY, fZ);
}
@@ -1571,18 +1535,17 @@ cSampleManager::SetChannel3DPosition(uint32 nChannel, float fX, float fY, float
void
cSampleManager::SetChannel3DDistances(uint32 nChannel, float fMax, float fMin)
{
- ASSERT( nChannel != CHANNEL2D );
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < MAXCHANNELS );
aChannel[nChannel].SetDistances(fMax, fMin);
}
void
cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
{
- ASSERT( nChannel == CHANNEL2D );
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel >= MAXCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
- if ( nChannel == CHANNEL2D )
+ if ( nChannel == CHANNEL_POLICE_RADIO )
{
uint32 vol = nVolume;
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
@@ -1591,8 +1554,8 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
// reduce the volume for JB.MP3 and S4_BDBD.MP3
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_NEWS_INTRO
- && MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
+ && MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
{
nChannelVolume[nChannel] = vol / 4;
}
@@ -1604,10 +1567,10 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
void
cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
{
- ASSERT(nChannel == CHANNEL2D);
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel >= MAXCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
- if ( nChannel == CHANNEL2D )
+ if ( nChannel == CHANNEL_POLICE_RADIO )
{
aChannel[nChannel].SetPan(nPan);
}
@@ -1616,7 +1579,7 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
void
cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
aChannel[nChannel].SetCurrentFreq(nFreq);
}
@@ -1624,7 +1587,7 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
void
cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
aChannel[nChannel].SetLoopPoints(nLoopStart / (DIGITALBITS / 8), nLoopEnd / (DIGITALBITS / 8));
}
@@ -1632,15 +1595,15 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n
void
cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
aChannel[nChannel].SetLoopCount(nLoopCount);
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
return aChannel[nChannel].IsUsed();
}
@@ -1648,7 +1611,7 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
void
cSampleManager::StartChannel(uint32 nChannel)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
aChannel[nChannel].Start();
}
@@ -1656,7 +1619,7 @@ cSampleManager::StartChannel(uint32 nChannel)
void
cSampleManager::StopChannel(uint32 nChannel)
{
- ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS );
+ ASSERT( nChannel < NUM_CHANNELS );
aChannel[nChannel].Stop();
}
@@ -1664,42 +1627,35 @@ cSampleManager::StopChannel(uint32 nChannel)
void
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
{
- char filename[MAX_PATH];
-
ASSERT( nStream < MAX_STREAMS );
if ( nFile < TOTAL_STREAMED_SOUNDS )
{
- if ( aStream[nStream] )
+ CStream *stream = aStream[nStream];
+
+ stream->Close();
+
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ if ( !stream->Setup() )
{
- delete aStream[nStream];
- aStream[nStream] = NULL;
- }
-
- strcpy(filename, StreamedNameTable[nFile]);
-
- CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- ASSERT(stream != NULL);
-
- aStream[nStream] = stream;
- if ( !stream->IsOpened() )
- {
- delete stream;
- aStream[nStream] = NULL;
+ stream->Close();
}
}
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
CStream *stream = aStream[nStream];
- if ( stream )
+ if ( stream->IsOpened() )
{
- stream->SetPause(nPauseFlag != 0);
+ stream->SetPause(nPauseFlag != FALSE);
}
}
@@ -1710,183 +1666,152 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
CStream *stream = aStream[nStream];
- if ( stream )
+ if ( stream->IsOpened() )
{
- if ( stream->Setup() )
- {
- stream->Start();
- }
+ stream->Start();
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
{
+ uint32 i = 0;
uint32 position = nPos;
- char filename[256];
-
- ASSERT( nStream < MAX_STREAMS );
-
- if ( nFile < TOTAL_STREAMED_SOUNDS )
+ char filename[MAX_PATH];
+
+ if ( nFile >= TOTAL_STREAMED_SOUNDS )
+ return FALSE;
+
+ aStream[nStream]->Close();
+
+ if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER )
{
- if ( aStream[nStream] )
+ do
{
- delete aStream[nStream];
- aStream[nStream] = NULL;
- }
-
- if ( nFile == STREAMED_SOUND_RADIO_MP3_PLAYER )
- {
- uint32 i = 0;
- do {
- if(i != 0 || _bIsMp3Active) {
- if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0;
-
- _CurMP3Pos = 0;
-
- tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index);
-
- if(mp3) {
- mp3 = _pMP3List;
- if(mp3 == NULL) {
- _bIsMp3Active = false;
- nFile = 0;
- strcat(filename, StreamedNameTable[nFile]);
-
- CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- ASSERT(stream != NULL);
-
- aStream[nStream] = stream;
-
- if (stream->IsOpened()) {
- if (stream->Setup()) {
- if (position != 0)
- stream->SetPosMS(position);
-
- stream->Start();
- }
-
- return true;
- } else {
- delete stream;
- aStream[nStream] = NULL;
- }
-
- return false;
- }
- }
-
- if (mp3->pLinkPath != NULL)
- aStream[nStream] = new CStream(mp3->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- else {
- strcpy(filename, _mp3DirectoryPath);
- strcat(filename, mp3->aFilename);
-
- aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- }
-
- if (aStream[nStream]->IsOpened()) {
- if (aStream[nStream]->Setup()) {
- aStream[nStream]->Start();
- }
-
- return true;
- } else {
- delete aStream[nStream];
- aStream[nStream] = NULL;
- }
-
- _bIsMp3Active = false;
- continue;
- }
+ // Switched to MP3 player just now
+ if ( !_bIsMp3Active && i == 0 )
+ {
if ( nPos > nStreamLength[STREAMED_SOUND_RADIO_MP3_PLAYER] )
position = 0;
-
- tMP3Entry *e;
- if ( !_GetMP3PosFromStreamPos(&position, &e) )
- {
- if ( e == NULL )
- {
- nFile = 0;
- strcat(filename, StreamedNameTable[nFile]);
- CStream* stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- ASSERT(stream != NULL);
+ tMP3Entry *e = _pMP3List;
- aStream[nStream] = stream;
+ // Try to continue from previous song, if already started
+ if(!_GetMP3PosFromStreamPos(&position, &e) && !e) {
+ nFile = 0;
+ CStream *stream = aStream[nStream];
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ if ( stream->Setup() ) {
+ if (position != 0)
+ stream->SetPosMS(position);
- if (stream->IsOpened()) {
- if (stream->Setup()) {
- if (position != 0)
- stream->SetPosMS(position);
+ stream->Start();
- stream->Start();
- }
-
- return true;
- } else {
- delete stream;
- aStream[nStream] = NULL;
- }
-
- return false;
+ return TRUE;
+ } else {
+ stream->Close();
}
- }
+ return FALSE;
- if (e->pLinkPath != NULL)
- aStream[nStream] = new CStream(e->pLinkPath, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- else {
- strcpy(filename, _mp3DirectoryPath);
- strcat(filename, e->aFilename);
+ } else {
+ if (e->pLinkPath != NULL)
+ aStream[nStream]->Open(e->pLinkPath, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ else {
+ strcpy(filename, _mp3DirectoryPath);
+ strcat(filename, e->aFilename);
- aStream[nStream] = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream]);
- }
-
- if (aStream[nStream]->IsOpened()) {
+ aStream[nStream]->Open(filename);
+ }
+
if (aStream[nStream]->Setup()) {
if (position != 0)
aStream[nStream]->SetPosMS(position);
aStream[nStream]->Start();
+
+ _bIsMp3Active = TRUE;
+ return TRUE;
+ } else {
+ aStream[nStream]->Close();
}
-
- _bIsMp3Active = true;
- return true;
- } else {
- delete aStream[nStream];
- aStream[nStream] = NULL;
+ // fall through, start playing from another song
}
-
- _bIsMp3Active = false;
+ } else {
+ if(++_CurMP3Index >= nNumMP3s) _CurMP3Index = 0;
- } while(++i < nNumMP3s);
+ _CurMP3Pos = 0;
- position = 0;
- nFile = 0;
- }
+ tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index);
+ if ( !mp3 )
+ {
+ mp3 = _pMP3List;
+ if ( !_pMP3List )
+ {
+ nFile = 0;
+ _bIsMp3Active = FALSE;
+ CStream *stream = aStream[nStream];
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- strcpy(filename, StreamedNameTable[nFile]);
-
- CStream *stream = new CStream(filename, ALStreamSources[nStream], ALStreamBuffers[nStream], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- ASSERT(stream != NULL);
+ if (stream->Setup()) {
+ if (position != 0)
+ stream->SetPosMS(position);
- aStream[nStream] = stream;
-
- if ( stream->IsOpened() ) {
- if ( stream->Setup() ) {
- if (position != 0)
- stream->SetPosMS(position);
+ stream->Start();
+
+ return TRUE;
+ } else {
+ stream->Close();
+ }
+ return FALSE;
+ }
+ }
+ if (mp3->pLinkPath != NULL)
+ aStream[nStream]->Open(mp3->pLinkPath, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ else {
+ strcpy(filename, _mp3DirectoryPath);
+ strcat(filename, mp3->aFilename);
+ aStream[nStream]->Open(filename, IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
+ }
+
+ if (aStream[nStream]->Setup()) {
+ aStream[nStream]->Start();
+#ifdef FIX_BUGS
+ _bIsMp3Active = TRUE;
+#endif
+ return TRUE;
+ } else {
+ aStream[nStream]->Close();
+ }
- stream->Start();
}
-
- return true;
- } else {
- delete stream;
- aStream[nStream] = NULL;
+ _bIsMp3Active = FALSE;
}
+ while ( ++i < nNumMP3s );
+ position = 0;
+ nFile = 0;
}
+ CStream *stream = aStream[nStream];
+#ifdef PS2_AUDIO_PATHS
+ if(!stream->Open(PS2StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000))
+#endif
+ stream->Open(StreamedNameTable[nFile], IsThisTrackAt16KHz(nFile) ? 16000 : 32000);
- return false;
+ if ( stream->Setup() ) {
+ if (position != 0)
+ stream->SetPosMS(position);
+
+ stream->Start();
+
+ return TRUE;
+ } else {
+ stream->Close();
+ }
+ return FALSE;
}
void
@@ -1896,11 +1821,10 @@ cSampleManager::StopStreamedFile(uint8 nStream)
CStream *stream = aStream[nStream];
- if ( stream )
- {
- delete stream;
- aStream[nStream] = NULL;
- }
+ stream->Close();
+
+ if ( nStream == 0 )
+ _bIsMp3Active = FALSE;
}
int32
@@ -1910,9 +1834,23 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
CStream *stream = aStream[nStream];
- if ( stream )
+ if ( stream->IsOpened() )
{
- return stream->GetPosMS();
+ if ( _bIsMp3Active )
+ {
+ tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index);
+
+ if ( mp3 != NULL )
+ {
+ return stream->GetPosMS() + mp3->nTrackStreamPos;
+ }
+ else
+ return 0;
+ }
+ else
+ {
+ return stream->GetPosMS();
+ }
}
return 0;
@@ -1934,7 +1872,7 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect
CStream *stream = aStream[nStream];
- if ( stream )
+ if ( stream->IsOpened() )
{
if ( nEffectFlag )
stream->SetVolume(m_nEffectsFadeVolume*nVolume*m_nEffectsVolume >> 14);
@@ -1953,20 +1891,20 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return nStreamLength[nStream];
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
ASSERT( nStream < MAX_STREAMS );
CStream *stream = aStream[nStream];
- if ( stream )
+ if ( stream->IsOpened() )
{
if ( stream->IsPlaying() )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -1976,19 +1914,25 @@ cSampleManager::Service(void)
{
CStream *stream = aStream[i];
- if ( stream )
+ if ( stream->IsOpened() )
stream->Update();
}
+ int refCount = CChannel::channelsThatNeedService;
+ for ( int32 i = 0; refCount && i < NUM_CHANNELS; i++ )
+ {
+ if ( aChannel[i].Update() )
+ refCount--;
+ }
}
-bool
+bool8
cSampleManager::InitialiseSampleBanks(void)
{
int32 nBank = SFX_BANK_0;
fpSampleDescHandle = fcaseopen(SampleBankDescFilename, "rb");
if ( fpSampleDescHandle == NULL )
- return false;
+ return FALSE;
#ifndef OPUS_SFX
fpSampleDataHandle = fcaseopen(SampleBankDataFilename, "rb");
if ( fpSampleDataHandle == NULL )
@@ -1996,7 +1940,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2039,6 +1983,6 @@ cSampleManager::InitialiseSampleBanks(void)
nSampleBankSize[SFX_BANK_0] = nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS] - nSampleBankDiscStartOffset[SFX_BANK_0];
nSampleBankSize[SFX_BANK_PED_COMMENTS] = _nSampleDataEndOffset - nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS];
- return true;
+ return TRUE;
}
#endif
diff --git a/src/audio/soundlist.h b/src/audio/soundlist.h
index 7c3b30a7..4bbc3dde 100644
--- a/src/audio/soundlist.h
+++ b/src/audio/soundlist.h
@@ -160,7 +160,7 @@ enum eSound
SOUND_FRONTEND_MONO,
SOUND_FRONTEND_AUDIO_TEST,
SOUND_FRONTEND_FAIL,
- SOUND_FRONTEND_NO_RADIO,
+ SOUND_FRONTEND_RADIO_TURN_OFF,
SOUND_FRONTEND_RADIO_CHANGE,
SOUND_HUD,
SOUND_AMMUNATION_WELCOME_1,
diff --git a/src/buildings/Building.cpp b/src/buildings/Building.cpp
index 00bbb21e..e4475ae6 100644
--- a/src/buildings/Building.cpp
+++ b/src/buildings/Building.cpp
@@ -4,8 +4,8 @@
#include "Streaming.h"
#include "Pools.h"
-void *CBuilding::operator new(size_t sz) { return CPools::GetBuildingPool()->New(); }
-void CBuilding::operator delete(void *p, size_t sz) { CPools::GetBuildingPool()->Delete((CBuilding*)p); }
+void *CBuilding::operator new(size_t sz) throw() { return CPools::GetBuildingPool()->New(); }
+void CBuilding::operator delete(void *p, size_t sz) throw() { CPools::GetBuildingPool()->Delete((CBuilding*)p); }
void
CBuilding::ReplaceWithNewModel(int32 id)
diff --git a/src/buildings/Building.h b/src/buildings/Building.h
index 3586a8dc..94e66c89 100644
--- a/src/buildings/Building.h
+++ b/src/buildings/Building.h
@@ -9,8 +9,8 @@ public:
m_type = ENTITY_TYPE_BUILDING;
bUsesCollision = true;
}
- static void *operator new(size_t);
- static void operator delete(void*, size_t);
+ static void *operator new(size_t) throw();
+ static void operator delete(void*, size_t) throw();
void ReplaceWithNewModel(int32 id);
diff --git a/src/buildings/Treadable.cpp b/src/buildings/Treadable.cpp
index 00abbe13..d84603a6 100644
--- a/src/buildings/Treadable.cpp
+++ b/src/buildings/Treadable.cpp
@@ -4,5 +4,5 @@
#include "Treadable.h"
#include "Pools.h"
-void *CTreadable::operator new(size_t sz) { return CPools::GetTreadablePool()->New(); }
-void CTreadable::operator delete(void *p, size_t sz) { CPools::GetTreadablePool()->Delete((CTreadable*)p); }
+void *CTreadable::operator new(size_t sz) throw() { return CPools::GetTreadablePool()->New(); }
+void CTreadable::operator delete(void *p, size_t sz) throw() { CPools::GetTreadablePool()->Delete((CTreadable*)p); }
diff --git a/src/buildings/Treadable.h b/src/buildings/Treadable.h
index c3160f47..9e895969 100644
--- a/src/buildings/Treadable.h
+++ b/src/buildings/Treadable.h
@@ -5,8 +5,8 @@
class CTreadable : public CBuilding
{
public:
- static void *operator new(size_t);
- static void operator delete(void*, size_t);
+ static void *operator new(size_t) throw();
+ static void operator delete(void*, size_t) throw();
int16 m_nodeIndices[2][12]; // first car, then ped
diff --git a/src/collision/Collision.cpp b/src/collision/Collision.cpp
index 9d656581..832d773e 100644
--- a/src/collision/Collision.cpp
+++ b/src/collision/Collision.cpp
@@ -130,7 +130,7 @@ GetCollisionInSectorList(CPtrList &list)
for(node = list.first; node; node = node->next){
e = (CEntity*)node->item;
- level = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel()->level;
+ level = CModelInfo::GetColModel(e->GetModelIndex())->level;
if(level != LEVEL_GENERIC)
return (eLevelName)level;
}
diff --git a/src/control/AutoPilot.cpp b/src/control/AutoPilot.cpp
index 4038c93e..5af4071a 100644
--- a/src/control/AutoPilot.cpp
+++ b/src/control/AutoPilot.cpp
@@ -5,6 +5,7 @@
#include "CarCtrl.h"
#include "Curves.h"
#include "PathFind.h"
+#include "SaveBuf.h"
void CAutoPilot::ModifySpeed(float speed)
{
@@ -49,78 +50,79 @@ void CAutoPilot::RemoveOnePathNode()
#ifdef COMPATIBLE_SAVES
void CAutoPilot::Save(uint8*& buf)
{
- WriteSaveBuf(buf, m_nCurrentRouteNode);
- WriteSaveBuf(buf, m_nNextRouteNode);
- WriteSaveBuf(buf, m_nPrevRouteNode);
- WriteSaveBuf(buf, m_nTimeEnteredCurve);
- WriteSaveBuf(buf, m_nTimeToSpendOnCurrentCurve);
- WriteSaveBuf(buf, m_nCurrentPathNodeInfo);
- WriteSaveBuf(buf, m_nNextPathNodeInfo);
- WriteSaveBuf(buf, m_nPreviousPathNodeInfo);
- WriteSaveBuf(buf, m_nAntiReverseTimer);
- WriteSaveBuf(buf, m_nTimeToStartMission);
- WriteSaveBuf(buf, m_nPreviousDirection);
- WriteSaveBuf(buf, m_nCurrentDirection);
- WriteSaveBuf(buf, m_nNextDirection);
- WriteSaveBuf(buf, m_nCurrentLane);
- WriteSaveBuf(buf, m_nNextLane);
- WriteSaveBuf(buf, m_nDrivingStyle);
- WriteSaveBuf(buf, m_nCarMission);
- WriteSaveBuf(buf, m_nTempAction);
- WriteSaveBuf(buf, m_nTimeTempAction);
- WriteSaveBuf(buf, m_fMaxTrafficSpeed);
- WriteSaveBuf(buf, m_nCruiseSpeed);
+ WriteSaveBuf(buf, m_nCurrentRouteNode);
+ WriteSaveBuf(buf, m_nNextRouteNode);
+ WriteSaveBuf(buf, m_nPrevRouteNode);
+ WriteSaveBuf(buf, m_nTimeEnteredCurve);
+ WriteSaveBuf(buf, m_nTimeToSpendOnCurrentCurve);
+ WriteSaveBuf(buf, m_nCurrentPathNodeInfo);
+ WriteSaveBuf(buf, m_nNextPathNodeInfo);
+ WriteSaveBuf(buf, m_nPreviousPathNodeInfo);
+ WriteSaveBuf(buf, m_nAntiReverseTimer);
+ WriteSaveBuf(buf, m_nTimeToStartMission);
+ WriteSaveBuf(buf, m_nPreviousDirection);
+ WriteSaveBuf(buf, m_nCurrentDirection);
+ WriteSaveBuf(buf, m_nNextDirection);
+ WriteSaveBuf(buf, m_nCurrentLane);
+ WriteSaveBuf(buf, m_nNextLane);
+ WriteSaveBuf(buf, m_nDrivingStyle);
+ WriteSaveBuf(buf, m_nCarMission);
+ WriteSaveBuf(buf, m_nTempAction);
+ WriteSaveBuf(buf, m_nTimeTempAction);
+ WriteSaveBuf(buf, m_fMaxTrafficSpeed);
+ WriteSaveBuf(buf, m_nCruiseSpeed);
uint8 flags = 0;
if (m_bSlowedDownBecauseOfCars) flags |= BIT(0);
if (m_bSlowedDownBecauseOfPeds) flags |= BIT(1);
if (m_bStayInCurrentLevel) flags |= BIT(2);
if (m_bStayInFastLane) flags |= BIT(3);
if (m_bIgnorePathfinding) flags |= BIT(4);
- WriteSaveBuf(buf, flags);
- SkipSaveBuf(buf, 2);
- WriteSaveBuf(buf, m_vecDestinationCoors.x);
- WriteSaveBuf(buf, m_vecDestinationCoors.y);
- WriteSaveBuf(buf, m_vecDestinationCoors.z);
- SkipSaveBuf(buf, 32);
- WriteSaveBuf(buf, m_nPathFindNodesCount);
- SkipSaveBuf(buf, 6);
+ WriteSaveBuf(buf, flags);
+ ZeroSaveBuf(buf, 2);
+ WriteSaveBuf(buf, m_vecDestinationCoors.x);
+ WriteSaveBuf(buf, m_vecDestinationCoors.y);
+ WriteSaveBuf(buf, m_vecDestinationCoors.z);
+ ZeroSaveBuf(buf, 32);
+ WriteSaveBuf(buf, m_nPathFindNodesCount);
+ ZeroSaveBuf(buf, 6);
}
void CAutoPilot::Load(uint8*& buf)
{
- m_nCurrentRouteNode = ReadSaveBuf(buf);
- m_nNextRouteNode = ReadSaveBuf(buf);
- m_nPrevRouteNode = ReadSaveBuf(buf);
- m_nTimeEnteredCurve = ReadSaveBuf(buf);
- m_nTimeToSpendOnCurrentCurve = ReadSaveBuf(buf);
- m_nCurrentPathNodeInfo = ReadSaveBuf(buf);
- m_nNextPathNodeInfo = ReadSaveBuf(buf);
- m_nPreviousPathNodeInfo = ReadSaveBuf(buf);
- m_nAntiReverseTimer = ReadSaveBuf(buf);
- m_nTimeToStartMission = ReadSaveBuf(buf);
- m_nPreviousDirection = ReadSaveBuf(buf);
- m_nCurrentDirection = ReadSaveBuf(buf);
- m_nNextDirection = ReadSaveBuf(buf);
- m_nCurrentLane = ReadSaveBuf(buf);
- m_nNextLane = ReadSaveBuf(buf);
- m_nDrivingStyle = ReadSaveBuf(buf);
- m_nCarMission = ReadSaveBuf(buf);
- m_nTempAction = ReadSaveBuf(buf);
- m_nTimeTempAction = ReadSaveBuf(buf);
- m_fMaxTrafficSpeed = ReadSaveBuf(buf);
- m_nCruiseSpeed = ReadSaveBuf(buf);
- uint8 flags = ReadSaveBuf(buf);
+ ReadSaveBuf(&m_nCurrentRouteNode, buf);
+ ReadSaveBuf(&m_nNextRouteNode, buf);
+ ReadSaveBuf(&m_nPrevRouteNode, buf);
+ ReadSaveBuf(&m_nTimeEnteredCurve, buf);
+ ReadSaveBuf(&m_nTimeToSpendOnCurrentCurve, buf);
+ ReadSaveBuf(&m_nCurrentPathNodeInfo, buf);
+ ReadSaveBuf(&m_nNextPathNodeInfo, buf);
+ ReadSaveBuf(&m_nPreviousPathNodeInfo, buf);
+ ReadSaveBuf(&m_nAntiReverseTimer, buf);
+ ReadSaveBuf(&m_nTimeToStartMission, buf);
+ ReadSaveBuf(&m_nPreviousDirection, buf);
+ ReadSaveBuf(&m_nCurrentDirection, buf);
+ ReadSaveBuf(&m_nNextDirection, buf);
+ ReadSaveBuf(&m_nCurrentLane, buf);
+ ReadSaveBuf(&m_nNextLane, buf);
+ ReadSaveBuf(&m_nDrivingStyle, buf);
+ ReadSaveBuf(&m_nCarMission, buf);
+ ReadSaveBuf(&m_nTempAction, buf);
+ ReadSaveBuf(&m_nTimeTempAction, buf);
+ ReadSaveBuf(&m_fMaxTrafficSpeed, buf);
+ ReadSaveBuf(&m_nCruiseSpeed, buf);
+ uint8 flags;
+ ReadSaveBuf(&flags, buf);
m_bSlowedDownBecauseOfCars = !!(flags & BIT(0));
m_bSlowedDownBecauseOfPeds = !!(flags & BIT(1));
m_bStayInCurrentLevel = !!(flags & BIT(2));
m_bStayInFastLane = !!(flags & BIT(3));
m_bIgnorePathfinding = !!(flags & BIT(4));
SkipSaveBuf(buf, 2);
- m_vecDestinationCoors.x = ReadSaveBuf(buf);
- m_vecDestinationCoors.y = ReadSaveBuf(buf);
- m_vecDestinationCoors.z = ReadSaveBuf(buf);
+ ReadSaveBuf(&m_vecDestinationCoors.x, buf);
+ ReadSaveBuf(&m_vecDestinationCoors.y, buf);
+ ReadSaveBuf(&m_vecDestinationCoors.z, buf);
SkipSaveBuf(buf, 32);
- m_nPathFindNodesCount = ReadSaveBuf(buf);
+ ReadSaveBuf(&m_nPathFindNodesCount, buf);
SkipSaveBuf(buf, 6);
}
#endif
\ No newline at end of file
diff --git a/src/control/AutoPilot.h b/src/control/AutoPilot.h
index 6349fce6..c7707ed6 100644
--- a/src/control/AutoPilot.h
+++ b/src/control/AutoPilot.h
@@ -57,8 +57,8 @@ public:
int32 m_nCurrentRouteNode;
int32 m_nNextRouteNode;
int32 m_nPrevRouteNode;
- uint32 m_nTimeEnteredCurve;
- uint32 m_nTimeToSpendOnCurrentCurve;
+ int32 m_nTimeEnteredCurve;
+ int32 m_nTimeToSpendOnCurrentCurve;
uint32 m_nCurrentPathNodeInfo;
uint32 m_nNextPathNodeInfo;
uint32 m_nPreviousPathNodeInfo;
diff --git a/src/control/CarAI.cpp b/src/control/CarAI.cpp
index d2a82121..ffde7aba 100644
--- a/src/control/CarAI.cpp
+++ b/src/control/CarAI.cpp
@@ -510,8 +510,18 @@ void CCarAI::TellOccupantsToLeaveCar(CVehicle* pVehicle)
{
if (pVehicle->pDriver){
pVehicle->pDriver->SetObjective(OBJECTIVE_LEAVE_CAR, pVehicle);
- if (pVehicle->GetModelIndex() == MI_AMBULAN)
+ switch (pVehicle->GetModelIndex()) {
+ case MI_FIRETRUCK:
+ case MI_FBICAR:
+ case MI_ENFORCER:
+ case MI_BARRACKS:
+ case MI_RHINO:
+ case MI_POLICE:
+ break;
+ case MI_AMBULAN:
pVehicle->pDriver->Say(SOUND_PED_LEAVE_VEHICLE);
+ break;
+ }
}
int timer = 100;
for (int i = 0; i < pVehicle->m_nNumMaxPassengers; i++){
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index 25ced498..2085681a 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -77,7 +77,7 @@ int32 CCarCtrl::NumRandomCars;
int32 CCarCtrl::NumParkedCars;
int32 CCarCtrl::NumPermanentCars;
int8 CCarCtrl::CountDownToCarsAtStart;
-int32 CCarCtrl::MaxNumberOfCarsInUse = 12;
+int32 CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS;
uint32 CCarCtrl::LastTimeLawEnforcerCreated;
uint32 CCarCtrl::LastTimeFireTruckCreated;
uint32 CCarCtrl::LastTimeAmbulanceCreated;
@@ -354,7 +354,7 @@ CCarCtrl::GenerateOneRandomCar()
pVehicle->m_bSirenOrAlarm = true;
pVehicle->AutoPilot.m_nNextPathNodeInfo = connectionId;
pVehicle->AutoPilot.m_nNextLane = pVehicle->AutoPilot.m_nCurrentLane = CGeneral::GetRandomNumber() % lanesOnCurrentRoad;
- CColBox* boundingBox = &CModelInfo::GetModelInfo(pVehicle->GetModelIndex())->GetColModel()->boundingBox;
+ CColBox* boundingBox = &CModelInfo::GetColModel(pVehicle->GetModelIndex())->boundingBox;
float carLength = 1.0f + (boundingBox->max.y - boundingBox->min.y) / 2;
float distanceBetweenNodes = (pCurNode->GetPosition() - pNextNode->GetPosition()).Magnitude2D();
/* If car is so long that it doesn't fit between two car nodes, place it directly in the middle. */
@@ -731,6 +731,7 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
}
float distanceToPlayer = (pVehicle->GetPosition() - vecPlayerPos).Magnitude2D();
float threshold = 50.0f;
+#ifndef EXTENDED_OFFSCREEN_DESPAWN_RANGE
if (pVehicle->GetIsOnScreen() ||
TheCamera.Cams[TheCamera.ActiveCam].LookingLeft ||
TheCamera.Cams[TheCamera.ActiveCam].LookingRight ||
@@ -741,7 +742,9 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
pVehicle->GetModelIndex() == MI_FIRETRUCK ||
pVehicle->bIsLawEnforcer ||
pVehicle->bIsCarParkVehicle
- ){
+ )
+#endif
+ {
threshold = 130.0f * TheCamera.GenerationDistMultiplier;
}
if (pVehicle->bExtendedRange)
@@ -770,14 +773,16 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
delete pVehicle;
return;
}
- if (pVehicle->GetStatus() != STATUS_WRECKED || pVehicle->m_nTimeOfDeath == 0)
- return;
- if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 &&
- !(pVehicle->GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(pVehicle)) ){
- if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)){
- if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())){
- CWorld::Remove(pVehicle);
- delete pVehicle;
+ if (pVehicle->GetStatus() == STATUS_WRECKED) {
+ if (pVehicle->m_nTimeOfDeath != 0) {
+ if (CTimer::GetTimeInMilliseconds() > pVehicle->m_nTimeOfDeath + 60000 &&
+ !(pVehicle->GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(pVehicle))) {
+ if ((pVehicle->GetPosition() - vecPlayerPos).MagnitudeSqr() > SQR(7.5f)) {
+ if (!CGarages::IsPointWithinHideOutGarage(pVehicle->GetPosition())) {
+ CWorld::Remove(pVehicle);
+ delete pVehicle;
+ }
+ }
}
}
}
@@ -805,8 +810,8 @@ CCarCtrl::UpdateCarOnRails(CVehicle* pVehicle)
pVehicle->AutoPilot.ModifySpeed(0.0f);
if (CTimer::GetTimeInMilliseconds() > pVehicle->AutoPilot.m_nTempAction){
pVehicle->AutoPilot.m_nTempAction = TEMPACT_NONE;
- pVehicle->AutoPilot.m_nAntiReverseTimer = 0;
- pVehicle->AutoPilot.m_nTimeToStartMission = 0;
+ pVehicle->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds();
+ pVehicle->AutoPilot.m_nTimeToStartMission = CTimer::GetTimeInMilliseconds();
}
return;
}
@@ -1330,8 +1335,8 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float
forward.NormaliseSafe();
float forwardAngle = CGeneral::GetATanOfXY(forward.x, forward.y);
float angleDiff = angleBetweenVehicles - forwardAngle;
- float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * sin(angleDiff));
- float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * cos(angleDiff));
+ float lenProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.y * Sin(angleDiff));
+ float widthProjection = ABS(pOtherCar->GetColModel()->boundingBox.max.x * Cos(angleDiff));
float lengthToEvade = (2 * (lenProjection + widthProjection) + WIDTH_COEF_TO_WEAVE_SAFELY * 2 * pVehicle->GetColModel()->boundingBox.max.x) / distance;
float diffToLeftAngle = LimitRadianAngle(angleBetweenVehicles - *pAngleToWeaveLeft);
diffToLeftAngle = ABS(diffToLeftAngle);
@@ -2718,7 +2723,7 @@ bool CCarCtrl::GenerateOneEmergencyServicesCar(uint32 mi, CVector vecPos)
attempts += 1;
}
if (attempts >= 5)
- return nil;
+ return false;
CAutomobile* pVehicle = new CAutomobile(mi, RANDOM_VEHICLE);
pVehicle->AutoPilot.m_vecDestinationCoors = vecPos;
pVehicle->SetPosition(spawnPos);
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index d6e36875..bb919eae 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -24,13 +24,7 @@
#include "Vehicle.h"
#include "Wanted.h"
#include "World.h"
-
-#define CRUSHER_GARAGE_X1 (1135.5f)
-#define CRUSHER_GARAGE_Y1 (57.0f)
-#define CRUSHER_GARAGE_Z1 (-1.0f)
-#define CRUSHER_GARAGE_X2 (1149.5f)
-#define CRUSHER_GARAGE_Y2 (63.7f)
-#define CRUSHER_GARAGE_Z2 (3.5f)
+#include "SaveBuf.h"
#define ROTATED_DOOR_OPEN_SPEED (0.015f)
#define ROTATED_DOOR_CLOSE_SPEED (0.02f)
@@ -160,7 +154,7 @@ void CGarages::Init(void)
aCarsInSafeHouse3[i].Init();
hGarages = DMAudio.CreateEntity(AUDIOTYPE_GARAGE, (void*)1);
if (hGarages >= 0)
- DMAudio.SetEntityStatus(hGarages, true);
+ DMAudio.SetEntityStatus(hGarages, TRUE);
AddOne(
CVector(CRUSHER_GARAGE_X1, CRUSHER_GARAGE_Y1, CRUSHER_GARAGE_Z1),
CVector(CRUSHER_GARAGE_X2, CRUSHER_GARAGE_Y2, CRUSHER_GARAGE_Z2),
@@ -1882,11 +1876,12 @@ void CStoredCar::StoreCar(CVehicle* pVehicle)
m_nRadioStation = pVehicle->m_nRadioStation;
m_nVariationA = pVehicle->m_aExtras[0];
m_nVariationB = pVehicle->m_aExtras[1];
- m_bBulletproof = pVehicle->bBulletProof;
- m_bFireproof = pVehicle->bFireProof;
- m_bExplosionproof = pVehicle->bExplosionProof;
- m_bCollisionproof = pVehicle->bCollisionProof;
- m_bMeleeproof = pVehicle->bMeleeProof;
+ m_nFlags = 0;
+ if (pVehicle->bBulletProof) m_nFlags |= FLAG_BULLETPROOF;
+ if (pVehicle->bFireProof) m_nFlags |= FLAG_FIREPROOF;
+ if (pVehicle->bExplosionProof) m_nFlags |= FLAG_EXPLOSIONPROOF;
+ if (pVehicle->bCollisionProof) m_nFlags |= FLAG_COLLISIONPROOF;
+ if (pVehicle->bMeleeProof) m_nFlags |= FLAG_MELEEPROOF;
if (pVehicle->IsCar())
m_nCarBombType = ((CAutomobile*)pVehicle)->m_bombType;
}
@@ -1935,11 +1930,11 @@ CVehicle* CStoredCar::RestoreCar()
}
pVehicle->bHasBeenOwnedByPlayer = true;
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
- pVehicle->bBulletProof = m_bBulletproof;
- pVehicle->bFireProof = m_bFireproof;
- pVehicle->bExplosionProof = m_bExplosionproof;
- pVehicle->bCollisionProof = m_bCollisionproof;
- pVehicle->bMeleeProof = m_bMeleeproof;
+ if (m_nFlags & FLAG_BULLETPROOF) pVehicle->bBulletProof = true;
+ if (m_nFlags & FLAG_FIREPROOF) pVehicle->bFireProof = true;
+ if (m_nFlags & FLAG_EXPLOSIONPROOF) pVehicle->bExplosionProof = true;
+ if (m_nFlags & FLAG_COLLISIONPROOF) pVehicle->bCollisionProof = true;
+ if (m_nFlags & FLAG_MELEEPROOF) pVehicle->bMeleeProof = true;
return pVehicle;
}
@@ -2028,7 +2023,7 @@ void CGarages::GivePlayerDetonator()
float CGarages::FindDoorHeightForMI(int32 mi)
{
- return CModelInfo::GetModelInfo(mi)->GetColModel()->boundingBox.max.z - CModelInfo::GetModelInfo(mi)->GetColModel()->boundingBox.min.z - 0.1f;
+ return CModelInfo::GetColModel(mi)->boundingBox.max.z - CModelInfo::GetColModel(mi)->boundingBox.min.z - 0.1f;
}
void CGarage::TidyUpGarage()
@@ -2310,6 +2305,9 @@ void CGarages::Save(uint8 * buf, uint32 * size)
*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + 3 * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage));
#else
* size = 5484;
+#endif
+#if !defined THIS_IS_STUPID && !defined FIX_GARAGE_SIZE && defined COMPATIBLE_SAVES
+ memset(buf + 5240, 0, *size - 5240); // garbage data is written otherwise
#endif
CloseHideOutGaragesBeforeSave();
WriteSaveBuf(buf, NumGarages);
@@ -2326,8 +2324,47 @@ void CGarages::Save(uint8 * buf, uint32 * size)
WriteSaveBuf(buf, aCarsInSafeHouse2[i]);
WriteSaveBuf(buf, aCarsInSafeHouse3[i]);
}
- for (int i = 0; i < NUM_GARAGES; i++)
+ for (int i = 0; i < NUM_GARAGES; i++) {
+#ifdef COMPATIBLE_SAVES
+ WriteSaveBuf(buf, aGarages[i].m_eGarageType);
+ WriteSaveBuf(buf, aGarages[i].m_eGarageState);
+ WriteSaveBuf(buf, aGarages[i].field_2);
+ WriteSaveBuf(buf, aGarages[i].m_bClosingWithoutTargetCar);
+ WriteSaveBuf(buf, aGarages[i].m_bDeactivated);
+ WriteSaveBuf(buf, aGarages[i].m_bResprayHappened);
+ ZeroSaveBuf(buf, 2);
+ WriteSaveBuf(buf, aGarages[i].m_nTargetModelIndex);
+ ZeroSaveBuf(buf, 4 + 4);
+ WriteSaveBuf(buf, aGarages[i].m_bDoor1PoolIndex);
+ WriteSaveBuf(buf, aGarages[i].m_bDoor2PoolIndex);
+ WriteSaveBuf(buf, aGarages[i].m_bDoor1IsDummy);
+ WriteSaveBuf(buf, aGarages[i].m_bDoor2IsDummy);
+ WriteSaveBuf(buf, aGarages[i].m_bRecreateDoorOnNextRefresh);
+ WriteSaveBuf(buf, aGarages[i].m_bRotatedDoor);
+ WriteSaveBuf(buf, aGarages[i].m_bCameraFollowsPlayer);
+ ZeroSaveBuf(buf, 1);
+ WriteSaveBuf(buf, aGarages[i].m_fX1);
+ WriteSaveBuf(buf, aGarages[i].m_fX2);
+ WriteSaveBuf(buf, aGarages[i].m_fY1);
+ WriteSaveBuf(buf, aGarages[i].m_fY2);
+ WriteSaveBuf(buf, aGarages[i].m_fZ1);
+ WriteSaveBuf(buf, aGarages[i].m_fZ2);
+ WriteSaveBuf(buf, aGarages[i].m_fDoorPos);
+ WriteSaveBuf(buf, aGarages[i].m_fDoorHeight);
+ WriteSaveBuf(buf, aGarages[i].m_fDoor1X);
+ WriteSaveBuf(buf, aGarages[i].m_fDoor1Y);
+ WriteSaveBuf(buf, aGarages[i].m_fDoor2X);
+ WriteSaveBuf(buf, aGarages[i].m_fDoor2Y);
+ WriteSaveBuf(buf, aGarages[i].m_fDoor1Z);
+ WriteSaveBuf(buf, aGarages[i].m_fDoor2Z);
+ WriteSaveBuf(buf, aGarages[i].m_nTimeToStartAction);
+ WriteSaveBuf(buf, aGarages[i].m_bCollectedCarsState);
+ ZeroSaveBuf(buf, 3 + 4 + 4);
+ ZeroSaveBuf(buf, sizeof(aGarages[i].m_sStoredCar));
+#else
WriteSaveBuf(buf, aGarages[i]);
+#endif
+ }
#ifdef FIX_GARAGE_SIZE
VALIDATESAVEBUF(*size);
#endif
@@ -2338,11 +2375,7 @@ const CStoredCar &CStoredCar::operator=(const CStoredCar & other)
m_nModelIndex = other.m_nModelIndex;
m_vecPos = other.m_vecPos;
m_vecAngle = other.m_vecAngle;
- m_bBulletproof = other.m_bBulletproof;
- m_bFireproof = other.m_bFireproof;
- m_bExplosionproof = other.m_bExplosionproof;
- m_bCollisionproof = other.m_bCollisionproof;
- m_bMeleeproof = other.m_bMeleeproof;
+ m_nFlags = other.m_nFlags;
m_nPrimaryColor = other.m_nPrimaryColor;
m_nSecondaryColor = other.m_nSecondaryColor;
m_nRadioStation = other.m_nRadioStation;
@@ -2356,27 +2389,68 @@ void CGarages::Load(uint8* buf, uint32 size)
{
#ifdef FIX_GARAGE_SIZE
INITSAVEBUF
- assert(size == (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + 3 * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage));
+ assert(size == (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + 3 * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage)));
#else
assert(size == 5484);
#endif
CloseHideOutGaragesBeforeSave();
- NumGarages = ReadSaveBuf(buf);
- BombsAreFree = ReadSaveBuf(buf);
- RespraysAreFree = ReadSaveBuf(buf);
- CarsCollected = ReadSaveBuf(buf);
- BankVansCollected = ReadSaveBuf(buf);
- PoliceCarsCollected = ReadSaveBuf(buf);
+ ReadSaveBuf(&NumGarages, buf);
+ int32 tempInt;
+ ReadSaveBuf(&tempInt, buf);
+ BombsAreFree = tempInt ? true : false;
+ ReadSaveBuf(&tempInt, buf);
+ RespraysAreFree = tempInt ? true : false;
+ ReadSaveBuf(&CarsCollected, buf);
+ ReadSaveBuf(&BankVansCollected, buf);
+ ReadSaveBuf(&PoliceCarsCollected, buf);
for (int i = 0; i < TOTAL_COLLECTCARS_GARAGES; i++)
- CarTypesCollected[i] = ReadSaveBuf(buf);
- LastTimeHelpMessage = ReadSaveBuf(buf);
+ ReadSaveBuf(&CarTypesCollected[i], buf);
+ ReadSaveBuf(&LastTimeHelpMessage, buf);
for (int i = 0; i < NUM_GARAGE_STORED_CARS; i++) {
- aCarsInSafeHouse1[i] = ReadSaveBuf(buf);
- aCarsInSafeHouse2[i] = ReadSaveBuf(buf);
- aCarsInSafeHouse3[i] = ReadSaveBuf(buf);
+ ReadSaveBuf(&aCarsInSafeHouse1[i], buf);
+ ReadSaveBuf(&aCarsInSafeHouse2[i], buf);
+ ReadSaveBuf(&aCarsInSafeHouse3[i], buf);
}
for (int i = 0; i < NUM_GARAGES; i++) {
- aGarages[i] = ReadSaveBuf(buf);
+#ifdef COMPATIBLE_SAVES
+ ReadSaveBuf(&aGarages[i].m_eGarageType, buf);
+ ReadSaveBuf(&aGarages[i].m_eGarageState, buf);
+ ReadSaveBuf(&aGarages[i].field_2, buf);
+ ReadSaveBuf(&aGarages[i].m_bClosingWithoutTargetCar, buf);
+ ReadSaveBuf(&aGarages[i].m_bDeactivated, buf);
+ ReadSaveBuf(&aGarages[i].m_bResprayHappened, buf);
+ SkipSaveBuf(buf, 2);
+ ReadSaveBuf(&aGarages[i].m_nTargetModelIndex, buf);
+ SkipSaveBuf(buf, 4 + 4);
+ ReadSaveBuf(&aGarages[i].m_bDoor1PoolIndex, buf);
+ ReadSaveBuf(&aGarages[i].m_bDoor2PoolIndex, buf);
+ ReadSaveBuf(&aGarages[i].m_bDoor1IsDummy, buf);
+ ReadSaveBuf(&aGarages[i].m_bDoor2IsDummy, buf);
+ ReadSaveBuf(&aGarages[i].m_bRecreateDoorOnNextRefresh, buf);
+ ReadSaveBuf(&aGarages[i].m_bRotatedDoor, buf);
+ ReadSaveBuf(&aGarages[i].m_bCameraFollowsPlayer, buf);
+ SkipSaveBuf(buf, 1);
+ ReadSaveBuf(&aGarages[i].m_fX1, buf);
+ ReadSaveBuf(&aGarages[i].m_fX2, buf);
+ ReadSaveBuf(&aGarages[i].m_fY1, buf);
+ ReadSaveBuf(&aGarages[i].m_fY2, buf);
+ ReadSaveBuf(&aGarages[i].m_fZ1, buf);
+ ReadSaveBuf(&aGarages[i].m_fZ2, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoorPos, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoorHeight, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoor1X, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoor1Y, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoor2X, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoor2Y, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoor1Z, buf);
+ ReadSaveBuf(&aGarages[i].m_fDoor2Z, buf);
+ ReadSaveBuf(&aGarages[i].m_nTimeToStartAction, buf);
+ ReadSaveBuf(&aGarages[i].m_bCollectedCarsState, buf);
+ SkipSaveBuf(buf, 3 + 4 + 4);
+ SkipSaveBuf(buf, sizeof(aGarages[i].m_sStoredCar));
+#else
+ ReadSaveBuf(&aGarages[i], buf);
+#endif
aGarages[i].m_pDoor1 = nil;
aGarages[i].m_pDoor2 = nil;
aGarages[i].m_pTarget = nil;
diff --git a/src/control/Garages.h b/src/control/Garages.h
index a7dfa462..8a9fd1b6 100644
--- a/src/control/Garages.h
+++ b/src/control/Garages.h
@@ -51,14 +51,17 @@ enum
class CStoredCar
{
+ enum {
+ FLAG_BULLETPROOF = 0x1,
+ FLAG_FIREPROOF = 0x2,
+ FLAG_EXPLOSIONPROOF = 0x4,
+ FLAG_COLLISIONPROOF = 0x8,
+ FLAG_MELEEPROOF = 0x10,
+ };
int32 m_nModelIndex;
CVector m_vecPos;
CVector m_vecAngle;
- int32 m_bBulletproof : 1;
- int32 m_bFireproof : 1;
- int32 m_bExplosionproof : 1;
- int32 m_bCollisionproof : 1;
- int32 m_bMeleeproof : 1;
+ int32 m_nFlags;
int8 m_nPrimaryColor;
int8 m_nSecondaryColor;
int8 m_nRadioStation;
@@ -78,6 +81,13 @@ VALIDATE_SIZE(CStoredCar, 0x28);
#define SWITCH_GARAGE_DISTANCE_CLOSE 40.0f
+#define CRUSHER_GARAGE_X1 (1135.5f)
+#define CRUSHER_GARAGE_Y1 (57.0f)
+#define CRUSHER_GARAGE_Z1 (-1.0f)
+#define CRUSHER_GARAGE_X2 (1149.5f)
+#define CRUSHER_GARAGE_Y2 (63.7f)
+#define CRUSHER_GARAGE_Z2 (3.5f)
+
class CGarage
{
public:
@@ -87,7 +97,7 @@ public:
bool m_bClosingWithoutTargetCar;
bool m_bDeactivated;
bool m_bResprayHappened;
- int m_nTargetModelIndex;
+ int32 m_nTargetModelIndex;
CEntity *m_pDoor1;
CEntity *m_pDoor2;
uint8 m_bDoor1PoolIndex;
diff --git a/src/control/OnscreenTimer.cpp b/src/control/OnscreenTimer.cpp
index b3243799..d4224d4b 100644
--- a/src/control/OnscreenTimer.cpp
+++ b/src/control/OnscreenTimer.cpp
@@ -8,112 +8,111 @@
#include "Script.h"
#include "OnscreenTimer.h"
-void COnscreenTimer::Init() {
+void
+COnscreenTimer::Init()
+{
m_bDisabled = false;
for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
m_sEntries[i].m_nTimerOffset = 0;
m_sEntries[i].m_nCounterOffset = 0;
for(uint32 j = 0; j < 10; j++) {
- m_sEntries[i].m_aTimerText[j] = 0;
- m_sEntries[i].m_aCounterText[j] = 0;
+ m_sEntries[i].m_aTimerText[j] = '\0';
+ m_sEntries[i].m_aCounterText[j] = '\0';
}
m_sEntries[i].m_nType = COUNTER_DISPLAY_NUMBER;
- m_sEntries[i].m_bTimerProcessed = 0;
- m_sEntries[i].m_bCounterProcessed = 0;
+ m_sEntries[i].m_bTimerProcessed = false;
+ m_sEntries[i].m_bCounterProcessed = false;
}
}
-void COnscreenTimer::Process() {
- if(!CReplay::IsPlayingBack() && !m_bDisabled) {
- for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
+void
+COnscreenTimer::Process()
+{
+ if(!CReplay::IsPlayingBack() && !m_bDisabled)
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++)
m_sEntries[i].Process();
- }
- }
}
-void COnscreenTimer::ProcessForDisplay() {
+void
+COnscreenTimer::ProcessForDisplay()
+{
if(CHud::m_Wants_To_Draw_Hud) {
m_bProcessed = false;
- for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
- if(m_sEntries[i].ProcessForDisplay()) {
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++)
+ if(m_sEntries[i].ProcessForDisplay())
m_bProcessed = true;
- }
- }
}
}
-void COnscreenTimer::ClearCounter(uint32 offset) {
+void
+COnscreenTimer::ClearCounter(uint32 offset)
+{
for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
if(offset == m_sEntries[i].m_nCounterOffset) {
m_sEntries[i].m_nCounterOffset = 0;
- m_sEntries[i].m_aCounterText[0] = 0;
+ m_sEntries[i].m_aCounterText[0] = '\0';
m_sEntries[i].m_nType = COUNTER_DISPLAY_NUMBER;
- m_sEntries[i].m_bCounterProcessed = 0;
+ m_sEntries[i].m_bCounterProcessed = false;
}
}
}
-void COnscreenTimer::ClearClock(uint32 offset) {
- for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
+void
+COnscreenTimer::ClearClock(uint32 offset)
+{
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++)
if(offset == m_sEntries[i].m_nTimerOffset) {
m_sEntries[i].m_nTimerOffset = 0;
- m_sEntries[i].m_aTimerText[0] = 0;
- m_sEntries[i].m_bTimerProcessed = 0;
+ m_sEntries[i].m_aTimerText[0] = '\0';
+ m_sEntries[i].m_bTimerProcessed = false;
}
- }
}
-void COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text) {
- uint32 i = 0;
- for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
+void
+COnscreenTimer::AddCounter(uint32 offset, uint16 type, char* text)
+{
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++)
if(m_sEntries[i].m_nCounterOffset == 0) {
+ m_sEntries[i].m_nCounterOffset = offset;
+ if (text)
+ strncpy(m_sEntries[i].m_aCounterText, text, 10);
+ else
+ m_sEntries[i].m_aCounterText[0] = '\0';
+ m_sEntries[i].m_nType = type;
break;
}
- return;
- }
-
- m_sEntries[i].m_nCounterOffset = offset;
- if(text) {
- strncpy(m_sEntries[i].m_aCounterText, text, 10);
- } else {
- m_sEntries[i].m_aCounterText[0] = 0;
- }
-
- m_sEntries[i].m_nType = type;
}
-void COnscreenTimer::AddClock(uint32 offset, char* text) {
- uint32 i = 0;
- for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++) {
+void
+COnscreenTimer::AddClock(uint32 offset, char* text)
+{
+ for(uint32 i = 0; i < NUMONSCREENTIMERENTRIES; i++)
if(m_sEntries[i].m_nTimerOffset == 0) {
+ m_sEntries[i].m_nTimerOffset = offset;
+ if (text)
+ strncpy(m_sEntries[i].m_aTimerText, text, 10);
+ else
+ m_sEntries[i].m_aTimerText[0] = '\0';
break;
}
- return;
- }
-
- m_sEntries[i].m_nTimerOffset = offset;
- if(text) {
- strncpy(m_sEntries[i].m_aTimerText, text, 10);
- } else {
- m_sEntries[i].m_aTimerText[0] = 0;
- }
}
-void COnscreenTimerEntry::Process() {
- if(m_nTimerOffset == 0) {
+void
+COnscreenTimerEntry::Process()
+{
+ if(m_nTimerOffset == 0)
return;
- }
int32* timerPtr = CTheScripts::GetPointerToScriptVariable(m_nTimerOffset);
int32 oldTime = BSWAP32(*timerPtr);
- int32 newTime = oldTime - int32(CTimer::GetTimeStepInSeconds() * 1000);
+ int32 newTime = oldTime - int32(CTimer::GetTimeStepInMilliseconds());
if(newTime < 0) {
*timerPtr = 0;
- m_bTimerProcessed = 0;
+ m_bTimerProcessed = false;
m_nTimerOffset = 0;
- m_aTimerText[0] = 0;
+ m_aTimerText[0] = '\0';
} else {
*timerPtr = BSWAP32(newTime);
int32 oldTimeSeconds = oldTime / 1000;
@@ -123,13 +122,14 @@ void COnscreenTimerEntry::Process() {
}
}
-bool COnscreenTimerEntry::ProcessForDisplay() {
+bool
+COnscreenTimerEntry::ProcessForDisplay()
+{
m_bTimerProcessed = false;
m_bCounterProcessed = false;
- if(m_nTimerOffset == 0 && m_nCounterOffset == 0) {
+ if(m_nTimerOffset == 0 && m_nCounterOffset == 0)
return false;
- }
if(m_nTimerOffset != 0) {
m_bTimerProcessed = true;
@@ -143,13 +143,17 @@ bool COnscreenTimerEntry::ProcessForDisplay() {
return true;
}
-void COnscreenTimerEntry::ProcessForDisplayClock() {
+void
+COnscreenTimerEntry::ProcessForDisplayClock()
+{
uint32 time = BSWAP32(*CTheScripts::GetPointerToScriptVariable(m_nTimerOffset));
sprintf(m_bTimerBuffer, "%02d:%02d", time / 1000 / 60,
time / 1000 % 60);
}
-void COnscreenTimerEntry::ProcessForDisplayCounter() {
+void
+COnscreenTimerEntry::ProcessForDisplayCounter()
+{
uint32 counter = BSWAP32(*CTheScripts::GetPointerToScriptVariable(m_nCounterOffset));
sprintf(m_bCounterBuffer, "%d", counter);
}
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index 49e43c81..c6407820 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -201,8 +201,8 @@ CPedPath::AddBlockade(CEntity *pEntity, CPedPathNode(*pathNodes)[40], CVector *p
const float fBoundMaxY = boundingBox.max.y + 0.3f;
const float fBoundMinY = boundingBox.min.y - 0.3f;
const float fBoundMaxX = boundingBox.max.x + 0.3f;
- const float fDistanceX = pPosition->x - pEntity->m_matrix.GetPosition().x;
- const float fDistanceY = pPosition->y - pEntity->m_matrix.GetPosition().y;
+ const float fDistanceX = pPosition->x - pEntity->GetMatrix().GetPosition().x;
+ const float fDistanceY = pPosition->y - pEntity->GetMatrix().GetPosition().y;
const float fBoundRadius = pEntity->GetBoundRadius();
CVector vecBoundCentre;
pEntity->GetBoundCentre(vecBoundCentre);
@@ -216,8 +216,8 @@ CPedPath::AddBlockade(CEntity *pEntity, CPedPathNode(*pathNodes)[40], CVector *p
if (!pathNodes[x][y].bBlockade) {
const float pointY = y * 0.7f + fDistanceY;
CVector2D point(pointX, pointY);
- if (fBoundMaxX > Abs(DotProduct2D(point, pEntity->m_matrix.GetRight()))) {
- float fDotProduct = DotProduct2D(point, pEntity->m_matrix.GetForward());
+ if (fBoundMaxX > Abs(DotProduct2D(point, pEntity->GetMatrix().GetRight()))) {
+ float fDotProduct = DotProduct2D(point, pEntity->GetMatrix().GetForward());
if (fBoundMaxY > fDotProduct && fBoundMinY < fDotProduct)
pathNodes[x][y].bBlockade = true;
}
diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp
index f649d435..7632cfa3 100644
--- a/src/control/Phones.cpp
+++ b/src/control/Phones.cpp
@@ -13,10 +13,17 @@
#include "RpAnimBlend.h"
#include "AnimBlendAssociation.h"
#include "soundlist.h"
+#include "SaveBuf.h"
#ifdef FIX_BUGS
#include "Replay.h"
#endif
+#ifdef COMPATIBLE_SAVES
+#define PHONEINFO_SAVE_SIZE 0xA30
+#else
+#define PHONEINFO_SAVE_SIZE sizeof(CPhoneInfo)
+#endif
+
CPhoneInfo gPhoneInfo;
bool CPhoneInfo::bDisplayingPhoneMessage; // is phone picked up
@@ -58,9 +65,9 @@ CPhoneInfo::Update(void)
TheCamera.SetWideScreenOff();
pPhoneDisplayingMessages = nil;
bDisplayingPhoneMessage = false;
- CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(player->GetClump(), ANIM_PHONE_TALK);
+ CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(player->GetClump(), ANIM_STD_PHONE_TALK);
if (talkAssoc && talkAssoc->blendAmount > 0.5f) {
- CAnimBlendAssociation *endAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_PHONE_OUT, 8.0f);
+ CAnimBlendAssociation *endAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_OUT, 8.0f);
endAssoc->flags &= ~ASSOC_DELETEFADEDOUT;
endAssoc->SetFinishCallback(PhonePutDownCB, player);
} else {
@@ -117,7 +124,7 @@ CPhoneInfo::Update(void)
CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_PHONE);
TheCamera.SetWideScreenOn();
playerInfo->MakePlayerSafe(true);
- CAnimBlendAssociation *phonePickAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_PHONE_IN, 4.0f);
+ CAnimBlendAssociation *phonePickAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_IN, 4.0f);
phonePickAssoc->SetFinishCallback(PhonePickUpCB, &m_aPhones[phoneId]);
bPickingUpPhone = true;
pCallBackPed = player;
@@ -208,12 +215,29 @@ CPhoneInfo::IsMessageBeingDisplayed(int phoneId)
return pPhoneDisplayingMessages == &m_aPhones[phoneId];
}
+#ifdef COMPATIBLE_SAVES
+static inline void
+LoadPhone(CPhone &phone, uint8 *&buf)
+{
+ ReadSaveBuf(&phone.m_vecPos, buf);
+ SkipSaveBuf(buf, 6 * 4);
+ ReadSaveBuf(&phone.m_repeatedMessagePickupStart, buf);
+ uint32 tmp;
+ ReadSaveBuf(&tmp, buf);
+ phone.m_pEntity = (CEntity*)(uintptr)tmp;
+ ReadSaveBuf(&phone.m_nState, buf);
+ ReadSaveBuf(&phone.m_visibleToCam, buf);
+ SkipSaveBuf(buf, 3);
+}
+#endif
+
void
CPhoneInfo::Load(uint8 *buf, uint32 size)
{
INITSAVEBUF
- int max = ReadSaveBuf(buf);
- int scriptPhonesMax = ReadSaveBuf(buf);
+ int32 max, scriptPhonesMax;
+ ReadSaveBuf(&max, buf);
+ ReadSaveBuf(&scriptPhonesMax, buf);
#ifdef PEDS_REPORT_CRIMES_ON_PHONE
m_nMax = Min(NUMPHONES, max);
@@ -223,7 +247,13 @@ INITSAVEBUF
// We can do it without touching saves. We'll only load script phones, others are already loaded in Initialise
for (int i = 0; i < 50; i++) {
- CPhone phoneToLoad = ReadSaveBuf(buf);
+ CPhone phoneToLoad;
+#ifdef COMPATIBLE_SAVES
+ phoneToLoad.m_apMessages[0]=phoneToLoad.m_apMessages[1]=phoneToLoad.m_apMessages[2]=phoneToLoad.m_apMessages[3]=phoneToLoad.m_apMessages[4]=phoneToLoad.m_apMessages[5] = nil;
+ LoadPhone(phoneToLoad, buf);
+#else
+ ReadSaveBuf(&phoneToLoad, buf);
+#endif
if (ignoreOtherPhones)
continue;
@@ -249,7 +279,11 @@ INITSAVEBUF
m_nScriptPhonesMax = scriptPhonesMax;
for (int i = 0; i < NUMPHONES; i++) {
- m_aPhones[i] = ReadSaveBuf(buf);
+#ifdef COMPATIBLE_SAVES
+ LoadPhone(m_aPhones[i], buf);
+#else
+ ReadSaveBuf(&m_aPhones[i], buf);
+#endif
// It's saved as building pool index in save file, convert it to true entity
if (m_aPhones[i].m_pEntity) {
m_aPhones[i].m_pEntity = CPools::GetBuildingPool()->GetSlot((uintptr)m_aPhones[i].m_pEntity - 1);
@@ -373,7 +407,7 @@ CPhoneInfo::Initialise(void)
void
CPhoneInfo::Save(uint8 *buf, uint32 *size)
{
- *size = sizeof(CPhoneInfo);
+ *size = PHONEINFO_SAVE_SIZE;
INITSAVEBUF
WriteSaveBuf(buf, m_nMax);
WriteSaveBuf(buf, m_nScriptPhonesMax);
@@ -382,12 +416,24 @@ INITSAVEBUF
#else
for (int phoneId = 0; phoneId < NUMPHONES; phoneId++) {
#endif
+#ifdef COMPATIBLE_SAVES
+ WriteSaveBuf(buf, m_aPhones[phoneId].m_vecPos);
+ ZeroSaveBuf(buf, 6 * 4);
+ WriteSaveBuf(buf, m_aPhones[phoneId].m_repeatedMessagePickupStart);
+ // Convert entity pointer to building pool index while saving
+ int32 tmp = m_aPhones[phoneId].m_pEntity ? CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert((CBuilding*)m_aPhones[phoneId].m_pEntity) + 1 : 0;
+ WriteSaveBuf(buf, tmp);
+ WriteSaveBuf(buf, m_aPhones[phoneId].m_nState);
+ WriteSaveBuf(buf, m_aPhones[phoneId].m_visibleToCam);
+ ZeroSaveBuf(buf, 3);
+#else
CPhone* phone = WriteSaveBuf(buf, m_aPhones[phoneId]);
// Convert entity pointer to building pool index while saving
if (phone->m_pEntity) {
phone->m_pEntity = (CEntity*) (CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert((CBuilding*)phone->m_pEntity) + 1);
}
+#endif
}
VALIDATESAVEBUF(*size)
}
@@ -442,10 +488,10 @@ PhonePickUpCB(CAnimBlendAssociation *assoc, void *arg)
CPed *ped = CPhoneInfo::pCallBackPed;
ped->m_nMoveState = PEDMOVE_STILL;
- CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_IDLE_STANCE, 8.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE, 8.0f);
if (assoc->blendAmount > 0.5f && ped)
- CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_PHONE_TALK, 8.0f);
+ CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_TALK, 8.0f);
CPhoneInfo::pCallBackPed = nil;
}
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index 96a8a670..8d3472ea 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -23,6 +23,7 @@
#ifdef FIX_BUGS
#include "Replay.h"
#endif
+#include "SaveBuf.h"
#include "Script.h"
#include "Shadows.h"
#include "SpecialFX.h"
@@ -31,6 +32,12 @@
#include "WaterLevel.h"
#include "World.h"
+#ifdef COMPATIBLE_SAVES
+#define PICKUPS_SAVE_SIZE 0x24C0
+#else
+#define PICKUPS_SAVE_SIZE sizeof(aPickUps)
+#endif
+
CPickup CPickups::aPickUps[NUMPICKUPS];
int16 CPickups::NumMessages;
int32 CPickups::aPickUpsCollected[NUMCOLLECTEDPICKUPS];
@@ -689,8 +696,7 @@ CPickups::DoPickUpEffects(CEntity *entity)
entity->bDoNotRender = CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame;
if (!entity->bDoNotRender) {
- float s = Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800));
- float modifiedSin = 0.3f * (s + 1.0f);
+ float modifiedSin = 0.3f * (Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800)) + 1.0f);
int16 colorId;
@@ -749,7 +755,20 @@ CPickups::DoPickUpEffects(CEntity *entity)
}
}
- entity->GetMatrix().SetRotateZOnlyScaled((float)(CTimer::GetTimeInMilliseconds() & 0x7FF) * DEGTORAD(360.0f / 0x800), aWeaponScale[colorId]);
+ float angle = (float)(CTimer::GetTimeInMilliseconds() & 0x7FF) * DEGTORAD(360.0f / 0x800);
+ float c = Cos(angle) * aWeaponScale[colorId];
+ float s = Sin(angle) * aWeaponScale[colorId];
+
+ // we know from SA they were setting each field manually like this
+ entity->GetMatrix().rx = c;
+ entity->GetMatrix().ry = s;
+ entity->GetMatrix().rz = 0.0f;
+ entity->GetMatrix().fx = -s;
+ entity->GetMatrix().fy = c;
+ entity->GetMatrix().fz = 0.0f;
+ entity->GetMatrix().ux = 0.0f;
+ entity->GetMatrix().uy = 0.0f;
+ entity->GetMatrix().uz = aWeaponScale[colorId];
}
}
@@ -987,18 +1006,31 @@ CPickups::Load(uint8 *buf, uint32 size)
INITSAVEBUF
for (int32 i = 0; i < NUMPICKUPS; i++) {
- aPickUps[i] = ReadSaveBuf(buf);
+#ifdef COMPATIBLE_SAVES
+ ReadSaveBuf(&aPickUps[i].m_eType, buf);
+ ReadSaveBuf(&aPickUps[i].m_bRemoved, buf);
+ ReadSaveBuf(&aPickUps[i].m_nQuantity, buf);
+ int32 tmp;
+ ReadSaveBuf(&tmp, buf);
+ aPickUps[i].m_pObject = aPickUps[i].m_eType != PICKUP_NONE && tmp != 0 ? CPools::GetObjectPool()->GetSlot(tmp - 1) : nil;
+ ReadSaveBuf(&aPickUps[i].m_nTimer, buf);
+ ReadSaveBuf(&aPickUps[i].m_eModelIndex, buf);
+ ReadSaveBuf(&aPickUps[i].m_nIndex, buf);
+ ReadSaveBuf(&aPickUps[i].m_vecPos, buf);
+#else
+ ReadSaveBuf(&aPickUps[i], buf);
if (aPickUps[i].m_eType != PICKUP_NONE && aPickUps[i].m_pObject != nil)
aPickUps[i].m_pObject = CPools::GetObjectPool()->GetSlot((uintptr)aPickUps[i].m_pObject - 1);
+#endif
}
- CollectedPickUpIndex = ReadSaveBuf(buf);
- ReadSaveBuf(buf);
+ ReadSaveBuf(&CollectedPickUpIndex, buf);
+ SkipSaveBuf(buf, 2);
NumMessages = 0;
for (uint16 i = 0; i < NUMCOLLECTEDPICKUPS; i++)
- aPickUpsCollected[i] = ReadSaveBuf(buf);
+ ReadSaveBuf(&aPickUpsCollected[i], buf);
VALIDATESAVEBUF(size)
}
@@ -1006,14 +1038,26 @@ VALIDATESAVEBUF(size)
void
CPickups::Save(uint8 *buf, uint32 *size)
{
- *size = sizeof(aPickUps) + sizeof(uint16) + sizeof(uint16) + sizeof(aPickUpsCollected);
+ *size = PICKUPS_SAVE_SIZE + sizeof(uint16) + sizeof(uint16) + sizeof(aPickUpsCollected);
INITSAVEBUF
for (int32 i = 0; i < NUMPICKUPS; i++) {
+#ifdef COMPATIBLE_SAVES
+ WriteSaveBuf(buf, aPickUps[i].m_eType);
+ WriteSaveBuf(buf, aPickUps[i].m_bRemoved);
+ WriteSaveBuf(buf, aPickUps[i].m_nQuantity);
+ int32 tmp = aPickUps[i].m_eType != PICKUP_NONE && aPickUps[i].m_pObject != nil ? CPools::GetObjectPool()->GetJustIndex_NoFreeAssert(aPickUps[i].m_pObject) + 1 : 0;
+ WriteSaveBuf(buf, tmp);
+ WriteSaveBuf(buf, aPickUps[i].m_nTimer);
+ WriteSaveBuf(buf, aPickUps[i].m_eModelIndex);
+ WriteSaveBuf(buf, aPickUps[i].m_nIndex);
+ WriteSaveBuf(buf, aPickUps[i].m_vecPos);
+#else
CPickup *buf_pickup = WriteSaveBuf(buf, aPickUps[i]);
if (buf_pickup->m_eType != PICKUP_NONE && buf_pickup->m_pObject != nil)
buf_pickup->m_pObject = (CObject*)(CPools::GetObjectPool()->GetJustIndex_NoFreeAssert(buf_pickup->m_pObject) + 1);
+#endif
}
WriteSaveBuf(buf, CollectedPickUpIndex);
@@ -1330,6 +1374,8 @@ CPacManPickups::Render()
{
if (!bPMActive) return;
+ PUSH_RENDERGROUP("CPacManPickups::Render");
+
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE);
@@ -1363,6 +1409,8 @@ CPacManPickups::Render()
RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA);
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, FALSE);
+
+ POP_RENDERGROUP();
}
void
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 2dd66333..b9b5530c 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -404,8 +404,8 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state)
CAnimBlendAssociation* main = RpAnimBlendClumpGetMainAssociation((RpClump*)ped->m_rwObject, &second, &blend_amount);
if (main){
state->animId = main->animId;
- state->time = 255.0f / 4.0f * clamp(main->currentTime, 0.0f, 4.0f);
- state->speed = 255.0f / 3.0f * clamp(main->speed, 0.0f, 3.0f);
+ state->time = 255.0f / 4.0f * Clamp(main->currentTime, 0.0f, 4.0f);
+ state->speed = 255.0f / 3.0f * Clamp(main->speed, 0.0f, 3.0f);
}else{
state->animId = 3;
state->time = 0;
@@ -413,9 +413,9 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state)
}
if (second) {
state->secAnimId = second->animId;
- state->secTime = 255.0f / 4.0f * clamp(second->currentTime, 0.0f, 4.0f);
- state->secSpeed = 255.0f / 3.0f * clamp(second->speed, 0.0f, 3.0f);
- state->blendAmount = 255.0f / 2.0f * clamp(blend_amount, 0.0f, 2.0f);
+ state->secTime = 255.0f / 4.0f * Clamp(second->currentTime, 0.0f, 4.0f);
+ state->secSpeed = 255.0f / 3.0f * Clamp(second->speed, 0.0f, 3.0f);
+ state->blendAmount = 255.0f / 2.0f * Clamp(blend_amount, 0.0f, 2.0f);
}else{
state->secAnimId = 0;
state->secTime = 0;
@@ -425,9 +425,9 @@ void CReplay::StorePedAnimation(CPed *ped, CStoredAnimationState *state)
CAnimBlendAssociation* partial = RpAnimBlendClumpGetMainPartialAssociation((RpClump*)ped->m_rwObject);
if (partial) {
state->partAnimId = partial->animId;
- state->partAnimTime = 255.0f / 4.0f * clamp(partial->currentTime, 0.0f, 4.0f);
- state->partAnimSpeed = 255.0f / 3.0f * clamp(partial->speed, 0.0f, 3.0f);
- state->partBlendAmount = 255.0f / 2.0f * clamp(partial->blendAmount, 0.0f, 2.0f);
+ state->partAnimTime = 255.0f / 4.0f * Clamp(partial->currentTime, 0.0f, 4.0f);
+ state->partAnimSpeed = 255.0f / 3.0f * Clamp(partial->speed, 0.0f, 3.0f);
+ state->partBlendAmount = 255.0f / 2.0f * Clamp(partial->blendAmount, 0.0f, 2.0f);
}else{
state->partAnimId = 0;
state->partAnimTime = 0;
@@ -442,11 +442,11 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
CAnimBlendAssociation* assoc = RpAnimBlendClumpGetMainAssociation_N((RpClump*)ped->m_rwObject, i);
if (assoc){
state->aAnimId[i] = assoc->animId;
- state->aCurTime[i] = 255.0f / 4.0f * clamp(assoc->currentTime, 0.0f, 4.0f);
- state->aSpeed[i] = 255.0f / 3.0f * clamp(assoc->speed, 0.0f, 3.0f);
- state->aBlendAmount[i] = 255.0f / 2.0f * clamp(assoc->blendAmount, 0.0f, 2.0f);
+ state->aCurTime[i] = 255.0f / 4.0f * Clamp(assoc->currentTime, 0.0f, 4.0f);
+ state->aSpeed[i] = 255.0f / 3.0f * Clamp(assoc->speed, 0.0f, 3.0f);
+ state->aBlendAmount[i] = 255.0f / 2.0f * Clamp(assoc->blendAmount, 0.0f, 2.0f);
#ifdef FIX_REPLAY_BUGS
- state->aBlendDelta[i] = 127.0f / 32.0f * clamp(assoc->blendDelta, -16.0f, 16.0f);
+ state->aBlendDelta[i] = 127.0f / 32.0f * Clamp(assoc->blendDelta, -16.0f, 16.0f);
#endif
state->aFlags[i] = assoc->flags;
if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH || assoc->callbackType == CAnimBlendAssociation::CB_DELETE) {
@@ -457,7 +457,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
state->aFunctionCallbackID[i] = 0;
}
}else{
- state->aAnimId[i] = NUM_ANIMS;
+ state->aAnimId[i] = ANIM_STD_NUM;
state->aCurTime[i] = 0;
state->aSpeed[i] = 85;
state->aFunctionCallbackID[i] = 0;
@@ -468,11 +468,11 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
CAnimBlendAssociation* assoc = RpAnimBlendClumpGetMainPartialAssociation_N((RpClump*)ped->m_rwObject, i);
if (assoc) {
state->aAnimId2[i] = assoc->animId;
- state->aCurTime2[i] = 255.0f / 4.0f * clamp(assoc->currentTime, 0.0f, 4.0f);
- state->aSpeed2[i] = 255.0f / 3.0f * clamp(assoc->speed, 0.0f, 3.0f);
- state->aBlendAmount2[i] = 255.0f / 2.0f * clamp(assoc->blendAmount, 0.0f, 2.0f);
+ state->aCurTime2[i] = 255.0f / 4.0f * Clamp(assoc->currentTime, 0.0f, 4.0f);
+ state->aSpeed2[i] = 255.0f / 3.0f * Clamp(assoc->speed, 0.0f, 3.0f);
+ state->aBlendAmount2[i] = 255.0f / 2.0f * Clamp(assoc->blendAmount, 0.0f, 2.0f);
#ifdef FIX_REPLAY_BUGS
- state->aBlendDelta2[i] = 127.0f / 16.0f * clamp(assoc->blendDelta, -16.0f, 16.0f);
+ state->aBlendDelta2[i] = 127.0f / 16.0f * Clamp(assoc->blendDelta, -16.0f, 16.0f);
#endif
state->aFlags2[i] = assoc->flags;
if (assoc->callbackType == CAnimBlendAssociation::CB_FINISH || assoc->callbackType == CAnimBlendAssociation::CB_DELETE) {
@@ -484,7 +484,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
}
}
else {
- state->aAnimId2[i] = NUM_ANIMS;
+ state->aAnimId2[i] = ANIM_STD_NUM;
state->aCurTime2[i] = 0;
state->aSpeed2[i] = 85;
state->aFunctionCallbackID2[i] = 0;
@@ -558,7 +558,7 @@ void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state)
float time = state->partAnimTime * 4.0f / 255.0f;
float speed = state->partAnimSpeed * 3.0f / 255.0f;
float blend = state->partBlendAmount * 2.0f / 255.0f;
- if (blend > 0.0f && state->partAnimId != ANIM_IDLE_STANCE){
+ if (blend > 0.0f && state->partAnimId != ANIM_STD_IDLE){
CAnimBlendAssociation* anim3 = CAnimManager::BlendAnimation(
(RpClump*)ped->m_rwObject, ASSOCGRP_STD, (AnimationId)state->partAnimId, 1000.0f);
anim3->SetCurrentTime(time);
@@ -578,7 +578,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
assoc->SetBlend(0.0f, -1.0f);
#endif
for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++) {
- if (state->aAnimId[i] == NUM_ANIMS)
+ if (state->aAnimId[i] == ANIM_STD_NUM)
continue;
#ifdef FIX_REPLAY_BUGS
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
@@ -607,7 +607,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
anim->SetDeleteCallback(FindCBFunction(callback & 0x7F), ped);
}
for (int i = 0; i < NUM_PARTIAL_ANIMS_IN_REPLAY; i++) {
- if (state->aAnimId2[i] == NUM_ANIMS)
+ if (state->aAnimId2[i] == ANIM_STD_NUM)
continue;
#ifdef FIX_REPLAY_BUGS
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
@@ -1232,7 +1232,7 @@ void CReplay::RestoreStuffFromMem(void)
ped->SetModelIndex(mi);
ped->m_pVehicleAnim = nil;
ped->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, ped);
- DMAudio.SetEntityStatus(ped->m_audioEntityId, true);
+ DMAudio.SetEntityStatus(ped->m_audioEntityId, TRUE);
CPopulation::UpdatePedCount((ePedType)ped->m_nPedType, false);
if (ped->m_wepModelID >= 0)
ped->AddWeaponModel(ped->m_wepModelID);
@@ -1270,7 +1270,7 @@ void CReplay::RestoreStuffFromMem(void)
car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true);
}
vehicle->m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, vehicle);
- DMAudio.SetEntityStatus(vehicle->m_audioEntityId, true);
+ DMAudio.SetEntityStatus(vehicle->m_audioEntityId, TRUE);
CCarCtrl::UpdateCarCount(vehicle, false);
if ((mi == MI_AIRTRAIN || mi == MI_DEADDODO) && vehicle->m_rwObject){
CVehicleModelInfo* info = (CVehicleModelInfo*)CModelInfo::GetModelInfo(mi);
diff --git a/src/control/Restart.cpp b/src/control/Restart.cpp
index 4ca18c3b..2f5e3d45 100644
--- a/src/control/Restart.cpp
+++ b/src/control/Restart.cpp
@@ -1,6 +1,7 @@
#include "common.h"
#include "Restart.h"
+#include "SaveBuf.h"
#include "Zones.h"
#include "PathFind.h"
@@ -173,29 +174,28 @@ INITSAVEBUF
CheckSaveHeader(buf, 'R','S','T','\0', size - SAVE_HEADER_SIZE);
for (int i = 0; i < NUM_RESTART_POINTS; i++) {
- HospitalRestartPoints[i] = ReadSaveBuf(buf);
- HospitalRestartHeadings[i] = ReadSaveBuf(buf);
+ ReadSaveBuf(&HospitalRestartPoints[i], buf);
+ ReadSaveBuf(&HospitalRestartHeadings[i], buf);
}
for (int i = 0; i < NUM_RESTART_POINTS; i++) {
- PoliceRestartPoints[i] = ReadSaveBuf(buf);
- PoliceRestartHeadings[i] = ReadSaveBuf(buf);
+ ReadSaveBuf(&PoliceRestartPoints[i], buf);
+ ReadSaveBuf(&PoliceRestartHeadings[i], buf);
}
- NumberOfHospitalRestarts = ReadSaveBuf(buf);
- NumberOfPoliceRestarts = ReadSaveBuf(buf);
- bOverrideRestart = ReadSaveBuf(buf);
+ ReadSaveBuf(&NumberOfHospitalRestarts, buf);
+ ReadSaveBuf(&NumberOfPoliceRestarts, buf);
+ ReadSaveBuf(&bOverrideRestart, buf);
// skip something unused
- ReadSaveBuf(buf);
- ReadSaveBuf(buf);
+ SkipSaveBuf(buf, 3);
- OverridePosition = ReadSaveBuf(buf);
- OverrideHeading = ReadSaveBuf(buf);
- bFadeInAfterNextDeath = ReadSaveBuf(buf);
- bFadeInAfterNextArrest = ReadSaveBuf(buf);
- OverrideHospitalLevel = ReadSaveBuf(buf);
- OverridePoliceStationLevel = ReadSaveBuf(buf);
+ ReadSaveBuf(&OverridePosition, buf);
+ ReadSaveBuf(&OverrideHeading, buf);
+ ReadSaveBuf(&bFadeInAfterNextDeath, buf);
+ ReadSaveBuf(&bFadeInAfterNextArrest, buf);
+ ReadSaveBuf(&OverrideHospitalLevel, buf);
+ ReadSaveBuf(&OverridePoliceStationLevel, buf);
VALIDATESAVEBUF(size);
}
diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp
index 3ec34a57..4c3307c5 100644
--- a/src/control/RoadBlocks.cpp
+++ b/src/control/RoadBlocks.cpp
@@ -51,11 +51,11 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
CEntity* pEntityToAttack = (CEntity*)FindPlayerVehicle();
if (!pEntityToAttack)
pEntityToAttack = (CEntity*)FindPlayerPed();
- CColModel* pPoliceColModel = CModelInfo::GetModelInfo(MI_POLICE)->GetColModel();
+ CColModel* pPoliceColModel = CModelInfo::GetColModel(MI_POLICE);
float fRadius = pVehicle->GetBoundRadius() / pPoliceColModel->boundingSphere.radius;
for (int32 i = 0; i < 2; i++) {
const int32 roadBlockIndex = i + 2 * roadBlockType;
- CVector posForZ = pVehicle->m_matrix * (fRadius * vecRoadBlockOffets[roadBlockIndex]);
+ CVector posForZ = pVehicle->GetMatrix() * (fRadius * vecRoadBlockOffets[roadBlockIndex]);
int32 modelInfoId = MI_COP;
eCopType copType = COP_STREET;
switch (pVehicle->GetModelIndex())
@@ -80,9 +80,7 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
pCopPed->SetCurrentWeapon(WEAPONTYPE_COLT45);
CPedPlacement::FindZCoorForPed(&posForZ);
pCopPed->SetPosition(posForZ);
- CVector vecSavedPos = pCopPed->GetPosition();
- pCopPed->m_matrix.SetRotate(0.0f, 0.0f, -HALFPI);
- pCopPed->m_matrix.GetPosition() += vecSavedPos;
+ pCopPed->SetOrientation(0.0f, 0.0f, -HALFPI);
pCopPed->m_bIsDisabledCop = true;
pCopPed->SetIdle();
pCopPed->bKindaStayInSamePlace = true;
@@ -132,7 +130,7 @@ CRoadBlocks::GenerateRoadBlocks(void)
vehicleId = MI_ENFORCER;
if (!CStreaming::HasModelLoaded(vehicleId))
vehicleId = MI_POLICE;
- CColModel *pVehicleColModel = CModelInfo::GetModelInfo(vehicleId)->GetColModel();
+ CColModel *pVehicleColModel = CModelInfo::GetColModel(vehicleId);
float fModelRadius = 2.0f * pVehicleColModel->boundingSphere.radius + 0.25f;
int16 radius = (int16)(fMapObjectRadius / fModelRadius);
if (radius >= 6)
@@ -153,8 +151,8 @@ CRoadBlocks::GenerateRoadBlocks(void)
offsetMatrix.GetPosition() = CVector(0.0f, i * fModelRadius - fOffset, 0.6f);
else
offsetMatrix.GetPosition() = CVector(i * fModelRadius - fOffset, 0.0f, 0.6f);
- CMatrix vehicleMatrix = mapObject->m_matrix * offsetMatrix;
- float fModelRadius = CModelInfo::GetModelInfo(vehicleId)->GetColModel()->boundingSphere.radius - 0.25f;
+ CMatrix vehicleMatrix = mapObject->GetMatrix() * offsetMatrix;
+ float fModelRadius = CModelInfo::GetColModel(vehicleId)->boundingSphere.radius - 0.25f;
int16 colliding = 0;
CWorld::FindObjectsKindaColliding(vehicleMatrix.GetPosition(), fModelRadius, 0, &colliding, 2, nil, false, true, true, false, false);
if (!colliding) {
@@ -162,10 +160,10 @@ CRoadBlocks::GenerateRoadBlocks(void)
pVehicle->SetStatus(STATUS_ABANDONED);
// pVehicle->GetHeightAboveRoad(); // called but return value is ignored?
vehicleMatrix.GetPosition().z += fModelRadius - 0.6f;
- pVehicle->m_matrix = vehicleMatrix;
+ pVehicle->SetMatrix(vehicleMatrix);
pVehicle->PlaceOnRoadProperly();
pVehicle->SetIsStatic(false);
- pVehicle->m_matrix.UpdateRW();
+ pVehicle->GetMatrix().UpdateRW();
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
pVehicle->bIsLocked = false;
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 00afdadc..32bc1aa2 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -17,6 +17,9 @@
#include "FileMgr.h"
#include "Frontend.h"
#include "General.h"
+#ifdef MISSION_REPLAY
+#include "GenericGameStorage.h"
+#endif
#include "HandlingMgr.h"
#include "Heli.h"
#include "Hud.h"
@@ -34,9 +37,6 @@
#include "Wanted.h"
#include "Weather.h"
#include "Zones.h"
-#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
-#include
-#endif
uint8 CTheScripts::ScriptSpace[SIZE_SCRIPT_SPACE];
CRunningScript CTheScripts::ScriptsArray[MAX_NUM_SCRIPTS];
@@ -112,1213 +112,6 @@ bool doingMissionRetry;
#endif
-#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
-
-#define REGISTER_COMMAND(command, in, out, cond, ovrd, visual) { command, #command, in, out, cond, ovrd, visual }
-#define INPUT_ARGUMENTS(...) { __VA_ARGS__ ARGTYPE_NONE }
-#define OUTPUT_ARGUMENTS(...) { __VA_ARGS__ ARGTYPE_NONE }
-const tScriptCommandData commands[] = {
- REGISTER_COMMAND(COMMAND_NOP, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WAIT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GOTO, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SHAKE_CAM, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_ADD_VAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_VAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_VAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_VAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_MULT_INT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_FLOAT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_INT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_FLOAT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_DIV_INT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_FLOAT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_INT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_FLOAT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_THAN_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_THAN_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_THAN_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_THAN_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_THAN_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_THAN_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_THAN_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_THAN_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_NOT_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_INT_LVAR_NOT_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_INT_VAR_NOT_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_NOT_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
- REGISTER_COMMAND(COMMAND_GOTO_IF_TRUE, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GOTO_IF_FALSE, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_TERMINATE_THIS_SCRIPT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_START_NEW_SCRIPT, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GOSUB, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_RETURN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LINE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_PLAYER_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_PLAYER_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_ADD_INT_VAR_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_FLOAT_VAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_INT_LVAR_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_FLOAT_LVAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_INT_VAR_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_FLOAT_VAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_INT_LVAR_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_ADD_FLOAT_LVAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
- REGISTER_COMMAND(COMMAND_SUB_INT_VAR_FROM_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_FLOAT_VAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_INT_LVAR_FROM_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_FLOAT_LVAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_INT_VAR_FROM_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_FLOAT_VAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_INT_LVAR_FROM_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_SUB_FLOAT_LVAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
- REGISTER_COMMAND(COMMAND_MULT_INT_VAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_FLOAT_VAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_INT_LVAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_FLOAT_LVAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_INT_VAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_FLOAT_VAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_INT_LVAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_MULT_FLOAT_LVAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
- REGISTER_COMMAND(COMMAND_DIV_INT_VAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_FLOAT_VAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_INT_LVAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_FLOAT_LVAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_INT_VAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_FLOAT_VAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_INT_LVAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_DIV_FLOAT_LVAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
- REGISTER_COMMAND(COMMAND_ADD_TIMED_VAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
- REGISTER_COMMAND(COMMAND_ADD_TIMED_VAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
- REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_VAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
- REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_LVAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
- REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_LVAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
- REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_VAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
- REGISTER_COMMAND(COMMAND_SUB_TIMED_VAL_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
- REGISTER_COMMAND(COMMAND_SUB_TIMED_VAL_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
- REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_VAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
- REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
- REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
- REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_VAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
- REGISTER_COMMAND(COMMAND_SET_VAR_INT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_LVAR_INT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_VAR_FLOAT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_LVAR_FLOAT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_VAR_FLOAT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_LVAR_FLOAT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_VAR_INT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_SET_LVAR_INT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
- REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, 0, " =#"),
- REGISTER_COMMAND(COMMAND_ABS_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
- REGISTER_COMMAND(COMMAND_ABS_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
- REGISTER_COMMAND(COMMAND_ABS_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
- REGISTER_COMMAND(COMMAND_ABS_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
- REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_FLOAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_INT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DELETE_CHAR, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHAR_WANDER_DIR, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHAR_WANDER_RANGE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHAR_FOLLOW_PATH, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CHAR_SET_IDLE, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CHAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CHAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_STILL_ALIVE, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_PED_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_PED_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_CREATE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DELETE_CAR, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CAR_GOTO_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CAR_WANDER_RANDOMLY, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CAR_SET_IDLE, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_CAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_CAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_CAR_STILL_ALIVE, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), true, -1, ""),
- 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_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, ""),
- REGISTER_COMMAND(COMMAND_SPECIAL_3, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SPECIAL_4, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SPECIAL_5, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SPECIAL_6, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SPECIAL_7, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_PRINT_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_CLEAR_PRINTS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_TIME_OF_DAY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_SET_TIME_OF_DAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_GET_MINUTES_TO_TIME_OF_DAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IS_POINT_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, -1, ""),
- REGISTER_COMMAND(COMMAND_DEBUG_ON, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_DEBUG_OFF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_RETURN_TRUE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_RETURN_FALSE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_VAR_INT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_VAR_FLOAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LVAR_INT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LVAR_FLOAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_LBRACKET, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_RBRACKET, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_REPEAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ENDREPEAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_IFNOT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ELSE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ENDIF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WHILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_WHILENOT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ENDWHILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_LOAD_END_OF_GAME_TUNE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
- REGISTER_COMMAND(COMMAND_ENABLE_PLAYER_CONTROL_CAMERA, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
-#if GTA_VERSION > GTA3_PS2_160
- 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, ""),
-#if GTA_VERSION < GTA3_PC_11
- REGISTER_COMMAND(COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
-#endif
-#endif
-};
-#undef REGISTER_COMMAND
-#undef INPUT_ARGUMENTS
-#undef OUTPUT_ARGUMENTS
-
-static_assert(ARRAY_SIZE(commands) == LAST_SCRIPT_COMMAND, "commands array not filled");
-
-#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
-static FILE* dbg_log;
-#endif
-
-static void PrintToLog(const char* format, ...)
-{
- va_list va;
- va_start(va, format);
- char tmp[1024];
-#ifdef _WIN32
- vsprintf_s(tmp, 1024, format, va);
-#else
- vsprintf(tmp, format, va);
-#endif
- va_end(va);
-
-#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
- if (dbg_log)
- fwrite(tmp, 1, strlen(tmp), dbg_log);
-#endif
-}
-
-#endif
-
-void FlushLog()
-{
-#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
-#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
- if (dbg_log)
- fflush(dbg_log);
-#endif
-#endif
-}
-
-
const uint32 CRunningScript::nSaveStructSize =
#ifdef COMPATIBLE_SAVES
136;
@@ -1626,68 +419,6 @@ 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:
- return CTheScripts::Read4BytesFromScript(&m_nIp);
- case ARGUMENT_GLOBALVAR:
- varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
- script_assert(varIndex >= 8 && varIndex < CTheScripts::GetSizeOfVariableSpace());
- var = true;
- sprintf(tmpstr, " $%d", varIndex / 4);
- strcat(buf, tmpstr);
- return BSWAP32(*((int32*)&CTheScripts::ScriptSpace[varIndex]));
- case ARGUMENT_LOCALVAR:
- varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
- script_assert(varIndex >= 0 && varIndex < ARRAY_SIZE(m_anLocalVariables));
- var = true;
- sprintf(tmpstr, " %d@", varIndex);
- strcat(buf, tmpstr);
- return m_anLocalVariables[varIndex];
- case ARGUMENT_INT8:
- 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);
- break;
- }
- return 0;
-}
-
-void CRunningScript::GetStoredParameterForDebug(char* buf)
-{
- uint16 varIndex;
- char tmpstr[24];
- switch (CTheScripts::Read1ByteFromScript(&m_nIp)) {
- case ARGUMENT_GLOBALVAR:
- varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
- sprintf(tmpstr, " $%d", varIndex / 4);
- strcat(buf, tmpstr);
- break;
- case ARGUMENT_LOCALVAR:
- varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
- sprintf(tmpstr, " %d@", varIndex);
- strcat(buf, tmpstr);
- break;
- default:
- PrintToLog("%s - script_assertion failed in GetStoredParameterForDebug", buf);
- script_assert(0);
- }
-}
-#endif
-
int32 CRunningScript::CollectNextParameterWithoutIncreasingPC(uint32 ip)
{
uint32* pIp = &ip;
@@ -1767,28 +498,17 @@ void CRunningScript::Init()
}
#ifdef USE_DEBUG_SCRIPT_LOADER
-int scriptToLoad = 0;
+int CTheScripts::ScriptToLoad = 0;
-#ifdef _WIN32
-#include
-#endif
-int open_script()
+int CTheScripts::OpenScript()
{
- // glfwGetKey doesn't work because of CGame::Initialise is blocking
-#ifdef _WIN32
- if (GetAsyncKeyState('G') & 0x8000)
- scriptToLoad = 0;
- if (GetAsyncKeyState('R') & 0x8000)
- scriptToLoad = 1;
- if (GetAsyncKeyState('D') & 0x8000)
- scriptToLoad = 2;
-#endif
- switch (scriptToLoad) {
- case 0: return CFileMgr::OpenFile("main.scm", "rb");
- case 1: return CFileMgr::OpenFile("main_freeroam.scm", "rb");
- case 2: return CFileMgr::OpenFile("main_d.scm", "rb");
+ CFileMgr::ChangeDir("\\");
+ switch (ScriptToLoad) {
+ case 0: return CFileMgr::OpenFile("data\\main.scm", "rb");
+ case 1: return CFileMgr::OpenFile("data\\main_freeroam.scm", "rb");
+ case 2: return CFileMgr::OpenFile("data\\main_d.scm", "rb");
}
- return CFileMgr::OpenFile("main.scm", "rb");
+ return CFileMgr::OpenFile("data\\main.scm", "rb");
}
#endif
@@ -1804,10 +524,16 @@ void CTheScripts::Init()
MissionCleanUp.Init();
UpsideDownCars.Init();
StuckCars.Init();
- CFileMgr::SetDir("data");
#ifdef USE_DEBUG_SCRIPT_LOADER
- int mainf = open_script();
+ // glfwGetKey doesn't work because of CGame::Initialise is blocking
+ CPad::UpdatePads();
+ if(CPad::GetPad(0)->GetChar('G')) ScriptToLoad = 0;
+ if(CPad::GetPad(0)->GetChar('R')) ScriptToLoad = 1;
+ if(CPad::GetPad(0)->GetChar('D')) ScriptToLoad = 2;
+
+ int mainf = OpenScript();
#else
+ CFileMgr::SetDir("data");
int mainf = CFileMgr::OpenFile("main.scm", "rb");
#endif
CFileMgr::Read(mainf, (char*)ScriptSpace, SIZE_MAIN_SCRIPT);
@@ -1874,14 +600,8 @@ void CTheScripts::Init()
for (int i = 0; i < MAX_NUM_INVISIBILITY_SETTINGS; i++)
InvisibilitySettingArray[i] = nil;
-#if defined USE_ADVANCED_SCRIPT_DEBUG_OUTPUT && SCRIPT_LOG_FILE_LEVEL == 2
- CFileMgr::SetDirMyDocuments();
- if (dbg_log)
- fclose(dbg_log);
- dbg_log = fopen("SCRDBG.LOG", "w");
- static const char* init_msg = "Starting debug script log\n\n";
- PrintToLog(init_msg);
- CFileMgr::SetDir("");
+#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
+ LogAfterScriptInitializing();
#endif
}
@@ -1947,25 +667,25 @@ void CTheScripts::Process()
#ifdef MISSION_REPLAY
static uint32 TimeToWaitTill;
switch (AllowMissionReplay) {
- case 2:
- AllowMissionReplay = 3;
+ case MISSION_RETRY_STAGE_START_PROCESSING:
+ AllowMissionReplay = MISSION_RETRY_STAGE_WAIT_FOR_DELAY;
TimeToWaitTill = CTimer::GetTimeInMilliseconds() + (AddExtraDeathDelay() > 1000 ? 4000 : 2500);
break;
- case 3:
+ case MISSION_RETRY_STAGE_WAIT_FOR_DELAY:
if (TimeToWaitTill < CTimer::GetTimeInMilliseconds())
- AllowMissionReplay = 4;
+ AllowMissionReplay = MISSION_RETRY_STAGE_WAIT_FOR_MENU;
break;
- case 4:
- AllowMissionReplay = 5;
- RetryMission(0, 0);
+ case MISSION_RETRY_STAGE_WAIT_FOR_MENU:
+ AllowMissionReplay = MISSION_RETRY_STAGE_WAIT_FOR_USER;
+ RetryMission(MISSION_RETRY_TYPE_SUGGEST_TO_PLAYER);
break;
- case 6:
- AllowMissionReplay = 7;
+ case MISSION_RETRY_STAGE_START_RESTARTING:
+ AllowMissionReplay = MISSION_RETRY_STAGE_WAIT_FOR_TIMER_AFTER_RESTART;
TimeToWaitTill = CTimer::GetTimeInMilliseconds() + 500;
break;
- case 7:
+ case MISSION_RETRY_STAGE_WAIT_FOR_TIMER_AFTER_RESTART:
if (TimeToWaitTill < CTimer::GetTimeInMilliseconds()) {
- AllowMissionReplay = 0;
+ AllowMissionReplay = MISSION_RETRY_STAGE_NORMAL;
return;
}
break;
@@ -1981,15 +701,7 @@ void CTheScripts::Process()
#endif
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
-#if SCRIPT_LOG_FILE_LEVEL == 1
- CFileMgr::SetDirMyDocuments();
- dbg_log = fopen("SCRDBG.LOG", "w");
- static const char* init_msg = "Starting debug script log\n\n";
- PrintToLog(init_msg);
- CFileMgr::SetDir("");
-#endif
- PrintToLog("------------------------\n");
- PrintToLog("CTheScripts::Process started, CTimer::GetTimeInMilliseconds == %u\n", CTimer::GetTimeInMilliseconds());
+ LogBeforeScriptProcessing();
#endif
CRunningScript* script = pActiveScripts;
@@ -2001,12 +713,9 @@ void CTheScripts::Process()
script = next;
}
DbgFlag = false;
+
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
- PrintToLog("Script processing done, ScriptsUpdated: %d, CommandsExecuted: %d\n", ScriptsUpdated, CommandsExecuted);
-#if SCRIPT_LOG_FILE_LEVEL == 1
- fclose(dbg_log);
- dbg_log = nil;
-#endif
+ LogAfterScriptProcessing();
#endif
}
@@ -2023,7 +732,7 @@ bool CTheScripts::IsPlayerOnAMission()
void CRunningScript::Process()
{
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
- PrintToLog("\n\nProcessing script %s (id %d)\n\n", m_abScriptName, this - CTheScripts::ScriptsArray);
+ LogOnStartProcessing();
#endif
if (m_bIsMissionScript)
DoDeatharrestCheck();
@@ -2055,41 +764,7 @@ int8 CRunningScript::ProcessOneCommand()
m_bNotFlag = (command & 0x8000);
command &= 0x7FFF;
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
- char commandInfo[1024];
- uint32 ip = m_nIp;
- if (command < ARRAY_SIZE(commands)) {
- script_assert(commands[command].id == command);
- m_nIp -= 2;
- sprintf(commandInfo, m_nIp >= SIZE_MAIN_SCRIPT ? "M<%5d> " : "<%6d> ", m_nIp >= SIZE_MAIN_SCRIPT ? m_nIp - SIZE_MAIN_SCRIPT : m_nIp);
- m_nIp += 2;
- if (m_bNotFlag)
- strcat(commandInfo, "NOT ");
- if (commands[command].position == -1)
- strcat(commandInfo, commands[command].name + sizeof("COMMAND_") - 1);
- for (int i = 0; commands[command].input[i] != ARGTYPE_NONE; i++) {
- char tmp[16];
- bool var = false;
- int value;
- switch (commands[command].input[i]) {
- case ARGTYPE_INT:
- case ARGTYPE_PED_HANDLE:
- case ARGTYPE_VEHICLE_HANDLE:
- case ARGTYPE_OBJECT_HANDLE: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%d)" : " %d", value); break;
- case ARGTYPE_FLOAT: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%.3f)" : " %.3f", *(float*)&value); break;
- case ARGTYPE_STRING: sprintf(tmp, " '%s'", (const char*)&CTheScripts::ScriptSpace[m_nIp]); m_nIp += KEY_LENGTH_IN_SCRIPT; break;
- case ARGTYPE_LABEL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s(%d))" : " %s(%d)", value >= 0 ? "G" : "L", abs(value)); break;
- case ARGTYPE_BOOL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s)" : " %s", value ? "TRUE" : "FALSE"); break;
- case ARGTYPE_ANDOR: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, " %d %ss", (value + 1) % 10, value / 10 == 0 ? "AND" : "OR"); break;
- default: script_assert(0);
- }
- strcat(commandInfo, tmp);
- if (commands[command].position == i)
- strcat(commandInfo, commands[command].name_override);
- }
- uint32 t = m_nIp;
- m_nIp = ip;
- ip = t;
- }
+ LogBeforeProcessingCommand(command);
#endif
if (command < 100)
retval = ProcessCommands0To99(command);
@@ -2121,36 +796,7 @@ int8 CRunningScript::ProcessOneCommand()
retval = ProcessCommands1100To1199(command);
#endif
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
- if (command < ARRAY_SIZE(commands)) {
- if (commands[command].cond || commands[command].output[0] != ARGTYPE_NONE) {
- strcat(commandInfo, " ->");
- if (commands[command].cond)
- strcat(commandInfo, m_bCondResult ? " TRUE" : " FALSE");
- uint32 t = m_nIp;
- m_nIp = ip;
- ip = t;
- for (int i = 0; commands[command].output[i] != ARGTYPE_NONE; i++) {
- char tmp[16];
- switch (commands[command].output[i]) {
- case ARGTYPE_INT:
- case ARGTYPE_PED_HANDLE:
- case ARGTYPE_VEHICLE_HANDLE:
- case ARGTYPE_OBJECT_HANDLE: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%d)", ScriptParams[i]); strcat(commandInfo, tmp); break;
- case ARGTYPE_FLOAT: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%8.3f)", *(float*)&ScriptParams[i]); strcat(commandInfo, tmp); break;
- default: script_assert(0 && "Script only returns INTs and FLOATs");
- }
- }
- m_nIp = ip;
- }
- PrintToLog("%s\n", commandInfo);
- if (m_bMissionFlag) {
- for (int i = 0; commandInfo[i]; i++) {
- if (commandInfo[i] == '_')
- commandInfo[i] = ' ';
- }
- CDebug::DebugAddText(commandInfo);
- }
- }
+ LogAfterProcessingCommand(command);
#elif defined USE_BASIC_SCRIPT_DEBUG_OUTPUT
if (m_bMissionFlag) {
char tmp[128];
@@ -2688,11 +1334,11 @@ int8 CRunningScript::ProcessCommands0To99(int32 command)
CPlayerInfo* pPlayerInfo = &CWorld::Players[CWorld::PlayerInFocus];
#if 0 // makeing autosave is pointless and is a bit buggy
if (pPlayerInfo->m_pPed->GetPedState() != PED_DEAD && pPlayerInfo->m_WBState == WBSTATE_PLAYING && !m_bDeatharrestExecuted)
- SaveGameForPause(1);
+ SaveGameForPause(SAVE_TYPE_QUICKSAVE);
#endif
oldTargetX = oldTargetY = 0.0f;
- if (AllowMissionReplay == 1)
- AllowMissionReplay = 2;
+ if (AllowMissionReplay == MISSION_RETRY_STAGE_WAIT_FOR_SCRIPT_TO_TERMINATE)
+ AllowMissionReplay = MISSION_RETRY_STAGE_START_PROCESSING;
// I am fairly sure they forgot to set return value here
}
#endif
@@ -3796,7 +2442,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
wchar* key = TheText.Get((char*)&CTheScripts::ScriptSpace[m_nIp]);
#ifdef MISSION_REPLAY
if (strcmp((char*)&CTheScripts::ScriptSpace[m_nIp], "M_FAIL") == 0 && CanAllowMissionReplay())
- AllowMissionReplay = 1;
+ AllowMissionReplay = MISSION_RETRY_STAGE_WAIT_FOR_SCRIPT_TO_TERMINATE;
#endif
m_nIp += KEY_LENGTH_IN_SCRIPT;
CollectParameters(&m_nIp, 2);
@@ -4296,7 +2942,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
CTheScripts::ReadTextLabelFromScript(&m_nIp, label);
int zoneToCheck = CTheZones::FindZoneByLabelAndReturnIndex(label);
if (zoneToCheck != -1)
- m_nIp += KEY_LENGTH_IN_SCRIPT; /* why only if zone != 1? */
+ m_nIp += KEY_LENGTH_IN_SCRIPT; /* why only if zone != -1? */
CVector pos = pPlayer->GetPos();
CZone* pZone = CTheZones::GetZone(zoneToCheck);
UpdateCompareFlag(CTheZones::PointLiesWithinZone(&pos, pZone));
@@ -4394,7 +3040,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
#ifdef FIX_BUGS
AnimationId anim = pVehicle->GetDriverAnim();
#else
- AnimationId anim = pVehicle->bLowVehicle ? ANIM_CAR_LSIT : ANIM_CAR_SIT;
+ AnimationId anim = pVehicle->bLowVehicle ? ANIM_STD_CAR_SIT_LO : ANIM_STD_CAR_SIT;
#endif
pPed->m_pVehicleAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, anim, 100.0f);
pPed->StopNonPartialAnims();
@@ -4437,7 +3083,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
pPlayer->m_pPed->m_pVehicleAnim->blendDelta = -1000.0f;
pPlayer->m_pPed->m_pVehicleAnim = nil;
pPlayer->m_pPed->SetMoveState(PEDMOVE_NONE);
- CAnimManager::BlendAnimation(pPlayer->m_pPed->GetClump(), pPlayer->m_pPed->m_animGroup, ANIM_IDLE_STANCE, 100.0f);
+ CAnimManager::BlendAnimation(pPlayer->m_pPed->GetClump(), pPlayer->m_pPed->m_animGroup, ANIM_STD_IDLE, 100.0f);
pPlayer->m_pPed->RestartNonPartialAnims();
AudioManager.PlayerJustLeftCar();
pos.z += pPlayer->m_pPed->GetDistanceFromCentreOfMassToBaseOfModel();
@@ -4459,7 +3105,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
bool CRunningScript::CanAllowMissionReplay()
{
- if (AllowMissionReplay)
+ if (AllowMissionReplay != MISSION_RETRY_STAGE_NORMAL)
return false;
if (CStats::LastMissionPassedName[0] == '\0')
return false;
@@ -4481,57 +3127,16 @@ uint32 AddExtraDeathDelay()
void RetryMission(int type, int unk)
{
- if (type == 0) {
+ if (type == MISSION_RETRY_TYPE_SUGGEST_TO_PLAYER) {
doingMissionRetry = true;
FrontEndMenuManager.m_nCurrScreen = MENUPAGE_MISSION_RETRY;
FrontEndMenuManager.RequestFrontEndStartUp();
}
- else if (type == 2) {
+ else if (type == MISSION_RETRY_TYPE_BEGIN_RESTARTING) {
doingMissionRetry = false;
- AllowMissionReplay = 6;
+ AllowMissionReplay = MISSION_RETRY_STAGE_START_RESTARTING;
CTheScripts::MissionCleanUp.Process();
}
}
#endif
-
-#ifdef MISSION_SWITCHER
-void
-CTheScripts::SwitchToMission(int32 mission)
-{
- for (CRunningScript* pScript = CTheScripts::pActiveScripts; pScript != nil; pScript = pScript->GetNext()) {
- if (!pScript->m_bIsMissionScript || !pScript->m_bDeatharrestEnabled) {
- continue;
- }
- while (pScript->m_nStackPointer > 0)
- --pScript->m_nStackPointer;
-
- pScript->m_nIp = pScript->m_anStack[pScript->m_nStackPointer];
- *(int32*)&CTheScripts::ScriptSpace[CTheScripts::OnAMissionFlag] = 0;
- pScript->m_nWakeTime = 0;
- pScript->m_bDeatharrestExecuted = true;
-
- while (!pScript->ProcessOneCommand());
-
- CMessages::ClearMessages();
- }
-
-#ifdef MISSION_REPLAY
- missionRetryScriptIndex = mission;
- if (missionRetryScriptIndex == 19)
- CStats::LastMissionPassedName[0] = '\0';
-#endif
- CTimer::Suspend();
- int offset = CTheScripts::MultiScriptArray[mission];
- CFileMgr::ChangeDir("\\");
- int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
- CFileMgr::Seek(handle, offset, 0);
- CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
- CFileMgr::CloseFile(handle);
- CRunningScript* pMissionScript = CTheScripts::StartNewScript(SIZE_MAIN_SCRIPT);
- CTimer::Resume();
- pMissionScript->m_bIsMissionScript = true;
- pMissionScript->m_bMissionFlag = true;
- CTheScripts::bAlreadyRunningAMissionScript = true;
-}
-#endif
diff --git a/src/control/Script.h b/src/control/Script.h
index 5682024b..eedf17d4 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -370,6 +370,13 @@ public:
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
int CollectParameterForDebug(char* buf, bool& var);
void GetStoredParameterForDebug(char* buf);
+ void LogOnStartProcessing();
+ void LogBeforeProcessingCommand(int32 command);
+ void LogAfterProcessingCommand(int32 command);
+
+ static char commandInfo[];
+ static uint32 storedIp;
+
#endif
float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; }
@@ -576,6 +583,17 @@ public:
public:
static void SwitchToMission(int32 mission);
#endif
+
+#ifdef USE_DEBUG_SCRIPT_LOADER
+ static int ScriptToLoad;
+ static int OpenScript();
+#endif
+
+#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
+ static void LogAfterScriptInitializing();
+ static void LogBeforeScriptProcessing();
+ static void LogAfterScriptProcessing();
+#endif
};
#ifdef MISSION_REPLAY
@@ -587,9 +605,22 @@ extern int missionRetryScriptIndex;
extern bool doingMissionRetry;
uint32 AddExtraDeathDelay();
-void RetryMission(int, int);
-#endif
+void RetryMission(int, int unk = 0);
-#ifdef USE_DEBUG_SCRIPT_LOADER
-extern int scriptToLoad;
-#endif
\ No newline at end of file
+enum {
+ MISSION_RETRY_TYPE_SUGGEST_TO_PLAYER = 0,
+ MISSION_RETRY_TYPE_1,
+ MISSION_RETRY_TYPE_BEGIN_RESTARTING
+};
+
+enum {
+ MISSION_RETRY_STAGE_NORMAL = 0,
+ MISSION_RETRY_STAGE_WAIT_FOR_SCRIPT_TO_TERMINATE,
+ MISSION_RETRY_STAGE_START_PROCESSING,
+ MISSION_RETRY_STAGE_WAIT_FOR_DELAY,
+ MISSION_RETRY_STAGE_WAIT_FOR_MENU,
+ MISSION_RETRY_STAGE_WAIT_FOR_USER,
+ MISSION_RETRY_STAGE_START_RESTARTING,
+ MISSION_RETRY_STAGE_WAIT_FOR_TIMER_AFTER_RESTART,
+};
+#endif
diff --git a/src/control/Script2.cpp b/src/control/Script2.cpp
index 9329b3bc..d3ab2af7 100644
--- a/src/control/Script2.cpp
+++ b/src/control/Script2.cpp
@@ -437,8 +437,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
float length = *(float*)&ScriptParams[5];
float x, y;
if (angle != 0.0f){
- y = cos(angle) * length;
- x = sin(angle) * length;
+ y = Cos(angle) * length;
+ x = Sin(angle) * length;
}else{
y = length;
x = 0.0f;
@@ -913,7 +913,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
if (strcmp(m_abScriptName, "camera") == 0){
pPlayer->m_pPed->SetMoveSpeed(0.0f, 0.0f, 0.0f);
pPlayer->m_pPed->SetTurnSpeed(0.0f, 0.0f, 0.0f);
- CAnimManager::BlendAnimation((RpClump*)pPlayer->m_pPed->m_rwObject, pPlayer->m_pPed->m_animGroup, ANIM_IDLE_STANCE, 1000.0f);
+ CAnimManager::BlendAnimation((RpClump*)pPlayer->m_pPed->m_rwObject, pPlayer->m_pPed->m_animGroup, ANIM_STD_IDLE, 1000.0f);
}
}
return 0;
@@ -1156,7 +1156,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
#ifdef FIX_BUGS
AnimationId anim = pVehicle->GetDriverAnim();
#else
- AnimationId anim = pVehicle->bLowVehicle ? ANIM_CAR_LSIT : ANIM_CAR_SIT;
+ AnimationId anim = pVehicle->bLowVehicle ? ANIM_STD_CAR_SIT_LO : ANIM_STD_CAR_SIT;
#endif
pPed->m_pVehicleAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, anim, 100.0f);
pPed->StopNonPartialAnims();
diff --git a/src/control/Script3.cpp b/src/control/Script3.cpp
index f49835db..ac88347b 100644
--- a/src/control/Script3.cpp
+++ b/src/control/Script3.cpp
@@ -417,7 +417,7 @@ int8 CRunningScript::ProcessCommands500To599(int32 command)
pPed->FlagToDestroyWhenNextProcessed();
}
else {
- pPed->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f);
+ pPed->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f);
}
return 0;
}
diff --git a/src/control/Script4.cpp b/src/control/Script4.cpp
index 40f9f2f1..4e798be3 100644
--- a/src/control/Script4.cpp
+++ b/src/control/Script4.cpp
@@ -68,7 +68,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
pPed->ApplyHeadShot(WEAPONTYPE_SNIPERRIFLE, pPed->GetNodePosition(PED_HEAD), true);
}
else {
- pPed->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f);
+ pPed->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f);
}
return 0;
}
@@ -81,7 +81,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
pPed->ApplyHeadShot(WEAPONTYPE_SNIPERRIFLE, pPed->GetNodePosition(PED_HEAD), true);
}
else {
- pPed->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f);
+ pPed->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f);
}
return 0;
}
@@ -735,7 +735,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
CollectParameters(&m_nIp, 2);
CPlayerPed* pPlayerPed = CWorld::Players[ScriptParams[0]].m_pPed;
script_assert(pPlayerPed);
- pPlayerPed->m_fArmour = clamp(pPlayerPed->m_fArmour + ScriptParams[1], 0.0f, 100.0f);
+ pPlayerPed->m_fArmour = Clamp(pPlayerPed->m_fArmour + ScriptParams[1], 0.0f, 100.0f);
return 0;
}
case COMMAND_ADD_ARMOUR_TO_CHAR:
@@ -743,7 +743,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
CollectParameters(&m_nIp, 2);
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
script_assert(pPed);
- pPed->m_fArmour = clamp(pPed->m_fArmour + ScriptParams[1], 0.0f, 100.0f);
+ pPed->m_fArmour = Clamp(pPed->m_fArmour + ScriptParams[1], 0.0f, 100.0f);
return 0;
}
case COMMAND_OPEN_GARAGE:
@@ -793,7 +793,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
pPed->m_pVehicleAnim = nil;
pPed->RestartNonPartialAnims();
pPed->SetMoveState(PEDMOVE_NONE);
- CAnimManager::BlendAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_IDLE_STANCE, 100.0f);
+ CAnimManager::BlendAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_STD_IDLE, 100.0f);
pos.z += pPed->GetDistanceFromCentreOfMassToBaseOfModel();
pPed->Teleport(pos);
CTheScripts::ClearSpaceForMissionEntity(pos, pPed);
@@ -1327,7 +1327,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
{
CollectParameters(&m_nIp, 1);
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
- DMAudio.PlayFrontEndTrack(ScriptParams[0] + STREAMED_SOUND_MISSION_COMPLETED - 1, 0);
+ DMAudio.PlayFrontEndTrack(ScriptParams[0] + STREAMED_SOUND_MISSION_COMPLETED - 1, FALSE);
return 0;
}
case COMMAND_CLEAR_AREA:
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp
index b54d425c..76aa2442 100644
--- a/src/control/Script5.cpp
+++ b/src/control/Script5.cpp
@@ -12,6 +12,7 @@
#include "Pools.h"
#include "Population.h"
#include "RpAnimBlend.h"
+#include "SaveBuf.h"
#include "Shadows.h"
#include "SpecialFX.h"
#include "World.h"
@@ -948,10 +949,10 @@ void CRunningScript::PlayerInAngledAreaCheckCommand(int32 command, uint32* pIp)
initAngle -= TWOPI;
// it looks like the idea is to use a rectangle using the diagonal of the rectangle as
// the side of new rectangle, with "length" being the length of second side
- float rotatedSupX = supX + side2length * sin(initAngle);
- float rotatedSupY = supY - side2length * cos(initAngle);
- float rotatedInfX = infX + side2length * sin(initAngle);
- float rotatedInfY = infY - side2length * cos(initAngle);
+ float rotatedSupX = supX + side2length * Sin(initAngle);
+ float rotatedSupY = supY - side2length * Cos(initAngle);
+ float rotatedInfX = infX + side2length * Sin(initAngle);
+ float rotatedInfY = infY - side2length * Cos(initAngle);
float side1X = supX - infX;
float side1Y = supY - infY;
float side1Length = CVector2D(side1X, side1Y).Magnitude();
@@ -1238,10 +1239,10 @@ void CRunningScript::DoDeatharrestCheck()
if (!pPlayer->IsRestartingAfterDeath() && !pPlayer->IsRestartingAfterArrest() && !CTheScripts::UpsideDownCars.AreAnyCarsUpsideDown())
return;
#ifdef MISSION_REPLAY
- if (AllowMissionReplay != 0)
+ if (AllowMissionReplay != MISSION_RETRY_STAGE_NORMAL)
return;
if (CanAllowMissionReplay())
- AllowMissionReplay = 1;
+ AllowMissionReplay = MISSION_RETRY_STAGE_WAIT_FOR_SCRIPT_TO_TERMINATE;
#endif
script_assert(m_nStackPointer > 0);
while (m_nStackPointer > 1)
@@ -2002,21 +2003,25 @@ void CTheScripts::LoadAllScripts(uint8* buf, uint32 size)
Init();
INITSAVEBUF
CheckSaveHeader(buf, 'S', 'C', 'R', '\0', size - SAVE_HEADER_SIZE);
- uint32 varSpace = ReadSaveBuf(buf);
+ uint32 varSpace, type, handle;
+ uint32 tmp;
+
+ ReadSaveBuf(&varSpace, buf);
for (uint32 i = 0; i < varSpace; i++)
- ScriptSpace[i] = ReadSaveBuf(buf);
- script_assert(ReadSaveBuf(buf) == SCRIPT_DATA_SIZE);
- OnAMissionFlag = ReadSaveBuf(buf);
+ ReadSaveBuf(&ScriptSpace[i], buf);
+ ReadSaveBuf(&tmp, buf);
+ script_assert(tmp == SCRIPT_DATA_SIZE);
+ ReadSaveBuf(&OnAMissionFlag, buf);
for (uint32 i = 0; i < MAX_NUM_CONTACTS; i++) {
- OnAMissionForContactFlag[i] = ReadSaveBuf(buf);
- BaseBriefIdForContact[i] = ReadSaveBuf(buf);
+ ReadSaveBuf(&OnAMissionForContactFlag[i], buf);
+ ReadSaveBuf(&BaseBriefIdForContact[i], buf);
}
for (uint32 i = 0; i < MAX_NUM_COLLECTIVES; i++)
- CollectiveArray[i] = ReadSaveBuf(buf);
- NextFreeCollectiveIndex = ReadSaveBuf(buf);
+ ReadSaveBuf(&CollectiveArray[i], buf);
+ ReadSaveBuf(&NextFreeCollectiveIndex, buf);
for (uint32 i = 0; i < MAX_NUM_BUILDING_SWAPS; i++) {
- uint32 type = ReadSaveBuf(buf);
- uint32 handle = ReadSaveBuf(buf);
+ ReadSaveBuf(&type, buf);
+ ReadSaveBuf(&handle, buf);
switch (type) {
case 0:
BuildingSwapArray[i].m_pBuilding = nil;
@@ -2030,14 +2035,14 @@ INITSAVEBUF
default:
script_assert(false);
}
- BuildingSwapArray[i].m_nNewModel = ReadSaveBuf(buf);
- BuildingSwapArray[i].m_nOldModel = ReadSaveBuf(buf);
+ ReadSaveBuf(&BuildingSwapArray[i].m_nNewModel, buf);
+ ReadSaveBuf(&BuildingSwapArray[i].m_nOldModel, buf);
if (BuildingSwapArray[i].m_pBuilding)
BuildingSwapArray[i].m_pBuilding->ReplaceWithNewModel(BuildingSwapArray[i].m_nNewModel);
}
for (uint32 i = 0; i < MAX_NUM_INVISIBILITY_SETTINGS; i++) {
- uint32 type = ReadSaveBuf(buf);
- uint32 handle = ReadSaveBuf(buf);
+ ReadSaveBuf(&type, buf);
+ ReadSaveBuf(&handle, buf);
switch (type) {
case 0:
InvisibilitySettingArray[i] = nil;
@@ -2060,14 +2065,20 @@ INITSAVEBUF
if (InvisibilitySettingArray[i])
InvisibilitySettingArray[i]->bIsVisible = false;
}
- script_assert(ReadSaveBuf(buf) == bUsingAMultiScriptFile);
- ReadSaveBuf(buf);
- ReadSaveBuf(buf);
- script_assert(ReadSaveBuf(buf) == MainScriptSize);
- script_assert(ReadSaveBuf(buf) == LargestMissionScriptSize);
- script_assert(ReadSaveBuf(buf) == NumberOfMissionScripts);
- ReadSaveBuf(buf);
- uint32 runningScripts = ReadSaveBuf(buf);
+ bool tmpBool;
+ ReadSaveBuf(&tmpBool, buf);
+ script_assert(tmpBool == bUsingAMultiScriptFile);
+ SkipSaveBuf(buf, 3);
+ ReadSaveBuf(&tmp, buf);
+ script_assert(tmp == MainScriptSize);
+ ReadSaveBuf(&tmp, buf);
+ script_assert(tmp == LargestMissionScriptSize);
+ uint16 tmp16;
+ ReadSaveBuf(&tmp16, buf);
+ script_assert(tmp16 == NumberOfMissionScripts);
+ SkipSaveBuf(buf, 2);
+ uint32 runningScripts;
+ ReadSaveBuf(&runningScripts, buf);
for (uint32 i = 0; i < runningScripts; i++)
StartNewScript(0)->Load(buf);
VALIDATESAVEBUF(size)
@@ -2078,33 +2089,33 @@ VALIDATESAVEBUF(size)
void CRunningScript::Save(uint8*& buf)
{
#ifdef COMPATIBLE_SAVES
- SkipSaveBuf(buf, 8);
+ ZeroSaveBuf(buf, 8);
for (int i = 0; i < 8; i++)
- WriteSaveBuf(buf, m_abScriptName[i]);
- WriteSaveBuf(buf, m_nIp);
+ WriteSaveBuf(buf, m_abScriptName[i]);
+ WriteSaveBuf(buf, m_nIp);
#ifdef CHECK_STRUCT_SIZES
static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
#endif
for (int i = 0; i < MAX_STACK_DEPTH; i++)
- WriteSaveBuf(buf, m_anStack[i]);
- WriteSaveBuf(buf, m_nStackPointer);
- SkipSaveBuf(buf, 2);
+ WriteSaveBuf(buf, m_anStack[i]);
+ WriteSaveBuf(buf, m_nStackPointer);
+ ZeroSaveBuf(buf, 2);
#ifdef CHECK_STRUCT_SIZES
static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
#endif
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
- WriteSaveBuf(buf, m_anLocalVariables[i]);
- WriteSaveBuf(buf, m_bCondResult);
- WriteSaveBuf(buf, m_bIsMissionScript);
- WriteSaveBuf(buf, m_bSkipWakeTime);
- SkipSaveBuf(buf, 1);
- WriteSaveBuf(buf, m_nWakeTime);
- WriteSaveBuf(buf, m_nAndOrState);
- WriteSaveBuf(buf, m_bNotFlag);
- WriteSaveBuf(buf, m_bDeatharrestEnabled);
- WriteSaveBuf(buf, m_bDeatharrestExecuted);
- WriteSaveBuf(buf, m_bMissionFlag);
- SkipSaveBuf(buf, 2);
+ WriteSaveBuf(buf, m_anLocalVariables[i]);
+ WriteSaveBuf(buf, m_bCondResult);
+ WriteSaveBuf(buf, m_bIsMissionScript);
+ WriteSaveBuf(buf, m_bSkipWakeTime);
+ ZeroSaveBuf(buf, 1);
+ WriteSaveBuf(buf, m_nWakeTime);
+ WriteSaveBuf(buf, m_nAndOrState);
+ WriteSaveBuf(buf, m_bNotFlag);
+ WriteSaveBuf(buf, m_bDeatharrestEnabled);
+ WriteSaveBuf(buf, m_bDeatharrestExecuted);
+ WriteSaveBuf(buf, m_bMissionFlag);
+ ZeroSaveBuf(buf, 2);
#else
WriteSaveBuf(buf, *this);
#endif
@@ -2115,35 +2126,35 @@ void CRunningScript::Load(uint8*& buf)
#ifdef COMPATIBLE_SAVES
SkipSaveBuf(buf, 8);
for (int i = 0; i < 8; i++)
- m_abScriptName[i] = ReadSaveBuf(buf);
- m_nIp = ReadSaveBuf(buf);
+ ReadSaveBuf(&m_abScriptName[i], buf);
+ ReadSaveBuf(&m_nIp, buf);
#ifdef CHECK_STRUCT_SIZES
static_assert(MAX_STACK_DEPTH == 6, "Compatibility loss: MAX_STACK_DEPTH != 6");
#endif
for (int i = 0; i < MAX_STACK_DEPTH; i++)
- m_anStack[i] = ReadSaveBuf(buf);
- m_nStackPointer = ReadSaveBuf(buf);
+ ReadSaveBuf(&m_anStack[i], buf);
+ ReadSaveBuf(&m_nStackPointer, buf);
SkipSaveBuf(buf, 2);
#ifdef CHECK_STRUCT_SIZES
static_assert(NUM_LOCAL_VARS + NUM_TIMERS == 18, "Compatibility loss: NUM_LOCAL_VARS + NUM_TIMERS != 18");
#endif
for (int i = 0; i < NUM_LOCAL_VARS + NUM_TIMERS; i++)
- m_anLocalVariables[i] = ReadSaveBuf(buf);
- m_bCondResult = ReadSaveBuf(buf);
- m_bIsMissionScript = ReadSaveBuf(buf);
- m_bSkipWakeTime = ReadSaveBuf(buf);
+ ReadSaveBuf(&m_anLocalVariables[i], buf);
+ ReadSaveBuf(&m_bCondResult, buf);
+ ReadSaveBuf(&m_bIsMissionScript, buf);
+ ReadSaveBuf(&m_bSkipWakeTime, buf);
SkipSaveBuf(buf, 1);
- m_nWakeTime = ReadSaveBuf(buf);
- m_nAndOrState = ReadSaveBuf(buf);
- m_bNotFlag = ReadSaveBuf(buf);
- m_bDeatharrestEnabled = ReadSaveBuf(buf);
- m_bDeatharrestExecuted = ReadSaveBuf(buf);
- m_bMissionFlag = ReadSaveBuf(buf);
+ ReadSaveBuf(&m_nWakeTime, buf);
+ ReadSaveBuf(&m_nAndOrState, buf);
+ ReadSaveBuf(&m_bNotFlag, buf);
+ ReadSaveBuf(&m_bDeatharrestEnabled, buf);
+ ReadSaveBuf(&m_bDeatharrestExecuted, buf);
+ ReadSaveBuf(&m_bMissionFlag, buf);
SkipSaveBuf(buf, 2);
#else
CRunningScript* n = next;
CRunningScript* p = prev;
- *this = ReadSaveBuf(buf);
+ ReadSaveBuf(this, buf);
next = n;
prev = p;
#endif
@@ -2450,10 +2461,10 @@ bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer)
CPed* pPed = pPlayer->m_pPed;
if (pPed->bInVehicle)
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))
+ if (RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_RUNSTOP1) ||
+ RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_RUNSTOP2) ||
+ RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_JUMP_LAUNCH) ||
+ RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_JUMP_GLIDE))
return false;
return pPed->m_nMoveState == PEDMOVE_NONE || pPed->m_nMoveState == PEDMOVE_STILL;
}
diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp
index 31be6987..0a2248f8 100644
--- a/src/control/Script6.cpp
+++ b/src/control/Script6.cpp
@@ -82,8 +82,8 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
{
CollectParameters(&m_nIp, 1);
#ifdef MISSION_REPLAY
- AllowMissionReplay = 0;
- SaveGameForPause(3);
+ AllowMissionReplay = MISSION_RETRY_STAGE_NORMAL;
+ SaveGameForPause(SAVE_TYPE_QUICKSAVE_FOR_MISSION_REPLAY);
#endif
CPlayerInfo* pPlayerInfo = &CWorld::Players[ScriptParams[0]];
CPad::GetPad(ScriptParams[0])->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE);
@@ -304,8 +304,12 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command)
#endif
CTimer::Suspend();
int offset = CTheScripts::MultiScriptArray[ScriptParams[0]];
+#ifdef USE_DEBUG_SCRIPT_LOADER
+ int handle = CTheScripts::OpenScript();
+#else
CFileMgr::ChangeDir("\\");
int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
+#endif
CFileMgr::Seek(handle, offset, 0);
CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
CFileMgr::CloseFile(handle);
diff --git a/src/control/ScriptDebug.cpp b/src/control/ScriptDebug.cpp
new file mode 100644
index 00000000..63508217
--- /dev/null
+++ b/src/control/ScriptDebug.cpp
@@ -0,0 +1,1441 @@
+#include "common.h"
+
+#include "Script.h"
+#include "ScriptCommands.h"
+
+#include "Debug.h"
+#include "FileMgr.h"
+#include "Messages.h"
+#include "Timer.h"
+#include "Stats.h"
+#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
+#include
+#endif
+
+#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
+
+char CRunningScript::commandInfo[1024];
+uint32 CRunningScript::storedIp;
+
+#define REGISTER_COMMAND(command, in, out, cond, ovrd, visual) { command, #command, in, out, cond, ovrd, visual }
+#define INPUT_ARGUMENTS(...) { __VA_ARGS__ ARGTYPE_NONE }
+#define OUTPUT_ARGUMENTS(...) { __VA_ARGS__ ARGTYPE_NONE }
+const tScriptCommandData commands[] = {
+ REGISTER_COMMAND(COMMAND_NOP, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WAIT, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GOTO, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SHAKE_CAM, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_ADD_VAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_VAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_VAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_VAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_VAL_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_MULT_INT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_FLOAT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_INT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_FLOAT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_DIV_INT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_FLOAT_VAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_INT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_FLOAT_LVAR_BY_VAL, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_THAN_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_THAN_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_THAN_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_THAN_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_THAN_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_THAN_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_THAN_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_THAN_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_THAN_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_THAN_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >"),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " >="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_NOT_EQUAL_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_INT_LVAR_NOT_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_INT_VAR_NOT_EQUAL_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " =="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_NOT_EQUAL_TO_NUMBER, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_LVAR_NOT_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_IS_FLOAT_VAR_NOT_EQUAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, 0, " !="),
+ REGISTER_COMMAND(COMMAND_GOTO_IF_TRUE, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GOTO_IF_FALSE, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_TERMINATE_THIS_SCRIPT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_START_NEW_SCRIPT, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GOSUB, INPUT_ARGUMENTS(ARGTYPE_LABEL,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_RETURN, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LINE, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_PLAYER, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_PLAYER_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_PLAYER_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_PLAYER_IN_AREA_3D, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_ADD_INT_VAR_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_FLOAT_VAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_INT_LVAR_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_FLOAT_LVAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_INT_VAR_TO_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_FLOAT_VAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_INT_LVAR_TO_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_ADD_FLOAT_LVAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +="),
+ REGISTER_COMMAND(COMMAND_SUB_INT_VAR_FROM_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_FLOAT_VAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_INT_LVAR_FROM_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_FLOAT_LVAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_INT_VAR_FROM_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_FLOAT_VAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_INT_LVAR_FROM_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_SUB_FLOAT_LVAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -="),
+ REGISTER_COMMAND(COMMAND_MULT_INT_VAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_FLOAT_VAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_INT_LVAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_FLOAT_LVAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_INT_VAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_FLOAT_VAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_INT_LVAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_MULT_FLOAT_LVAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " *="),
+ REGISTER_COMMAND(COMMAND_DIV_INT_VAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_FLOAT_VAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_INT_LVAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_FLOAT_LVAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_INT_VAR_BY_INT_LVAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_FLOAT_VAR_BY_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_INT_LVAR_BY_INT_VAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_DIV_FLOAT_LVAR_BY_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " /="),
+ REGISTER_COMMAND(COMMAND_ADD_TIMED_VAL_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
+ REGISTER_COMMAND(COMMAND_ADD_TIMED_VAL_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
+ REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_VAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
+ REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_LVAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
+ REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_LVAR_TO_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
+ REGISTER_COMMAND(COMMAND_ADD_TIMED_FLOAT_VAR_TO_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " +=@"),
+ REGISTER_COMMAND(COMMAND_SUB_TIMED_VAL_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
+ REGISTER_COMMAND(COMMAND_SUB_TIMED_VAL_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
+ REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_VAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
+ REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
+ REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_VAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
+ REGISTER_COMMAND(COMMAND_SUB_TIMED_FLOAT_VAR_FROM_FLOAT_LVAR, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " -=@"),
+ REGISTER_COMMAND(COMMAND_SET_VAR_INT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_LVAR_INT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_VAR_FLOAT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_LVAR_FLOAT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_VAR_FLOAT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_LVAR_FLOAT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_VAR_INT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_SET_LVAR_INT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ="),
+ REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_CSET_VAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_CSET_VAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_CSET_LVAR_INT_TO_LVAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_CSET_LVAR_FLOAT_TO_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " =#"),
+ REGISTER_COMMAND(COMMAND_ABS_VAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
+ REGISTER_COMMAND(COMMAND_ABS_LVAR_INT, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
+ REGISTER_COMMAND(COMMAND_ABS_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
+ REGISTER_COMMAND(COMMAND_ABS_VAR_FLOAT, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, 0, " ABS"),
+ REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_FLOAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GENERATE_RANDOM_INT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CHAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DELETE_CHAR, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHAR_WANDER_DIR, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHAR_WANDER_RANGE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHAR_FOLLOW_PATH, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CHAR_SET_IDLE, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CHAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CHAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_STILL_ALIVE, INPUT_ARGUMENTS(ARGTYPE_PED_HANDLE,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CHAR_IN_AREA_2D, INPUT_ARGUMENTS(ARGTYPE_PED_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_PED_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_BOOL,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_CREATE_CAR, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DELETE_CAR, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CAR_GOTO_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CAR_WANDER_RANDOMLY, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CAR_SET_IDLE, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_CAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_CAR_COORDINATES, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_CAR_STILL_ALIVE, INPUT_ARGUMENTS(ARGTYPE_VEHICLE_HANDLE,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ 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_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, ""),
+ REGISTER_COMMAND(COMMAND_SPECIAL_3, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SPECIAL_4, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SPECIAL_5, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SPECIAL_6, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SPECIAL_7, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_BIG, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_NOW, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_PRINT_SOON, INPUT_ARGUMENTS(ARGTYPE_STRING, ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_CLEAR_PRINTS, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_TIME_OF_DAY, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_SET_TIME_OF_DAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_GET_MINUTES_TO_TIME_OF_DAY, INPUT_ARGUMENTS(ARGTYPE_INT, ARGTYPE_INT,), OUTPUT_ARGUMENTS(ARGTYPE_INT,), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IS_POINT_ON_SCREEN, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), true, -1, ""),
+ REGISTER_COMMAND(COMMAND_DEBUG_ON, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_DEBUG_OFF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_RETURN_TRUE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_RETURN_FALSE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_VAR_INT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_VAR_FLOAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LVAR_INT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LVAR_FLOAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_LBRACKET, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_RBRACKET, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_REPEAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ENDREPEAT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_IFNOT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ELSE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ENDIF, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WHILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_WHILENOT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ENDWHILE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_LOAD_END_OF_GAME_TUNE, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+ REGISTER_COMMAND(COMMAND_ENABLE_PLAYER_CONTROL_CAMERA, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""),
+#if GTA_VERSION > GTA3_PS2_160
+ 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, ""),
+#if GTA_VERSION < GTA3_PC_11
+ REGISTER_COMMAND(COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER, INPUT_ARGUMENTS(ARGTYPE_FLOAT,), OUTPUT_ARGUMENTS(), false, -1, ""),
+#endif
+#endif
+};
+#undef REGISTER_COMMAND
+#undef INPUT_ARGUMENTS
+#undef OUTPUT_ARGUMENTS
+
+static_assert(ARRAY_SIZE(commands) == LAST_SCRIPT_COMMAND, "commands array not filled");
+
+#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
+static FILE* dbg_log;
+#endif
+
+static void PrintToLog(const char* format, ...)
+{
+ va_list va;
+ va_start(va, format);
+ char tmp[1024];
+#ifdef _WIN32
+ vsprintf_s(tmp, 1024, format, va);
+#else
+ vsprintf(tmp, format, va);
+#endif
+ va_end(va);
+
+#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
+ if (dbg_log)
+ fwrite(tmp, 1, strlen(tmp), dbg_log);
+#endif
+}
+
+int CRunningScript::CollectParameterForDebug(char* buf, bool& var)
+{
+ float tmp;
+ uint16 varIndex;
+ char tmpstr[24];
+ var = false;
+ switch (CTheScripts::Read1ByteFromScript(&m_nIp))
+ {
+ case ARGUMENT_INT32:
+ return CTheScripts::Read4BytesFromScript(&m_nIp);
+ case ARGUMENT_GLOBALVAR:
+ varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
+ script_assert(varIndex >= 8 && varIndex < CTheScripts::GetSizeOfVariableSpace());
+ var = true;
+ sprintf(tmpstr, " $%d", varIndex / 4);
+ strcat(buf, tmpstr);
+ return *((int32*)&CTheScripts::ScriptSpace[varIndex]);
+ case ARGUMENT_LOCALVAR:
+ varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
+ script_assert(varIndex >= 0 && varIndex < ARRAY_SIZE(m_anLocalVariables));
+ var = true;
+ sprintf(tmpstr, " %d@", varIndex);
+ strcat(buf, tmpstr);
+ return m_anLocalVariables[varIndex];
+ case ARGUMENT_INT8:
+ 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);
+ break;
+ }
+ return 0;
+}
+
+void CRunningScript::GetStoredParameterForDebug(char* buf)
+{
+ uint16 varIndex;
+ char tmpstr[24];
+ switch (CTheScripts::Read1ByteFromScript(&m_nIp)) {
+ case ARGUMENT_GLOBALVAR:
+ varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
+ sprintf(tmpstr, " $%d", varIndex / 4);
+ strcat(buf, tmpstr);
+ break;
+ case ARGUMENT_LOCALVAR:
+ varIndex = CTheScripts::Read2BytesFromScript(&m_nIp);
+ sprintf(tmpstr, " %d@", varIndex);
+ strcat(buf, tmpstr);
+ break;
+ default:
+ PrintToLog("%s - script_assertion failed in GetStoredParameterForDebug", buf);
+ script_assert(0);
+ }
+}
+
+void CTheScripts::LogAfterScriptInitializing()
+{
+#if SCRIPT_LOG_FILE_LEVEL == 2
+ CFileMgr::SetDirMyDocuments();
+ if (dbg_log)
+ fclose(dbg_log);
+ dbg_log = fopen("SCRDBG.LOG", "w");
+ static const char* init_msg = "Starting debug script log\n\n";
+ PrintToLog(init_msg);
+ CFileMgr::SetDir("");
+#endif
+}
+
+void CTheScripts::LogBeforeScriptProcessing()
+{
+
+#if SCRIPT_LOG_FILE_LEVEL == 1
+ CFileMgr::SetDirMyDocuments();
+ dbg_log = fopen("SCRDBG.LOG", "w");
+ static const char* init_msg = "Starting debug script log\n\n";
+ PrintToLog(init_msg);
+ CFileMgr::SetDir("");
+#endif
+ PrintToLog("------------------------\n");
+ PrintToLog("CTheScripts::Process started, CTimer::GetTimeInMilliseconds == %u\n", CTimer::GetTimeInMilliseconds());
+}
+
+void CTheScripts::LogAfterScriptProcessing()
+{
+ PrintToLog("Script processing done, ScriptsUpdated: %d, CommandsExecuted: %d\n", ScriptsUpdated, CommandsExecuted);
+#if SCRIPT_LOG_FILE_LEVEL == 1
+ fclose(dbg_log);
+ dbg_log = nil;
+#endif
+}
+
+void CRunningScript::LogOnStartProcessing()
+{
+ PrintToLog("\n\nProcessing script %s (id %d)\n\n", m_abScriptName, this - CTheScripts::ScriptsArray);
+}
+
+void CRunningScript::LogBeforeProcessingCommand(int32 command)
+{
+ storedIp = m_nIp;
+ if (command < ARRAY_SIZE(commands)) {
+ script_assert(commands[command].id == command);
+ m_nIp -= 2;
+ sprintf(commandInfo, m_nIp >= SIZE_MAIN_SCRIPT ? "M<%5d> " : "<%6d> ", m_nIp >= SIZE_MAIN_SCRIPT ? m_nIp - SIZE_MAIN_SCRIPT : m_nIp);
+ m_nIp += 2;
+ if (m_bNotFlag)
+ strcat(commandInfo, "NOT ");
+ if (commands[command].position == -1)
+ strcat(commandInfo, commands[command].name + sizeof("COMMAND_") - 1);
+ for (int i = 0; commands[command].input[i] != ARGTYPE_NONE; i++) {
+ char tmp[16];
+ bool var = false;
+ int value;
+ switch (commands[command].input[i]) {
+ case ARGTYPE_INT:
+ case ARGTYPE_PED_HANDLE:
+ case ARGTYPE_VEHICLE_HANDLE:
+ case ARGTYPE_OBJECT_HANDLE: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%d)" : " %d", value); break;
+ case ARGTYPE_FLOAT: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%.3f)" : " %.3f", *(float*)&value); break;
+ case ARGTYPE_STRING: sprintf(tmp, " '%s'", (const char*)&CTheScripts::ScriptSpace[m_nIp]); m_nIp += KEY_LENGTH_IN_SCRIPT; break;
+ case ARGTYPE_LABEL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s(%d))" : " %s(%d)", value >= 0 ? "G" : "L", abs(value)); break;
+ case ARGTYPE_BOOL: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, var ? " (%s)" : " %s", value ? "TRUE" : "FALSE"); break;
+ case ARGTYPE_ANDOR: value = CollectParameterForDebug(commandInfo, var); sprintf(tmp, " %d %ss", (value + 1) % 10, value / 10 == 0 ? "AND" : "OR"); break;
+ default: script_assert(0);
+ }
+ strcat(commandInfo, tmp);
+ if (commands[command].position == i)
+ strcat(commandInfo, commands[command].name_override);
+ }
+ uint32 t = m_nIp;
+ m_nIp = storedIp;
+ storedIp = t;
+ }
+}
+
+void CRunningScript::LogAfterProcessingCommand(int32 command)
+{
+ if (command < ARRAY_SIZE(commands)) {
+ if (commands[command].cond || commands[command].output[0] != ARGTYPE_NONE) {
+ strcat(commandInfo, " ->");
+ if (commands[command].cond)
+ strcat(commandInfo, m_bCondResult ? " TRUE" : " FALSE");
+ uint32 t = m_nIp;
+ m_nIp = storedIp;
+ storedIp = t;
+ for (int i = 0; commands[command].output[i] != ARGTYPE_NONE; i++) {
+ char tmp[16];
+ switch (commands[command].output[i]) {
+ case ARGTYPE_INT:
+ case ARGTYPE_PED_HANDLE:
+ case ARGTYPE_VEHICLE_HANDLE:
+ case ARGTYPE_OBJECT_HANDLE: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%d)", ScriptParams[i]); strcat(commandInfo, tmp); break;
+ case ARGTYPE_FLOAT: GetStoredParameterForDebug(commandInfo); sprintf(tmp, " (%8.3f)", *(float*)&ScriptParams[i]); strcat(commandInfo, tmp); break;
+ default: script_assert(0 && "Script only returns INTs and FLOATs");
+ }
+ }
+ m_nIp = storedIp;
+ }
+ PrintToLog("%s\n", commandInfo);
+ if (m_bMissionFlag) {
+ for (int i = 0; commandInfo[i]; i++) {
+ if (commandInfo[i] == '_')
+ commandInfo[i] = ' ';
+ }
+ CDebug::DebugAddText(commandInfo);
+ }
+ }
+}
+
+#endif
+
+void FlushLog()
+{
+#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
+#if SCRIPT_LOG_FILE_LEVEL == 1 || SCRIPT_LOG_FILE_LEVEL == 2
+ if (dbg_log)
+ fflush(dbg_log);
+#endif
+#endif
+}
+
+
+#ifdef MISSION_SWITCHER
+void
+CTheScripts::SwitchToMission(int32 mission)
+{
+ for (CRunningScript* pScript = CTheScripts::pActiveScripts; pScript != nil; pScript = pScript->GetNext()) {
+ if (!pScript->m_bIsMissionScript || !pScript->m_bDeatharrestEnabled) {
+ continue;
+ }
+ while (pScript->m_nStackPointer > 0)
+ --pScript->m_nStackPointer;
+
+ pScript->m_nIp = pScript->m_anStack[pScript->m_nStackPointer];
+ *(int32*)&CTheScripts::ScriptSpace[CTheScripts::OnAMissionFlag] = 0;
+ pScript->m_nWakeTime = 0;
+ pScript->m_bDeatharrestExecuted = true;
+
+ while (!pScript->ProcessOneCommand());
+
+ CMessages::ClearMessages();
+ }
+
+#ifdef MISSION_REPLAY
+ missionRetryScriptIndex = mission;
+ if (missionRetryScriptIndex == 19)
+ CStats::LastMissionPassedName[0] = '\0';
+#endif
+ CTimer::Suspend();
+ int offset = CTheScripts::MultiScriptArray[mission];
+#ifdef USE_DEBUG_SCRIPT_LOADER
+ int handle = OpenScript();
+#else
+ CFileMgr::ChangeDir("\\");
+ int handle = CFileMgr::OpenFile("data\\main.scm", "rb");
+#endif
+ CFileMgr::Seek(handle, offset, 0);
+ CFileMgr::Read(handle, (const char*)&CTheScripts::ScriptSpace[SIZE_MAIN_SCRIPT], SIZE_MISSION_SCRIPT);
+ CFileMgr::CloseFile(handle);
+ CRunningScript* pMissionScript = CTheScripts::StartNewScript(SIZE_MAIN_SCRIPT);
+ CTimer::Resume();
+ pMissionScript->m_bIsMissionScript = true;
+ pMissionScript->m_bMissionFlag = true;
+ CTheScripts::bAlreadyRunningAMissionScript = true;
+}
+#endif
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp
index a888d528..946693a7 100644
--- a/src/core/AnimViewer.cpp
+++ b/src/core/AnimViewer.cpp
@@ -230,7 +230,7 @@ CAnimViewer::Update(void)
if (modelInfo->GetModelType() == MITYPE_PED) {
int animGroup = ((CPedModelInfo*)modelInfo)->m_animGroup;
- if (animId > ANIM_IDLE_STANCE)
+ if (animId > ANIM_STD_IDLE)
animGroup = ASSOCGRP_STD;
if (reloadIFP) {
@@ -318,14 +318,14 @@ CAnimViewer::Update(void)
CMessages::AddMessage(gUString, 1000, 0);
} else if (pad->GetCircleJustDown()) {
- PlayAnimation(pTarget->GetClump(), animGroup, ANIM_IDLE_STANCE);
+ PlayAnimation(pTarget->GetClump(), animGroup, ANIM_STD_IDLE);
AsciiToUnicode("Idle animation playing", gUString);
CMessages::AddMessage(gUString, 1000, 0);
} else if (pad->GetDPadUpJustDown()) {
animId--;
if (animId < 0) {
- animId = NUM_ANIMS - 1;
+ animId = ANIM_STD_NUM - 1;
}
PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId);
@@ -334,7 +334,7 @@ CAnimViewer::Update(void)
CMessages::AddMessage(gUString, 1000, 0);
} else if (pad->GetDPadDownJustDown()) {
- animId = (animId == (NUM_ANIMS - 1) ? 0 : animId + 1);
+ animId = (animId == (ANIM_STD_NUM - 1) ? 0 : animId + 1);
PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId);
sprintf(gString, "Current anim: %d", animId);
diff --git a/src/core/Cam.cpp b/src/core/Cam.cpp
index f43ff57a..ecfade74 100644
--- a/src/core/Cam.cpp
+++ b/src/core/Cam.cpp
@@ -1644,10 +1644,10 @@ CCam::Process_FollowPedWithMouse(const CVector &CameraTarget, float TargetOrient
if(CamTargetEntity->m_rwObject){
// what's going on here?
- if(RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_WEAPON_PUMP) ||
- RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_WEAPON_THROW) ||
- RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_WEAPON_THROWU) ||
- RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_WEAPON_START_THROW)){
+ if(RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_STD_WEAPON_PUMP) ||
+ RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_STD_WEAPON_THROW) ||
+ RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_STD_THROW_UNDER) ||
+ RpAnimBlendClumpGetAssociation(CamTargetEntity->GetClump(), ANIM_STD_START_THROW)){
CPed *player = FindPlayerPed();
float PlayerDist = (Source - player->GetPosition()).Magnitude();
if(PlayerDist < 2.75f)
@@ -3482,7 +3482,7 @@ FindSplinePathPositionFloat(float *out, float *spline, uint32 time, uint32 &mark
}
}
float a = ((float)time - (float)MS(spline[marker-4])) / (float)MS(spline[marker] - spline[marker-4]);
- a = clamp(a, 0.0f, 1.0f);
+ a = Clamp(a, 0.0f, 1.0f);
float b = 1.0f - a;
*out = b*b*b * spline[marker-3] +
3.0f*a*b*b * spline[marker-1] +
@@ -3520,7 +3520,7 @@ FindSplinePathPositionVector(CVector *out, float *spline, uint32 time, uint32 &m
}
float a = ((float)time - (float)MS(spline[marker-10])) / (float)MS(spline[marker] - spline[marker-10]);
- a = clamp(a, 0.0f, 1.0f);
+ a = Clamp(a, 0.0f, 1.0f);
float b = 1.0f - a;
out->x =
b*b*b * spline[marker-9] +
@@ -4631,7 +4631,7 @@ CCam::Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrient
*/
{
LookLeftRight = -CPad::GetPad(0)->LookAroundLeftRight();
- LookUpDown = -CPad::GetPad(0)->LookAroundUpDown();
+ LookUpDown = CPad::GetPad(0)->LookAroundUpDown();
}
float AlphaOffset, BetaOffset;
if(UseMouse){
@@ -4899,7 +4899,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
// 0.98f: CAR_FOV_FADE_MULT
FOV = Pow(0.98f, CTimer::GetTimeStep()) * (FOV - DefaultFOV) + DefaultFOV;
- FOV = clamp(FOV, DefaultFOV, DefaultFOV + 30.0f);
+ FOV = Clamp(FOV, DefaultFOV, DefaultFOV + 30.0f);
}
// WORKAROUND: I still don't know how looking behind works (m_bCamDirectlyInFront is unused in III, they seem to use m_bUseTransitionBeta)
@@ -4933,9 +4933,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
AlphaSpeed = 0.0;
Distance = 1000.0;
- Front.x = -(cos(Beta) * cos(Alpha));
- Front.y = -(sin(Beta) * cos(Alpha));
- Front.z = sin(Alpha);
+ Front.x = -(Cos(Beta) * Cos(Alpha));
+ Front.y = -(Sin(Beta) * Cos(Alpha));
+ Front.z = Sin(Alpha);
m_aTargetHistoryPosOne = TargetCoors - nextDistance * Front;
@@ -5021,7 +5021,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
}
}
- float targetAlpha = Asin(clamp(Front.z, -1.0f, 1.0f)) - zoomModeAlphaOffset;
+ float targetAlpha = Asin(Clamp(Front.z, -1.0f, 1.0f)) - zoomModeAlphaOffset;
if (targetAlpha <= maxAlphaAllowed) {
if (targetAlpha < -CARCAM_SET[camSetArrPos][14])
targetAlpha = -CARCAM_SET[camSetArrPos][14];
@@ -5210,9 +5210,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
lastBeta = Beta;
- Front.x = -(cos(Beta) * cos(Alpha));
- Front.y = -(sin(Beta) * cos(Alpha));
- Front.z = sin(Alpha);
+ Front.x = -(Cos(Beta) * Cos(Alpha));
+ Front.y = -(Sin(Beta) * Cos(Alpha));
+ Front.z = Sin(Alpha);
GetVectorsReadyForRW();
TheCamera.m_bCamDirectlyBehind = false;
TheCamera.m_bCamDirectlyInFront = false;
@@ -5222,9 +5222,9 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
m_cvecTargetCoorsForFudgeInter = TargetCoors;
m_aTargetHistoryPosThree = m_aTargetHistoryPosOne;
float nextAlpha = alphaWithSpeedAccounted + zoomModeAlphaOffset;
- float nextFrontX = -(cos(Beta) * cos(nextAlpha));
- float nextFrontY = -(sin(Beta) * cos(nextAlpha));
- float nextFrontZ = sin(nextAlpha);
+ float nextFrontX = -(Cos(Beta) * Cos(nextAlpha));
+ float nextFrontY = -(Sin(Beta) * Cos(nextAlpha));
+ float nextFrontZ = Sin(nextAlpha);
m_aTargetHistoryPosOne.x = TargetCoors.x - nextFrontX * nextDistance;
m_aTargetHistoryPosOne.y = TargetCoors.y - nextFrontY * nextDistance;
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 2ce4e754..f3b41655 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -213,7 +213,7 @@ CCamera::Init(void)
m_iModeToGoTo = CCam::MODE_FOLLOWPED;
m_bJust_Switched = false;
m_bUseTransitionBeta = false;
- m_matrix.SetScale(1.0f);
+ GetMatrix().SetScale(1.0f);
m_bTargetJustBeenOnTrain = false;
m_bInitialNoNodeStaticsSet = false;
m_uiLongestTimeInMill = 5000;
@@ -661,7 +661,7 @@ CCamera::Process(void)
// Process Shake
float shakeStrength = m_fCamShakeForce - 0.28f*(CTimer::GetTimeInMilliseconds()-m_uiCamShakeStart)/1000.0f;
- shakeStrength = clamp(shakeStrength, 0.0f, 2.0f);
+ shakeStrength = Clamp(shakeStrength, 0.0f, 2.0f);
int shakeRand = CGeneral::GetRandomNumber();
float shakeOffset = shakeStrength*0.1f;
GetMatrix().GetPosition().x += shakeOffset * ((shakeRand & 0xF) - 7);
@@ -1877,7 +1877,7 @@ CCamera::CamShake(float strength, float x, float y, float z)
float curForce = mult*(m_fCamShakeForce - (CTimer::GetTimeInMilliseconds() - m_uiCamShakeStart)/1000.0f);
strength = mult*strength;
- if(clamp(curForce, 0.0f, 2.0f) < strength){
+ if(Clamp(curForce, 0.0f, 2.0f) < strength){
m_fCamShakeForce = strength;
m_uiCamShakeStart = CTimer::GetTimeInMilliseconds();
}
@@ -1888,7 +1888,7 @@ void
CamShakeNoPos(CCamera *cam, float strength)
{
float curForce = cam->m_fCamShakeForce - (CTimer::GetTimeInMilliseconds() - cam->m_uiCamShakeStart)/1000.0f;
- if(clamp(curForce, 0.0f, 2.0f) < strength){
+ if(Clamp(curForce, 0.0f, 2.0f) < strength){
cam->m_fCamShakeForce = strength;
cam->m_uiCamShakeStart = CTimer::GetTimeInMilliseconds();
}
@@ -3572,7 +3572,7 @@ CCamera::Find3rdPersonCamTargetVector(float dist, CVector pos, CVector &source,
float
CCamera::Find3rdPersonQuickAimPitch(void)
{
- float clampedFrontZ = clamp(Cams[ActiveCam].Front.z, -1.0f, 1.0f);
+ float clampedFrontZ = Clamp(Cams[ActiveCam].Front.z, -1.0f, 1.0f);
float rot = Asin(clampedFrontZ);
@@ -3592,7 +3592,7 @@ CCamera::SetRwCamera(RwCamera *cam)
void
CCamera::CalculateDerivedValues(void)
{
- m_cameraMatrix = Invert(m_matrix);
+ m_cameraMatrix = Invert(GetMatrix());
float hfov = DEGTORAD(CDraw::GetScaledFOV()/2.0f);
float c = Cos(hfov);
@@ -3650,7 +3650,7 @@ CCamera::IsPointVisible(const CVector ¢er, const CMatrix *mat)
}
bool
-CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat)
+CCamera::IsSphereVisible(const CVector ¢er, float radius, Const CMatrix *mat)
{
#ifdef GTA_PS2
CVuVector c;
@@ -3675,16 +3675,18 @@ CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat
bool
CCamera::IsSphereVisible(const CVector ¢er, float radius)
{
- CMatrix mat = m_cameraMatrix;
+#if GTA_VERSION < GTA3_PC_10 // not sure this condition is the right one
+ // Maybe this was a copy of the other function with m_cameraMatrix
+ return IsSphereVisible(center, radius, &m_cameraMatrix);
+#else
+ // ...and on PC they decided to call the other one with a default matrix.
+ CMatrix mat(GetCameraMatrix()); // this matrix construction is stupid and gone in VC
return IsSphereVisible(center, radius, &mat);
+#endif
}
bool
-#ifdef GTA_PS2
-CCamera::IsBoxVisible(CVuVector *box, const CMatrix *mat)
-#else
-CCamera::IsBoxVisible(CVector *box, const CMatrix *mat)
-#endif
+CCamera::IsBoxVisible(CVUVECTOR *box, const CMatrix *mat)
{
int i;
int frustumTests[6] = { 0 };
diff --git a/src/core/Camera.h b/src/core/Camera.h
index d7293e20..07a05cb4 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -639,13 +639,9 @@ public:
CVector &GetGameCamPosition(void) { return m_vecGameCamPos; }
void CalculateDerivedValues(void);
bool IsPointVisible(const CVector ¢er, const CMatrix *mat);
- bool IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat);
+ bool IsSphereVisible(const CVector ¢er, float radius, Const CMatrix *mat);
bool IsSphereVisible(const CVector ¢er, float radius);
-#ifdef GTA_PS2
- bool IsBoxVisible(CVuVector *box, const CMatrix *mat);
-#else
- bool IsBoxVisible(CVector *box, const CMatrix *mat);
-#endif
+ bool IsBoxVisible(CVUVECTOR *box, const CMatrix *mat);
};
VALIDATE_SIZE(CCamera, 0xE9D8);
diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp
index da85a238..977f16c2 100644
--- a/src/core/CdStream.cpp
+++ b/src/core/CdStream.cpp
@@ -14,9 +14,9 @@ struct CdReadInfo
void *pBuffer;
char field_C;
bool bLocked;
- bool bInUse;
+ bool bReading;
int32 nStatus;
- HANDLE hSemaphore; // used for CdStreamSync
+ HANDLE pDoneSemaphore; // used for CdStreamSync
HANDLE hFile;
OVERLAPPED Overlapped;
};
@@ -53,9 +53,9 @@ CdStreamInitThread(void)
{
for ( int32 i = 0; i < gNumChannels; i++ )
{
- gpReadInfo[i].hSemaphore = CreateSemaphore(nil, 0, 2, nil);
+ gpReadInfo[i].pDoneSemaphore = CreateSemaphore(nil, 0, 2, nil);
- if ( gpReadInfo[i].hSemaphore == nil )
+ if ( gpReadInfo[i].pDoneSemaphore == nil )
{
printf("%s: failed to create sync semaphore\n", "cdvd_stream");
ASSERT(0);
@@ -183,7 +183,7 @@ CdStreamShutdown(void)
CloseHandle(_gCdStreamThread);
for ( int32 i = 0; i < gNumChannels; i++ )
- CloseHandle(gpReadInfo[i].hSemaphore);
+ CloseHandle(gpReadInfo[i].pDoneSemaphore);
}
LocalFree(gpReadInfo);
@@ -213,7 +213,7 @@ CdStreamRead(int32 channel, void *buffer, uint32 offset, uint32 size)
if ( _gbCdStreamAsync )
{
- if ( pChannel->nSectorsToRead != 0 || pChannel->bInUse )
+ if ( pChannel->nSectorsToRead != 0 || pChannel->bReading )
return STREAM_NONE;
pChannel->nStatus = STREAM_NONE;
@@ -271,7 +271,7 @@ CdStreamGetStatus(int32 channel)
if ( _gbCdStreamAsync )
{
- if ( pChannel->bInUse )
+ if ( pChannel->bReading )
return STREAM_READING;
if ( pChannel->nSectorsToRead != 0 )
@@ -321,12 +321,21 @@ CdStreamSync(int32 channel)
{
pChannel->bLocked = true;
- ASSERT( pChannel->hSemaphore != nil );
+ ASSERT( pChannel->pDoneSemaphore != nil );
- WaitForSingleObject(pChannel->hSemaphore, INFINITE);
+ // Deadlock fix 1
+#ifdef FIX_BUGS
+ // This is while loop on Posix streamer, for spurious wakeups
+ if (pChannel->bLocked && pChannel->nSectorsToRead != 0){
+ WaitForSingleObject(pChannel->pDoneSemaphore, INFINITE);
+ }
+ pChannel->bLocked = false;
+#else
+ WaitForSingleObject(pChannel->pDoneSemaphore, INFINITE);
+#endif
}
- pChannel->bInUse = false;
+ pChannel->bReading = false;
return pChannel->nStatus;
}
@@ -398,7 +407,7 @@ WINAPI CdStreamThread(LPVOID lpThreadParameter)
CdReadInfo *pChannel = &gpReadInfo[channel];
ASSERT( pChannel != nil );
- pChannel->bInUse = true;
+ pChannel->bReading = true;
if ( pChannel->nStatus == STREAM_NONE )
{
@@ -455,11 +464,15 @@ WINAPI CdStreamThread(LPVOID lpThreadParameter)
if ( pChannel->bLocked )
{
- ASSERT( pChannel->hSemaphore != nil );
- ReleaseSemaphore(pChannel->hSemaphore, 1, NULL);
+ ASSERT( pChannel->pDoneSemaphore != nil );
+ // Deadlock fix 2
+#ifdef FIX_BUGS
+ pChannel->bLocked = 0;
+#endif
+ ReleaseSemaphore(pChannel->pDoneSemaphore, 1, NULL);
}
- pChannel->bInUse = false;
+ pChannel->bReading = false;
}
}
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp
index 8222e3c5..8972cd33 100644
--- a/src/core/CdStreamPosix.cpp
+++ b/src/core/CdStreamPosix.cpp
@@ -19,6 +19,12 @@
#include
#include
#include
+#include
+#include
+
+#ifdef __linux__
+#include
+#endif
#include "CdStream.h"
#include "rwcore.h"
@@ -104,6 +110,58 @@ static int wiiu_thread_create(OSThread *thread, const void *attr, void *(*start_
bool flushStream[MAX_CDCHANNELS];
#endif
+#ifdef USE_UNNAMED_SEM
+
+#define RE3_SEM_OPEN(name, ...) re3_sem_open()
+sem_t*
+re3_sem_open(void)
+{
+ sem_t* sem = (sem_t*)malloc(sizeof(sem_t));
+ if (sem_init(sem, 0, 1) == -1) {
+ sem = SEM_FAILED;
+ }
+
+ return sem;
+}
+
+#define RE3_SEM_CLOSE(sem, format, ...) re3_sem_close(sem)
+void
+re3_sem_close(sem_t* sem)
+{
+ sem_destroy(sem);
+ free(sem);
+}
+
+#else
+
+#define RE3_SEM_OPEN re3_sem_open
+sem_t*
+re3_sem_open(const char* format, ...)
+{
+ char semName[21];
+ va_list va;
+ va_start(va, format);
+ vsprintf(semName, format, va);
+
+ return sem_open(semName, O_CREAT, 0644, 1);
+}
+
+#define RE3_SEM_CLOSE re3_sem_close
+void
+re3_sem_close(sem_t* sem, const char* format, ...)
+{
+ sem_close(sem);
+
+ char semName[21];
+ va_list va;
+ va_start(va, format);
+ vsprintf(semName, format, va);
+
+ sem_unlink(semName);
+}
+
+#endif
+
struct CdReadInfo
{
uint32 nSectorOffset;
@@ -155,14 +213,13 @@ void
CdStreamInitThread(void)
{
int status;
- char semName[20];
#ifndef ONE_THREAD_PER_CHANNEL
gChannelRequestQ.items = (int32 *)calloc(gNumChannels + 1, sizeof(int32));
gChannelRequestQ.head = 0;
gChannelRequestQ.tail = 0;
gChannelRequestQ.size = gNumChannels + 1;
ASSERT(gChannelRequestQ.items != nil );
- gCdStreamSema = sem_open("/semaphore_cd_stream", O_CREAT, 0644, 0);
+ gCdStreamSema = RE3_SEM_OPEN("/semaphore_cd_stream");
if (gCdStreamSema == SEM_FAILED) {
@@ -176,8 +233,7 @@ CdStreamInitThread(void)
{
for ( int32 i = 0; i < gNumChannels; i++ )
{
- sprintf(semName,"/semaphore_done%d",i);
- gpReadInfo[i].pDoneSemaphore = sem_open(semName, O_CREAT, 0644, 0);
+ gpReadInfo[i].pDoneSemaphore = RE3_SEM_OPEN("/semaphore_done%d", i);
if (gpReadInfo[i].pDoneSemaphore == SEM_FAILED)
{
@@ -187,8 +243,7 @@ CdStreamInitThread(void)
}
#ifdef ONE_THREAD_PER_CHANNEL
- sprintf(semName,"/semaphore_start%d",i);
- gpReadInfo[i].pStartSemaphore = sem_open(semName, O_CREAT, 0644, 0);
+ gpReadInfo[i].pStartSemaphore = RE3_SEM_OPEN("/semaphore_start%d", i);
if (gpReadInfo[i].pStartSemaphore == SEM_FAILED)
{
@@ -576,21 +631,14 @@ void *CdStreamThread(void *param)
#ifndef ONE_THREAD_PER_CHANNEL
for ( int32 i = 0; i < gNumChannels; i++ )
{
- sem_close(gpReadInfo[i].pDoneSemaphore);
- sprintf(semName,"/semaphore_done%d",i);
- sem_unlink(semName);
+ RE3_SEM_CLOSE(gpReadInfo[i].pDoneSemaphore, "/semaphore_done%d", i);
}
- sem_close(gCdStreamSema);
- sem_unlink("/semaphore_cd_stream");
+ RE3_SEM_CLOSE(gCdStreamSema, "/semaphore_cd_stream");
free(gChannelRequestQ.items);
#else
- sem_close(gpReadInfo[channel].pStartSemaphore);
- sprintf(semName,"/semaphore_start%d",channel);
- sem_unlink(semName);
+ RE3_SEM_CLOSE(gpReadInfo[channel].pStartSemaphore, "/semaphore_start%d", channel);
- sem_close(gpReadInfo[channel].pDoneSemaphore);
- sprintf(semName,"/semaphore_done%d",channel);
- sem_unlink(semName);
+ RE3_SEM_CLOSE(gpReadInfo[channel].pDoneSemaphore, "/semaphore_done%d", channel);
#endif
if (gpReadInfo)
free(gpReadInfo);
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index 97d11528..43b1bd68 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -389,6 +389,11 @@ uint32 CControllerConfigManager::ms_padButtonsInited = 0;
void CControllerConfigManager::InitDefaultControlConfigJoyPad(uint32 buttons)
{
+#ifdef XINPUT
+ // No manual bindings for you, honey.
+ return;
+#endif
+
m_bFirstCapture = true;
uint32 btn = buttons;
@@ -2654,11 +2659,6 @@ const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O
#define PS2_CIRCLE "|"
#define PS2_CROSS "/"
#define PS2_SQUARE "^"
-#elif defined(BUTTON_ICONS)
-#define PS2_TRIANGLE "~T~"
-#define PS2_CIRCLE "~O~"
-#define PS2_CROSS "~X~"
-#define PS2_SQUARE "~Q~"
#else
#define PS2_TRIANGLE "TRIANGLE"
#define PS2_CIRCLE "CIRCLE"
@@ -2671,7 +2671,7 @@ const char *PlayStationButtons_noIcons[][MAX_CONTROLLERACTIONS] =
#ifdef BUTTON_ICONS
const char *PlayStationButtons[][MAX_CONTROLLERACTIONS] =
- CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "SELECT");
+ CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "SELECT");
#endif
#undef PS2_TRIANGLE
@@ -2679,6 +2679,14 @@ const char *PlayStationButtons[][MAX_CONTROLLERACTIONS] =
#undef PS2_CROSS
#undef PS2_SQUARE
+const char *NintendoSwitchButtons_noIcons[][MAX_CONTROLLERACTIONS] =
+ CONTROLLER_BUTTONS("Y", "A", "B", "X", "L", "ZL", "LS", "R", "ZR", "RS", "BACK");
+
+#ifdef BUTTON_ICONS
+const char *NintendoSwitchButtons[][MAX_CONTROLLERACTIONS] =
+ CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK");
+#endif
+
#undef CONTROLLER_BUTTONS
#undef VFB
@@ -2688,11 +2696,42 @@ void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *
if (CPad::GetPad(0)->IsAffectedByController) {
wchar wstr[16];
- // TODO: INI and/or menu setting for Xbox/PS switch
+ const char* (*Buttons)[MAX_CONTROLLERACTIONS];
+
#ifdef BUTTON_ICONS
- const char *(*Buttons)[MAX_CONTROLLERACTIONS] = CFont::ButtonsSlot != -1 ? XboxButtons : XboxButtons_noIcons;
+ #ifdef GAMEPAD_MENU
+ switch (FrontEndMenuManager.m_PrefsControllerType)
+ {
+ case CMenuManager::CONTROLLER_DUALSHOCK2:
+ case CMenuManager::CONTROLLER_DUALSHOCK3:
+ case CMenuManager::CONTROLLER_DUALSHOCK4:
+ Buttons = CFont::ButtonsSlot != -1 ? PlayStationButtons : PlayStationButtons_noIcons;
+ break;
+ case CMenuManager::CONTROLLER_NINTENDO_SWITCH:
+ Buttons = CFont::ButtonsSlot != -1 ? NintendoSwitchButtons : NintendoSwitchButtons_noIcons;
+ break;
+ default:
+ #endif
+ Buttons = CFont::ButtonsSlot != -1 ? XboxButtons : XboxButtons_noIcons;
+ #ifdef GAMEPAD_MENU
+ break;
+ }
+ #endif
#else
- const char *(*Buttons)[MAX_CONTROLLERACTIONS] = XboxButtons_noIcons;
+ switch (FrontEndMenuManager.m_PrefsControllerType)
+ {
+ case CMenuManager::CONTROLLER_DUALSHOCK2:
+ case CMenuManager::CONTROLLER_DUALSHOCK3:
+ case CMenuManager::CONTROLLER_DUALSHOCK4:
+ Buttons = PlayStationButtons_noIcons;
+ break;
+ case CMenuManager::CONTROLLER_NINTENDO_SWITCH:
+ Buttons = NintendoSwitchButtons_noIcons;
+ break;
+ default:
+ Buttons = XboxButtons_noIcons;
+ break;
+ }
#endif
assert(Buttons[CPad::GetPad(0)->Mode][action] != nil); // we cannot use these
diff --git a/src/core/Crime.h b/src/core/Crime.h
index 8dfae5b8..05829040 100644
--- a/src/core/Crime.h
+++ b/src/core/Crime.h
@@ -25,7 +25,7 @@ class CCrimeBeingQd
{
public:
eCrimeType m_nType;
- uint32 m_nId;
+ int32 m_nId;
uint32 m_nTime;
CVector m_vecPosn;
bool m_bReported;
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index 48e4f9c8..55a59012 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -727,6 +727,7 @@ char *DoubleSidedNames[] = {
"sbwy_tunl_cstm3",
"sbwy_tunl_cstm2",
"sbwy_tunl_cstm1",
+ "tenmnt6ad",
""
};
@@ -1191,12 +1192,12 @@ CFileLoader::LoadMLO(const char *line)
char smth[8];
char name[24];
int modelIndex;
- float someFloat;
+ float drawDist;
- sscanf(line, "%s %s %d %f", smth, name, &modelIndex, &someFloat);
+ sscanf(line, "%s %s %d %f", smth, name, &modelIndex, &drawDist);
CMloModelInfo *minfo = CModelInfo::AddMloModel(modelIndex);
minfo->SetModelName(name);
- minfo->field_34 = someFloat;
+ minfo->drawDist = drawDist;
int instId = CModelInfo::GetMloInstanceStore().allocPtr;
minfo->firstInstance = instId;
minfo->lastInstance = instId;
@@ -1519,7 +1520,7 @@ CFileLoader::Load2dEffect(const char *line)
&probability);
effect->attractor.type = flags;
#ifdef FIX_BUGS
- effect->attractor.probability = clamp(probability, 0, 255);
+ effect->attractor.probability = Clamp(probability, 0, 255);
#else
effect->attractor.probability = probability;
#endif
diff --git a/src/core/Fire.cpp b/src/core/Fire.cpp
index 984b21bb..8b184622 100644
--- a/src/core/Fire.cpp
+++ b/src/core/Fire.cpp
@@ -396,7 +396,7 @@ CFireManager::StartScriptFire(const CVector &pos, CEntity *target, float strengt
if (target) {
if (target->IsPed()) {
ped->m_pFire = fire;
- if (target != (CVehicle *)FindPlayerPed()) {
+ if (target != FindPlayerPed()) {
CVector2D pos = target->GetPosition();
ped->SetFlee(pos, 10000);
ped->SetMoveAnim();
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index b2a8643f..32f9cc14 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -141,6 +141,14 @@ int8 CMenuManager::m_nDisplayMSAALevel = 0;
int8 CMenuManager::m_PrefsIslandLoading = ISLAND_LOADING_LOW;
#endif
+#ifdef GAMEPAD_MENU
+#ifdef __SWITCH__
+int8 CMenuManager::m_PrefsControllerType = CONTROLLER_NINTENDO_SWITCH;
+#else
+int8 CMenuManager::m_PrefsControllerType = CONTROLLER_XBOXONE;
+#endif
+#endif
+
int32 CMenuManager::OS_Language = LANG_ENGLISH;
int8 CMenuManager::m_PrefsUseVibration;
int8 CMenuManager::m_DisplayControllerOnFoot;
@@ -335,6 +343,7 @@ const char* MenuFilenames[][2] = {
CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE), MENU_Y(SMALLESTTEXT_Y_SCALE)); \
CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
+// value must be between 0.0-1.0
#define ProcessSlider(value, increaseAction, decreaseAction, hoverStartX, hoverEndX) \
do { \
lastActiveBarX = DisplaySlider(MENU_X_RIGHT_ALIGNED(MENUSLIDER_X + columnWidth), MENU_Y(bitAboveNextItemY), MENU_Y(smallestSliderBar), MENU_Y(usableLineHeight), MENU_X(MENUSLIDER_UNK), value); \
@@ -445,7 +454,7 @@ CMenuManager::ThingsToDoBeforeGoingBack()
if ((m_nCurrScreen == MENUPAGE_SKIN_SELECT) && strcmp(m_aSkinName, m_PrefsSkinFile) != 0) {
CWorld::Players[0].SetPlayerSkin(m_PrefsSkinFile);
#ifdef CUSTOM_FRONTEND_OPTIONS
- } else if (ScreenHasOption(m_nCurrScreen, "FEA_3DH")) {
+ } else if (ScreenHasOption(m_nCurrScreen, "FEA_RSS")) {
#else
} else if (m_nCurrScreen == MENUPAGE_SOUND_SETTINGS) {
#endif
@@ -488,7 +497,7 @@ CMenuManager::ThingsToDoBeforeGoingBack()
option.m_CFODynamic->buttonPressFunc(FEOPTION_ACTION_FOCUSLOSS);
if (option.m_Action == MENUACTION_CFO_SELECT && option.m_CFOSelect->onlyApplyOnEnter && option.m_CFOSelect->lastSavedValue != option.m_CFOSelect->displayedValue)
- option.m_CFOSelect->displayedValue = *option.m_CFO->value = option.m_CFOSelect->lastSavedValue;
+ option.m_CFOSelect->displayedValue = *(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue;
if (aScreens[m_nCurrScreen].returnPrevPageFunc) {
aScreens[m_nCurrScreen].returnPrevPageFunc();
@@ -897,36 +906,50 @@ 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 * (512/MENUSLIDER_LOGICAL_BARS);
+ m_PrefsBrightness = Clamp(m_PrefsBrightness, 0, 511);
break;
case MENUACTION_DRAWDIST:
if(value > 0)
- m_PrefsLOD += ((1.8f - 0.8f) / 16.0f);
+ m_PrefsLOD += ((1.8f - 0.8f) / MENUSLIDER_LOGICAL_BARS);
else
- m_PrefsLOD -= ((1.8f - 0.8f) / 16.0f);
- m_PrefsLOD = clamp(m_PrefsLOD, 0.8f, 1.8f);
+ m_PrefsLOD -= ((1.8f - 0.8f) / MENUSLIDER_LOGICAL_BARS);
+ m_PrefsLOD = Clamp(m_PrefsLOD, 0.8f, 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/MENUSLIDER_LOGICAL_BARS);
+ m_PrefsMusicVolume = Clamp(m_PrefsMusicVolume, 0, 127);
DMAudio.SetMusicMasterVolume(m_PrefsMusicVolume);
break;
case MENUACTION_SFXVOLUME:
- m_PrefsSfxVolume += value * (128/16);
- m_PrefsSfxVolume = clamp(m_PrefsSfxVolume, 0, 127);
+ m_PrefsSfxVolume += value * (128/MENUSLIDER_LOGICAL_BARS);
+ m_PrefsSfxVolume = Clamp(m_PrefsSfxVolume, 0, 127);
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_fMouseAccelHorzntl += value * 1.0f/200.0f/15.0f; // probably because diving it to 15 instead of 16(MENUSLIDER_LOGICAL_BARS) had more accurate steps
+ TheCamera.m_fMouseAccelHorzntl = Clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f/3200.0f, 1.0f/200.0f);
#ifdef FIX_BUGS
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
#else
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl;
#endif
break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case MENUACTION_CFO_SLIDER:
+ {
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption];
+ float oldValue = *(float*)option.m_CFOSlider->value;
+ *(float*)option.m_CFOSlider->value += value * ((option.m_CFOSlider->max - option.m_CFOSlider->min) / MENUSLIDER_LOGICAL_BARS);
+ *(float*)option.m_CFOSlider->value = Clamp(*(float*)option.m_CFOSlider->value, option.m_CFOSlider->min, option.m_CFOSlider->max);
+
+ if (*(float*)option.m_CFOSlider->value != oldValue && option.m_CFOSlider->changeFunc)
+ option.m_CFOSlider->changeFunc(oldValue, *(float*)option.m_CFOSlider->value);
+
+ break;
+ }
+#endif
default:
return;
}
@@ -949,12 +972,7 @@ CMenuManager::DisplayHelperText()
m_nHelperTextAlpha -= 2;
}
#else
- static float fadeAlpha = 0.0f; // To keep it precisely
- if (m_nHelperTextAlpha >= 255 && fadeAlpha < 250) fadeAlpha = m_nHelperTextAlpha;
-
- // -2 per every 33 ms (1000.f/30.f - original frame limiter fps)
- fadeAlpha -= (frameTime / 33.0f) * 2.0f;
- m_nHelperTextAlpha = fadeAlpha;
+ m_nHelperTextAlpha -= 2 * CTimer::GetLogicalFramesPassed();
#endif
if (m_nHelperTextAlpha < 1)
ResetHelperText();
@@ -1005,10 +1023,10 @@ CMenuManager::DisplaySlider(float x, float y, float mostLeftBarSize, float mostR
int lastActiveBarX = 0;
float curBarX = 0.0f;
float spacing = SCREEN_SCALE_X(10.0f);
- for (int i = 0; i < 16; i++) {
- curBarX = i * rectSize/16.0f + x;
+ for (int i = 0; i < MENUSLIDER_BARS; i++) {
+ curBarX = i * rectSize/MENUSLIDER_BARS + x;
- if (i / 16.0f + 1 / 32.0f < progress) {
+ if (i / (float)MENUSLIDER_BARS + 1 / (MENUSLIDER_BARS * 2.f) < progress) {
color = CRGBA(SLIDERON_COLOR.r, SLIDERON_COLOR.g, SLIDERON_COLOR.b, FadeIn(255));
lastActiveBarX = curBarX;
} else
@@ -1016,7 +1034,7 @@ CMenuManager::DisplaySlider(float x, float y, float mostLeftBarSize, float mostR
maxBarHeight = Max(mostLeftBarSize, mostRightBarSize);
- float curBarFreeSpace = ((16 - i) * mostLeftBarSize + i * mostRightBarSize) / 16.0f;
+ float curBarFreeSpace = ((MENUSLIDER_BARS - i) * mostLeftBarSize + i * mostRightBarSize) / (float)MENUSLIDER_BARS;
float left = curBarX;
float top = y + maxBarHeight - curBarFreeSpace;
float right = spacing + curBarX;
@@ -1164,6 +1182,16 @@ CMenuManager::Draw()
CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = BIGTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = BIGTEXT_Y_SCALE));
CFont::SetCentreOn();
break;
+#ifdef FIX_BUGS
+ case MENUPAGE_CONTROLLER_SETTINGS:
+ columnWidth = 50;
+ headerHeight = -50;
+ lineHeight = 20;
+ CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING));
+ CFont::SetScale(MENU_X(MENU_TEXT_SIZE_X = MEDIUMTEXT_X_SCALE), MENU_Y(MENU_TEXT_SIZE_Y = MEDIUMTEXT_Y_SCALE));
+ CFont::SetRightJustifyOff();
+ break;
+#endif
case MENUPAGE_SOUND_SETTINGS:
case MENUPAGE_DISPLAY_SETTINGS:
case MENUPAGE_MULTIPLAYER_CREATE:
@@ -1589,10 +1617,10 @@ CMenuManager::Draw()
// If that was previously selected option, restore it to default value.
// if (m_nCurrOption != lastSelectedOpt && lastSelectedOpt == i)
- option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *option.m_CFO->value;
+ option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *(int8*)option.m_CFO->value;
} else {
- if (option.m_CFOSelect->displayedValue != *option.m_CFO->value)
+ if (option.m_CFOSelect->displayedValue != *(int8*)option.m_CFO->value)
SetHelperText(1); // Enter to apply
else if (m_nHelperTextMsgId == 1)
ResetHelperText(); // Applied
@@ -1600,8 +1628,8 @@ CMenuManager::Draw()
}
// To whom manipulate option.m_CFO->value of select options externally (like RestoreDef functions)
- if (*option.m_CFO->value != option.m_CFOSelect->lastSavedValue)
- option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *option.m_CFO->value;
+ if (*(int8*)option.m_CFO->value != option.m_CFOSelect->lastSavedValue)
+ option.m_CFOSelect->displayedValue = option.m_CFOSelect->lastSavedValue = *(int8*)option.m_CFO->value;
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
option.m_CFOSelect->displayedValue = 0;
@@ -1793,6 +1821,12 @@ CMenuManager::Draw()
case MENUACTION_MOUSESENS:
ProcessSlider(TheCamera.m_fMouseAccelHorzntl * 200.0f, HOVEROPTION_INCREASE_MOUSESENS, HOVEROPTION_DECREASE_MOUSESENS, MENU_X_LEFT_ALIGNED(200.0f), SCREEN_WIDTH);
break;
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case MENUACTION_CFO_SLIDER:
+ CMenuScreenCustom::CMenuEntry &option = aScreens[m_nCurrScreen].m_aEntries[i];
+ ProcessSlider((*(float*)option.m_CFOSlider->value - option.m_CFOSlider->min) / (option.m_CFOSlider->max - option.m_CFOSlider->min), HOVEROPTION_INCREASE_CFO_SLIDER, HOVEROPTION_DECREASE_CFO_SLIDER, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
+ break;
+#endif
}
// Needed after the bug fix in Font.cpp
@@ -2155,7 +2189,11 @@ CMenuManager::DrawControllerBound(int32 yStart, int32 xStart, int32 unused, int8
// Print bindings, including seperator (-) between them
CFont::SetScale(MENU_X(0.25f), MENU_Y(SMALLESTTEXT_Y_SCALE));
+#ifdef FIX_BUGS
+ for (; contSetOrder < MAX_SETORDERS && controllerAction >= 0; contSetOrder++) {
+#else
for (; contSetOrder < MAX_SETORDERS && controllerAction != -1; contSetOrder++) {
+#endif
wchar *settingText = ControlsManager.GetControllerSettingTextWithOrderNumber((e_ControllerAction)controllerAction, (eContSetOrder)contSetOrder);
if (settingText) {
++bindingsForThisOpt;
@@ -2671,11 +2709,7 @@ CMenuManager::DrawFrontEndNormal()
static float fadeAlpha = 0.0f;
if (m_nMenuFadeAlpha < 255) {
- if (m_nMenuFadeAlpha == 0 && fadeAlpha > 1.0f) fadeAlpha = 0.0f;
-
- // +20 per every 33 ms (1000.f/30.f - original frame limiter fps)
- fadeAlpha += (frameTime) * 20.f / 33.f;
- m_nMenuFadeAlpha = fadeAlpha;
+ m_nMenuFadeAlpha += 20 * CTimer::GetLogicalFramesPassed();
} else {
// TODO: what is this? waiting mouse?
if(field_518 == 4){
@@ -2935,12 +2969,7 @@ CMenuManager::DrawFrontEndNormal()
// Famous transparent menu bug
#ifdef FIX_BUGS
- static float fadeAlpha = 0.0f;
- if (m_nMenuFadeAlpha == 0 && fadeAlpha > 1.0f) fadeAlpha = 0.0f;
-
- // +20 per every 33 ms (1000.f/30.f - original frame limiter fps)
- fadeAlpha += (frameTime) * 20.f / 33.f;
- m_nMenuFadeAlpha = fadeAlpha;
+ m_nMenuFadeAlpha += 20 * CTimer::GetLogicalFramesPassed();
#else
static uint32 LastFade = 0;
@@ -2971,40 +3000,11 @@ CMenuManager::DrawFrontEndNormal()
#ifdef RED_DELETE_BACKGROUND
if (m_nCurrScreen == MENUPAGE_CHOOSE_DELETE_SLOT || m_nCurrScreen == MENUPAGE_DELETE_SLOT_CONFIRM) {
- CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(18.0f), MENU_Y(8.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(20.0f), MENU_Y(8.0f),
- SCREEN_STRETCH_X(12.0f), MENU_Y(11.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(14.0f), MENU_Y(11.0f),
- CRGBA(150, 0, 0, 140));
-
- CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(12.0f), MENU_Y(11.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(14.0f), MENU_Y(11.0f),
- SCREEN_STRETCH_X(10.0f), MENU_Y(16.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(12.0f), MENU_Y(16.0f),
- CRGBA(150, 0, 0, 140));
-
- CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(10.0f), MENU_Y(16.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(12.0f), MENU_Y(16.0f),
- SCREEN_STRETCH_X(10.0f), SCREEN_SCALE_Y(431.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(12.0f), SCREEN_SCALE_Y(431.0f),
- CRGBA(150, 0, 0, 140));
-
- CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(10.0f), SCREEN_SCALE_Y(431.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(12.0f), SCREEN_SCALE_Y(431.0f),
- SCREEN_STRETCH_X(12.0f), SCREEN_SCALE_Y(435.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(14.0f), SCREEN_SCALE_Y(435.0f),
- CRGBA(150, 0, 0, 140));
-
- CSprite2d::Draw2DPolygon(SCREEN_STRETCH_X(12.0f), SCREEN_SCALE_Y(435.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(14.0f), SCREEN_SCALE_Y(435.0f),
- SCREEN_STRETCH_X(18.0f), SCREEN_SCALE_Y(438.0f),
- SCREEN_WIDTH - SCREEN_STRETCH_X(20.0f), SCREEN_SCALE_Y(438.0f),
- CRGBA(150, 0, 0, 140));
-
- // yellow bar
- CSprite2d::DrawRect(CRect(MENU_X(13.0f), SCREEN_STRETCH_FROM_BOTTOM(96.0f),
- SCREEN_STRETCH_FROM_RIGHT(11.0f), SCREEN_STRETCH_FROM_BOTTOM(59.0f)),
- CRGBA(235, 170, 50, 255));
+ CSprite2d::Draw2DPolygon(0.0f, 0.0f,
+ SCREEN_WIDTH, 0.0f,
+ 0.0f, SCREEN_HEIGHT,
+ SCREEN_WIDTH, SCREEN_HEIGHT,
+ CRGBA(150, 0, 0, 80));
}
#endif
@@ -3527,9 +3527,15 @@ CMenuManager::InitialiseChangedLanguageSettings()
{
if (m_bFrontEnd_ReloadObrTxtGxt) {
m_bFrontEnd_ReloadObrTxtGxt = false;
+#ifdef FIX_BUGS
+ if (gGameState > GS_INIT_ONCE)
+#endif
CTimer::Stop();
TheText.Unload();
TheText.Load();
+#ifdef FIX_BUGS
+ if (gGameState > GS_INIT_ONCE)
+#endif
CTimer::Update();
CGame::frenchGame = false;
CGame::germanGame = false;
@@ -3636,6 +3642,10 @@ CMenuManager::LoadAllTextures()
m_aFrontEndSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
}
+#ifdef GAMEPAD_MENU
+ LoadController(m_PrefsControllerType);
+#endif
+
int menuTxdSlot = CTxdStore::FindTxdSlot("menu");
if (menuTxdSlot == -1)
@@ -3651,7 +3661,15 @@ CMenuManager::LoadAllTextures()
m_aMenuSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
}
#ifdef MENU_MAP
+ static bool menuOptionAdded = false;
for (int i = 0; i < ARRAY_SIZE(MapFilenames); i++) {
+ RwTexture *firstTile;
+ if (!menuOptionAdded && (firstTile = RwTextureRead(MapFilenames[i][0], MapFilenames[i][1]))) {
+ RwTextureDestroy(firstTile);
+ FrontendOptionSetCursor(MENUPAGE_PAUSE_MENU, 2, false);
+ FrontendOptionAddBuiltinAction("FEG_MAP", MENUACTION_CHANGEMENU, MENUPAGE_MAP, SAVESLOT_NONE);
+ menuOptionAdded = true;
+ }
m_aMapSprites[i].SetTexture(MapFilenames[i][0], MapFilenames[i][1]);
m_aMapSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
}
@@ -3667,6 +3685,75 @@ CMenuManager::LoadAllTextures()
CTxdStore::PopCurrentTxd();
}
+#ifdef GAMEPAD_MENU
+const char* controllerTypesPaths[] = {
+ nil,
+ "MODELS/FRONTEND_DS3.TXD",
+ "MODELS/FRONTEND_DS4.TXD",
+ "MODELS/FRONTEND_X360.TXD",
+ "MODELS/FRONTEND_XONE.TXD",
+ "MODELS/FRONTEND_NSW.TXD",
+};
+
+void
+CMenuManager::LoadController(int8 type)
+{
+ switch (type)
+ {
+ case CONTROLLER_DUALSHOCK2:
+ case CONTROLLER_DUALSHOCK3:
+ case CONTROLLER_DUALSHOCK4:
+ CFont::LoadButtons("MODELS/PS3BTNS.TXD");
+ break;
+ case CONTROLLER_NINTENDO_SWITCH:
+ CFont::LoadButtons("MODELS/NSWBTNS.TXD");
+ break;
+ default:
+ CFont::LoadButtons("MODELS/X360BTNS.TXD");
+ break;
+ }
+
+ // Unload current textures
+ for (int i = FE_CONTROLLER; i <= FE_ARROWS4; i++)
+ m_aFrontEndSprites[i].Delete();
+
+ // Unload txd
+ int frontend_controller = CTxdStore::FindTxdSlot("frontend_controller");
+ if (frontend_controller != -1)
+ CTxdStore::RemoveTxd(frontend_controller);
+
+ // Find the new txd to load
+ bool bTxdMissing = true;
+ if (controllerTypesPaths[type])
+ if (int file = CFileMgr::OpenFile(controllerTypesPaths[type])) {
+ CFileMgr::CloseFile(file);
+ bTxdMissing = false;
+ }
+
+ int txdSlot = -1;
+
+ if (bTxdMissing)
+ // Not found, fall back to original textures
+ txdSlot = CTxdStore::FindTxdSlot("frontend");
+ else {
+ // Found, load txd
+ txdSlot = frontend_controller;
+ if (txdSlot == -1)
+ txdSlot = CTxdStore::AddTxdSlot("frontend_controller");
+ CTxdStore::LoadTxd(txdSlot, controllerTypesPaths[type]);
+ CTxdStore::AddRef(txdSlot);
+ }
+
+ assert(txdSlot != -1);
+ // Load new textures
+ CTxdStore::SetCurrentTxd(txdSlot);
+ for (int i = FE_CONTROLLER; i <= FE_ARROWS4; i++) {
+ m_aFrontEndSprites[i].SetTexture(FrontendFilenames[i][0], FrontendFilenames[i][1]);
+ m_aFrontEndSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
+ }
+}
+#endif // GAMEPAD_MENU
+
void
CMenuManager::LoadSettings()
{
@@ -3748,10 +3835,6 @@ CMenuManager::LoadSettings()
#ifdef LOAD_INI_SETTINGS
if (LoadINISettings()) {
LoadINIControllerSettings();
- } else {
- // no re3.ini, create it
- SaveINISettings();
- SaveINIControllerSettings();
}
#endif
@@ -4113,14 +4196,14 @@ CMenuManager::Process(void)
if (m_nCurrScreen == MENUPAGE_LOADING_IN_PROGRESS) {
#ifdef MISSION_REPLAY
if (doingMissionRetry) {
- RetryMission(2, 0);
+ RetryMission(MISSION_RETRY_TYPE_BEGIN_RESTARTING);
m_nCurrSaveSlot = SLOT_COUNT;
doingMissionRetry = false;
}
#endif
if (CheckSlotDataValid(m_nCurrSaveSlot)) {
#ifdef USE_DEBUG_SCRIPT_LOADER
- scriptToLoad = 0;
+ CTheScripts::ScriptToLoad = 0;
#endif
#ifdef PC_PLAYER_CONTROLS
TheCamera.m_bUseMouse3rdPerson = m_ControlMethod == CONTROL_STANDARD;
@@ -4249,29 +4332,16 @@ CMenuManager::ProcessButtonPresses(void)
#ifdef USE_DEBUG_SCRIPT_LOADER
if (m_nCurrScreen == MENUPAGE_START_MENU || m_nCurrScreen == MENUPAGE_NEW_GAME || m_nCurrScreen == MENUPAGE_NEW_GAME_RELOAD) {
-#ifdef RW_GL3
- if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_R) == GLFW_PRESS) {
- scriptToLoad = 1;
+ if (CPad::GetPad(0)->GetChar('R')) {
+ CTheScripts::ScriptToLoad = 1;
DoSettingsBeforeStartingAGame();
return;
}
- if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_D) == GLFW_PRESS) {
- scriptToLoad = 2;
+ if (CPad::GetPad(0)->GetChar('D')) {
+ CTheScripts::ScriptToLoad = 2;
DoSettingsBeforeStartingAGame();
return;
}
-#elif defined _WIN32
- if (GetAsyncKeyState('R') & 0x8000) {
- scriptToLoad = 1;
- DoSettingsBeforeStartingAGame();
- return;
- }
- if (GetAsyncKeyState('D') & 0x8000) {
- scriptToLoad = 2;
- DoSettingsBeforeStartingAGame();
- return;
- }
-#endif
}
#endif
@@ -4346,7 +4416,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = m_nHoverOption - HOVEROPTION_RADIO_0;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
} else if (m_nHoverOption == HOVEROPTION_RANDOM_ITEM
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action != MENUACTION_RESUME) {
@@ -4360,7 +4430,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = HEAD_RADIO;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_1:
@@ -4368,7 +4438,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = DOUBLE_CLEF;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_2:
@@ -4376,7 +4446,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = JAH_RADIO;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_3:
@@ -4384,7 +4454,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = RISE_FM;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_4:
@@ -4392,7 +4462,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = LIPS_106;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_5:
@@ -4400,7 +4470,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = GAME_FM;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_6:
@@ -4408,7 +4478,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = MSX_FM;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_7:
@@ -4416,7 +4486,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = FLASHBACK;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_8:
@@ -4424,7 +4494,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = CHATTERBOX;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RADIO_9:
@@ -4432,7 +4502,7 @@ CMenuManager::ProcessButtonPresses(void)
m_PrefsRadioStation = USERTRACK;
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
case HOVEROPTION_RANDOM_ITEM:
@@ -4449,7 +4519,7 @@ CMenuManager::ProcessButtonPresses(void)
#ifndef TIDY_UP_PBP
switch (m_nHoverOption) {
case HOVEROPTION_INCREASE_BRIGHTNESS:
- m_PrefsBrightness = m_PrefsBrightness + 32;
+ m_PrefsBrightness = m_PrefsBrightness + (512 / MENUSLIDER_LOGICAL_BARS);
if (m_PrefsBrightness < 0) {
m_PrefsBrightness = 0;
}
@@ -4459,7 +4529,7 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
break;
case HOVEROPTION_DECREASE_BRIGHTNESS:
- m_PrefsBrightness = m_PrefsBrightness - 32;
+ m_PrefsBrightness = m_PrefsBrightness - (512 / MENUSLIDER_LOGICAL_BARS);
if (m_PrefsBrightness < 0) {
m_PrefsBrightness = 0;
}
@@ -4469,25 +4539,25 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
break;
case HOVEROPTION_INCREASE_DRAWDIST:
- m_PrefsLOD = m_PrefsLOD + (1.0f / 16);
+ m_PrefsLOD = m_PrefsLOD + (1.0f / MENUSLIDER_LOGICAL_BARS);
m_PrefsLOD = min(1.8f, m_PrefsLOD);
CRenderer::ms_lodDistScale = m_PrefsLOD;
SaveSettings();
break;
case HOVEROPTION_DECREASE_DRAWDIST:
- m_PrefsLOD = m_PrefsLOD - (1.0f / 16);
+ m_PrefsLOD = m_PrefsLOD - (1.0f / MENUSLIDER_LOGICAL_BARS);
m_PrefsLOD = max(0.8f, m_PrefsLOD);
CRenderer::ms_lodDistScale = m_PrefsLOD;
SaveSettings();
break;
case HOVEROPTION_INCREASE_MUSICVOLUME:
- m_PrefsMusicVolume = m_PrefsMusicVolume + 8;
- m_PrefsMusicVolume = clamp(m_PrefsMusicVolume, 0, 127);
+ m_PrefsMusicVolume = m_PrefsMusicVolume + (128 / MENUSLIDER_LOGICAL_BARS);
+ m_PrefsMusicVolume = Clamp(m_PrefsMusicVolume, 0, 127);
DMAudio.SetMusicMasterVolume(uchar)(m_PrefsMusicVolume);
SaveSettings();
break;
case HOVEROPTION_DECREASE_MUSICVOLUME:
- m_PrefsMusicVolume = m_PrefsMusicVolume - 8;
+ m_PrefsMusicVolume = m_PrefsMusicVolume - (128 / MENUSLIDER_LOGICAL_BARS);
if (m_PrefsMusicVolume < 0) {
m_PrefsMusicVolume = 0;
}
@@ -4498,7 +4568,7 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
break;
case HOVEROPTION_INCREASE_SFXVOLUME:
- m_PrefsSFXVolume = m_PrefsSFXVolume + 8;
+ m_PrefsSFXVolume = m_PrefsSFXVolume + (128 / MENUSLIDER_LOGICAL_BARS);
if (m_PrefsSFXVolume < 0) {
m_PrefsSFXVolume = 0;
}
@@ -4509,7 +4579,7 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
break;
case HOVEROPTION_DECREASE_SFXVOLUME:
- m_PrefsSFXVolume = m_PrefsSFXVolume - 8;
+ m_PrefsSFXVolume = m_PrefsSFXVolume - (128 / MENUSLIDER_LOGICAL_BARS);
if (m_PrefsSFXVolume < 0) {
m_PrefsSFXVolume = 0;
}
@@ -4520,8 +4590,8 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
break;
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_fMouseAccelHorzntl += 1.0f/200.0f/15.0f; // probably because diving it to 15 instead of 16(MENUSLIDER_LOGICAL_BARS) had more accurate steps
+ TheCamera.m_fMouseAccelHorzntl = Clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200);
#ifdef FIX_BUGS
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
#else
@@ -4530,8 +4600,8 @@ CMenuManager::ProcessButtonPresses(void)
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_fMouseAccelHorzntl -= 1.0f/200.0f/15.0f; // probably because diving it to 15 instead of 16(MENUSLIDER_LOGICAL_BARS) had more accurate steps
+ TheCamera.m_fMouseAccelHorzntl = Clamp(TheCamera.m_fMouseAccelHorzntl, 1.0f / 3200, 1.0f / 200);
#ifdef FIX_BUGS
TheCamera.m_fMouseAccelVertical = TheCamera.m_fMouseAccelHorzntl + 0.0005f;
#else
@@ -4547,6 +4617,9 @@ CMenuManager::ProcessButtonPresses(void)
case HOVEROPTION_INCREASE_MUSICVOLUME:
case HOVEROPTION_INCREASE_SFXVOLUME:
case HOVEROPTION_INCREASE_MOUSESENS:
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case HOVEROPTION_INCREASE_CFO_SLIDER:
+#endif
CheckSliderMovement(1);
break;
case HOVEROPTION_DECREASE_BRIGHTNESS:
@@ -4554,6 +4627,9 @@ CMenuManager::ProcessButtonPresses(void)
case HOVEROPTION_DECREASE_MUSICVOLUME:
case HOVEROPTION_DECREASE_SFXVOLUME:
case HOVEROPTION_DECREASE_MOUSESENS:
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ case HOVEROPTION_DECREASE_CFO_SLIDER:
+#endif
CheckSliderMovement(-1);
break;
}
@@ -4584,7 +4660,11 @@ CMenuManager::ProcessButtonPresses(void)
|| CPad::GetPad(0)->GetAnaloguePadLeftJustUp() || CPad::GetPad(0)->GetAnaloguePadRightJustUp()
|| CPad::GetPad(0)->GetMouseWheelUpJustDown() || CPad::GetPad(0)->GetMouseWheelDownJustDown()) {
int option = aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action;
- if (option == MENUACTION_BRIGHTNESS || option == MENUACTION_DRAWDIST)
+ if (option == MENUACTION_BRIGHTNESS || option == MENUACTION_DRAWDIST
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ || option == MENUACTION_CFO_SLIDER
+#endif
+ )
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
else if (option == MENUACTION_SFXVOLUME)
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_AUDIO_TEST, 0);
@@ -4655,7 +4735,7 @@ CMenuManager::ProcessButtonPresses(void)
curBottomBarOption = hoveredBottomBarOption;
ChangeScreen(bbNames[curBottomBarOption].screenId, 0, true, false);
if (bbNames[curBottomBarOption].screenId == MENUPAGE_SOUND_SETTINGS)
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
return;
} else if (bottomBarActive) {
if (CPad::GetPad(0)->GetEnterJustDown() || CPad::GetPad(0)->GetCrossJustDown()) {
@@ -4663,7 +4743,7 @@ CMenuManager::ProcessButtonPresses(void)
bottomBarActive = false;
if (bbNames[curBottomBarOption].screenId == MENUPAGE_SOUND_SETTINGS)
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
return;
} else if (CPad::GetPad(0)->GetLeftJustDown() || CPad::GetPad(0)->GetAnaloguePadLeft() || CPad::GetPad(0)->GetDPadLeftJustDown()
@@ -4747,7 +4827,12 @@ CMenuManager::ProcessButtonPresses(void)
} else if (option != MENUACTION_CHANGEMENU && option != MENUACTION_BRIGHTNESS && option != MENUACTION_DRAWDIST
&& option != MENUACTION_MUSICVOLUME && option != MENUACTION_SFXVOLUME
&& option != MENUACTION_CHECKSAVE && option != MENUACTION_UNK24
- && option != MENUACTION_MOUSESENS && option != MENUACTION_SCREENRES) {
+ && option != MENUACTION_MOUSESENS && option != MENUACTION_SCREENRES
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ && option != MENUACTION_CFO_SLIDER
+#endif
+ )
+ {
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
}
@@ -4814,7 +4899,7 @@ CMenuManager::ProcessButtonPresses(void)
}
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
#endif
break;
@@ -5024,7 +5109,7 @@ CMenuManager::ProcessButtonPresses(void)
DMAudio.SetMusicMasterVolume(102);
DMAudio.SetEffectsMasterVolume(m_PrefsSfxVolume);
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
SaveSettings();
} else if (m_nCurrScreen == MENUPAGE_DISPLAY_SETTINGS) {
m_PrefsFrameLimiter = true;
@@ -5121,7 +5206,7 @@ CMenuManager::ProcessButtonPresses(void)
break;
case MENUACTION_LOADRADIO:
ChangeScreen(MENUPAGE_SOUND_SETTINGS, 0, true, true);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("STARTED PLAYING FRONTEND AUDIO TRACK");
break;
#ifdef MISSION_REPLAY
@@ -5133,7 +5218,7 @@ CMenuManager::ProcessButtonPresses(void)
case MENUACTION_UNK114:
doingMissionRetry = false;
RequestFrontEndShutDown();
- RetryMission(2, 0);
+ RetryMission(MISSION_RETRY_TYPE_BEGIN_RESTARTING);
return;
#endif
#ifdef CUSTOM_FRONTEND_OPTIONS
@@ -5149,9 +5234,9 @@ CMenuManager::ProcessButtonPresses(void)
if (option.m_CFOSelect->displayedValue >= option.m_CFOSelect->numRightTexts || option.m_CFOSelect->displayedValue < 0)
option.m_CFOSelect->displayedValue = 0;
}
- int8 oldValue = *option.m_CFO->value;
+ int8 oldValue = *(int8*)option.m_CFO->value;
- *option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
+ *(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
// if (option.m_CFOSelect->save)
@@ -5289,6 +5374,17 @@ CMenuManager::ProcessButtonPresses(void)
if (changeValueBy != 0) {
switch (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action) {
+#ifdef FIX_BUGS
+ case MENUACTION_CTRLCONFIG:
+ CPad::GetPad(0)->Mode += changeValueBy;
+ if (CPad::GetPad(0)->Mode > 3)
+ CPad::GetPad(0)->Mode = 0;
+ else if (CPad::GetPad(0)->Mode < 0)
+ CPad::GetPad(0)->Mode = 3;
+ SaveSettings();
+ DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
+ break;
+#endif
case MENUACTION_RADIO:
m_PrefsRadioStation += changeValueBy;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
@@ -5305,7 +5401,7 @@ CMenuManager::ProcessButtonPresses(void)
}
SaveSettings();
DMAudio.SetRadioInCar(m_PrefsRadioStation);
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
OutputDebugString("FRONTEND RADIO STATION CHANGED");
break;
#ifdef ASPECT_RATIO_SCALE
@@ -5347,14 +5443,14 @@ CMenuManager::ProcessButtonPresses(void)
case MENUACTION_AUDIOHW:
if (m_nPrefsAudio3DProviderIndex != -1) {
m_nPrefsAudio3DProviderIndex += changeValueBy;
- m_nPrefsAudio3DProviderIndex = clamp(m_nPrefsAudio3DProviderIndex, 0, DMAudio.GetNum3DProvidersAvailable() - 1);
+ m_nPrefsAudio3DProviderIndex = Clamp(m_nPrefsAudio3DProviderIndex, 0, DMAudio.GetNum3DProvidersAvailable() - 1);
}
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NAVIGATION, 0);
break;
case MENUACTION_SPEAKERCONF:
if (m_nPrefsAudio3DProviderIndex != -1) {
m_PrefsSpeakers -= changeValueBy;
- m_PrefsSpeakers = clamp(m_PrefsSpeakers, 0, 2);
+ m_PrefsSpeakers = Clamp(m_PrefsSpeakers, 0, 2);
DMAudio.SetSpeakerConfig(m_PrefsSpeakers);
SaveSettings();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
@@ -5384,9 +5480,9 @@ CMenuManager::ProcessButtonPresses(void)
option.m_CFOSelect->displayedValue = option.m_CFOSelect->numRightTexts - 1;
}
if (!option.m_CFOSelect->onlyApplyOnEnter) {
- int8 oldValue = *option.m_CFO->value;
+ int8 oldValue = *(int8*)option.m_CFO->value;
- *option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
+ *(int8*)option.m_CFO->value = option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue;
// Now everything is saved in .ini, and LOAD_INI_SETTINGS is fundamental for CFO
// if (option.m_CFOSelect->save)
@@ -5427,13 +5523,18 @@ CMenuManager::ProcessOnOffMenuOptions()
TimeToStopPadShaking = CTimer::GetTimeInMillisecondsPauseMode() + 500;
}
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
+#ifdef FIX_BUGS
+ SaveSettings();
+#endif // !FIX_BUGS
break;
+#ifndef FIX_BUGS
case MENUACTION_CTRLCONFIG:
CPad::GetPad(0)->Mode++;
if (CPad::GetPad(0)->Mode > 3)
CPad::GetPad(0)->Mode = 0;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
break;
+#endif // !FIX_BUGS
case MENUACTION_CTRLDISPLAY:
m_DisplayControllerOnFoot = !m_DisplayControllerOnFoot;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_SETTING_CHANGE, 0);
@@ -5614,6 +5715,9 @@ CMenuManager::SwitchMenuOnAndOff()
|| m_bShutDownFrontEndRequested || m_bStartUpFrontEndRequested) {
m_bMenuActive = !m_bMenuActive;
+#ifdef FIX_BUGS
+ CPad::StopPadsShaking();
+#endif
if (m_bShutDownFrontEndRequested)
m_bMenuActive = false;
@@ -5711,9 +5815,15 @@ CMenuManager::UnloadTextures()
int frontend = CTxdStore::FindTxdSlot("frontend");
CTxdStore::RemoveTxd(frontend);
- printf("REMOVE menu textures\n");
- for (int i = 0; i < ARRAY_SIZE(MenuFilenames); ++i)
- m_aMenuSprites[i].Delete();
+#ifdef GAMEPAD_MENU
+ int frontend_controllerTxdSlot = CTxdStore::FindTxdSlot("frontend_controller");
+ if (frontend_controllerTxdSlot != -1)
+ CTxdStore::RemoveTxd(frontend_controllerTxdSlot);
+#endif
+
+ printf("REMOVE menu textures\n");
+ for (int i = 0; i < ARRAY_SIZE(MenuFilenames); ++i)
+ m_aMenuSprites[i].Delete();
#ifdef MENU_MAP
for (int i = 0; i < ARRAY_SIZE(MapFilenames); ++i)
m_aMapSprites[i].Delete();
@@ -5756,6 +5866,313 @@ CMenuManager::WaitForUserCD()
}
}
+#ifdef GAMEPAD_MENU
+void
+CMenuManager::PrintController(void)
+{
+ const float scale = 0.9f;
+ const float CONTROLLER_SIZE_X = 235.2f;
+ const float CONTROLLER_SIZE_Y = 175.2f;
+ const float CONTROLLER_POS_X = (DEFAULT_SCREEN_WIDTH - CONTROLLER_SIZE_X) / 2.0f;
+ const float CONTROLLER_POS_Y = 160.0f;
+
+ float centerX = CONTROLLER_POS_X + CONTROLLER_SIZE_X / 2;
+ float centerY = CONTROLLER_POS_Y + CONTROLLER_SIZE_Y / 2;
+
+#define X(f) ((f)*scale + centerX)
+#define Y(f) ((f)*scale + centerY)
+
+ m_aFrontEndSprites[FE_CONTROLLERSH].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X((CONTROLLER_SIZE_X + 4.8f) * scale), MENU_Y((CONTROLLER_SIZE_Y + 4.8f) * scale), CRGBA(0, 0, 0, 255));
+ m_aFrontEndSprites[FE_CONTROLLER].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X(CONTROLLER_SIZE_X * scale), MENU_Y(CONTROLLER_SIZE_Y * scale), CRGBA(255, 255, 255, 255));
+ if (m_DisplayControllerOnFoot) {
+ if (CTimer::GetTimeInMillisecondsPauseMode() & 0x400)
+ m_aFrontEndSprites[FE_ARROWS1].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X(CONTROLLER_SIZE_X * scale), MENU_Y(CONTROLLER_SIZE_Y * scale), CRGBA(255, 255, 255, 255));
+ else
+ m_aFrontEndSprites[FE_ARROWS3].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X(CONTROLLER_SIZE_X * scale), MENU_Y(CONTROLLER_SIZE_Y * scale), CRGBA(255, 255, 255, 255));
+ } else {
+ if (CTimer::GetTimeInMillisecondsPauseMode() & 0x400)
+ m_aFrontEndSprites[FE_ARROWS2].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X(CONTROLLER_SIZE_X * scale), MENU_Y(CONTROLLER_SIZE_Y * scale), CRGBA(255, 255, 255, 255));
+ else
+ m_aFrontEndSprites[FE_ARROWS4].Draw(MENU_X_LEFT_ALIGNED(X(-CONTROLLER_SIZE_X / 2)), MENU_Y(Y(-CONTROLLER_SIZE_Y / 2)), MENU_X(CONTROLLER_SIZE_X * scale), MENU_Y(CONTROLLER_SIZE_Y * scale), CRGBA(255, 255, 255, 255));
+ }
+
+ CFont::SetFontStyle(FONT_LOCALE(FONT_BANK));
+ CFont::SetScale(MENU_X(SMALLESTTEXT_X_SCALE * scale), MENU_Y(SMALLESTTEXT_Y_SCALE * scale)); // X
+
+ // CFont::SetColor(CRGBA(128, 128, 128, FadeIn(255)));
+ CFont::SetDropColor(CRGBA(0, 0, 0, FadeIn(255)));
+ CFont::SetDropShadowPosition(1);
+ CFont::SetColor(CRGBA(255, 255, 255, FadeIn(255)));
+ CFont::SetWrapx(SCREEN_WIDTH);
+
+ float TEXT_L2_X = 50.0f + CONTROLLER_POS_X - centerX, TEXT_L2_Y = -14.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_L1_X = -4.0f + CONTROLLER_POS_X - centerX, TEXT_L1_Y = 25.0f + CONTROLLER_POS_Y - centerY, TEXT_L1_Y_VEH = 3.0f + TEXT_L1_Y;
+ float TEXT_DPAD_X = -4.0f + CONTROLLER_POS_X - centerX, TEXT_DPAD_Y = 65.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_LSTICK_X = -4.0f + CONTROLLER_POS_X - centerX, TEXT_LSTICK_Y = 97.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_SELECT_X = 103.0f + CONTROLLER_POS_X - centerX, TEXT_SELECT_Y = 141.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_START_X = 130.0f + CONTROLLER_POS_X - centerX, TEXT_START_Y = 128.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_R2_X = 184.0F + CONTROLLER_POS_X - centerX, TEXT_R2_Y = -14.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_R1_X = 238.0f + CONTROLLER_POS_X - centerX, TEXT_R1_Y = 25.0f + CONTROLLER_POS_Y - centerY;
+
+ float TEXT_SQUARE_X = 144.0f + CONTROLLER_POS_X - centerX, TEXT_SQUARE_Y = 18.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_TRIANGLE_X = 238.0f + CONTROLLER_POS_X - centerX, TEXT_TRIANGLE_Y = 52.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_CIRCLE_X = 238.0f + CONTROLLER_POS_X - centerX, TEXT_CIRCLE_Y = 65.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_CROSS_X = 238.0f + CONTROLLER_POS_X - centerX, TEXT_CROSS_Y = 78.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_RSTICK_X = 238.0f + CONTROLLER_POS_X - centerX, TEXT_RSTICK_Y = 94.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_R3_X = 238.0f + CONTROLLER_POS_X - centerX, TEXT_R3_Y = 109.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_L3_X = 84.0f + CONTROLLER_POS_X - centerX, TEXT_L3_Y = 162.0f + CONTROLLER_POS_Y - centerY;
+ float TEXT_L2R2_X = 74.0f + CONTROLLER_POS_X - centerX, TEXT_L2R2_Y = -6.0f + CONTROLLER_POS_Y - centerY;
+
+ switch (m_PrefsControllerType)
+ {
+ case CONTROLLER_DUALSHOCK4:
+ TEXT_L1_Y += 7.0f;
+ TEXT_L1_Y_VEH = TEXT_L1_Y;
+ TEXT_R1_Y += 7.0f;
+ TEXT_TRIANGLE_Y -= 1.0f;
+ TEXT_CIRCLE_Y -= 1.0f;
+ TEXT_CROSS_Y -= 1.0f;
+ TEXT_RSTICK_Y -= 4.0f;
+ TEXT_R3_Y -= 4.0f;
+ TEXT_DPAD_Y -= 1.0f;
+ TEXT_LSTICK_Y -= 6.0f;
+ TEXT_L3_X -= 2.0f;
+ break;
+ case CONTROLLER_XBOXONE:
+ TEXT_L2_X -= 2.0f;
+ TEXT_R2_X += 2.0f;
+ TEXT_L1_Y += 15.0f;
+ TEXT_L1_Y_VEH = TEXT_L1_Y;
+ TEXT_R1_Y += 15.0f;
+ TEXT_TRIANGLE_Y += 4.0f;
+ TEXT_CIRCLE_Y += 4.0f;
+ TEXT_CROSS_Y += 4.0f;
+ TEXT_RSTICK_Y += 1.0f;
+ TEXT_R3_Y += 1.0f;
+ TEXT_DPAD_Y += 29.0f;
+ TEXT_LSTICK_Y -= 22.0f;
+ TEXT_L3_X -= 36.0f;
+ TEXT_L2R2_Y += 5.0f;
+ TEXT_SELECT_X += 4.0f;
+ break;
+ case CONTROLLER_XBOX360:
+ TEXT_L2_X += 8.0f;
+ TEXT_R2_X -= 8.0f;
+ TEXT_L1_Y += 15.0f;
+ TEXT_L1_Y_VEH = TEXT_L1_Y;
+ TEXT_R1_Y += 15.0f;
+ TEXT_TRIANGLE_Y += 4.0f;
+ TEXT_CIRCLE_Y += 4.0f;
+ TEXT_CROSS_Y += 4.0f;
+ TEXT_RSTICK_Y += 4.0f;
+ TEXT_R3_Y += 4.0f;
+ TEXT_DPAD_Y += 30.0f;
+ TEXT_LSTICK_Y -= 21.0f;
+ TEXT_L3_X -= 36.0f;
+ TEXT_L2R2_Y += 5.0f;
+ TEXT_SELECT_X += 3.0f;
+ break;
+ case CONTROLLER_NINTENDO_SWITCH:
+ TEXT_L1_Y += 5.0f;
+ TEXT_L1_Y_VEH = TEXT_L1_Y;
+ TEXT_R1_Y += 5.0f;
+ TEXT_TRIANGLE_Y += 3.0f;
+ TEXT_CIRCLE_Y += 3.0f;
+ TEXT_CROSS_Y += 3.0f;
+ TEXT_LSTICK_Y -= 23.0f;
+ TEXT_DPAD_Y += 25.0;
+ TEXT_RSTICK_Y += 1.0f;
+ TEXT_R3_Y += 1.0f;
+ break;
+ };
+
+ if (m_DisplayControllerOnFoot) {
+ switch (CPad::GetPad(0)->Mode) {
+ case 0:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_CWL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y)), TheText.Get("FEC_LOF"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_MOV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_MOV"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_CWR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_TAR"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_JUM"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_ENV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_ATT"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_RUN"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_FPC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_LB3"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y + 13.0f)), TheText.Get("FEC_R3"));
+ break;
+ case 1:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_CWL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y)), TheText.Get("FEC_LOF"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_MOV"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_NA"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_CWR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_TAR"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_JUM"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_ENV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_ATT"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_RUN"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_FPC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_LB3"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y + 13.0f)), TheText.Get("FEC_R3"));
+ break;
+ case 2:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_CWL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y)), TheText.Get("FEC_ENV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_MOV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_MOV"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_CWR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_TAR"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_JUM"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_LOF"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_RUN"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_ATT"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_FPC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_LB3"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y + 13.0f)), TheText.Get("FEC_R3"));
+ break;
+ case 3:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_CWL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y)), TheText.Get("FEC_TAR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_NA"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_MOV"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_CWR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_ATT"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_JUM"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_ENV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_LOF"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_RUN"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_FPC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_LB3"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y + 13.0f)), TheText.Get("FEC_R3"));
+ break;
+ default:
+ return;
+ }
+ } else {
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2R2_X)), MENU_Y(Y(TEXT_L2R2_Y)), TheText.Get("FEC_LB"));
+ switch (CPad::GetPad(0)->Mode) {
+ case 0:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_LL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y_VEH)), TheText.Get("FEC_RSC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_VES"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_VES"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L3_X)), MENU_Y(Y(TEXT_L3_Y)), TheText.Get("FEC_HO3"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_LR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_HAB"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_BRA"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_EXV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_CAW"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_ACC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_TUC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_SM3"));
+ break;
+ case 1:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_LL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y_VEH)), TheText.Get("FEC_HOR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_VES"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L3_X)), MENU_Y(Y(TEXT_L3_Y)), TheText.Get("FEC_NA"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_RSC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_LR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_HAB"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_BRA"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_EXV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_CAW"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_ACC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_TUC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_SM3"));
+ break;
+ case 2:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_LL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y_VEH)), TheText.Get("FEC_EXV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_VES"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_VES"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L3_X)), MENU_Y(Y(TEXT_L3_Y)), TheText.Get("FEC_RS3"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_LR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_HOR"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_BRA"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_HAB"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_CAW"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_ACC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_TUC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_SM3"));
+ break;
+ case 3:
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L2_X)), MENU_Y(Y(TEXT_L2_Y)), TheText.Get("FEC_LL"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L1_X)), MENU_Y(Y(TEXT_L1_Y_VEH)), TheText.Get("FEC_HAB"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_DPAD_X)), MENU_Y(Y(TEXT_DPAD_Y)), TheText.Get("FEC_TUC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_LSTICK_X)), MENU_Y(Y(TEXT_LSTICK_Y)), TheText.Get("FEC_VES"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_L3_X)), MENU_Y(Y(TEXT_L3_Y)), TheText.Get("FEC_HO3"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SELECT_X)), MENU_Y(Y(TEXT_SELECT_Y)), TheText.Get("FEC_CAM"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_START_X)), MENU_Y(Y(TEXT_START_Y)), TheText.Get("FEC_PAU"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R2_X)), MENU_Y(Y(TEXT_R2_Y)), TheText.Get("FEC_LR"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R1_X)), MENU_Y(Y(TEXT_R1_Y)), TheText.Get("FEC_CAW"));
+ CFont::SetRightJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_SQUARE_X)), MENU_Y(Y(TEXT_SQUARE_Y)), TheText.Get("FEC_SMT"));
+ CFont::SetJustifyOn(); // X
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_TRIANGLE_X)), MENU_Y(Y(TEXT_TRIANGLE_Y)), TheText.Get("FEC_EXV"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CIRCLE_X)), MENU_Y(Y(TEXT_CIRCLE_Y)), TheText.Get("FEC_RSC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_CROSS_X)), MENU_Y(Y(TEXT_CROSS_Y)), TheText.Get("FEC_NA"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_RSTICK_X)), MENU_Y(Y(TEXT_RSTICK_Y)), TheText.Get("FEC_ACC"));
+ CFont::PrintString(MENU_X_LEFT_ALIGNED(X(TEXT_R3_X)), MENU_Y(Y(TEXT_R3_Y)), TheText.Get("FEC_BRA"));
+ break;
+ default:
+ return;
+ }
+ }
+
+ CFont::SetDropShadowPosition(0); // X
+
+#undef X
+#undef Y
+}
+#else
void
CMenuManager::PrintController(void)
{
@@ -5976,6 +6393,7 @@ CMenuManager::PrintController(void)
CFont::SetDropShadowPosition(0); // X
}
+#endif
#ifdef MENU_MAP
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 223f2adb..448e570b 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -25,6 +25,9 @@
#define MENUSLIDER_X 256.0f
#define MENUSLIDER_UNK 256.0f
+#define MENUSLIDER_BARS 16
+#define MENUSLIDER_LOGICAL_BARS MENUSLIDER_BARS
+
#define BIGTEXT_X_SCALE 0.75f // For FONT_HEADING
#define BIGTEXT_Y_SCALE 0.9f
#define MEDIUMTEXT_X_SCALE 0.55f // For FONT_HEADING
@@ -235,15 +238,15 @@ enum eMenuScreen
MENUPAGE_KEYBOARD_CONTROLS = 55,
MENUPAGE_MOUSE_CONTROLS = 56,
MENUPAGE_MISSION_RETRY = 57,
+#ifdef CUSTOM_FRONTEND_OPTIONS
+
#ifdef MENU_MAP
MENUPAGE_MAP = 58,
#endif
-#ifdef CUSTOM_FRONTEND_OPTIONS
-
#ifdef GRAPHICS_MENU_OPTIONS
MENUPAGE_GRAPHICS_SETTINGS,
#endif
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+#ifdef DETECT_JOYSTICK_MENU
MENUPAGE_DETECT_JOYSTICK,
#endif
@@ -256,6 +259,7 @@ enum eMenuScreen
enum eMenuAction
{
#ifdef CUSTOM_FRONTEND_OPTIONS
+ MENUACTION_CFO_SLIDER = -3,
MENUACTION_CFO_SELECT = -2,
MENUACTION_CFO_DYNAMIC = -1,
#endif
@@ -424,6 +428,10 @@ enum eCheckHover
HOVEROPTION_DECREASE_SFXVOLUME,
HOVEROPTION_INCREASE_MOUSESENS,
HOVEROPTION_DECREASE_MOUSESENS,
+#ifdef CUSTOM_FRONTEND_OPTIONS
+ HOVEROPTION_INCREASE_CFO_SLIDER,
+ HOVEROPTION_DECREASE_CFO_SLIDER,
+#endif
HOVEROPTION_NOT_HOVERING,
};
@@ -493,7 +501,7 @@ struct CCustomScreenLayout {
struct CCFO
{
- int8 *value;
+ void *value;
const char *saveCat;
const char *save;
};
@@ -524,6 +532,24 @@ struct CCFOSelect : CCFO
}
};
+// Value is float in here
+struct CCFOSlider : CCFO
+{
+ ChangeFuncFloat changeFunc;
+ float min;
+ float max;
+
+ CCFOSlider() {};
+ CCFOSlider(float* value, const char* saveCat, const char* save, float min, float max, ChangeFuncFloat changeFunc = nil){
+ this->value = value;
+ this->saveCat = saveCat;
+ this->save = save;
+ this->changeFunc = changeFunc;
+ this->min = min;
+ this->max = max;
+ }
+};
+
struct CCFODynamic : CCFO
{
DrawFunc drawFunc;
@@ -555,6 +581,7 @@ struct CMenuScreenCustom
CCFO *m_CFO; // for initializing
CCFOSelect *m_CFOSelect;
CCFODynamic *m_CFODynamic;
+ CCFOSlider *m_CFOSlider;
};
int32 m_SaveSlot; // eSaveSlot
int32 m_TargetMenu; // eMenuScreen
@@ -728,6 +755,20 @@ public:
#define ISLAND_LOADING_ISNT(p)
#endif
+#ifdef GAMEPAD_MENU
+ enum
+ {
+ CONTROLLER_DUALSHOCK2 = 0,
+ CONTROLLER_DUALSHOCK3,
+ CONTROLLER_DUALSHOCK4,
+ CONTROLLER_XBOX360,
+ CONTROLLER_XBOXONE,
+ CONTROLLER_NINTENDO_SWITCH,
+ };
+
+ static int8 m_PrefsControllerType;
+#endif
+
public:
static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2);
static void CentreMousePointer();
@@ -791,6 +832,9 @@ public:
void PageDownList(bool);
int8 GetPreviousPageOption();
void ProcessList(bool &goBack, bool &optionSelected);
+#ifdef GAMEPAD_MENU
+ void LoadController(int8 type);
+#endif
};
#ifndef IMPROVED_VIDEOMODE
diff --git a/src/core/FrontendTriggers.h b/src/core/FrontendTriggers.h
index b2bde09c..44bae54f 100644
--- a/src/core/FrontendTriggers.h
+++ b/src/core/FrontendTriggers.h
@@ -779,7 +779,7 @@ TriggerAudio_RadioStation(CMenuMultiChoicePicturedTriggered *widget)
if ( CMenuManager::m_PrefsRadioStation != widget->GetMenuSelection() )
{
CMenuManager::m_PrefsRadioStation = widget->GetMenuSelection();
- DMAudio.PlayFrontEndTrack(CMenuManager::m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(CMenuManager::m_PrefsRadioStation, TRUE);
DMAudio.SetRadioInCar(CMenuManager::m_PrefsRadioStation);
}
}
@@ -792,12 +792,12 @@ TriggerAudio_StereoMono(CMenuMultiChoiceTriggered *widget)
{
if (widget->GetMenuSelection() == 1)
{
- DMAudio.SetMonoMode(true);
+ DMAudio.SetMonoMode(TRUE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MONO, 0);
}
else
{
- DMAudio.SetMonoMode(false);
+ DMAudio.SetMonoMode(FALSE);
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_STEREO, 0);
}
}
diff --git a/src/core/Frontend_PS2.cpp b/src/core/Frontend_PS2.cpp
index 1cb944d1..1da15fbb 100644
--- a/src/core/Frontend_PS2.cpp
+++ b/src/core/Frontend_PS2.cpp
@@ -1388,7 +1388,7 @@ CMenuManager::DrawFrontEndNormal(void)
if ((m_nStartPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) <= 1600)
alpha = float(m_nStartPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 400.0f;
- m_someAlpha = 255 - clamp(alpha, 0.0f, 1.0f) * 255.0f;
+ m_someAlpha = 255 - Clamp(alpha, 0.0f, 1.0f) * 255.0f;
switch ( m_nSlidingDir )
{
@@ -1405,7 +1405,7 @@ CMenuManager::DrawFrontEndNormal(void)
float slide = float(m_nEndPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) / 800.0f;
float alpha = float((int32)(m_nEndPauseTimer - CTimer::GetTimeInMillisecondsPauseMode()) + -266) / 533.0f;
- m_someAlpha = clamp(alpha, 0.0f, 1.0f) * 255.0f;
+ m_someAlpha = Clamp(alpha, 0.0f, 1.0f) * 255.0f;
switch ( m_nSlidingDir )
{
@@ -2871,7 +2871,7 @@ CMenuManager::ProcessDPadCrossJustDown(void)
{
if ( !gMusicPlaying )
{
- DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
+ DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
gMusicPlaying = true;
}
}
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 4fd30b53..b3dd1eda 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -245,10 +245,16 @@ CGame::InitialiseRenderWare(void)
#ifdef LIBRW
#ifdef PS2_MATFX
- rw::MatFX::modulateEnvMap = true;
+ rw::MatFX::envMapApplyLight = true;
+ rw::MatFX::envMapUseMatColor = true;
+ rw::MatFX::envMapFlipU = true;
#else
- rw::MatFX::modulateEnvMap = false;
+ rw::MatFX::envMapApplyLight = false;
+ rw::MatFX::envMapUseMatColor = false;
+ rw::MatFX::envMapFlipU = false;
#endif
+ rw::RGBA envcol = { 128, 128, 128, 255 };
+ rw::MatFX::envMapColor = envcol;
#else
#ifdef PS2_MATFX
ReplaceMatFxCallback();
@@ -403,7 +409,11 @@ bool CGame::Initialise(const char* datFile)
#endif
#ifndef GTA_PS2
- CIniFile::LoadIniFile();
+#ifdef PED_CAR_DENSITY_SLIDERS
+ // Load density values from gta3.ini only if our re3.ini have them 1.f
+ if (CIniFile::PedNumberMultiplier == 1.f && CIniFile::CarNumberMultiplier == 1.f)
+#endif
+ CIniFile::LoadIniFile();
#endif
currLevel = LEVEL_INDUSTRIAL;
@@ -414,6 +424,11 @@ bool CGame::Initialise(const char* datFile)
CTxdStore::Create(gameTxdSlot);
CTxdStore::AddRef(gameTxdSlot);
+#ifdef EXTENDED_PIPELINES
+ // for generic fallback
+ CustomPipes::SetTxdFindCallback();
+#endif
+
LoadingScreen("Loading the Game", "Loading particles", nil);
int particleTxdSlot = CTxdStore::AddTxdSlot("particle");
CTxdStore::LoadTxd(particleTxdSlot, "MODELS/PARTICLE.TXD");
@@ -498,10 +513,6 @@ bool CGame::Initialise(const char* datFile)
CFileLoader::LoadLevel("GTA3.DAT");
#endif
-#ifdef EXTENDED_PIPELINES
- // for generic fallback
- CustomPipes::SetTxdFindCallback();
-#endif
CWorld::AddParticles();
CVehicleModelInfo::LoadVehicleColours();
CVehicleModelInfo::LoadEnvironmentMaps();
diff --git a/src/core/General.h b/src/core/General.h
index 478ef027..d4b941dd 100644
--- a/src/core/General.h
+++ b/src/core/General.h
@@ -56,7 +56,7 @@ public:
static float LimitRadianAngle(float angle)
{
- float result = clamp(angle, -25.0f, 25.0f);
+ float result = Clamp(angle, -25.0f, 25.0f);
while (result >= PI) {
result -= 2 * PI;
diff --git a/src/core/IniFile.cpp b/src/core/IniFile.cpp
index df01b440..524632fe 100644
--- a/src/core/IniFile.cpp
+++ b/src/core/IniFile.cpp
@@ -23,6 +23,6 @@ void CIniFile::LoadIniFile()
CarNumberMultiplier = Min(3.0f, Max(0.5f, CarNumberMultiplier));
CFileMgr::CloseFile(f);
}
- CPopulation::MaxNumberOfPedsInUse = 25.0f * PedNumberMultiplier;
- CCarCtrl::MaxNumberOfCarsInUse = 12.0f * CarNumberMultiplier;
+ CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * PedNumberMultiplier;
+ CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * CarNumberMultiplier;
}
\ No newline at end of file
diff --git a/src/core/IniFile.h b/src/core/IniFile.h
index 1e30c4de..30dc8c21 100644
--- a/src/core/IniFile.h
+++ b/src/core/IniFile.h
@@ -1,5 +1,8 @@
#pragma once
+#define DEFAULT_MAX_NUMBER_OF_PEDS 25.0f
+#define DEFAULT_MAX_NUMBER_OF_CARS 12.0f
+
class CIniFile
{
public:
diff --git a/src/core/MenuScreens.cpp b/src/core/MenuScreens.cpp
index 7c90ea12..247de98a 100644
--- a/src/core/MenuScreens.cpp
+++ b/src/core/MenuScreens.cpp
@@ -40,9 +40,13 @@ CMenuScreen aScreens[MENUPAGES] = {
{ "FET_AUD", 1, MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, 1, 1,
MENUACTION_MUSICVOLUME, "FEA_MUS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_SFXVOLUME, "FEA_SFX", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
+#ifdef EXTERNAL_3D_SOUND
MENUACTION_AUDIOHW, "FEA_3DH", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_SPEAKERCONF, "FEA_SPK", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
+#endif
+#ifdef AUDIO_REFLECTIONS
MENUACTION_DYNAMICACOUSTIC, "FET_DAM", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
+#endif
MENUACTION_RADIO, "FEA_RSS", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_RESTOREDEF, "FET_DEF", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
@@ -394,9 +398,6 @@ CMenuScreen aScreens[MENUPAGES] = {
{ "FET_PAU", 1, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_RESUME, "FEM_RES", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
-#ifdef MENU_MAP
- MENUACTION_CHANGEMENU, "FEG_MAP", SAVESLOT_NONE, MENUPAGE_MAP,
-#endif
MENUACTION_CHANGEMENU, "FEP_STA", SAVESLOT_NONE, MENUPAGE_STATS,
MENUACTION_CHANGEMENU, "FEP_BRI", SAVESLOT_NONE, MENUPAGE_BRIEFS,
MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS,
@@ -441,14 +442,6 @@ CMenuScreen aScreens[MENUPAGES] = {
},
#endif
-#ifdef MENU_MAP
- // MENUPAGE_MAP
- { "FEG_MAP", 1, MENUPAGE_NONE, MENUPAGE_NONE, 2, 2,
- MENUACTION_UNK110, "", SAVESLOT_NONE, MENUPAGE_NONE, // to prevent cross/enter to go back
- MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
- },
-#endif
-
// MENUPAGE_UNK
{ "", 0, MENUPAGE_NONE, MENUPAGE_NONE, 0, 0,
diff --git a/src/core/MenuScreensCustom.cpp b/src/core/MenuScreensCustom.cpp
index d7502152..4b977ae1 100644
--- a/src/core/MenuScreensCustom.cpp
+++ b/src/core/MenuScreensCustom.cpp
@@ -1,4 +1,13 @@
#include "common.h"
+#if defined DETECT_JOYSTICK_MENU && defined XINPUT
+#include
+#include
+#if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1)
+#pragma comment( lib, "Xinput9_1_0.lib" )
+#else
+#pragma comment( lib, "Xinput.lib" )
+#endif
+#endif
#include "platform.h"
#include "crossplatform.h"
#include "Renderer.h"
@@ -17,6 +26,9 @@
#include "ModelInfo.h"
#include "Pad.h"
#include "ControllerConfig.h"
+#include "IniFile.h"
+#include "CarCtrl.h"
+#include "Population.h"
// Menu screens array is at the bottom of the file.
@@ -24,7 +36,7 @@
#ifdef CUSTOM_FRONTEND_OPTIONS
-#ifdef IMPROVED_VIDEOMODE
+#if defined(IMPROVED_VIDEOMODE) && !defined(GTA_HANDHELD)
#define VIDEOMODE_SELECTOR MENUACTION_CFO_SELECT, "FEM_SCF", { new CCFOSelect((int8*)&FrontEndMenuManager.m_nPrefsWindowed, "VideoMode", "Windowed", screenModes, 2, true, ScreenModeAfterChange, true) },
#else
#define VIDEOMODE_SELECTOR
@@ -54,6 +66,15 @@
#define DUALPASS_SELECTOR
#endif
+#ifdef PED_CAR_DENSITY_SLIDERS
+ // 0.2f - 3.4f makes it possible to have 1.0f somewhere inbetween
+ #define DENSITY_SLIDERS \
+ MENUACTION_CFO_SLIDER, "FEM_PED", { new CCFOSlider(&CIniFile::PedNumberMultiplier, "Display", "PedDensity", 0.2f, 3.4f, PedDensityChange) }, \
+ MENUACTION_CFO_SLIDER, "FEM_CAR", { new CCFOSlider(&CIniFile::CarNumberMultiplier, "Display", "CarDensity", 0.2f, 3.4f, CarDensityChange) },
+#else
+ #define DENSITY_SLIDERS
+#endif
+
#ifdef NO_ISLAND_LOADING
#define ISLAND_LOADING_SELECTOR MENUACTION_CFO_SELECT, "FEM_ISL", { new CCFOSelect((int8*)&CMenuManager::m_PrefsIslandLoading, "Graphics", "IslandLoading", islandLoadingOpts, ARRAY_SIZE(islandLoadingOpts), true, IslandLoadingAfterChange) },
#else
@@ -74,6 +95,12 @@
#define INVERT_PAD_SELECTOR
#endif
+#ifdef GAMEPAD_MENU
+ #define SELECT_CONTROLLER_TYPE MENUACTION_CFO_SELECT, "FEC_TYP", { new CCFOSelect((int8*)&CMenuManager::m_PrefsControllerType, "Controller", "Type", controllerTypes, ARRAY_SIZE(controllerTypes), false, ControllerTypeAfterChange) },
+#else
+ #define SELECT_CONTROLLER_TYPE
+#endif
+
const char *filterNames[] = { "FEM_NON", "FEM_SIM", "FEM_NRM", "FEM_MOB" };
const char *off_on[] = { "FEM_OFF", "FEM_ON" };
@@ -135,6 +162,9 @@ void RestoreDefDisplay(int8 action) {
#ifdef FREE_CAM
TheCamera.bFreeCam = false;
#endif
+ #ifdef PED_CAR_DENSITY_SLIDERS
+ CIniFile::LoadIniFile();
+ #endif
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
CMenuManager::m_PrefsBrightness = 256;
CMenuManager::m_PrefsLOD = 1.2f;
@@ -185,35 +215,13 @@ void IslandLoadingAfterChange(int8 before, int8 after) {
}
#endif
-#ifdef MORE_LANGUAGES
-void LangPolSelect(int8 action)
-{
- if (action == FEOPTION_ACTION_SELECT) {
- FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_POLISH;
- FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
- FrontEndMenuManager.InitialiseChangedLanguageSettings();
- FrontEndMenuManager.SaveSettings();
- }
+#ifdef PED_CAR_DENSITY_SLIDERS
+void PedDensityChange(float before, float after) {
+ CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * after;
}
-void LangRusSelect(int8 action)
-{
- if (action == FEOPTION_ACTION_SELECT) {
- FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_RUSSIAN;
- FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
- FrontEndMenuManager.InitialiseChangedLanguageSettings();
- FrontEndMenuManager.SaveSettings();
- }
-}
-
-void LangJapSelect(int8 action)
-{
- if (action == FEOPTION_ACTION_SELECT) {
- FrontEndMenuManager.m_PrefsLanguage = CMenuManager::LANGUAGE_JAPANESE;
- FrontEndMenuManager.m_bFrontEnd_ReloadObrTxtGxt = true;
- FrontEndMenuManager.InitialiseChangedLanguageSettings();
- FrontEndMenuManager.SaveSettings();
- }
+void CarDensityChange(float before, float after) {
+ CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * after;
}
#endif
@@ -296,11 +304,13 @@ void ScreenModeAfterChange(int8 before, int8 after)
#endif
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+#ifdef DETECT_JOYSTICK_MENU
wchar selectedJoystickUnicode[128];
int cachedButtonNum = -1;
wchar* DetectJoystickDraw(bool* disabled, bool userHovering) {
+
+#if defined RW_GL3 && !defined LIBRW_SDL2
int numButtons;
int found = -1;
const char *joyname;
@@ -331,6 +341,37 @@ wchar* DetectJoystickDraw(bool* disabled, bool userHovering) {
}
}
if (PSGLOBAL(joy1id) == -1)
+#elif defined XINPUT
+ int found = -1;
+ XINPUT_STATE xstate;
+ memset(&xstate, 0, sizeof(XINPUT_STATE));
+ if (userHovering) {
+ for (int i = 0; i <= 3; i++) {
+ if (XInputGetState(i, &xstate) == ERROR_SUCCESS) {
+ if (xstate.Gamepad.bLeftTrigger || xstate.Gamepad.bRightTrigger) {
+ found = i;
+ break;
+ }
+ for (int j = XINPUT_GAMEPAD_DPAD_UP; j != XINPUT_GAMEPAD_Y << 1; j = (j << 1)) {
+ if (xstate.Gamepad.wButtons & j) {
+ found = i;
+ break;
+ }
+ }
+ if (found != -1)
+ break;
+ }
+ }
+ if (found != -1 && CPad::XInputJoy1 != found) {
+ // We should never leave pads -1, so we can process them when they're connected and kinda support hotplug.
+ CPad::XInputJoy2 = (CPad::XInputJoy1 == -1 ? (found + 1) % 4 : CPad::XInputJoy1);
+ CPad::XInputJoy1 = found;
+ cachedButtonNum = 0; // fake too, because xinput bypass CControllerConfig
+ }
+ }
+ sprintf(gSelectedJoystickName, "%d", CPad::XInputJoy1); // fake, on xinput we only store gamepad ids(thanks MS) so this is a temp variable to be used below
+ if (CPad::XInputJoy1 == -1)
+#endif
AsciiToUnicode("Not found", selectedJoystickUnicode);
else
AsciiToUnicode(gSelectedJoystickName, selectedJoystickUnicode);
@@ -351,6 +392,14 @@ void DetectJoystickGoBack() {
}
#endif
+#ifdef GAMEPAD_MENU
+const char* controllerTypes[] = { "FEC_DS2", "FEC_DS3", "FEC_DS4", "FEC_360", "FEC_ONE", "FEC_NSW" };
+void ControllerTypeAfterChange(int8 before, int8 after)
+{
+ FrontEndMenuManager.LoadController(after);
+}
+#endif
+
CMenuScreenCustom aScreens[MENUPAGES] = {
// MENUPAGE_NONE = 0
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil, },
@@ -374,10 +423,16 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
},
// MENUPAGE_CONTROLLER_SETTINGS = 4
- { "FET_CON", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+#if defined(GAMEPAD_MENU) && !defined(GTA_HANDHELD)
+ { "FET_AGS", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
+#else
+ { "FET_AGS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
+#endif
MENUACTION_CTRLCONFIG, "FEC_CCF", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
MENUACTION_CTRLDISPLAY, "FEC_CDP", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
+ INVERT_PAD_SELECTOR
MENUACTION_CTRLVIBRATION, "FEC_VIB", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
+ SELECT_CONTROLLER_TYPE
MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
},
@@ -385,9 +440,13 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
{ "FET_AUD", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
MENUACTION_MUSICVOLUME, "FEA_MUS", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_SFXVOLUME, "FEA_SFX", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+#ifdef EXTERNAL_3D_SOUND
MENUACTION_AUDIOHW, "FEA_3DH", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_SPEAKERCONF, "FEA_SPK", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+#endif
+#ifdef AUDIO_REFLECTIONS
MENUACTION_DYNAMICACOUSTIC, "FET_DAM", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
+#endif
MENUACTION_RADIO, "FEA_RSS", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_RESTOREDEF, "FET_DEF", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
@@ -398,6 +457,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
{ "FET_DIS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
MENUACTION_BRIGHTNESS, "FED_BRI", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ DENSITY_SLIDERS
MENUACTION_FRAMESYNC, "FEM_VSC", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_FRAMELIMIT, "FEM_FRM", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
#ifndef EXTENDED_COLOURFILTER
@@ -422,6 +482,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
{ "FET_DIS", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS, nil, nil,
MENUACTION_BRIGHTNESS, "FED_BRI", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
MENUACTION_DRAWDIST, "FEM_LOD", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
+ DENSITY_SLIDERS
CUTSCENE_BORDERS_TOGGLE
FREE_CAM_TOGGLE
MENUACTION_SUBTITLES, "FED_SUB", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
@@ -437,11 +498,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
MENUACTION_LANG_GER, "FEL_GER", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
MENUACTION_LANG_ITA, "FEL_ITA", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
MENUACTION_LANG_SPA, "FEL_SPA", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
-#ifdef MORE_LANGUAGES
- MENUACTION_CFO_DYNAMIC, "FEL_POL", { new CCFODynamic(nil, nil, nil, nil, LangPolSelect) },
- MENUACTION_CFO_DYNAMIC, "FEL_RUS", { new CCFODynamic(nil, nil, nil, nil, LangRusSelect) },
- MENUACTION_CFO_DYNAMIC, "FEL_JAP", { new CCFODynamic(nil, nil, nil, nil, LangJapSelect) },
-#endif
+ // CustomFrontendOptionsPopulate will add languages here, if files are found
MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
},
@@ -648,7 +705,10 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
MENUACTION_CTRLMETHOD, "FET_CME", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
#endif
MENUACTION_KEYBOARDCTRLS,"FET_RDK", { nil, SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS },
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+#ifdef GAMEPAD_MENU
+ MENUACTION_CHANGEMENU, "FET_AGS", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
+#endif
+#ifdef DETECT_JOYSTICK_MENU
MENUACTION_CHANGEMENU, "FEC_JOD", { nil, SAVESLOT_NONE, MENUPAGE_DETECT_JOYSTICK },
#endif
MENUACTION_CHANGEMENU, "FET_AMS", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
@@ -700,11 +760,15 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
// MENUPAGE_OPTIONS = 41
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, nil, nil,
+#ifdef GTA_HANDHELD
+ MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS },
+#else
MENUACTION_CHANGEMENU, "FET_CTL", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC },
+#endif
MENUACTION_LOADRADIO, "FET_AUD", { nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS },
MENUACTION_CHANGEMENU, "FET_DIS", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
#ifdef GRAPHICS_MENU_OPTIONS
- MENUACTION_CHANGEMENU, "FET_GRA", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
+ MENUACTION_CHANGEMENU, "FET_GFX", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
#endif
MENUACTION_CHANGEMENU, "FET_LAN", { nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS },
MENUACTION_PLAYERSETUP, "FET_PSU", { nil, SAVESLOT_NONE, MENUPAGE_SKIN_SELECT },
@@ -773,9 +837,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
{ "FET_PAU", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil,
MENUACTION_RESUME, "FEM_RES", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
MENUACTION_CHANGEMENU, "FEN_STA", { nil, SAVESLOT_NONE, MENUPAGE_NEW_GAME },
-#ifdef MENU_MAP
- MENUACTION_CHANGEMENU, "FEG_MAP", { nil, SAVESLOT_NONE, MENUPAGE_MAP },
-#endif
+ // CMenuManager::LoadAllTextures will add map here, if MENU_MAP enabled and map textures are found
MENUACTION_CHANGEMENU, "FEP_STA", { nil, SAVESLOT_NONE, MENUPAGE_STATS },
MENUACTION_CHANGEMENU, "FEP_BRI", { nil, SAVESLOT_NONE, MENUPAGE_BRIEFS },
MENUACTION_CHANGEMENU, "FET_OPT", { nil, SAVESLOT_NONE, MENUPAGE_OPTIONS },
@@ -803,7 +865,9 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
{ "FET_MTI", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC, nil, nil,
MENUACTION_MOUSESENS, "FEC_MSH", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
MENUACTION_INVVERT, "FEC_IVV", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
+#ifndef GAMEPAD_MENU
INVERT_PAD_SELECTOR
+#endif
MENUACTION_MOUSESTEER, "FET_MST", { nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS },
MENUACTION_CHANGEMENU, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE },
},
@@ -831,10 +895,12 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
#ifdef GRAPHICS_MENU_OPTIONS
// MENUPAGE_GRAPHICS_SETTINGS
- { "FET_GRA", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS,
+ { "FET_GFX", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS,
new CCustomScreenLayout({MENUSPRITE_MAINMENU, 50, 0, 20, FONT_HEADING, FESCREEN_LEFT_ALIGN, true, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), GraphicsGoBack,
+#ifndef GTA_HANDHELD
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
+#endif
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
VIDEOMODE_SELECTOR
MENUACTION_FRAMESYNC, "FEM_VSC", { nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS },
@@ -853,7 +919,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
},
#endif
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+#ifdef DETECT_JOYSTICK_MENU
// MENUPAGE_DETECT_JOYSTICK
{ "FEC_JOD", MENUPAGE_CONTROLLER_PC, MENUPAGE_CONTROLLER_PC,
new CCustomScreenLayout({MENUSPRITE_MAINMENU, 40, 60, 20, FONT_BANK, FESCREEN_LEFT_ALIGN, false, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), DetectJoystickGoBack,
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 35de6c5f..8ee1e0f7 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -1032,8 +1032,14 @@ void CPad::AddToPCCheatString(char c)
}
#ifdef XINPUT
+int CPad::XInputJoy1 = 0;
+int CPad::XInputJoy2 = 1;
void CPad::AffectFromXinput(uint32 pad)
{
+ pad = pad == 0 ? XInputJoy1 : XInputJoy2;
+ if (pad == -1) // LoadINIControllerSettings can set it to -1
+ return;
+
XINPUT_STATE xstate;
memset(&xstate, 0, sizeof(XINPUT_STATE));
if (XInputGetState(pad, &xstate) == ERROR_SUCCESS)
@@ -2340,6 +2346,121 @@ bool CPad::ShiftTargetRightJustDown(void)
return !!(NewState.RightShoulder2 && !OldState.RightShoulder2);
}
+#ifdef FIX_BUGS
+// FIX: fixes from VC for the bug of double switching the controller setup
+bool CPad::GetAnaloguePadUp(void)
+{
+ static int16 oldfStickY = 0;
+
+ int16 leftStickY = CPad::GetPad(0)->GetLeftStickY();
+
+ if ( leftStickY < -15 && oldfStickY >= -5 )
+ {
+ oldfStickY = leftStickY;
+ return true;
+ }
+ else
+ {
+ oldfStickY = leftStickY;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadDown(void)
+{
+ static int16 oldfStickY = 0;
+
+ int16 leftStickY = CPad::GetPad(0)->GetLeftStickY();
+
+ if ( leftStickY > 15 && oldfStickY <= 5 )
+ {
+ oldfStickY = leftStickY;
+ return true;
+ }
+ else
+ {
+ oldfStickY = leftStickY;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadLeft(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 leftStickX = CPad::GetPad(0)->GetLeftStickX();
+
+ if ( leftStickX < -15 && oldfStickX >= -5 )
+ {
+ oldfStickX = leftStickX;
+ return true;
+ }
+ else
+ {
+ oldfStickX = leftStickX;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadRight(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 leftStickX = CPad::GetPad(0)->GetLeftStickX();
+
+ if ( leftStickX > 15 && oldfStickX <= 5 )
+ {
+ oldfStickX = leftStickX;
+ return true;
+ }
+ else
+ {
+ oldfStickX = leftStickX;
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadLeftJustUp(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 X = GetPad(0)->GetPedWalkLeftRight();
+
+ if ( X == 0 && oldfStickX < 0 )
+ {
+ oldfStickX = 0;
+
+ return true;
+ }
+ else
+ {
+ oldfStickX = X;
+
+ return false;
+ }
+}
+
+bool CPad::GetAnaloguePadRightJustUp(void)
+{
+ static int16 oldfStickX = 0;
+
+ int16 X = GetPad(0)->GetPedWalkLeftRight();
+
+ if ( X == 0 && oldfStickX > 0 )
+ {
+ oldfStickX = 0;
+
+ return true;
+ }
+ else
+ {
+ oldfStickX = X;
+
+ return false;
+ }
+}
+
+#else
bool CPad::GetAnaloguePadUp(void)
{
static int16 oldfStickY = 0;
@@ -2451,6 +2572,7 @@ bool CPad::GetAnaloguePadRightJustUp(void)
return false;
}
}
+#endif
bool CPad::ForceCameraBehindPlayer(void)
{
diff --git a/src/core/Pad.h b/src/core/Pad.h
index 20a676ef..b37659cd 100644
--- a/src/core/Pad.h
+++ b/src/core/Pad.h
@@ -263,6 +263,8 @@ public:
static int32 *EditCodesForControls(int32 *pRsKeys, int32 nSize);
#ifdef XINPUT
+ static int XInputJoy1;
+ static int XInputJoy2;
void AffectFromXinput(uint32 pad);
#endif
diff --git a/src/core/Placeable.h b/src/core/Placeable.h
index 1d51f306..2f246bc5 100644
--- a/src/core/Placeable.h
+++ b/src/core/Placeable.h
@@ -2,11 +2,12 @@
class CPlaceable
{
+protected:
+ CMatrix m_matrix;
+
public:
// disable allocation
- static void *operator new(size_t);
-
- CMatrix m_matrix;
+ static void *operator new(size_t) throw();
CPlaceable(void);
virtual ~CPlaceable(void);
@@ -21,6 +22,7 @@ public:
CVector &GetForward(void) { return m_matrix.GetForward(); }
CVector &GetUp(void) { return m_matrix.GetUp(); }
CMatrix &GetMatrix(void) { return m_matrix; }
+ void SetMatrix(CMatrix &newMatrix) { m_matrix = newMatrix; }
void SetTransform(RwMatrix *m) { m_matrix = CMatrix(m, false); }
void SetHeading(float angle);
void SetOrientation(float x, float y, float z){
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index 1af8f924..91bd0691 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -121,7 +121,7 @@ CPlayerInfo::Process(void)
m_fRoadDensity = ThePaths.CalcRoadDensity(playerPos.x, playerPos.y);
}
- m_fRoadDensity = clamp(m_fRoadDensity, 0.4f, 1.45f);
+ m_fRoadDensity = Clamp(m_fRoadDensity, 0.4f, 1.45f);
// Because vehicle enter/exit use same key binding.
bool enterOrExitVeh;
@@ -155,8 +155,8 @@ CPlayerInfo::Process(void)
m_pPed->SetPedState(PED_IDLE);
m_pPed->SetMoveState(PEDMOVE_STILL);
CPed::PedSetOutCarCB(0, m_pPed);
- CAnimManager::BlendAnimation(m_pPed->GetClump(), m_pPed->m_animGroup, ANIM_IDLE_STANCE, 100.0f);
- CAnimManager::BlendAnimation(m_pPed->GetClump(), ASSOCGRP_STD, ANIM_FALL_LAND, 100.0f);
+ CAnimManager::BlendAnimation(m_pPed->GetClump(), m_pPed->m_animGroup, ANIM_STD_IDLE, 100.0f);
+ CAnimManager::BlendAnimation(m_pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_LAND, 100.0f);
m_pPed->SetPosition(sth);
m_pPed->SetMoveState(PEDMOVE_STILL);
m_pPed->m_vecMoveSpeed = veh->m_vecMoveSpeed;
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index 39cfb1d4..b0248664 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -9,6 +9,7 @@
#endif
#include "Population.h"
#include "ProjectileInfo.h"
+#include "SaveBuf.h"
#include "Streaming.h"
#include "Wanted.h"
#include "World.h"
@@ -130,14 +131,19 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot)
void CPools::LoadVehiclePool(uint8* buf, uint32 size)
{
INITSAVEBUF
- int nNumCars = ReadSaveBuf(buf);
- int nNumBoats = ReadSaveBuf(buf);
+ int nNumCars, nNumBoats;
+ ReadSaveBuf(&nNumCars, buf);
+ ReadSaveBuf(&nNumBoats, buf);
for (int i = 0; i < nNumCars + nNumBoats; i++) {
- uint32 type = ReadSaveBuf(buf);
- int16 model = ReadSaveBuf(buf);
+ uint32 type;
+ int16 model;
+ int32 slot;
+
+ ReadSaveBuf(&type, buf);
+ ReadSaveBuf(&model, buf);
CStreaming::RequestModel(model, STREAMFLAGS_DEPENDENCY);
CStreaming::LoadAllRequestedModels(false);
- int32 slot = ReadSaveBuf(buf);
+ ReadSaveBuf(&slot, buf);
CVehicle* pVehicle;
#ifdef COMPATIBLE_SAVES
if (type == VEHICLE_TYPE_BOAT)
@@ -275,9 +281,9 @@ INITSAVEBUF
#else
if ((pVehicle->IsCar() || pVehicle->IsBoat()) && pVehicle->VehicleCreatedBy == MISSION_VEHICLE) {
#endif
- WriteSaveBuf(buf, pVehicle->m_vehType);
- WriteSaveBuf(buf, pVehicle->GetModelIndex());
- WriteSaveBuf(buf, GetVehicleRef(pVehicle));
+ WriteSaveBuf(buf, pVehicle->m_vehType);
+ WriteSaveBuf(buf, pVehicle->GetModelIndex());
+ WriteSaveBuf(buf, GetVehicleRef(pVehicle));
pVehicle->Save(buf);
}
#else
@@ -286,7 +292,7 @@ INITSAVEBUF
#else
if (pVehicle->IsCar() && pVehicle->VehicleCreatedBy == MISSION_VEHICLE) {
#endif
- WriteSaveBuf(buf, (uint32)pVehicle->m_vehType);
+ WriteSaveBuf(buf, pVehicle->m_vehType);
WriteSaveBuf(buf, pVehicle->GetModelIndex());
WriteSaveBuf(buf, GetVehicleRef(pVehicle));
memcpy(buf, pVehicle, sizeof(CAutomobile));
@@ -297,7 +303,7 @@ INITSAVEBUF
#else
if (pVehicle->IsBoat() && pVehicle->VehicleCreatedBy == MISSION_VEHICLE) {
#endif
- WriteSaveBuf(buf, (uint32)pVehicle->m_vehType);
+ WriteSaveBuf(buf, pVehicle->m_vehType);
WriteSaveBuf(buf, pVehicle->GetModelIndex());
WriteSaveBuf(buf, GetVehicleRef(pVehicle));
memcpy(buf, pVehicle, sizeof(CBoat));
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 4fd7f1a5..b29c19eb 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -16,6 +16,7 @@
#include "Script.h"
#include "TxdStore.h"
#include "World.h"
+#include "SaveBuf.h"
#include "Streaming.h"
#include "SpecialFX.h"
@@ -44,6 +45,9 @@ CSprite2d CRadar::SaveSprite;
CSprite2d CRadar::SpraySprite;
CSprite2d CRadar::TonySprite;
CSprite2d CRadar::WeaponSprite;
+#ifdef MENU_MAP
+CSprite2d CRadar::WaypointSprite;
+#endif
CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
nil,
@@ -66,7 +70,10 @@ CSprite2d *CRadar::RadarSprites[RADAR_SPRITE_COUNT] = {
&SaveSprite,
&SpraySprite,
&TonySprite,
- &WeaponSprite
+ &WeaponSprite,
+#ifdef MENU_MAP
+ &WaypointSprite
+#endif
};
// Why this doesn't coincide with world coordinates i don't know
@@ -142,6 +149,79 @@ void GetTextureCorners(int32 x, int32 y, CVector2D *out)
out[3].y = RADAR_TILE_SIZE * (y);
}
+uint8 CRadar::CalculateBlipAlpha(float dist)
+{
+#ifdef MENU_MAP
+ if (CMenuManager::bMenuMapActive)
+ return 255;
+#endif
+ if (dist <= 1.0f)
+ return 255;
+
+ if (dist <= 5.0f)
+ return (128.0f * ((dist - 1.0f) / 4.0f)) + ((1.0f - (dist - 1.0f) / 4.0f) * 255.0f);
+
+ return 128;
+}
+
+void CRadar::ChangeBlipBrightness(int32 i, int32 bright)
+{
+ int index = GetActualBlipArrayIndex(i);
+ if (index != -1)
+ ms_RadarTrace[index].m_bDim = bright != 1;
+}
+
+void CRadar::ChangeBlipColour(int32 i, int32 color)
+{
+ int index = GetActualBlipArrayIndex(i);
+ if (index != -1)
+ ms_RadarTrace[index].m_nColor = color;
+}
+
+void CRadar::ChangeBlipDisplay(int32 i, eBlipDisplay display)
+{
+ int index = GetActualBlipArrayIndex(i);
+ if (index != -1)
+ ms_RadarTrace[index].m_eBlipDisplay = display;
+}
+
+void CRadar::ChangeBlipScale(int32 i, int32 scale)
+{
+ int index = GetActualBlipArrayIndex(i);
+ if (index != -1)
+ ms_RadarTrace[index].m_wScale = scale;
+}
+
+void CRadar::ClearBlip(int32 i)
+{
+ int index = GetActualBlipArrayIndex(i);
+ if (index != -1) {
+ SetRadarMarkerState(index, false);
+ ms_RadarTrace[index].m_bInUse = false;
+#ifndef MENU_MAP
+ // Ssshhh
+ ms_RadarTrace[index].m_eBlipType = BLIP_NONE;
+ ms_RadarTrace[index].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
+ ms_RadarTrace[index].m_eRadarSprite = RADAR_SPRITE_NONE;
+#endif
+ }
+}
+
+void CRadar::ClearBlipForEntity(eBlipType type, int32 id)
+{
+ for (int i = 0; i < NUMRADARBLIPS; i++) {
+ if (type == ms_RadarTrace[i].m_eBlipType && id == ms_RadarTrace[i].m_nEntityHandle) {
+ SetRadarMarkerState(i, false);
+ ms_RadarTrace[i].m_bInUse = false;
+ ms_RadarTrace[i].m_eBlipType = BLIP_NONE;
+ ms_RadarTrace[i].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
+ ms_RadarTrace[i].m_eRadarSprite = RADAR_SPRITE_NONE;
+ }
+ };
+}
+
+// Why not a proper clipping algorithm?
+#ifdef THIS_IS_STUPID
bool IsPointInsideRadar(const CVector2D &point)
{
@@ -222,79 +302,6 @@ int LineRadarBoxCollision(CVector2D &out, const CVector2D &p1, const CVector2D &
return edge;
}
-
-uint8 CRadar::CalculateBlipAlpha(float dist)
-{
-#ifdef MENU_MAP
- if (CMenuManager::bMenuMapActive)
- return 255;
-#endif
- if (dist <= 1.0f)
- return 255;
-
- if (dist <= 5.0f)
- return (128.0f * ((dist - 1.0f) / 4.0f)) + ((1.0f - (dist - 1.0f) / 4.0f) * 255.0f);
-
- return 128;
-}
-
-void CRadar::ChangeBlipBrightness(int32 i, int32 bright)
-{
- int index = GetActualBlipArrayIndex(i);
- if (index != -1)
- ms_RadarTrace[index].m_bDim = bright != 1;
-}
-
-void CRadar::ChangeBlipColour(int32 i, int32 color)
-{
- int index = GetActualBlipArrayIndex(i);
- if (index != -1)
- ms_RadarTrace[index].m_nColor = color;
-}
-
-void CRadar::ChangeBlipDisplay(int32 i, eBlipDisplay display)
-{
- int index = GetActualBlipArrayIndex(i);
- if (index != -1)
- ms_RadarTrace[index].m_eBlipDisplay = display;
-}
-
-void CRadar::ChangeBlipScale(int32 i, int32 scale)
-{
- int index = GetActualBlipArrayIndex(i);
- if (index != -1)
- ms_RadarTrace[index].m_wScale = scale;
-}
-
-void CRadar::ClearBlip(int32 i)
-{
- int index = GetActualBlipArrayIndex(i);
- if (index != -1) {
- SetRadarMarkerState(index, false);
- ms_RadarTrace[index].m_bInUse = false;
-#ifndef MENU_MAP
- // Ssshhh
- ms_RadarTrace[index].m_eBlipType = BLIP_NONE;
- ms_RadarTrace[index].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
- ms_RadarTrace[index].m_eRadarSprite = RADAR_SPRITE_NONE;
-#endif
- }
-}
-
-void CRadar::ClearBlipForEntity(eBlipType type, int32 id)
-{
- for (int i = 0; i < NUMRADARBLIPS; i++) {
- if (type == ms_RadarTrace[i].m_eBlipType && id == ms_RadarTrace[i].m_nEntityHandle) {
- SetRadarMarkerState(i, false);
- ms_RadarTrace[i].m_bInUse = false;
- ms_RadarTrace[i].m_eBlipType = BLIP_NONE;
- ms_RadarTrace[i].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
- ms_RadarTrace[i].m_eRadarSprite = RADAR_SPRITE_NONE;
- }
- };
-}
-
-// Why not a proper clipping algorithm?
int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect)
{
CVector2D corners[4] = {
@@ -373,6 +380,50 @@ int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect)
return n;
}
+#else
+
+int
+ClipPolyPlane(const CVector2D *in, int nin, CVector2D *out, CVector *plane)
+{
+ int j;
+ int nout;
+ int x1, x2;
+ float d1, d2, t;
+
+ nout = 0;
+ for(j = 0; j < nin; j++){
+ x1 = j;
+ x2 = (j+1) % nin;
+
+ d1 = plane->x*in[x1].x + plane->y*in[x1].y + plane->z;
+ d2 = plane->x*in[x2].x + plane->y*in[x2].y + plane->z;
+ if(d1*d2 < 0.0f){
+ t = d1/(d1 - d2);
+ out[nout++] = in[x1]*(1.0f-t) + in[x2]*t;
+ }
+ if(d2 >= 0.0f)
+ out[nout++] = in[x2];
+ }
+ return nout;
+}
+
+int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect)
+{
+ CVector planes[4] = {
+ CVector(-1.0f, 0.0f, 1.0f),
+ CVector( 1.0f, 0.0f, 1.0f),
+ CVector(0.0f, -1.0f, 1.0f),
+ CVector(0.0f, 1.0f, 1.0f)
+ };
+ CVector2D tmp[8];
+ int n;
+ if(n = ClipPolyPlane(rect, 4, tmp, &planes[0]), n == 0) return 0;
+ if(n = ClipPolyPlane(tmp, n, poly, &planes[1]), n == 0) return 0;
+ if(n = ClipPolyPlane(poly, n, tmp, &planes[2]), n == 0) return 0;
+ if(n = ClipPolyPlane(tmp, n, poly, &planes[3]), n == 0) return 0;
+ return n;
+}
+#endif
bool CRadar::DisplayThisBlip(int32 counter)
{
@@ -396,8 +447,8 @@ void CRadar::Draw3dMarkers()
CEntity *entity = CPools::GetVehiclePool()->GetAt(ms_RadarTrace[i].m_nEntityHandle);
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition();
- pos.z += 1.2f * CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 2.5f;
- C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 2.5f, 0, 128, 255, 255, 1024, 0.2f, 5);
+ pos.z += 1.2f * CModelInfo::GetColModel(entity->GetModelIndex())->boundingBox.max.z + 2.5f;
+ C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 2.5f, 0, 128, 255, 255, 1024, 0.2f, 5);
}
break;
}
@@ -411,7 +462,7 @@ void CRadar::Draw3dMarkers()
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition();
pos.z += 3.0f;
- C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.5f, 0, 128, 255, 255, 1024, 0.2f, 5);
+ C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 1.5f, 0, 128, 255, 255, 1024, 0.2f, 5);
}
break;
}
@@ -420,8 +471,8 @@ void CRadar::Draw3dMarkers()
CEntity *entity = CPools::GetObjectPool()->GetAt(ms_RadarTrace[i].m_nEntityHandle);
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY) {
CVector pos = entity->GetPosition();
- pos.z += CModelInfo::GetModelInfo(entity->GetModelIndex())->GetColModel()->boundingBox.max.z + 1.0f + 1.0f;
- C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), 1, pos, 1.0f, 0, 128, 255, 255, 1024, 0.2f, 5);
+ pos.z += CModelInfo::GetColModel(entity->GetModelIndex())->boundingBox.max.z + 1.0f + 1.0f;
+ C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 1.0f, 0, 128, 255, 255, 1024, 0.2f, 5);
}
break;
}
@@ -430,7 +481,7 @@ void CRadar::Draw3dMarkers()
case BLIP_CONTACT_POINT:
if (!CTheScripts::IsPlayerOnAMission()) {
if (ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_BOTH || ms_RadarTrace[i].m_eBlipDisplay == BLIP_DISPLAY_MARKER_ONLY)
- C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), 4, ms_RadarTrace[i].m_vecPos, 2.0f, 0, 128, 255, 128, 2048, 0.2f, 0);
+ C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_CYLINDER, ms_RadarTrace[i].m_vecPos, 2.0f, 0, 128, 255, 128, 2048, 0.2f, 0);
}
break;
}
@@ -440,7 +491,11 @@ void CRadar::Draw3dMarkers()
void CRadar::DrawBlips()
{
- if (!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud) {
+ if ((!TheCamera.m_WideScreenOn && CHud::m_Wants_To_Draw_Hud)
+#ifdef MENU_MAP
+ || CMenuManager::bMenuMapActive
+#endif
+ ) {
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE);
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE);
@@ -868,6 +923,9 @@ void CRadar::DrawRadarSection(int32 x, int32 y)
void CRadar::DrawRadarSprite(uint16 sprite, float x, float y, uint8 alpha)
{
+#ifdef MENU_MAP
+ if(sprite == RADAR_SPRITE_WAYPOINT) alpha = 255;
+#endif
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));
}
@@ -973,6 +1031,10 @@ const char* gRadarTexNames[] = {
void
CRadar::Initialise()
{
+#ifdef MENU_MAP
+ TargetMarkerId = -1;
+#endif
+
for (int i = 0; i < NUMRADARBLIPS; i++) {
ms_RadarTrace[i].m_BlipIndex = 1;
SetRadarMarkerState(i, false);
@@ -1011,7 +1073,7 @@ INITSAVEBUF
CheckSaveHeader(buf, 'R', 'D', 'R', '\0', size - SAVE_HEADER_SIZE);
for (int i = 0; i < NUMRADARBLIPS; i++)
- ms_RadarTrace[i] = ReadSaveBuf(buf);
+ ReadSaveBuf(&ms_RadarTrace[i], buf);
VALIDATESAVEBUF(size);
}
@@ -1041,6 +1103,43 @@ CRadar::LoadTextures()
SpraySprite.SetTexture("radar_spray");
TonySprite.SetTexture("radar_tony");
WeaponSprite.SetTexture("radar_weapon");
+#ifdef MENU_MAP
+ WaypointSprite.SetTexture("radar_waypoint");
+ if(!WaypointSprite.m_pTexture) {
+ // create the texture if it's missing in TXD
+#define WAYPOINT_R (255)
+#define WAYPOINT_G (72)
+#define WAYPOINT_B (77)
+
+ RwRaster *raster = RwRasterCreate(16, 16, 0, rwRASTERTYPETEXTURE | rwRASTERFORMAT8888);
+
+ RwUInt32 *pixels = (RwUInt32 *)RwRasterLock(raster, 0, rwRASTERLOCKWRITE);
+ for(int x = 0; x < 16; x++)
+ for(int y = 0; y < 16; y++)
+ {
+ int x2 = x < 8 ? x : 7 - (x & 7);
+ int y2 = y < 8 ? y : 7 - (y & 7);
+ if ((y2 >= 4 && x2 >= 4) // square in the center is transparent
+ || (x2 < 2 && y2 == 0) // two pixels on each side of first/last line are transparent
+ || (x2 < 1 && y2 == 1)) // one pixel on each side of second to first/last line is transparent
+ pixels[x + y * 16] = 0;
+ else if((x2 == 2 && y2 >= 2)|| (y2 == 2 && x2 >= 2) )// colored square inside
+#ifdef RW_GL3
+ pixels[x + y * 16] = WAYPOINT_R | (WAYPOINT_G << 8) | (WAYPOINT_B << 16) | (255 << 24);
+#else
+ pixels[x + y * 16] = WAYPOINT_B | (WAYPOINT_G << 8) | (WAYPOINT_R << 16) | (255 << 24);
+#endif
+ else
+ pixels[x + y * 16] = 0xFF000000; // black
+ }
+ RwRasterUnlock(raster);
+ WaypointSprite.m_pTexture = RwTextureCreate(raster);
+ RwTextureSetFilterMode(WaypointSprite.m_pTexture, rwFILTERLINEAR);
+#undef WAYPOINT_R
+#undef WAYPOINT_G
+#undef WAYPOINT_B
+ }
+#endif
CTxdStore::PopCurrentTxd();
}
@@ -1058,15 +1157,23 @@ INITSAVEBUF
WriteSaveHeader(buf, 'R', 'D', 'R', '\0', *size - SAVE_HEADER_SIZE);
#ifdef MENU_MAP
+ bool bWaypointDeleted = false;
if (TargetMarkerId != -1) {
ClearBlip(TargetMarkerId);
TargetMarkerId = -1;
+ bWaypointDeleted = true;
}
#endif
for (int i = 0; i < NUMRADARBLIPS; i++)
WriteSaveBuf(buf, ms_RadarTrace[i]);
+
+#ifdef MENU_MAP
+ if(bWaypointDeleted)
+ ToggleTargetMarker(TargetMarkerPos.x, TargetMarkerPos.y);
+#endif
+
VALIDATESAVEBUF(*size);
}
@@ -1171,7 +1278,11 @@ void CRadar::ShowRadarMarker(CVector pos, uint32 color, float radius) {
void CRadar::ShowRadarTrace(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha)
{
- if (!CHud::m_Wants_To_Draw_Hud || TheCamera.m_WideScreenOn)
+ if ((TheCamera.m_WideScreenOn || !CHud::m_Wants_To_Draw_Hud)
+#ifdef MENU_MAP
+ && !CMenuManager::bMenuMapActive
+#endif
+ )
return;
CSprite2d::DrawRect(CRect(x - SCREEN_SCALE_X(size + 1.0f), y - SCREEN_SCALE_Y(size + 1.0f), SCREEN_SCALE_X(size + 1.0f) + x, SCREEN_SCALE_Y(size + 1.0f) + y), CRGBA(0, 0, 0, alpha));
@@ -1180,7 +1291,11 @@ void CRadar::ShowRadarTrace(float x, float y, uint32 size, uint8 red, uint8 gree
void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red, uint8 green, uint8 blue, uint8 alpha, uint8 mode)
{
- if (!CHud::m_Wants_To_Draw_Hud || TheCamera.m_WideScreenOn)
+ if ((TheCamera.m_WideScreenOn || !CHud::m_Wants_To_Draw_Hud)
+#ifdef MENU_MAP
+ && !CMenuManager::bMenuMapActive
+#endif
+ )
return;
switch (mode)
@@ -1224,6 +1339,9 @@ void CRadar::Shutdown()
SpraySprite.Delete();
TonySprite.Delete();
WeaponSprite.Delete();
+#ifdef MENU_MAP
+ WaypointSprite.Delete();
+#endif
RemoveRadarSections();
}
@@ -1419,12 +1537,12 @@ CRadar::ToggleTargetMarker(float x, float y)
{
if (TargetMarkerId == -1) {
int nextBlip;
- for (nextBlip = 0; nextBlip < NUMRADARBLIPS; nextBlip++) {
+ for (nextBlip = NUMRADARBLIPS-1; nextBlip >= 0; nextBlip--) {
if (!ms_RadarTrace[nextBlip].m_bInUse)
break;
}
#ifdef FIX_BUGS
- if (nextBlip == NUMRADARBLIPS)
+ if (nextBlip == 0)
return;
#endif
ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD;
@@ -1439,7 +1557,7 @@ CRadar::ToggleTargetMarker(float x, float y)
ms_RadarTrace[nextBlip].m_nEntityHandle = 0;
ms_RadarTrace[nextBlip].m_wScale = 5;
ms_RadarTrace[nextBlip].m_eBlipDisplay = BLIP_DISPLAY_BLIP_ONLY;
- ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_NONE;
+ ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_WAYPOINT;
TargetMarkerId = CRadar::GetNewUniqueBlipIndex(nextBlip);
} else {
ClearBlip(TargetMarkerId);
diff --git a/src/core/Radar.h b/src/core/Radar.h
index 5b38d350..ae87d0fa 100644
--- a/src/core/Radar.h
+++ b/src/core/Radar.h
@@ -47,6 +47,9 @@ enum eRadarSprite
RADAR_SPRITE_SPRAY,
RADAR_SPRITE_TONY,
RADAR_SPRITE_WEAPON,
+#ifdef MENU_MAP
+ RADAR_SPRITE_WAYPOINT,
+#endif
RADAR_SPRITE_COUNT
};
@@ -144,6 +147,7 @@ public:
static float cachedCos;
static float cachedSin;
#ifdef MENU_MAP
+ static CSprite2d WaypointSprite;
static int TargetMarkerId;
static CVector TargetMarkerPos;
diff --git a/src/core/References.cpp b/src/core/References.cpp
index 6b0c868c..b7782099 100644
--- a/src/core/References.cpp
+++ b/src/core/References.cpp
@@ -39,9 +39,7 @@ CEntity::RegisterReference(CEntity **pent)
ref->pentity = pent;
ref->next = m_pFirstReference;
m_pFirstReference = ref;
- return;
}
- return;
}
// Clear all references to this entity
diff --git a/src/core/Timer.cpp b/src/core/Timer.cpp
index ed5580fd..e4f5b01e 100644
--- a/src/core/Timer.cpp
+++ b/src/core/Timer.cpp
@@ -16,6 +16,10 @@ float CTimer::ms_fTimeStep;
float CTimer::ms_fTimeStepNonClipped;
bool CTimer::m_UserPause;
bool CTimer::m_CodePause;
+#ifdef FIX_BUGS
+uint32 CTimer::m_LogicalFrameCounter;
+uint32 CTimer::m_LogicalFramesPassed;
+#endif
uint32 _nCyclesPerMS = 1;
@@ -33,10 +37,6 @@ RsTimerType suspendPcTimer;
uint32 suspendDepth;
-#ifdef FIX_BUGS
-double frameTime;
-#endif
-
void CTimer::Initialise(void)
{
debug("Initialising CTimer...\n");
@@ -49,6 +49,10 @@ void CTimer::Initialise(void)
m_snTimeInMillisecondsNonClipped = 0;
m_snPreviousTimeInMilliseconds = 0;
m_snTimeInMilliseconds = 1;
+#ifdef FIX_BUGS
+ m_LogicalFrameCounter = 0;
+ m_LogicalFramesPassed = 0;
+#endif
#ifdef _WIN32
LARGE_INTEGER perfFreq;
@@ -79,7 +83,96 @@ void CTimer::Shutdown(void)
{
;
}
+#ifdef FIX_BUGS
+void CTimer::Update(void)
+{
+ static double frameTimeLogical = 0.0;
+ static double frameTimeFraction = 0.0;
+ static double frameTimeFractionScaled = 0.0;
+ double frameTime;
+ double dblUpdInMs;
+ m_snPreviousTimeInMilliseconds = m_snTimeInMilliseconds;
+
+#ifdef _WIN32
+ if ( (double)_nCyclesPerMS != 0.0 )
+ {
+ LARGE_INTEGER pc;
+ QueryPerformanceCounter(&pc);
+
+ int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart); // & 0x7FFFFFFF; pointless
+
+ _oldPerfCounter = pc;
+
+ // bugfix from VC
+ double updInCyclesScaled = GetIsPaused() ? updInCycles : updInCycles * ms_fTimeScale;
+
+ frameTime = updInCyclesScaled / (double)_nCyclesPerMS;
+
+ dblUpdInMs = (double)updInCycles / (double)_nCyclesPerMS;
+ }
+ else
+#endif
+ {
+ RsTimerType timer = RsTimer();
+
+ RsTimerType updInMs = timer - oldPcTimer;
+
+ // bugfix from VC
+ frameTime = GetIsPaused() ? (double)updInMs : (double)updInMs * ms_fTimeScale;
+
+ oldPcTimer = timer;
+
+ dblUpdInMs = (double)updInMs;
+ }
+
+ // count frames as if we're running at 30 fps
+ m_LogicalFramesPassed = 0;
+ frameTimeLogical += dblUpdInMs;
+ while(frameTimeLogical >= 1000.0 / 30.0) {
+ frameTimeLogical -= 1000.0 / 30.0;
+ m_LogicalFramesPassed++;
+ }
+ m_LogicalFrameCounter += m_LogicalFramesPassed;
+
+ frameTimeFraction += dblUpdInMs;
+ frameTimeFractionScaled += frameTime;
+
+ m_snTimeInMillisecondsPauseMode += uint32(frameTimeFraction);
+
+ if ( GetIsPaused() )
+ ms_fTimeStep = 0.0f;
+ else
+ {
+ m_snTimeInMilliseconds += uint32(frameTimeFractionScaled);
+ m_snTimeInMillisecondsNonClipped += uint32(frameTimeFractionScaled);
+ ms_fTimeStep = frameTime / 1000.0f * 50.0f;
+ }
+ frameTimeFraction -= uint32(frameTimeFraction);
+ frameTimeFractionScaled -= uint32(frameTimeFractionScaled);
+
+ if ( ms_fTimeStep < 0.01f && !GetIsPaused() )
+ ms_fTimeStep = 0.01f;
+
+ ms_fTimeStepNonClipped = ms_fTimeStep;
+
+ if ( !CRecordDataForGame::IsPlayingBack() )
+ {
+ ms_fTimeStep = Min(3.0f, ms_fTimeStep);
+
+ if ( (m_snTimeInMilliseconds - m_snPreviousTimeInMilliseconds) > 60 )
+ m_snTimeInMilliseconds = m_snPreviousTimeInMilliseconds + 60;
+ }
+
+ if ( CRecordDataForChase::IsRecording() )
+ {
+ ms_fTimeStep = 1.0f;
+ m_snTimeInMilliseconds = m_snPreviousTimeInMilliseconds + 16;
+ }
+
+ m_FrameCounter++;
+}
+#else
void CTimer::Update(void)
{
m_snPreviousTimeInMilliseconds = m_snTimeInMilliseconds;
@@ -93,15 +186,10 @@ void CTimer::Update(void)
int32 updInCycles = (pc.LowPart - _oldPerfCounter.LowPart); // & 0x7FFFFFFF; pointless
_oldPerfCounter = pc;
-
- float updInCyclesScaled = updInCycles * ms_fTimeScale;
-
- // We need that real frame time to fix transparent menu bug.
-#ifndef FIX_BUGS
- double
-#endif
- frameTime = updInCyclesScaled / (double)_nCyclesPerMS;
+ float updInCyclesScaled = updInCycles * ms_fTimeScale;
+
+ double frameTime = updInCyclesScaled / (double)_nCyclesPerMS;
m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + frameTime;
if ( GetIsPaused() )
@@ -120,12 +208,8 @@ void CTimer::Update(void)
RsTimerType updInMs = timer - oldPcTimer;
- // We need that real frame time to fix transparent menu bug.
-#ifndef FIX_BUGS
- double
-#endif
- frameTime = (double)updInMs * ms_fTimeScale;
-
+ double frameTime = (double)updInMs * ms_fTimeScale;
+
oldPcTimer = timer;
m_snTimeInMillisecondsPauseMode = m_snTimeInMillisecondsPauseMode + frameTime;
@@ -161,6 +245,7 @@ void CTimer::Update(void)
m_FrameCounter++;
}
+#endif
void CTimer::Suspend(void)
{
diff --git a/src/core/Timer.h b/src/core/Timer.h
index 393242dd..819bd30c 100644
--- a/src/core/Timer.h
+++ b/src/core/Timer.h
@@ -11,6 +11,10 @@ class CTimer
static float ms_fTimeScale;
static float ms_fTimeStep;
static float ms_fTimeStepNonClipped;
+#ifdef FIX_BUGS
+ static uint32 m_LogicalFrameCounter;
+ static uint32 m_LogicalFramesPassed;
+#endif
public:
static bool m_UserPause;
static bool m_CodePause;
@@ -61,9 +65,7 @@ public:
#ifdef FIX_BUGS
static float GetDefaultTimeStep(void) { return 50.0f / 30.0f; }
static float GetTimeStepFix(void) { return GetTimeStep() / GetDefaultTimeStep(); }
+ static uint32 GetLogicalFrameCounter(void) { return m_LogicalFrameCounter; }
+ static uint32 GetLogicalFramesPassed(void) { return m_LogicalFramesPassed; }
#endif
};
-
-#ifdef FIX_BUGS
-extern double frameTime;
-#endif
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 0874b680..1c34a633 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -64,7 +64,7 @@ CWorld::Initialise()
void
CWorld::Add(CEntity *ent)
{
- if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, true);
+ if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, TRUE);
if(ent->bIsBIGBuilding)
ms_bigBuildingsList[ent->m_level].InsertItem(ent);
@@ -79,7 +79,7 @@ CWorld::Add(CEntity *ent)
void
CWorld::Remove(CEntity *ent)
{
- if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, false);
+ if(ent->IsVehicle() || ent->IsPed()) DMAudio.SetEntityStatus(((CPhysical *)ent)->m_audioEntityId, FALSE);
if(ent->bIsBIGBuilding)
ms_bigBuildingsList[ent->m_level].RemoveItem(ent);
@@ -358,7 +358,7 @@ CWorld::ProcessLineOfSightSectorList(CPtrList &list, const CColLine &line, CColP
} else
colmodel = nil;
} else if(e->bUsesCollision)
- colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel();
+ colmodel = CModelInfo::GetColModel(e->GetModelIndex());
if(colmodel && CCollision::ProcessLineOfSight(line, e->GetMatrix(), *colmodel, point, mindist,
ignoreSeeThrough))
@@ -444,7 +444,7 @@ CWorld::ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CCol
if(e->m_scanCode != GetCurrentScanCode() && e->bUsesCollision) {
e->m_scanCode = GetCurrentScanCode();
- colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel();
+ colmodel = CModelInfo::GetColModel(e->GetModelIndex());
if(CCollision::ProcessVerticalLine(line, e->GetMatrix(), *colmodel, point, mindist,
ignoreSeeThrough, poly))
entity = e;
@@ -645,7 +645,7 @@ CWorld::GetIsLineOfSightSectorListClear(CPtrList &list, const CColLine &line, bo
if(e != pIgnoreEntity && !(ignoreSomeObjects && CameraToIgnoreThisObject(e))) {
- colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel();
+ colmodel = CModelInfo::GetColModel(e->GetModelIndex());
if(CCollision::TestLineOfSight(line, e->GetMatrix(), *colmodel, ignoreSeeThrough))
return false;
@@ -955,7 +955,7 @@ CWorld::TestSphereAgainstSectorList(CPtrList &list, CVector spherePos, float rad
float distance = diff.Magnitude();
if(e->GetBoundRadius() + radius > distance) {
- CColModel *eCol = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel();
+ CColModel *eCol = CModelInfo::GetColModel(e->GetModelIndex());
int collidedSpheres =
CCollision::ProcessColModels(sphereMat, OurColModel, e->GetMatrix(), *eCol,
gaTempSphereColPoints, nil, nil);
@@ -1445,7 +1445,7 @@ CWorld::CallOffChaseForAreaSectorListVehicles(CPtrList &list, float x1, float y1
CColModel *pColModel = pVehicle->GetColModel();
bool bInsideSphere = false;
for(int32 i = 0; i < pColModel->numSpheres; i++) {
- CVector pos = pVehicle->m_matrix * pColModel->spheres[i].center;
+ CVector pos = pVehicle->GetMatrix() * pColModel->spheres[i].center;
float fRadius = pColModel->spheres[i].radius;
if(pos.x + fRadius > x1 && pos.x - fRadius < x2 && pos.y + fRadius > y1 &&
pos.y - fRadius < y2)
@@ -1763,7 +1763,7 @@ CWorld::RepositionOneObject(CEntity *pEntity)
position.z = FindGroundZFor3DCoord(position.x, position.y,
position.z + OBJECT_REPOSITION_OFFSET_Z, nil) -
fBoundingBoxMinZ;
- pEntity->m_matrix.UpdateRW();
+ pEntity->GetMatrix().UpdateRW();
pEntity->UpdateRwFrame();
} else if(modelId == MI_BUOY) {
float fWaterLevel = 0.0f;
@@ -2123,7 +2123,7 @@ CWorld::TriggerExplosionSectorList(CPtrList &list, const CVector &position, floa
PEDPIECE_TORSO, direction);
if(pPed->m_nPedState != PED_DIE)
pPed->SetFall(2000,
- (AnimationId)(direction + ANIM_KO_SKID_FRONT), 0);
+ (AnimationId)(direction + ANIM_STD_HIGHIMPACT_FRONT), 0);
if(pCreator && pCreator->IsPed()) {
eEventType eventType = EVENT_SHOOT_PED;
if(pPed->m_nPedType == PEDTYPE_COP) eventType = EVENT_SHOOT_COP;
diff --git a/src/core/ZoneCull.cpp b/src/core/ZoneCull.cpp
index b039a8c4..b6ae72b0 100644
--- a/src/core/ZoneCull.cpp
+++ b/src/core/ZoneCull.cpp
@@ -438,9 +438,9 @@ CCullZones::AddCullZone(CVector const &position,
v = CVector(1061.7f, -613.0f, 19.0f);
if((v-CVector(1029.48f, -495.757f, 21.98f)).Magnitude() < 1.0f)
v = CVector(1061.4f, -506.0f, 18.5f);
- cull->position.x = clamp(v.x, minx, maxx);
- cull->position.y = clamp(v.y, miny, maxy);
- cull->position.z = clamp(v.z, minz, maxz);
+ cull->position.x = Clamp(v.x, minx, maxx);
+ cull->position.y = Clamp(v.y, miny, maxy);
+ cull->position.z = Clamp(v.z, minz, maxz);
cull->minx = minx;
cull->maxx = maxx;
cull->miny = miny;
@@ -1000,11 +1000,11 @@ CCullZone::FindTestPoints()
// indices of center
int x = ElementsX * (position.x-minx)/(maxx-minx);
- x = clamp(x, 0, ElementsX-1);
+ x = Clamp(x, 0, ElementsX-1);
int y = ElementsY * (position.y-miny)/(maxy-miny);
- y = clamp(y, 0, ElementsY-1);
+ y = Clamp(y, 0, ElementsY-1);
int z = ElementsZ * (position.z-minz)/(maxz-minz);
- z = clamp(z, 0, ElementsZ-1);
+ z = Clamp(z, 0, ElementsZ-1);
// Mark which test points inside the zone are not occupied by buildings.
// To do this, mark the start point as free and do a food fill.
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp
index cdae85e1..82fbc047 100644
--- a/src/core/Zones.cpp
+++ b/src/core/Zones.cpp
@@ -8,6 +8,15 @@
#include "Text.h"
#include "World.h"
#include "Timer.h"
+#include "SaveBuf.h"
+
+#ifdef COMPATIBLE_SAVES
+#define ZONEARRAY_SAVE_SIZE 0xAF0
+#define MAPZONEARRAY_SAVE_SIZE 0x578
+#else
+#define ZONEARRAY_SAVE_SIZE sizeof(ZoneArray)
+#define MAPZONEARRAY_SAVE_SIZE sizeof(MapZoneArray)
+#endif
eLevelName CTheZones::m_CurrLevel;
CZone *CTheZones::m_pPlayersZone;
@@ -632,6 +641,28 @@ CTheZones::InitialiseAudioZoneArray(void)
}
}
+#ifdef COMPATIBLE_SAVES
+static inline void
+SaveOneZone(CZone &zone, uint8 *&buffer)
+{
+ memcpy(buffer, zone.name, sizeof(zone.name));
+ SkipSaveBuf(buffer, sizeof(zone.name));
+ WriteSaveBuf(buffer, zone.minx);
+ WriteSaveBuf(buffer, zone.miny);
+ WriteSaveBuf(buffer, zone.minz);
+ WriteSaveBuf(buffer, zone.maxx);
+ WriteSaveBuf(buffer, zone.maxy);
+ WriteSaveBuf(buffer, zone.maxz);
+ WriteSaveBuf(buffer, zone.type);
+ WriteSaveBuf(buffer, zone.level);
+ WriteSaveBuf(buffer, zone.zoneinfoDay);
+ WriteSaveBuf(buffer, zone.zoneinfoNight);
+ WriteSaveBuf(buffer, (int32)CTheZones::GetIndexForZonePointer(zone.child));
+ WriteSaveBuf(buffer, (int32)CTheZones::GetIndexForZonePointer(zone.parent));
+ WriteSaveBuf(buffer, (int32)CTheZones::GetIndexForZonePointer(zone.next));
+}
+#endif
+
void
CTheZones::SaveAllZones(uint8 *buffer, uint32 *size)
{
@@ -642,9 +673,9 @@ CTheZones::SaveAllZones(uint8 *buffer, uint32 *size)
+ sizeof(int32) // GetIndexForZonePointer
+ sizeof(m_CurrLevel) + sizeof(FindIndex)
+ sizeof(int16) // padding
- + sizeof(ZoneArray) + sizeof(ZoneInfoArray)
+ + ZONEARRAY_SAVE_SIZE + sizeof(ZoneInfoArray)
+ sizeof(TotalNumberOfZones) + sizeof(TotalNumberOfZoneInfos)
- + sizeof(MapZoneArray) + sizeof(AudioZoneArray)
+ + MAPZONEARRAY_SAVE_SIZE + sizeof(AudioZoneArray)
+ sizeof(TotalNumberOfMapZones) + sizeof(NumberOfAudioZones);
WriteSaveHeader(buffer, 'Z', 'N', 'S', '\0', *size - SAVE_HEADER_SIZE);
@@ -655,10 +686,14 @@ CTheZones::SaveAllZones(uint8 *buffer, uint32 *size)
WriteSaveBuf(buffer, (int16)0); // padding
for(i = 0; i < ARRAY_SIZE(ZoneArray); i++){
+#ifdef COMPATIBLE_SAVES
+ SaveOneZone(ZoneArray[i], buffer);
+#else
CZone *zone = WriteSaveBuf(buffer, ZoneArray[i]);
zone->child = (CZone*)GetIndexForZonePointer(ZoneArray[i].child);
zone->parent = (CZone*)GetIndexForZonePointer(ZoneArray[i].parent);
zone->next = (CZone*)GetIndexForZonePointer(ZoneArray[i].next);
+#endif
}
for(i = 0; i < ARRAY_SIZE(ZoneInfoArray); i++)
@@ -668,7 +703,9 @@ CTheZones::SaveAllZones(uint8 *buffer, uint32 *size)
WriteSaveBuf(buffer, TotalNumberOfZoneInfos);
for(i = 0; i < ARRAY_SIZE(MapZoneArray); i++) {
+#ifndef COMPATIBLE_SAVES
CZone* zone = WriteSaveBuf(buffer, MapZoneArray[i]);
+#endif
/*
The call of GetIndexForZonePointer is wrong, as it is
@@ -678,9 +715,13 @@ CTheZones::SaveAllZones(uint8 *buffer, uint32 *size)
assert(MapZoneArray[i].child == nil);
assert(MapZoneArray[i].parent == nil);
assert(MapZoneArray[i].next == nil);
+#ifndef COMPATIBLE_SAVES
zone->child = (CZone*)GetIndexForZonePointer(MapZoneArray[i].child);
zone->parent = (CZone*)GetIndexForZonePointer(MapZoneArray[i].parent);
zone->next = (CZone*)GetIndexForZonePointer(MapZoneArray[i].next);
+#else
+ SaveOneZone(MapZoneArray[i], buffer);
+#endif
}
for(i = 0; i < ARRAY_SIZE(AudioZoneArray); i++)
@@ -692,35 +733,69 @@ CTheZones::SaveAllZones(uint8 *buffer, uint32 *size)
VALIDATESAVEBUF(*size)
}
+#ifdef COMPATIBLE_SAVES
+static inline void
+LoadOneZone(CZone &zone, uint8 *&buffer)
+{
+ memcpy(zone.name, buffer, sizeof(zone.name));
+ SkipSaveBuf(buffer, sizeof(zone.name));
+ ReadSaveBuf(&zone.minx, buffer);
+ ReadSaveBuf(&zone.miny, buffer);
+ ReadSaveBuf(&zone.minz, buffer);
+ ReadSaveBuf(&zone.maxx, buffer);
+ ReadSaveBuf(&zone.maxy, buffer);
+ ReadSaveBuf(&zone.maxz, buffer);
+ ReadSaveBuf(&zone.type, buffer);
+ ReadSaveBuf(&zone.level, buffer);
+ ReadSaveBuf(&zone.zoneinfoDay, buffer);
+ ReadSaveBuf(&zone.zoneinfoNight, buffer);
+ int32 tmp;
+ ReadSaveBuf(&tmp, buffer);
+ zone.child = CTheZones::GetPointerForZoneIndex(tmp);
+ ReadSaveBuf(&tmp, buffer);
+ zone.parent = CTheZones::GetPointerForZoneIndex(tmp);
+ ReadSaveBuf(&tmp, buffer);
+ zone.next = CTheZones::GetPointerForZoneIndex(tmp);
+}
+#endif
+
void
CTheZones::LoadAllZones(uint8 *buffer, uint32 size)
{
INITSAVEBUF
- int i;
+ int32 i;
CheckSaveHeader(buffer, 'Z', 'N', 'S', '\0', size - SAVE_HEADER_SIZE);
- m_pPlayersZone = GetPointerForZoneIndex(ReadSaveBuf(buffer));
- m_CurrLevel = ReadSaveBuf(buffer);
- FindIndex = ReadSaveBuf(buffer);
- ReadSaveBuf(buffer);
+ ReadSaveBuf(&i, buffer);
+ m_pPlayersZone = GetPointerForZoneIndex(i);
+ ReadSaveBuf(&m_CurrLevel, buffer);
+ ReadSaveBuf(&FindIndex, buffer);
+ SkipSaveBuf(buffer, 2);
for(i = 0; i < ARRAY_SIZE(ZoneArray); i++){
- ZoneArray[i] = ReadSaveBuf(buffer);
+#ifdef COMPATIBLE_SAVES
+ LoadOneZone(ZoneArray[i], buffer);
+#else
+ ReadSaveBuf(&ZoneArray[i], buffer);
ZoneArray[i].child = GetPointerForZoneIndex((uintptr)ZoneArray[i].child);
ZoneArray[i].parent = GetPointerForZoneIndex((uintptr)ZoneArray[i].parent);
ZoneArray[i].next = GetPointerForZoneIndex((uintptr)ZoneArray[i].next);
+#endif
}
for(i = 0; i < ARRAY_SIZE(ZoneInfoArray); i++)
- ZoneInfoArray[i] = ReadSaveBuf(buffer);
+ ReadSaveBuf(&ZoneInfoArray[i], buffer);
- TotalNumberOfZones = ReadSaveBuf