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 -re3 logo +re3 logo 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(buffer); - TotalNumberOfZoneInfos = ReadSaveBuf(buffer); + ReadSaveBuf(&TotalNumberOfZones, buffer); + ReadSaveBuf(&TotalNumberOfZoneInfos, buffer); for(i = 0; i < ARRAY_SIZE(MapZoneArray); i++){ - MapZoneArray[i] = ReadSaveBuf(buffer); +#ifdef COMPATIBLE_SAVES + LoadOneZone(MapZoneArray[i], buffer); +#else + ReadSaveBuf(&MapZoneArray[i], buffer); /* The call of GetPointerForZoneIndex is wrong, as it is @@ -730,16 +805,17 @@ CTheZones::LoadAllZones(uint8 *buffer, uint32 size) MapZoneArray[i].child = GetPointerForZoneIndex((uintptr)MapZoneArray[i].child); MapZoneArray[i].parent = GetPointerForZoneIndex((uintptr)MapZoneArray[i].parent); MapZoneArray[i].next = GetPointerForZoneIndex((uintptr)MapZoneArray[i].next); +#endif assert(MapZoneArray[i].child == nil); assert(MapZoneArray[i].parent == nil); assert(MapZoneArray[i].next == nil); } for(i = 0; i < ARRAY_SIZE(AudioZoneArray); i++) - AudioZoneArray[i] = ReadSaveBuf(buffer); + ReadSaveBuf(&AudioZoneArray[i], buffer); - TotalNumberOfMapZones = ReadSaveBuf(buffer); - NumberOfAudioZones = ReadSaveBuf(buffer); + ReadSaveBuf(&TotalNumberOfMapZones, buffer); + ReadSaveBuf(&NumberOfAudioZones, buffer); VALIDATESAVEBUF(size) } diff --git a/src/core/common.h b/src/core/common.h index 7b5f3ae1..132f8b1c 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -11,6 +11,10 @@ #define __STDC_LIMIT_MACROS // so we get UINT32_MAX etc #endif +#ifdef __SWITCH__ +#include +#endif + #include #include #include @@ -246,6 +250,12 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #include "maths.h" #include "Vector.h" +#ifdef GTA_PS2 +#include "VuVector.h" +#define CVUVECTOR CVuVector +#else +#define CVUVECTOR CVector +#endif #include "Vector2D.h" #include "Matrix.h" #include "Rect.h" @@ -314,7 +324,9 @@ extern int strcasecmp(const char *str1, const char *str2); extern wchar *AllocUnicode(const char*src); -#define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) +#define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) + +#define Clamp2(v, center, radius) ((v) > (center) ? Min(v, center + radius) : Max(v, center - radius)) inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) @@ -388,7 +400,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function #if !defined(MASTER) || defined(__WIIU__) #define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILENAME__, __LINE__, __FUNCTION__), 0) ) #else -#define assert(_Expression) +#define assert(_Expression) (_Expression) #endif #define ASSERT assert @@ -421,174 +433,3 @@ template struct check_size { #define STR(x) STRINGIFY(x) #define CONCAT_(x,y) x##y #define CONCAT(x,y) CONCAT_(x,y) - -#ifdef DEBUGMENU -// Tweaking stuff for debugmenu -#define TWEAKPATH ___tw___TWEAKPATH -#define SETTWEAKPATH(path) static const char *___tw___TWEAKPATH = path; -#define TWEAKFUNC(v) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); -#define TWEAKFUNCN(v, name) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); -#define TWEAKBOOL(v) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); -#define TWEAKBOOLN(v, name) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); -#define TWEAKINT32(v, lower, upper, step) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKINT32N(v, lower, upper, step, name) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKUINT32(v, lower, upper, step) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKUINT32N(v, lower, upper, step, name) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKINT16(v, lower, upper, step) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKINT16N(v, lower, upper, step, name) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKUINT16(v, lower, upper, step) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKUINT16N(v, lower, upper, step, name) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKINT8(v, lower, upper, step) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKINT8N(v, lower, upper, step, name) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKUINT8(v, lower, upper, step) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKUINT8N(v, lower, upper, step, name) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKFLOAT(v, lower, upper, step) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); -#define TWEAKFLOATN(v, lower, upper, step, name) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); -#define TWEAKSWITCH(v, lower, upper, str, f) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, str, f, TWEAKPATH); -#define TWEAKSWITCHN(v, lower, upper, str, f, name) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, str, f, TWEAKPATH); - -// interface -class CTweakVar -{ -public: - virtual void AddDBG(const char *path) = 0; -}; - -class CTweakVars -{ -public: - static void Add(CTweakVar *var); - static void AddDBG(const char *path); -}; - -class CTweakFunc : public CTweakVar -{ - const char *m_pPath, *m_pVarName; - void (*m_pFunc)(); -public: - CTweakFunc(void (*pFunc)(), const char *strName, const char *strPath) : - m_pPath(strPath), m_pVarName(strName), m_pFunc(pFunc) - { - CTweakVars::Add(this); - } - - void AddDBG(const char *path); -}; - -class CTweakBool : public CTweakVar -{ - const char *m_pPath, *m_pVarName; - bool *m_pBoolVar; -public: - CTweakBool(bool *pBool, const char *strName, const char *strPath) : - m_pPath(strPath), m_pVarName(strName), m_pBoolVar(pBool) - { - CTweakVars::Add(this); - } - - void AddDBG(const char *path); -}; - -class CTweakSwitch : public CTweakVar -{ - const char *m_pPath, *m_pVarName; - void *m_pIntVar; - int32 m_nMin, m_nMax; - const char **m_aStr; - void (*m_pFunc)(); -public: - CTweakSwitch(void *pInt, const char *strName, int32 nMin, int32 nMax, const char **aStr, - void (*pFunc)(), const char *strPath) - : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), m_nMin(nMin), m_nMax(nMax), - m_aStr(aStr) - { - CTweakVars::Add(this); - } - - void AddDBG(const char *path); -}; - -#define _TWEEKCLASS(name, type) \ - class name : public CTweakVar \ - { \ - public: \ - const char *m_pPath, *m_pVarName; \ - type *m_pIntVar, m_nLoawerBound, m_nUpperBound, m_nStep; \ - \ - name(type *pInt, const char *strName, type nLower, type nUpper, type nStep, \ - const char *strPath) \ - : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), \ - m_nLoawerBound(nLower), m_nUpperBound(nUpper), m_nStep(nStep) \ - \ - { \ - CTweakVars::Add(this); \ - } \ - \ - void AddDBG(const char *path); \ - }; - -_TWEEKCLASS(CTweakInt8, int8); -_TWEEKCLASS(CTweakUInt8, uint8); -_TWEEKCLASS(CTweakInt16, int16); -_TWEEKCLASS(CTweakUInt16, uint16); -_TWEEKCLASS(CTweakInt32, int32); -_TWEEKCLASS(CTweakUInt32, uint32); -_TWEEKCLASS(CTweakFloat, float); - -#undef _TWEEKCLASS -#endif - -#ifdef VALIDATE_SAVE_SIZE -extern int32 _saveBufCount; -#define INITSAVEBUF _saveBufCount = 0; -#define VALIDATESAVEBUF(b) assert(_saveBufCount == b); -#else -#define INITSAVEBUF -#define VALIDATESAVEBUF(b) -#endif - -inline void SkipSaveBuf(uint8 *&buf, int32 skip) -{ - buf += skip; -#ifdef VALIDATE_SAVE_SIZE - _saveBufCount += skip; -#endif -} - -template -inline const T ReadSaveBuf(uint8 *&buf) -{ - T value; - memcpy(&value, buf, sizeof(T)); - SkipSaveBuf(buf, sizeof(T)); - return value; -} - -template -inline T *WriteSaveBuf(uint8 *&buf, const T &value) -{ - memcpy(buf, &value, sizeof(T)); - T* result = (T*)buf; - SkipSaveBuf(buf, sizeof(T)); - return result; -} - - -#define SAVE_HEADER_SIZE (4*sizeof(char)+sizeof(uint32)) - -#define WriteSaveHeader(buf,a,b,c,d,size) \ - WriteSaveBuf(buf, a);\ - WriteSaveBuf(buf, b);\ - WriteSaveBuf(buf, c);\ - WriteSaveBuf(buf, d);\ - WriteSaveBuf(buf, size); - -#define CheckSaveHeader(buf,a,b,c,d,size)\ - assert(ReadSaveBuf(buf) == a);\ - assert(ReadSaveBuf(buf) == b);\ - assert(ReadSaveBuf(buf) == c);\ - assert(ReadSaveBuf(buf) == d);\ - assert(ReadSaveBuf(buf) == size); - - -void cprintf(char*, ...); diff --git a/src/core/config.h b/src/core/config.h index 527c3984..ca031320 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -1,7 +1,9 @@ #pragma once -// disables (most) stuff that wasn't in original gta3.exe - check section at the bottom of this file -//#define VANILLA_DEFINES +// disables (most) stuff that wasn't in original gta3.exe +#ifdef __MWERKS__ +#define VANILLA_DEFINES +#endif enum Config { NUMPLAYERS = 1, // 4 on PS2 @@ -11,7 +13,7 @@ enum Config { MAX_CDCHANNELS = 5, MODELINFOSIZE = 5500, // 3150 on PS2 -#if defined __MWERKS__ || defined VANILLA_DEFINES +#ifdef VANILLA_DEFINES TXDSTORESIZE = 850, #else TXDSTORESIZE = 1024, // for Xbox map @@ -128,10 +130,8 @@ enum Config { NUM_PED_COMMENTS_SLOTS = 20, NUM_SOUNDS_SAMPLES_BANKS = 2, - NUM_SOUNDS_SAMPLES_SLOTS = 27, NUM_AUDIOENTITIES = 200, - NUM_AUDIO_REFLECTIONS = 5, NUM_SCRIPT_MAX_ENTITIES = 40, NUM_GARAGE_STORED_CARS = 6, @@ -147,8 +147,39 @@ enum Config { //#define GTA_PS2 //#define GTA_XBOX -// This enables things from the PS2 version on PC -#define GTA_PS2_STUFF +// Version defines +#define GTA3_PS2_140 300 +#define GTA3_PS2_160 301 +#define GTA3_PC_10 310 +#define GTA3_PC_11 311 +#define GTA3_PC_STEAM 312 +// TODO? maybe something for xbox or android? + +#define GTA_VERSION GTA3_PC_11 + +// Enable configuration for handheld console ports +#if defined(__SWITCH__) || defined(PSP2) + #define GTA_HANDHELD +#endif + +#if defined GTA_PS2 +# define GTA_PS2_STUFF +# define RANDOMSPLASH +# define USE_CUSTOM_ALLOCATOR +# define VU_COLLISION +# define ANIM_COMPRESSION +# define PS2_MENU +#elif defined GTA_PC +# define EXTERNAL_3D_SOUND +# define AUDIO_REFLECTIONS +# ifndef GTA_HANDHELD +# define PC_PLAYER_CONTROLS // mouse player/cam mode +# endif +# define GTA_REPLAY +# define GTA_SCENE_EDIT +# define PC_MENU +#elif defined GTA_XBOX +#endif // This is enabled for all released games. // any debug stuff that isn't left in any game is not in FINAL @@ -167,45 +198,48 @@ enum Config { #define FINAL #endif -// Version defines -#define GTA3_PS2_140 300 -#define GTA3_PS2_160 301 -#define GTA3_PC_10 310 -#define GTA3_PC_11 311 -#define GTA3_PC_STEAM 312 -// TODO? maybe something for xbox or android? +// these are placed here to work with VANILLA_DEFINES for compatibility +#define NO_CDCHECK // skip audio CD check +#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch) -#define GTA_VERSION GTA3_PC_11 +#ifdef VANILLA_DEFINES +#if !defined(_WIN32) || defined(__LP64__) || defined(_WIN64) +#error Vanilla can only be built for win-x86 +#endif + +#define FINAL +#define MASTER +//#define USE_MY_DOCUMENTS +#define THIS_IS_STUPID +#define PC_PARTICLE +#define DONT_FIX_REPLAY_BUGS +#define USE_TXD_CDIMAGE // generate and load textures from txd.img +//#define USE_TEXTURE_POOL // not possible because R* used custom RW33 +#else +// This enables things from the PS2 version on PC +#define GTA_PS2_STUFF // quality of life fixes that should also be in FINAL #define NASTY_GAME // nasty game for all languages -#define NO_CDCHECK // those infamous texts #define DRAW_GAME_VERSION_TEXT -#define DRAW_MENU_VERSION_TEXT +#ifdef DRAW_GAME_VERSION_TEXT + // unlike R* development builds, ours has runtime switch on debug menu & .ini, and disabled as default. + // If you disable this then game will fetch version from peds.col, as R* did while in development. + //#define USE_OUR_VERSIONING // enabled from buildfiles by default +#endif +//#define DRAW_MENU_VERSION_TEXT // Memory allocation and compression // #define USE_CUSTOM_ALLOCATOR // use CMemoryHeap for allocation. use with care, not finished yet //#define COMPRESSED_COL_VECTORS // use compressed vectors for collision vertices //#define ANIM_COMPRESSION // only keep most recently used anims uncompressed -#if defined GTA_PS2 -# define GTA_PS2_STUFF -# define RANDOMSPLASH -# define USE_CUSTOM_ALLOCATOR -# define VU_COLLISION -# define ANIM_COMPRESSION -#elif defined GTA_PC -# ifdef GTA_PS2_STUFF -# define USE_PS2_RAND -# define RANDOMSPLASH // use random splash as on PS2 -# define PS2_MATFX -# endif -# define PC_PLAYER_CONTROLS // mouse player/cam mode -# define GTA_REPLAY -# define GTA_SCENE_EDIT -#elif defined GTA_XBOX +#if defined GTA_PC && defined GTA_PS2_STUFF +# define USE_PS2_RAND +# define RANDOMSPLASH // use random splash as on PS2 +# define PS2_MATFX #endif #ifdef VU_COLLISION @@ -219,7 +253,6 @@ enum Config { // not in master builds #define VALIDATE_SAVE_SIZE - #define NO_MOVIES // disable intro videos #define DEBUGMENU #endif @@ -234,16 +267,22 @@ enum Config { #define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds. #define MORE_LANGUAGES // Add more translations to the game -#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible +#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible, and keeps saves compatible between platforms, needs to be enabled on 64bit builds! +#define FIX_INCOMPATIBLE_SAVES // try to fix incompatible saves, requires COMPATIBLE_SAVES #define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS +#define NO_MOVIES // add option to disable intro videos + +#define EXTENDED_OFFSCREEN_DESPAWN_RANGE // Use onscreen despawn range for offscreen peds and vehicles to avoid them despawning in the distance when you look + // away + #if defined(__LP64__) || defined(_WIN64) #define FIX_BUGS_64 // Must have fixes to be able to run 64 bit build #endif #define ASCII_STRCMP // use faster ascii str comparisons -#if !defined _WIN32 || defined __MWERKS__ || defined __MINGW32__ || defined VANILLA_DEFINES +#if !defined _WIN32 || defined __MINGW32__ #undef ASCII_STRCMP #endif @@ -262,7 +301,11 @@ enum Config { #define USE_TXD_CDIMAGE // generate and load textures from txd.img #define PS2_ALPHA_TEST // emulate ps2 alpha test #define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number -// #define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time +#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time +#ifdef DISABLE_LOADING_SCREEN +// enable the PC splash +#undef RANDOMSPLASH +#endif #define DISABLE_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync #define ANISOTROPIC_FILTERING // set all textures to max anisotropic filtering //#define USE_TEXTURE_POOL @@ -289,8 +332,8 @@ enum Config { #if !defined(RW_GL3) && defined(_WIN32) #define XINPUT #endif -#if !defined(_WIN32) && !defined(__SWITCH__) && !defined(__WIIU__) -#define DONT_TRUST_RECOGNIZED_JOYSTICKS // Then we'll only rely on GLFW gamepad DB, and expect user to enter Controller->Detect joysticks if his joystick isn't on that list. +#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined GTA_HANDHELD) +#define DETECT_JOYSTICK_MENU // Then we'll expect user to enter Controller->Detect joysticks if his joystick isn't detected at the start. #endif #define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m #define KANGAROO_CHEAT @@ -314,7 +357,11 @@ enum Config { # define PS2_MENU //# define PS2_MENU_USEALLPAGEICONS #else -# define MENU_MAP // VC-like menu map. Make sure you have new menu.txd + +# if defined(XINPUT) || defined(GTA_HANDHELD) +# define GAMEPAD_MENU // Add gamepad menu +# endif + # define SCROLLABLE_STATS_PAGE // only draggable by mouse atm //# define TRIANGLE_BACK_BUTTON # define CIRCLE_BACK_BUTTON @@ -323,6 +370,7 @@ enum Config { # define CUSTOM_FRONTEND_OPTIONS # ifdef CUSTOM_FRONTEND_OPTIONS +# define MENU_MAP // VC-like menu map. Won't appear if you don't have our menu.txd # define GRAPHICS_MENU_OPTIONS // otherwise Display settings will be scrollable # define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU # define CUTSCENE_BORDERS_SWITCH @@ -330,6 +378,7 @@ enum Config { # define MULTISAMPLING // adds MSAA option # endif # define INVERT_LOOK_FOR_PAD // add bInvertLook4Pad from VC +# define PED_CAR_DENSITY_SLIDERS # endif #endif @@ -344,6 +393,10 @@ enum Config { // #define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT #define SCRIPT_LOG_FILE_LEVEL 0 // 0 == no log, 1 == overwrite every frame, 2 == full log +#if SCRIPT_LOG_FILE_LEVEL == 0 +#undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT +#endif + #ifndef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT #define USE_BASIC_SCRIPT_DEBUG_OUTPUT #endif @@ -366,12 +419,12 @@ enum Config { #define CAMERA_PICKUP // Peds -#define PED_SKIN // support for skinned geometry on peds +#define PED_SKIN // support for skinned geometry on peds, requires COMPATIBLE_SAVES #define ANIMATE_PED_COL_MODEL // #define VC_PED_PORTS // various ports from VC's CPed, mostly subtle // #define NEW_WALK_AROUND_ALGORITHM // to make walking around vehicles/objects less awkward #define CANCELLABLE_CAR_ENTER -//#define PEDS_REPORT_CRIMES_ON_PHONE +//#define PEDS_REPORT_CRIMES_ON_PHONE // requires COMPATIBLE_SAVES // Camera //#define PS2_CAM_TRANSITION // old way of transitioning between cam modes @@ -379,11 +432,17 @@ enum Config { #define FREE_CAM // Rotating cam // Audio +#define EXTERNAL_3D_SOUND // use external engine to simulate 3d audio spatialization. OpenAL would not work without it (because it works in a 3d space + // originally and making it work in 2d only requires more resource). Will not work on PS2 +#define AUDIO_REFLECTIONS // Enable audio reflections. Disabled on mobile, didn't exist yet on PS2. #define RADIO_SCROLL_TO_PREV_STATION #define AUDIO_CACHE +#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally) //#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds) #define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder #define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files +#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused +#define MULTITHREADED_AUDIO // for streams. requires C++11 or later #ifdef AUDIO_OPUS #define AUDIO_OAL_USE_OPUS // enable support of opus files @@ -408,11 +467,27 @@ enum Config { #ifdef SQUEEZE_PERFORMANCE #undef PS2_ALPHA_TEST #undef NO_ISLAND_LOADING + #undef PS2_AUDIO_CHANNELS + #undef EXTENDED_OFFSCREEN_DESPAWN_RANGE #define PC_PARTICLE #define VC_PED_PORTS // To not process collisions always. But should be tested if that's really beneficial #define VC_RAIN_NERF // Reduces number of rain particles #endif +// if these defines are enabled saves are not vanilla compatible without COMPATIBLE_SAVES +#ifndef COMPATIBLE_SAVES +#undef PED_SKIN +#undef PEDS_REPORT_CRIMES_ON_PHONE +#endif + +#ifdef GTA_HANDHELD + #define IGNORE_MOUSE_KEYBOARD // ignore mouse & keyboard input +#endif + +#ifdef __SWITCH__ + #define USE_UNNAMED_SEM // named semaphores are unsupported on the switch +#endif + #ifdef __WIIU__ #define KEEP_FRONTEND_LOADED #define BUFFER_FILES @@ -420,92 +495,16 @@ enum Config { #ifdef BUFFER_FILES #define IO_BUFFER_SIZE (128*1024) -#define INI_BUFFER_SIZE (8*1024) // 8k should be enough for the ini file #endif -// ------- -#if defined __MWERKS__ || defined VANILLA_DEFINES -#define FINAL -#undef CHATTYSPLASH -#undef TIMEBARS -//#define USE_MY_DOCUMENTS +#endif // VANILLA_DEFINES -#define MASTER -#undef VALIDATE_SAVE_SIZE -#undef NO_MOVIES -#undef DEBUGMENU - -//#undef NASTY_GAME -//#undef NO_CDCHECK - -#undef DRAW_GAME_VERSION_TEXT -#undef DRAW_MENU_VERSION_TEXT - -#undef GTA_PS2_STUFF -#undef USE_PS2_RAND -#undef RANDOMSPLASH -#undef PS2_MATFX - -#undef FIX_BUGS -#define THIS_IS_STUPID -#undef MORE_LANGUAGES -#undef COMPATIBLE_SAVES -#undef LOAD_INI_SETTINGS - -#undef ASPECT_RATIO_SCALE -#undef PROPER_SCALING -//#undef DEFAULT_NATIVE_RESOLUTION -#undef PS2_ALPHA_TEST -#undef IMPROVED_VIDEOMODE -#undef DISABLE_LOADING_SCREEN -#undef DISABLE_VSYNC_ON_TEXTURE_CONVERSION -#undef ANISOTROPIC_FILTERING -//#define USE_TEXTURE_POOL // not possible because R* used custom RW33 - -#undef FIX_SPRITES - -#define PC_PARTICLE - -#undef XINPUT -#undef DETECT_PAD_INPUT_SWITCH -#undef KANGAROO_CHEAT -#undef ALLCARSHELI_CHEAT -#undef ALT_DODO_CHEAT -#undef REGISTER_START_BUTTON -#undef BIND_VEHICLE_FIREWEAPON -#undef BUTTON_ICONS - -#undef HUD_ENHANCEMENTS -#undef TRIANGULAR_BLIPS -#undef FIX_RADAR -#undef RADIO_OFF_TEXT - -#undef MENU_MAP -#undef SCROLLABLE_STATS_PAGE -#undef CUSTOM_FRONTEND_OPTIONS - -#undef GRAPHICS_MENU_OPTIONS -#undef NO_ISLAND_LOADING -#undef CUTSCENE_BORDERS_SWITCH -#undef MULTISAMPLING -#undef INVERT_LOOK_FOR_PAD - -#undef USE_DEBUG_SCRIPT_LOADER -#undef USE_MEASUREMENTS_IN_METERS -#undef USE_PRECISE_MEASUREMENT_CONVERTION -#undef MISSION_REPLAY -#undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT -#undef USE_BASIC_SCRIPT_DEBUG_OUTPUT - -#define DONT_FIX_REPLAY_BUGS - -#undef EXPLODING_AIRTRAIN -#undef CAMERA_PICKUP -#undef PED_SKIN -#undef ANIMATE_PED_COL_MODEL -#undef CANCELLABLE_CAR_ENTER -#undef IMPROVED_CAMERA -#undef FREE_CAM -#undef RADIO_SCROLL_TO_PREV_STATION -#undef BIG_IMG +#if defined(AUDIO_OAL) && !defined(EXTERNAL_3D_SOUND) +#error AUDIO_OAL cannot work without EXTERNAL_3D_SOUND #endif +#if defined(GTA_PS2) && defined(EXTERNAL_3D_SOUND) +#error EXTERNAL_3D_SOUND cannot work on PS2 +#endif +#if defined(AUDIO_REFLECTIONS) && GTA_VERSION < GTA3_PC_10 +#error AUDIO_REFLECTIONS cannot work with versions below GTA3_PC_10 +#endif \ No newline at end of file diff --git a/src/core/main.cpp b/src/core/main.cpp index af0d556a..2a0a77ca 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -1,8 +1,10 @@ #include "common.h" +#include #include "rpmatfx.h" #include "rphanim.h" #include "rpskin.h" #include "rtbmp.h" +#include "rtpng.h" #ifdef ANISOTROPIC_FILTERING #include "rpanisot.h" #endif @@ -70,6 +72,9 @@ #include "custompipes.h" #include "screendroplets.h" #include "MemoryHeap.h" +#ifdef USE_OUR_VERSIONING +#include "GitSHA1.h" +#endif GlobalScene Scene; @@ -86,6 +91,12 @@ bool gbModelViewer; #ifdef TIMEBARS bool gbShowTimebars; #endif +#ifdef DRAW_GAME_VERSION_TEXT +bool gbDrawVersionText; // Our addition, we think it was always enabled on !MASTER builds +#endif +#ifdef NO_MOVIES +bool gbNoMovies; +#endif volatile int32 frameCount; @@ -354,7 +365,11 @@ RwGrabScreen(RwCamera *camera, RwChar *filename) strcpy(temp, CFileMgr::GetRootDirName()); strcat(temp, filename); +#ifndef LIBRW if (RtBMPImageWrite(pImage, &temp[0]) == nil) +#else + if (RtPNGImageWrite(pImage, &temp[0]) == nil) +#endif result = false; RwImageDestroy(pImage); return result; @@ -373,6 +388,7 @@ DoRWStuffEndOfFrame(void) RsCameraShowRaster(Scene.camera); #ifndef MASTER char s[48]; +#ifdef THIS_IS_STUPID if (CPad::GetPad(1)->GetLeftShockJustDown()) { // try using both controllers for this thing... crazy bastards if (CPad::GetPad(0)->GetRightStickY() > 0) { @@ -384,6 +400,12 @@ DoRWStuffEndOfFrame(void) RwGrabScreen(Scene.camera, s); } } +#else + if (CPad::GetPad(1)->GetLeftShockJustDown() || CPad::GetPad(0)->GetFJustDown(11)) { + sprintf(s, "screen_%011lld.png", time(nil)); + RwGrabScreen(Scene.camera, s); + } +#endif #endif // !MASTER } @@ -1075,7 +1097,7 @@ DisplayGameDebugText() static bool bDisplayRate = false; #ifndef FINAL { - SETTWEAKPATH("GameDebugText"); + SETTWEAKPATH("Debug"); TWEAKBOOL(bDisplayPosn); TWEAKBOOL(bDisplayRate); } @@ -1089,13 +1111,56 @@ DisplayGameDebugText() #ifdef DRAW_GAME_VERSION_TEXT wchar ver[200]; - + + if(gbDrawVersionText) // This realtime switch is our thing + { + +#ifdef USE_OUR_VERSIONING + char verA[200]; + sprintf(verA, +#if defined _WIN32 + "Win " +#elif defined __linux__ + "Linux " +#elif defined __APPLE__ + "Mac OS X " +#elif defined __FreeBSD__ + "FreeBSD " +#else + "Posix-compliant " +#endif +#if defined __LP64__ || defined _WIN64 + "64-bit " +#else + "32-bit " +#endif +#if defined RW_D3D9 + "D3D9 " +#elif defined RWLIBS + "D3D8 " +#elif defined RW_GL3 + "OpenGL " +#endif +#if defined AUDIO_OAL + "OAL " +#elif defined AUDIO_MSS + "MSS " +#endif +#if defined _DEBUG || defined DEBUG + "DEBUG " +#endif + "%.8s", + g_GIT_SHA1); + AsciiToUnicode(verA, ver); + CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.7f)); +#else AsciiToUnicode(version_name, ver); + CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f)); +#endif CFont::SetPropOn(); CFont::SetBackgroundOff(); CFont::SetFontStyle(FONT_BANK); - CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f)); CFont::SetCentreOff(); CFont::SetRightJustifyOff(); CFont::SetWrapx(SCREEN_WIDTH); @@ -1107,14 +1172,18 @@ DisplayGameDebugText() #else CFont::PrintString(10.0f, 10.0f, ver); #endif + } #endif // #ifdef DRAW_GAME_VERSION_TEXT FrameSamples++; #ifdef FIX_BUGS - FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds + // this is inaccurate with over 1000 fps + static uint32 PreviousTimeInMillisecondsPauseMode = 0; + FramesPerSecondCounter += (CTimer::GetTimeInMillisecondsPauseMode() - PreviousTimeInMillisecondsPauseMode) / 1000.0f; // convert to seconds + PreviousTimeInMillisecondsPauseMode = CTimer::GetTimeInMillisecondsPauseMode(); FramesPerSecond = FrameSamples / FramesPerSecondCounter; #else - FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f); + FramesPerSecondCounter += 1000.0f / CTimer::GetTimeStepNonClippedInMilliseconds(); FramesPerSecond = FramesPerSecondCounter / FrameSamples; #endif @@ -1250,6 +1319,7 @@ if(gbRenderEverythingBarRoads) void RenderScene_new(void) { + PUSH_RENDERGROUP("RenderScene_new"); CClouds::Render(); DoRWRenderHorizon(); @@ -1257,6 +1327,7 @@ RenderScene_new(void) DefinedState(); // CMattRenderer::ResetRenderStates // moved CRenderer::RenderBoats to before transparent water + POP_RENDERGROUP(); } // TODO @@ -1264,11 +1335,14 @@ bool FredIsInFirstPersonCam(void) { return false; } void RenderEffects_new(void) { + PUSH_RENDERGROUP("RenderEffects_new"); +/* // stupid to do this before the whole world is drawn! CShadows::RenderStaticShadows(); // CRenderer::GenerateEnvironmentMap CShadows::RenderStoredShadows(); CSkidmarks::Render(); CRubbish::Render(); +*/ // these aren't really effects DefinedState(); @@ -1291,6 +1365,13 @@ if(gbRenderFadingInEntities) CRenderer::RenderFadingInEntities(); // actual effects here + + // from above + CShadows::RenderStaticShadows(); + CShadows::RenderStoredShadows(); + CSkidmarks::Render(); + CRubbish::Render(); + CGlass::Render(); // CMattRenderer::ResetRenderStates DefinedState(); @@ -1306,6 +1387,7 @@ if(gbRenderFadingInEntities) CPointLights::RenderFogEffect(); CMovingThings::Render(); CRenderer::RenderFirstPersonVehicle(); + POP_RENDERGROUP(); } #endif @@ -1318,6 +1400,7 @@ RenderScene(void) return; } #endif + PUSH_RENDERGROUP("RenderScene"); CClouds::Render(); DoRWRenderHorizon(); CRenderer::RenderRoads(); @@ -1332,11 +1415,13 @@ RenderScene(void) CRenderer::RenderVehiclesButNotBoats(); #endif CWeather::RenderRainStreaks(); + POP_RENDERGROUP(); } void RenderDebugShit(void) { + PUSH_RENDERGROUP("RenderDebugShit"); CTheScripts::RenderTheScriptDebugLines(); #ifndef FINAL if(gbShowCollisionLines) @@ -1345,6 +1430,7 @@ RenderDebugShit(void) CDebug::DrawLines(); DefinedState(); #endif + POP_RENDERGROUP(); } void @@ -1356,6 +1442,7 @@ RenderEffects(void) return; } #endif + PUSH_RENDERGROUP("RenderEffects"); CGlass::Render(); CWaterCannons::Render(); CSpecialFX::Render(); @@ -1371,11 +1458,13 @@ RenderEffects(void) CPointLights::RenderFogEffect(); CMovingThings::Render(); CRenderer::RenderFirstPersonVehicle(); + POP_RENDERGROUP(); } void Render2dStuff(void) { + PUSH_RENDERGROUP("Render2dStuff"); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); @@ -1441,6 +1530,7 @@ Render2dStuff(void) #ifdef DEBUGMENU DebugMenuRender(); #endif + POP_RENDERGROUP(); } void @@ -1448,21 +1538,25 @@ RenderMenus(void) { if (FrontEndMenuManager.m_bMenuActive) { + PUSH_RENDERGROUP("RenderMenus"); PUSH_MEMID(MEMID_FRONTEND); FrontEndMenuManager.DrawFrontEnd(); POP_MEMID(); + POP_RENDERGROUP(); } } void Render2dStuffAfterFade(void) { + PUSH_RENDERGROUP("Render2dStuffAfterFade"); #ifndef MASTER DisplayGameDebugText(); #endif CHud::DrawAfterFade(); CFont::DrawFonts(); + POP_RENDERGROUP(); } void diff --git a/src/core/main.h b/src/core/main.h index 9f181101..803afb14 100644 --- a/src/core/main.h +++ b/src/core/main.h @@ -1,5 +1,16 @@ #pragma once +#ifndef FINAL +// defined in RwHelpder.cpp +void PushRendergroup(const char *name); +void PopRendergroup(void); +#define PUSH_RENDERGROUP(str) PushRendergroup(str) +#define POP_RENDERGROUP() PopRendergroup() +#else +#define PUSH_RENDERGROUP(str) +#define POP_RENDERGROUP() +#endif + struct GlobalScene { RpWorld *world; @@ -55,3 +66,11 @@ void SaveINIControllerSettings(); extern bool gbNewRenderer; bool FredIsInFirstPersonCam(void); #endif + +#ifdef DRAW_GAME_VERSION_TEXT +extern bool gbDrawVersionText; +#endif + +#ifdef NO_MOVIES +extern bool gbNoMovies; +#endif diff --git a/src/core/re3.cpp b/src/core/re3.cpp index bd62e31b..542da8c4 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -1,6 +1,14 @@ #include #define WITHWINDOWS #include "common.h" +#if defined DETECT_JOYSTICK_MENU && defined XINPUT +#include +#if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1) +#pragma comment( lib, "Xinput9_1_0.lib" ) +#else +#pragma comment( lib, "Xinput.lib" ) +#endif +#endif #include "Renderer.h" #include "Credits.h" #include "Camera.h" @@ -33,10 +41,11 @@ #include "Camera.h" #include "MBlur.h" #include "ControllerConfig.h" +#include "CarCtrl.h" +#include "Population.h" +#include "IniFile.h" -#if 1 #include "crossplatform.h" -#endif #ifndef _WIN32 #include "assert.h" @@ -81,16 +90,49 @@ mysrand(unsigned int seed) #ifdef CUSTOM_FRONTEND_OPTIONS #include "frontendoption.h" +#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(); + } +} + +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(); + } +} +#endif + void CustomFrontendOptionsPopulate(void) { - // Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h + // Most of custom options are done statically in MenuScreensCustom.cpp, we add them here only if they're dependent to extra files - // These work only if we have neo folder, so they're dynamically added + // These work only if we have neo folder + int fd; #ifdef EXTENDED_PIPELINES const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" }; const char *off_on[] = { "FEM_OFF", "FEM_ON" }; - int fd = CFileMgr::OpenFile("neo/neo.txd","r"); + fd = CFileMgr::OpenFile("neo/neo.txd","r"); if (fd) { #ifdef GRAPHICS_MENU_OPTIONS FrontendOptionSetCursor(MENUPAGE_GRAPHICS_SETTINGS, -3, false); @@ -109,20 +151,66 @@ CustomFrontendOptionsPopulate(void) } #endif + // Add outsourced language translations, if files are found +#ifdef MORE_LANGUAGES + int fd2; + FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, 5, false); + if (fd = CFileMgr::OpenFile("text/polish.gxt","r")) { + if (fd2 = CFileMgr::OpenFile("models/fonts_p.txd","r")) { + FrontendOptionAddDynamic("FEL_POL", nil, nil, LangPolSelect, nil, nil); + CFileMgr::CloseFile(fd2); + } + CFileMgr::CloseFile(fd); + } + + if (fd = CFileMgr::OpenFile("text/russian.gxt","r")) { + if (fd2 = CFileMgr::OpenFile("models/fonts_r.txd","r")) { + FrontendOptionAddDynamic("FEL_RUS", nil, nil, LangRusSelect, nil, nil); + CFileMgr::CloseFile(fd2); + } + CFileMgr::CloseFile(fd); + } + + if (fd = CFileMgr::OpenFile("text/japanese.gxt","r")) { + if (fd2 = CFileMgr::OpenFile("models/fonts_j.txd","r")) { + FrontendOptionAddDynamic("FEL_JAP", nil, nil, LangJapSelect, nil, nil); + CFileMgr::CloseFile(fd2); + } + CFileMgr::CloseFile(fd); + } +#endif + } #endif #ifdef LOAD_INI_SETTINGS -#include "ini_parser.hpp" +#define MINI_CASE_SENSITIVE +#include "ini.h" + +#ifdef WIIU_CHANNEL +mINI::INIFile ini("/vol/external01/wiiu/apps/re3/re3.ini"); +#else +mINI::INIFile ini("re3.ini"); +#endif +mINI::INIStructure cfg; -linb::ini cfg; bool ReadIniIfExists(const char *cat, const char *key, uint32 *out) { - std::string strval = cfg.get(cat, key, "\xBA"); - const char *value = strval.c_str(); - char *endPtr; - if (value && value[0] != '\xBA') { - *out = strtoul(value, &endPtr, 0); + mINI::INIMap section = cfg.get(cat); + if (section.has(key)) { + char *endPtr; + *out = strtoul(section.get(key).c_str(), &endPtr, 0); + return true; + } + return false; +} + +bool ReadIniIfExists(const char *cat, const char *key, uint8 *out) +{ + mINI::INIMap section = cfg.get(cat); + if (section.has(key)) { + char *endPtr; + *out = strtoul(section.get(key).c_str(), &endPtr, 0); return true; } return false; @@ -130,11 +218,10 @@ bool ReadIniIfExists(const char *cat, const char *key, uint32 *out) bool ReadIniIfExists(const char *cat, const char *key, bool *out) { - std::string strval = cfg.get(cat, key, "\xBA"); - const char *value = strval.c_str(); - char *endPtr; - if (value && value[0] != '\xBA') { - *out = strtoul(value, &endPtr, 0); + mINI::INIMap section = cfg.get(cat); + if (section.has(key)) { + char *endPtr; + *out = strtoul(section.get(key).c_str(), &endPtr, 0); return true; } return false; @@ -142,11 +229,10 @@ bool ReadIniIfExists(const char *cat, const char *key, bool *out) bool ReadIniIfExists(const char *cat, const char *key, int32 *out) { - std::string strval = cfg.get(cat, key, "\xBA"); - const char *value = strval.c_str(); - char *endPtr; - if (value && value[0] != '\xBA') { - *out = strtol(value, &endPtr, 0); + mINI::INIMap section = cfg.get(cat); + if (section.has(key)) { + char *endPtr; + *out = strtol(section.get(key).c_str(), &endPtr, 0); return true; } return false; @@ -154,11 +240,10 @@ bool ReadIniIfExists(const char *cat, const char *key, int32 *out) bool ReadIniIfExists(const char *cat, const char *key, int8 *out) { - std::string strval = cfg.get(cat, key, "\xBA"); - const char *value = strval.c_str(); - char *endPtr; - if (value && value[0] != '\xBA') { - *out = strtol(value, &endPtr, 0); + mINI::INIMap section = cfg.get(cat); + if (section.has(key)) { + char *endPtr; + *out = strtol(section.get(key).c_str(), &endPtr, 0); return true; } return false; @@ -166,10 +251,10 @@ bool ReadIniIfExists(const char *cat, const char *key, int8 *out) bool ReadIniIfExists(const char *cat, const char *key, float *out) { - std::string strval = cfg.get(cat, key, "\xBA"); - const char *value = strval.c_str(); - if (value && value[0] != '\xBA') { - *out = atof(value); + mINI::INIMap section = cfg.get(cat); + if (section.has(key)) { + char *endPtr; + *out = strtof(section.get(key).c_str(), &endPtr); return true; } return false; @@ -177,10 +262,10 @@ bool ReadIniIfExists(const char *cat, const char *key, float *out) bool ReadIniIfExists(const char *cat, const char *key, char *out, int size) { - std::string strval = cfg.get(cat, key, "\xBA"); - const char *value = strval.c_str(); - if (value && value[0] != '\xBA') { - strncpy(out, value, size); + mINI::INIMap section = cfg.get(cat); + if (section.has(key)) { + strncpy(out, section.get(key).c_str(), size - 1); + out[size - 1] = '\0'; return true; } return false; @@ -188,42 +273,42 @@ bool ReadIniIfExists(const char *cat, const char *key, char *out, int size) void StoreIni(const char *cat, const char *key, uint32 val) { - char temp[10]; + char temp[11]; sprintf(temp, "%u", val); - cfg.set(cat, key, temp); + cfg[cat][key] = temp; } void StoreIni(const char *cat, const char *key, uint8 val) { - char temp[10]; - sprintf(temp, "%u", (uint32)val); - cfg.set(cat, key, temp); + char temp[11]; + sprintf(temp, "%u", val); + cfg[cat][key] = temp; } void StoreIni(const char *cat, const char *key, int32 val) { - char temp[10]; + char temp[11]; sprintf(temp, "%d", val); - cfg.set(cat, key, temp); + cfg[cat][key] = temp; } void StoreIni(const char *cat, const char *key, int8 val) { - char temp[10]; - sprintf(temp, "%d", (int32)val); - cfg.set(cat, key, temp); + char temp[11]; + sprintf(temp, "%d", val); + cfg[cat][key] = temp; } void StoreIni(const char *cat, const char *key, float val) { - char temp[10]; + char temp[50]; sprintf(temp, "%f", val); - cfg.set(cat, key, temp); + cfg[cat][key] = temp; } void StoreIni(const char *cat, const char *key, char *val, int size) { - cfg.set(cat, key, val); + cfg[cat][key] = val; } const char *iniControllerActions[] = { "PED_FIREWEAPON", "PED_CYCLE_WEAPON_RIGHT", "PED_CYCLE_WEAPON_LEFT", "GO_FORWARD", "GO_BACK", "GO_LEFT", "GO_RIGHT", "PED_SNIPER_ZOOM_IN", @@ -248,12 +333,44 @@ const char *iniKeyboardButtons[] = {"ESC","F1","F2","F3","F4","F5","F6","F7","F8 void LoadINIControllerSettings() { -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU +#ifdef XINPUT + int storedJoy1 = -1; + if (ReadIniIfExists("Controller", "JoystickName", &storedJoy1)) { + CPad::XInputJoy1 = -1; + CPad::XInputJoy2 = -1; + XINPUT_STATE xstate; + memset(&xstate, 0, sizeof(XINPUT_STATE)); + + // Firstly confirm & set joy 1 + if (XInputGetState(storedJoy1, &xstate) == ERROR_SUCCESS) { + CPad::XInputJoy1 = storedJoy1; + } + + for (int i = 0; i <= 3; i++) { + if (XInputGetState(i, &xstate) == ERROR_SUCCESS) { + if (CPad::XInputJoy1 == -1) + CPad::XInputJoy1 = i; + else if (CPad::XInputJoy2 == -1 && i != CPad::XInputJoy1) + CPad::XInputJoy2 = i; + } + } + + // There is no plug event on XInput, so let's leave XInputJoy1/2 as 0/1 respectively, and hotplug will be possible. + if (CPad::XInputJoy1 == -1) { + CPad::XInputJoy1 = 0; + CPad::XInputJoy2 = 1; + } else if (CPad::XInputJoy2 == -1) { + CPad::XInputJoy2 = (CPad::XInputJoy1 + 1) % 4; + } + } +#else ReadIniIfExists("Controller", "JoystickName", gSelectedJoystickName, 128); +#endif #endif // force to default GTA behaviour (never overwrite bindings on joy change/initialization) if user init'ed/set bindings before we introduced that if (!ReadIniIfExists("Controller", "PadButtonsInited", &ControlsManager.ms_padButtonsInited)) { - ControlsManager.ms_padButtonsInited = cfg.category_size("Bindings") != 0 ? 16 : 0; + ControlsManager.ms_padButtonsInited = cfg.get("Bindings").size() != 0 ? 16 : 0; } for (int32 i = 0; i < MAX_CONTROLLERACTIONS; i++) { @@ -347,24 +464,21 @@ void SaveINIControllerSettings() StoreIni("Bindings", iniControllerActions[i], value, 128); } -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU +#ifdef XINPUT + StoreIni("Controller", "JoystickName", CPad::XInputJoy1); +#else StoreIni("Controller", "JoystickName", gSelectedJoystickName, 128); #endif - StoreIni("Controller", "PadButtonsInited", ControlsManager.ms_padButtonsInited); -#ifdef WIIU_CHANNEL - cfg.write_file("/vol/external01/wiiu/apps/re3/re3.ini"); -#else - cfg.write_file("re3.ini"); #endif + StoreIni("Controller", "PadButtonsInited", ControlsManager.ms_padButtonsInited); + + ini.write(cfg); } bool LoadINISettings() { -#ifdef WIIU_CHANNEL - if (!cfg.load_file("/vol/external01/wiiu/apps/re3/re3.ini")) -#else - if (!cfg.load_file("re3.ini")) -#endif + if (!ini.read(cfg)) return false; #ifdef IMPROVED_VIDEOMODE @@ -381,11 +495,14 @@ bool LoadINISettings() ReadIniIfExists("Controller", "HorizantalMouseSens", &TheCamera.m_fMouseAccelHorzntl); ReadIniIfExists("Controller", "InvertMouseVertically", &MousePointerStateHelper.bInvertVertically); ReadIniIfExists("Controller", "DisableMouseSteering", &CVehicle::m_bDisableMouseSteering); + ReadIniIfExists("Controller", "Vibration", &FrontEndMenuManager.m_PrefsUseVibration); ReadIniIfExists("Audio", "SfxVolume", &FrontEndMenuManager.m_PrefsSfxVolume); ReadIniIfExists("Audio", "MusicVolume", &FrontEndMenuManager.m_PrefsMusicVolume); ReadIniIfExists("Audio", "Radio", &FrontEndMenuManager.m_PrefsRadioStation); +#ifdef EXTERNAL_3D_SOUND ReadIniIfExists("Audio", "SpeakerType", &FrontEndMenuManager.m_PrefsSpeakers); ReadIniIfExists("Audio", "Provider", &FrontEndMenuManager.m_nPrefsAudio3DProviderIndex); +#endif ReadIniIfExists("Audio", "DynamicAcoustics", &FrontEndMenuManager.m_PrefsDMA); ReadIniIfExists("Display", "Brightness", &FrontEndMenuManager.m_PrefsBrightness); ReadIniIfExists("Display", "DrawDistance", &FrontEndMenuManager.m_PrefsLOD); @@ -421,9 +538,15 @@ bool LoadINISettings() #ifdef FIX_SPRITES ReadIniIfExists("Draw", "FixSprites", &CDraw::ms_bFixSprites); #endif +#ifdef DRAW_GAME_VERSION_TEXT + ReadIniIfExists("General", "DrawVersionText", &gbDrawVersionText); +#endif +#ifdef NO_MOVIES + ReadIniIfExists("General", "NoMovies", &gbNoMovies); +#endif #ifdef CUSTOM_FRONTEND_OPTIONS - bool migrate = cfg.category_size("FrontendOptions") != 0; + bool migrate = cfg.get("FrontendOptions").size() != 0; for (int i = 0; i < MENUPAGES; i++) { for (int j = 0; j < NUM_MENUROWS; j++) { CMenuScreenCustom::CMenuEntry &option = aScreens[i].m_aEntries[j]; @@ -432,22 +555,29 @@ bool LoadINISettings() // CFO check if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) { - // CFO only supports saving uint8 right now - // Migrate from old .ini to new .ini - if (migrate && ReadIniIfExists("FrontendOptions", option.m_CFO->save, option.m_CFO->value)) - cfg.remove("FrontendOptions", option.m_CFO->save); + // Old values can only be int8, new ones can contain float if it is slider + if (migrate && ReadIniIfExists("FrontendOptions", option.m_CFO->save, (int8*)option.m_CFO->value)) + cfg["FrontendOptions"].remove(option.m_CFO->save); + else if (option.m_Action == MENUACTION_CFO_SLIDER) + ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, (float*)option.m_CFO->value); else - ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, option.m_CFO->value); + ReadIniIfExists(option.m_CFO->saveCat, option.m_CFO->save, (int8*)option.m_CFO->value); if (option.m_Action == MENUACTION_CFO_SELECT) { - option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue = *option.m_CFO->value; + option.m_CFOSelect->lastSavedValue = option.m_CFOSelect->displayedValue = *(int8*)option.m_CFO->value; } } } } #endif + // Fetched in above block, but needs evaluation +#ifdef PED_CAR_DENSITY_SLIDERS + CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * CIniFile::PedNumberMultiplier; + CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * CIniFile::CarNumberMultiplier; +#endif + return true; } @@ -467,11 +597,14 @@ void SaveINISettings() StoreIni("Controller", "HorizantalMouseSens", TheCamera.m_fMouseAccelHorzntl); StoreIni("Controller", "InvertMouseVertically", MousePointerStateHelper.bInvertVertically); StoreIni("Controller", "DisableMouseSteering", CVehicle::m_bDisableMouseSteering); + StoreIni("Controller", "Vibration", FrontEndMenuManager.m_PrefsUseVibration); StoreIni("Audio", "SfxVolume", FrontEndMenuManager.m_PrefsSfxVolume); StoreIni("Audio", "MusicVolume", FrontEndMenuManager.m_PrefsMusicVolume); StoreIni("Audio", "Radio", FrontEndMenuManager.m_PrefsRadioStation); +#ifdef EXTERNAL_3D_SOUND StoreIni("Audio", "SpeakerType", FrontEndMenuManager.m_PrefsSpeakers); StoreIni("Audio", "Provider", FrontEndMenuManager.m_nPrefsAudio3DProviderIndex); +#endif StoreIni("Audio", "DynamicAcoustics", FrontEndMenuManager.m_PrefsDMA); StoreIni("Display", "Brightness", FrontEndMenuManager.m_PrefsBrightness); StoreIni("Display", "DrawDistance", FrontEndMenuManager.m_PrefsLOD); @@ -507,6 +640,12 @@ void SaveINISettings() #ifdef FIX_SPRITES StoreIni("Draw", "FixSprites", CDraw::ms_bFixSprites); #endif +#ifdef DRAW_GAME_VERSION_TEXT + StoreIni("General", "DrawVersionText", gbDrawVersionText); +#endif +#ifdef NO_MOVIES + StoreIni("General", "NoMovies", gbNoMovies); +#endif #ifdef CUSTOM_FRONTEND_OPTIONS for (int i = 0; i < MENUPAGES; i++) { for (int j = 0; j < NUM_MENUROWS; j++) { @@ -515,18 +654,16 @@ void SaveINISettings() break; if (option.m_Action < MENUACTION_NOTHING && option.m_CFO->save) { - // Beware: CFO only supports saving uint8 right now - StoreIni(option.m_CFO->saveCat, option.m_CFO->save, *option.m_CFO->value); + if (option.m_Action == MENUACTION_CFO_SLIDER) + StoreIni(option.m_CFO->saveCat, option.m_CFO->save, *(float*)option.m_CFO->value); + else + StoreIni(option.m_CFO->saveCat, option.m_CFO->save, *(int8*)option.m_CFO->value); } } } #endif -#ifdef WIIU_CHANNEL - cfg.write_file("/vol/external01/wiiu/apps/re3/re3.ini"); -#else - cfg.write_file("re3.ini"); -#endif + ini.write(cfg); } #endif @@ -633,18 +770,6 @@ SwitchCarCollision(void) FindPlayerVehicle()->bUsesCollision = !FindPlayerVehicle()->bUsesCollision; } -static int engineStatus; -static void -SetEngineStatus(void) -{ - CVehicle *veh = FindPlayerVehicle(); - if(veh == nil) - return; - if(!veh->IsCar()) - return; - ((CAutomobile*)veh)->Damage.SetEngineStatus(engineStatus); -} - static void ToggleComedy(void) { @@ -827,12 +952,22 @@ DebugMenuPopulate(void) DebugMenuAddCmd("Spawn", "Spawn Predator", [](){ SpawnCar(MI_PREDATOR); }); DebugMenuAddVarBool8("Render", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil); + +#ifdef PROPER_SCALING + DebugMenuAddVarBool8("Render", "Proper Scaling", &CDraw::ms_bProperScaling, nil); +#endif +#ifdef FIX_RADAR + DebugMenuAddVarBool8("Render", "Fix Radar", &CDraw::ms_bFixRadar, nil); +#endif +#ifdef FIX_SPRITES + DebugMenuAddVarBool8("Render", "Fix Sprites", &CDraw::ms_bFixSprites, nil); +#endif DebugMenuAddVarBool8("Render", "PS2 Alpha test Emu", &gPS2alphaTest, nil); DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil); DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil); DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil); #ifdef NEW_RENDERER - DebugMenuAddVarBool8("Render", "new renderer", &gbNewRenderer, nil); + DebugMenuAddVarBool8("Render", "New Renderer", &gbNewRenderer, nil); extern bool gbRenderRoads; extern bool gbRenderEverythingBarRoads; //extern bool gbRenderFadingInUnderwaterEntities; @@ -843,16 +978,16 @@ extern bool gbRenderVehicles; extern bool gbRenderWorld0; extern bool gbRenderWorld1; extern bool gbRenderWorld2; - DebugMenuAddVarBool8("Render", "gbRenderRoads", &gbRenderRoads, nil); - DebugMenuAddVarBool8("Render", "gbRenderEverythingBarRoads", &gbRenderEverythingBarRoads, nil); -// DebugMenuAddVarBool8("Render", "gbRenderFadingInUnderwaterEntities", &gbRenderFadingInUnderwaterEntities, nil); - DebugMenuAddVarBool8("Render", "gbRenderFadingInEntities", &gbRenderFadingInEntities, nil); - DebugMenuAddVarBool8("Render", "gbRenderWater", &gbRenderWater, nil); - DebugMenuAddVarBool8("Render", "gbRenderBoats", &gbRenderBoats, nil); - DebugMenuAddVarBool8("Render", "gbRenderVehicles", &gbRenderVehicles, nil); - DebugMenuAddVarBool8("Render", "gbRenderWorld0", &gbRenderWorld0, nil); - DebugMenuAddVarBool8("Render", "gbRenderWorld1", &gbRenderWorld1, nil); - DebugMenuAddVarBool8("Render", "gbRenderWorld2", &gbRenderWorld2, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderRoads", &gbRenderRoads, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderEverythingBarRoads", &gbRenderEverythingBarRoads, nil); +// DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInUnderwaterEntities", &gbRenderFadingInUnderwaterEntities, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInEntities", &gbRenderFadingInEntities, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderWater", &gbRenderWater, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderBoats", &gbRenderBoats, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderVehicles", &gbRenderVehicles, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderWorld0", &gbRenderWorld0, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderWorld1", &gbRenderWorld1, nil); + DebugMenuAddVarBool8("Debug Render", "gbRenderWorld2", &gbRenderWorld2, nil); #endif #ifdef EXTENDED_COLOURFILTER @@ -862,6 +997,11 @@ extern bool gbRenderWorld2; DebugMenuAddVar("Render", "Intensity", &CPostFX::Intensity, nil, 0.05f, 0, 10.0f); DebugMenuAddVarBool8("Render", "Motion Blur", &CPostFX::MotionBlurOn, nil); #endif +#ifdef LIBRW + DebugMenuAddVarBool32("Render", "MatFX env map apply light", &rw::MatFX::envMapApplyLight, nil); + DebugMenuAddVarBool32("Render", "MatFX env map flip U", &rw::MatFX::envMapFlipU, nil); + DebugMenuAddVarBool32("Render", "MatFX env map use matcolor", &rw::MatFX::envMapUseMatColor, nil); +#endif #ifdef EXTENDED_PIPELINES static const char *vehpipenames[] = { "MatFX", "Neo" }; e = DebugMenuAddVar("Render", "Vehicle Pipeline", &CustomPipes::VehiclePipeSwitch, nil, @@ -876,33 +1016,30 @@ extern bool gbRenderWorld2; DebugMenuAddVarBool8("Render", "Neo Road Gloss enable", &CustomPipes::GlossEnable, nil); DebugMenuAddVar("Render", "Mult", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f); #endif - DebugMenuAddVarBool8("Render", "Show Ped Paths", &gbShowPedPaths, nil); - DebugMenuAddVarBool8("Render", "Show Car Paths", &gbShowCarPaths, nil); - DebugMenuAddVarBool8("Render", "Show Car Path Links", &gbShowCarPathsLinks, nil); - DebugMenuAddVarBool8("Render", "Show Ped Road Groups", &gbShowPedRoadGroups, nil); - DebugMenuAddVarBool8("Render", "Show Car Road Groups", &gbShowCarRoadGroups, nil); - DebugMenuAddVarBool8("Render", "Show Collision Lines", &gbShowCollisionLines, nil); - DebugMenuAddVarBool8("Render", "Show Collision Polys", &gbShowCollisionPolys, nil); - DebugMenuAddVarBool8("Render", "Don't render Buildings", &gbDontRenderBuildings, nil); - DebugMenuAddVarBool8("Render", "Don't render Big Buildings", &gbDontRenderBigBuildings, nil); - DebugMenuAddVarBool8("Render", "Don't render Peds", &gbDontRenderPeds, nil); - DebugMenuAddVarBool8("Render", "Don't render Vehicles", &gbDontRenderVehicles, nil); - DebugMenuAddVarBool8("Render", "Don't render Objects", &gbDontRenderObjects, nil); - DebugMenuAddVarBool8("Render", "Don't Render Water", &gbDontRenderWater, nil); - -#ifdef PROPER_SCALING - DebugMenuAddVarBool8("Draw", "Proper Scaling", &CDraw::ms_bProperScaling, nil); -#endif -#ifdef FIX_RADAR - DebugMenuAddVarBool8("Draw", "Fix Radar", &CDraw::ms_bFixRadar, nil); -#endif -#ifdef FIX_SPRITES - DebugMenuAddVarBool8("Draw", "Fix Sprites", &CDraw::ms_bFixSprites, nil); -#endif + DebugMenuAddVarBool8("Debug Render", "Show Ped Paths", &gbShowPedPaths, nil); + DebugMenuAddVarBool8("Debug Render", "Show Car Paths", &gbShowCarPaths, nil); + DebugMenuAddVarBool8("Debug Render", "Show Car Path Links", &gbShowCarPathsLinks, nil); + DebugMenuAddVarBool8("Debug Render", "Show Ped Road Groups", &gbShowPedRoadGroups, nil); + DebugMenuAddVarBool8("Debug Render", "Show Car Road Groups", &gbShowCarRoadGroups, nil); + DebugMenuAddVarBool8("Debug Render", "Show Collision Lines", &gbShowCollisionLines, nil); + DebugMenuAddVarBool8("Debug Render", "Show Collision Polys", &gbShowCollisionPolys, nil); + DebugMenuAddVarBool8("Debug Render", "Don't render Buildings", &gbDontRenderBuildings, nil); + DebugMenuAddVarBool8("Debug Render", "Don't render Big Buildings", &gbDontRenderBigBuildings, nil); + DebugMenuAddVarBool8("Debug Render", "Don't render Peds", &gbDontRenderPeds, nil); + DebugMenuAddVarBool8("Debug Render", "Don't render Vehicles", &gbDontRenderVehicles, nil); + DebugMenuAddVarBool8("Debug Render", "Don't render Objects", &gbDontRenderObjects, nil); + DebugMenuAddVarBool8("Debug Render", "Don't Render Water", &gbDontRenderWater, nil); - +#ifdef DRAW_GAME_VERSION_TEXT + DebugMenuAddVarBool8("Debug", "Version Text", &gbDrawVersionText, nil); +#endif + DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil); +#ifdef TIMEBARS + DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil); +#endif #ifndef FINAL + DebugMenuAddVarBool8("Debug", "Use debug render groups", &bDebugRenderGroups, nil); DebugMenuAddVarBool8("Debug", "Print Memory Usage", &gbPrintMemoryUsage, nil); #ifdef USE_CUSTOM_ALLOCATOR DebugMenuAddCmd("Debug", "Parse Heap", ParseHeap); @@ -915,30 +1052,19 @@ extern bool gbRenderWorld2; #ifdef GTA_SCENE_EDIT DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil); #endif + //DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start); + //DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop); + #ifdef MENU_MAP - DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint); + DebugMenuAddCmd("Game", "Teleport to map waypoint", TeleportToWaypoint); #endif - DebugMenuAddCmd("Debug", "Switch car collision", SwitchCarCollision); - DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil); - DebugMenuAddCmd("Debug", "Set Engine Status", SetEngineStatus); - DebugMenuAddCmd("Debug", "Fix Car", FixCar); - DebugMenuAddCmd("Debug", "Toggle Comedy Controls", ToggleComedy); - DebugMenuAddCmd("Debug", "Place Car on Road", PlaceOnRoad); + DebugMenuAddCmd("Game", "Fix Car", FixCar); + DebugMenuAddCmd("Game", "Place Car on Road", PlaceOnRoad); + DebugMenuAddCmd("Game", "Switch car collision", SwitchCarCollision); + DebugMenuAddCmd("Game", "Toggle Comedy Controls", ToggleComedy); - DebugMenuAddVarBool8("Debug", "Catalina Heli On", &CHeli::CatalinaHeliOn, nil); - DebugMenuAddCmd("Debug", "Catalina Fly By", CHeli::StartCatalinaFlyBy); - DebugMenuAddCmd("Debug", "Catalina Take Off", CHeli::CatalinaTakeOff); - DebugMenuAddCmd("Debug", "Catalina Fly Away", CHeli::MakeCatalinaHeliFlyAway); - DebugMenuAddVarBool8("Debug", "Script Heli On", &CHeli::ScriptHeliOn, nil); + DebugMenuAddVarBool8("Game", "Toggle popping heads on headshot", &CPed::bPopHeadsOnHeadshot, nil); - DebugMenuAddVarBool8("Debug", "Toggle popping heads on headshot", &CPed::bPopHeadsOnHeadshot, nil); - DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start); - DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop); - - DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil); -#ifdef TIMEBARS - DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil); -#endif #ifdef MISSION_SWITCHER DebugMenuEntry *missionEntry; static const char* missions[] = { @@ -958,9 +1084,9 @@ extern bool gbRenderWorld2; "Uzi Money", "Toyminator", "Rigged To Blow", "Bullion Run", "Rumble", "The Exchange" }; - missionEntry = DebugMenuAddVar("Debug", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions); + missionEntry = DebugMenuAddVar("Game", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions); DebugMenuEntrySetWrap(missionEntry, true); - DebugMenuAddCmd("Debug", "Start selected mission ", SwitchToMission); + DebugMenuAddCmd("Game", "Start selected mission ", SwitchToMission); #endif extern bool PrintDebugCode; @@ -972,9 +1098,9 @@ extern bool gbRenderWorld2; DebugMenuAddVarBool8("Cam", "Print Debug Code", &PrintDebugCode, nil); DebugMenuAddVar("Cam", "Cam Mode", &DebugCamMode, nil, 1, 0, CCam::MODE_EDITOR, nil); DebugMenuAddCmd("Cam", "Normal", []() { DebugCamMode = 0; }); - DebugMenuAddCmd("Cam", "Follow Ped With Bind", []() { DebugCamMode = CCam::MODE_FOLLOW_PED_WITH_BIND; }); - DebugMenuAddCmd("Cam", "Reaction", []() { DebugCamMode = CCam::MODE_REACTION; }); - DebugMenuAddCmd("Cam", "Chris", []() { DebugCamMode = CCam::MODE_CHRIS; }); + // DebugMenuAddCmd("Cam", "Follow Ped With Bind", []() { DebugCamMode = CCam::MODE_FOLLOW_PED_WITH_BIND; }); + // DebugMenuAddCmd("Cam", "Reaction", []() { DebugCamMode = CCam::MODE_REACTION; }); + // DebugMenuAddCmd("Cam", "Chris", []() { DebugCamMode = CCam::MODE_CHRIS; }); DebugMenuAddCmd("Cam", "Reset Statics", ResetCamStatics); CTweakVars::AddDBG("Debug"); diff --git a/src/entities/Dummy.cpp b/src/entities/Dummy.cpp index 8a4bfd5f..d5fad3e4 100644 --- a/src/entities/Dummy.cpp +++ b/src/entities/Dummy.cpp @@ -4,8 +4,8 @@ #include "World.h" #include "Dummy.h" -void *CDummy::operator new(size_t sz) { return CPools::GetDummyPool()->New(); } -void CDummy::operator delete(void *p, size_t sz) { CPools::GetDummyPool()->Delete((CDummy*)p); } +void *CDummy::operator new(size_t sz) throw() { return CPools::GetDummyPool()->New(); } +void CDummy::operator delete(void *p, size_t sz) throw() { CPools::GetDummyPool()->Delete((CDummy*)p); } void CDummy::Add(void) diff --git a/src/entities/Dummy.h b/src/entities/Dummy.h index 3717a01c..6c3f12ea 100644 --- a/src/entities/Dummy.h +++ b/src/entities/Dummy.h @@ -12,8 +12,8 @@ public: void Add(void); void Remove(void); - 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(); }; VALIDATE_SIZE(CDummy, 0x68); diff --git a/src/entities/Entity.cpp b/src/entities/Entity.cpp index 4885d631..c38f12c7 100644 --- a/src/entities/Entity.cpp +++ b/src/entities/Entity.cpp @@ -22,6 +22,7 @@ #include "MemoryHeap.h" #include "Bones.h" #include "Debug.h" +#include "SaveBuf.h" int gBuildings; @@ -110,9 +111,9 @@ CEntity::CreateRwObject(void) if(IsBuilding()) gBuildings++; if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); + GetMatrix().AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic *)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); + GetMatrix().AttachRW(RwFrameGetMatrix(RpClumpGetFrame((RpClump *)m_rwObject)), false); mi->AddRef(); } } @@ -123,9 +124,9 @@ CEntity::AttachToRwObject(RwObject *obj) m_rwObject = obj; if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC) - m_matrix.Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject)), false); + GetMatrix().Attach(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic *)m_rwObject)), false); else if(RwObjectGetType(m_rwObject) == rpCLUMP) - m_matrix.Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump*)m_rwObject)), false); + GetMatrix().Attach(RwFrameGetMatrix(RpClumpGetFrame((RpClump *)m_rwObject)), false); CModelInfo::GetModelInfo(m_modelIndex)->AddRef(); } } @@ -136,7 +137,7 @@ CEntity::DetachFromRwObject(void) if(m_rwObject) CModelInfo::GetModelInfo(m_modelIndex)->RemoveRef(); m_rwObject = nil; - m_matrix.Detach(); + GetMatrix().Detach(); } #ifdef PED_SKIN @@ -166,7 +167,7 @@ CEntity::DeleteRwObject(void) { RwFrame *f; - m_matrix.Detach(); + GetMatrix().Detach(); if(m_rwObject){ if(RwObjectGetType(m_rwObject) == rpATOMIC){ f = RpAtomicGetFrame((RpAtomic*)m_rwObject); @@ -191,18 +192,18 @@ CEntity::GetBoundRect(void) { CRect rect; CVector v; - CColModel *col = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(); + CColModel *col = CModelInfo::GetColModel(m_modelIndex); - rect.ContainPoint(m_matrix * col->boundingBox.min); - rect.ContainPoint(m_matrix * col->boundingBox.max); + rect.ContainPoint(GetMatrix() * col->boundingBox.min); + rect.ContainPoint(GetMatrix() * col->boundingBox.max); v = col->boundingBox.min; v.x = col->boundingBox.max.x; - rect.ContainPoint(m_matrix * v); + rect.ContainPoint(GetMatrix() * v); v = col->boundingBox.max; v.x = col->boundingBox.min.x; - rect.ContainPoint(m_matrix * v); + rect.ContainPoint(GetMatrix() * v); return rect; } @@ -210,21 +211,27 @@ CEntity::GetBoundRect(void) CVector CEntity::GetBoundCentre(void) { - CVector v; - GetBoundCentre(v); - return v; + return GetMatrix() * CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center; } +#ifdef GTA_PS2 +void +CEntity::GetBoundCentre(CVuVector &out) +{ + TransformPoint(out, GetMatrix(), CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center); +} +#else void CEntity::GetBoundCentre(CVector &out) { - out = m_matrix * CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingSphere.center; + out = GetMatrix() * CModelInfo::GetColModel(m_modelIndex)->boundingSphere.center; } +#endif float CEntity::GetBoundRadius(void) { - return CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingSphere.radius; + return CModelInfo::GetColModel(m_modelIndex)->boundingSphere.radius; } void @@ -379,10 +386,13 @@ CEntity::Render(void) } } + bool -CEntity::GetIsTouching(CVector const ¢er, float radius) +CEntity::GetIsTouching(CVUVECTOR const ¢er, float radius) { - return sq(GetBoundRadius()+radius) > (GetBoundCentre()-center).MagnitudeSqr(); + CVUVECTOR boundCenter; + GetBoundCentre(boundCenter); + return sq(GetBoundRadius()+radius) > (boundCenter-center).MagnitudeSqr(); } bool @@ -400,8 +410,7 @@ CEntity::IsVisibleComplex(void) bool CEntity::GetIsOnScreen(void) { - return TheCamera.IsSphereVisible(GetBoundCentre(), GetBoundRadius(), - &TheCamera.GetCameraMatrix()); + return TheCamera.IsSphereVisible(GetBoundCentre(), GetBoundRadius()); } bool @@ -417,7 +426,7 @@ CEntity::GetIsOnScreenComplex(void) return true; CRect rect = GetBoundRect(); - CColModel *colmodel = CModelInfo::GetModelInfo(m_modelIndex)->GetColModel(); + CColModel *colmodel = CModelInfo::GetColModel(m_modelIndex); float z = GetPosition().z; float minz = z + colmodel->boundingBox.min.z; float maxz = z + colmodel->boundingBox.max.z; @@ -572,7 +581,7 @@ CEntity::Remove(void) float CEntity::GetDistanceFromCentreOfMassToBaseOfModel(void) { - return -CModelInfo::GetModelInfo(m_modelIndex)->GetColModel()->boundingBox.min.z; + return -CModelInfo::GetColModel(m_modelIndex)->boundingBox.min.z; } void @@ -723,7 +732,7 @@ CEntity::SaveEntityFlags(uint8*& buf) if (bZoneCulled) tmp |= BIT(30); if (bZoneCulled2) tmp |= BIT(31); - WriteSaveBuf(buf, tmp); + WriteSaveBuf(buf, tmp); tmp = 0; @@ -739,13 +748,14 @@ CEntity::SaveEntityFlags(uint8*& buf) if (bDistanceFade) tmp |= BIT(8); if (m_flagE2) tmp |= BIT(9); - WriteSaveBuf(buf, tmp); + WriteSaveBuf(buf, tmp); } void CEntity::LoadEntityFlags(uint8*& buf) { - uint32 tmp = ReadSaveBuf(buf); + uint32 tmp; + ReadSaveBuf(&tmp, buf); m_type = (tmp & ((BIT(3) - 1))); m_status = ((tmp >> 3) & (BIT(5) - 1)); @@ -776,7 +786,7 @@ CEntity::LoadEntityFlags(uint8*& buf) bZoneCulled = !!(tmp & BIT(30)); bZoneCulled2 = !!(tmp & BIT(31)); - tmp = ReadSaveBuf(buf); + ReadSaveBuf(&tmp, buf); bRemoveFromWorld = !!(tmp & BIT(0)); bHasHitWall = !!(tmp & BIT(1)); diff --git a/src/entities/Entity.h b/src/entities/Entity.h index 7ee638d7..6174b61d 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -141,11 +141,11 @@ public: return (RpClump*)m_rwObject; } - void GetBoundCentre(CVector &out); + void GetBoundCentre(CVUVECTOR &out); CVector GetBoundCentre(void); float GetBoundRadius(void); float GetDistanceFromCentreOfMassToBaseOfModel(void); - bool GetIsTouching(CVector const ¢er, float r); + bool GetIsTouching(CVUVECTOR const ¢er, float r); bool GetIsOnScreen(void); bool GetIsOnScreenComplex(void); bool IsVisible(void); diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index ed01297e..32a3df3b 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -218,7 +218,7 @@ CPhysical::GetBoundRect(void) { CVector center; float radius; - GetBoundCentre(center); + center = GetBoundCentre(); radius = GetBoundRadius(); return CRect(center.x-radius, center.y-radius, center.x+radius, center.y+radius); } @@ -442,7 +442,7 @@ CPhysical::ApplyMoveForce(float jx, float jy, float jz) void CPhysical::ApplyTurnForce(float jx, float jy, float jz, float px, float py, float pz) { - CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass); + CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass); CVector turnimpulse = CrossProduct(CVector(px, py, pz)-com, CVector(jx, jy, jz)); m_vecTurnSpeed += turnimpulse*(1.0f/m_fTurnMass); } @@ -456,7 +456,7 @@ CPhysical::ApplyFrictionMoveForce(float jx, float jy, float jz) void CPhysical::ApplyFrictionTurnForce(float jx, float jy, float jz, float px, float py, float pz) { - CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass); + CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass); CVector turnimpulse = CrossProduct(CVector(px, py, pz)-com, CVector(jx, jy, jz)); m_vecTurnFriction += turnimpulse*(1.0f/m_fTurnMass); } @@ -480,6 +480,10 @@ CPhysical::ApplySpringDampening(float damping, CVector &springDir, CVector &poin { float speedA = DotProduct(speed, springDir); float speedB = DotProduct(GetSpeed(point), springDir); +#ifdef FIX_BUGS + if (speedB == 0.0f) + return true; +#endif float step = Min(CTimer::GetTimeStep(), 3.0f); float impulse = -damping * (speedA + speedB)/2.0f * m_fMass * step * 0.53f; @@ -853,7 +857,7 @@ CPhysical::ApplyCollisionAlt(CEntity *B, CColPoint &colpoint, float &impulse, CV moveSpeed += vImpulse * (1.0f/m_fMass); // ApplyTurnForce - CVector com = Multiply3x3(m_matrix, m_vecCentreOfMass); + CVector com = Multiply3x3(GetMatrix(), m_vecCentreOfMass); CVector turnimpulse = CrossProduct(pointpos-com, vImpulse); turnSpeed += turnimpulse*(1.0f/m_fTurnMass); @@ -1086,7 +1090,7 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists) CPhysical *A, *B; CObject *Bobj; bool canshift; - CVector center; + CVUVECTOR center; float radius; int numCollisions; @@ -1110,11 +1114,12 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists) skipShift = false; if(B->IsBuilding() || - B->IsObject() && B->bInfiniteMass) + B->IsObject() && B->bInfiniteMass || + A->IsPed() && B->IsObject() && B->GetIsStatic() && !Bobj->bHasBeenDamaged) canshift = true; else - canshift = A->IsPed() && - B->IsObject() && B->GetIsStatic() && !Bobj->bHasBeenDamaged; + canshift = false; + if(B == A || B->m_scanCode == CWorld::GetCurrentScanCode() || !B->bUsesCollision || @@ -1143,7 +1148,7 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists) Aobj->m_pCollidingEntity = nil; }else if(Aobj->m_pCollidingEntity != B){ CMatrix inv; - CVector size = CModelInfo::GetModelInfo(A->GetModelIndex())->GetColModel()->boundingBox.GetSize(); + CVector size = CModelInfo::GetColModel(A->GetModelIndex())->boundingBox.GetSize(); size = A->GetMatrix() * size; if(size.z < B->GetPosition().z || (Invert(B->GetMatrix(), inv) * size).z < 0.0f){ @@ -1161,7 +1166,7 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists) Bobj->m_pCollidingEntity = nil; }else if(Bobj->m_pCollidingEntity != A){ CMatrix inv; - CVector size = CModelInfo::GetModelInfo(B->GetModelIndex())->GetColModel()->boundingBox.GetSize(); + CVector size = CModelInfo::GetColModel(B->GetModelIndex())->boundingBox.GetSize(); size = B->GetMatrix() * size; if(size.z < A->GetPosition().z || (Invert(A->GetMatrix(), inv) * size).z < 0.0f) @@ -1173,9 +1178,10 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists) else if(A->IsPed() && IsBodyPart(B->GetModelIndex())) skipShift = true; else if(A->IsPed() && ((CPed*)A)->m_pCollidingEntity == B || - B->IsPed() && ((CPed*)B)->m_pCollidingEntity == A || - A->GetModelIndex() == MI_RCBANDIT && B->IsVehicle() || - B->GetModelIndex() == MI_RCBANDIT && (A->IsPed() || A->IsVehicle())) + B->IsPed() && ((CPed*)B)->m_pCollidingEntity == A) + skipShift = true; + else if(A->GetModelIndex() == MI_RCBANDIT && B->IsVehicle() || + B->GetModelIndex() == MI_RCBANDIT && (A->IsPed() || A->IsVehicle())) skipShift = true; if(skipShift) @@ -1244,7 +1250,7 @@ CPhysical::ProcessCollisionSectorList_SimpleCar(CPtrList *lists) { static CColPoint aColPoints[MAX_COLLISION_POINTS]; float radius; - CVector center; + CVUVECTOR center; int listtype; CPhysical *A, *B; int numCollisions; @@ -1406,7 +1412,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists) { static CColPoint aColPoints[MAX_COLLISION_POINTS]; float radius; - CVector center; + CVUVECTOR center; CPtrList *list; CPhysical *A, *B; CObject *Aobj, *Bobj; @@ -1437,18 +1443,17 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists) bool isTouching = true; if(B == A || B->m_scanCode == CWorld::GetCurrentScanCode() || - !B->bUsesCollision || - !(isTouching = B->GetIsTouching(center, radius))){ - if(!isTouching){ - if(A->IsObject() && Aobj->m_pCollidingEntity == B) - Aobj->m_pCollidingEntity = nil; - else if(B->IsObject() && Bobj->m_pCollidingEntity == A) - Bobj->m_pCollidingEntity = nil; - else if(A->IsPed() && Aped->m_pCollidingEntity == B) - Aped->m_pCollidingEntity = nil; - else if(B->IsPed() && Bped->m_pCollidingEntity == A) - Bped->m_pCollidingEntity = nil; - } + !B->bUsesCollision) + continue; + if(!B->GetIsTouching(center, radius)){ + if(A->IsObject() && Aobj->m_pCollidingEntity == B) + Aobj->m_pCollidingEntity = nil; + else if(B->IsObject() && Bobj->m_pCollidingEntity == A) + Bobj->m_pCollidingEntity = nil; + else if(A->IsPed() && Aped->m_pCollidingEntity == B) + Aped->m_pCollidingEntity = nil; + else if(B->IsPed() && Bped->m_pCollidingEntity == A) + Bped->m_pCollidingEntity = nil; continue; } @@ -1480,7 +1485,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists) skipCollision = true; else{ CMatrix inv; - CVector size = CModelInfo::GetModelInfo(A->GetModelIndex())->GetColModel()->boundingBox.GetSize(); + CVector size = CModelInfo::GetColModel(A->GetModelIndex())->boundingBox.GetSize(); size = A->GetMatrix() * size; if(size.z < B->GetPosition().z || (Invert(B->GetMatrix(), inv) * size).z < 0.0f){ @@ -1499,7 +1504,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists) skipCollision = true; else{ CMatrix inv; - CVector size = CModelInfo::GetModelInfo(B->GetModelIndex())->GetColModel()->boundingBox.GetSize(); + CVector size = CModelInfo::GetColModel(B->GetModelIndex())->boundingBox.GetSize(); size = B->GetMatrix() * size; if(size.z < A->GetPosition().z || (Invert(A->GetMatrix(), inv) * size).z < 0.0f){ @@ -1845,7 +1850,7 @@ CPhysical::ProcessShift(void) } // x is the number of units (m) we would like to step -#define NUMSTEPS(x) ceil(Sqrt(distSq) * (1.0f/(x))) +#define NUMSTEPS(x) Ceil(Sqrt(distSq) * (1.0f/(x))) void CPhysical::ProcessCollision(void) diff --git a/src/entities/Physical.h b/src/entities/Physical.h index f8921a5c..a16bb211 100644 --- a/src/entities/Physical.h +++ b/src/entities/Physical.h @@ -15,8 +15,6 @@ class CTreadable; class CPhysical : public CEntity { public: - // The not properly indented fields haven't been checked properly yet - int32 m_audioEntityId; float m_phys_unused1; CTreadable *m_treadable[2]; // car and ped diff --git a/src/extras/GitSHA1.cpp.in b/src/extras/GitSHA1.cpp.in new file mode 100644 index 00000000..6168dc79 --- /dev/null +++ b/src/extras/GitSHA1.cpp.in @@ -0,0 +1,2 @@ +#define GIT_SHA1 "@GIT_SHA1@" +const char* g_GIT_SHA1 = GIT_SHA1; diff --git a/src/extras/GitSHA1.h b/src/extras/GitSHA1.h new file mode 100644 index 00000000..359bfaff --- /dev/null +++ b/src/extras/GitSHA1.h @@ -0,0 +1 @@ +extern const char* g_GIT_SHA1; \ No newline at end of file diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp index 4242c630..8b984448 100644 --- a/src/extras/custompipes_d3d9.cpp +++ b/src/extras/custompipes_d3d9.cpp @@ -89,6 +89,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) } int vsBits; + rw::uint32 flags = atomic->geometry->flags; setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setIndices(header->indexBuffer); setVertexDeclaration(header->vertexDeclaration); @@ -120,7 +121,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) reflProps[3] = m->surfaceProps.specular == 0.0f ? 0.0f : VehicleSpecularity; d3ddevice->SetVertexShaderConstantF(VSLOC_reflProps, reflProps, 1); - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); if(m->texture) d3d::setTexture(0, m->texture); @@ -149,11 +150,11 @@ CreateVehiclePipe(void) fp = ReadTweakValueTable(fp, SpecColor); } -#include "shaders/neoVehicle_VS.inc" +#include "shaders/obj/neoVehicle_VS.inc" neoVehicle_VS = rw::d3d::createVertexShader(neoVehicle_VS_cso); assert(neoVehicle_VS); -#include "shaders/neoVehicle_PS.inc" +#include "shaders/obj/neoVehicle_PS.inc" neoVehicle_PS = rw::d3d::createPixelShader(neoVehicle_PS_cso); assert(neoVehicle_PS); @@ -259,11 +260,11 @@ CreateWorldPipe(void) else ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); -#include "shaders/default_UV2_VS.inc" +#include "shaders/obj/default_UV2_VS.inc" neoWorld_VS = rw::d3d::createVertexShader(default_UV2_VS_cso); assert(neoWorld_VS); -#include "shaders/neoWorldIII_PS.inc" +#include "shaders/obj/neoWorldIII_PS.inc" neoWorldIII_PS = rw::d3d::createPixelShader(neoWorldIII_PS_cso); assert(neoWorldIII_PS); @@ -346,11 +347,11 @@ glossRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) void CreateGlossPipe(void) { -#include "shaders/neoGloss_VS.inc" +#include "shaders/obj/neoGloss_VS.inc" neoGloss_VS = rw::d3d::createVertexShader(neoGloss_VS_cso); assert(neoGloss_VS); -#include "shaders/neoGloss_PS.inc" +#include "shaders/obj/neoGloss_PS.inc" neoGloss_PS = rw::d3d::createPixelShader(neoGloss_PS_cso); assert(neoGloss_PS); @@ -420,6 +421,7 @@ rimRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) } int vsBits; + rw::uint32 flags = atomic->geometry->flags; setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setIndices(header->indexBuffer); setVertexDeclaration(header->vertexDeclaration); @@ -437,7 +439,7 @@ rimRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); if(m->texture){ d3d::setTexture(0, m->texture); @@ -463,7 +465,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) } int vsBits; - + rw::uint32 flags = atomic->geometry->flags; setStreamSource(0, (IDirect3DVertexBuffer9*)header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setIndices((IDirect3DIndexBuffer9*)header->indexBuffer); @@ -484,7 +486,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header) SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 255); - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); if(inst->material->texture){ d3d::setTexture(0, m->texture); @@ -512,11 +514,11 @@ CreateRimLightPipes(void) } -#include "shaders/neoRim_VS.inc" +#include "shaders/obj/neoRim_VS.inc" neoRim_VS = rw::d3d::createVertexShader(neoRim_VS_cso); assert(neoRim_VS); -#include "shaders/neoRimSkin_VS.inc" +#include "shaders/obj/neoRimSkin_VS.inc" neoRimSkin_VS = rw::d3d::createVertexShader(neoRimSkin_VS_cso); assert(neoRimSkin_VS); @@ -566,6 +568,7 @@ struct BuildingInst { rw::RawMatrix combinedMat; rw::d3d9::InstanceDataHeader *instHeader; + uint32 cullMode; uint8 fadeAlpha; bool lighting; }; @@ -610,6 +613,8 @@ AtomicFirstPass(RpAtomic *atomic, int pass) assert(building->instHeader->platform == PLATFORM_D3D9); building->fadeAlpha = 255; building->lighting = !!(atomic->geometry->flags & rw::Geometry::LIGHT); + building->cullMode = rw::GetRenderState(rw::CULLMODE); + rw::uint32 flags = atomic->geometry->flags; bool setupDone = false; bool defer = false; @@ -627,6 +632,7 @@ AtomicFirstPass(RpAtomic *atomic, int pass) // alright we're rendering this atomic if(!setupDone){ + rw::SetRenderState(rw::CULLMODE, building->cullMode); setStreamSource(0, building->instHeader->vertexStream[0].vertexBuffer, 0, building->instHeader->vertexStream[0].stride); setIndices(building->instHeader->indexBuffer); setVertexDeclaration(building->instHeader->vertexDeclaration); @@ -639,7 +645,7 @@ AtomicFirstPass(RpAtomic *atomic, int pass) setupDone = true; } - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); if(m->texture){ d3d::setTexture(0, m->texture); @@ -668,6 +674,7 @@ AtomicFullyTransparent(RpAtomic *atomic, int pass, int fadeAlpha) assert(building->instHeader->platform == PLATFORM_D3D9); building->fadeAlpha = fadeAlpha; building->lighting = !!(atomic->geometry->flags & rw::Geometry::LIGHT); + building->cullMode = rw::GetRenderState(rw::CULLMODE); SetMatrix(building, atomic->getFrame()->getLTM()); numBlendInsts[pass]++; } @@ -685,6 +692,7 @@ RenderBlendPass(int pass) for(i = 0; i < numBlendInsts[pass]; i++){ BuildingInst *building = &blendInsts[pass][i]; + rw::SetRenderState(rw::CULLMODE, building->cullMode); setStreamSource(0, building->instHeader->vertexStream[0].vertexBuffer, 0, building->instHeader->vertexStream[0].stride); setIndices(building->instHeader->indexBuffer); setVertexDeclaration(building->instHeader->vertexDeclaration); @@ -702,7 +710,7 @@ RenderBlendPass(int pass) rw::RGBA color = m->color; color.alpha = (color.alpha * building->fadeAlpha)/255; - setMaterial(color, m->surfaceProps); + setMaterial(color, m->surfaceProps); // always modulate here if(m->texture){ d3d::setTexture(0, m->texture); diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp index caf9eb27..2b28cb52 100644 --- a/src/extras/custompipes_gl.cpp +++ b/src/extras/custompipes_gl.cpp @@ -87,16 +87,11 @@ vehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) Material *m; + rw::uint32 flags = atomic->geometry->flags; setWorldMatrix(atomic->getFrame()->getLTM()); lightingCB(atomic); -#ifdef RW_GL_USE_VAOS - glBindVertexArray(header->vao); -#else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, header->ibo); - glBindBuffer(GL_ARRAY_BUFFER, header->vbo); - setAttribPointers(header->attribDesc, header->numAttribs); -#endif + setupVertexInput(header); InstanceData *inst = header->inst; rw::int32 n = header->numMeshes; @@ -119,7 +114,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) while(n--){ m = inst->material; - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); setTexture(0, m->texture); @@ -136,9 +131,7 @@ vehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) SetRenderState(SRCBLEND, BLENDSRCALPHA); setTexture(1, nil); -#ifndef RW_GL_USE_VAOS - disableAttribPointers(header->attribDesc, header->numAttribs); -#endif + teardownVertexInput(header); } void @@ -159,9 +152,9 @@ CreateVehiclePipe(void) { -#include "shaders/neoVehicle_fs_gl.inc" -#include "shaders/neoVehicle_vs_gl.inc" - const char *vs[] = { shaderDecl, header_vert_src, neoVehicle_vert_src, nil }; +#include "shaders/obj/neoVehicle_frag.inc" +#include "shaders/obj/neoVehicle_vert.inc" + const char *vs[] = { shaderDecl, "#define DIRECTIONALS\n", header_vert_src, neoVehicle_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, neoVehicle_frag_src, nil }; neoVehicleShader = Shader::create(vs, fs); assert(neoVehicleShader); @@ -209,13 +202,7 @@ worldRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) setWorldMatrix(atomic->getFrame()->getLTM()); lightingCB(atomic); -#ifdef RW_GL_USE_VAOS - glBindVertexArray(header->vao); -#else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, header->ibo); - glBindBuffer(GL_ARRAY_BUFFER, header->vbo); - setAttribPointers(header->attribDesc, header->numAttribs); -#endif + setupVertexInput(header); InstanceData *inst = header->inst; rw::int32 n = header->numMeshes; @@ -253,9 +240,7 @@ worldRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) inst++; } setTexture(1, nil); -#ifndef RW_GL_USE_VAOS - disableAttribPointers(header->attribDesc, header->numAttribs); -#endif + teardownVertexInput(header); } void @@ -270,8 +255,8 @@ CreateWorldPipe(void) ReadTweakValueTable((char*)work_buff, WorldLightmapBlend); { -#include "shaders/neoWorldIII_fs_gl.inc" -#include "shaders/default_UV2_gl.inc" +#include "shaders/obj/neoWorldIII_frag.inc" +#include "shaders/obj/default_UV2_vert.inc" const char *vs[] = { shaderDecl, header_vert_src, default_UV2_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, neoWorldIII_frag_src, nil }; neoWorldShader = Shader::create(vs, fs); @@ -317,13 +302,7 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) Material *m; -#ifdef RW_GL_USE_VAOS - glBindVertexArray(header->vao); -#else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, header->ibo); - glBindBuffer(GL_ARRAY_BUFFER, header->vbo); - setAttribPointers(header->attribDesc, header->numAttribs); -#endif + setupVertexInput(header); InstanceData *inst = header->inst; rw::int32 n = header->numMeshes; @@ -366,9 +345,7 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) SetRenderState(SRCBLEND, BLENDSRCALPHA); SetRenderState(DESTBLEND, BLENDINVSRCALPHA); -#ifndef RW_GL_USE_VAOS - disableAttribPointers(header->attribDesc, header->numAttribs); -#endif + teardownVertexInput(header); } void @@ -378,8 +355,8 @@ CreateGlossPipe(void) using namespace rw::gl3; { -#include "shaders/neoGloss_fs_gl.inc" -#include "shaders/neoGloss_vs_gl.inc" +#include "shaders/obj/neoGloss_frag.inc" +#include "shaders/obj/neoGloss_vert.inc" const char *vs[] = { shaderDecl, header_vert_src, neoGloss_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, neoGloss_frag_src, nil }; neoGlossShader = Shader::create(vs, fs); @@ -448,16 +425,11 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) Material *m; + rw::uint32 flags = atomic->geometry->flags; setWorldMatrix(atomic->getFrame()->getLTM()); lightingCB(atomic); -#ifdef RW_GL_USE_VAOS - glBindVertexArray(header->vao); -#else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, header->ibo); - glBindBuffer(GL_ARRAY_BUFFER, header->vbo); - setAttribPointers(header->attribDesc, header->numAttribs); -#endif + setupVertexInput(header); InstanceData *inst = header->inst; rw::int32 n = header->numMeshes; @@ -471,7 +443,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) while(n--){ m = inst->material; - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); setTexture(0, m->texture); @@ -480,9 +452,7 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) drawInst(header, inst); inst++; } -#ifndef RW_GL_USE_VAOS - disableAttribPointers(header->attribDesc, header->numAttribs); -#endif + teardownVertexInput(header); } static void @@ -498,16 +468,11 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) Material *m; + rw::uint32 flags = atomic->geometry->flags; setWorldMatrix(atomic->getFrame()->getLTM()); lightingCB(atomic); -#ifdef RW_GL_USE_VAOS - glBindVertexArray(header->vao); -#else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, header->ibo); - glBindBuffer(GL_ARRAY_BUFFER, header->vbo); - setAttribPointers(header->attribDesc, header->numAttribs); -#endif + setupVertexInput(header); InstanceData *inst = header->inst; rw::int32 n = header->numMeshes; @@ -519,7 +484,7 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) while(n--){ m = inst->material; - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); setTexture(0, m->texture); @@ -528,9 +493,7 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header) drawInst(header, inst); inst++; } -#ifndef RW_GL_USE_VAOS - disableAttribPointers(header->attribDesc, header->numAttribs); -#endif + teardownVertexInput(header); } void @@ -550,18 +513,18 @@ CreateRimLightPipes(void) } { -#include "shaders/simple_fs_gl.inc" -#include "shaders/neoRimSkin_gl.inc" - const char *vs[] = { shaderDecl, header_vert_src, neoRimSkin_vert_src, nil }; +#include "shaders/obj/simple_frag.inc" +#include "shaders/obj/neoRimSkin_vert.inc" + const char *vs[] = { shaderDecl, "#define DIRECTIONALS\n", header_vert_src, neoRimSkin_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, simple_frag_src, nil }; neoRimSkinShader = Shader::create(vs, fs); assert(neoRimSkinShader); } { -#include "shaders/simple_fs_gl.inc" -#include "shaders/neoRim_gl.inc" - const char *vs[] = { shaderDecl, header_vert_src, neoRim_vert_src, nil }; +#include "shaders/obj/simple_frag.inc" +#include "shaders/obj/neoRim_vert.inc" + const char *vs[] = { shaderDecl, "#define DIRECTIONALS\n", header_vert_src, neoRim_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, simple_frag_src, nil }; neoRimShader = Shader::create(vs, fs); assert(neoRimShader); @@ -632,6 +595,7 @@ struct BuildingInst { rw::Matrix matrix; rw::gl3::InstanceDataHeader *instHeader; + uint32 cullMode; uint8 fadeAlpha; bool lighting; }; @@ -664,6 +628,8 @@ AtomicFirstPass(RpAtomic *atomic, int pass) assert(building->instHeader->platform == PLATFORM_GL3); building->fadeAlpha = 255; building->lighting = !!(atomic->geometry->flags & rw::Geometry::LIGHT); + building->cullMode = rw::GetRenderState(rw::CULLMODE); + rw::uint32 flags = atomic->geometry->flags; WorldLights lights; lights.numAmbients = 1; @@ -690,28 +656,21 @@ AtomicFirstPass(RpAtomic *atomic, int pass) // alright we're rendering this atomic if(!setupDone){ + rw::SetRenderState(rw::CULLMODE, building->cullMode); defaultShader->use(); setWorldMatrix(&building->matrix); -#ifdef RW_GL_USE_VAOS - glBindVertexArray(building->instHeader->vao); -#else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, building->instHeader->ibo); - glBindBuffer(GL_ARRAY_BUFFER, building->instHeader->vbo); - setAttribPointers(building->instHeader->attribDesc, building->instHeader->numAttribs); -#endif + setupVertexInput(building->instHeader); setLights(&lights); setupDone = true; } - setMaterial(m->color, m->surfaceProps); + setMaterial(flags, m->color, m->surfaceProps); setTexture(0, m->texture); drawInst(building->instHeader, inst); } -#ifndef RW_GL_USE_VAOS - disableAttribPointers(building->instHeader->attribDesc, building->instHeader->numAttribs); -#endif + teardownVertexInput(building->instHeader); if(defer) numBlendInsts[pass]++; } @@ -730,6 +689,7 @@ AtomicFullyTransparent(RpAtomic *atomic, int pass, int fadeAlpha) assert(building->instHeader->platform == PLATFORM_GL3); building->fadeAlpha = fadeAlpha; building->lighting = !!(atomic->geometry->flags & rw::Geometry::LIGHT); + building->cullMode = rw::GetRenderState(rw::CULLMODE); building->matrix = *atomic->getFrame()->getLTM(); numBlendInsts[pass]++; } @@ -750,13 +710,8 @@ RenderBlendPass(int pass) for(i = 0; i < numBlendInsts[pass]; i++){ BuildingInst *building = &blendInsts[pass][i]; -#ifdef RW_GL_USE_VAOS - glBindVertexArray(building->instHeader->vao); -#else - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, building->instHeader->ibo); - glBindBuffer(GL_ARRAY_BUFFER, building->instHeader->vbo); - setAttribPointers(building->instHeader->attribDesc, building->instHeader->numAttribs); -#endif + rw::SetRenderState(rw::CULLMODE, building->cullMode); + setupVertexInput(building->instHeader); setWorldMatrix(&building->matrix); if(building->lighting) lights.ambient = pAmbient->color; @@ -772,15 +727,13 @@ RenderBlendPass(int pass) rw::RGBA color = m->color; color.alpha = (color.alpha * building->fadeAlpha)/255; - setMaterial(color, m->surfaceProps); + setMaterial(color, m->surfaceProps); // always modulate here setTexture(0, m->texture); drawInst(building->instHeader, inst); } -#ifndef RW_GL_USE_VAOS - disableAttribPointers(building->instHeader->attribDesc, building->instHeader->numAttribs); -#endif + teardownVertexInput(building->instHeader); } } } diff --git a/src/extras/debugmenu.h b/src/extras/debugmenu.h index c2198aca..45b65d04 100644 --- a/src/extras/debugmenu.h +++ b/src/extras/debugmenu.h @@ -2,6 +2,120 @@ #ifdef DEBUGMENU +// Tweaking stuff for debugmenu +#define TWEAKPATH ___tw___TWEAKPATH +#define SETTWEAKPATH(path) static const char *___tw___TWEAKPATH = path; +#define TWEAKFUNC(v) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); +#define TWEAKFUNCN(v, name) static CTweakFunc CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); +#define TWEAKBOOL(v) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), TWEAKPATH); +#define TWEAKBOOLN(v, name) static CTweakBool CONCAT(___tw___tweak, __COUNTER__)(&v, name, TWEAKPATH); +#define TWEAKINT32(v, lower, upper, step) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKINT32N(v, lower, upper, step, name) static CTweakInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKUINT32(v, lower, upper, step) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKUINT32N(v, lower, upper, step, name) static CTweakUInt32 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKINT16(v, lower, upper, step) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKINT16N(v, lower, upper, step, name) static CTweakInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKUINT16(v, lower, upper, step) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKUINT16N(v, lower, upper, step, name) static CTweakUInt16 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKINT8(v, lower, upper, step) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKINT8N(v, lower, upper, step, name) static CTweakInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKUINT8(v, lower, upper, step) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKUINT8N(v, lower, upper, step, name) static CTweakUInt8 CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKFLOAT(v, lower, upper, step) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, step, TWEAKPATH); +#define TWEAKFLOATN(v, lower, upper, step, name) static CTweakFloat CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, step, TWEAKPATH); +#define TWEAKSWITCH(v, lower, upper, str, f) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, STR(v), lower, upper, str, f, TWEAKPATH); +#define TWEAKSWITCHN(v, lower, upper, str, f, name) static CTweakSwitch CONCAT(___tw___tweak, __COUNTER__)(&v, name, lower, upper, str, f, TWEAKPATH); + +// interface +class CTweakVar +{ +public: + virtual void AddDBG(const char* path) = 0; +}; + +class CTweakVars +{ +public: + static void Add(CTweakVar* var); + static void AddDBG(const char* path); +}; + +class CTweakFunc : public CTweakVar +{ + const char* m_pPath, * m_pVarName; + void (*m_pFunc)(); +public: + CTweakFunc(void (*pFunc)(), const char* strName, const char* strPath) : + m_pPath(strPath), m_pVarName(strName), m_pFunc(pFunc) + { + CTweakVars::Add(this); + } + + void AddDBG(const char* path); +}; + +class CTweakBool : public CTweakVar +{ + const char* m_pPath, * m_pVarName; + bool* m_pBoolVar; +public: + CTweakBool(bool* pBool, const char* strName, const char* strPath) : + m_pPath(strPath), m_pVarName(strName), m_pBoolVar(pBool) + { + CTweakVars::Add(this); + } + + void AddDBG(const char* path); +}; + +class CTweakSwitch : public CTweakVar +{ + const char* m_pPath, * m_pVarName; + void* m_pIntVar; + int32 m_nMin, m_nMax; + const char** m_aStr; + void (*m_pFunc)(); +public: + CTweakSwitch(void* pInt, const char* strName, int32 nMin, int32 nMax, const char** aStr, + void (*pFunc)(), const char* strPath) + : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), m_nMin(nMin), m_nMax(nMax), + m_aStr(aStr) + { + CTweakVars::Add(this); + } + + void AddDBG(const char* path); +}; + +#define _TWEEKCLASS(name, type) \ + class name : public CTweakVar \ + { \ + public: \ + const char *m_pPath, *m_pVarName; \ + type *m_pIntVar, m_nLoawerBound, m_nUpperBound, m_nStep; \ + \ + name(type *pInt, const char *strName, type nLower, type nUpper, type nStep, \ + const char *strPath) \ + : m_pPath(strPath), m_pVarName(strName), m_pIntVar(pInt), \ + m_nLoawerBound(nLower), m_nUpperBound(nUpper), m_nStep(nStep) \ + \ + { \ + CTweakVars::Add(this); \ + } \ + \ + void AddDBG(const char *path); \ + }; + +_TWEEKCLASS(CTweakInt8, int8); +_TWEEKCLASS(CTweakUInt8, uint8); +_TWEEKCLASS(CTweakInt16, int16); +_TWEEKCLASS(CTweakUInt16, uint16); +_TWEEKCLASS(CTweakInt32, int32); +_TWEEKCLASS(CTweakUInt32, uint32); +_TWEEKCLASS(CTweakFloat, float); + +#undef _TWEEKCLASS + typedef void (*TriggerFunc)(void); struct Menu; diff --git a/src/extras/frontendoption.h b/src/extras/frontendoption.h index 8b64335a..a571170f 100644 --- a/src/extras/frontendoption.h +++ b/src/extras/frontendoption.h @@ -40,6 +40,8 @@ typedef void (*ReturnPrevPageFunc)(); typedef void (*ChangeFunc)(int8 before, int8 after); // called after updating the value. // only called on enter if onlyApplyOnEnter set, otherwise called on every value change +typedef void (*ChangeFuncFloat)(float before, float after); // called after updating the value. + // for dynamic options typedef wchar* (*DrawFunc)(bool* disabled, bool userHovering); // you must return a pointer for right text. // you can also set *disabled if you want to gray it out. diff --git a/src/extras/ini.h b/src/extras/ini.h new file mode 100644 index 00000000..44dd3d57 --- /dev/null +++ b/src/extras/ini.h @@ -0,0 +1,761 @@ +/* + * The MIT License (MIT) + * Copyright (c) 2018 Danijel Durakovic + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +/////////////////////////////////////////////////////////////////////////////// +// +// /mINI/ v0.9.10 +// An INI file reader and writer for the modern age. +// +/////////////////////////////////////////////////////////////////////////////// +// +// A tiny utility library for manipulating INI files with a straightforward +// API and a minimal footprint. It conforms to the (somewhat) standard INI +// format - sections and keys are case insensitive and all leading and +// trailing whitespace is ignored. Comments are lines that begin with a +// semicolon. Trailing comments are allowed on section lines. +// +// Files are read on demand, upon which data is kept in memory and the file +// is closed. This utility supports lazy writing, which only writes changes +// and updates to a file and preserves custom formatting and comments. A lazy +// write invoked by a write() call will read the output file, find what +// changes have been made and update the file accordingly. If you only need to +// generate files, use generate() instead. Section and key order is preserved +// on read, write and insert. +// +/////////////////////////////////////////////////////////////////////////////// +// +// /* BASIC USAGE EXAMPLE: */ +// +// /* read from file */ +// mINI::INIFile file("myfile.ini"); +// mINI::INIStructure ini; +// file.read(ini); +// +// /* read value; gets a reference to actual value in the structure. +// if key or section don't exist, a new empty value will be created */ +// std::string& value = ini["section"]["key"]; +// +// /* read value safely; gets a copy of value in the structure. +// does not alter the structure */ +// std::string value = ini.get("section").get("key"); +// +// /* set or update values */ +// ini["section"]["key"] = "value"; +// +// /* set multiple values */ +// ini["section2"].set({ +// {"key1", "value1"}, +// {"key2", "value2"} +// }); +// +// /* write updates back to file, preserving comments and formatting */ +// file.write(ini); +// +// /* or generate a file (overwrites the original) */ +// file.generate(ini); +// +/////////////////////////////////////////////////////////////////////////////// +// +// Long live the INI file!!! +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef MINI_INI_H_ +#define MINI_INI_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace mINI +{ + namespace INIStringUtil + { + const char* const whitespaceDelimiters = " \t\n\r\f\v"; + inline void trim(std::string& str) + { + str.erase(str.find_last_not_of(whitespaceDelimiters) + 1); + str.erase(0, str.find_first_not_of(whitespaceDelimiters)); + } +#ifndef MINI_CASE_SENSITIVE + inline void toLower(std::string& str) + { + std::transform(str.begin(), str.end(), str.begin(), [](const char c) { + return static_cast(std::tolower(c)); + }); + } +#endif + inline void replace(std::string& str, std::string const& a, std::string const& b) + { + if (!a.empty()) + { + std::size_t pos = 0; + while ((pos = str.find(a, pos)) != std::string::npos) + { + str.replace(pos, a.size(), b); + pos += b.size(); + } + } + } +#ifdef _WIN32 + const char* const endl = "\r\n"; +#else + const char* const endl = "\n"; +#endif + }; + + template + class INIMap + { + private: + using T_DataIndexMap = std::unordered_map; + using T_DataItem = std::pair; + using T_DataContainer = std::vector; + using T_MultiArgs = typename std::vector>; + + T_DataIndexMap dataIndexMap; + T_DataContainer data; + + inline std::size_t setEmpty(std::string& key) + { + std::size_t index = data.size(); + dataIndexMap[key] = index; + data.emplace_back(key, T()); + return index; + } + + public: + using const_iterator = typename T_DataContainer::const_iterator; + + INIMap() { } + + INIMap(INIMap const& other) + { + std::size_t data_size = other.data.size(); + for (std::size_t i = 0; i < data_size; ++i) + { + auto const& key = other.data[i].first; + auto const& obj = other.data[i].second; + data.emplace_back(key, obj); + } + dataIndexMap = T_DataIndexMap(other.dataIndexMap); + } + + T& operator[](std::string key) + { + INIStringUtil::trim(key); +#ifndef MINI_CASE_SENSITIVE + INIStringUtil::toLower(key); +#endif + auto it = dataIndexMap.find(key); + bool hasIt = (it != dataIndexMap.end()); + std::size_t index = (hasIt) ? it->second : setEmpty(key); + return data[index].second; + } + T get(std::string key) const + { + INIStringUtil::trim(key); +#ifndef MINI_CASE_SENSITIVE + INIStringUtil::toLower(key); +#endif + auto it = dataIndexMap.find(key); + if (it == dataIndexMap.end()) + { + return T(); + } + return T(data[it->second].second); + } + bool has(std::string key) const + { + INIStringUtil::trim(key); +#ifndef MINI_CASE_SENSITIVE + INIStringUtil::toLower(key); +#endif + return (dataIndexMap.count(key) == 1); + } + void set(std::string key, T obj) + { + INIStringUtil::trim(key); +#ifndef MINI_CASE_SENSITIVE + INIStringUtil::toLower(key); +#endif + auto it = dataIndexMap.find(key); + if (it != dataIndexMap.end()) + { + data[it->second].second = obj; + } + else + { + dataIndexMap[key] = data.size(); + data.emplace_back(key, obj); + } + } + void set(T_MultiArgs const& multiArgs) + { + for (auto const& it : multiArgs) + { + auto const& key = it.first; + auto const& obj = it.second; + set(key, obj); + } + } + bool remove(std::string key) + { + INIStringUtil::trim(key); +#ifndef MINI_CASE_SENSITIVE + INIStringUtil::toLower(key); +#endif + auto it = dataIndexMap.find(key); + if (it != dataIndexMap.end()) + { + std::size_t index = it->second; + data.erase(data.begin() + index); + dataIndexMap.erase(it); + for (auto& it2 : dataIndexMap) + { + auto& vi = it2.second; + if (vi > index) + { + vi--; + } + } + return true; + } + return false; + } + void clear() + { + data.clear(); + dataIndexMap.clear(); + } + std::size_t size() const + { + return data.size(); + } + const_iterator begin() const { return data.begin(); } + const_iterator end() const { return data.end(); } + }; + + using INIStructure = INIMap>; + + namespace INIParser + { + using T_ParseValues = std::pair; + + enum class PDataType : char + { + PDATA_NONE, + PDATA_COMMENT, + PDATA_SECTION, + PDATA_KEYVALUE, + PDATA_UNKNOWN + }; + + inline PDataType parseLine(std::string line, T_ParseValues& parseData) + { + parseData.first.clear(); + parseData.second.clear(); + INIStringUtil::trim(line); + if (line.empty()) + { + return PDataType::PDATA_NONE; + } + char firstCharacter = line[0]; + if (firstCharacter == ';') + { + return PDataType::PDATA_COMMENT; + } + if (firstCharacter == '[') + { + auto commentAt = line.find_first_of(';'); + if (commentAt != std::string::npos) + { + line = line.substr(0, commentAt); + } + auto closingBracketAt = line.find_last_of(']'); + if (closingBracketAt != std::string::npos) + { + auto section = line.substr(1, closingBracketAt - 1); + INIStringUtil::trim(section); + parseData.first = section; + return PDataType::PDATA_SECTION; + } + } + auto lineNorm = line; + INIStringUtil::replace(lineNorm, "\\=", " "); + auto equalsAt = lineNorm.find_first_of('='); + if (equalsAt != std::string::npos) + { + auto key = line.substr(0, equalsAt); + INIStringUtil::trim(key); + INIStringUtil::replace(key, "\\=", "="); + auto value = line.substr(equalsAt + 1); + INIStringUtil::trim(value); + parseData.first = key; + parseData.second = value; + return PDataType::PDATA_KEYVALUE; + } + return PDataType::PDATA_UNKNOWN; + } + }; + + class INIReader + { + public: + using T_LineData = std::vector; + using T_LineDataPtr = std::shared_ptr; + + private: + std::ifstream fileReadStream; + T_LineDataPtr lineData; + + T_LineData readFile() + { + std::string fileContents; + fileReadStream.seekg(0, std::ios::end); + fileContents.resize(fileReadStream.tellg()); + fileReadStream.seekg(0, std::ios::beg); + std::size_t fileSize = fileContents.size(); + fileReadStream.read(&fileContents[0], fileSize); + fileReadStream.close(); + T_LineData output; + if (fileSize == 0) + { + return output; + } + std::string buffer; + buffer.reserve(50); + for (std::size_t i = 0; i < fileSize; ++i) + { + char& c = fileContents[i]; + if (c == '\n') + { + output.emplace_back(buffer); + buffer.clear(); + continue; + } + if (c != '\0' && c != '\r') + { + buffer += c; + } + } + output.emplace_back(buffer); + return output; + } + + public: + INIReader(std::string const& filename, bool keepLineData = false) + { + fileReadStream.open(filename, std::ios::in | std::ios::binary); + if (keepLineData) + { + lineData = std::make_shared(); + } + } + ~INIReader() { } + + bool operator>>(INIStructure& data) + { + if (!fileReadStream.is_open()) + { + return false; + } + T_LineData fileLines = readFile(); + std::string section; + bool inSection = false; + INIParser::T_ParseValues parseData; + for (auto const& line : fileLines) + { + auto parseResult = INIParser::parseLine(line, parseData); + if (parseResult == INIParser::PDataType::PDATA_SECTION) + { + inSection = true; + data[section = parseData.first]; + } + else if (inSection && parseResult == INIParser::PDataType::PDATA_KEYVALUE) + { + auto const& key = parseData.first; + auto const& value = parseData.second; + data[section][key] = value; + } + if (lineData && parseResult != INIParser::PDataType::PDATA_UNKNOWN) + { + if (parseResult == INIParser::PDataType::PDATA_KEYVALUE && !inSection) + { + continue; + } + lineData->emplace_back(line); + } + } + return true; + } + T_LineDataPtr getLines() + { + return lineData; + } + }; + + class INIGenerator + { + private: + std::ofstream fileWriteStream; + + public: + bool prettyPrint = false; + + INIGenerator(std::string const& filename) + { + fileWriteStream.open(filename, std::ios::out | std::ios::binary); + } + ~INIGenerator() { } + + bool operator<<(INIStructure const& data) + { + if (!fileWriteStream.is_open()) + { + return false; + } + if (!data.size()) + { + return true; + } + auto it = data.begin(); + for (;;) + { + auto const& section = it->first; + auto const& collection = it->second; + fileWriteStream + << "[" + << section + << "]"; + if (collection.size()) + { + fileWriteStream << INIStringUtil::endl; + auto it2 = collection.begin(); + for (;;) + { + auto key = it2->first; + INIStringUtil::replace(key, "=", "\\="); + auto value = it2->second; + INIStringUtil::trim(value); + fileWriteStream + << key + << ((prettyPrint) ? " = " : "=") + << value; + if (++it2 == collection.end()) + { + break; + } + fileWriteStream << INIStringUtil::endl; + } + } + if (++it == data.end()) + { + break; + } + fileWriteStream << INIStringUtil::endl; + if (prettyPrint) + { + fileWriteStream << INIStringUtil::endl; + } + } + return true; + } + }; + + class INIWriter + { + private: + using T_LineData = std::vector; + using T_LineDataPtr = std::shared_ptr; + + std::string filename; + + T_LineData getLazyOutput(T_LineDataPtr const& lineData, INIStructure& data, INIStructure& original) + { + T_LineData output; + INIParser::T_ParseValues parseData; + std::string sectionCurrent; + bool parsingSection = false; + bool continueToNextSection = false; + bool discardNextEmpty = false; + bool writeNewKeys = false; + std::size_t lastKeyLine = 0; + for (auto line = lineData->begin(); line != lineData->end(); ++line) + { + if (!writeNewKeys) + { + auto parseResult = INIParser::parseLine(*line, parseData); + if (parseResult == INIParser::PDataType::PDATA_SECTION) + { + if (parsingSection) + { + writeNewKeys = true; + parsingSection = false; + --line; + continue; + } + sectionCurrent = parseData.first; + if (data.has(sectionCurrent)) + { + parsingSection = true; + continueToNextSection = false; + discardNextEmpty = false; + output.emplace_back(*line); + lastKeyLine = output.size(); + } + else + { + continueToNextSection = true; + discardNextEmpty = true; + continue; + } + } + else if (parseResult == INIParser::PDataType::PDATA_KEYVALUE) + { + if (continueToNextSection) + { + continue; + } + if (data.has(sectionCurrent)) + { + auto& collection = data[sectionCurrent]; + auto const& key = parseData.first; + auto const& value = parseData.second; + if (collection.has(key)) + { + auto outputValue = collection[key]; + if (value == outputValue) + { + output.emplace_back(*line); + } + else + { + INIStringUtil::trim(outputValue); + auto lineNorm = *line; + INIStringUtil::replace(lineNorm, "\\=", " "); + auto equalsAt = lineNorm.find_first_of('='); + auto valueAt = lineNorm.find_first_not_of( + INIStringUtil::whitespaceDelimiters, + equalsAt + 1 + ); + std::string outputLine = line->substr(0, valueAt); + if (prettyPrint && equalsAt + 1 == valueAt) + { + outputLine += " "; + } + outputLine += outputValue; + output.emplace_back(outputLine); + } + lastKeyLine = output.size(); + } + } + } + else + { + if (discardNextEmpty && line->empty()) + { + discardNextEmpty = false; + } + else if (parseResult != INIParser::PDataType::PDATA_UNKNOWN) + { + output.emplace_back(*line); + } + } + } + if (writeNewKeys || std::next(line) == lineData->end()) + { + T_LineData linesToAdd; + if (data.has(sectionCurrent) && original.has(sectionCurrent)) + { + auto const& collection = data[sectionCurrent]; + auto const& collectionOriginal = original[sectionCurrent]; + for (auto const& it : collection) + { + auto key = it.first; + if (collectionOriginal.has(key)) + { + continue; + } + auto value = it.second; + INIStringUtil::replace(key, "=", "\\="); + INIStringUtil::trim(value); + linesToAdd.emplace_back( + key + ((prettyPrint) ? " = " : "=") + value + ); + } + } + if (!linesToAdd.empty()) + { + output.insert( + output.begin() + lastKeyLine, + linesToAdd.begin(), + linesToAdd.end() + ); + } + if (writeNewKeys) + { + writeNewKeys = false; + --line; + } + } + } + for (auto const& it : data) + { + auto const& section = it.first; + if (original.has(section)) + { + continue; + } + if (prettyPrint && output.size() > 0 && !output.back().empty()) + { + output.emplace_back(); + } + output.emplace_back("[" + section + "]"); + auto const& collection = it.second; + for (auto const& it2 : collection) + { + auto key = it2.first; + auto value = it2.second; + INIStringUtil::replace(key, "=", "\\="); + INIStringUtil::trim(value); + output.emplace_back( + key + ((prettyPrint) ? " = " : "=") + value + ); + } + } + return output; + } + + public: + bool prettyPrint = false; + + INIWriter(std::string const& filename) + : filename(filename) + { + } + ~INIWriter() { } + + bool operator<<(INIStructure& data) + { + struct stat buf; + bool fileExists = (stat(filename.c_str(), &buf) == 0); + if (!fileExists) + { + INIGenerator generator(filename); + generator.prettyPrint = prettyPrint; + return generator << data; + } + INIStructure originalData; + T_LineDataPtr lineData; + bool readSuccess = false; + { + INIReader reader(filename, true); + if ((readSuccess = reader >> originalData)) + { + lineData = reader.getLines(); + } + } + if (!readSuccess) + { + return false; + } + T_LineData output = getLazyOutput(lineData, data, originalData); + std::ofstream fileWriteStream(filename, std::ios::out | std::ios::binary); + if (fileWriteStream.is_open()) + { + if (output.size()) + { + auto line = output.begin(); + for (;;) + { + fileWriteStream << *line; + if (++line == output.end()) + { + break; + } + fileWriteStream << INIStringUtil::endl; + } + } + return true; + } + return false; + } + }; + + class INIFile + { + private: + std::string filename; + + public: + INIFile(std::string const& filename) + : filename(filename) + { } + + ~INIFile() { } + + bool read(INIStructure& data) const + { + if (data.size()) + { + data.clear(); + } + if (filename.empty()) + { + return false; + } + INIReader reader(filename); + return reader >> data; + } + bool generate(INIStructure const& data, bool pretty = false) const + { + if (filename.empty()) + { + return false; + } + INIGenerator generator(filename); + generator.prettyPrint = pretty; + return generator << data; + } + bool write(INIStructure& data, bool pretty = false) const + { + if (filename.empty()) + { + return false; + } + INIWriter writer(filename); + writer.prettyPrint = pretty; + return writer << data; + } + }; +} + +#endif // MINI_INI_H_ diff --git a/src/extras/ini_parser.hpp b/src/extras/ini_parser.hpp deleted file mode 100644 index 7a3b3396..00000000 --- a/src/extras/ini_parser.hpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright (c) 2013-2015 Denilson das Mercês Amorim - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - * - */ -#ifndef LINB_INI_PARSER_HPP -#define LINB_INI_PARSER_HPP - -/* - * STL-like INI Container - */ - -#include // for std::string -#include // for std::map -#include // for std::FILE -#include // for std::find_if -#include // for std::function -#ifdef BUFFER_FILES -#include // for memalign -#endif - -namespace linb -{ - template< - class CharT = char, /* Not compatible with other type here, since we're using C streams */ - class StringType = std::basic_string, - class KeyContainer = std::map, - class SectionContainer = std::map - > class basic_ini - { - public: - typedef CharT char_type; - typedef StringType string_type; - typedef KeyContainer key_container; - typedef SectionContainer section_container; - - // Typedef container values types - typedef typename section_container::value_type value_type; - typedef typename section_container::key_type key_type; - typedef typename section_container::mapped_type mapped_type; - - // Typedef common types - typedef typename section_container::size_type size_type; - typedef typename section_container::difference_type difference_type; - - // Typedef iterators - typedef typename section_container::iterator iterator; - typedef typename section_container::const_iterator const_iterator; - typedef typename section_container::reverse_iterator reverse_iterator; - typedef typename section_container::const_reverse_iterator const_reverse_iterator; - - // typedef References and pointers - typedef typename section_container::reference reference; - typedef typename section_container::const_reference const_reference; - typedef typename section_container::pointer pointer; - typedef typename section_container::const_pointer const_pointer; - - private: - section_container data; - - public: - - basic_ini() - { } - - basic_ini(const char_type* filename) - { this->read_file(filename); } - - /* Iterator methods */ - iterator begin() - { return data.begin(); } - const_iterator begin() const - { return data.begin(); } - iterator end() - { return data.end(); } - const_iterator end() const - { return data.end(); } - const_iterator cbegin() const - { return data.cbegin(); } - const_iterator cend() const - { return data.cend(); } - - /* Reverse iterator methods */ - reverse_iterator rbegin() - { return data.rbegin(); } - const_reverse_iterator rbegin() const - { return data.rbegin(); } - reverse_iterator rend() - { return data.rend(); } - const_reverse_iterator rend() const - { return data.rend(); } - const_reverse_iterator crbegin() const - { return data.crbegin(); } - const_reverse_iterator crend() const - { return data.crend(); } - - /* Acessing index methods */ - mapped_type& operator[](const string_type& sect) - { return data[sect]; } - mapped_type& operator[](string_type&& sect) - { return data[std::forward(sect)]; } - mapped_type& at( const string_type& sect) - { return data.at(sect); } - const mapped_type& at(const string_type& sect) const - { return data.at(sect); } - - /* Capacity information */ - bool empty() const - { return data.empty(); } - size_type size() const - { return data.size(); } - size_type max_size() const - { return data.max_size(); } - - /* Modifiers */ - void clear() - { return data.clear(); } - - /* Lookup */ - size_type count(const string_type& sect) - { return data.count(sect); } - iterator find(const string_type& sect) - { return data.find(sect); } - - /* Gets a value from the specified section & key, default_value is returned if the sect & key doesn't exist */ - string_type get(const string_type& sect, const key_type& key, const string_type& default_value) - { - auto it = this->find(sect); - if(it != this->end()) - { - auto itv = it->second.find(key); - if(itv != it->second.end()) - return itv->second; - } - return default_value; - } - - /* Sets the value of a value in the ini */ - void set(const string_type& sect, const key_type& key, const string_type& value) - { - (*this)[sect][key] = value; // no emplace since overwrite! - } - - /* Too lazy to continue this container... If you need more methods, just add it */ - - // re3 - void remove(const string_type& sect, const key_type& key) - { - auto it = this->find(sect); - if(it != this->end()) - { - it->second.erase(key); - } - } - - int category_size(const string_type& sect) - { - auto it = this->find(sect); - if(it != this->end()) - { - return it->second.size(); - } - return 0; - } - -#if 1 - bool read_file(const char_type* filename) - { - /* Using C stream in a STL-like container, funny? - */ - if(FILE* f = fopen(filename, "r")) - { - key_container* keys = nullptr; - char_type buf[2048]; - string_type line; - string_type key; - string_type value; - string_type null_string; - size_type pos; - -#ifdef BUFFER_FILES - char* buffer = (char*) memalign(0x40, INI_BUFFER_SIZE); - setvbuf(f, buffer, _IOFBF, INI_BUFFER_SIZE); -#endif - - // Trims an string - auto trim = [](string_type& s, bool trimLeft, bool trimRight) -> string_type& - { - if(s.size()) - { - // Ignore UTF-8 BOM - while(s.size() >= 3 && s[0] == (char)(0xEF) && s[1] == (char)(0xBB) && s[2] == (char)(0xBF)) - s.erase(s.begin(), s.begin() + 3); - - if(trimLeft) - s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::function(::isspace)))); - if(trimRight) - s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::function(::isspace))).base(), s.end()); - } - return s; - }; - - // Start parsing - while(fgets(buf, sizeof(buf), f)) - { - // What a thing, reading into a char buffer and then putting in the string... - line = buf; - - // Find comment and remove anything after it from the line - if((pos = line.find_first_of(';')) != line.npos) - line.erase(pos); - - // Trim the string, and if it gets empty, skip this line - if(trim(line, true, true).empty()) - continue; - - // Find section name - if(line.front() == '[' && line.back() == ']') - { - pos = line.length() - 1; //line.find_first_of(']'); - if(pos != line.npos) - { - trim(key.assign(line, 1, pos-1), true, true); - keys = &data[std::move(key)]; // Create section - } - else - keys = nullptr; - } - else - { - // Find key and value positions - pos = line.find_first_of('='); - if(pos == line.npos) - { - // There's only the key - key = line; // No need for trim, line is already trimmed - value.clear(); - } - else - { - // There's the key and the value - trim(key.assign(line, 0, pos), false, true); // trim the right - trim(value.assign(line, pos + 1, line.npos), true, false); // trim the left - } - - // Put the key/value into the current keys object, or into the section "" if no section has been found - #if __cplusplus >= 201103L || _MSC_VER >= 1800 - (keys ? *keys : data[null_string]).emplace(std::move(key), std::move(value)); - #else - (keys ? *keys : data[null_string])[key] = value; - key.clear(); value.clear(); - #endif - } - } - - fclose(f); -#ifdef BUFFER_FILES - free(buffer); -#endif - return true; - } - return false; - } - - /* - * Dumps the content of this container into an ini file - */ - bool write_file(const char_type* filename) - { - if(FILE* f = fopen(filename, "w")) - { -#ifdef BUFFER_FILES - char* buffer = (char*) memalign(0x40, INI_BUFFER_SIZE); - setvbuf(f, buffer, _IOFBF, INI_BUFFER_SIZE); -#endif - bool first = true; - for(auto& sec : this->data) - { - fprintf(f, first? "[%s]\n" : "\n[%s]\n", sec.first.c_str()); - first = false; - for(auto& kv : sec.second) - { - if(kv.second.empty()) - fprintf(f, "%s\n", kv.first.c_str()); - else - fprintf(f, "%s = %s\n", kv.first.c_str(), kv.second.c_str()); - } - } - fclose(f); -#ifdef BUFFER_FILES - free(buffer); -#endif - return true; - } - return false; - } - - - /* - */ - bool load_file(const char_type* filename) - { - return read_file(filename); - } - - bool load_file(const StringType& filename) - { - return load_file(filename.c_str()); - } - - bool write_file(const StringType& filename) - { - return write_file(filename.c_str()); - } -#endif - - - - }; - - - /* Use default basic_ini - * - * Limitations: - * * Not unicode aware - * * Case sensitive - * * Sections must have unique keys - */ - typedef basic_ini<> ini; -} - -#endif - diff --git a/src/extras/postfx.cpp b/src/extras/postfx.cpp index 51b91060..425a22d4 100644 --- a/src/extras/postfx.cpp +++ b/src/extras/postfx.cpp @@ -7,6 +7,7 @@ #error "Need librw for EXTENDED_COLOURFILTER" #endif +#include "main.h" #include "RwHelper.h" #include "Camera.h" #include "MBlur.h" @@ -47,6 +48,9 @@ CPostFX::InitOnce(void) void CPostFX::Open(RwCamera *cam) { + if(pFrontBuffer) + Close(); + uint32 width = Pow(2.0f, int32(log2(RwRasterGetWidth (RwCameraGetRaster(cam))))+1); uint32 height = Pow(2.0f, int32(log2(RwRasterGetHeight(RwCameraGetRaster(cam))))+1); uint32 depth = RwRasterGetDepth(RwCameraGetRaster(cam)); @@ -141,16 +145,16 @@ CPostFX::Open(RwCamera *cam) #ifdef RW_D3D9 -#include "shaders/colourfilterIII_PS.inc" +#include "shaders/obj/colourfilterIII_PS.inc" colourfilterIII_PS = rw::d3d::createPixelShader(colourfilterIII_PS_cso); -#include "shaders/contrastPS.inc" +#include "shaders/obj/contrastPS.inc" contrast_PS = rw::d3d::createPixelShader(contrastPS_cso); #endif #ifdef RW_OPENGL using namespace rw::gl3; { -#include "shaders/im2d_gl.inc" -#include "shaders/colourfilterIII_fs_gl.inc" +#include "shaders/obj/im2d_vert.inc" +#include "shaders/obj/colourfilterIII_frag.inc" const char *vs[] = { shaderDecl, header_vert_src, im2d_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, colourfilterIII_frag_src, nil }; colourFilterIII = Shader::create(vs, fs); @@ -158,8 +162,8 @@ CPostFX::Open(RwCamera *cam) } { -#include "shaders/im2d_gl.inc" -#include "shaders/contrast_fs_gl.inc" +#include "shaders/obj/im2d_vert.inc" +#include "shaders/obj/contrast_frag.inc" const char *vs[] = { shaderDecl, header_vert_src, im2d_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, contrast_frag_src, nil }; contrast = Shader::create(vs, fs); @@ -407,6 +411,7 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu break; } + PUSH_RENDERGROUP("CPostFX::Render"); if(pFrontBuffer == nil) Open(cam); assert(pFrontBuffer); @@ -464,6 +469,8 @@ CPostFX::Render(RwCamera *cam, uint32 red, uint32 green, uint32 blue, uint32 blu bJustInitialised = false; }else bJustInitialised = true; + + POP_RENDERGROUP(); } #endif diff --git a/src/extras/screendroplets.cpp b/src/extras/screendroplets.cpp index 74c44da0..cc86808f 100644 --- a/src/extras/screendroplets.cpp +++ b/src/extras/screendroplets.cpp @@ -112,14 +112,14 @@ ScreenDroplets::InitDraw(void) openim2d_uv2(); #ifdef RW_D3D9 -#include "shaders/screenDroplet_PS.inc" +#include "shaders/obj/screenDroplet_PS.inc" screenDroplet_PS = rw::d3d::createPixelShader(screenDroplet_PS_cso); #endif #ifdef RW_GL3 using namespace rw::gl3; { -#include "shaders/im2d_UV2_gl.inc" -#include "shaders/screenDroplet_fs_gl.inc" +#include "shaders/obj/im2d_UV2_vert.inc" +#include "shaders/obj/screenDroplet_frag.inc" const char *vs[] = { shaderDecl, header_vert_src, im2d_UV2_vert_src, nil }; const char *fs[] = { shaderDecl, header_frag_src, screenDroplet_frag_src, nil }; screenDroplet = Shader::create(vs, fs); @@ -423,7 +423,7 @@ ScreenDroplets::ProcessCameraMovement(void) ms_movingEnabled = !isTopDown && !isLookingInDirection; // 0 when looking stright up, 180 when looking up or down - ms_camUpAngle = RADTODEG(Acos(clamp(camUp.z, -1.0f, 1.0f))); + ms_camUpAngle = RADTODEG(Acos(Clamp(camUp.z, -1.0f, 1.0f))); } void @@ -741,7 +741,7 @@ uint32 im2D_UV2_Vao; void openim2d_uv2(void) { - u_xform = rw::gl3::registerUniform("u_xform"); // this doesn't add a new one, so it's safe + u_xform = rw::gl3::registerUniform("u_xform", rw::gl3::UNIFORM_VEC4); // this doesn't add a new one, so it's safe glGenBuffers(1, &im2D_UV2_Ibo); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, im2D_UV2_Ibo); @@ -803,7 +803,7 @@ RenderIndexedPrimitive_UV2(RwPrimitiveType primType, Im2DVertexUV2 *vertices, Rw setAttribPointers(im2d_UV2_attribDesc, 4); #endif - glUniform4fv(currentShader->uniformLocations[u_xform], 1, xform); + setUniform(u_xform, xform); flushCache(); glDrawElements(primTypeMap[primType], numIndices, diff --git a/src/extras/shaders/Makefile b/src/extras/shaders/Makefile deleted file mode 100644 index 51e009d6..00000000 --- a/src/extras/shaders/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -all: im2d_gl.inc simple_fs_gl.inc default_UV2_gl.inc \ - colourfilterIII_fs_gl.inc contrast_fs_gl.inc \ - neoRim_gl.inc neoRimSkin_gl.inc \ - neoWorldIII_fs_gl.inc neoGloss_vs_gl.inc neoGloss_fs_gl.inc \ - neoVehicle_vs_gl.inc neoVehicle_fs_gl.inc \ - im2d_UV2_gl.inc screenDroplet_fs_gl.inc - -im2d_gl.inc: im2d.vert - (echo 'const char *im2d_vert_src =';\ - sed 's/..*/"&\\n"/' im2d.vert;\ - echo ';') >im2d_gl.inc - -simple_fs_gl.inc: simple.frag - (echo 'const char *simple_frag_src =';\ - sed 's/..*/"&\\n"/' simple.frag;\ - echo ';') >simple_fs_gl.inc - -default_UV2_gl.inc: default_UV2.vert - (echo 'const char *default_UV2_vert_src =';\ - sed 's/..*/"&\\n"/' default_UV2.vert;\ - echo ';') >default_UV2_gl.inc - - - -colourfilterIII_fs_gl.inc: colourfilterIII.frag - (echo 'const char *colourfilterIII_frag_src =';\ - sed 's/..*/"&\\n"/' colourfilterIII.frag;\ - echo ';') >colourfilterIII_fs_gl.inc - -contrast_fs_gl.inc: contrast.frag - (echo 'const char *contrast_frag_src =';\ - sed 's/..*/"&\\n"/' contrast.frag;\ - echo ';') >contrast_fs_gl.inc - - -neoRim_gl.inc: neoRim.vert - (echo 'const char *neoRim_vert_src =';\ - sed 's/..*/"&\\n"/' neoRim.vert;\ - echo ';') >neoRim_gl.inc - -neoRimSkin_gl.inc: neoRimSkin.vert - (echo 'const char *neoRimSkin_vert_src =';\ - sed 's/..*/"&\\n"/' neoRimSkin.vert;\ - echo ';') >neoRimSkin_gl.inc - -neoWorldIII_fs_gl.inc: neoWorldIII.frag - (echo 'const char *neoWorldIII_frag_src =';\ - sed 's/..*/"&\\n"/' neoWorldIII.frag;\ - echo ';') >neoWorldIII_fs_gl.inc - -neoGloss_fs_gl.inc: neoGloss.frag - (echo 'const char *neoGloss_frag_src =';\ - sed 's/..*/"&\\n"/' neoGloss.frag;\ - echo ';') >neoGloss_fs_gl.inc - -neoGloss_vs_gl.inc: neoGloss.vert - (echo 'const char *neoGloss_vert_src =';\ - sed 's/..*/"&\\n"/' neoGloss.vert;\ - echo ';') >neoGloss_vs_gl.inc - -neoVehicle_vs_gl.inc: neoVehicle.vert - (echo 'const char *neoVehicle_vert_src =';\ - sed 's/..*/"&\\n"/' neoVehicle.vert;\ - echo ';') >neoVehicle_vs_gl.inc - -neoVehicle_fs_gl.inc: neoVehicle.frag - (echo 'const char *neoVehicle_frag_src =';\ - sed 's/..*/"&\\n"/' neoVehicle.frag;\ - echo ';') >neoVehicle_fs_gl.inc - -im2d_UV2_gl.inc: im2d_UV2.vert - (echo 'const char *im2d_UV2_vert_src =';\ - sed 's/..*/"&\\n"/' im2d_UV2.vert;\ - echo ';') >im2d_UV2_gl.inc - -screenDroplet_fs_gl.inc: screenDroplet.frag - (echo 'const char *screenDroplet_frag_src =';\ - sed 's/..*/"&\\n"/' screenDroplet.frag;\ - echo ';') >screenDroplet_fs_gl.inc diff --git a/src/extras/shaders/colourfilterIII.frag b/src/extras/shaders/colourfilterIII.frag index b41cb94a..95e5d052 100644 --- a/src/extras/shaders/colourfilterIII.frag +++ b/src/extras/shaders/colourfilterIII.frag @@ -17,7 +17,7 @@ main(void) } vec4 color; color.rgb = prev.rgb; - color.a = 1.0f; + color.a = 1.0; FRAGCOLOR(color); } diff --git a/src/extras/shaders/colourfilterIII_PS.hlsl b/src/extras/shaders/colourfilterIII_PS.hlsl index 27f099ef..3d893c3c 100644 --- a/src/extras/shaders/colourfilterIII_PS.hlsl +++ b/src/extras/shaders/colourfilterIII_PS.hlsl @@ -10,6 +10,6 @@ float4 main(in float2 texcoord : TEXCOORD0) : COLOR0 float4 tmp = dst*(1-a) + prev*blurcol*a; prev = saturate(tmp); } - prev.a = 1.0f; + prev.a = 1.0; return prev; } diff --git a/src/extras/shaders/contrast.frag b/src/extras/shaders/contrast.frag index 1b93f6fe..2d394f66 100644 --- a/src/extras/shaders/contrast.frag +++ b/src/extras/shaders/contrast.frag @@ -12,7 +12,7 @@ main(void) vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y)); vec4 color; color.rgb = dst.rgb*u_contrastMult + u_contrastAdd; - color.a = 1.0f; + color.a = 1.0; FRAGCOLOR(color); } diff --git a/src/extras/shaders/make_glsl.sh b/src/extras/shaders/make_glsl.sh new file mode 100644 index 00000000..0af98961 --- /dev/null +++ b/src/extras/shaders/make_glsl.sh @@ -0,0 +1,9 @@ +#!sh +for i in *.vert; do + echo $i + ./makeinc_glsl.sh $i +done +for i in *.frag; do + echo $i + ./makeinc_glsl.sh $i +done diff --git a/src/extras/shaders/make.cmd b/src/extras/shaders/make_hlsl.cmd similarity index 58% rename from src/extras/shaders/make.cmd rename to src/extras/shaders/make_hlsl.cmd index 8404ac6c..dee95283 100644 --- a/src/extras/shaders/make.cmd +++ b/src/extras/shaders/make_hlsl.cmd @@ -1,3 +1,3 @@ @echo off -for %%f in (*PS.hlsl) do "%DXSDK_DIR%\Utilities\bin\x86\fxc.exe" /T ps_2_0 /nologo /E main /Fo %%~nf.cso %%f -for %%f in (*VS.hlsl) do "%DXSDK_DIR%\Utilities\bin\x86\fxc.exe" /T vs_2_0 /nologo /E main /Fo %%~nf.cso %%f +for %%f in (*PS.hlsl) do "%DXSDK_DIR%\Utilities\bin\x86\fxc.exe" /T ps_2_0 /nologo /E main /Fo obj\%%~nf.cso %%f +for %%f in (*VS.hlsl) do "%DXSDK_DIR%\Utilities\bin\x86\fxc.exe" /T vs_2_0 /nologo /E main /Fo obj\%%~nf.cso %%f diff --git a/src/extras/shaders/makeinc_glsl.sh b/src/extras/shaders/makeinc_glsl.sh new file mode 100644 index 00000000..2bc6a387 --- /dev/null +++ b/src/extras/shaders/makeinc_glsl.sh @@ -0,0 +1,6 @@ +#!sh +ext=${1##*.} +name=${1%.*} +(echo "const char *${name}_${ext}_src =";\ +sed 's/..*/"&\\n"/' $1;\ +echo ';') > obj/${name}_${ext}.inc diff --git a/src/extras/shaders/makeinc.sh b/src/extras/shaders/makeinc_hlsl.sh similarity index 93% rename from src/extras/shaders/makeinc.sh rename to src/extras/shaders/makeinc_hlsl.sh index a649af33..a5b12867 100644 --- a/src/extras/shaders/makeinc.sh +++ b/src/extras/shaders/makeinc_hlsl.sh @@ -1,4 +1,5 @@ #!sh +cd obj for i in *cso; do (echo -n 'static ' xxd -i $i | grep -v '_len = ') > ${i%cso}inc diff --git a/src/extras/shaders/neoVehicle.vert b/src/extras/shaders/neoVehicle.vert index f0224ddb..6985a689 100644 --- a/src/extras/shaders/neoVehicle.vert +++ b/src/extras/shaders/neoVehicle.vert @@ -42,7 +42,7 @@ main(void) v_tex1 = uv2.xy*0.5 + 0.5; float b = 1.0 - clamp(dot(viewVec, Normal), 0.0, 1.0); v_reflcolor = vec4(0.0, 0.0, 0.0, 1.0); - v_reflcolor.a = mix(b*b*b*b*b, 1.0f, fresnel)*shininess; + v_reflcolor.a = mix(b*b*b*b*b, 1.0, fresnel)*shininess; for(int i = 0; i < 5; i++) v_reflcolor.rgb += DoDirLightSpec(u_specDir[i].xyz, u_specColor[i].rgb, Normal, viewVec, u_specDir[i].w)*specularity*lightStrength; diff --git a/src/extras/shaders/neoVehicle_VS.hlsl b/src/extras/shaders/neoVehicle_VS.hlsl index de75e745..fb730092 100644 --- a/src/extras/shaders/neoVehicle_VS.hlsl +++ b/src/extras/shaders/neoVehicle_VS.hlsl @@ -52,7 +52,7 @@ VS_out main(in VS_in input) output.TexCoord1 = uv2.xy*0.5 + 0.5; float b = 1.0 - saturate(dot(viewVec, Normal)); output.ReflColor = float4(0.0, 0.0, 0.0, 1.0); - output.ReflColor.a = lerp(b*b*b*b*b, 1.0f, fresnel)*shininess; + output.ReflColor.a = lerp(b*b*b*b*b, 1.0, fresnel)*shininess; //Light mainLight = lights[0]; for(i = 0; i < 5; i++) diff --git a/src/extras/shaders/colourfilterIII_PS.cso b/src/extras/shaders/obj/colourfilterIII_PS.cso similarity index 100% rename from src/extras/shaders/colourfilterIII_PS.cso rename to src/extras/shaders/obj/colourfilterIII_PS.cso diff --git a/src/extras/shaders/colourfilterIII_PS.inc b/src/extras/shaders/obj/colourfilterIII_PS.inc similarity index 100% rename from src/extras/shaders/colourfilterIII_PS.inc rename to src/extras/shaders/obj/colourfilterIII_PS.inc diff --git a/src/extras/shaders/colourfilterIII_fs_gl.inc b/src/extras/shaders/obj/colourfilterIII_frag.inc similarity index 96% rename from src/extras/shaders/colourfilterIII_fs_gl.inc rename to src/extras/shaders/obj/colourfilterIII_frag.inc index 6fd1935b..05f92785 100644 --- a/src/extras/shaders/colourfilterIII_fs_gl.inc +++ b/src/extras/shaders/obj/colourfilterIII_frag.inc @@ -18,7 +18,7 @@ const char *colourfilterIII_frag_src = " }\n" " vec4 color;\n" " color.rgb = prev.rgb;\n" -" color.a = 1.0f;\n" +" color.a = 1.0;\n" " FRAGCOLOR(color);\n" "}\n" diff --git a/src/extras/shaders/contrastPS.cso b/src/extras/shaders/obj/contrastPS.cso similarity index 100% rename from src/extras/shaders/contrastPS.cso rename to src/extras/shaders/obj/contrastPS.cso diff --git a/src/extras/shaders/contrastPS.inc b/src/extras/shaders/obj/contrastPS.inc similarity index 100% rename from src/extras/shaders/contrastPS.inc rename to src/extras/shaders/obj/contrastPS.inc diff --git a/src/extras/shaders/contrast_fs_gl.inc b/src/extras/shaders/obj/contrast_frag.inc similarity index 94% rename from src/extras/shaders/contrast_fs_gl.inc rename to src/extras/shaders/obj/contrast_frag.inc index 97f78194..a1ad479f 100644 --- a/src/extras/shaders/contrast_fs_gl.inc +++ b/src/extras/shaders/obj/contrast_frag.inc @@ -13,7 +13,7 @@ const char *contrast_frag_src = " vec4 dst = texture(tex0, vec2(v_tex0.x, 1.0-v_tex0.y));\n" " vec4 color;\n" " color.rgb = dst.rgb*u_contrastMult + u_contrastAdd;\n" -" color.a = 1.0f;\n" +" color.a = 1.0;\n" " FRAGCOLOR(color);\n" "}\n" diff --git a/src/extras/shaders/default_UV2_VS.cso b/src/extras/shaders/obj/default_UV2_VS.cso similarity index 100% rename from src/extras/shaders/default_UV2_VS.cso rename to src/extras/shaders/obj/default_UV2_VS.cso diff --git a/src/extras/shaders/default_UV2_VS.inc b/src/extras/shaders/obj/default_UV2_VS.inc similarity index 100% rename from src/extras/shaders/default_UV2_VS.inc rename to src/extras/shaders/obj/default_UV2_VS.inc diff --git a/src/extras/shaders/default_UV2_gl.inc b/src/extras/shaders/obj/default_UV2_vert.inc similarity index 100% rename from src/extras/shaders/default_UV2_gl.inc rename to src/extras/shaders/obj/default_UV2_vert.inc diff --git a/src/extras/shaders/im2d_UV2_gl.inc b/src/extras/shaders/obj/im2d_UV2_vert.inc similarity index 100% rename from src/extras/shaders/im2d_UV2_gl.inc rename to src/extras/shaders/obj/im2d_UV2_vert.inc diff --git a/src/extras/shaders/im2d_gl.inc b/src/extras/shaders/obj/im2d_vert.inc similarity index 100% rename from src/extras/shaders/im2d_gl.inc rename to src/extras/shaders/obj/im2d_vert.inc diff --git a/src/extras/shaders/neoGloss_PS.cso b/src/extras/shaders/obj/neoGloss_PS.cso similarity index 100% rename from src/extras/shaders/neoGloss_PS.cso rename to src/extras/shaders/obj/neoGloss_PS.cso diff --git a/src/extras/shaders/neoGloss_PS.inc b/src/extras/shaders/obj/neoGloss_PS.inc similarity index 100% rename from src/extras/shaders/neoGloss_PS.inc rename to src/extras/shaders/obj/neoGloss_PS.inc diff --git a/src/extras/shaders/neoGloss_VS.cso b/src/extras/shaders/obj/neoGloss_VS.cso similarity index 100% rename from src/extras/shaders/neoGloss_VS.cso rename to src/extras/shaders/obj/neoGloss_VS.cso diff --git a/src/extras/shaders/neoGloss_VS.inc b/src/extras/shaders/obj/neoGloss_VS.inc similarity index 100% rename from src/extras/shaders/neoGloss_VS.inc rename to src/extras/shaders/obj/neoGloss_VS.inc diff --git a/src/extras/shaders/neoGloss_fs_gl.inc b/src/extras/shaders/obj/neoGloss_frag.inc similarity index 100% rename from src/extras/shaders/neoGloss_fs_gl.inc rename to src/extras/shaders/obj/neoGloss_frag.inc diff --git a/src/extras/shaders/neoGloss_vs_gl.inc b/src/extras/shaders/obj/neoGloss_vert.inc similarity index 100% rename from src/extras/shaders/neoGloss_vs_gl.inc rename to src/extras/shaders/obj/neoGloss_vert.inc diff --git a/src/extras/shaders/neoRimSkin_VS.cso b/src/extras/shaders/obj/neoRimSkin_VS.cso similarity index 100% rename from src/extras/shaders/neoRimSkin_VS.cso rename to src/extras/shaders/obj/neoRimSkin_VS.cso diff --git a/src/extras/shaders/neoRimSkin_VS.inc b/src/extras/shaders/obj/neoRimSkin_VS.inc similarity index 100% rename from src/extras/shaders/neoRimSkin_VS.inc rename to src/extras/shaders/obj/neoRimSkin_VS.inc diff --git a/src/extras/shaders/neoRimSkin_gl.inc b/src/extras/shaders/obj/neoRimSkin_vert.inc similarity index 100% rename from src/extras/shaders/neoRimSkin_gl.inc rename to src/extras/shaders/obj/neoRimSkin_vert.inc diff --git a/src/extras/shaders/neoRim_VS.cso b/src/extras/shaders/obj/neoRim_VS.cso similarity index 100% rename from src/extras/shaders/neoRim_VS.cso rename to src/extras/shaders/obj/neoRim_VS.cso diff --git a/src/extras/shaders/neoRim_VS.inc b/src/extras/shaders/obj/neoRim_VS.inc similarity index 100% rename from src/extras/shaders/neoRim_VS.inc rename to src/extras/shaders/obj/neoRim_VS.inc diff --git a/src/extras/shaders/neoRim_gl.inc b/src/extras/shaders/obj/neoRim_vert.inc similarity index 100% rename from src/extras/shaders/neoRim_gl.inc rename to src/extras/shaders/obj/neoRim_vert.inc diff --git a/src/extras/shaders/neoVehicle_PS.cso b/src/extras/shaders/obj/neoVehicle_PS.cso similarity index 100% rename from src/extras/shaders/neoVehicle_PS.cso rename to src/extras/shaders/obj/neoVehicle_PS.cso diff --git a/src/extras/shaders/neoVehicle_PS.inc b/src/extras/shaders/obj/neoVehicle_PS.inc similarity index 100% rename from src/extras/shaders/neoVehicle_PS.inc rename to src/extras/shaders/obj/neoVehicle_PS.inc diff --git a/src/extras/shaders/neoVehicle_VS.cso b/src/extras/shaders/obj/neoVehicle_VS.cso similarity index 100% rename from src/extras/shaders/neoVehicle_VS.cso rename to src/extras/shaders/obj/neoVehicle_VS.cso diff --git a/src/extras/shaders/neoVehicle_VS.inc b/src/extras/shaders/obj/neoVehicle_VS.inc similarity index 100% rename from src/extras/shaders/neoVehicle_VS.inc rename to src/extras/shaders/obj/neoVehicle_VS.inc diff --git a/src/extras/shaders/neoVehicle_fs_gl.inc b/src/extras/shaders/obj/neoVehicle_frag.inc similarity index 100% rename from src/extras/shaders/neoVehicle_fs_gl.inc rename to src/extras/shaders/obj/neoVehicle_frag.inc diff --git a/src/extras/shaders/neoVehicle_vs_gl.inc b/src/extras/shaders/obj/neoVehicle_vert.inc similarity index 96% rename from src/extras/shaders/neoVehicle_vs_gl.inc rename to src/extras/shaders/obj/neoVehicle_vert.inc index b7b42622..ebd0ea12 100644 --- a/src/extras/shaders/neoVehicle_vs_gl.inc +++ b/src/extras/shaders/obj/neoVehicle_vert.inc @@ -43,7 +43,7 @@ const char *neoVehicle_vert_src = " v_tex1 = uv2.xy*0.5 + 0.5;\n" " float b = 1.0 - clamp(dot(viewVec, Normal), 0.0, 1.0);\n" " v_reflcolor = vec4(0.0, 0.0, 0.0, 1.0);\n" -" v_reflcolor.a = mix(b*b*b*b*b, 1.0f, fresnel)*shininess;\n" +" v_reflcolor.a = mix(b*b*b*b*b, 1.0, fresnel)*shininess;\n" " for(int i = 0; i < 5; i++)\n" " v_reflcolor.rgb += DoDirLightSpec(u_specDir[i].xyz, u_specColor[i].rgb, Normal, viewVec, u_specDir[i].w)*specularity*lightStrength;\n" diff --git a/src/extras/shaders/neoWorldIII_PS.cso b/src/extras/shaders/obj/neoWorldIII_PS.cso similarity index 100% rename from src/extras/shaders/neoWorldIII_PS.cso rename to src/extras/shaders/obj/neoWorldIII_PS.cso diff --git a/src/extras/shaders/neoWorldIII_PS.inc b/src/extras/shaders/obj/neoWorldIII_PS.inc similarity index 100% rename from src/extras/shaders/neoWorldIII_PS.inc rename to src/extras/shaders/obj/neoWorldIII_PS.inc diff --git a/src/extras/shaders/neoWorldIII_fs_gl.inc b/src/extras/shaders/obj/neoWorldIII_frag.inc similarity index 100% rename from src/extras/shaders/neoWorldIII_fs_gl.inc rename to src/extras/shaders/obj/neoWorldIII_frag.inc diff --git a/src/extras/shaders/screenDroplet_PS.cso b/src/extras/shaders/obj/screenDroplet_PS.cso similarity index 100% rename from src/extras/shaders/screenDroplet_PS.cso rename to src/extras/shaders/obj/screenDroplet_PS.cso diff --git a/src/extras/shaders/screenDroplet_PS.inc b/src/extras/shaders/obj/screenDroplet_PS.inc similarity index 100% rename from src/extras/shaders/screenDroplet_PS.inc rename to src/extras/shaders/obj/screenDroplet_PS.inc diff --git a/src/extras/shaders/screenDroplet_fs_gl.inc b/src/extras/shaders/obj/screenDroplet_frag.inc similarity index 100% rename from src/extras/shaders/screenDroplet_fs_gl.inc rename to src/extras/shaders/obj/screenDroplet_frag.inc diff --git a/src/extras/shaders/simple_fs_gl.inc b/src/extras/shaders/obj/simple_frag.inc similarity index 100% rename from src/extras/shaders/simple_fs_gl.inc rename to src/extras/shaders/obj/simple_frag.inc diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp index 366dcf3e..6dfebb39 100644 --- a/src/fakerw/fake.cpp +++ b/src/fakerw/fake.cpp @@ -235,8 +235,8 @@ RwRaster *RwRasterGetCurrentContext(void) { return Raster::getCurrentContext( RwBool RwRasterClear(RwInt32 pixelValue); RwBool RwRasterClearRect(RwRect * rpRect, RwInt32 pixelValue); RwRaster *RwRasterShowRaster(RwRaster * raster, void *dev, RwUInt32 flags); -RwUInt8 *RwRasterLock(RwRaster * raster, RwUInt8 level, RwInt32 lockMode); -RwRaster *RwRasterUnlock(RwRaster * raster); +RwUInt8 *RwRasterLock(RwRaster * raster, RwUInt8 level, RwInt32 lockMode) { return raster->lock(level, lockMode); } +RwRaster *RwRasterUnlock(RwRaster * raster) { raster->unlock(0); return raster; } RwUInt8 *RwRasterLockPalette(RwRaster * raster, RwInt32 lockMode); RwRaster *RwRasterUnlockPalette(RwRaster * raster); RwInt32 RwRasterRegisterPlugin(RwInt32 size, RwUInt32 pluginID, RwPluginObjectConstructor constructCB, RwPluginObjectDestructor destructCB, RwPluginObjectCopy copyCB); @@ -945,6 +945,43 @@ RtBMPImageRead(const RwChar *imageName) #endif } + +RwImage * +RtPNGImageWrite(RwImage *image, const RwChar *imageName) +{ +#ifndef _WIN32 + char *r = casepath(imageName); + if (r) { + rw::writePNG(image, r); + free(r); + } else { + rw::writePNG(image, imageName); + } + +#else + rw::writePNG(image, imageName); +#endif + return image; +} +RwImage * +RtPNGImageRead(const RwChar *imageName) +{ +#ifndef _WIN32 + RwImage *image; + char *r = casepath(imageName); + if (r) { + image = rw::readPNG(r); + free(r); + } else { + image = rw::readPNG(imageName); + } + return image; + +#else + return rw::readPNG(imageName); +#endif +} + #include "rtquat.h" RtQuat *RtQuatRotate(RtQuat * quat, const RwV3d * axis, RwReal angle, RwOpCombineType combineOp) { return (RtQuat*)((rw::Quat*)quat)->rotate(axis, angle/180.0f*3.14159f, (CombineOp)combineOp); } diff --git a/src/fakerw/rtpng.h b/src/fakerw/rtpng.h new file mode 100644 index 00000000..80f29020 --- /dev/null +++ b/src/fakerw/rtpng.h @@ -0,0 +1,4 @@ +#pragma once + +RwImage *RtPNGImageWrite(RwImage * image, const RwChar * imageName); +RwImage *RtPNGImageRead(const RwChar * imageName); diff --git a/src/fakerw/rwcore.h b/src/fakerw/rwcore.h index e5d21865..ab0a719f 100644 --- a/src/fakerw/rwcore.h +++ b/src/fakerw/rwcore.h @@ -104,6 +104,14 @@ enum RwRasterFormat rwRASTERFORMATMASK = 0xff00 }; +enum RwRasterLockMode +{ + rwRASTERLOCKWRITE = rw::Raster::LOCKWRITE, + rwRASTERLOCKREAD = rw::Raster::LOCKREAD, + rwRASTERLOCKNOFETCH = rw::Raster::LOCKNOFETCH, + rwRASTERLOCKRAW = rw::Raster::LOCKRAW, +}; + enum RwRasterFlipMode { rwRASTERFLIPDONTWAIT = 0, diff --git a/src/math/Matrix.h b/src/math/Matrix.h index e9629901..df85f468 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -72,22 +72,6 @@ public: void SetRotateXOnly(float angle); void SetRotateYOnly(float angle); void SetRotateZOnly(float angle); - void SetRotateZOnlyScaled(float angle, float scale) { - float c = Cos(angle); - float s = Sin(angle); - - rx = c * scale; - ry = s * scale; - rz = 0.0f; - - fx = -s * scale; - fy = c * scale; - fz = 0.0f; - - ux = 0.0f; - uy = 0.0f; - uz = scale; - } void SetRotateX(float angle); void SetRotateY(float angle); void SetRotateZ(float angle); diff --git a/src/math/VuVector.h b/src/math/VuVector.h index 30d62cfc..41584095 100644 --- a/src/math/VuVector.h +++ b/src/math/VuVector.h @@ -22,6 +22,8 @@ public: x = 1.0f; } */ + + // TODO: operator- }; void TransformPoint(CVuVector &out, const CMatrix &mat, const CVuVector &in); diff --git a/src/math/maths.h b/src/math/maths.h index 8d68bf64..6a228036 100644 --- a/src/math/maths.h +++ b/src/math/maths.h @@ -10,7 +10,7 @@ inline float Acos(float x) { return acosf(x); } inline float Tan(float x) { return tanf(x); } inline float Atan(float x) { return atanf(x); } inline float Atan2(float y, float x) { return atan2f(y, x); } -inline float Abs(float x) { return fabs(x); } +inline float Abs(float x) { return fabsf(x); } inline float Sqrt(float x) { return sqrtf(x); } inline float RecipSqrt(float x, float y) { return x/Sqrt(y); } inline float RecipSqrt(float x) { return RecipSqrt(1.0f, x); } diff --git a/src/modelinfo/MloModelInfo.h b/src/modelinfo/MloModelInfo.h index d4344706..b1ae3298 100644 --- a/src/modelinfo/MloModelInfo.h +++ b/src/modelinfo/MloModelInfo.h @@ -5,7 +5,7 @@ class CMloModelInfo : public CClumpModelInfo { public: - float field_34; // draw distance? + float drawDist; int firstInstance; int lastInstance; public: diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h index 4fe1ebb0..4d24e78f 100644 --- a/src/modelinfo/ModelInfo.h +++ b/src/modelinfo/ModelInfo.h @@ -43,6 +43,9 @@ public: static CBaseModelInfo *GetModelInfo(int id){ return ms_modelInfoPtrs[id]; } + static CColModel *GetColModel(int id){ + return ms_modelInfoPtrs[id]->GetColModel(); + } static bool IsBoatModel(int32 id); static bool IsBikeModel(int32 id); diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp index d0816467..2cce48f4 100644 --- a/src/modelinfo/PedModelInfo.cpp +++ b/src/modelinfo/PedModelInfo.cpp @@ -317,6 +317,10 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump) for(int i = 0; i < NUMPEDINFONODES; i++){ *mat = *invmat; + // From LCS. Otherwise gives FPE +#ifdef FIX_BUGS + spheres[i].center = CVector(0.0f, 0.0f, 0.0f); +#else int id = ConvertPedNode2BoneTag(m_pColNodeInfos[i].pedNode); // this is wrong, wtf R* ??? int idx = RpHAnimIDGetIndex(hier, id); @@ -326,6 +330,7 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump) RwV3dTransformPoints(&pos, &pos, 1, mat); spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z); +#endif spheres[i].radius = m_pColNodeInfos[i].radius; spheres[i].surface = SURFACE_PED; spheres[i].piece = m_pColNodeInfos[i].pieceType; diff --git a/src/modelinfo/XtraCompsModelInfo.h b/src/modelinfo/XtraCompsModelInfo.h index 9832399c..ab308a8a 100644 --- a/src/modelinfo/XtraCompsModelInfo.h +++ b/src/modelinfo/XtraCompsModelInfo.h @@ -7,6 +7,7 @@ class CXtraCompsModelInfo : public CClumpModelInfo int field_34; public: CXtraCompsModelInfo(void) : CClumpModelInfo(MITYPE_XTRACOMPS) { field_34 = 0; } - void SetClump(RpClump*) {}; void Shutdown(void) {}; + RwObject *CreateInstance(void) { return nil; } + void SetClump(RpClump*) {}; }; \ No newline at end of file diff --git a/src/objects/CutsceneHead.cpp b/src/objects/CutsceneHead.cpp index 15611c29..19b3a592 100644 --- a/src/objects/CutsceneHead.cpp +++ b/src/objects/CutsceneHead.cpp @@ -85,7 +85,6 @@ CCutsceneHead::ProcessControl(void) { m_matrix.SetRotateY(PI/2); m_matrix = CMatrix(RwFrameGetLTM(m_pHeadNode)) * m_matrix; - UpdateRwFrame(); // android/xbox don't call this } assert(RwObjectGetType(m_rwObject) == rpCLUMP); @@ -95,7 +94,7 @@ CCutsceneHead::ProcessControl(void) // PS2 only plays anims in cutscene, PC always plays anims if(!lastLoadedSKA || CCutsceneMgr::IsRunning()) #endif - RpHAnimHierarchyAddAnimTime(hier, CTimer::GetTimeStepNonClipped()/50.0f); + RpHAnimHierarchyAddAnimTime(hier, CTimer::GetTimeStepNonClippedInSeconds()); } void diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index 411e245a..2a7de2c7 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -16,10 +16,32 @@ int16 CObject::nNoTempObjects; int16 CObject::nBodyCastHealth = 1000; -void *CObject::operator new(size_t sz) { return CPools::GetObjectPool()->New(); } -void *CObject::operator new(size_t sz, int handle) { return CPools::GetObjectPool()->New(handle);}; -void CObject::operator delete(void *p, size_t sz) { CPools::GetObjectPool()->Delete((CObject*)p); } -void CObject::operator delete(void *p, int handle) { CPools::GetObjectPool()->Delete((CObject*)p); } +// Object pools tends to be full sometimes, let's free a temp. object in this case. +#ifdef FIX_BUGS +void *CObject::operator new(size_t sz) throw() { + CObject *obj = CPools::GetObjectPool()->New(); + if (!obj) { + CObjectPool *objectPool = CPools::GetObjectPool(); + for (int32 i = 0; i < objectPool->GetSize(); i++) { + CObject *existing = objectPool->GetSlot(i); + if (existing && existing->ObjectCreatedBy == TEMP_OBJECT) { + int32 handle = objectPool->GetIndex(existing); + CWorld::Remove(existing); + delete existing; + obj = objectPool->New(handle); + break; + } + } + } + return obj; +} +#else +void *CObject::operator new(size_t sz) throw() { return CPools::GetObjectPool()->New(); } +#endif +void *CObject::operator new(size_t sz, int handle) throw() { return CPools::GetObjectPool()->New(handle); }; + +void CObject::operator delete(void *p, size_t sz) throw() { CPools::GetObjectPool()->Delete((CObject*)p); } +void CObject::operator delete(void *p, int handle) throw() { CPools::GetObjectPool()->Delete((CObject*)p); } CObject::CObject(void) { @@ -63,7 +85,7 @@ CObject::CObject(CDummyObject *dummy) if (dummy->m_rwObject) AttachToRwObject(dummy->m_rwObject); else - GetMatrix() = dummy->GetMatrix(); + SetMatrix(dummy->GetMatrix()); m_objectMatrix = dummy->GetMatrix(); dummy->DetachFromRwObject(); @@ -112,8 +134,8 @@ void CObject::Teleport(CVector vecPos) { CWorld::Remove(this); - m_matrix.GetPosition() = vecPos; - m_matrix.UpdateRW(); + GetMatrix().GetPosition() = vecPos; + GetMatrix().UpdateRW(); UpdateRwFrame(); CWorld::Add(this); } @@ -170,7 +192,7 @@ CObject::ObjectDamage(float amount) amount = 0.0f; } if ((amount * m_fCollisionDamageMultiplier > 150.0f || bBodyCastDamageEffect) && m_nCollisionDamageEffect) { - const CVector& vecPos = m_matrix.GetPosition(); + const CVector& vecPos = GetMatrix().GetPosition(); const float fDirectionZ = 0.0002f * amount; switch (m_nCollisionDamageEffect) { @@ -329,7 +351,7 @@ CObject::Init(void) m_pCollidingEntity = nil; CColPoint point; CEntity* outEntity = nil; - const CVector& vecPos = m_matrix.GetPosition(); + const CVector& vecPos = GetMatrix().GetPosition(); if (CWorld::ProcessVerticalLine(vecPos, vecPos.z - 10.0f, point, outEntity, true, false, false, false, false, false, nil)) m_pCurSurface = outEntity; else diff --git a/src/objects/Object.h b/src/objects/Object.h index c9a1bba8..114a1a9f 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -65,10 +65,10 @@ public: static int16 nNoTempObjects; static int16 nBodyCastHealth; - 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(); CObject(void); CObject(int32, bool); diff --git a/src/objects/ParticleObject.cpp b/src/objects/ParticleObject.cpp index 71f223d7..5d480ecc 100644 --- a/src/objects/ParticleObject.cpp +++ b/src/objects/ParticleObject.cpp @@ -10,6 +10,12 @@ #include "DMAudio.h" #include "screendroplets.h" +#ifdef COMPATIBLE_SAVES +#define PARTICLE_OBJECT_SIZEOF 0x88 +#else +#define PARTICLE_OBJECT_SIZEOF sizeof(CParticleObject) +#endif + CParticleObject gPObjectArray[MAX_PARTICLEOBJECTS]; @@ -33,7 +39,7 @@ CAudioHydrant::Add(CParticleObject *particleobject) if ( AEHANDLE_IS_FAILED(List[i].AudioEntity) ) return false; - DMAudio.SetEntityStatus(List[i].AudioEntity, true); + DMAudio.SetEntityStatus(List[i].AudioEntity, TRUE); List[i].pParticleObject = particleobject; @@ -1111,6 +1117,49 @@ CParticleObject::UpdateFar(void) } } +#ifdef COMPATIBLE_SAVES +static inline void +SaveOneParticle(CParticleObject *p, uint8 *&buffer) +{ +#define SkipBuf(buf, num) buf += num +#define ZeroBuf(buf, num) memset(buf, 0, num); SkipBuf(buf, num) +#define CopyToBuf(buf, data) memcpy(buf, &data, sizeof(data)); SkipBuf(buf, sizeof(data)) + // CPlaceable + { + ZeroBuf(buffer, 4); + CopyToBuf(buffer, p->GetMatrix().f); + ZeroBuf(buffer, 4); + CopyToBuf(buffer, p->GetMatrix().m_hasRwMatrix); + ZeroBuf(buffer, 3); + } + + // CParticleObject + { + ZeroBuf(buffer, 4); + ZeroBuf(buffer, 4); + ZeroBuf(buffer, 4); + CopyToBuf(buffer, p->m_nRemoveTimer); + CopyToBuf(buffer, p->m_Type); + CopyToBuf(buffer, p->m_ParticleType); + CopyToBuf(buffer, p->m_nNumEffectCycles); + CopyToBuf(buffer, p->m_nSkipFrames); + CopyToBuf(buffer, p->m_nFrameCounter); + CopyToBuf(buffer, p->m_nState); + ZeroBuf(buffer, 2); + CopyToBuf(buffer, p->m_vecTarget); + CopyToBuf(buffer, p->m_fRandVal); + CopyToBuf(buffer, p->m_fSize); + CopyToBuf(buffer, p->m_Color); + CopyToBuf(buffer, p->m_bRemove); + CopyToBuf(buffer, p->m_nCreationChance); + ZeroBuf(buffer, 2); + } +#undef SkipBuf +#undef ZeroBuf +#undef CopyToBuf +} +#endif + bool CParticleObject::SaveParticle(uint8 *buffer, uint32 *length) { @@ -1128,27 +1177,35 @@ CParticleObject::SaveParticle(uint8 *buffer, uint32 *length) *(int32 *)buffer = numObjects; buffer += sizeof(int32); - int32 objectsLength = sizeof(CParticleObject) * (numObjects + 1); + int32 objectsLength = PARTICLE_OBJECT_SIZEOF * (numObjects + 1); int32 dataLength = objectsLength + sizeof(int32); for ( CParticleObject *p = pCloseListHead; p != NULL; p = p->m_pNext ) { -#if 0 // todo better +#ifdef COMPATIBLE_SAVES + SaveOneParticle(p, buffer); +#else +#ifdef THIS_IS_STUPID *(CParticleObject*)buffer = *p; #else memcpy(buffer, p, sizeof(CParticleObject)); #endif buffer += sizeof(CParticleObject); +#endif } for ( CParticleObject *p = pFarListHead; p != NULL; p = p->m_pNext ) { -#if 0 // todo better +#ifdef COMPATIBLE_SAVES + SaveOneParticle(p, buffer); +#else +#ifdef THIS_IS_STUPID *(CParticleObject*)buffer = *p; #else memcpy(buffer, p, sizeof(CParticleObject)); #endif buffer += sizeof(CParticleObject); +#endif } *length = dataLength; @@ -1166,7 +1223,7 @@ CParticleObject::LoadParticle(uint8 *buffer, uint32 length) int32 numObjects = *(int32 *)buffer; buffer += sizeof(int32); - if ( length != sizeof(CParticleObject) * (numObjects + 1) + sizeof(int32) ) + if ( length != PARTICLE_OBJECT_SIZEOF * (numObjects + 1) + sizeof(int32) ) return false; if ( numObjects == 0 ) @@ -1177,14 +1234,17 @@ CParticleObject::LoadParticle(uint8 *buffer, uint32 length) while ( i < numObjects ) { CParticleObject *dst = pUnusedListHead; +#ifndef COMPATIBLE_SAVES CParticleObject *src = (CParticleObject *)buffer; buffer += sizeof(CParticleObject); +#endif if ( dst == NULL ) return false; MoveToList(&pUnusedListHead, &pCloseListHead, dst); +#ifndef COMPATIBLE_SAVES dst->m_nState = POBJECTSTATE_UPDATE_CLOSE; dst->m_Type = src->m_Type; dst->m_ParticleType = src->m_ParticleType; @@ -1200,6 +1260,47 @@ CParticleObject::LoadParticle(uint8 *buffer, uint32 length) dst->m_nNumEffectCycles = src->m_nNumEffectCycles; dst->m_nSkipFrames = src->m_nSkipFrames; dst->m_nCreationChance = src->m_nCreationChance; +#else + dst->m_nState = POBJECTSTATE_UPDATE_CLOSE; + dst->m_pParticle = NULL; + +#define SkipBuf(buf, num) buf += num +#define CopyFromBuf(buf, data) memcpy(&data, buf, sizeof(data)); SkipBuf(buf, sizeof(data)) + // CPlaceable + { + SkipBuf(buffer, 4); + CMatrix matrix; + CopyFromBuf(buffer, matrix.f); + SkipBuf(buffer, 4); + CopyFromBuf(buffer, matrix.m_hasRwMatrix); + SkipBuf(buffer, 3); + dst->SetPosition(matrix.GetPosition()); + } + + // CParticleObject + { + SkipBuf(buffer, 4); + SkipBuf(buffer, 4); + SkipBuf(buffer, 4); + CopyFromBuf(buffer, dst->m_nRemoveTimer); + CopyFromBuf(buffer, dst->m_Type); + CopyFromBuf(buffer, dst->m_ParticleType); + CopyFromBuf(buffer, dst->m_nNumEffectCycles); + CopyFromBuf(buffer, dst->m_nSkipFrames); + CopyFromBuf(buffer, dst->m_nFrameCounter); + SkipBuf(buffer, 2); + SkipBuf(buffer, 2); + CopyFromBuf(buffer, dst->m_vecTarget); + CopyFromBuf(buffer, dst->m_fRandVal); + CopyFromBuf(buffer, dst->m_fSize); + CopyFromBuf(buffer, dst->m_Color); + CopyFromBuf(buffer, dst->m_bRemove); + CopyFromBuf(buffer, dst->m_nCreationChance); + SkipBuf(buffer, 2); + } +#undef CopyFromBuf +#undef SkipBuf +#endif i++; } diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp index 29612ccf..44e3baf0 100644 --- a/src/peds/CopPed.cpp +++ b/src/peds/CopPed.cpp @@ -239,9 +239,9 @@ CCopPed::ArrestPlayer(void) if (suspect && (suspect->m_nPedState == PED_ARRESTED || suspect->DyingOrDead() || suspect->EnteringCar())) { - CAnimBlendAssociation *arrestAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ARREST_GUN); + CAnimBlendAssociation *arrestAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ARREST); if (!arrestAssoc || arrestAssoc->blendDelta < 0.0f) - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ARREST_GUN, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ARREST, 4.0f); CVector suspMidPos; suspect->m_pedIK.GetComponentPosition(suspMidPos, PED_MID); @@ -401,7 +401,7 @@ CCopPed::CopAI(void) if (m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT && !m_bZoneDisabled) { CVector targetDist = playerOrHisVeh->GetPosition() - GetPosition(); if (m_fDistanceToTarget > 30.0f) { - CAnimBlendAssociation* crouchShootAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RBLOCK_CSHOOT); + CAnimBlendAssociation* crouchShootAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RBLOCK_SHOOT); if (crouchShootAssoc) crouchShootAssoc->blendDelta = -1000.0f; diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp index 9f87c12b..d8c8309e 100644 --- a/src/peds/EmergencyPed.cpp +++ b/src/peds/EmergencyPed.cpp @@ -317,7 +317,7 @@ CEmergencyPed::MedicAI(void) m_nEmergencyPedState = EMERGENCY_PED_STAND_STILL; } else { m_nEmergencyPedState = EMERGENCY_PED_FACE_TO_PATIENT; - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CPR, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_MEDIC_CPR, 4.0f); bIsDucking = true; } SetLookTimer(2000); diff --git a/src/peds/Gangs.cpp b/src/peds/Gangs.cpp index 8859e61e..be29379c 100644 --- a/src/peds/Gangs.cpp +++ b/src/peds/Gangs.cpp @@ -3,6 +3,7 @@ #include "ModelIndices.h" #include "Gangs.h" #include "Weapon.h" +#include "SaveBuf.h" CGangInfo CGangs::Gang[NUM_GANGS]; @@ -72,6 +73,6 @@ INITSAVEBUF CheckSaveHeader(buf, 'G','N','G','\0', size - SAVE_HEADER_SIZE); for (int i = 0; i < NUM_GANGS; i++) - Gang[i] = ReadSaveBuf(buf); + ReadSaveBuf(&Gang[i], buf); VALIDATESAVEBUF(size); } diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 87e77ef3..6b28dcb0 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -32,6 +32,7 @@ #include "Floater.h" #include "Range2D.h" #include "Wanted.h" +#include "SaveBuf.h" CPed *gapTempPedList[50]; uint16 gnNumTempPedList; @@ -47,10 +48,10 @@ bool CPed::bPedCheat2; bool CPed::bPedCheat3; CVector2D CPed::ms_vec2DFleePosition; -void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); } -void *CPed::operator new(size_t sz, int handle) { return CPools::GetPedPool()->New(handle); } -void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); } -void CPed::operator delete(void *p, int handle) { CPools::GetPedPool()->Delete((CPed*)p); } +void *CPed::operator new(size_t sz) throw() { return CPools::GetPedPool()->New(); } +void *CPed::operator new(size_t sz, int handle) throw() { return CPools::GetPedPool()->New(handle); } +void CPed::operator delete(void *p, size_t sz) throw() { CPools::GetPedPool()->Delete((CPed*)p); } +void CPed::operator delete(void *p, int handle) throw() { CPools::GetPedPool()->Delete((CPed*)p); } #ifdef DEBUGMENU bool CPed::bPopHeadsOnHeadshot = false; @@ -244,7 +245,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) bHasACamera = true; m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this); - DMAudio.SetEntityStatus(m_audioEntityId, true); + DMAudio.SetEntityStatus(m_audioEntityId, TRUE); m_fearFlags = CPedType::GetThreats(m_nPedType); m_threatEntity = nil; m_eventOrThreat = CVector2D(0.0f, 0.0f); @@ -307,6 +308,31 @@ CPed::~CPed(void) m_pFire->Extinguish(); CPopulation::UpdatePedCount((ePedType)m_nPedType, true); DMAudio.DestroyEntity(m_audioEntityId); + + // Because of the nature of ped lists in GTA, it can sometimes be outdated. + // Remove ourself from nearPeds list of the Peds in our nearPeds list. +#ifdef FIX_BUGS + for(int i = 0; i < m_numNearPeds; i++) { + CPed *nearPed = m_nearPeds[i]; + assert(nearPed != nil); + if (!nearPed->IsPointerValid()) + continue; + + for(int j = 0; j < nearPed->m_numNearPeds;) { + assert(j == ARRAY_SIZE(m_nearPeds) - 1 || nearPed->m_nearPeds[j] || !nearPed->m_nearPeds[j+1]); // ensure nil comes after nil + + if (nearPed->m_nearPeds[j] == this) { + for (int k = j; k < ARRAY_SIZE(m_nearPeds) - 1; k++) { + nearPed->m_nearPeds[k] = nearPed->m_nearPeds[k + 1]; + nearPed->m_nearPeds[k + 1] = nil; + } + nearPed->m_nearPeds[ARRAY_SIZE(m_nearPeds) - 1] = nil; + nearPed->m_numNearPeds--; + } else + j++; + } + } +#endif } void @@ -329,7 +355,7 @@ CPed::SetModelIndex(uint32 mi) SetPedStats(modelInfo->m_pedStatType); m_headingRate = m_pedStats->m_headingChangeRate; m_animGroup = (AssocGroupId) modelInfo->m_animGroup; - CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE); + CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE); (*RPANIMBLENDCLUMPDATA(m_rwObject))->velocity2d = &m_vecAnimMoveDelta; @@ -367,8 +393,20 @@ CPed::BuildPedLists(void) if (ped != this && !ped->bInVehicle) { float dist = (ped->GetPosition() - GetPosition()).Magnitude2D(); if (nThreatReactionRangeMultiplier * 30.0f > dist) { +#ifdef FIX_BUGS + // If the gap ped list is full, sort it and truncate it + // before pushing more unsorted peds + if( gnNumTempPedList == ARRAY_SIZE(gapTempPedList) - 1 ) + { + gapTempPedList[gnNumTempPedList] = nil; + SortPeds(gapTempPedList, 0, gnNumTempPedList - 1); + gnNumTempPedList = ARRAY_SIZE(m_nearPeds); + } +#endif + gapTempPedList[gnNumTempPedList] = ped; gnNumTempPedList++; + // NOTE: We cannot absolutely fill the gap list, as the list is null-terminated before being passed to SortPeds assert(gnNumTempPedList < ARRAY_SIZE(gapTempPedList)); } } @@ -397,13 +435,15 @@ CPed::BuildPedLists(void) } else removePed = true; } + + assert(i == ARRAY_SIZE(m_nearPeds) - 1 || m_nearPeds[i] || !m_nearPeds[i+1]); // ensure nil comes after nil + if (removePed) { // If we arrive here, the ped we're checking isn't "near", so we should remove it. for (int j = i; j < ARRAY_SIZE(m_nearPeds) - 1; j++) { m_nearPeds[j] = m_nearPeds[j + 1]; m_nearPeds[j + 1] = nil; } - // Above loop won't work on last slot, so we need to empty it. m_nearPeds[ARRAY_SIZE(m_nearPeds) - 1] = nil; m_numNearPeds--; } else @@ -496,30 +536,30 @@ CPed::SetMoveAnim(void) CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_BLOCK); if (!animAssoc) { - CAnimBlendAssociation *fightIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE); + CAnimBlendAssociation *fightIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE); animAssoc = fightIdleAssoc; if (fightIdleAssoc && m_nPedState == PED_FIGHT) return; if (fightIdleAssoc) { - CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE); + CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE); if (!idleAssoc || idleAssoc->blendDelta <= 0.0f) { animAssoc->flags |= ASSOC_DELETEFADEDOUT; - animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_IDLE_STANCE, 8.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_IDLE, 8.0f); } } } if (!animAssoc) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED); if (animAssoc) if (m_nWaitState == WAITSTATE_STUCK || m_nWaitState == WAITSTATE_FINISH_FLEE) return; if (animAssoc) { - CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE); + CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE); if (!idleAssoc || idleAssoc->blendDelta <= 0.0f) { animAssoc->flags |= ASSOC_DELETEFADEDOUT; - animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_IDLE_STANCE, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_IDLE, 4.0f); } } } @@ -541,20 +581,20 @@ CPed::SetMoveAnim(void) switch (m_nMoveState) { case PEDMOVE_STILL: - animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_IDLE_STANCE, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_IDLE, 4.0f); break; case PEDMOVE_WALK: - animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_WALK, 1.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_WALK, 1.0f); break; case PEDMOVE_RUN: if (m_nPedState == PED_FLEE_ENTITY) { - animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_RUN, 3.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_RUN, 3.0f); } else { - animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_RUN, 1.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_RUN, 1.0f); } break; case PEDMOVE_SPRINT: - animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_SPRINT, 1.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), animGroupToUse, ANIM_STD_RUNFAST, 1.0f); break; default: break; @@ -562,12 +602,12 @@ CPed::SetMoveAnim(void) if (animAssoc) { if (m_leader) { - CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_WALK); + CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_STD_WALK); if (!walkAssoc) - walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_RUN); + walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_STD_RUN); if (!walkAssoc) - walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_SPRINT); + walkAssoc = RpAnimBlendClumpGetAssociation(m_leader->GetClump(), ANIM_STD_RUNFAST); if (walkAssoc) { animAssoc->speed = walkAssoc->speed; @@ -920,7 +960,7 @@ FinishFuckUCB(CAnimBlendAssociation *animAssoc, void *arg) { CPed *ped = (CPed*)arg; - if (animAssoc->animId == ANIM_FUCKU && ped->GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED) + if (animAssoc->animId == ANIM_STD_PARTIAL_FUCKU && ped->GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED) ped->RemoveWeaponModel(0); } @@ -939,7 +979,7 @@ CPed::MoveHeadToLook(void) if (!bShakeFist && GetWeapon()->m_eWeaponType == WEAPONTYPE_UNARMED) { - CAnimBlendAssociation *fuckUAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FUCKU); + CAnimBlendAssociation *fuckUAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PARTIAL_FUCKU); if (fuckUAssoc) { float animTime = fuckUAssoc->currentTime; @@ -984,7 +1024,7 @@ CPed::MoveHeadToLook(void) bool notRocketLauncher = false; bool notTwoHanded = false; - AnimationId animToPlay = NUM_ANIMS; + AnimationId animToPlay = ANIM_STD_NUM; if (!GetWeapon()->IsType2Handed()) notTwoHanded = true; @@ -1002,24 +1042,24 @@ CPed::MoveHeadToLook(void) #ifndef FIX_BUGS if (m_pedStats->m_temper < 47) #endif - animToPlay = ANIM_FIGHT_PPUNCH; + animToPlay = ANIM_STD_PARTIAL_PUNCH; } else { - animToPlay = ANIM_FUCKU; + animToPlay = ANIM_STD_PARTIAL_FUCKU; } } else if (m_pedStats->m_temper > 49 || m_pLookTarget->GetModelIndex() == MI_POLICE) { - animToPlay = ANIM_FUCKU; + animToPlay = ANIM_STD_PARTIAL_FUCKU; } } else if (notRocketLauncher && (CGeneral::GetRandomNumber() & 1)) { - animToPlay = ANIM_FUCKU; + animToPlay = ANIM_STD_PARTIAL_FUCKU; } - if (animToPlay != NUM_ANIMS) { + if (animToPlay != ANIM_STD_NUM) { CAnimBlendAssociation *newAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay, 4.0f); if (newAssoc) { newAssoc->flags |= ASSOC_FADEOUTWHENDONE; newAssoc->flags |= ASSOC_DELETEFADEDOUT; - if (newAssoc->animId == ANIM_FUCKU) + if (newAssoc->animId == ANIM_STD_PARTIAL_FUCKU) newAssoc->SetDeleteCallback(FinishFuckUCB, this); } } @@ -1080,8 +1120,12 @@ CPed::ClearAimFlag(void) #endif } - if (IsPlayer()) + if (IsPlayer()) { ((CPlayerPed*)this)->m_fFPSMoveHeading = 0.0f; +#ifdef FREE_CAM + ((CPlayerPed*)this)->m_bFreeAimActive = false; +#endif + } } void @@ -1320,6 +1364,9 @@ CPed::CalculateNewVelocity(void) limitedRotDest -= 2 * PI; } +#ifdef FREE_CAM + if (!CCamera::bFreeCam || !TheCamera.Cams[0].Using3rdPersonMouseCam()) +#endif if (IsPlayer() && m_nPedState == PED_ATTACK) headAmount /= 4.0f; @@ -1365,8 +1412,8 @@ CPed::CalculateNewVelocity(void) m_moved = CVector2D(-Sin(walkAngle), Cos(walkAngle)) * pedSpeed; } - CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE); - CAnimBlendAssociation *fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE); + CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE); + CAnimBlendAssociation *fightAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE); #ifdef VC_PED_PORTS if ((!idleAssoc || idleAssoc->blendAmount < 0.5f) && !fightAssoc && !bIsDucking) { #else @@ -1809,7 +1856,7 @@ CPed::ProcessControl(void) ++m_panicCounter; if (m_fHealth <= 1.0f && m_nPedState <= PED_STATES_NO_AI && !bIsInTheAir && !bIsLanding) - SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f); + SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f); bCollidedWithMyVehicle = false; @@ -1900,9 +1947,9 @@ CPed::ProcessControl(void) } else { if (m_nPedType != PEDTYPE_COP && neededTurn < DEGTORAD(15.0f) && m_nWaitState == WAITSTATE_FALSE) { if ((m_nStoredMoveState == PEDMOVE_RUN || m_nStoredMoveState == PEDMOVE_SPRINT) && m_vecDamageNormal.z < 0.3f) { - CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN); + CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUN); if (!runAssoc) - runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SPRINT); + runAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNFAST); if (runAssoc && runAssoc->blendAmount > 0.9f && runAssoc->IsRunning()) { SetWaitState(WAITSTATE_HITWALL, nil); @@ -2189,7 +2236,7 @@ CPed::ProcessControl(void) bIsStanding = false; CVector2D collidingEntMoveDir = -collidingVeh->m_vecMoveSpeed; int dir = GetLocalDirection(collidingEntMoveDir); - SetFall(1000, (AnimationId)(dir + ANIM_KO_SKID_FRONT), false); + SetFall(1000, (AnimationId)(dir + ANIM_STD_HIGHIMPACT_FRONT), false); float damage; if (collidingVeh->m_modelIndex == MI_TRAIN) { @@ -2265,7 +2312,7 @@ CPed::ProcessControl(void) } else { DMAudio.PlayOneShot(collidingVeh->m_audioEntityId, SOUND_CAR_PED_COLLISION, m_fDamageImpulse); if (IsPlayer()) { - CColModel *collidingCol = CModelInfo::GetModelInfo(collidingVeh->GetModelIndex())->GetColModel(); + CColModel *collidingCol = CModelInfo::GetColModel(collidingVeh->GetModelIndex()); CVector colMinVec = collidingCol->boundingBox.min; CVector colMaxVec = collidingCol->boundingBox.max; @@ -2321,7 +2368,7 @@ CPed::ProcessControl(void) bIsStanding = false; CVector2D collidingEntMoveDir = -collidingVeh->m_vecMoveSpeed; int dir = GetLocalDirection(collidingEntMoveDir); - SetFall(1000, (AnimationId)(dir + ANIM_KO_SKID_FRONT), false); + SetFall(1000, (AnimationId)(dir + ANIM_STD_HIGHIMPACT_FRONT), false); CPed *driver = collidingVeh->pDriver; float damage; @@ -2446,17 +2493,22 @@ CPed::ProcessControl(void) obstacleForFlyingOtherDirZ = 501.0f; } #ifdef VC_PED_PORTS - uint8 flyDir = 0; + int16 flyDir = 0; float feetZ = GetPosition().z - FEET_OFFSET; - if ((obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ >= 500.0f) && (obstacleForFlyingZ <= feetZ || obstacleForFlyingOtherDirZ <= feetZ)) { - if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 499.0f) - flyDir = 2; - } else { +#ifdef FIX_BUGS + if (obstacleForFlyingZ > feetZ && obstacleForFlyingZ < 500.0f) flyDir = 1; - } + else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f) + flyDir = 2; +#else + if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ)) + flyDir = 1; + else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 499.0f) + flyDir = 2; +#endif - if (flyDir != 0 && !bSomeVCflag1) { - SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point)); + if (flyDir > 0 && !bSomeVCflag1) { + GetMatrix().SetTranslateOnly((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point)); GetMatrix().GetPosition().z += FEET_OFFSET; GetMatrix().UpdateRW(); SetLanding(); @@ -2471,6 +2523,10 @@ CPed::ProcessControl(void) forceDir.z = 4.0f; ApplyMoveForce(forceDir); + // What was that for?? It pushes player inside of collision sometimes and kills him. +#ifdef FIX_BUGS + if (!IsPlayer()) +#endif GetMatrix().GetPosition() += 0.25f * offsetToCheck; m_fRotationCur = CGeneral::GetRadianAngleBetweenPoints(offsetToCheck.x, offsetToCheck.y, 0.0f, 0.0f); @@ -2479,7 +2535,7 @@ CPed::ProcessControl(void) SetHeading(m_fRotationCur); if (m_nPedState != PED_FALL && !bIsPedDieAnimPlaying) { - SetFall(1000, ANIM_KO_SKID_BACK, true); + SetFall(1000, ANIM_STD_HIGHIMPACT_BACK, true); } bIsInTheAir = false; } else if (m_vecDamageNormal.z > 0.4f) { @@ -2492,7 +2548,7 @@ CPed::ProcessControl(void) if (m_nPedState == PED_JUMP) { if (m_nWaitTimer <= 2000) { if (m_nWaitTimer < 1000) - m_nWaitTimer += CTimer::GetTimeStep() * 0.02f * 1000.0f; + m_nWaitTimer += CTimer::GetTimeStepInMilliseconds(); } else { m_nWaitTimer = 0; } @@ -2534,10 +2590,10 @@ CPed::ProcessControl(void) m_fRotationCur = m_fRotationDest; SetHeading(m_fRotationCur); } - CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_JUMP_GLIDE); + CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_JUMP_GLIDE); if (!jumpAssoc) - jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_GLIDE); + jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_GLIDE); if (jumpAssoc) { jumpAssoc->blendDelta = -3.0f; @@ -2546,10 +2602,10 @@ CPed::ProcessControl(void) if (m_nPedState == PED_JUMP) m_nPedState = PED_IDLE; } else { - CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_JUMP_GLIDE); + CAnimBlendAssociation *jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_JUMP_GLIDE); if (!jumpAssoc) - jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_GLIDE); + jumpAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_GLIDE); if (jumpAssoc) { jumpAssoc->blendDelta = -3.0f; @@ -2675,7 +2731,7 @@ CPed::ProcessControl(void) Wait(); if (m_nPedState != PED_IDLE) { - CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_ARMED); + CAnimBlendAssociation *idleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_BIGGUN); if(idleAssoc) { idleAssoc->blendDelta = -8.0f; idleAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -2694,27 +2750,27 @@ CPed::ProcessControl(void) int16 padWalkX = pad->GetPedWalkLeftRight(); int16 padWalkY = pad->GetPedWalkUpDown(); if (Abs(padWalkX) > 0.0f || Abs(padWalkY) > 0.0f) { - if (vehAnim == ANIM_CAR_OPEN_LHS || vehAnim == ANIM_CAR_OPEN_RHS || vehAnim == ANIM_COACH_OPEN_L || vehAnim == ANIM_COACH_OPEN_R || - vehAnim == ANIM_VAN_OPEN_L || vehAnim == ANIM_VAN_OPEN) { + if (vehAnim == ANIM_STD_CAR_OPEN_DOOR_LHS || vehAnim == ANIM_STD_CAR_OPEN_DOOR_RHS || vehAnim == ANIM_STD_COACH_OPEN_LHS || vehAnim == ANIM_STD_COACH_OPEN_RHS || + vehAnim == ANIM_STD_VAN_OPEN_DOOR_REAR_LHS || vehAnim == ANIM_STD_VAN_OPEN_DOOR_REAR_RHS) { if (!m_pMyVehicle->pDriver) { cancelJack = false; bCancelEnteringCar = true; } else cancelJack = true; - } else if (vehAnim == ANIM_CAR_QJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f) { + } else if (vehAnim == ANIM_STD_QUICKJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f) { cancelJack = true; - } else if (vehAnim == ANIM_CAR_PULLOUT_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_RHS || vehAnim == ANIM_CAR_PULLOUT_RHS) { + } else if (vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_RHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_RHS) { bCancelEnteringCar = true; cancelJack = false; } } - if (cancelJack && vehAnim == ANIM_CAR_QJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f && m_pVehicleAnim->GetTimeLeft() < 0.78f) { + if (cancelJack && vehAnim == ANIM_STD_QUICKJACK && m_pVehicleAnim->GetTimeLeft() > 0.75f && m_pVehicleAnim->GetTimeLeft() < 0.78f) { cancelJack = false; QuitEnteringCar(); RestorePreviousObjective(); } - if (cancelJack && (vehAnim == ANIM_CAR_PULLOUT_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_LHS || vehAnim == ANIM_CAR_PULLOUT_LOW_RHS || vehAnim == ANIM_CAR_PULLOUT_RHS)) { + if (cancelJack && (vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_LHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_LO_RHS || vehAnim == ANIM_STD_CAR_PULL_OUT_PED_RHS)) { cancelJack = false; bCancelEnteringCar = true; } @@ -2874,25 +2930,25 @@ CPed::ProcessControl(void) CAnimBlendAssociation *lbAssoc; CAnimBlendAssociation *sitAssoc; if (m_pMyVehicle->bLowVehicle) { - sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LSIT); + sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_LO); if (!sitAssoc || sitAssoc->blendAmount < 1.0f) { break; } - lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_LOW_L); + lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_LEFT_LO); lbAssoc = nil; - rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_LOW_R); + rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_RIGHT_LO); } else { - sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SIT); + sitAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT); if (!sitAssoc || sitAssoc->blendAmount < 1.0f) { break; } - lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_L); - rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_R); - lbAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LB); + lDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_LEFT); + rDriveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_RIGHT); + lbAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_LOOKBEHIND); if (lbAssoc && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON @@ -2901,10 +2957,10 @@ CPed::ProcessControl(void) } } - CAnimBlendAssociation *driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_L); + CAnimBlendAssociation *driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT); if (!driveByAssoc) - driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_R); + driveByAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT); if (m_pMyVehicle->bLowVehicle || m_pMyVehicle->m_fGasPedal >= 0.0f || driveByAssoc) { if (steerAngle == 0.0f || driveByAssoc) { @@ -2918,22 +2974,22 @@ CPed::ProcessControl(void) lDriveAssoc->blendAmount = 0.0f; if (rDriveAssoc) - rDriveAssoc->blendAmount = clamp(steerAngle * -100.0f / 61.0f, 0.0f, 1.0f); + rDriveAssoc->blendAmount = Clamp(steerAngle * -100.0f / 61.0f, 0.0f, 1.0f); else if (m_pMyVehicle->bLowVehicle) - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_LOW_R); + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_RIGHT_LO); else - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_R); + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_RIGHT); } else { if (rDriveAssoc) rDriveAssoc->blendAmount = 0.0f; if (lDriveAssoc) - lDriveAssoc->blendAmount = clamp(steerAngle * 100.0f / 61.0f, 0.0f, 1.0f); + lDriveAssoc->blendAmount = Clamp(steerAngle * 100.0f / 61.0f, 0.0f, 1.0f); else if (m_pMyVehicle->bLowVehicle) - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_LOW_L); + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_LEFT_LO); else - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_L); + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVE_LEFT); } if (lbAssoc) @@ -2943,7 +2999,7 @@ CPed::ProcessControl(void) if ((TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_1STPERSON || TheCamera.Cams[TheCamera.ActiveCam].DirectionWasLooking != LOOKING_LEFT) && (!lbAssoc || lbAssoc->blendAmount < 1.0f)) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_LB, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_LOOKBEHIND, 4.0f); } } break; @@ -2953,12 +3009,12 @@ CPed::ProcessControl(void) break; case PED_HANDS_UP: if (m_pedStats->m_temper <= 50) { - if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSCOWER)) { - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSCOWER); + if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HANDSCOWER)) { + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSCOWER); Say(SOUND_PED_HANDS_COWER); } - } else if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSUP)) { - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSUP); + } else if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HANDSUP)) { + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSUP); Say(SOUND_PED_HANDS_UP); } break; @@ -3009,11 +3065,11 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints) CColPoint intersectionPoint; CColLine ourLine; - CColModel *ourCol = CModelInfo::GetModelInfo(GetModelIndex())->GetColModel(); - CColModel *hisCol = CModelInfo::GetModelInfo(collidingEnt->GetModelIndex())->GetColModel(); + CColModel *ourCol = CModelInfo::GetColModel(GetModelIndex()); + CColModel *hisCol = CModelInfo::GetColModel(collidingEnt->GetModelIndex()); if (!bUsesCollision) - return false; + return 0; if (collidingEnt->IsVehicle() && ((CVehicle*)collidingEnt)->IsBoat()) collidedWithBoat = true; @@ -3150,8 +3206,8 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints) upperSpeedLimit *= 2.0f; lowerSpeedLimit *= 1.5f; } - CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FALL); - if (!bWasStanding && speed > upperSpeedLimit && (/*!bPushedAlongByCar ||*/ m_vecMoveSpeed.z < lowerSpeedLimit) + CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL); + if (!bWasStanding && ((speed > upperSpeedLimit /* ||!bPushedAlongByCar*/) || (m_vecMoveSpeed.z < lowerSpeedLimit)) && m_pCollidingEntity != collidingEnt) { float damage = 100.0f * Max(speed - 0.25f, 0.0f); @@ -3174,7 +3230,7 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints) } #else float speedSqr = 0.0f; - CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FALL); + CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL); if (!bWasStanding && (m_vecMoveSpeed.z < -0.25f || (speedSqr = m_vecMoveSpeed.MagnitudeSqr()) > sq(0.5f))) { if (speedSqr == 0.0f) speedSqr = sq(m_vecMoveSpeed.z); @@ -3326,10 +3382,10 @@ CPed::PlayFootSteps(void) if ( IsPlayer() ) { - runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP); + runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2); if ( runStopAsoc == NULL ) - runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R); + runStopAsoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2); } if ( runStopAsoc != NULL && runStopAsoc->blendAmount > 0.1f ) @@ -3504,7 +3560,7 @@ void CPed::SetDirectionToWalkAroundObject(CEntity *obj) { float distLimitForTimer = 8.0f; - CColModel *objCol = CModelInfo::GetModelInfo(obj->GetModelIndex())->GetColModel(); + CColModel *objCol = CModelInfo::GetColModel(obj->GetModelIndex()); CVector objColMin = objCol->boundingBox.min; CVector objColMax = objCol->boundingBox.max; CVector objColCenter = (objColMin + objColMax) / 2.0f; @@ -4158,7 +4214,7 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg) #ifdef VC_PED_PORTS else if (ped->m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE) { ped->m_fHealth = 0.0f; - ped->SetDie(ANIM_FLOOR_HIT, 4.0f, 0.5f); + ped->SetDie(ANIM_STD_HIT_FLOOR, 4.0f, 0.5f); } #endif @@ -4286,7 +4342,7 @@ CPed::PedSetOutCarCB(CAnimBlendAssociation *animAssoc, void *arg) ped->bOnBoat = false; if (ped->bBusJacked) { - ped->SetFall(1500, ANIM_KO_SKID_BACK, false); + ped->SetFall(1500, ANIM_STD_HIGHIMPACT_BACK, false); ped->bBusJacked = false; } ped->m_nStoredMoveState = PEDMOVE_NONE; @@ -4310,7 +4366,7 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg) CVehicle *vehicle; CPed *ped = (CPed*)arg; - quickJackedAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_CAR_QJACKED); + quickJackedAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_STD_QUICKJACKED); if (ped->m_nPedState != PED_ARRESTED) { ped->m_nLastPedState = PED_NONE; if (dragAssoc) @@ -4343,7 +4399,7 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg) if (ped->m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE) { dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped); ped->m_fHealth = 0.0f; - ped->SetDie(ANIM_FLOOR_HIT, 1000.0f, 0.5f); + ped->SetDie(ANIM_STD_HIT_FLOOR, 1000.0f, 0.5f); return; } #endif @@ -4353,7 +4409,7 @@ CPed::PedSetDraggedOutCarCB(CAnimBlendAssociation *dragAssoc, void *arg) } else { dragAssoc->SetDeleteCallback(PedSetDraggedOutCarPositionCB, ped); if (ped->CanSetPedState()) - CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f); + CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP, 1000.0f); } ped->ReplaceWeaponWhenExitingVehicle(); @@ -4588,14 +4644,14 @@ CPed::PedSetInCarCB(CAnimBlendAssociation *animAssoc, void *arg) if (veh->pDriver == ped) { if (veh->bLowVehicle) { - ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_LSIT, 100.0f); + ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT_LO, 100.0f); } else { - ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f); + ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT, 100.0f); } } else if (veh->bLowVehicle) { - ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_SITPLO, 100.0f); + ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT_P_LO, 100.0f); } else { - ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_SITP, 100.0f); + ped->m_pVehicleAnim = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT_P, 100.0f); } ped->StopNonPartialAnims(); @@ -4834,12 +4890,12 @@ CPed::PreRender(void) if (CWeather::Rain > 0.3f && TheCamera.SoundDistUp > 15.0f) { if ((TheCamera.GetPosition() - GetPosition()).Magnitude() < 25.0f) { bool doSplashUp = true; - CColModel *ourCol = CModelInfo::GetModelInfo(GetModelIndex())->GetColModel(); + CColModel *ourCol = CModelInfo::GetColModel(GetModelIndex()); CVector speed = FindPlayerSpeed(); if (Abs(speed.x) <= 0.05f && Abs(speed.y) <= 0.05f) { if (!OnGround() && m_nPedState != PED_ATTACK && m_nPedState != PED_FIGHT) { - if (!IsPedHeadAbovePos(0.3f) || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED)) { + if (!IsPedHeadAbovePos(0.3f) || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED)) { doSplashUp = false; } } else @@ -4973,8 +5029,8 @@ CPed::Idle(void) } } - CAnimBlendAssociation *armedIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_ARMED); - CAnimBlendAssociation *unarmedIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE); + CAnimBlendAssociation *armedIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_BIGGUN); + CAnimBlendAssociation *unarmedIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE); int waitTime; if (m_nMoveState == PEDMOVE_STILL) { @@ -4989,7 +5045,7 @@ CPed::Idle(void) m_moved = CVector2D(0.0f, 0.0f); return; } - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_ARMED, 3.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_BIGGUN, 3.0f); waitTime = CGeneral::GetRandomNumberInRange(4000, 7500); } else { armedIdleAssoc->blendDelta = -2.0f; @@ -5113,7 +5169,7 @@ CPed::SetInTheAir(void) return; bIsInTheAir = true; - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_GLIDE, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_GLIDE, 4.0f); if (m_nPedState == PED_ATTACK) { ClearAttack(); @@ -5144,9 +5200,9 @@ CPed::InTheAir(void) ) SetLanding(); } else { - if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FALL)) { + if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL)) { if (m_vecMoveSpeed.z < -0.1f) - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_FALL, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL, 4.0f); } } } @@ -5159,19 +5215,19 @@ CPed::SetLanding(void) if (DyingOrDead()) return; - CAnimBlendAssociation *fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_FALL); + CAnimBlendAssociation *fallAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL); CAnimBlendAssociation *landAssoc; RpAnimBlendClumpSetBlendDeltas(GetClump(), ASSOC_PARTIAL, -1000.0f); if (fallAssoc) { - landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_COLLAPSE); + landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_COLLAPSE); DMAudio.PlayOneShot(m_audioEntityId, SOUND_FALL_COLLAPSE, 1.0f); if (IsPlayer()) Say(SOUND_PED_LAND); } else { - landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FALL_LAND); + landAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FALL_LAND); DMAudio.PlayOneShot(m_audioEntityId, SOUND_FALL_LAND, 1.0f); } @@ -5222,25 +5278,25 @@ CPed::SetGetUp(void) bGetUpAnimStarted = true; m_pCollidingEntity = nil; bKnockedUpIntoAir = false; - CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SPRINT); + CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNFAST); if (animAssoc) { - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN)) { - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_RUN, 8.0f); + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUN)) { + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_RUN, 8.0f); } else { - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f); } animAssoc->flags |= ASSOC_DELETEFADEDOUT; } if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL)) - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP_FRONT, 1000.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP_FRONT, 1000.0f); else - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_GETUP1, 1000.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GET_UP, 1000.0f); animAssoc->SetFinishCallback(PedGetupCB,this); } else { m_fHealth = 0.0f; - SetDie(NUM_ANIMS, 4.0f, 0.0f); + SetDie(ANIM_STD_NUM, 4.0f, 0.0f); } } @@ -6058,7 +6114,7 @@ CPed::FollowPath(void) } void -CPed::SetEvasiveStep(CEntity *reason, uint8 animType) +CPed::SetEvasiveStep(CPhysical *reason, uint8 animType) { AnimationId stepAnim; @@ -6076,22 +6132,23 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType) if (neededTurn > PI) neededTurn = TWOPI - neededTurn; - CVehicle *veh = (CVehicle*)reason; - if (reason->IsVehicle() && veh->m_vehType == VEHICLE_TYPE_CAR) { + if (reason->IsVehicle() && ((CVehicle*)reason)->IsCar()) { + CVehicle *veh = (CVehicle*)reason; if (veh->m_nCarHornTimer != 0) { vehPressedHorn = true; if (!IsPlayer()) animType = 1; } } - if (neededTurn <= DEGTORAD(90.0f) || veh->GetModelIndex() == MI_RCBANDIT || vehPressedHorn || animType != 0) { - SetLookFlag(veh, true); - if ((CGeneral::GetRandomNumber() & 1) && veh->GetModelIndex() != MI_RCBANDIT && animType == 0) { - stepAnim = ANIM_IDLE_TAXI; + + if (neededTurn <= DEGTORAD(90.0f) || reason->GetModelIndex() == MI_RCBANDIT || vehPressedHorn || animType != 0) { + SetLookFlag(reason, true); + if ((CGeneral::GetRandomNumber() & 1) && reason->GetModelIndex() != MI_RCBANDIT && animType == 0) { + stepAnim = ANIM_STD_HAILTAXI; } else { - float vehDirection = CGeneral::GetRadianAngleBetweenPoints( - veh->m_vecMoveSpeed.x, veh->m_vecMoveSpeed.y, + float dangerDirection = CGeneral::GetRadianAngleBetweenPoints( + reason->m_vecMoveSpeed.x, reason->m_vecMoveSpeed.y, 0.0f, 0.0f); // Let's turn our back to the "reason" @@ -6101,20 +6158,20 @@ CPed::SetEvasiveStep(CEntity *reason, uint8 animType) angleToFace -= TWOPI; // We don't want to run towards car's direction - float dangerZone = angleToFace - vehDirection; + float dangerZone = angleToFace - dangerDirection; dangerZone = CGeneral::LimitRadianAngle(dangerZone); // So, add or subtract 90deg (jump to left/right) according to that if (dangerZone > 0.0f) - angleToFace = vehDirection - HALFPI; + angleToFace = dangerDirection - HALFPI; else - angleToFace = vehDirection + HALFPI; + angleToFace = dangerDirection + HALFPI; - stepAnim = NUM_ANIMS; + stepAnim = ANIM_STD_NUM; if (animType == 0 || animType == 1) - stepAnim = ANIM_EV_STEP; + stepAnim = ANIM_STD_EVADE_STEP; else if (animType == 2) - stepAnim = ANIM_HANDSCOWER; + stepAnim = ANIM_STD_HANDSCOWER; } if (!RpAnimBlendClumpGetAssociation(GetClump(), stepAnim)) { CAnimBlendAssociation *stepAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, stepAnim, 8.0f); @@ -6216,11 +6273,11 @@ CPed::SetEvasiveDive(CPhysical *reason, uint8 onlyRandomJump) ClearLookFlag(); ClearAimFlag(); SetLookFlag(reason, true); - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HANDSUP); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HANDSUP); if (animAssoc) return; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSUP, 8.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSUP, 8.0f); animAssoc->flags &= ~ASSOC_DELETEFADEDOUT; animAssoc->SetFinishCallback(PedEvadeCB, this); SetStoredState(); @@ -6231,7 +6288,7 @@ CPed::SetEvasiveDive(CPhysical *reason, uint8 onlyRandomJump) ClearAimFlag(); SetStoredState(); SetPedState(PED_DIVE_AWAY); - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_EV_DIVE, 8.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_EVADE_DIVE, 8.0f); animAssoc->SetFinishCallback(PedEvadeCB, this); } @@ -6262,7 +6319,7 @@ CPed::PedEvadeCB(CAnimBlendAssociation* animAssoc, void* arg) if (ped->m_nPedState == PED_DIVE_AWAY || ped->m_nPedState == PED_STEP_AWAY) ped->RestorePreviousState(); - } else if (animAssoc->animId == ANIM_EV_DIVE) { + } else if (animAssoc->animId == ANIM_STD_EVADE_DIVE) { ped->bUpdateAnimHeading = true; ped->ClearLookFlag(); if (ped->m_nPedState == PED_DIVE_AWAY) @@ -6320,7 +6377,7 @@ CPed::SetDie(AnimationId animId, float delta, float speed) } SetPedState(PED_DIE); - if (animId == NUM_ANIMS) { + if (animId == ANIM_STD_NUM) { bIsPedDieAnimPlaying = false; } else { CAnimBlendAssociation *dieAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animId, delta); @@ -6429,7 +6486,7 @@ CPed::Chat(void) } if (bIsTalking) { if (CGeneral::GetRandomNumber() < 512) { - CAnimBlendAssociation *chatAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT); + CAnimBlendAssociation *chatAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT); if (chatAssoc) { chatAssoc->blendDelta = -4.0f; chatAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -6441,10 +6498,10 @@ CPed::Chat(void) } else { if (CGeneral::GetRandomNumber() < 20 && !RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_IDLE)) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_XPRESS_SCRATCH, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_XPRESS_SCRATCH, 4.0f); } if (!bIsTalking && !RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_IDLE)) { - CAnimBlendAssociation *chatAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_CHAT, 4.0f); + CAnimBlendAssociation *chatAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CHAT, 4.0f); float chatTime = CGeneral::GetRandomNumberInRange(0.0f, 3.0f); chatAssoc->SetCurrentTime(chatTime); @@ -6461,7 +6518,7 @@ CPed::Chat(void) void CPed::ClearChat(void) { - CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT); + CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -6477,10 +6534,10 @@ ReportPhonePickUpCB(CAnimBlendAssociation* assoc, void* arg) { CPed* ped = (CPed*)arg; 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); } } @@ -6524,7 +6581,7 @@ CPed::FacePhone(void) ClearLookFlag(); SetIdle(); m_phoneTalkTimer = CTimer::GetTimeInMilliseconds() + 10000; - CAnimBlendAssociation* assoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_PHONE_IN, 4.0f); + CAnimBlendAssociation* assoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_IN, 4.0f); assoc->SetFinishCallback(ReportPhonePickUpCB, this); return true; } @@ -6579,9 +6636,9 @@ CPed::MakePhonecall(void) return false; #ifdef PEDS_REPORT_CRIMES_ON_PHONE - CAnimBlendAssociation* talkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_PHONE_TALK); + CAnimBlendAssociation* talkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_PHONE_TALK); if (talkAssoc && talkAssoc->blendAmount > 0.5f) { - CAnimBlendAssociation* endAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_PHONE_OUT, 8.0f); + CAnimBlendAssociation* endAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PHONE_OUT, 8.0f); endAssoc->flags &= ~ASSOC_DELETEFADEDOUT; endAssoc->SetFinishCallback(ReportPhonePutDownCB, this); } @@ -6911,18 +6968,18 @@ CPed::SetPedPositionInCar(void) if (bChangedSeat) { bool notYet = false; - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_GETIN_LHS) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_GETIN_LOW_LHS) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_CLOSEDOOR_LHS) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_CLOSEDOOR_LOW_LHS) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SHUFFLE_RHS) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LSHUFFLE_RHS) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_CLOSE_L) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_CLOSE) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_GETIN_L) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_VAN_GETIN) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_COACH_IN_L) - || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_COACH_IN_R)) { + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_GET_IN_LHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_GET_IN_LO_LHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_LHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_LO_LHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SHUFFLE_RHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SHUFFLE_LO_RHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_GET_IN_REAR_LHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_VAN_GET_IN_REAR_RHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_COACH_GET_IN_LHS) + || RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_COACH_GET_IN_RHS)) { notYet = true; } if (notYet) { @@ -6974,14 +7031,21 @@ CPed::SetPedPositionInCar(void) } else { m_fRotationCur = m_pMyVehicle->GetForward().Heading(); } - GetMatrix() = newMat; + SetMatrix(newMat); } void CPed::LookForSexyPeds(void) { if ((!IsPedInControl() && m_nPedState != PED_DRIVING) - || m_lookTimer >= CTimer::GetTimeInMilliseconds() || m_nPedType != PEDTYPE_CIVMALE) + || m_lookTimer >= CTimer::GetTimeInMilliseconds() || +#ifdef FIX_BUGS + // gang members have these lines too + (!IsGangMember() && m_nPedType != PEDTYPE_CIVMALE) +#else + m_nPedType != PEDTYPE_CIVMALE +#endif + ) return; for (int i = 0; i < m_numNearPeds; i++) { @@ -6989,7 +7053,12 @@ CPed::LookForSexyPeds(void) if ((GetPosition() - m_nearPeds[i]->GetPosition()).Magnitude() < 10.0f) { CPed *nearPed = m_nearPeds[i]; if ((nearPed->m_pedStats->m_sexiness > m_pedStats->m_sexiness) +#ifdef FIX_BUGS + // react to prostitutes as well + && ((nearPed->m_nPedType == PEDTYPE_CIVFEMALE) || (nearPed->m_nPedType == PEDTYPE_PROSTITUTE))) { +#else && nearPed->m_nPedType == PEDTYPE_CIVFEMALE) { +#endif SetLookFlag(nearPed, true); m_lookTimer = CTimer::GetTimeInMilliseconds() + 4000; @@ -7175,7 +7244,7 @@ CPed::LookForInterestingNodes(void) void CPed::SetWaitState(eWaitState state, void *time) { - AnimationId waitAnim = NUM_ANIMS; + AnimationId waitAnim = ANIM_STD_NUM; CAnimBlendAssociation *animAssoc; if (!IsPedInControl()) @@ -7191,10 +7260,10 @@ CPed::SetWaitState(eWaitState state, void *time) break; case WAITSTATE_CROSS_ROAD: m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 1000; - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_HBHB, 4.0f); break; case WAITSTATE_CROSS_ROAD_LOOK: - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ROAD_CROSS, 8.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROADCROSS, 8.0f); if (time) m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time; @@ -7210,7 +7279,7 @@ CPed::SetWaitState(eWaitState state, void *time) case WAITSTATE_DOUBLEBACK: m_headingRate = 0.0f; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 3500; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_HBHB, 4.0f); #ifdef FIX_BUGS animAssoc->SetFinishCallback(RestoreHeadingRateCB, this); #endif @@ -7218,7 +7287,7 @@ CPed::SetWaitState(eWaitState state, void *time) case WAITSTATE_HITWALL: m_headingRate = 2.0f; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HIT_WALL, 16.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_WALL, 16.0f); animAssoc->flags |= ASSOC_DELETEFADEDOUT; animAssoc->flags |= ASSOC_FADEOUTWHENDONE; animAssoc->SetDeleteCallback(FinishedWaitCB, this); @@ -7232,14 +7301,14 @@ CPed::SetWaitState(eWaitState state, void *time) case WAITSTATE_TURN180: m_headingRate = 0.0f; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TURN_180, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_TURN180, 4.0f); animAssoc->SetFinishCallback(FinishedWaitCB, this); animAssoc->SetDeleteCallback(RestoreHeadingRateCB, this); break; case WAITSTATE_SURPRISE: m_headingRate = 0.0f; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2000; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HIT_WALL, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_WALL, 4.0f); animAssoc->SetFinishCallback(FinishedWaitCB, this); break; case WAITSTATE_STUCK: @@ -7247,7 +7316,7 @@ CPed::SetWaitState(eWaitState state, void *time) SetMoveAnim(); m_headingRate = 0.0f; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f); #ifdef FIX_BUGS animAssoc->SetFinishCallback(RestoreHeadingRateCB, this); #endif @@ -7263,20 +7332,20 @@ CPed::SetWaitState(eWaitState state, void *time) SetMoveAnim(); m_headingRate = 0.0f; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_HBHB, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_HBHB, 4.0f); #ifdef FIX_BUGS animAssoc->SetFinishCallback(RestoreHeadingRateCB, this); #endif break; case WAITSTATE_PLAYANIM_COWER: - waitAnim = ANIM_HANDSCOWER; + waitAnim = ANIM_STD_HANDSCOWER; case WAITSTATE_PLAYANIM_HANDSUP: - if (waitAnim == NUM_ANIMS) - waitAnim = ANIM_HANDSUP; + if (waitAnim == ANIM_STD_NUM) + waitAnim = ANIM_STD_HANDSUP; case WAITSTATE_PLAYANIM_HANDSCOWER: - if (waitAnim == NUM_ANIMS) - waitAnim = ANIM_HANDSCOWER; + if (waitAnim == ANIM_STD_NUM) + waitAnim = ANIM_STD_HANDSCOWER; m_headingRate = 0.0f; if (time) m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time; @@ -7287,13 +7356,13 @@ CPed::SetWaitState(eWaitState state, void *time) animAssoc->SetDeleteCallback(FinishedWaitCB, this); break; case WAITSTATE_PLAYANIM_DUCK: - waitAnim = ANIM_DUCK_DOWN; + waitAnim = ANIM_STD_DUCK_DOWN; case WAITSTATE_PLAYANIM_TAXI: - if (waitAnim == NUM_ANIMS) - waitAnim = ANIM_IDLE_TAXI; + if (waitAnim == ANIM_STD_NUM) + waitAnim = ANIM_STD_HAILTAXI; case WAITSTATE_PLAYANIM_CHAT: - if (waitAnim == NUM_ANIMS) - waitAnim = ANIM_IDLE_CHAT; + if (waitAnim == ANIM_STD_NUM) + waitAnim = ANIM_STD_CHAT; if (time) m_nWaitTimer = CTimer::GetTimeInMilliseconds() + *(int*)time; else @@ -7309,7 +7378,7 @@ CPed::SetWaitState(eWaitState state, void *time) SetMoveAnim(); m_headingRate = 0.0f; m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2500; - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f); #ifdef FIX_BUGS animAssoc->SetFinishCallback(RestoreHeadingRateCB, this); #endif @@ -7325,7 +7394,7 @@ CPed::SetWaitState(eWaitState state, void *time) void CPed::Wait(void) { - AnimationId mustHaveAnim = NUM_ANIMS; + AnimationId mustHaveAnim = ANIM_STD_NUM; CAnimBlendAssociation *animAssoc; CPed *pedWeLook; @@ -7353,7 +7422,7 @@ CPed::Wait(void) else SetWaitState(WAITSTATE_CROSS_ROAD_LOOK, nil); - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -7364,7 +7433,7 @@ CPed::Wait(void) case WAITSTATE_CROSS_ROAD_LOOK: if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) { m_nWaitState = WAITSTATE_FALSE; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -7377,7 +7446,7 @@ CPed::Wait(void) uint32 timeLeft = m_nWaitTimer - CTimer::GetTimeInMilliseconds(); if (timeLeft < 2500 && timeLeft > 2000) { m_nWaitTimer -= 500; - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_XPRESS_SCRATCH, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_XPRESS_SCRATCH, 4.0f); } } else { m_nWaitState = WAITSTATE_FALSE; @@ -7411,8 +7480,8 @@ CPed::Wait(void) case WAITSTATE_SURPRISE: if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) { - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HIT_WALL)) { - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_XPRESS_SCRATCH, 4.0f); + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HIT_WALL)) { + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_XPRESS_SCRATCH, 4.0f); animAssoc->SetFinishCallback(FinishedWaitCB, this); m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 5000; } else { @@ -7425,14 +7494,14 @@ CPed::Wait(void) if (CTimer::GetTimeInMilliseconds() <= m_nWaitTimer) break; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_TURN_180); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_TURN180); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS); if (animAssoc) { if (animAssoc->IsPartial()) { @@ -7440,10 +7509,10 @@ CPed::Wait(void) animAssoc->flags |= ASSOC_DELETEFADEDOUT; } else { animAssoc->flags |= ASSOC_DELETEFADEDOUT; - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f); } - if (animAssoc->animId == ANIM_TURN_180) { + if (animAssoc->animId == ANIM_STD_TURN180) { m_fRotationCur = CGeneral::LimitRadianAngle(PI + m_fRotationCur); m_nWaitState = WAITSTATE_FALSE; SetMoveState(PEDMOVE_WALK); @@ -7457,16 +7526,16 @@ CPed::Wait(void) switch (CGeneral::GetRandomNumber() & 3) { case 0: - animToPlay = ANIM_ROAD_CROSS; + animToPlay = ANIM_STD_ROADCROSS; break; case 1: - animToPlay = ANIM_IDLE_TIRED; + animToPlay = ANIM_STD_IDLE_TIRED; break; case 2: - animToPlay = ANIM_XPRESS_SCRATCH; + animToPlay = ANIM_STD_XPRESS_SCRATCH; break; case 3: - animToPlay = ANIM_TURN_180; + animToPlay = ANIM_STD_TURN180; break; default: break; @@ -7474,7 +7543,7 @@ CPed::Wait(void) animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay, 4.0f); - if (animToPlay == ANIM_TURN_180) + if (animToPlay == ANIM_STD_TURN180) animAssoc->SetFinishCallback(FinishedWaitCB, this); m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(1500, 5000); @@ -7483,7 +7552,7 @@ CPed::Wait(void) case WAITSTATE_LOOK_ABOUT: if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) { m_nWaitState = WAITSTATE_FALSE; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -7492,11 +7561,11 @@ CPed::Wait(void) break; case WAITSTATE_PLAYANIM_HANDSUP: - mustHaveAnim = ANIM_HANDSUP; + mustHaveAnim = ANIM_STD_HANDSUP; case WAITSTATE_PLAYANIM_HANDSCOWER: - if (mustHaveAnim == NUM_ANIMS) - mustHaveAnim = ANIM_HANDSCOWER; + if (mustHaveAnim == ANIM_STD_NUM) + mustHaveAnim = ANIM_STD_HANDSCOWER; animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), mustHaveAnim); pedWeLook = (CPed*) m_pLookTarget; @@ -7564,19 +7633,19 @@ CPed::Wait(void) } break; case WAITSTATE_PLAYANIM_COWER: - mustHaveAnim = ANIM_HANDSCOWER; + mustHaveAnim = ANIM_STD_HANDSCOWER; case WAITSTATE_PLAYANIM_DUCK: - if (mustHaveAnim == NUM_ANIMS) - mustHaveAnim = ANIM_DUCK_DOWN; + if (mustHaveAnim == ANIM_STD_NUM) + mustHaveAnim = ANIM_STD_DUCK_DOWN; case WAITSTATE_PLAYANIM_TAXI: - if (mustHaveAnim == NUM_ANIMS) - mustHaveAnim = ANIM_IDLE_TAXI; + if (mustHaveAnim == ANIM_STD_NUM) + mustHaveAnim = ANIM_STD_HAILTAXI; case WAITSTATE_PLAYANIM_CHAT: - if (mustHaveAnim == NUM_ANIMS) - mustHaveAnim = ANIM_IDLE_CHAT; + if (mustHaveAnim == ANIM_STD_NUM) + mustHaveAnim = ANIM_STD_CHAT; if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) { animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), mustHaveAnim); @@ -7602,11 +7671,11 @@ CPed::Wait(void) break; case WAITSTATE_FINISH_FLEE: - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED); if (animAssoc) { if (CTimer::GetTimeInMilliseconds() > m_nWaitTimer) { animAssoc->flags |= ASSOC_DELETEFADEDOUT; - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f); int timer = 2000; m_nWaitState = WAITSTATE_FALSE; SetWaitState(WAITSTATE_CROSS_ROAD_LOOK, &timer); @@ -7686,7 +7755,7 @@ CPed::SetSolicit(uint32 time) m_chatTimer = CTimer::GetTimeInMilliseconds() + time; if(!m_carInObjective->bIsVan && !m_carInObjective->bIsBus) - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_HOOKERTALK, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_HOOKERTALK, 4.0f); SetPedState(PED_SOLICIT); } @@ -7713,7 +7782,7 @@ CPed::Solicit(void) if ((GetPosition() - doorPos).MagnitudeSqr() <= 1.0f) return; - CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_HOOKERTALK); + CAnimBlendAssociation *talkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_HOOKERTALK); if (talkAssoc) { talkAssoc->blendDelta = -1000.0f; talkAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -7959,12 +8028,12 @@ CPed::SetJump(void) { if (!bInVehicle && #if defined VC_PED_PORTS || defined FIX_BUGS - m_nPedState != PED_JUMP && !RpAnimBlendClumpGetAssociation(GetClump(), ANIM_JUMP_LAUNCH) && + m_nPedState != PED_JUMP && !RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_JUMP_LAUNCH) && #endif (m_nSurfaceTouched != SURFACE_STEEP_CLIFF || DotProduct(GetForward(), m_vecDamageNormal) >= 0.0f)) { SetStoredState(); SetPedState(PED_JUMP); - CAnimBlendAssociation *jumpAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_JUMP_LAUNCH, 8.0f); + CAnimBlendAssociation *jumpAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_JUMP_LAUNCH, 8.0f); jumpAssoc->SetFinishCallback(FinishLaunchCB, this); m_fRotationDest = m_fRotationCur; } @@ -7979,7 +8048,7 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg) return; CVector forward(0.15f * ped->GetForward() + ped->GetPosition()); - forward.z += CModelInfo::GetModelInfo(ped->GetModelIndex())->GetColModel()->spheres->center.z + 0.25f; + forward.z += CModelInfo::GetColModel(ped->GetModelIndex())->spheres->center.z + 0.25f; CEntity *obstacle = CWorld::TestSphereAgainstWorld(forward, 0.25f, nil, true, true, false, true, false, false); if (!obstacle) { @@ -7993,7 +8062,7 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg) animAssoc->flags |= ASSOC_DELETEFADEDOUT; // ANIM_HIT_WALL in VC (which makes more sense) - CAnimBlendAssociation *handsCoverAssoc = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_HANDSCOWER, 8.0f); + CAnimBlendAssociation *handsCoverAssoc = CAnimManager::BlendAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSCOWER, 8.0f); handsCoverAssoc->flags &= ~ASSOC_FADEOUTWHENDONE; handsCoverAssoc->SetFinishCallback(FinishHitHeadCB, ped); ped->bIsLanding = true; @@ -8001,12 +8070,12 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg) } float velocityFromAnim = 0.1f; - CAnimBlendAssociation *sprintAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_SPRINT); + CAnimBlendAssociation *sprintAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_STD_RUNFAST); if (sprintAssoc) { velocityFromAnim = 0.05f * sprintAssoc->blendAmount + 0.17f; } else { - CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_RUN); + CAnimBlendAssociation *runAssoc = RpAnimBlendClumpGetAssociation(ped->GetClump(), ANIM_STD_RUN); if (runAssoc) { velocityFromAnim = 0.07f * runAssoc->blendAmount + 0.1f; } @@ -8050,7 +8119,7 @@ CPed::FinishLaunchCB(CAnimBlendAssociation *animAssoc, void *arg) ped->bIsStanding = false; ped->bIsInTheAir = true; animAssoc->blendDelta = -1000.0f; - CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_JUMP_GLIDE); + CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_JUMP_GLIDE); if (ped->bDoBloodyFootprints) { CVector bloodPos(0.0f, 0.0f, 0.0f); @@ -8318,7 +8387,7 @@ CPed::WarpPedIntoCar(CVehicle *car) #else if (car->IsBoat()) { #ifndef FIX_BUGS - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE, 100.0f); #else m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, car->GetDriverAnim(), 100.0f); #endif @@ -8329,9 +8398,9 @@ CPed::WarpPedIntoCar(CVehicle *car) RemoveWeaponWhenEnteringVehicle(); if (car->bLowVehicle) - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_LSIT, 100.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT_LO, 100.0f); else - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT, 100.0f); } #endif @@ -8447,21 +8516,21 @@ CPed::renderLimb(int node) void CPed::Save(uint8*& buf) { - SkipSaveBuf(buf, 52); + ZeroSaveBuf(buf, 52); CopyToBuf(buf, GetPosition().x); CopyToBuf(buf, GetPosition().y); CopyToBuf(buf, GetPosition().z); - SkipSaveBuf(buf, 288); + ZeroSaveBuf(buf, 288); CopyToBuf(buf, CharCreatedBy); - SkipSaveBuf(buf, 351); + ZeroSaveBuf(buf, 351); CopyToBuf(buf, m_fHealth); CopyToBuf(buf, m_fArmour); - SkipSaveBuf(buf, 148); + ZeroSaveBuf(buf, 148); for (int i = 0; i < 13; i++) // has to be hardcoded m_weapons[i].Save(buf); - SkipSaveBuf(buf, 5); + ZeroSaveBuf(buf, 5); CopyToBuf(buf, m_maxWeaponTypeAllowed); - SkipSaveBuf(buf, 162); + ZeroSaveBuf(buf, 162); } void diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 0617a7bb..33839aa7 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -515,10 +515,10 @@ public: CVector m_vecSeekPosEx; // used for OBJECTIVE_GUARD_SPOT float m_distanceToCountSeekDoneEx; // used for OBJECTIVE_GUARD_SPOT - 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(); CPed(uint32 pedType); ~CPed(void); @@ -625,7 +625,7 @@ public: void SetAimFlag(CEntity* to); void SetAimFlag(float angle); void SetAmmo(eWeaponType weaponType, uint32 ammo); - void SetEvasiveStep(CEntity*, uint8); + void SetEvasiveStep(CPhysical*, uint8); void GrantAmmo(eWeaponType, uint32); void SetEvasiveDive(CPhysical*, uint8); void SetAttack(CEntity*); diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp index 089c8d9d..f1c753ec 100644 --- a/src/peds/PedAI.cpp +++ b/src/peds/PedAI.cpp @@ -1121,7 +1121,7 @@ CPed::ProcessObjective(void) if (m_attackTimer < CTimer::GetTimeInMilliseconds() && distWithTargetSc < wepRange && m_pedInObjective->m_nPedState != PED_GETUP && m_pedInObjective->m_nPedState != PED_DRAG_FROM_CAR) { if (bIsDucking) { - CAnimBlendAssociation *duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN); + CAnimBlendAssociation *duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN); if (duckAnim) { duckAnim->blendDelta = -2.0f; break; @@ -1202,14 +1202,14 @@ CPed::ProcessObjective(void) // This is weird... if (bNotAllowedToDuck && bKindaStayInSamePlace) { if (!bIsDucking) { - CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN); + CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN); if (!duckAnim || duckAnim->blendDelta < 0.0f) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DUCK_DOWN, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_DOWN, 4.0f); bIsDucking = true; } break; } else { - CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN); + CAnimBlendAssociation* duckAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN); if (!duckAnim || duckAnim->blendDelta < 0.0f) { bIsDucking = false; } else { @@ -1701,9 +1701,9 @@ CPed::ProcessObjective(void) } break; case OBJECTIVE_HAIL_TAXI: - if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TAXI) && CTimer::GetTimeInMilliseconds() > m_nWaitTimer) { + if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HAILTAXI) && CTimer::GetTimeInMilliseconds() > m_nWaitTimer) { Say(SOUND_PED_TAXI_WAIT); - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TAXI, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HAILTAXI, 4.0f); m_nWaitTimer = CTimer::GetTimeInMilliseconds() + 2000; } break; @@ -1813,7 +1813,7 @@ CPed::ProcessObjective(void) float distWithTargetScSqr = distWithTarget.MagnitudeSqr(); if (distWithTargetScSqr <= sq(10.0f)) { if (distWithTargetScSqr <= sq(1.4f)) { - CAnimBlendAssociation *reloadAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_AK_RELOAD); + CAnimBlendAssociation *reloadAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_AK_RELOAD); m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints( m_pedInObjective->GetPosition().x, m_pedInObjective->GetPosition().y, GetPosition().x, GetPosition().y); @@ -1821,7 +1821,7 @@ CPed::ProcessObjective(void) if (reloadAssoc || !m_pedInObjective->IsPedShootable()) { if (reloadAssoc && (!reloadAssoc->IsRunning() || reloadAssoc->currentTime / reloadAssoc->hierarchy->totalLength > 0.8f)) { - CAnimBlendAssociation *punchAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_PPUNCH, 8.0f); + CAnimBlendAssociation *punchAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PARTIAL_PUNCH, 8.0f); punchAssoc->flags |= ASSOC_DELETEFADEDOUT; punchAssoc->flags |= ASSOC_FADEOUTWHENDONE; CVector2D offset(distWithTarget.x, distWithTarget.y); @@ -1850,13 +1850,13 @@ CPed::ProcessObjective(void) if (weaponType != WEAPONTYPE_UNARMED && weaponType != WEAPONTYPE_BASEBALLBAT) SetCurrentWeapon(WEAPONTYPE_UNARMED); - CAnimBlendAssociation *newReloadAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_AK_RELOAD, 8.0f); + CAnimBlendAssociation *newReloadAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_AK_RELOAD, 8.0f); newReloadAssoc->flags |= ASSOC_DELETEFADEDOUT; newReloadAssoc->flags |= ASSOC_FADEOUTWHENDONE; } } else { SetSeek(m_pedInObjective, 1.0f); - CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK); + CAnimBlendAssociation *walkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_WALK); if (walkAssoc) walkAssoc->speed = 1.3f; @@ -2256,26 +2256,26 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg) } if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT) { if (itsVan) { - enterAnim = ANIM_VAN_GETIN; + enterAnim = ANIM_STD_VAN_GET_IN_REAR_RHS; } else if (itsBus) { - enterAnim = ANIM_COACH_IN_R; + enterAnim = ANIM_STD_COACH_GET_IN_RHS; #ifdef FIX_BUGS } else if (itsLow) { - enterAnim = ANIM_CAR_GETIN_LOW_RHS; + enterAnim = ANIM_STD_CAR_GET_IN_LO_RHS; #endif } else { - enterAnim = ANIM_CAR_GETIN_RHS; + enterAnim = ANIM_STD_CAR_GET_IN_RHS; } } else if (itsVan) { - enterAnim = ANIM_VAN_GETIN_L; + enterAnim = ANIM_STD_VAN_GET_IN_REAR_LHS; } else if (itsBus) { - enterAnim = ANIM_COACH_IN_L; + enterAnim = ANIM_STD_COACH_GET_IN_LHS; #ifdef FIX_BUGS } else if (itsLow) { - enterAnim = ANIM_CAR_GETIN_LOW_LHS; + enterAnim = ANIM_STD_CAR_GET_IN_LO_LHS; #endif } else { - enterAnim = ANIM_CAR_GETIN_LHS; + enterAnim = ANIM_STD_CAR_GET_IN_LHS; } ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, enterAnim); ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped); @@ -2285,16 +2285,16 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg) veh->AutoPilot.m_nCruiseSpeed = 0; if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT) { if (itsVan) { - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_VAN_OPEN); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_VAN_OPEN_DOOR_REAR_RHS); } else if (itsBus) { - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_COACH_OPEN_R); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_COACH_OPEN_RHS); } else { - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_OPEN_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_OPEN_DOOR_RHS); } } else if (itsVan) { - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_VAN_OPEN_L); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_VAN_OPEN_DOOR_REAR_LHS); } else if (itsBus) { - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_COACH_OPEN_L); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_COACH_OPEN_LHS); } else { if (ped->m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER && veh->pDriver) { @@ -2303,7 +2303,7 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg) && veh->pDriver->CharCreatedBy != MISSION_CHAR && veh->pDriver->m_nPedState == PED_DRIVING) { - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_QJACK); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_QUICKJACK); ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped); veh->pDriver->SetBeingDraggedFromCar(veh, ped->m_vehDoor, true); @@ -2312,15 +2312,15 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg) return; } } - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_OPEN_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_OPEN_DOOR_LHS); } ped->m_pVehicleAnim->SetFinishCallback(PedAnimDoorOpenCB, ped); } else { if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT) - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_DOORLOCKED_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CARDOOR_LOCKED_RHS); else - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_DOORLOCKED_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CARDOOR_LOCKED_LHS); ped->bCancelEnteringCar = true; ped->m_pVehicleAnim->SetFinishCallback(PedAnimDoorOpenCB, ped); @@ -2393,13 +2393,13 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg) if (veh->m_vecMoveSpeed.Magnitude() > 0.2f) { ped->QuitEnteringCar(); if (ped->m_vehDoor != CAR_DOOR_LF && ped->m_vehDoor != CAR_DOOR_LR) - ped->SetFall(1000, ANIM_KO_SPIN_R, false); + ped->SetFall(1000, ANIM_STD_HIGHIMPACT_LEFT, false); else - ped->SetFall(1000, ANIM_KO_SPIN_L, false); + ped->SetFall(1000, ANIM_STD_HIGHIMPACT_RIGHT, false); return; } - veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_OPEN_LHS, 1.0f); + veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_STD_CAR_OPEN_DOOR_LHS, 1.0f); if (ped->m_vehDoor == CAR_DOOR_LF || ped->m_vehDoor == CAR_DOOR_RF) isVan = false; @@ -2409,22 +2409,22 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg) if (ped->m_vehDoor != CAR_DOOR_LF && ped->m_vehDoor != CAR_DOOR_LR) { if (isVan) { - animToPlay = ANIM_VAN_GETIN; + animToPlay = ANIM_STD_VAN_GET_IN_REAR_RHS; } else if (isBus) { - animToPlay = ANIM_COACH_IN_R; + animToPlay = ANIM_STD_COACH_GET_IN_RHS; } else if (isLow) { - animToPlay = ANIM_CAR_GETIN_LOW_RHS; + animToPlay = ANIM_STD_CAR_GET_IN_LO_RHS; } else { - animToPlay = ANIM_CAR_GETIN_RHS; + animToPlay = ANIM_STD_CAR_GET_IN_RHS; } } else if (isVan) { - animToPlay = ANIM_VAN_GETIN_L; + animToPlay = ANIM_STD_VAN_GET_IN_REAR_LHS; } else if (isBus) { - animToPlay = ANIM_COACH_IN_L; + animToPlay = ANIM_STD_COACH_GET_IN_LHS; } else if (isLow) { - animToPlay = ANIM_CAR_GETIN_LOW_LHS; + animToPlay = ANIM_STD_CAR_GET_IN_LO_LHS; } else { - animToPlay = ANIM_CAR_GETIN_LHS; + animToPlay = ANIM_STD_CAR_GET_IN_LHS; } ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, animToPlay); ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped); @@ -2451,9 +2451,9 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg) pedToDragOut = nil; } else { if (isLow) - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_LOW_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_LO_RHS); else - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_RHS); ped->m_pVehicleAnim->SetFinishCallback(PedAnimPullPedOutCB, ped); } @@ -2468,9 +2468,9 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg) } else { // BUG: Probably we will sit on top of the passenger if his m_ped_flagF4 is true. if (isLow) - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS); else - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS); ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped); } @@ -2483,17 +2483,17 @@ CPed::PedAnimDoorOpenCB(CAnimBlendAssociation* animAssoc, void* arg) pedToDragOut = nil; } else { if (isLow) - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_LOW_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_LO_LHS); else - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_PULLOUT_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_PULL_OUT_PED_LHS); ped->m_pVehicleAnim->SetFinishCallback(PedAnimPullPedOutCB, ped); } } else { if (isLow) - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS); else - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_GETIN_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS); ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped); } @@ -2577,13 +2577,13 @@ CPed::PedAnimPullPedOutCB(CAnimBlendAssociation* animAssoc, void* arg) AnimationId animToPlay; if (ped->m_vehDoor != CAR_DOOR_LF && ped->m_vehDoor != CAR_DOOR_LR) { if (isLow) - animToPlay = ANIM_CAR_GETIN_LOW_RHS; + animToPlay = ANIM_STD_CAR_GET_IN_LO_RHS; else - animToPlay = ANIM_CAR_GETIN_RHS; + animToPlay = ANIM_STD_CAR_GET_IN_RHS; } else if (isLow) { - animToPlay = ANIM_CAR_GETIN_LOW_LHS; + animToPlay = ANIM_STD_CAR_GET_IN_LO_LHS; } else { - animToPlay = ANIM_CAR_GETIN_LHS; + animToPlay = ANIM_STD_CAR_GET_IN_LHS; } ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, animToPlay); ped->m_pVehicleAnim->SetFinishCallback(PedAnimGetInCB, ped); @@ -2717,18 +2717,18 @@ CPed::PedAnimGetInCB(CAnimBlendAssociation *animAssoc, void *arg) AnimationId animToPlay; if (enterDoor != DOOR_FRONT_LEFT && enterDoor != DOOR_REAR_LEFT) { if (isVan) { - animToPlay = ANIM_VAN_CLOSE; + animToPlay = ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS; } else if (isLow) { - animToPlay = ANIM_CAR_CLOSEDOOR_LOW_RHS; + animToPlay = ANIM_STD_CAR_CLOSE_DOOR_LO_RHS; } else { - animToPlay = ANIM_CAR_CLOSEDOOR_RHS; + animToPlay = ANIM_STD_CAR_CLOSE_DOOR_RHS; } } else if (isVan) { - animToPlay = ANIM_VAN_CLOSE_L; + animToPlay = ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS; } else if (isLow) { - animToPlay = ANIM_CAR_CLOSEDOOR_LOW_LHS; + animToPlay = ANIM_STD_CAR_CLOSE_DOOR_LO_LHS; } else { - animToPlay = ANIM_CAR_CLOSEDOOR_LHS; + animToPlay = ANIM_STD_CAR_CLOSE_DOOR_LHS; } ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, animToPlay); ped->m_pVehicleAnim->SetFinishCallback(PedAnimDoorCloseCB, ped); @@ -2749,7 +2749,7 @@ CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *animAssoc, void *arg) bool isLow = !!veh->bLowVehicle; if (!veh->bIsBus) - veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_CLOSEDOOR_LHS, 1.0f); + veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_STD_CAR_CLOSE_DOOR_LHS, 1.0f); eDoors door; switch (ped->m_vehDoor) { @@ -2796,9 +2796,9 @@ CPed::PedAnimDoorCloseCB(CAnimBlendAssociation *animAssoc, void *arg) animAssoc->blendDelta = -1000.0f; if (isLow) - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_LSHUFFLE_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SHUFFLE_LO_RHS); else - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_SHUFFLE_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SHUFFLE_RHS); ped->m_pVehicleAnim->SetFinishCallback(PedSetInCarCB, ped); } @@ -2902,7 +2902,7 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg) veh->m_vecMoveSpeed += CVector(0.001f, 0.001f, 0.001f); veh->m_vecTurnSpeed += CVector(0.001f, 0.001f, 0.001f); if (!veh->bIsBus) - veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_CAR_GETOUT_LHS, 1.0f); + veh->ProcessOpenDoor(ped->m_vehDoor, ANIM_STD_GETOUT_LHS, 1.0f); /* // Duplicate and only in PC for some reason @@ -2991,16 +2991,16 @@ CPed::PedAnimStepOutCarCB(CAnimBlendAssociation* animAssoc, void* arg) } else { switch (door) { case DOOR_FRONT_LEFT: - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_LHS); break; case DOOR_FRONT_RIGHT: - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_RHS); break; case DOOR_REAR_LEFT: - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_LHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_LHS); break; case DOOR_REAR_RIGHT: - ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_CAR_CLOSE_RHS); + ped->m_pVehicleAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_RHS); break; default: break; @@ -3026,19 +3026,19 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase) return; if (!bChangedSeat && phase != LINE_UP_TO_CAR_2) { - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SIT)) { + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT)) { SetPedPositionInCar(); return; } - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LSIT)) { + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_LO)) { SetPedPositionInCar(); return; } - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SITP)) { + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_P)) { SetPedPositionInCar(); return; } - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SITPLO)) { + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_P_LO)) { SetPedPositionInCar(); return; } @@ -3093,22 +3093,22 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase) vehAnim = m_pVehicleAnim->animId; switch (vehAnim) { - case ANIM_CAR_JACKED_RHS: - case ANIM_CAR_LJACKED_RHS: - case ANIM_CAR_JACKED_LHS: - case ANIM_CAR_LJACKED_LHS: - case ANIM_VAN_GETIN_L: - case ANIM_VAN_GETIN: + case ANIM_STD_JACKEDCAR_RHS: + case ANIM_STD_JACKEDCAR_LO_RHS: + case ANIM_STD_JACKEDCAR_LHS: + case ANIM_STD_JACKEDCAR_LO_LHS: + case ANIM_STD_VAN_GET_IN_REAR_LHS: + case ANIM_STD_VAN_GET_IN_REAR_RHS: #ifdef VC_PED_PORTS multExtractedFromAnim = true; zBlend = Max(m_pVehicleAnim->currentTime / m_pVehicleAnim->hierarchy->totalLength - 0.3f, 0.0f) / (1.0f - 0.3f); // fall through #endif - case ANIM_CAR_QJACKED: - case ANIM_CAR_GETOUT_LHS: - case ANIM_CAR_GETOUT_LOW_LHS: - case ANIM_CAR_GETOUT_RHS: - case ANIM_CAR_GETOUT_LOW_RHS: + case ANIM_STD_QUICKJACKED: + case ANIM_STD_GETOUT_LHS: + case ANIM_STD_GETOUT_LO_LHS: + case ANIM_STD_GETOUT_RHS: + case ANIM_STD_GETOUT_LO_RHS: #ifdef VC_PED_PORTS if (!multExtractedFromAnim) { multExtractedFromAnim = true; @@ -3116,14 +3116,14 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase) } // fall through #endif - case ANIM_CAR_CRAWLOUT_RHS: - case ANIM_CAR_CRAWLOUT_RHS2: - case ANIM_VAN_GETOUT_L: - case ANIM_VAN_GETOUT: + case ANIM_STD_CRAWLOUT_LHS: + case ANIM_STD_CRAWLOUT_RHS: + case ANIM_STD_VAN_GET_OUT_REAR_LHS: + case ANIM_STD_VAN_GET_OUT_REAR_RHS: seatPosMult = m_pVehicleAnim->currentTime / m_pVehicleAnim->hierarchy->totalLength; break; - case ANIM_CAR_GETIN_RHS: - case ANIM_CAR_GETIN_LHS: + case ANIM_STD_CAR_GET_IN_RHS: + case ANIM_STD_CAR_GET_IN_LHS: #ifdef VC_PED_PORTS if (veh && veh->IsCar() && veh->bIsBus) { multExtractedFromAnimBus = true; @@ -3131,27 +3131,27 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase) } // fall through #endif - case ANIM_CAR_QJACK: - case ANIM_CAR_GETIN_LOW_LHS: - case ANIM_CAR_GETIN_LOW_RHS: - case ANIM_DRIVE_BOAT: + case ANIM_STD_QUICKJACK: + case ANIM_STD_CAR_GET_IN_LO_LHS: + case ANIM_STD_CAR_GET_IN_LO_RHS: + case ANIM_STD_BOAT_DRIVE: seatPosMult = m_pVehicleAnim->GetTimeLeft() / m_pVehicleAnim->hierarchy->totalLength; break; - case ANIM_CAR_CLOSEDOOR_LHS: - case ANIM_CAR_CLOSEDOOR_LOW_LHS: - case ANIM_CAR_CLOSEDOOR_RHS: - case ANIM_CAR_CLOSEDOOR_LOW_RHS: - case ANIM_CAR_SHUFFLE_RHS: - case ANIM_CAR_LSHUFFLE_RHS: + case ANIM_STD_CAR_CLOSE_DOOR_LHS: + case ANIM_STD_CAR_CLOSE_DOOR_LO_LHS: + case ANIM_STD_CAR_CLOSE_DOOR_RHS: + case ANIM_STD_CAR_CLOSE_DOOR_LO_RHS: + case ANIM_STD_CAR_SHUFFLE_RHS: + case ANIM_STD_CAR_SHUFFLE_LO_RHS: seatPosMult = 0.0f; break; - case ANIM_CAR_CLOSE_LHS: - case ANIM_CAR_CLOSE_RHS: - case ANIM_COACH_OPEN_L: - case ANIM_COACH_OPEN_R: - case ANIM_COACH_IN_L: - case ANIM_COACH_IN_R: - case ANIM_COACH_OUT_L: + case ANIM_STD_CAR_CLOSE_LHS: + case ANIM_STD_CAR_CLOSE_RHS: + case ANIM_STD_COACH_OPEN_LHS: + case ANIM_STD_COACH_OPEN_RHS: + case ANIM_STD_COACH_GET_IN_LHS: + case ANIM_STD_COACH_GET_IN_RHS: + case ANIM_STD_COACH_GET_OUT_LHS: seatPosMult = 1.0f; break; default: @@ -3203,10 +3203,10 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase) } else { #endif currentZ = GetPosition().z; - if (m_pVehicleAnim && vehAnim != ANIM_VAN_GETIN_L && vehAnim != ANIM_VAN_CLOSE_L && vehAnim != ANIM_VAN_CLOSE && vehAnim != ANIM_VAN_GETIN) { + if (m_pVehicleAnim && vehAnim != ANIM_STD_VAN_GET_IN_REAR_LHS && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS && vehAnim != ANIM_STD_VAN_GET_IN_REAR_RHS) { neededPos.z = autoZPos.z; m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); - } else if (neededPos.z < currentZ && m_pVehicleAnim && vehAnim != ANIM_VAN_CLOSE_L && vehAnim != ANIM_VAN_CLOSE) { + } else if (neededPos.z < currentZ && m_pVehicleAnim && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS && vehAnim != ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS) { adjustedTimeStep = Max(m_pVehicleAnim->timeStep, 0.1f); // Smoothly change ped position @@ -3227,8 +3227,8 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase) } else { #endif if (m_pVehicleAnim && - (vehAnim == ANIM_CAR_GETIN_RHS || vehAnim == ANIM_CAR_GETIN_LOW_RHS || vehAnim == ANIM_CAR_GETIN_LHS || vehAnim == ANIM_CAR_GETIN_LOW_LHS - || vehAnim == ANIM_CAR_QJACK || vehAnim == ANIM_VAN_GETIN_L || vehAnim == ANIM_VAN_GETIN)) { + (vehAnim == ANIM_STD_CAR_GET_IN_RHS || vehAnim == ANIM_STD_CAR_GET_IN_LO_RHS || vehAnim == ANIM_STD_CAR_GET_IN_LHS || vehAnim == ANIM_STD_CAR_GET_IN_LO_LHS + || vehAnim == ANIM_STD_QUICKJACK || vehAnim == ANIM_STD_VAN_GET_IN_REAR_LHS || vehAnim == ANIM_STD_VAN_GET_IN_REAR_RHS)) { adjustedTimeStep = Max(m_pVehicleAnim->timeStep, 0.1f); // Smoothly change ped position @@ -3358,9 +3358,9 @@ CPed::SetCarJack_AllClear(CVehicle *car, uint32 doorNode, uint32 doorFlag) bUsesCollision = false; if (m_vehDoor == CAR_DOOR_LF || m_vehDoor == CAR_DOOR_LR) - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_CAR_ALIGNHI_LHS : ANIM_CAR_ALIGN_LHS, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_STD_CAR_ALIGNHI_DOOR_LHS : ANIM_STD_CAR_ALIGN_DOOR_LHS, 4.0f); else - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_CAR_ALIGNHI_RHS : ANIM_CAR_ALIGN_RHS, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, zDiff > 4.4f ? ANIM_STD_CAR_ALIGNHI_DOOR_RHS : ANIM_STD_CAR_ALIGN_DOOR_RHS, 4.0f); m_pVehicleAnim->SetFinishCallback(PedAnimAlignCB, this); } @@ -3408,14 +3408,14 @@ CPed::BeingDraggedFromCar(void) PedLineUpPhase lineUpType; if (!m_pVehicleAnim) { - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 100.0f); - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SIT); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 100.0f); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT); if (!animAssoc) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LSIT); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_LO); if (!animAssoc) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SITP); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_P); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_SITPLO); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_SIT_P_LO); } } if (animAssoc) @@ -3423,17 +3423,17 @@ CPed::BeingDraggedFromCar(void) if (m_vehDoor == CAR_DOOR_LF || m_vehDoor == CAR_DOOR_LR) { if (bWillBeQuickJacked) { - enterAnim = ANIM_CAR_QJACKED; + enterAnim = ANIM_STD_QUICKJACKED; } else if (m_pMyVehicle->bLowVehicle) { - enterAnim = ANIM_CAR_LJACKED_LHS; + enterAnim = ANIM_STD_JACKEDCAR_LO_LHS; } else { - enterAnim = ANIM_CAR_JACKED_LHS; + enterAnim = ANIM_STD_JACKEDCAR_LHS; } } else if (m_vehDoor == CAR_DOOR_RF || m_vehDoor == CAR_DOOR_RR) { if (m_pMyVehicle->bLowVehicle) - enterAnim = ANIM_CAR_LJACKED_RHS; + enterAnim = ANIM_STD_JACKEDCAR_LO_RHS; else - enterAnim = ANIM_CAR_JACKED_RHS; + enterAnim = ANIM_STD_JACKEDCAR_RHS; } else dontRunAnim = true; @@ -3454,7 +3454,7 @@ CPed::BeingDraggedFromCar(void) #ifdef VC_PED_PORTS if (m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE) { if (m_pMyVehicle) { - m_pMyVehicle->ProcessOpenDoor(m_vehDoor, NUM_ANIMS, m_pVehicleAnim->currentTime * 5.0f); + m_pMyVehicle->ProcessOpenDoor(m_vehDoor, ANIM_STD_NUM, m_pVehicleAnim->currentTime * 5.0f); } } #endif @@ -3534,16 +3534,16 @@ CPed::SetEnterCar_AllClear(CVehicle *car, uint32 doorNode, uint32 doorFlag) #ifdef VC_PED_PORTS // VC checks for handling flag, but we can't do that if(car->GetModelIndex() == MI_SPEEDER) - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT, 100.0f); else - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE, 100.0f); PedSetInCarCB(nil, this); bVehExitWillBeInstant = true; #else #ifndef FIX_BUGS - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DRIVE_BOAT, 100.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_BOAT_DRIVE, 100.0f); #else m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, car->GetDriverAnim(), 100.0f); #endif @@ -3555,15 +3555,15 @@ CPed::SetEnterCar_AllClear(CVehicle *car, uint32 doorNode, uint32 doorFlag) } else { if (zDiff > 4.4f) { if (m_vehDoor == CAR_DOOR_RF || m_vehDoor == CAR_DOOR_RR) - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ALIGNHI_RHS, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_ALIGNHI_DOOR_RHS, 4.0f); else - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ALIGNHI_LHS, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_ALIGNHI_DOOR_LHS, 4.0f); } else { if (m_vehDoor == CAR_DOOR_RF || m_vehDoor == CAR_DOOR_RR) - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ALIGN_RHS, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_ALIGN_DOOR_RHS, 4.0f); else - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ALIGN_LHS, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_ALIGN_DOOR_LHS, 4.0f); } m_pVehicleAnim->SetFinishCallback(PedAnimAlignCB, this); car->AutoPilot.m_nCruiseSpeed = 0; @@ -3588,7 +3588,7 @@ CPed::EnterCar(void) LineUpPedWithCar(LINE_UP_TO_CAR_START); } else { QuitEnteringCar(); - SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f); + SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f); } } @@ -3601,8 +3601,8 @@ CPed::QuitEnteringCar(void) RestartNonPartialAnims(); - if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE)) - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 100.0f); + if (!RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE)) + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 100.0f); if (veh) { if (m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER || m_nPedState == PED_CARJACK) @@ -3677,9 +3677,9 @@ CPed::SetExitBoat(CVehicle *boat) #ifndef VC_PED_PORTS SetPedState(PED_IDLE); CVector firstPos = GetPosition(); - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 100.0f); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 100.0f); if (boat->GetModelIndex() == MI_SPEEDER && boat->IsUpsideDown()) { - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_CRAWLOUT_RHS, 8.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CRAWLOUT_LHS, 8.0f); m_pVehicleAnim->SetFinishCallback(PedSetOutCarCB, this); m_vehDoor = CAR_DOOR_RF; SetPedState(PED_EXIT_CAR); @@ -3926,7 +3926,7 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode) if (m_pVehicleAnim && m_pVehicleAnim->flags & ASSOC_PARTIAL) m_pVehicleAnim->blendDelta = -1000.0f; SetMoveState(PEDMOVE_NONE); - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 100.0f); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 100.0f); RemoveInCarAnims(); veh->AutoPilot.m_nCruiseSpeed = 0; if (teleportNeeded) { @@ -3966,12 +3966,12 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode) switch (m_vehDoor) { case CAR_DOOR_RF: if (veh->bIsBus) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_COACH_OUT_L); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_COACH_GET_OUT_LHS); } else { if (isLow) - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_RHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_RHS); else - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_RHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_RHS); if (addDoorSmoke) AddYardieDoorSmoke(veh, CAR_DOOR_RF); @@ -3979,21 +3979,21 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode) break; case CAR_DOOR_RR: if (veh->bIsVan) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_VAN_GETOUT); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_VAN_GET_OUT_REAR_RHS); } else if (isLow) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_RHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_RHS); } else { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_RHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_RHS); } break; case CAR_DOOR_LF: if (veh->bIsBus) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_COACH_OUT_L); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_COACH_GET_OUT_LHS); } else { if (isLow) - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_LHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_LHS); else - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LHS); if (addDoorSmoke) AddYardieDoorSmoke(veh, CAR_DOOR_LF); @@ -4001,11 +4001,11 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode) break; case CAR_DOOR_LR: if (veh->bIsVan) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_VAN_GETOUT_L); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_VAN_GET_OUT_REAR_LHS); } else if (isLow) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LOW_LHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LO_LHS); } else { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_GETOUT_LHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_GETOUT_LHS); } break; default: @@ -4032,9 +4032,9 @@ CPed::SetExitCar(CVehicle *veh, uint32 wantedDoorNode) m_pVehicleAnim->SetFinishCallback(PedAnimStepOutCarCB, this); } else { if (m_vehDoor == CAR_DOOR_RF || m_vehDoor == CAR_DOOR_RR) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_CRAWLOUT_RHS2); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CRAWLOUT_RHS); } else if (m_vehDoor == CAR_DOOR_LF || m_vehDoor == CAR_DOOR_LR) { - m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_CRAWLOUT_RHS); + m_pVehicleAnim = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CRAWLOUT_LHS); } m_pVehicleAnim->SetFinishCallback(PedSetOutCarCB, this); } @@ -4067,7 +4067,7 @@ CPed::ExitCar(void) if (m_pSeekTarget) { // Car is upside down if (m_pMyVehicle->GetUp().z > -0.8f) { - if (exitAnim == ANIM_CAR_CLOSE_RHS || exitAnim == ANIM_CAR_CLOSE_LHS || animTime > 0.3f) + if (exitAnim == ANIM_STD_CAR_CLOSE_RHS || exitAnim == ANIM_STD_CAR_CLOSE_LHS || animTime > 0.3f) LineUpPedWithCar(LINE_UP_TO_CAR_END); else LineUpPedWithCar((m_pMyVehicle->GetModelIndex() == MI_DODO ? LINE_UP_TO_CAR_END : LINE_UP_TO_CAR_START)); @@ -4086,7 +4086,7 @@ CPed::ExitCar(void) } } if (foundPed && animTime > 0.4f && foundPed->IsPedInControl()) - foundPed->SetFall(1000, ANIM_KO_SKID_FRONT, 1); + foundPed->SetFall(1000, ANIM_STD_HIGHIMPACT_FRONT, 1); } } @@ -4248,7 +4248,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void) { // FIX: If there were no translations on enter anims, there were overflows all over this function. - CAnimBlendHierarchy *enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_JACKED_LHS)->hierarchy; + CAnimBlendHierarchy *enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_JACKEDCAR_LHS)->hierarchy; CAnimBlendSequence *seq = enterAssoc->sequences; CAnimManager::UncompressAnimation(enterAssoc); if (seq->numFrames > 0) { @@ -4260,7 +4260,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void) } } - enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_GETIN_LHS)->hierarchy; + enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LHS)->hierarchy; seq = enterAssoc->sequences; CAnimManager::UncompressAnimation(enterAssoc); if (seq->numFrames > 0) { @@ -4272,7 +4272,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void) } } - enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_GETIN_LOW_LHS)->hierarchy; + enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_CAR_GET_IN_LO_LHS)->hierarchy; seq = enterAssoc->sequences; CAnimManager::UncompressAnimation(enterAssoc); if (seq->numFrames > 0) { @@ -4284,7 +4284,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void) } } - enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_CAR_QJACKED)->hierarchy; + enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_QUICKJACKED)->hierarchy; seq = enterAssoc->sequences; CAnimManager::UncompressAnimation(enterAssoc); if (seq->numFrames > 0) { @@ -4296,7 +4296,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void) } } - enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_VAN_GETIN_L)->hierarchy; + enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_VAN_GET_IN_REAR_LHS)->hierarchy; seq = enterAssoc->sequences; CAnimManager::UncompressAnimation(enterAssoc); if (seq->numFrames > 0) { @@ -4308,7 +4308,7 @@ CPed::SetAnimOffsetForEnterOrExitVehicle(void) } } - enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_TRAIN_GETOUT)->hierarchy; + enterAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, ANIM_STD_TRAIN_GETOUT)->hierarchy; seq = enterAssoc->sequences; CAnimManager::UncompressAnimation(enterAssoc); if (seq->numFrames > 0) { @@ -4614,7 +4614,7 @@ CPed::SetEnterTrain(CVehicle *train, uint32 unused) m_pMyVehicle->RegisterReference((CEntity **) &m_pMyVehicle); SetPedState(PED_ENTER_TRAIN); - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TRAIN_GETIN, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_TRAIN_GETIN, 4.0f); m_pVehicleAnim->SetFinishCallback(PedSetInTrainCB, this); bUsesCollision = false; LineUpPedWithTrain(); @@ -4688,7 +4688,7 @@ CPed::SetExitTrain(CVehicle* train) GetNearestTrainPedPosition(train, exitPos); */ SetPedState(PED_EXIT_TRAIN); - m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_TRAIN_GETOUT, 4.0f); + m_pVehicleAnim = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_TRAIN_GETOUT, 4.0f); m_pVehicleAnim->SetFinishCallback(PedSetOutTrainCB, this); bUsesCollision = false; LineUpPedWithTrain(); @@ -5060,16 +5060,16 @@ CPed::SetDuck(uint32 time) return; if (bCrouchWhenShooting && (m_nPedState == PED_ATTACK || m_nPedState == PED_AIM_GUN)) { - CAnimBlendAssociation *duckAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW); + CAnimBlendAssociation *duckAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_LOW); if (!duckAssoc || duckAssoc->blendDelta < 0.0f) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DUCK_LOW, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_LOW, 4.0f); bIsDucking = true; m_duckTimer = CTimer::GetTimeInMilliseconds() + time; } } else { - CAnimBlendAssociation *duckAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN); + CAnimBlendAssociation *duckAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN); if (!duckAssoc || duckAssoc->blendDelta < 0.0f) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_DUCK_DOWN, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_DUCK_DOWN, 4.0f); bIsDucking = true; m_duckTimer = CTimer::GetTimeInMilliseconds() + time; } @@ -5086,9 +5086,9 @@ CPed::Duck(void) void CPed::ClearDuck(void) { - CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_DOWN); + CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_DOWN); if (!animAssoc) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DUCK_LOW); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_DUCK_LOW); if (!animAssoc) { bIsDucking = false; @@ -5102,9 +5102,9 @@ CPed::ClearDuck(void) if (m_nPedState != PED_ATTACK && m_nPedState != PED_AIM_GUN) return; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RBLOCK_CSHOOT); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RBLOCK_SHOOT); if (!animAssoc || animAssoc->blendDelta < 0.0f) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_RBLOCK_CSHOOT, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_RBLOCK_SHOOT, 4.0f); } } @@ -5154,9 +5154,9 @@ CPed::PedAnimDoorCloseRollingCB(CAnimBlendAssociation* animAssoc, void* arg) animAssoc->blendDelta = -1000.0f; if (veh->bLowVehicle) { - veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR_LOW, 1.0f); + veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS, 1.0f); } else { - veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR, 1.0f); + veh->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, 1.0f); } veh->m_nGettingOutFlags &= ~CAR_DOOR_FLAG_LF; @@ -5235,40 +5235,40 @@ CPed::RemoveInCarAnims(void) CAnimBlendAssociation *animAssoc; if (m_pMyVehicle && m_pMyVehicle->bLowVehicle) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_LOW_L); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_LEFT_LO); if (animAssoc) animAssoc->blendDelta = -1000.0f; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_LOW_R); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_RIGHT_LO); if (animAssoc) animAssoc->blendDelta = -1000.0f; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_L); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT); if (animAssoc) animAssoc->blendDelta = -1000.0f; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_R); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT); if (animAssoc) animAssoc->blendDelta = -1000.0f; } else { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_L); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_LEFT); if (animAssoc) animAssoc->blendDelta = -1000.0f; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_R); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVE_RIGHT); if (animAssoc) animAssoc->blendDelta = -1000.0f; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_L); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT); if (animAssoc) animAssoc->blendDelta = -1000.0f; - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVEBY_R); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT); if (animAssoc) animAssoc->blendDelta = -1000.0f; } #ifdef VC_PED_PORTS - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_DRIVE_BOAT); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_BOAT_DRIVE); if (animAssoc) animAssoc->blendDelta = -1000.0f; #endif - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_LB); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_LOOKBEHIND); if (animAssoc) animAssoc->blendDelta = -1000.0f; } @@ -5362,7 +5362,7 @@ CPed::WarpPedToNearLeaderOffScreen(void) continue; appropriatePos.z = zCorrectedPos.z; - if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f, &TheCamera.GetCameraMatrix()) + if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f) && CWorld::GetIsLineOfSightClear(appropriatePos, warpToPos, true, true, false, true, false, false, false) && !CWorld::TestSphereAgainstWorld(appropriatePos, 0.6f, this, true, true, false, true, false, false)) { teleported = true; @@ -5396,7 +5396,7 @@ CPed::WarpPedToNearEntityOffScreen(CEntity *warpTo) continue; appropriatePos.z = zCorrectedPos.z; - if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f, &TheCamera.GetCameraMatrix()) + if (!TheCamera.IsSphereVisible(appropriatePos, 0.6f) && CWorld::GetIsLineOfSightClear(appropriatePos, warpToPos, true, true, false, true, false, false, false) && !CWorld::TestSphereAgainstWorld(appropriatePos, 0.6f, this, true, true, false, true, false, false)) { teleported = true; diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp index 8625f23e..03d5c755 100644 --- a/src/peds/PedFight.cpp +++ b/src/peds/PedFight.cpp @@ -29,30 +29,30 @@ RpClump *flyingClumpTemp; // This is beta fistfite.dat array. Not used anymore since they're being fetched from fistfite.dat. FightMove tFightMoves[NUM_FIGHTMOVES] = { - {NUM_ANIMS, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_PUNCH_R, 0.2f, 8.0f / 30.0f, 0.0f, 0.3f, HITLEVEL_HIGH, 1, 0}, - {ANIM_FIGHT_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_FIGHT_SH_F, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_FIGHT_KNEE, 4.0f / 30.0f, 0.2f, 0.0f, 0.6f, HITLEVEL_LOW, 2, 0}, - {ANIM_FIGHT_HEAD, 4.0f / 30.0f, 0.2f, 0.0f, 0.7f, HITLEVEL_HIGH, 3, 0}, - {ANIM_FIGHT_PUNCH, 4.0f / 30.0f, 7.0f / 30.0f, 10.0f / 30.0f, 0.4f, HITLEVEL_HIGH, 1, 0}, - {ANIM_FIGHT_LHOOK, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.4f, HITLEVEL_HIGH, 3, 0}, - {ANIM_FIGHT_KICK, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.5, HITLEVEL_MEDIUM, 2, 0}, - {ANIM_FIGHT_LONGKICK, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.5, HITLEVEL_MEDIUM, 4, 0}, - {ANIM_FIGHT_ROUNDHOUSE, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.6f, HITLEVEL_MEDIUM, 4, 0}, - {ANIM_FIGHT_BODYBLOW, 5.0f / 30.0f, 7.0f / 30.0f, 0.0f, 0.35f, HITLEVEL_LOW, 2, 0}, - {ANIM_KICK_FLOOR, 10.0f / 30.0f, 14.0f / 30.0f, 0.0f, 0.4f, HITLEVEL_GROUND, 1, 0}, - {ANIM_HIT_FRONT, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_BACK, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_RIGHT, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_LEFT, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_BODYBLOW, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_CHEST, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_WALK, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_FLOOR_HIT, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_HIT_BEHIND, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, - {ANIM_FIGHT2_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_NUM, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_PUNCH, 0.2f, 8.0f / 30.0f, 0.0f, 0.3f, HITLEVEL_HIGH, 1, 0}, + {ANIM_STD_FIGHT_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_FIGHT_SHUFFLE_F, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_FIGHT_KNEE, 4.0f / 30.0f, 0.2f, 0.0f, 0.6f, HITLEVEL_LOW, 2, 0}, + {ANIM_STD_FIGHT_HEAD, 4.0f / 30.0f, 0.2f, 0.0f, 0.7f, HITLEVEL_HIGH, 3, 0}, + {ANIM_STD_FIGHT_PUNCH, 4.0f / 30.0f, 7.0f / 30.0f, 10.0f / 30.0f, 0.4f, HITLEVEL_HIGH, 1, 0}, + {ANIM_STD_FIGHT_LHOOK, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.4f, HITLEVEL_HIGH, 3, 0}, + {ANIM_STD_FIGHT_KICK, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.5, HITLEVEL_MEDIUM, 2, 0}, + {ANIM_STD_FIGHT_LONGKICK, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.5, HITLEVEL_MEDIUM, 4, 0}, + {ANIM_STD_FIGHT_ROUNDHOUSE, 8.0f / 30.0f, 10.0f / 30.0f, 0.0f, 0.6f, HITLEVEL_MEDIUM, 4, 0}, + {ANIM_STD_FIGHT_BODYBLOW, 5.0f / 30.0f, 7.0f / 30.0f, 0.0f, 0.35f, HITLEVEL_LOW, 2, 0}, + {ANIM_STD_KICKGROUND, 10.0f / 30.0f, 14.0f / 30.0f, 0.0f, 0.4f, HITLEVEL_GROUND, 1, 0}, + {ANIM_STD_HIT_FRONT, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_BACK, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_RIGHT, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_LEFT, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_BODYBLOW, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_CHEST, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_WALK, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_FLOOR, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_HIT_BEHIND, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, + {ANIM_STD_FIGHT_2IDLE, 0.0f, 0.0f, 0.0f, 0.0f, HITLEVEL_NULL, 0, 0}, }; static PedOnGroundState @@ -247,7 +247,7 @@ CPed::SetAttack(CEntity *victim) if (victim && victim->IsPed()) victimPed = (CPed*)victim; - CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_ARMED); + CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_BIGGUN); if (animAssoc) { animAssoc->blendDelta = -1000.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -256,12 +256,12 @@ CPed::SetAttack(CEntity *victim) if (m_attackTimer > CTimer::GetTimeInMilliseconds() || m_nWaitState == WAITSTATE_SURPRISE) return; - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_HGUN_RELOAD)) { + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_HGUN_RELOAD)) { bIsAttacking = false; return; } - if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_AK_RELOAD)) { + if (RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_AK_RELOAD)) { if (!IsPlayer() || m_nPedState != PED_ATTACK || ((CPlayerPed*)this)->m_bHaveTargetSelected) bIsAttacking = false; else @@ -311,15 +311,28 @@ CPed::SetAttack(CEntity *victim) m_pLookTarget->RegisterReference((CEntity **) &m_pLookTarget); m_pSeekTarget->RegisterReference((CEntity **) &m_pSeekTarget); } + if (m_pLookTarget) { SetAimFlag(m_pLookTarget); +#ifdef FREE_CAM + } else if (this != FindPlayerPed() || !((CPlayerPed*)this)->m_bFreeAimActive) { +#else } else { +#endif SetAimFlag(m_fRotationCur); if (FindPlayerPed() == this && TheCamera.Cams[0].Using3rdPersonMouseCam()) ((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch(); } } +#ifdef FIX_BUGS + // fix aiming for flamethrower while using PC controls + else if (GetWeapon()->m_eWeaponType == WEAPONTYPE_FLAMETHROWER && TheCamera.Cams[0].Using3rdPersonMouseCam() && this == FindPlayerPed()) + { + SetAimFlag(m_fRotationCur); + ((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch(); + } +#endif if (m_nPedState == PED_ATTACK) { bIsAttacking = true; return; @@ -351,7 +364,7 @@ CPed::SetAttack(CEntity *victim) SetPedState(PED_ATTACK); SetMoveState(PEDMOVE_NONE); if (bCrouchWhenShooting) { - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_RBLOCK_CSHOOT, 4.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_RBLOCK_SHOOT, 4.0f); } else { float animDelta = 8.0f; if (curWeapon->m_eWeaponFire == WEAPON_FIRE_MELEE) @@ -418,7 +431,7 @@ CPed::ClearAttackByRemovingAnim(void) weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), weapon->m_Anim2ToPlay); if (!weaponAssoc && weapon->IsFlagSet(WEAPONFLAG_THROW)) - weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_THROWU); + weaponAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_THROW_UNDER); if (!weaponAssoc) { ClearAttack(); @@ -440,27 +453,27 @@ CPed::FinishedAttackCB(CAnimBlendAssociation *attackAssoc, void *arg) if (attackAssoc) { switch (attackAssoc->animId) { - case ANIM_WEAPON_START_THROW: + case ANIM_STD_START_THROW: // what?! if ((!ped->IsPlayer() || ((CPlayerPed*)ped)->m_bHaveTargetSelected) && ped->IsPlayer()) { attackAssoc->blendDelta = -1000.0f; - newAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_WEAPON_THROWU); + newAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_THROW_UNDER); } else { attackAssoc->blendDelta = -1000.0f; - newAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_WEAPON_THROW); + newAnim = CAnimManager::AddAnimation(ped->GetClump(), ASSOCGRP_STD, ANIM_STD_WEAPON_THROW); } newAnim->SetFinishCallback(FinishedAttackCB, ped); return; - case ANIM_FIGHT_PPUNCH: + case ANIM_STD_PARTIAL_PUNCH: attackAssoc->blendDelta = -8.0f; attackAssoc->flags |= ASSOC_DELETEFADEDOUT; ped->ClearAttack(); return; - case ANIM_WEAPON_THROW: - case ANIM_WEAPON_THROWU: + case ANIM_STD_WEAPON_THROW: + case ANIM_STD_THROW_UNDER: if (ped->GetWeapon()->m_nAmmoTotal > 0) { currentWeapon = CWeaponInfo::GetWeaponInfo(ped->GetWeapon()->m_eWeaponType); ped->AddWeaponModel(currentWeapon->m_nModelId); @@ -535,16 +548,16 @@ CPed::Attack(void) weaponAnimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ourWeapon->m_AnimToPlay); attackShouldContinue = bIsAttacking; reloadAnimAssoc = nil; - reloadAnim = NUM_ANIMS; + reloadAnim = ANIM_STD_NUM; delayBetweenAnimAndFire = ourWeapon->m_fAnimFrameFire; weaponAnim = ourWeapon->m_AnimToPlay; - if (weaponAnim == ANIM_WEAPON_HGUN_BODY) - reloadAnim = ANIM_HGUN_RELOAD; - else if (weaponAnim == ANIM_WEAPON_AK_BODY) - reloadAnim = ANIM_AK_RELOAD; + if (weaponAnim == ANIM_STD_WEAPON_HGUN_BODY) + reloadAnim = ANIM_STD_HGUN_RELOAD; + else if (weaponAnim == ANIM_STD_WEAPON_AK_BODY) + reloadAnim = ANIM_STD_AK_RELOAD; - if (reloadAnim != NUM_ANIMS) + if (reloadAnim != ANIM_STD_NUM) reloadAnimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), reloadAnim); if (bIsDucking) @@ -566,7 +579,7 @@ CPed::Attack(void) // Long throw granade, molotov if (!weaponAnimAssoc && ourWeapon->IsFlagSet(WEAPONFLAG_THROW)) { - weaponAnimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WEAPON_THROWU); + weaponAnimAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_THROW_UNDER); delayBetweenAnimAndFire = 0.2f; } @@ -619,7 +632,7 @@ CPed::Attack(void) firePos = GetMatrix() * firePos; } else if (GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED) { - TransformToNode(firePos, weaponAnimAssoc->animId == ANIM_KICK_FLOOR ? PED_FOOTR : PED_HANDR); + TransformToNode(firePos, weaponAnimAssoc->animId == ANIM_STD_KICKGROUND ? PED_FOOTR : PED_HANDR); } else { firePos = GetMatrix() * firePos; } @@ -636,7 +649,7 @@ CPed::Attack(void) if (GetWeapon()->m_eWeaponState != WEAPONSTATE_MELEE_MADECONTACT) { // If reloading just began, start the animation // Last condition will always return true, even IDA hides it - if (GetWeapon()->m_eWeaponState == WEAPONSTATE_RELOADING && reloadAnim != NUM_ANIMS /* && !reloadAnimAssoc*/) { + if (GetWeapon()->m_eWeaponState == WEAPONSTATE_RELOADING && reloadAnim != ANIM_STD_NUM /* && !reloadAnimAssoc*/) { CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, reloadAnim, 8.0f); ClearLookFlag(); ClearAimFlag(); @@ -646,9 +659,9 @@ CPed::Attack(void) return; } } else { - if (weaponAnimAssoc->animId == ANIM_WEAPON_BAT_V || weaponAnimAssoc->animId == ANIM_WEAPON_BAT_H) { + if (weaponAnimAssoc->animId == ANIM_STD_WEAPON_BAT_V || weaponAnimAssoc->animId == ANIM_STD_WEAPON_BAT_H) { DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_BAT_ATTACK, 1.0f); - } else if (weaponAnimAssoc->animId == ANIM_FIGHT_PPUNCH) { + } else if (weaponAnimAssoc->animId == ANIM_STD_PARTIAL_PUNCH) { DMAudio.PlayOneShot(m_audioEntityId, SOUND_FIGHT_PUNCH_39, 0.0f); } @@ -712,7 +725,7 @@ CPed::Attack(void) weaponAnim = weaponAnimAssoc->animId; if (ourWeapon->m_eWeaponFire != WEAPON_FIRE_MELEE || CheckForPedsOnGroundToAttack(this, nil) < PED_ON_THE_FLOOR) { - if (weaponAnim != ourWeapon->m_Anim2ToPlay || weaponAnim == ANIM_RBLOCK_CSHOOT) { + if (weaponAnim != ourWeapon->m_Anim2ToPlay || weaponAnim == ANIM_STD_RBLOCK_SHOOT) { weaponAnimAssoc->Start(ourWeapon->m_fAnimLoopStart); } else { CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ourWeapon->m_AnimToPlay, 8.0f); @@ -728,6 +741,15 @@ CPed::Attack(void) weaponAnimAssoc->SetCurrentTime(ourWeapon->m_fAnimLoopEnd); weaponAnimAssoc->flags &= ~ASSOC_RUNNING; SetPointGunAt(m_pPointGunAt); +#endif +#ifdef FREE_CAM + } else if (IsPlayer() && ((CPlayerPed*)this)->m_bFreeAimActive && GetWeapon()->m_eWeaponState != WEAPONSTATE_RELOADING) { + float limitedCam = CGeneral::LimitRadianAngle(-TheCamera.Orientation); + SetLookFlag(limitedCam, true); + SetAimFlag(limitedCam); + SetLookTimer(INT32_MAX); + SetPointGunAt(nil); + ((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch(); #endif } else { ClearAimFlag(); @@ -785,16 +807,16 @@ CPed::StartFightAttack(uint8 buttonPressure) SetPedState(PED_FIGHT); m_fightButtonPressure = 0; RpAnimBlendClumpRemoveAssociations(GetClump(), ASSOC_REPEAT); - CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK_START); + CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_STARTWALK); if (animAssoc) { animAssoc->flags |= ASSOC_DELETEFADEDOUT; animAssoc->blendDelta = -1000.0f; } - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP1); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2); if (animAssoc) { animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -805,7 +827,7 @@ CPed::StartFightAttack(uint8 buttonPressure) SetMoveState(PEDMOVE_NONE); m_nStoredMoveState = PEDMOVE_NONE; - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE)->blendAmount = 1.0f; + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_IDLE)->blendAmount = 1.0f; CPed *pedOnGround = nil; if (IsPlayer() && CheckForPedsOnGroundToAttack(this, &pedOnGround) > PED_IN_FRONT_OF_ATTACKER) { @@ -845,7 +867,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) if (hitLevel == HITLEVEL_GROUND) { CAnimBlendAssociation *floorHitAssoc; if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL)) { - floorHitAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f); + floorHitAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f); } else { floorHitAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[FIGHTMOVE_HITONFLOOR].animId, 8.0f); } @@ -867,8 +889,8 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) } else if (m_nPedState == PED_FALL) { if (hitLevel == HITLEVEL_GROUND && !IsPedHeadAbovePos(-0.3f)) { CAnimBlendAssociation *floorHitAssoc = RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL) ? - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f) : - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT, 8.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f) : + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR, 8.0f); if (floorHitAssoc) { floorHitAssoc->flags &= ~ASSOC_FADEOUTWHENDONE; floorHitAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -887,16 +909,16 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) AnimationId shotAnim; switch (direction) { case 1: - shotAnim = ANIM_SHOT_LEFT_PARTIAL; + shotAnim = ANIM_STD_HITBYGUN_LEFT; break; case 2: - shotAnim = ANIM_SHOT_BACK_PARTIAL; + shotAnim = ANIM_STD_HITBYGUN_BACK; break; case 3: - shotAnim = ANIM_SHOT_RIGHT_PARTIAL; + shotAnim = ANIM_STD_HITBYGUN_RIGHT; break; default: - shotAnim = ANIM_SHOT_FRONT_PARTIAL; + shotAnim = ANIM_STD_HITBYGUN_FRONT; break; } CAnimBlendAssociation *shotAssoc = RpAnimBlendClumpGetAssociation(GetClump(), shotAnim); @@ -914,16 +936,16 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) #ifndef VC_PED_PORTS switch (direction) { case 1: - SetFall(500, ANIM_KO_SPIN_R, false); + SetFall(500, ANIM_STD_HIGHIMPACT_LEFT, false); break; case 2: - SetFall(500, ANIM_KO_SKID_BACK, false); + SetFall(500, ANIM_STD_HIGHIMPACT_BACK, false); break; case 3: - SetFall(500, ANIM_KO_SPIN_L, false); + SetFall(500, ANIM_STD_HIGHIMPACT_RIGHT, false); break; default: - SetFall(500, ANIM_KO_SHOT_STOM, false); + SetFall(500, ANIM_STD_KO_SHOT_STOMACH, false); break; } #else @@ -931,30 +953,30 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) AnimationId hitAnim; switch (direction) { case 1: - hitAnim = ANIM_KO_SPIN_R; + hitAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 2: if (CGeneral::GetRandomNumber() & 1) { fall = false; - hitAnim = ANIM_HIT_BACK; + hitAnim = ANIM_STD_HIT_BACK; } else { - hitAnim = ANIM_KO_SKID_BACK; + hitAnim = ANIM_STD_HIGHIMPACT_BACK; } break; case 3: - hitAnim = ANIM_KO_SPIN_L; + hitAnim = ANIM_STD_HIGHIMPACT_RIGHT; break; default: if (hitLevel == HITLEVEL_LOW) { - hitAnim = ANIM_KO_SHOT_STOM; + hitAnim = ANIM_STD_KO_SHOT_STOMACH; } else if (CGeneral::GetRandomNumber() & 1) { fall = false; - hitAnim = ANIM_HIT_WALK; + hitAnim = ANIM_STD_HIT_WALK; } else if (CGeneral::GetRandomNumber() & 1) { fall = false; - hitAnim = ANIM_HIT_HEAD; + hitAnim = ANIM_STD_HIT_HEAD; } else { - hitAnim = ANIM_KO_SHOT_FACE; + hitAnim = ANIM_STD_KO_SHOT_FACE; } break; } @@ -981,15 +1003,15 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) case HITLEVEL_LOW: #ifndef VC_PED_PORTS if (direction == 2) { - SetFall(1000, ANIM_KO_SKID_BACK, false); + SetFall(1000, ANIM_STD_HIGHIMPACT_BACK, false); return; } #else if (direction == 2 && (!IsPlayer() || ((CGeneral::GetRandomNumber() & 1) && m_fHealth < 30.0f))) { - SetFall(1000, ANIM_KO_SKID_BACK, false); + SetFall(1000, ANIM_STD_HIGHIMPACT_BACK, false); return; } else if (direction != 2 && !IsPlayer() && (CGeneral::GetRandomNumber() & 1) && m_fHealth < 30.0f) { - SetFall(1000, ANIM_KO_SHOT_STOM, false); + SetFall(1000, ANIM_STD_KO_SHOT_STOMACH, false); return; } #endif @@ -1044,7 +1066,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) if (IsPlayer()) moveAssoc->speed = 1.3f; - m_takeAStepAfterAttack = 0; + m_takeAStepAfterAttack = false; m_fightButtonPressure = 0; } else if (IsPlayer() && m_currentWeapon != WEAPONTYPE_UNARMED) { CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_curFightMove].animId, 4.0f); @@ -1061,14 +1083,14 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) SetPedState(PED_FIGHT); m_fightButtonPressure = 0; RpAnimBlendClumpRemoveAssociations(GetClump(), ASSOC_REPEAT); - CAnimBlendAssociation *walkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK_START); + CAnimBlendAssociation *walkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_STARTWALK); if (walkStartAssoc) { walkStartAssoc->flags |= ASSOC_DELETEFADEDOUT; walkStartAssoc->blendDelta = -1000.0f; } - CAnimBlendAssociation *walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP); + CAnimBlendAssociation *walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP1); if (!walkStopAssoc) - walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R); + walkStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2); if (walkStopAssoc) { walkStopAssoc->flags |= ASSOC_DELETEFADEDOUT; walkStopAssoc->blendDelta = -1000.0f; @@ -1076,7 +1098,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk) } SetMoveState(PEDMOVE_NONE); m_nStoredMoveState = PEDMOVE_NONE; - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_IDLE)->blendAmount = 1.0f; + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_IDLE)->blendAmount = 1.0f; CAnimBlendAssociation *moveAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, tFightMoves[m_curFightMove].animId, 8.0f); moveAssoc->SetFinishCallback(FinishFightMoveCB, this); m_fightState = FIGHTSTATE_NO_MOVE; @@ -1445,22 +1467,22 @@ CPed::EndFight(uint8 endType) m_curFightMove = FIGHTMOVE_NULL; RestorePreviousState(); - CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE); + CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE); if (animAssoc) animAssoc->flags |= ASSOC_DELETEFADEDOUT; switch (endType) { case ENDFIGHT_NORMAL: - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f); - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT2_IDLE, 8.0f); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_2IDLE, 8.0f); break; case ENDFIGHT_WITH_A_STEP: - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 1.0f); - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_WALK_START, 8.0f); + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 1.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_STARTWALK, 8.0f); break; case ENDFIGHT_FAST: - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f); - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT2_IDLE, 8.0f)->speed = 2.0f; + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_FIGHT_2IDLE, 8.0f)->speed = 2.0f; break; default: break; @@ -1656,7 +1678,7 @@ CPed::FightStrike(CVector &touchedNodePos) || GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED && IsPlayer() || nearPed->m_pedStats->m_flags & STAT_ONE_HIT_KNOCKDOWN)) { - nearPed->SetFall(0, (AnimationId)(direction + ANIM_KO_SKID_FRONT), 0); + nearPed->SetFall(0, (AnimationId)(direction + ANIM_STD_HIGHIMPACT_FRONT), 0); if (nearPed->m_nPedState == PED_FALL) nearPed->bIsStanding = false; } @@ -1778,7 +1800,7 @@ CPed::LoadFightData(void) animAssoc = CAnimManager::GetAnimAssociation(ASSOCGRP_STD, animName); tFightMoves[moveId].animId = (AnimationId)animAssoc->animId; } else { - tFightMoves[moveId].animId = ANIM_WALK; + tFightMoves[moveId].animId = ANIM_STD_WALK; } moveId++; } @@ -1802,7 +1824,7 @@ CPed::SetInvestigateEvent(eEventType event, CVector2D pos, float distanceToCount if (m_eventType >= EVENT_ICECREAM) m_lookTimer = 0; else - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_HANDSCOWER, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_HANDSCOWER, 4.0f); } @@ -1842,7 +1864,7 @@ CPed::InvestigateEvent(void) case EVENT_HIT_AND_RUN_COP: if (CTimer::GetTimeInMilliseconds() > m_lookTimer) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS); if (animAssoc) { animAssoc->blendDelta = -8.0f; @@ -1854,7 +1876,7 @@ CPed::InvestigateEvent(void) } else if (CGeneral::GetRandomNumber() & 3) { ClearLookFlag(); - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ROAD_CROSS, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROADCROSS, 4.0f); SetLookTimer(CGeneral::GetRandomNumberInRange(1000, 2500)); Say(SOUND_PED_CHAT_EVENT); @@ -1868,16 +1890,16 @@ CPed::InvestigateEvent(void) case EVENT_EXPLOSION: if (bHasACamera && CTimer::GetTimeInMilliseconds() > m_lookTimer) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CAM); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_CAM); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE); - if (animAssoc && animAssoc->animId == ANIM_IDLE_CAM) { - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f); + if (animAssoc && animAssoc->animId == ANIM_STD_IDLE_CAM) { + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f); SetLookTimer(CGeneral::GetRandomNumberInRange(1000, 2500)); } else if (CGeneral::GetRandomNumber() & 3) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_CAM, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_CAM, 4.0f); SetLookTimer(CGeneral::GetRandomNumberInRange(2500, 5000)); Say(SOUND_PED_CHAT_EVENT); @@ -1886,30 +1908,30 @@ CPed::InvestigateEvent(void) } } else if (CTimer::GetTimeInMilliseconds() > m_lookTimer) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH); - if (animAssoc && animAssoc->animId == ANIM_IDLE_STANCE) { + if (animAssoc && animAssoc->animId == ANIM_STD_IDLE) { if (CGeneral::GetRandomNumber() & 1) - animToPlay = ANIM_IDLE_HBHB; + animToPlay = ANIM_STD_IDLE_HBHB; else - animToPlay = ANIM_XPRESS_SCRATCH; + animToPlay = ANIM_STD_XPRESS_SCRATCH; CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay, 4.0f); SetLookTimer(CGeneral::GetRandomNumberInRange(1500, 4000)); - } else if (animAssoc && animAssoc->animId == ANIM_IDLE_HBHB) { + } else if (animAssoc && animAssoc->animId == ANIM_STD_IDLE_HBHB) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; if (CGeneral::GetRandomNumber() & 1) { - animToPlay = ANIM_IDLE_STANCE; + animToPlay = ANIM_STD_IDLE; animGroup = m_animGroup; } else { - animToPlay = ANIM_XPRESS_SCRATCH; + animToPlay = ANIM_STD_XPRESS_SCRATCH; animGroup = ASSOCGRP_STD; } @@ -1918,10 +1940,10 @@ CPed::InvestigateEvent(void) } else { if (CGeneral::GetRandomNumber() & 1) { - animToPlay = ANIM_IDLE_STANCE; + animToPlay = ANIM_STD_IDLE; animGroup = m_animGroup; } else { - animToPlay = ANIM_IDLE_HBHB; + animToPlay = ANIM_STD_IDLE_HBHB; animGroup = ASSOCGRP_STD; } @@ -1938,26 +1960,26 @@ CPed::InvestigateEvent(void) if (CTimer::GetTimeInMilliseconds() > m_lookTimer) { if (m_lookTimer) { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; if (m_eventType == EVENT_ICECREAM) - animToPlay = ANIM_IDLE_CHAT; + animToPlay = ANIM_STD_CHAT; else - animToPlay = ANIM_XPRESS_SCRATCH; + animToPlay = ANIM_STD_XPRESS_SCRATCH; CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, animToPlay,4.0f); SetLookTimer(CGeneral::GetRandomNumberInRange(2000, 5000)); } else { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; ClearInvestigateEvent(); } else { - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -1966,7 +1988,7 @@ CPed::InvestigateEvent(void) } } } else { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_ROAD_CROSS, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_ROADCROSS, 4.0f); SetLookTimer(CGeneral::GetRandomNumberInRange(1000, 2500)); } } @@ -2009,13 +2031,13 @@ CPed::InvestigateEvent(void) void CPed::ClearInvestigateEvent(void) { - CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_ROAD_CROSS); + CAnimBlendAssociation *animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_ROADCROSS); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_XPRESS_SCRATCH); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_XPRESS_SCRATCH); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_HBHB); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_HBHB); if (!animAssoc) - animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_CHAT); + animAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CHAT); if (animAssoc) { animAssoc->blendDelta = -8.0f; animAssoc->flags |= ASSOC_DELETEFADEDOUT; @@ -2037,7 +2059,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi CPlayerPed *player = FindPlayerPed(); float dieDelta = 4.0f; float dieSpeed = 0.0f; - AnimationId dieAnim = ANIM_KO_SHOT_FRONT1; + AnimationId dieAnim = ANIM_STD_KO_FRONT; bool headShot = false; bool willLinger = false; int random; @@ -2069,14 +2091,14 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi if (m_nPedState == PED_FALL || m_nPedState == PED_GETUP) { if (!IsPedHeadAbovePos(-0.3f)) { if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL)) - dieAnim = ANIM_FLOOR_HIT_F; + dieAnim = ANIM_STD_HIT_FLOOR_FRONT; else - dieAnim = ANIM_FLOOR_HIT; + dieAnim = ANIM_STD_HIT_FLOOR; dieDelta *= 2.0f; dieSpeed = 0.5f; detectDieAnim = false; } else if (m_nPedState == PED_FALL) { - dieAnim = NUM_ANIMS; + dieAnim = ANIM_STD_NUM; detectDieAnim = false; } } @@ -2088,28 +2110,28 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi if (m_nPedState == PED_FALL) { if (IsPedHeadAbovePos(-0.3f)) { - dieAnim = NUM_ANIMS; + dieAnim = ANIM_STD_NUM; } else { if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL)) - dieAnim = ANIM_FLOOR_HIT_F; + dieAnim = ANIM_STD_HIT_FLOOR_FRONT; else - dieAnim = ANIM_FLOOR_HIT; + dieAnim = ANIM_STD_HIT_FLOOR; dieDelta = dieDelta * 2.0f; dieSpeed = 0.5f; } } else { switch (direction) { case 0: - dieAnim = ANIM_KO_SKID_FRONT; + dieAnim = ANIM_STD_HIGHIMPACT_FRONT; break; case 1: - dieAnim = ANIM_KO_SPIN_R; + dieAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 2: - dieAnim = ANIM_KO_SKID_BACK; + dieAnim = ANIM_STD_HIGHIMPACT_BACK; break; case 3: - dieAnim = ANIM_KO_SPIN_L; + dieAnim = ANIM_STD_HIGHIMPACT_RIGHT; break; default: break; @@ -2122,28 +2144,28 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi if (m_nPedState == PED_FALL) { if (IsPedHeadAbovePos(-0.3f)) { - dieAnim = NUM_ANIMS; + dieAnim = ANIM_STD_NUM; } else { if (RpAnimBlendClumpGetFirstAssociation(GetClump(), ASSOC_FRONTAL)) - dieAnim = ANIM_FLOOR_HIT_F; + dieAnim = ANIM_STD_HIT_FLOOR_FRONT; else - dieAnim = ANIM_FLOOR_HIT; + dieAnim = ANIM_STD_HIT_FLOOR; dieDelta = dieDelta * 2.0f; dieSpeed = 0.5f; } } else { switch (direction) { case 0: - dieAnim = ANIM_KO_SKID_FRONT; + dieAnim = ANIM_STD_HIGHIMPACT_FRONT; break; case 1: - dieAnim = ANIM_KO_SPIN_R; + dieAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 2: - dieAnim = ANIM_KO_SKID_BACK; + dieAnim = ANIM_STD_HIGHIMPACT_BACK; break; case 3: - dieAnim = ANIM_KO_SPIN_L; + dieAnim = ANIM_STD_HIGHIMPACT_RIGHT; break; default: break; @@ -2183,56 +2205,56 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi if (method == WEAPONTYPE_SHOTGUN) { switch (direction) { case 0: - dieAnim = ANIM_KO_SKID_FRONT; + dieAnim = ANIM_STD_HIGHIMPACT_FRONT; break; case 1: - dieAnim = ANIM_KO_SPIN_R; + dieAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 2: - dieAnim = ANIM_KO_SKID_BACK; + dieAnim = ANIM_STD_HIGHIMPACT_BACK; break; case 3: - dieAnim = ANIM_KO_SPIN_L; + dieAnim = ANIM_STD_HIGHIMPACT_RIGHT; break; default: break; } } else - dieAnim = ANIM_KO_SHOT_FRONT1; + dieAnim = ANIM_STD_KO_FRONT; willLinger = false; } else { switch (pedPiece) { case PEDPIECE_TORSO: willLinger = false; - dieAnim = ANIM_KO_SHOT_FRONT1; + dieAnim = ANIM_STD_KO_FRONT; break; case PEDPIECE_MID: willLinger = false; - dieAnim = ANIM_KO_SHOT_STOM; + dieAnim = ANIM_STD_KO_SHOT_STOMACH; break; case PEDPIECE_LEFTARM: - dieAnim = ANIM_KO_SHOT_ARML; + dieAnim = ANIM_STD_KO_SHOT_ARM_L; RemoveBodyPart(PED_UPPERARML, direction); willLinger = true; break; case PEDPIECE_RIGHTARM: - dieAnim = ANIM_KO_SHOT_ARMR; + dieAnim = ANIM_STD_KO_SHOT_ARM_R; RemoveBodyPart(PED_UPPERARMR, direction); willLinger = true; break; case PEDPIECE_LEFTLEG: - dieAnim = ANIM_KO_SHOT_LEGL; + dieAnim = ANIM_STD_KO_SHOT_LEG_L; RemoveBodyPart(PED_UPPERLEGL, direction); willLinger = true; break; case PEDPIECE_RIGHTLEG: - dieAnim = ANIM_KO_SHOT_LEGR; + dieAnim = ANIM_STD_KO_SHOT_LEG_R; RemoveBodyPart(PED_UPPERLEGR, direction); willLinger = true; break; case PEDPIECE_HEAD: - dieAnim = ANIM_KO_SHOT_FACE; + dieAnim = ANIM_STD_KO_SHOT_FACE; RemoveBodyPart(PED_HEAD, direction); headShot = true; willLinger = true; @@ -2272,16 +2294,16 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi switch (direction) { case 0: - dieAnim = ANIM_KO_SKID_FRONT; + dieAnim = ANIM_STD_HIGHIMPACT_FRONT; break; case 1: - dieAnim = ANIM_KO_SPIN_R; + dieAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 2: - dieAnim = ANIM_KO_SKID_BACK; + dieAnim = ANIM_STD_HIGHIMPACT_BACK; break; case 3: - dieAnim = ANIM_KO_SPIN_L; + dieAnim = ANIM_STD_HIGHIMPACT_RIGHT; break; default: break; @@ -2291,7 +2313,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi if (bFireProof) return false; - dieAnim = ANIM_KO_SHOT_FRONT1; + dieAnim = ANIM_STD_KO_FRONT; break; case WEAPONTYPE_RAMMEDBYCAR: case WEAPONTYPE_RUNOVERBYCAR: @@ -2306,36 +2328,36 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi if (pedPiece == PEDPIECE_RIGHTARM && random > 1 || pedPiece == PEDPIECE_MID && random == 2) - dieAnim = ANIM_KO_SPIN_L; + dieAnim = ANIM_STD_HIGHIMPACT_RIGHT; else - dieAnim = ANIM_KO_SKID_FRONT; + dieAnim = ANIM_STD_HIGHIMPACT_FRONT; } else - dieAnim = ANIM_KO_SPIN_R; + dieAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 1: if (m_nPedState == PED_DIVE_AWAY) - dieAnim = ANIM_KD_LEFT; + dieAnim = ANIM_STD_SPINFORWARD_LEFT; else - dieAnim = ANIM_KO_SPIN_R; + dieAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 2: if ((pedPiece != PEDPIECE_LEFTARM || random <= 1) && (pedPiece != PEDPIECE_MID || random != 1)) { if ((pedPiece != PEDPIECE_RIGHTARM || random <= 1) && (pedPiece != PEDPIECE_MID || random != 2)) { - dieAnim = ANIM_KO_SKID_BACK; + dieAnim = ANIM_STD_HIGHIMPACT_BACK; } else { - dieAnim = ANIM_KD_RIGHT; + dieAnim = ANIM_STD_SPINFORWARD_RIGHT; } } else - dieAnim = ANIM_KD_LEFT; + dieAnim = ANIM_STD_SPINFORWARD_LEFT; break; case 3: if (m_nPedState == PED_DIVE_AWAY) - dieAnim = ANIM_KD_RIGHT; + dieAnim = ANIM_STD_SPINFORWARD_RIGHT; else - dieAnim = ANIM_KO_SPIN_L; + dieAnim = ANIM_STD_HIGHIMPACT_RIGHT; break; default: break; @@ -2353,7 +2375,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi } break; case WEAPONTYPE_DROWNING: - dieAnim = ANIM_DROWN; + dieAnim = ANIM_STD_DROWN; break; case WEAPONTYPE_FALL: if (bCollisionProof) @@ -2361,16 +2383,16 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi switch (direction) { case 0: - dieAnim = ANIM_KO_SKID_FRONT; + dieAnim = ANIM_STD_HIGHIMPACT_FRONT; break; case 1: - dieAnim = ANIM_KO_SPIN_R; + dieAnim = ANIM_STD_HIGHIMPACT_LEFT; break; case 2: - dieAnim = ANIM_KO_SKID_BACK; + dieAnim = ANIM_STD_HIGHIMPACT_BACK; break; case 3: - dieAnim = ANIM_KO_SPIN_L; + dieAnim = ANIM_STD_HIGHIMPACT_RIGHT; break; default: break; @@ -2460,7 +2482,7 @@ CPed::InflictDamage(CEntity *damagedBy, eWeaponType method, float damage, ePedPi if (player == this) m_pMyVehicle->SetStatus(STATUS_PLAYER_DISABLED); - SetDie(NUM_ANIMS, 4.0f, 0.0f); + SetDie(ANIM_STD_NUM, 4.0f, 0.0f); return true; } else { m_fHealth = 0.0f; @@ -2663,7 +2685,7 @@ CPed::ApplyHeadShot(eWeaponType weaponType, CVector pos, bool evenOnPlayer) // BUG: This condition will always return true. Even fixing it won't work, because these states are unused. // if (m_nPedState != PED_PASSENGER || m_nPedState != PED_TAXI_PASSENGER) { - SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f); + SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f); // } bBodyPartJustCameOff = true; @@ -2887,7 +2909,7 @@ CPed::CollideWithPed(CPed *collideWith) } else { SetLookFlag(collideWith, false); TurnBody(); - animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_FIGHT_PPUNCH, 8.0f); + animAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_PARTIAL_PUNCH, 8.0f); animAssoc->flags |= ASSOC_FADEOUTWHENDONE; #ifdef VC_PED_PORTS m_nPedStateTimer = CTimer::GetTimeInMilliseconds() + 2000; @@ -2912,22 +2934,22 @@ CPed::CollideWithPed(CPed *collideWith) moveForce.z += 0.1f; ApplyMoveForce(moveForce); if (collideWith->m_nMoveState != PEDMOVE_RUN && collideWith->m_nMoveState != PEDMOVE_SPRINT) - animToPlay = ANIM_HIT_LEFT; + animToPlay = ANIM_STD_HIT_LEFT; else - animToPlay = ANIM_SHOT_LEFT_PARTIAL; + animToPlay = ANIM_STD_HITBYGUN_LEFT; } else if (heLooksToUs) { CVector moveForce = GetRight() * -1.0f; moveForce.z += 0.1f; ApplyMoveForce(moveForce); if (collideWith->m_nMoveState != PEDMOVE_RUN && collideWith->m_nMoveState != PEDMOVE_SPRINT) - animToPlay = ANIM_HIT_RIGHT; + animToPlay = ANIM_STD_HIT_RIGHT; else - animToPlay = ANIM_SHOT_RIGHT_PARTIAL; + animToPlay = ANIM_STD_HITBYGUN_RIGHT; } else { if (collideWith->m_nMoveState != PEDMOVE_RUN && collideWith->m_nMoveState != PEDMOVE_SPRINT) - animToPlay = ANIM_HIT_BACK; + animToPlay = ANIM_STD_HIT_BACK; else - animToPlay = ANIM_SHOT_BACK_PARTIAL; + animToPlay = ANIM_STD_HITBYGUN_BACK; } if (collideWith->IsPedInControl() && CTimer::GetTimeInMilliseconds() > collideWith->m_nPedStateTimer) { @@ -2944,17 +2966,17 @@ CPed::CollideWithPed(CPed *collideWith) moveForce.z += 0.1f; ApplyMoveForce(moveForce); if (heLooksToUs) - animToPlay = ANIM_KO_SPIN_L; + animToPlay = ANIM_STD_HIGHIMPACT_RIGHT; else - animToPlay = ANIM_KD_RIGHT; + animToPlay = ANIM_STD_SPINFORWARD_RIGHT; } else { CVector moveForce = GetRight(); moveForce.z += 0.1f; ApplyMoveForce(moveForce); if (heLooksToUs) - animToPlay = ANIM_KO_SPIN_R; + animToPlay = ANIM_STD_HIGHIMPACT_LEFT; else - animToPlay = ANIM_KD_LEFT; + animToPlay = ANIM_STD_SPINFORWARD_LEFT; } if (m_nPedState == PED_ATTACK && collideWith->IsPedInControl()) @@ -3209,7 +3231,7 @@ CPed::KillPedWithCar(CVehicle *car, float impulse) damage = 30.0f; InflictDamage(car, WEAPONTYPE_RAMMEDBYCAR, damage, PEDPIECE_TORSO, fallDirection); - SetFall(1000, (AnimationId)(fallDirection + ANIM_KO_SKID_FRONT), true); + SetFall(1000, (AnimationId)(fallDirection + ANIM_STD_HIGHIMPACT_FRONT), true); if (OnGround() && !m_pCollidingEntity && (!IsPlayer() || bHasHitWall || car->GetModelIndex() == MI_TRAIN || m_vecDamageNormal.z < -0.8f)) { diff --git a/src/peds/PedIK.cpp b/src/peds/PedIK.cpp index 8bace9a0..8358a196 100644 --- a/src/peds/PedIK.cpp +++ b/src/peds/PedIK.cpp @@ -17,9 +17,9 @@ const RwV3d XaxisIK = { 1.0f, 0.0f, 0.0f}; const RwV3d YaxisIK = { 0.0f, 1.0f, 0.0f}; const RwV3d ZaxisIK = { 0.0f, 0.0f, 1.0f}; -CPedIK::CPedIK(CPed *ped) +CPedIK::CPedIK(CPed *ped) : m_ped(ped) { - m_ped = ped; + assert(ped != nil); m_flags = 0; m_headOrient.yaw = 0.0f; m_headOrient.pitch = 0.0f; @@ -194,7 +194,7 @@ CPedIK::MoveLimb(LimbOrientation &limb, float targetYaw, float targetPitch, Limb } if (limb.yaw > moveInfo.maxYaw || limb.yaw < moveInfo.minYaw) { - limb.yaw = clamp(limb.yaw, moveInfo.minYaw, moveInfo.maxYaw); + limb.yaw = Clamp(limb.yaw, moveInfo.minYaw, moveInfo.maxYaw); result = ANGLES_SET_TO_MAX; } @@ -212,7 +212,7 @@ CPedIK::MoveLimb(LimbOrientation &limb, float targetYaw, float targetPitch, Limb result = ONE_ANGLE_COULDNT_BE_SET_EXACTLY; if (limb.pitch > moveInfo.maxPitch || limb.pitch < moveInfo.minPitch) { - limb.pitch = clamp(limb.pitch, moveInfo.minPitch, moveInfo.maxPitch); + limb.pitch = Clamp(limb.pitch, moveInfo.minPitch, moveInfo.maxPitch); result = ANGLES_SET_TO_MAX; } return result; @@ -527,11 +527,11 @@ CPedIK::RestoreLookAt(void) void CPedIK::ExtractYawAndPitchWorld(RwMatrix *mat, float *yaw, float *pitch) { - float f = clamp(DotProduct(mat->up, CVector(0.0f, 1.0f, 0.0f)), -1.0f, 1.0f); + float f = Clamp(DotProduct(mat->up, CVector(0.0f, 1.0f, 0.0f)), -1.0f, 1.0f); *yaw = Acos(f); if (mat->up.x > 0.0f) *yaw = -*yaw; - f = clamp(DotProduct(mat->right, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); + f = Clamp(DotProduct(mat->right, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); *pitch = Acos(f); if (mat->up.z > 0.0f) *pitch = -*pitch; } @@ -539,11 +539,11 @@ CPedIK::ExtractYawAndPitchWorld(RwMatrix *mat, float *yaw, float *pitch) void CPedIK::ExtractYawAndPitchLocal(RwMatrix *mat, float *yaw, float *pitch) { - float f = clamp(DotProduct(mat->at, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); + float f = Clamp(DotProduct(mat->at, CVector(0.0f, 0.0f, 1.0f)), -1.0f, 1.0f); *yaw = Acos(f); if (mat->at.y > 0.0f) *yaw = -*yaw; - f = clamp(DotProduct(mat->right, CVector(1.0f, 0.0f, 0.0f)), -1.0f, 1.0f); + f = Clamp(DotProduct(mat->right, CVector(1.0f, 0.0f, 0.0f)), -1.0f, 1.0f); *pitch = Acos(f); if (mat->up.x > 0.0f) *pitch = -*pitch; } diff --git a/src/peds/PedIK.h b/src/peds/PedIK.h index 4eeef6f0..1543fa34 100644 --- a/src/peds/PedIK.h +++ b/src/peds/PedIK.h @@ -29,12 +29,12 @@ class CPedIK { public: enum { - GUN_POINTED_SUCCESSFULLY = 1, // set but unused + GUN_POINTED_SUCCESSFULLY = 1, LOOKAROUND_HEAD_ONLY = 2, AIMS_WITH_ARM = 4, }; - CPed *m_ped; + CPed *Const m_ped; LimbOrientation m_headOrient; LimbOrientation m_torsoOrient; LimbOrientation m_upperArmOrient; diff --git a/src/peds/PedType.cpp b/src/peds/PedType.cpp index bacb1a78..dcd4c717 100644 --- a/src/peds/PedType.cpp +++ b/src/peds/PedType.cpp @@ -3,6 +3,7 @@ #include "General.h" #include "FileMgr.h" #include "PedType.h" +#include "SaveBuf.h" CPedType *CPedType::ms_apPedType[NUM_PEDTYPES]; CPedStats *CPedStats::ms_apPedStats[NUM_PEDSTATS]; @@ -201,7 +202,7 @@ INITSAVEBUF CheckSaveHeader(buf, 'P', 'T', 'P', '\0', size - SAVE_HEADER_SIZE); for(int i = 0; i < NUM_PEDTYPES; i++) - *ms_apPedType[i] = ReadSaveBuf(buf); + ReadSaveBuf(ms_apPedType[i], buf); VALIDATESAVEBUF(size) } diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index ae981d1d..ef877965 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -16,9 +16,14 @@ #include "Pools.h" #include "Darkel.h" #include "CarCtrl.h" +#include "SaveBuf.h" #define PAD_MOVE_TO_GAME_WORLD_MOVE 60.0f +#ifdef VC_PED_PORTS +bool CPlayerPed::bDontAllowWeaponChange; +#endif + const uint32 CPlayerPed::nSaveStructSize = #ifdef COMPATIBLE_SAVES 1520; @@ -206,7 +211,7 @@ CPlayerPed::MakeChangesForNewWeapon(int8 weapon) void CPlayerPed::ReApplyMoveAnims(void) { - static AnimationId moveAnims[] = { ANIM_WALK, ANIM_RUN, ANIM_SPRINT, ANIM_IDLE_STANCE, ANIM_WALK_START }; + static AnimationId moveAnims[] = { ANIM_STD_WALK, ANIM_STD_RUN, ANIM_STD_RUNFAST, ANIM_STD_IDLE, ANIM_STD_STARTWALK }; for(int i = 0; i < ARRAY_SIZE(moveAnims); i++) { CAnimBlendAssociation *curMoveAssoc = RpAnimBlendClumpGetAssociation(GetClump(), moveAnims[i]); @@ -262,13 +267,13 @@ CPlayerPed::SetInitialState(void) void CPlayerPed::SetRealMoveAnim(void) { - CAnimBlendAssociation *curWalkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK); - CAnimBlendAssociation *curRunAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN); - CAnimBlendAssociation *curSprintAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_SPRINT); - CAnimBlendAssociation *curWalkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_WALK_START); - CAnimBlendAssociation *curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_STANCE); - CAnimBlendAssociation *curRunStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP); - CAnimBlendAssociation *curRunStopRAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_RUN_STOP_R); + CAnimBlendAssociation *curWalkAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_WALK); + CAnimBlendAssociation *curRunAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUN); + CAnimBlendAssociation *curSprintAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNFAST); + CAnimBlendAssociation *curWalkStartAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_STARTWALK); + CAnimBlendAssociation *curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE); + CAnimBlendAssociation *curRunStopAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP1); + CAnimBlendAssociation *curRunStopRAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_RUNSTOP2); if (bResetWalkAnims) { if (curWalkAssoc) curWalkAssoc->SetCurrentTime(0.0f); @@ -280,9 +285,9 @@ CPlayerPed::SetRealMoveAnim(void) } if (!curIdleAssoc) - curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED); + curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED); if (!curIdleAssoc) - curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE); + curIdleAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE); if (!((curRunStopAssoc && curRunStopAssoc->IsRunning()) || (curRunStopRAssoc && curRunStopRAssoc->IsRunning()))) { @@ -301,10 +306,10 @@ CPlayerPed::SetRealMoveAnim(void) if (!curIdleAssoc) { if (m_fCurrentStamina < 0.0f && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f, nil, true, false, false, false, false, false)) { - curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 8.0f); + curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 8.0f); } else { - curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 8.0f); + curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 8.0f); } m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(2500, 4000); } @@ -315,25 +320,25 @@ CPlayerPed::SetRealMoveAnim(void) if (!curIdleAssoc) { if (m_fCurrentStamina < 0.0f && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f, nil, true, false, false, false, false, false)) { - curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); + curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f); } else { - curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f); + curIdleAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f); } m_nWaitTimer = CTimer::GetTimeInMilliseconds() + CGeneral::GetRandomNumberInRange(2500, 4000); } - if (m_fCurrentStamina > 0.0f && curIdleAssoc->animId == ANIM_IDLE_TIRED) { - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f); + if (m_fCurrentStamina > 0.0f && curIdleAssoc->animId == ANIM_STD_IDLE_TIRED) { + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f); } else if (m_nPedState != PED_FIGHT) { - if (m_fCurrentStamina < 0.0f && curIdleAssoc->animId != ANIM_IDLE_TIRED + if (m_fCurrentStamina < 0.0f && curIdleAssoc->animId != ANIM_STD_IDLE_TIRED && !CWorld::TestSphereAgainstWorld(GetPosition(), 0.5f, nil, true, false, false, false, false, false)) { - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_TIRED, 4.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE_TIRED, 4.0f); - } else if (curIdleAssoc->animId != ANIM_IDLE_STANCE) { - CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_IDLE_STANCE, 4.0f); + } else if (curIdleAssoc->animId != ANIM_STD_IDLE) { + CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_IDLE, 4.0f); } } m_nMoveState = PEDMOVE_STILL; @@ -344,7 +349,7 @@ CPlayerPed::SetRealMoveAnim(void) curWalkStartAssoc->blendAmount = 1.0f; curWalkStartAssoc->blendDelta = 0.0f; } else { - curWalkStartAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_WALK_START); + curWalkStartAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_STARTWALK); } if (curWalkAssoc) curWalkAssoc->SetCurrentTime(0.0f); @@ -352,8 +357,8 @@ CPlayerPed::SetRealMoveAnim(void) curRunAssoc->SetCurrentTime(0.0f); delete curIdleAssoc; - delete RpAnimBlendClumpGetAssociation(GetClump(), ANIM_IDLE_TIRED); - delete RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FIGHT_IDLE); + delete RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_IDLE_TIRED); + delete RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FIGHT_IDLE); delete curSprintAssoc; curSprintAssoc = nil; @@ -368,11 +373,11 @@ CPlayerPed::SetRealMoveAnim(void) RestoreHeadingRate(); } if (!curWalkAssoc) { - curWalkAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_WALK); + curWalkAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_WALK); curWalkAssoc->blendAmount = 0.0f; } if (!curRunAssoc) { - curRunAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_RUN); + curRunAssoc = CAnimManager::AddAnimation(GetClump(), m_animGroup, ANIM_STD_RUN); curRunAssoc->blendAmount = 0.0f; } if (curWalkStartAssoc && !(curWalkStartAssoc->IsRunning())) { @@ -399,9 +404,9 @@ CPlayerPed::SetRealMoveAnim(void) if (m_fMoveSpeed < 0.4f) { AnimationId runStopAnim; if (curSprintAssoc->currentTime / curSprintAssoc->hierarchy->totalLength < 0.5) // double - runStopAnim = ANIM_RUN_STOP; + runStopAnim = ANIM_STD_RUNSTOP1; else - runStopAnim = ANIM_RUN_STOP_R; + runStopAnim = ANIM_STD_RUNSTOP2; CAnimBlendAssociation* newRunStopAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, runStopAnim); newRunStopAssoc->blendAmount = 1.0f; newRunStopAssoc->SetDeleteCallback(RestoreHeadingRateCB, this); @@ -444,7 +449,7 @@ CPlayerPed::SetRealMoveAnim(void) // Transition between run-sprint curWalkAssoc->blendAmount = 0.0f; curRunAssoc->blendAmount = 1.0f; - curSprintAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_SPRINT, 2.0f); + curSprintAssoc = CAnimManager::BlendAnimation(GetClump(), m_animGroup, ANIM_STD_RUNFAST, 2.0f); } UseSprintEnergy(); } else { @@ -502,6 +507,10 @@ CPlayerPed::DoWeaponSmoothSpray(void) { if (m_nPedState == PED_ATTACK && !m_pPointGunAt) { eWeaponType weapon = GetWeapon()->m_eWeaponType; +#ifdef FREE_CAM + if(CCamera::bFreeCam && TheCamera.Cams[0].Using3rdPersonMouseCam() && (weapon == WEAPONTYPE_COLT45 || weapon == WEAPONTYPE_UZI)) + return false; +#endif if (weapon == WEAPONTYPE_FLAMETHROWER || weapon == WEAPONTYPE_COLT45 || weapon == WEAPONTYPE_UZI || weapon == WEAPONTYPE_SHOTGUN || weapon == WEAPONTYPE_AK47 || weapon == WEAPONTYPE_M16 || weapon == WEAPONTYPE_HELICANNON) return true; @@ -539,14 +548,14 @@ CPlayerPed::DoesTargetHaveToBeBroken(CVector target, CWeapon *weaponUsed) void CPlayerPed::RunningLand(CPad *padUsed) { - CAnimBlendAssociation *landAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_FALL_LAND); + CAnimBlendAssociation *landAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL_LAND); if (landAssoc && landAssoc->currentTime == 0.0f && m_fMoveSpeed > 1.5f && padUsed && (padUsed->GetPedWalkLeftRight() != 0.0f || padUsed->GetPedWalkUpDown() != 0.0f)) { landAssoc->blendDelta = -1000.0f; landAssoc->flags |= ASSOC_DELETEFADEDOUT; - CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_JUMP_LAND)->SetFinishCallback(FinishJumpCB, this); + CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_JUMP_LAND)->SetFinishCallback(FinishJumpCB, this); if (m_nPedState == PED_JUMP) RestorePreviousState(); @@ -598,7 +607,11 @@ CPlayerPed::ProcessWeaponSwitch(CPad *padUsed) if (CDarkel::FrenzyOnGoing()) goto switchDetectDone; +#ifdef VC_PED_PORTS + if (padUsed->CycleWeaponRightJustDown() && !m_pPointGunAt && !bDontAllowWeaponChange) { +#else if (padUsed->CycleWeaponRightJustDown() && !m_pPointGunAt) { +#endif if (TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON && TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON_RUNABOUT @@ -614,7 +627,11 @@ CPlayerPed::ProcessWeaponSwitch(CPad *padUsed) } m_nSelectedWepSlot = WEAPONTYPE_UNARMED; } +#ifdef VC_PED_PORTS + } else if (padUsed->CycleWeaponLeftJustDown() && !m_pPointGunAt && !bDontAllowWeaponChange) { +#else } else if (padUsed->CycleWeaponLeftJustDown() && !m_pPointGunAt) { +#endif if (TheCamera.PlayerWeaponMode.Mode != CCam::MODE_M16_1STPERSON && TheCamera.PlayerWeaponMode.Mode != CCam::MODE_SNIPER && TheCamera.PlayerWeaponMode.Mode != CCam::MODE_ROCKETLAUNCHER) { @@ -681,8 +698,8 @@ CPlayerPed::PlayerControlFighter(CPad *padUsed) if (padMove > 0.0f) { m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown) - TheCamera.Orientation; - m_takeAStepAfterAttack = padMove > 2 * PAD_MOVE_TO_GAME_WORLD_MOVE; - if (padUsed->GetSprint() && padMove > 1 * PAD_MOVE_TO_GAME_WORLD_MOVE) + m_takeAStepAfterAttack = padMove > (2 * PAD_MOVE_TO_GAME_WORLD_MOVE); + if (padUsed->GetSprint() && padMove > (1 * PAD_MOVE_TO_GAME_WORLD_MOVE)) bIsAttacking = false; } @@ -714,7 +731,7 @@ CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed) if (m_nPedState == PED_JUMP) { if (bIsInTheAir) { if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f) - && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { + && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O float angleCos = Cos(m_fRotationCur); @@ -852,7 +869,11 @@ CPlayerPed::FindNextWeaponLockOnTarget(CEntity *previousTarget, bool lookToLeft) // nextTarget = nil; // duplicate float lastCloseness = -10000.0f; // CGeneral::GetATanOfXY(GetForward().x, GetForward().y); // unused +#ifdef VC_PED_PORTS + CVector distVec = previousTarget->GetPosition() - TheCamera.GetPosition(); +#else CVector distVec = previousTarget->GetPosition() - GetPosition(); +#endif float referenceBeta = CGeneral::GetATanOfXY(distVec.x, distVec.y); for (int h = CPools::GetPedPool()->GetSize() - 1; h >= 0; h--) { @@ -877,6 +898,9 @@ CPlayerPed::FindNextWeaponLockOnTarget(CEntity *previousTarget, bool lookToLeft) return false; SetWeaponLockOnTarget(nextTarget); +#ifdef VC_PED_PORTS + bDontAllowWeaponChange = true; +#endif SetPointGunAt(nextTarget); return true; } @@ -922,6 +946,9 @@ CPlayerPed::FindWeaponLockOnTarget(void) return false; SetWeaponLockOnTarget(nextTarget); +#ifdef VC_PED_PORTS + bDontAllowWeaponChange = true; +#endif SetPointGunAt(nextTarget); return true; } @@ -1009,7 +1036,7 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) TheCamera.SetNewPlayerWeaponMode(CCam::MODE_M16_1STPERSON, 0, 0); m_fMoveSpeed = 0.0f; - CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_IDLE_STANCE, 1000.0f); + CAnimManager::BlendAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_IDLE, 1000.0f); } if (GetWeapon()->m_eWeaponType == WEAPONTYPE_ROCKETLAUNCHER || GetWeapon()->m_eWeaponType == WEAPONTYPE_SNIPERRIFLE || TheCamera.PlayerWeaponMode.Mode == CCam::MODE_M16_1STPERSON) @@ -1055,7 +1082,9 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) #ifdef FREE_CAM static int8 changedHeadingRate = 0; + static int8 pointedGun = 0; if (changedHeadingRate == 2) changedHeadingRate = 1; + if (pointedGun == 2) pointedGun = 1; // Rotate player/arm when shooting. We don't have auto-rotation anymore if (CCamera::m_bUseMouse3rdPerson && CCamera::bFreeCam && @@ -1066,22 +1095,28 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) if ((padUsed->GetTarget() && weaponInfo->IsFlagSet(WEAPONFLAG_CANAIM_WITHARM)) || padUsed->GetWeapon()) { float limitedCam = CGeneral::LimitRadianAngle(-TheCamera.Orientation); + m_cachedCamSource = TheCamera.Cams[TheCamera.ActiveCam].Source; + m_cachedCamFront = TheCamera.Cams[TheCamera.ActiveCam].Front; + m_cachedCamUp = TheCamera.Cams[TheCamera.ActiveCam].Up; + // On this one we can rotate arm. if (weaponInfo->IsFlagSet(WEAPONFLAG_CANAIM_WITHARM)) { - if (!padUsed->GetWeapon()) { // making this State != ATTACK still stops it after attack. Re-start it immediately! - SetPointGunAt(nil); - bIsPointingGunAt = false; // to not stop after attack - } - + pointedGun = 2; + m_bFreeAimActive = true; SetLookFlag(limitedCam, true); SetAimFlag(limitedCam); #ifdef VC_PED_PORTS SetLookTimer(INT32_MAX); // removing this makes head move for real, but I experinced some bugs. #endif + ((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch(); + if (m_nPedState != PED_ATTACK && m_nPedState != PED_AIM_GUN) { + // This is a seperate ped state just for pointing gun. Used for target button + SetPointGunAt(nil); + } } else { m_fRotationDest = limitedCam; changedHeadingRate = 2; - m_headingRate = 50.0f; + m_headingRate = 12.5f; // Anim. fix for shotgun, ak47 and m16 (we must finish rot. it quickly) if (weaponInfo->IsFlagSet(WEAPONFLAG_CANAIM) && padUsed->WeaponJustDown()) { @@ -1097,14 +1132,27 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) m_fRotationCur += (limitedRotDest - m_fRotationCur) / 2; } } - } else if (weaponInfo->IsFlagSet(WEAPONFLAG_CANAIM_WITHARM) && m_nPedState != PED_ATTACK) - ClearPointGunAt(); + } } } if (changedHeadingRate == 1) { changedHeadingRate = 0; RestoreHeadingRate(); } + if (pointedGun == 1) { + if (m_nPedState == PED_ATTACK) { + if (!padUsed->GetWeapon() && (m_pedIK.m_flags & CPedIK::GUN_POINTED_SUCCESSFULLY) == 0) { + float limitedCam = CGeneral::LimitRadianAngle(-TheCamera.Orientation); + + SetAimFlag(limitedCam); + ((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch(); + m_bFreeAimActive = true; + } + } else { + pointedGun = 0; + ClearPointGunAt(); + } + } #endif if (padUsed->GetTarget() && m_nSelectedWepSlot == m_currentWeapon && m_nMoveState != PEDMOVE_SPRINT) { @@ -1182,6 +1230,13 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed) padMoveInGameUnit = CVector2D(leftRight, upDown).Magnitude() / PAD_MOVE_TO_GAME_WORLD_MOVE; } +#ifdef FREE_CAM + if(CCamera::bFreeCam && TheCamera.Cams[0].Using3rdPersonMouseCam() && doSmoothSpray) { + padMoveInGameUnit = 0.0f; + smoothSprayWithoutMove = false; + } +#endif + if (padMoveInGameUnit > 0.0f || smoothSprayWithoutMove) { float padHeading = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown); float neededTurn = CGeneral::LimitRadianAngle(padHeading - camOrientation); @@ -1205,7 +1260,7 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed) if (m_nPedState == PED_JUMP) { if (bIsInTheAir) { if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f) - && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { + && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) { float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O float angleCos = Cos(m_fRotationCur); @@ -1280,24 +1335,24 @@ CPlayerPed::ProcessControl(void) } if (m_nPedState == PED_DRIVING && m_objective != OBJECTIVE_LEAVE_CAR) { if (m_pMyVehicle->IsCar() && ((CAutomobile*)m_pMyVehicle)->Damage.GetDoorStatus(DOOR_FRONT_LEFT) == DOOR_STATUS_SWINGING) { - CAnimBlendAssociation *rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLDOOR); + CAnimBlendAssociation *rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS); - if (m_pMyVehicle->m_nGettingOutFlags & CAR_DOOR_FLAG_LF || rollDoorAssoc || (rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_CAR_ROLLDOOR_LOW))) { + if (m_pMyVehicle->m_nGettingOutFlags & CAR_DOOR_FLAG_LF || rollDoorAssoc || (rollDoorAssoc = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS))) { if (rollDoorAssoc) - m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR, rollDoorAssoc->currentTime); + m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, rollDoorAssoc->currentTime); } else { // These comparisons are wrong, they return uint16 if (padUsed && (padUsed->GetAccelerate() != 0.0f || padUsed->GetSteeringLeftRight() != 0.0f || padUsed->GetBrake() != 0.0f)) { if (rollDoorAssoc) - m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_CAR_ROLLDOOR, rollDoorAssoc->currentTime); + m_pMyVehicle->ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS, rollDoorAssoc->currentTime); } else { m_pMyVehicle->m_nGettingOutFlags |= CAR_DOOR_FLAG_LF; if (m_pMyVehicle->bLowVehicle) - rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLDOOR_LOW); + rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS); else - rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_CAR_ROLLDOOR); + rollDoorAssoc = CAnimManager::AddAnimation(GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS); rollDoorAssoc->SetFinishCallback(PedAnimDoorCloseRollingCB, this); } @@ -1478,6 +1533,13 @@ CPlayerPed::ProcessControl(void) m_bSpeedTimerFlag = false; } +#ifdef VC_PED_PORTS + if (bDontAllowWeaponChange && FindPlayerPed() == this) { + if (!CPad::GetPad(0)->GetTarget()) + bDontAllowWeaponChange = false; + } +#endif + #ifdef PED_SKIN if (!bIsVisible && IsClumpSkinned(GetClump())) UpdateRpHAnim(); @@ -1491,14 +1553,14 @@ void CPlayerPed::Save(uint8*& buf) { CPed::Save(buf); - SkipSaveBuf(buf, 16); + ZeroSaveBuf(buf, 16); CopyToBuf(buf, m_fMaxStamina); - SkipSaveBuf(buf, 28); + ZeroSaveBuf(buf, 28); CopyToBuf(buf, m_nTargettableObjects[0]); CopyToBuf(buf, m_nTargettableObjects[1]); CopyToBuf(buf, m_nTargettableObjects[2]); CopyToBuf(buf, m_nTargettableObjects[3]); - SkipSaveBuf(buf, 116); + ZeroSaveBuf(buf, 116); } void diff --git a/src/peds/PlayerPed.h b/src/peds/PlayerPed.h index e8173c8c..2e9f7989 100644 --- a/src/peds/PlayerPed.h +++ b/src/peds/PlayerPed.h @@ -34,6 +34,15 @@ public: CPed *m_pPedAtSafePos[6]; float m_fWalkAngle; float m_fFPSMoveHeading; +#ifdef FREE_CAM + bool m_bFreeAimActive; + CVector m_cachedCamSource; + CVector m_cachedCamFront; + CVector m_cachedCamUp; +#endif +#ifdef VC_PED_PORTS + static bool bDontAllowWeaponChange; +#endif CPlayerPed(); ~CPlayerPed(); diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 053cf5e4..5c80702f 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -55,7 +55,7 @@ bool CPopulation::ms_bGivePedsWeapons; int32 CPopulation::m_AllRandomPedsThisType = -1; float CPopulation::PedDensityMultiplier = 1.0f; uint32 CPopulation::ms_nTotalMissionPeds; -int32 CPopulation::MaxNumberOfPedsInUse = 25; +int32 CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS; uint32 CPopulation::ms_nNumCivMale; uint32 CPopulation::ms_nNumCivFemale; uint32 CPopulation::ms_nNumCop; @@ -484,7 +484,7 @@ CPopulation::PedCreationDistMultiplier() return 1.0f; float vehSpeed = veh->m_vecMoveSpeed.Magnitude2D(); - return clamp(vehSpeed - 0.1f + 1.0f, 1.0f, 1.5f); + return Clamp(vehSpeed - 0.1f + 1.0f, 1.0f, 1.5f); } CPed* @@ -706,8 +706,7 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree generatedCoors.z = Max(generatedCoors.z, groundZ); } bool farEnoughToAdd = true; - CMatrix mat(TheCamera.GetCameraMatrix()); - if (TheCamera.IsSphereVisible(generatedCoors, 2.0f, &mat)) { + if (TheCamera.IsSphereVisible(generatedCoors, 2.0f)) { if (PedCreationDistMultiplier() * MIN_CREATION_DIST > (generatedCoors - playerCentreOfWorld).Magnitude2D()) farEnoughToAdd = false; } @@ -847,7 +846,7 @@ CPopulation::AddPedInCar(CVehicle* car) } #else { - newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f); + newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_SIT, 100.0f); } #endif @@ -945,10 +944,9 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones() void CPopulation::ConvertAllObjectsToDummyObjects() { - int poolSize = CPools::GetObjectPool()->GetSize(); - for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) { - - CObject *obj = CPools::GetObjectPool()->GetSlot(poolIndex); + uint32 i = CPools::GetObjectPool()->GetSize(); + while(i--) { + CObject *obj = CPools::GetObjectPool()->GetSlot(i); if (obj) { if (obj->CanBeDeleted()) ConvertToDummyObject(obj); @@ -1001,7 +999,7 @@ bool CPopulation::TestRoomForDummyObject(CObject *obj) { int16 collidingObjs; - CWorld::FindObjectsKindaColliding(obj->m_objectMatrix.GetPosition(), CModelInfo::GetModelInfo(obj->GetModelIndex())->GetColModel()->boundingSphere.radius, + CWorld::FindObjectsKindaColliding(obj->m_objectMatrix.GetPosition(), CModelInfo::GetColModel(obj->GetModelIndex())->boundingSphere.radius, false, &collidingObjs, 2, nil, false, true, true, false, false); return collidingObjs == 0; @@ -1012,27 +1010,30 @@ CPopulation::TestSafeForRealObject(CDummyObject *dummy) { CPtrNode *ptrNode; CColModel *dummyCol = dummy->GetColModel(); - float colRadius = dummy->GetBoundRadius(); - CVector colCentre = dummy->GetBoundCentre(); - int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - colRadius); + float radius = dummyCol->boundingSphere.radius; + int minX = CWorld::GetSectorIndexX(dummy->GetPosition().x - radius); if (minX < 0) minX = 0; - int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - colRadius); + int minY = CWorld::GetSectorIndexY(dummy->GetPosition().y - radius); if (minY < 0) minY = 0; - int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + colRadius); + int maxX = CWorld::GetSectorIndexX(dummy->GetPosition().x + radius); #ifdef FIX_BUGS if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X - 1; #else if (maxX >= NUMSECTORS_X) maxX = NUMSECTORS_X; #endif - int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + colRadius); + int maxY = CWorld::GetSectorIndexY(dummy->GetPosition().y + radius); #ifdef FIX_BUGS if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y - 1; #else if (maxY >= NUMSECTORS_Y) maxY = NUMSECTORS_Y; #endif + float colRadius = dummy->GetBoundRadius(); + CVUVECTOR colCentre; + dummy->GetBoundCentre(colCentre); + static CColPoint aTempColPoints[MAX_COLLISION_POINTS]; for (int curY = minY; curY <= maxY; curY++) { @@ -1121,23 +1122,20 @@ CPopulation::ManagePopulation(void) } float dist = (ped->GetPosition() - playerPos).Magnitude2D(); -#ifdef SQUEEZE_PERFORMANCE - if (dist > 50.f) - ped->bUsesCollision = false; - else - ped->bUsesCollision = true; -#endif bool pedIsFarAway = false; if (PedCreationDistMultiplier() * (PED_REMOVE_DIST_SPECIAL * TheCamera.GenerationDistMultiplier) < dist || (!ped->bCullExtraFarAway && PedCreationDistMultiplier() * PED_REMOVE_DIST * TheCamera.GenerationDistMultiplier < dist) +#ifndef EXTENDED_OFFSCREEN_DESPAWN_RANGE || (PedCreationDistMultiplier() * (MIN_CREATION_DIST + CREATION_RANGE) * OFFSCREEN_CREATION_MULT < dist && !ped->GetIsOnScreen() && TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER && TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER_RUNABOUT && !TheCamera.Cams[TheCamera.ActiveCam].LookingLeft && !TheCamera.Cams[TheCamera.ActiveCam].LookingRight - && !TheCamera.Cams[TheCamera.ActiveCam].LookingBehind)) + && !TheCamera.Cams[TheCamera.ActiveCam].LookingBehind) +#endif + ) pedIsFarAway = true; if (!pedIsFarAway) diff --git a/src/render/2dEffect.h b/src/renderer/2dEffect.h similarity index 100% rename from src/render/2dEffect.h rename to src/renderer/2dEffect.h diff --git a/src/render/Antennas.cpp b/src/renderer/Antennas.cpp similarity index 97% rename from src/render/Antennas.cpp rename to src/renderer/Antennas.cpp index 452069a0..5e30aca2 100644 --- a/src/render/Antennas.cpp +++ b/src/renderer/Antennas.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "Antennas.h" CAntenna CAntennas::aAntennas[NUMANTENNAS]; @@ -70,6 +71,7 @@ CAntennas::Render(void) { int i, j; + PUSH_RENDERGROUP("CAntennas::Render"); for(i = 0; i < NUMANTENNAS; i++){ if(!aAntennas[i].active) continue; @@ -101,6 +103,8 @@ CAntennas::Render(void) } RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); + + POP_RENDERGROUP(); } void diff --git a/src/render/Antennas.h b/src/renderer/Antennas.h similarity index 100% rename from src/render/Antennas.h rename to src/renderer/Antennas.h diff --git a/src/render/Clouds.cpp b/src/renderer/Clouds.cpp similarity index 97% rename from src/render/Clouds.cpp rename to src/renderer/Clouds.cpp index b5af6619..957844a5 100644 --- a/src/render/Clouds.cpp +++ b/src/renderer/Clouds.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "Sprite.h" #include "Sprite2d.h" #include "General.h" @@ -123,6 +124,8 @@ CClouds::Render(void) RwV3d screenpos; RwV3d worldpos; + PUSH_RENDERGROUP("CClouds::Render"); + CCoronas::SunBlockedByClouds = false; RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); @@ -273,8 +276,8 @@ CClouds::Render(void) for(i = 0; i < 37; i++){ RwV3d pos = { 2.0f*CoorsOffsetX[i], 2.0f*CoorsOffsetY[i], 40.0f*CoorsOffsetZ[i] + 40.0f }; - worldpos.x = campos.x*rot_cos + campos.y*rot_sin + pos.x; - worldpos.y = campos.x*rot_sin + campos.y*rot_cos + pos.y; + worldpos.x = pos.x*rot_cos + pos.y*rot_sin + campos.x; + worldpos.y = pos.x*rot_sin - pos.y*rot_cos + campos.y; worldpos.z = pos.z; if(bCloudOnScreen[i] && CSprite::CalcScreenCoors(worldpos, &screenpos, &szx, &szy, false)){ // BUG: this is stupid....would have to do this for each cloud individually @@ -310,6 +313,8 @@ CClouds::Render(void) RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); + + POP_RENDERGROUP(); } bool @@ -322,6 +327,8 @@ void CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue, int16 botred, int16 botgreen, int16 botblue, int16 alpha) { + PUSH_RENDERGROUP("CClouds::RenderBackground"); + CVector left = TheCamera.GetRight(); float c = left.Magnitude2D(); if(c > 1.0f) @@ -422,6 +429,8 @@ CClouds::RenderBackground(int16 topred, int16 topgreen, int16 topblue, ms_colourBottom.g = (topgreen + 2 * botgreen) / 3; ms_colourBottom.b = (topblue + 2 * botblue) / 3; } + + POP_RENDERGROUP(); } void @@ -436,6 +445,8 @@ CClouds::RenderHorizon(void) if(ms_horizonZ > SCREEN_HEIGHT) return; + PUSH_RENDERGROUP("CClouds::RenderHorizon"); + float z1 = Min(ms_horizonZ + SMALLSTRIPHEIGHT, SCREEN_HEIGHT); CSprite2d::DrawRectXLU(CRect(0, ms_horizonZ, SCREEN_WIDTH, z1), ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop); @@ -450,4 +461,6 @@ CClouds::RenderHorizon(void) z2 = Min(z2, SCREEN_HEIGHT); CSprite2d::DrawRect(CRect(0, z1, SCREEN_WIDTH, z2), ms_colourBottom, ms_colourBottom, ms_colourTop, ms_colourTop); + + POP_RENDERGROUP(); } diff --git a/src/render/Clouds.h b/src/renderer/Clouds.h similarity index 100% rename from src/render/Clouds.h rename to src/renderer/Clouds.h diff --git a/src/render/Console.cpp b/src/renderer/Console.cpp similarity index 100% rename from src/render/Console.cpp rename to src/renderer/Console.cpp diff --git a/src/render/Console.h b/src/renderer/Console.h similarity index 95% rename from src/render/Console.h rename to src/renderer/Console.h index b4fa60c4..9f22236f 100644 --- a/src/render/Console.h +++ b/src/renderer/Console.h @@ -23,3 +23,5 @@ public: }; extern CConsole TheConsole; + +void cprintf(char*, ...); \ No newline at end of file diff --git a/src/render/Coronas.cpp b/src/renderer/Coronas.cpp similarity index 99% rename from src/render/Coronas.cpp rename to src/renderer/Coronas.cpp index 32957259..e9f9e662 100644 --- a/src/render/Coronas.cpp +++ b/src/renderer/Coronas.cpp @@ -235,6 +235,8 @@ CCoronas::Render(void) int i, j; int screenw, screenh; + PUSH_RENDERGROUP("CCoronas::Render"); + screenw = RwRasterGetWidth(RwCameraGetRaster(Scene.camera)); screenh = RwRasterGetHeight(RwCameraGetRaster(Scene.camera)); @@ -418,6 +420,8 @@ CCoronas::Render(void) RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); + + POP_RENDERGROUP(); } void @@ -428,6 +432,8 @@ CCoronas::RenderReflections(void) CEntity *entity; if(CWeather::WetRoads > 0.0f){ + PUSH_RENDERGROUP("CCoronas::RenderReflections"); + #ifdef FIX_BUGS CSprite::InitSpriteBuffer(); #endif @@ -475,7 +481,7 @@ CCoronas::RenderReflections(void) if(spriteCoors.z < drawDist){ float fadeDistance = drawDist / 2.0f; float distanceFade = spriteCoors.z < fadeDistance ? 1.0f : 1.0f - (spriteCoors.z - fadeDistance)/fadeDistance; - distanceFade = clamp(distanceFade, 0.0f, 1.0f); + distanceFade = Clamp(distanceFade, 0.0f, 1.0f); float recipz = 1.0f/RwCameraGetNearClipPlane(Scene.camera); float heightFade = (20.0f - aCoronas[i].heightAboveRoad)/20.0f; int intensity = distanceFade*heightFade * 230.0 * CWeather::WetRoads; @@ -505,6 +511,8 @@ CCoronas::RenderReflections(void) RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); + + POP_RENDERGROUP(); }else{ for(i = 0; i < NUMCORONAS; i++) aCoronas[i].renderReflection = false; diff --git a/src/render/Coronas.h b/src/renderer/Coronas.h similarity index 100% rename from src/render/Coronas.h rename to src/renderer/Coronas.h diff --git a/src/render/Credits.cpp b/src/renderer/Credits.cpp similarity index 100% rename from src/render/Credits.cpp rename to src/renderer/Credits.cpp diff --git a/src/render/Credits.h b/src/renderer/Credits.h similarity index 100% rename from src/render/Credits.h rename to src/renderer/Credits.h diff --git a/src/render/Draw.cpp b/src/renderer/Draw.cpp similarity index 100% rename from src/render/Draw.cpp rename to src/renderer/Draw.cpp diff --git a/src/render/Draw.h b/src/renderer/Draw.h similarity index 100% rename from src/render/Draw.h rename to src/renderer/Draw.h diff --git a/src/render/Fluff.cpp b/src/renderer/Fluff.cpp similarity index 99% rename from src/render/Fluff.cpp rename to src/renderer/Fluff.cpp index c76d6109..c4cfe7f7 100644 --- a/src/render/Fluff.cpp +++ b/src/renderer/Fluff.cpp @@ -189,6 +189,7 @@ void CMovingThings::Update() void CMovingThings::Render() { int i; + PUSH_RENDERGROUP("CMovingThings::Render"); for (i = 0; i < ARRAY_SIZE(aScrollBars); ++i) { if (aScrollBars[i].IsVisible()) @@ -204,6 +205,7 @@ void CMovingThings::Render() if (aDigitalClocks[i].IsVisible()) aDigitalClocks[i].Render(); } + POP_RENDERGROUP(); } // ---------- CMovingThing ---------- diff --git a/src/render/Fluff.h b/src/renderer/Fluff.h similarity index 100% rename from src/render/Fluff.h rename to src/renderer/Fluff.h diff --git a/src/render/Font.cpp b/src/renderer/Font.cpp similarity index 98% rename from src/render/Font.cpp rename to src/renderer/Font.cpp index 7eed0933..6a9944e1 100644 --- a/src/render/Font.cpp +++ b/src/renderer/Font.cpp @@ -348,11 +348,26 @@ CFont::Initialise(void) SetDropShadowPosition(0); CTxdStore::PopCurrentTxd(); +#if !defined(GAMEPAD_MENU) && defined(BUTTON_ICONS) + // loaded in CMenuManager with GAMEPAD_MENU defined + LoadButtons("MODELS/X360BTNS.TXD"); +#endif +} + #ifdef BUTTON_ICONS - if (int file = CFileMgr::OpenFile("MODELS/X360BTNS.TXD")) { +void +CFont::LoadButtons(const char* txdPath) +{ + if (int file = CFileMgr::OpenFile(txdPath)) { CFileMgr::CloseFile(file); - ButtonsSlot = CTxdStore::AddTxdSlot("buttons"); - CTxdStore::LoadTxd(ButtonsSlot, "MODELS/X360BTNS.TXD"); + if (ButtonsSlot == -1) + ButtonsSlot = CTxdStore::AddTxdSlot("buttons"); + else { + for (int i = 0; i < MAX_BUTTON_ICONS; i++) + ButtonSprite[i].Delete(); + CTxdStore::RemoveTxd(ButtonsSlot); + } + CTxdStore::LoadTxd(ButtonsSlot, txdPath); CTxdStore::AddRef(ButtonsSlot); CTxdStore::PushCurrentTxd(); CTxdStore::SetCurrentTxd(ButtonsSlot); @@ -374,8 +389,16 @@ CFont::Initialise(void) ButtonSprite[BUTTON_R3].SetTexture("r3"); CTxdStore::PopCurrentTxd(); } -#endif // BUTTON_ICONS + else { + if (ButtonsSlot != -1) { + for (int i = 0; i < MAX_BUTTON_ICONS; i++) + ButtonSprite[i].Delete(); + CTxdStore::RemoveTxdSlot(ButtonsSlot); + ButtonsSlot = -1; + } + } } +#endif // BUTTON_ICONS #ifdef MORE_LANGUAGES void @@ -428,6 +451,7 @@ CFont::Shutdown(void) for (int i = 0; i < MAX_BUTTON_ICONS; i++) ButtonSprite[i].Delete(); CTxdStore::RemoveTxdSlot(ButtonsSlot); + ButtonsSlot = -1; } #endif Sprite[0].Delete(); diff --git a/src/render/Font.h b/src/renderer/Font.h similarity index 98% rename from src/render/Font.h rename to src/renderer/Font.h index 621375d6..9316ed34 100644 --- a/src/render/Font.h +++ b/src/renderer/Font.h @@ -109,6 +109,7 @@ public: static CSprite2d ButtonSprite[MAX_BUTTON_ICONS]; static int PS2Symbol; + static void LoadButtons(const char *txdPath); static void DrawButton(float x, float y); #endif // BUTTON_ICONS diff --git a/src/render/Glass.cpp b/src/renderer/Glass.cpp similarity index 99% rename from src/render/Glass.cpp rename to src/renderer/Glass.cpp index 3b6fbd46..cc45648c 100644 --- a/src/render/Glass.cpp +++ b/src/renderer/Glass.cpp @@ -139,9 +139,9 @@ CFallingGlassPane::Render(void) uint8 alpha = CGlass::CalcAlphaWithNormal(&fwdNorm); #ifdef FIX_BUGS - uint16 time = clamp(CTimer::GetTimeInMilliseconds() > m_nTimer ? CTimer::GetTimeInMilliseconds() - m_nTimer : 0u, 0u, 500u); + uint16 time = Clamp(CTimer::GetTimeInMilliseconds() > m_nTimer ? CTimer::GetTimeInMilliseconds() - m_nTimer : 0u, 0u, 500u); #else - uint16 time = clamp(CTimer::GetTimeInMilliseconds() - m_nTimer, 0, 500); + uint16 time = Clamp(CTimer::GetTimeInMilliseconds() - m_nTimer, 0, 500); #endif uint8 color = int32( float(alpha) * (float(time) / 500) ); @@ -261,6 +261,8 @@ CGlass::Render(void) RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDONE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE); + PUSH_RENDERGROUP("CGlass::Render"); + for ( int32 i = 0; i < NUM_GLASSPANES; i++ ) { if ( aGlassPanes[i].m_bActive ) @@ -270,6 +272,8 @@ CGlass::Render(void) for ( uint32 i = 0; i < NumGlassEntities; i++ ) RenderEntityInGlass(apEntitiesToBeRendered[i]); + POP_RENDERGROUP(); + NumGlassEntities = 0; RenderHiLightPolys(); diff --git a/src/render/Glass.h b/src/renderer/Glass.h similarity index 100% rename from src/render/Glass.h rename to src/renderer/Glass.h diff --git a/src/render/Hud.cpp b/src/renderer/Hud.cpp similarity index 98% rename from src/render/Hud.cpp rename to src/renderer/Hud.cpp index 2f7b9001..bba8c525 100644 --- a/src/render/Hud.cpp +++ b/src/renderer/Hud.cpp @@ -75,6 +75,12 @@ #define SCALE_AND_CENTER_X_FIX(a) (a) #endif +#ifdef FIX_BUGS +#define FRAMECOUNTER CTimer::GetLogicalFrameCounter() +#else +#define FRAMECOUNTER CTimer::GetFrameCounter() +#endif + // Game has colors inlined in code. // For easier modification we collect them here: CRGBA MONEY_COLOR(89, 115, 150, 255); @@ -577,12 +583,12 @@ void CHud::Draw() CFont::SetPropOff(); CFont::SetFontStyle(FONT_HEADING); - if (m_ItemToFlash == ITEM_HEALTH && CTimer::GetFrameCounter() & 8 + if (m_ItemToFlash == ITEM_HEALTH && FRAMECOUNTER & 8 || m_ItemToFlash != ITEM_HEALTH || FindPlayerPed()->m_fHealth < 10 - && CTimer::GetFrameCounter() & 8) { + && FRAMECOUNTER & 8) { if (FindPlayerPed()->m_fHealth >= 10 - || FindPlayerPed()->m_fHealth < 10 && CTimer::GetFrameCounter() & 8) { + || FindPlayerPed()->m_fHealth < 10 && FRAMECOUNTER & 8) { AsciiToUnicode("{", sPrintIcon); #ifdef FIX_BUGS @@ -594,14 +600,14 @@ void CHud::Draw() CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrint); - if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4) + if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || FRAMECOUNTER & 4) CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X_FIX(2.0f) - SCREEN_SCALE_X(56.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrintIcon); CFont::SetColor(HEALTH_COLOR); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X), SCREEN_SCALE_Y(65.0f), sPrint); - if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || CTimer::GetFrameCounter() & 4) + if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastHealthLoss + 2000 || FRAMECOUNTER & 4) CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(HEALTH_X) + SCREEN_SCALE_X_FIX(2.0f) - SCREEN_SCALE_X(56.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon); } } @@ -609,7 +615,7 @@ void CHud::Draw() /* DrawArmour */ - if (m_ItemToFlash == ITEM_ARMOUR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_ARMOUR) { + if (m_ItemToFlash == ITEM_ARMOUR && FRAMECOUNTER & 8 || m_ItemToFlash != ITEM_ARMOUR) { CFont::SetScale(SCREEN_SCALE_X(0.8f), SCREEN_SCALE_Y(1.35f)); if (FindPlayerPed()->m_fArmour > 1.0f) { AsciiToUnicode("[", sPrintIcon); @@ -623,14 +629,14 @@ void CHud::Draw() CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrint); - if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || CTimer::GetFrameCounter() & 4) + if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || FRAMECOUNTER & 4) CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) + SCREEN_SCALE_X_FIX(2.0f) - SCREEN_SCALE_X(54.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrintIcon); CFont::SetColor(ARMOUR_COLOR); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f), SCREEN_SCALE_Y(65.0f), sPrint); - if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || CTimer::GetFrameCounter() & 1) { + if (!CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss || CTimer::GetTimeInMilliseconds() > CWorld::Players[CWorld::PlayerInFocus].m_nTimeLastArmourLoss + 2000 || FRAMECOUNTER & 1) { CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(182.0f) - SCREEN_SCALE_X(54.0f) + SCREEN_SCALE_X(2.0f), SCREEN_SCALE_Y(65.0f), sPrintIcon); } } @@ -657,7 +663,7 @@ void CHud::Draw() if (FindPlayerPed()->m_pWanted->GetWantedLevel() > i && (CTimer::GetTimeInMilliseconds() > FindPlayerPed()->m_pWanted->m_nLastWantedLevelChange - + 2000 || CTimer::GetFrameCounter() & 4)) { + + 2000 || FRAMECOUNTER & 4)) { CFont::SetColor(WANTED_COLOR); CFont::PrintString(fStarsX, SCREEN_SCALE_Y(87.0f), sPrintIcon); @@ -904,7 +910,7 @@ void CHud::Draw() TimerFlashTimer = 0; } - if (CTimer::GetFrameCounter() & 4 || !TimerFlashTimer) { + if (FRAMECOUNTER & 4 || !TimerFlashTimer) { AsciiToUnicode(CUserDisplay::OnscnTimer.m_sEntries[0].m_bTimerBuffer, sTimer); CFont::SetPropOn(); CFont::SetBackgroundOff(); @@ -941,7 +947,7 @@ void CHud::Draw() CounterFlashTimer = 0; } - if (CTimer::GetFrameCounter() & 4 || !CounterFlashTimer) { + if (FRAMECOUNTER & 4 || !CounterFlashTimer) { if (CUserDisplay::OnscnTimer.m_sEntries[0].m_nType == COUNTER_DISPLAY_NUMBER) { AsciiToUnicode(CUserDisplay::OnscnTimer.m_sEntries[0].m_bCounterBuffer, sTimer); CFont::SetPropOn(); @@ -1053,7 +1059,7 @@ void CHud::Draw() /* DrawRadar */ - if (m_ItemToFlash == ITEM_RADAR && CTimer::GetFrameCounter() & 8 || m_ItemToFlash != ITEM_RADAR) { + if (m_ItemToFlash == ITEM_RADAR && FRAMECOUNTER & 8 || m_ItemToFlash != ITEM_RADAR) { CRadar::DrawMap(); CRect rect(0.0f, 0.0f, SCREEN_SCALE_X(RADAR_WIDTH), SCREEN_SCALE_Y(RADAR_HEIGHT)); rect.Translate(SCREEN_SCALE_X_FIX(RADAR_LEFT), SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT)); @@ -1150,18 +1156,18 @@ void CHud::Draw() if (IntroRect.m_nTextureId >= 0) { CRect rect ( IntroRect.m_sRect.left, - IntroRect.m_sRect.top, + IntroRect.m_sRect.bottom, IntroRect.m_sRect.right, - IntroRect.m_sRect.bottom ); + IntroRect.m_sRect.top ); CTheScripts::ScriptSprites[IntroRect.m_nTextureId].Draw(rect, IntroRect.m_sColor); } else { CRect rect ( IntroRect.m_sRect.left, - IntroRect.m_sRect.top, + IntroRect.m_sRect.bottom, IntroRect.m_sRect.right, - IntroRect.m_sRect.bottom ); + IntroRect.m_sRect.top ); CSprite2d::DrawRect(rect, IntroRect.m_sColor); } diff --git a/src/render/Hud.h b/src/renderer/Hud.h similarity index 100% rename from src/render/Hud.h rename to src/renderer/Hud.h diff --git a/src/render/Instance.cpp b/src/renderer/Instance.cpp similarity index 100% rename from src/render/Instance.cpp rename to src/renderer/Instance.cpp diff --git a/src/render/Instance.h b/src/renderer/Instance.h similarity index 100% rename from src/render/Instance.h rename to src/renderer/Instance.h diff --git a/src/render/Lines.cpp b/src/renderer/Lines.cpp similarity index 100% rename from src/render/Lines.cpp rename to src/renderer/Lines.cpp diff --git a/src/render/Lines.h b/src/renderer/Lines.h similarity index 100% rename from src/render/Lines.h rename to src/renderer/Lines.h diff --git a/src/render/MBlur.cpp b/src/renderer/MBlur.cpp similarity index 99% rename from src/render/MBlur.cpp rename to src/renderer/MBlur.cpp index e24a0811..6f4739bd 100644 --- a/src/render/MBlur.cpp +++ b/src/renderer/MBlur.cpp @@ -6,6 +6,7 @@ #include #endif +#include "main.h" #include "RwHelper.h" #include "Camera.h" #include "MBlur.h" @@ -216,6 +217,7 @@ CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, u #ifdef EXTENDED_COLOURFILTER CPostFX::Render(cam, red, green, blue, blur, type, bluralpha); #else + PUSH_RENDERGROUP("CMBlur::MotionBlurRender"); RwRGBA color = { (RwUInt8)red, (RwUInt8)green, (RwUInt8)blue, (RwUInt8)blur }; #ifdef GTA_PS2 if( pFrontBuffer ) @@ -235,6 +237,7 @@ CMBlur::MotionBlurRender(RwCamera *cam, uint32 red, uint32 green, uint32 blue, u OverlayRender(cam, nil, color, type, bluralpha); } #endif + POP_RENDERGROUP(); #endif } diff --git a/src/render/MBlur.h b/src/renderer/MBlur.h similarity index 100% rename from src/render/MBlur.h rename to src/renderer/MBlur.h diff --git a/src/render/Particle.cpp b/src/renderer/Particle.cpp similarity index 98% rename from src/render/Particle.cpp rename to src/renderer/Particle.cpp index 6c643caf..76ddde50 100644 --- a/src/render/Particle.cpp +++ b/src/renderer/Particle.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "General.h" #include "Timer.h" #include "TxdStore.h" @@ -13,6 +14,7 @@ #include "ParticleObject.h" #include "Particle.h" #include "soundlist.h" +#include "debugmenu.h" #define MAX_PARTICLES_ON_SCREEN (1000) @@ -878,15 +880,15 @@ CParticle *CParticle::AddParticle(tParticleType type, CVector const &vecPos, CVe int32 ColorVariation = CGeneral::GetRandomNumberInRange(-psystem->m_InitialColorVariation, psystem->m_InitialColorVariation); //Float ColorVariation = CGeneral::GetRandomNumberInRange((float)-psystem->m_InitialColorVariation, (float)psystem->m_InitialColorVariation); - pParticle->m_Color.red = clamp(pParticle->m_Color.red + + pParticle->m_Color.red = Clamp(pParticle->m_Color.red + PERCENT(pParticle->m_Color.red, ColorVariation), 0, 255); - pParticle->m_Color.green = clamp(pParticle->m_Color.green + + pParticle->m_Color.green = Clamp(pParticle->m_Color.green + PERCENT(pParticle->m_Color.green, ColorVariation), 0, 255); - pParticle->m_Color.blue = clamp(pParticle->m_Color.blue + + pParticle->m_Color.blue = Clamp(pParticle->m_Color.blue + PERCENT(pParticle->m_Color.blue, ColorVariation), 0, 255); } @@ -1081,15 +1083,15 @@ void CParticle::Update() { float colorMul = 1.0f - float(particle->m_nTimeWhenColorWillBeChanged - CTimer::GetTimeInMilliseconds()) / float(psystem->m_ColorFadeTime); - particle->m_Color.red = clamp( + particle->m_Color.red = Clamp( psystem->m_RenderColouring.red + int32(float(psystem->m_FadeDestinationColor.red - psystem->m_RenderColouring.red) * colorMul), 0, 255); - particle->m_Color.green = clamp( + particle->m_Color.green = Clamp( psystem->m_RenderColouring.green + int32(float(psystem->m_FadeDestinationColor.green - psystem->m_RenderColouring.green) * colorMul), 0, 255); - particle->m_Color.blue = clamp( + particle->m_Color.blue = Clamp( psystem->m_RenderColouring.blue + int32(float(psystem->m_FadeDestinationColor.blue - psystem->m_RenderColouring.blue) * colorMul), 0, 255); } @@ -1378,7 +1380,7 @@ void CParticle::Update() { particle->m_nFadeToBlackTimer = 0; - particle->m_nColorIntensity = clamp(particle->m_nColorIntensity - psystem->m_nFadeToBlackAmount, + particle->m_nColorIntensity = Clamp(particle->m_nColorIntensity - psystem->m_nFadeToBlackAmount, 0, 255); } else @@ -1391,7 +1393,7 @@ void CParticle::Update() { particle->m_nFadeAlphaTimer = 0; - particle->m_nAlpha = clamp(particle->m_nAlpha - psystem->m_nFadeAlphaAmount, + particle->m_nAlpha = Clamp(particle->m_nAlpha - psystem->m_nFadeAlphaAmount, 0, 255); #ifdef PC_PARTICLE if ( particle->m_nAlpha == 0 ) @@ -1477,6 +1479,8 @@ void CParticle::Update() void CParticle::Render() { + PUSH_RENDERGROUP("CParticle::Render"); + RwRenderStateSet(rwRENDERSTATETEXTUREADDRESS, (void *)rwTEXTUREADDRESSWRAP); RwRenderStateSet(rwRENDERSTATETEXTUREPERSPECTIVE, (void *)TRUE); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void *)FALSE); @@ -1794,6 +1798,8 @@ void CParticle::Render() RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void *)TRUE); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void *)rwBLENDSRCALPHA); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void *)rwBLENDINVSRCALPHA); + + POP_RENDERGROUP(); } void CParticle::RemovePSystem(tParticleType type) diff --git a/src/render/Particle.h b/src/renderer/Particle.h similarity index 100% rename from src/render/Particle.h rename to src/renderer/Particle.h diff --git a/src/render/ParticleMgr.cpp b/src/renderer/ParticleMgr.cpp similarity index 100% rename from src/render/ParticleMgr.cpp rename to src/renderer/ParticleMgr.cpp diff --git a/src/render/ParticleMgr.h b/src/renderer/ParticleMgr.h similarity index 100% rename from src/render/ParticleMgr.h rename to src/renderer/ParticleMgr.h diff --git a/src/render/ParticleType.h b/src/renderer/ParticleType.h similarity index 100% rename from src/render/ParticleType.h rename to src/renderer/ParticleType.h diff --git a/src/render/PlayerSkin.cpp b/src/renderer/PlayerSkin.cpp similarity index 100% rename from src/render/PlayerSkin.cpp rename to src/renderer/PlayerSkin.cpp diff --git a/src/render/PlayerSkin.h b/src/renderer/PlayerSkin.h similarity index 100% rename from src/render/PlayerSkin.h rename to src/renderer/PlayerSkin.h diff --git a/src/render/PointLights.cpp b/src/renderer/PointLights.cpp similarity index 99% rename from src/render/PointLights.cpp rename to src/renderer/PointLights.cpp index 6f0b4d46..84ac4ab2 100644 --- a/src/render/PointLights.cpp +++ b/src/renderer/PointLights.cpp @@ -142,6 +142,8 @@ CPointLights::RenderFogEffect(void) CVector spriteCoors; float spritew, spriteh; + PUSH_RENDERGROUP("CPointLights::RenderFogEffect"); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDONE); @@ -282,4 +284,6 @@ CPointLights::RenderFogEffect(void) } } } + + POP_RENDERGROUP(); } diff --git a/src/render/PointLights.h b/src/renderer/PointLights.h similarity index 100% rename from src/render/PointLights.h rename to src/renderer/PointLights.h diff --git a/src/render/RenderBuffer.cpp b/src/renderer/RenderBuffer.cpp similarity index 100% rename from src/render/RenderBuffer.cpp rename to src/renderer/RenderBuffer.cpp diff --git a/src/render/RenderBuffer.h b/src/renderer/RenderBuffer.h similarity index 100% rename from src/render/RenderBuffer.h rename to src/renderer/RenderBuffer.h diff --git a/src/render/Renderer.cpp b/src/renderer/Renderer.cpp similarity index 95% rename from src/render/Renderer.cpp rename to src/renderer/Renderer.cpp index 2c224677..334f3954 100644 --- a/src/render/Renderer.cpp +++ b/src/renderer/Renderer.cpp @@ -75,6 +75,8 @@ int32 CRenderer::ms_nNoOfVisibleVehicles; CEntity *CRenderer::ms_aVisibleVehiclePtrs[NUMVISIBLEENTITIES]; int32 CRenderer::ms_nNoOfVisibleBuildings; CEntity *CRenderer::ms_aVisibleBuildingPtrs[NUMVISIBLEENTITIES]; + +CLinkList gSortedBuildings; #endif CVector CRenderer::ms_vecCameraPosition; @@ -82,14 +84,6 @@ CVehicle *CRenderer::m_pFirstPersonVehicle; bool CRenderer::m_loadingPriority; float CRenderer::ms_lodDistScale = 1.2f; -#ifdef EXTRA_MODEL_FLAGS -#define BACKFACE_CULLING_ON SetCullMode(rwCULLMODECULLBACK) -#define BACKFACE_CULLING_OFF SetCullMode(rwCULLMODECULLNONE) -#else -#define BACKFACE_CULLING_ON -#define BACKFACE_CULLING_OFF -#endif - // unused BlockedRange CRenderer::aBlockedRanges[16]; BlockedRange *CRenderer::pFullBlockedRanges; @@ -100,12 +94,18 @@ CRenderer::Init(void) { gSortedVehiclesAndPeds.Init(40); SortBIGBuildings(); +#ifdef NEW_RENDERER + gSortedBuildings.Init(NUMVISIBLEENTITIES); +#endif } void CRenderer::Shutdown(void) { gSortedVehiclesAndPeds.Shutdown(); +#ifdef NEW_RENDERER + gSortedBuildings.Shutdown(); +#endif } void @@ -122,8 +122,12 @@ CRenderer::PreRender(void) for(i = 0; i < ms_nNoOfVisibleVehicles; i++) ms_aVisibleVehiclePtrs[i]->PreRender(); // How is this done with cWorldStream? - for(i = 0; i < ms_nNoOfVisibleBuildings; i++) - ms_aVisibleBuildingPtrs[i]->PreRender(); + //for(i = 0; i < ms_nNoOfVisibleBuildings; i++) + // ms_aVisibleBuildingPtrs[i]->PreRender(); + for(CLink *node = gSortedBuildings.head.next; + node != &gSortedBuildings.tail; + node = node->next) + ((CEntity*)node->item.ent)->PreRender(); for(node = CVisibilityPlugins::m_alphaBuildingList.head.next; node != &CVisibilityPlugins::m_alphaBuildingList.tail; node = node->next) @@ -150,14 +154,19 @@ CRenderer::PreRender(void) void CRenderer::RenderOneRoad(CEntity *e) { +#ifndef MASTER if(gbDontRenderBuildings) return; if(gbShowCollisionPolys) - CCollision::DrawColModel_Coloured(e->GetMatrix(), *CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(), e->GetModelIndex()); - else{ + CCollision::DrawColModel_Coloured(e->GetMatrix(), *CModelInfo::GetColModel(e->GetModelIndex()), e->GetModelIndex()); + else +#endif + { #ifdef EXTENDED_PIPELINES CustomPipes::AttachGlossPipe(e->GetAtomic()); #endif + PUSH_RENDERGROUP(CModelInfo::GetModelInfo(e->GetModelIndex())->GetModelName()); + #ifdef EXTRA_MODEL_FLAGS if(!e->IsBuilding() || CModelInfo::GetModelInfo(e->GetModelIndex())->RenderDoubleSided()){ BACKFACE_CULLING_OFF; @@ -166,6 +175,8 @@ CRenderer::RenderOneRoad(CEntity *e) }else #endif e->Render(); + + POP_RENDERGROUP(); } } @@ -180,7 +191,7 @@ CRenderer::RenderOneNonRoad(CEntity *e) #ifndef MASTER if(gbShowCollisionPolys){ if(!e->IsVehicle()){ - CCollision::DrawColModel_Coloured(e->GetMatrix(), *CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel(), e->GetModelIndex()); + CCollision::DrawColModel_Coloured(e->GetMatrix(), *CModelInfo::GetColModel(e->GetModelIndex()), e->GetModelIndex()); return; } }else if(e->IsBuilding()){ @@ -213,6 +224,8 @@ CRenderer::RenderOneNonRoad(CEntity *e) } #endif + PUSH_RENDERGROUP(CModelInfo::GetModelInfo(e->GetModelIndex())->GetModelName()); + resetLights = e->SetupLighting(); if(e->IsVehicle()) @@ -246,6 +259,8 @@ CRenderer::RenderOneNonRoad(CEntity *e) } e->RemoveLighting(resetLights); + + POP_RENDERGROUP(); } void @@ -271,6 +286,7 @@ CRenderer::RenderRoads(void) int i; CTreadable *t; + PUSH_RENDERGROUP("CRenderer::RenderRoads"); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE); BACKFACE_CULLING_ON; DeActivateDirectional(); @@ -296,6 +312,7 @@ CRenderer::RenderRoads(void) #endif } } + POP_RENDERGROUP(); } void @@ -306,6 +323,7 @@ CRenderer::RenderEverythingBarRoads(void) CVector dist; EntityInfo ei; + PUSH_RENDERGROUP("CRenderer::RenderEverythingBarRoads"); BACKFACE_CULLING_ON; gSortedVehiclesAndPeds.Clear(); @@ -337,6 +355,7 @@ CRenderer::RenderEverythingBarRoads(void) }else RenderOneNonRoad(e); } + POP_RENDERGROUP(); } void @@ -361,6 +380,7 @@ CRenderer::RenderBoats(void) { CLink *node; + PUSH_RENDERGROUP("CRenderer::RenderBoats"); BACKFACE_CULLING_ON; for(node = gSortedVehiclesAndPeds.tail.prev; @@ -371,6 +391,7 @@ CRenderer::RenderBoats(void) if(v->IsBoat()) RenderOneNonRoad(v); } + POP_RENDERGROUP(); } #ifdef NEW_RENDERER @@ -428,6 +449,14 @@ CRenderer::RenderOneBuilding(CEntity *ent, float camdist) RpAtomic *atomic = (RpAtomic*)ent->m_rwObject; CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(ent->GetModelIndex()); +#ifdef EXTRA_MODEL_FLAGS + bool resetCull = false; + if(!ent->IsBuilding() || mi->RenderDoubleSided()){ + resetCull = true; + BACKFACE_CULLING_OFF; + } +#endif + int pass = PASS_BLEND; if(mi->m_additive) // very questionable pass = PASS_ADD; @@ -457,6 +486,11 @@ CRenderer::RenderOneBuilding(CEntity *ent, float camdist) }else WorldRender::AtomicFirstPass(atomic, pass); +#ifdef EXTRA_MODEL_FLAGS + if(resetCull) + BACKFACE_CULLING_ON; +#endif + ent->bImBeingRendered = false; // TODO: this seems wrong, but do we even need it? } @@ -468,6 +502,7 @@ CRenderer::RenderWorld(int pass) CLink *node; RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE); + BACKFACE_CULLING_ON; DeActivateDirectional(); SetAmbientColours(); @@ -475,12 +510,22 @@ CRenderer::RenderWorld(int pass) switch(pass){ case 0: // Roads + PUSH_RENDERGROUP("CRenderer::RenderWorld - Roads"); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); +/* for(i = 0; i < ms_nNoOfVisibleBuildings; i++){ e = ms_aVisibleBuildingPtrs[i]; if(e->bIsBIGBuilding || IsRoad(e)) RenderOneBuilding(e); } +*/ + for(CLink *node = gSortedBuildings.tail.prev; + node != &gSortedBuildings.head; + node = node->prev){ + e = node->item.ent; + if(e->bIsBIGBuilding || IsRoad(e)) + RenderOneBuilding(e); + } for(node = CVisibilityPlugins::m_alphaBuildingList.tail.prev; node != &CVisibilityPlugins::m_alphaBuildingList.head; node = node->prev){ @@ -495,15 +540,26 @@ CRenderer::RenderWorld(int pass) RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); WorldRender::RenderBlendPass(PASS_BLEND); WorldRender::numBlendInsts[PASS_BLEND] = 0; + POP_RENDERGROUP(); break; case 1: // Opaque + PUSH_RENDERGROUP("CRenderer::RenderWorld - Opaque"); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); +/* for(i = 0; i < ms_nNoOfVisibleBuildings; i++){ e = ms_aVisibleBuildingPtrs[i]; if(!(e->bIsBIGBuilding || IsRoad(e))) RenderOneBuilding(e); } +*/ + for(CLink *node = gSortedBuildings.tail.prev; + node != &gSortedBuildings.head; + node = node->prev){ + e = node->item.ent; + if(!(e->bIsBIGBuilding || IsRoad(e))) + RenderOneBuilding(e); + } for(node = CVisibilityPlugins::m_alphaBuildingList.tail.prev; node != &CVisibilityPlugins::m_alphaBuildingList.head; node = node->prev){ @@ -518,14 +574,17 @@ CRenderer::RenderWorld(int pass) RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE); WorldRender::RenderBlendPass(PASS_NOZ); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); + POP_RENDERGROUP(); break; case 2: // Transparent + PUSH_RENDERGROUP("CRenderer::RenderWorld - Transparent"); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE); WorldRender::RenderBlendPass(PASS_ADD); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); WorldRender::RenderBlendPass(PASS_BLEND); + POP_RENDERGROUP(); break; } } @@ -536,11 +595,13 @@ CRenderer::RenderPeds(void) int i; CEntity *e; + PUSH_RENDERGROUP("CRenderer::RenderPeds"); for(i = 0; i < ms_nNoOfVisibleVehicles; i++){ e = ms_aVisibleVehiclePtrs[i]; if(e->IsPed()) RenderOneNonRoad(e); } + POP_RENDERGROUP(); } void @@ -551,6 +612,7 @@ CRenderer::RenderVehicles(void) EntityInfo ei; CLink *node; + PUSH_RENDERGROUP("CRenderer::RenderVehicles"); // not the real thing for(i = 0; i < ms_nNoOfVisibleVehicles; i++){ e = ms_aVisibleVehiclePtrs[i]; @@ -567,6 +629,7 @@ CRenderer::RenderVehicles(void) node != &gSortedVehiclesAndPeds.head; node = node->prev) RenderOneNonRoad(node->item.ent); + POP_RENDERGROUP(); } void @@ -575,6 +638,7 @@ CRenderer::RenderWater(void) int i; CEntity *e; + PUSH_RENDERGROUP("CRenderer::RenderWater"); RwRenderStateSet(rwRENDERSTATETEXTURERASTER, nil); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE); @@ -598,6 +662,7 @@ CRenderer::RenderWater(void) CWaterLevel::RenderWater(); SetStencilState(0); + POP_RENDERGROUP(); } void @@ -608,6 +673,7 @@ CRenderer::ClearForFrame(void) ms_nNoOfVisibleBuildings = 0; ms_nNoOfInVisibleEntities = 0; gSortedVehiclesAndPeds.Clear(); + gSortedBuildings.Clear(); WorldRender::numBlendInsts[PASS_NOZ] = 0; WorldRender::numBlendInsts[PASS_ADD] = 0; @@ -618,11 +684,13 @@ CRenderer::ClearForFrame(void) void CRenderer::RenderFadingInEntities(void) { + PUSH_RENDERGROUP("CRenderer::RenderFadingInEntities"); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE); BACKFACE_CULLING_ON; DeActivateDirectional(); SetAmbientColours(); CVisibilityPlugins::RenderFadingEntities(); + POP_RENDERGROUP(); } void @@ -1404,9 +1472,13 @@ CRenderer::InsertEntityIntoList(CEntity *ent) // TODO: there are more flags being checked here if(gbNewRenderer && (ent->IsVehicle() || ent->IsPed())) ms_aVisibleVehiclePtrs[ms_nNoOfVisibleVehicles++] = ent; - else if(gbNewRenderer && ent->IsBuilding()) - ms_aVisibleBuildingPtrs[ms_nNoOfVisibleBuildings++] = ent; - else + else if(gbNewRenderer && ent->IsBuilding()){ + EntityInfo info; + info.ent = ent; + info.sort = -(ent->GetPosition() - ms_vecCameraPosition).MagnitudeSqr(); + gSortedBuildings.InsertSorted(info); +// ms_aVisibleBuildingPtrs[ms_nNoOfVisibleBuildings++] = ent; + }else #endif ms_aVisibleEntityPtrs[ms_nNoOfVisibleEntities++] = ent; } @@ -1423,7 +1495,7 @@ CRenderer::ScanBigBuildingList(CPtrList &list) // all missing from game actually TestedBigBuildings++; #endif - if(!ent->bZoneCulled){ + if(!ent->bZoneCulled || gbDisableZoneCull){ if(SetupBigBuildingVisibility(ent) == VIS_VISIBLE) InsertEntityIntoList(ent); #ifndef MASTER diff --git a/src/render/Renderer.h b/src/renderer/Renderer.h similarity index 93% rename from src/render/Renderer.h rename to src/renderer/Renderer.h index 35b43a0b..0322939c 100644 --- a/src/render/Renderer.h +++ b/src/renderer/Renderer.h @@ -10,6 +10,14 @@ class CEntity; #define FADE_DISTANCE 20.0f #define STREAM_DISTANCE 30.0f +#ifdef EXTRA_MODEL_FLAGS +#define BACKFACE_CULLING_ON SetCullMode(rwCULLMODECULLBACK) +#define BACKFACE_CULLING_OFF SetCullMode(rwCULLMODECULLNONE) +#else +#define BACKFACE_CULLING_ON +#define BACKFACE_CULLING_OFF +#endif + extern bool gbShowPedRoadGroups; extern bool gbShowCarRoadGroups; extern bool gbShowCollisionPolys; diff --git a/src/render/Rubbish.cpp b/src/renderer/Rubbish.cpp similarity index 99% rename from src/render/Rubbish.cpp rename to src/renderer/Rubbish.cpp index 18a20bc7..8da6b025 100644 --- a/src/render/Rubbish.cpp +++ b/src/renderer/Rubbish.cpp @@ -52,6 +52,8 @@ CRubbish::Render(void) { int type; + PUSH_RENDERGROUP("CRubbish::Render"); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE); @@ -137,6 +139,8 @@ CRubbish::Render(void) RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); + + POP_RENDERGROUP(); } void diff --git a/src/render/Rubbish.h b/src/renderer/Rubbish.h similarity index 100% rename from src/render/Rubbish.h rename to src/renderer/Rubbish.h diff --git a/src/render/Shadows.cpp b/src/renderer/Shadows.cpp similarity index 99% rename from src/render/Shadows.cpp rename to src/renderer/Shadows.cpp index 8c892be3..3884d3bb 100644 --- a/src/render/Shadows.cpp +++ b/src/renderer/Shadows.cpp @@ -21,8 +21,8 @@ #include "Shadows.h" #ifdef DEBUGMENU -SETTWEAKPATH("Shadows"); -TWEAKBOOL(gbPrintShite); +//SETTWEAKPATH("Shadows"); +//TWEAKBOOL(gbPrintShite); #endif RwImVertexIndex ShadowIndexList[24]; @@ -687,6 +687,8 @@ CShadows::SetRenderModeForShadowType(uint8 ShadowType) void CShadows::RenderStoredShadows(void) { + PUSH_RENDERGROUP("CShadows::RenderStoredShadows"); + RenderBuffer::ClearRenderBuffer(); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); @@ -784,11 +786,15 @@ CShadows::RenderStoredShadows(void) RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void *)TRUE); ShadowsStoredToBeRendered = 0; + + POP_RENDERGROUP(); } void CShadows::RenderStaticShadows(void) { + PUSH_RENDERGROUP("CShadows::RenderStaticShadows"); + RenderBuffer::ClearRenderBuffer(); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); @@ -855,6 +861,8 @@ CShadows::RenderStaticShadows(void) RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)TRUE); + + POP_RENDERGROUP(); } void diff --git a/src/render/Shadows.h b/src/renderer/Shadows.h similarity index 100% rename from src/render/Shadows.h rename to src/renderer/Shadows.h diff --git a/src/render/Skidmarks.cpp b/src/renderer/Skidmarks.cpp similarity index 99% rename from src/render/Skidmarks.cpp rename to src/renderer/Skidmarks.cpp index 9e509b52..4c662a79 100644 --- a/src/render/Skidmarks.cpp +++ b/src/renderer/Skidmarks.cpp @@ -118,6 +118,8 @@ CSkidmarks::Render(void) int i, j; RwTexture *lastTex = nil; + PUSH_RENDERGROUP("CSkidmarks::Render"); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); @@ -174,6 +176,8 @@ CSkidmarks::Render(void) RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE); + + POP_RENDERGROUP(); } void diff --git a/src/render/Skidmarks.h b/src/renderer/Skidmarks.h similarity index 100% rename from src/render/Skidmarks.h rename to src/renderer/Skidmarks.h diff --git a/src/render/SpecialFX.cpp b/src/renderer/SpecialFX.cpp similarity index 99% rename from src/render/SpecialFX.cpp rename to src/renderer/SpecialFX.cpp index 97b70a94..6d96d21a 100644 --- a/src/render/SpecialFX.cpp +++ b/src/renderer/SpecialFX.cpp @@ -136,6 +136,7 @@ CSpecialFX::Shutdown(void) void CSpecialFX::Render(void) { + PUSH_RENDERGROUP("CSpecialFX::Render"); CMotionBlurStreaks::Render(); CBulletTraces::Render(); CBrightLights::Render(); @@ -145,6 +146,7 @@ CSpecialFX::Render(void) if(!(gbNewRenderer && FredIsInFirstPersonCam())) #endif C3dMarkers::Render(); + POP_RENDERGROUP(); } CRegisteredMotionBlurStreak CMotionBlurStreaks::aStreaks[NUMMBLURSTREAKS]; diff --git a/src/render/SpecialFX.h b/src/renderer/SpecialFX.h similarity index 100% rename from src/render/SpecialFX.h rename to src/renderer/SpecialFX.h diff --git a/src/render/Sprite.cpp b/src/renderer/Sprite.cpp similarity index 99% rename from src/render/Sprite.cpp rename to src/renderer/Sprite.cpp index a441e08b..3fef0733 100644 --- a/src/render/Sprite.cpp +++ b/src/renderer/Sprite.cpp @@ -405,13 +405,13 @@ CSprite::RenderBufferedOneXLUSprite_Rotate_2Colours(float x, float y, float z, f // Colour factors, cx/y is the direction in which colours change from rgb1 to rgb2 cf[0] = (cx*(-c-s) + cy*(-c+s))*0.5f + 0.5f; - cf[0] = clamp(cf[0], 0.0f, 1.0f); + cf[0] = Clamp(cf[0], 0.0f, 1.0f); cf[1] = (cx*(-c+s) + cy*( c+s))*0.5f + 0.5f; - cf[1] = clamp(cf[1], 0.0f, 1.0f); + cf[1] = Clamp(cf[1], 0.0f, 1.0f); cf[2] = (cx*( c+s) + cy*( c-s))*0.5f + 0.5f; - cf[2] = clamp(cf[2], 0.0f, 1.0f); + cf[2] = Clamp(cf[2], 0.0f, 1.0f); cf[3] = (cx*( c-s) + cy*(-c-s))*0.5f + 0.5f; - cf[3] = clamp(cf[3], 0.0f, 1.0f); + cf[3] = Clamp(cf[3], 0.0f, 1.0f); float screenz = m_f2DNearScreenZ + (z-CDraw::GetNearClipZ())*(m_f2DFarScreenZ-m_f2DNearScreenZ)*CDraw::GetFarClipZ() / diff --git a/src/render/Sprite.h b/src/renderer/Sprite.h similarity index 100% rename from src/render/Sprite.h rename to src/renderer/Sprite.h diff --git a/src/render/Sprite2d.cpp b/src/renderer/Sprite2d.cpp similarity index 100% rename from src/render/Sprite2d.cpp rename to src/renderer/Sprite2d.cpp diff --git a/src/render/Sprite2d.h b/src/renderer/Sprite2d.h similarity index 100% rename from src/render/Sprite2d.h rename to src/renderer/Sprite2d.h diff --git a/src/render/TexList.cpp b/src/renderer/TexList.cpp similarity index 100% rename from src/render/TexList.cpp rename to src/renderer/TexList.cpp diff --git a/src/render/TexList.h b/src/renderer/TexList.h similarity index 100% rename from src/render/TexList.h rename to src/renderer/TexList.h diff --git a/src/render/Timecycle.cpp b/src/renderer/Timecycle.cpp similarity index 100% rename from src/render/Timecycle.cpp rename to src/renderer/Timecycle.cpp diff --git a/src/render/Timecycle.h b/src/renderer/Timecycle.h similarity index 100% rename from src/render/Timecycle.h rename to src/renderer/Timecycle.h diff --git a/src/render/WaterCannon.cpp b/src/renderer/WaterCannon.cpp similarity index 97% rename from src/render/WaterCannon.cpp rename to src/renderer/WaterCannon.cpp index f54b31b9..08898be8 100644 --- a/src/render/WaterCannon.cpp +++ b/src/renderer/WaterCannon.cpp @@ -127,7 +127,7 @@ void CWaterCannon::Render(void) int16 pointA = m_nCur % NUM_SEGMENTPOINTS; int16 pointB = pointA - 1; - if ( (pointA - 1) < 0 ) + if ( pointB < 0 ) pointB += NUM_SEGMENTPOINTS; bool bInit = false; @@ -231,7 +231,7 @@ void CWaterCannon::PushPeds(void) ped->m_vecMoveSpeed.x = (0.6f * m_avecVelocity[j].x + ped->m_vecMoveSpeed.x) * 0.5f; ped->m_vecMoveSpeed.y = (0.6f * m_avecVelocity[j].y + ped->m_vecMoveSpeed.y) * 0.5f; - ped->SetFall(2000, AnimationId(ANIM_KO_SKID_FRONT + localDir), 0); + ped->SetFall(2000, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), 0); CFire *fire = ped->m_pFire; if ( fire ) @@ -297,9 +297,11 @@ void CWaterCannons::Update(void) void CWaterCannons::Render(void) { + PUSH_RENDERGROUP("CWaterCannons::Render"); for ( int32 i = 0; i < NUM_WATERCANNONS; i++ ) { if ( aCannons[i].m_nId != 0 ) aCannons[i].Render(); } + POP_RENDERGROUP(); } diff --git a/src/render/WaterCannon.h b/src/renderer/WaterCannon.h similarity index 100% rename from src/render/WaterCannon.h rename to src/renderer/WaterCannon.h diff --git a/src/render/WaterLevel.cpp b/src/renderer/WaterLevel.cpp similarity index 97% rename from src/render/WaterLevel.cpp rename to src/renderer/WaterLevel.cpp index da51fdbc..7d0707ec 100644 --- a/src/render/WaterLevel.cpp +++ b/src/renderer/WaterLevel.cpp @@ -140,10 +140,10 @@ CWaterLevel::Initialise(Const char *pWaterDat) #ifdef FIX_BUGS // water.dat has rects that go out of bounds // which causes memory corruption - l = clamp(l, 0, MAX_SMALL_SECTORS - 1); - r = clamp(r, 0, MAX_SMALL_SECTORS - 1); - t = clamp(t, 0, MAX_SMALL_SECTORS - 1); - b = clamp(b, 0, MAX_SMALL_SECTORS - 1); + l = Clamp(l, 0, MAX_SMALL_SECTORS - 1); + r = Clamp(r, 0, MAX_SMALL_SECTORS - 1); + t = Clamp(t, 0, MAX_SMALL_SECTORS - 1); + b = Clamp(b, 0, MAX_SMALL_SECTORS - 1); #endif for (int32 x = l; x <= r; x++) @@ -459,14 +459,14 @@ CWaterLevel::TestVisibilityForFineWaterBlocks(const CVector &worldPos) if ((lineEnd.x > WORLD_MIN_X && lineEnd.x < WORLD_MAX_X) && (lineEnd.y > WORLD_MIN_Y && lineEnd.y < WORLD_MAX_Y)) { - if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false, nil)) + if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false)) { lineStart.x += 0.4f; lineStart.y += 0.4f; lineEnd.x += 0.4f; lineEnd.y += 0.4f; - if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false, nil)) + if (!CWorld::ProcessLineOfSight(lineStart, lineEnd, col, entity, true, false, false, false, true, false)) { return false; } @@ -670,6 +670,7 @@ CWaterLevel::RenderWater() if (gbDontRenderWater) return; #endif + PUSH_RENDERGROUP("CWaterLevel::RenderWater"); bool bUseCamEndX = false; bool bUseCamStartY = false; @@ -739,10 +740,10 @@ CWaterLevel::RenderWater() if ( bUseCamEndY ) nEndY = WATER_TO_HUGE_SECTOR_Y(camPos.y); - nStartX = clamp(nStartX, 0, MAX_HUGE_SECTORS - 1); - nEndX = clamp(nEndX, 0, MAX_HUGE_SECTORS - 1); - nStartY = clamp(nStartY, 0, MAX_HUGE_SECTORS - 1); - nEndY = clamp(nEndY, 0, MAX_HUGE_SECTORS - 1); + nStartX = Clamp(nStartX, 0, MAX_HUGE_SECTORS - 1); + nEndX = Clamp(nEndX, 0, MAX_HUGE_SECTORS - 1); + nStartY = Clamp(nStartY, 0, MAX_HUGE_SECTORS - 1); + nEndY = Clamp(nEndY, 0, MAX_HUGE_SECTORS - 1); for ( int32 x = nStartX; x <= nEndX; x++ ) { @@ -766,8 +767,7 @@ CWaterLevel::RenderWater() if ( fHugeSectorMaxRenderDistSqr > fHugeSectorDistToCamSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecHugeSectorCentre.x, vecHugeSectorCentre.y, 0.0f), SectorRadius(HUGE_SECTOR_SIZE), - &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecHugeSectorCentre.x, vecHugeSectorCentre.y, 0.0f), SectorRadius(HUGE_SECTOR_SIZE)) ) { if ( fHugeSectorDistToCamSqr >= SQR(500.0f) /*fHugeSectorNearDist*/ ) { @@ -808,8 +808,7 @@ CWaterLevel::RenderWater() if ( fLargeSectorDistToCamSqr < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecLargeSectorCentre.x, vecLargeSectorCentre.y, 0.0f), SectorRadius(LARGE_SECTOR_SIZE), //90.879997f, - &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecLargeSectorCentre.x, vecLargeSectorCentre.y, 0.0f), SectorRadius(LARGE_SECTOR_SIZE)) ) //90.879997f, { // Render four small(32x32) sectors, or one large(64x64). @@ -971,8 +970,7 @@ CWaterLevel::RenderWater() if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE), - &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE)) ) { RenderOneFlatExtraHugeWaterPoly( vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2, @@ -1005,8 +1003,7 @@ CWaterLevel::RenderWater() if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE), - &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE)) ) { RenderOneFlatExtraHugeWaterPoly( vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2, @@ -1029,8 +1026,7 @@ CWaterLevel::RenderWater() if ( fCamDistToSector < fHugeSectorMaxRenderDistSqr ) { - if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE), - &TheCamera.GetCameraMatrix()) ) + if ( TheCamera.IsSphereVisible(CVector(vecExtraHugeSectorCentre.x, vecExtraHugeSectorCentre.y, 0.0f), SectorRadius(EXTRAHUGE_SECTOR_SIZE)) ) { RenderOneFlatExtraHugeWaterPoly( vecExtraHugeSectorCentre.x - EXTRAHUGE_SECTOR_SIZE/2, @@ -1093,6 +1089,8 @@ CWaterLevel::RenderWater() } DefinedState(); + + POP_RENDERGROUP(); } void @@ -1435,10 +1433,10 @@ CWaterLevel::CalcDistanceToWater(float fX, float fY) int32 nStartY = WATER_TO_SMALL_SECTOR_Y(fY - fSectorMaxRenderDist) - 1; int32 nEndY = WATER_TO_SMALL_SECTOR_Y(fY + fSectorMaxRenderDist) + 1; - nStartX = clamp(nStartX, 0, MAX_SMALL_SECTORS - 1); - nEndX = clamp(nEndX, 0, MAX_SMALL_SECTORS - 1); - nStartY = clamp(nStartY, 0, MAX_SMALL_SECTORS - 1); - nEndY = clamp(nEndY, 0, MAX_SMALL_SECTORS - 1); + nStartX = Clamp(nStartX, 0, MAX_SMALL_SECTORS - 1); + nEndX = Clamp(nEndX, 0, MAX_SMALL_SECTORS - 1); + nStartY = Clamp(nStartY, 0, MAX_SMALL_SECTORS - 1); + nEndY = Clamp(nEndY, 0, MAX_SMALL_SECTORS - 1); float fDistSqr = 1.0e10f; @@ -1462,7 +1460,7 @@ CWaterLevel::CalcDistanceToWater(float fX, float fY) } } - return clamp(Sqrt(fDistSqr) - 23.0f, 0.0f, fSectorMaxRenderDist); + return Clamp(Sqrt(fDistSqr) - 23.0f, 0.0f, fSectorMaxRenderDist); } void diff --git a/src/render/WaterLevel.h b/src/renderer/WaterLevel.h similarity index 100% rename from src/render/WaterLevel.h rename to src/renderer/WaterLevel.h diff --git a/src/render/Weather.cpp b/src/renderer/Weather.cpp similarity index 99% rename from src/render/Weather.cpp rename to src/renderer/Weather.cpp index 771f85de..e57d57d6 100644 --- a/src/render/Weather.cpp +++ b/src/renderer/Weather.cpp @@ -114,7 +114,7 @@ void CWeather::Init(void) ForcedWeatherType = WEATHER_RANDOM; SoundHandle = DMAudio.CreateEntity(AUDIOTYPE_WEATHER, (void*)1); if (SoundHandle >= 0) - DMAudio.SetEntityStatus(SoundHandle, true); + DMAudio.SetEntityStatus(SoundHandle, TRUE); } void CWeather::Update(void) diff --git a/src/render/Weather.h b/src/renderer/Weather.h similarity index 100% rename from src/render/Weather.h rename to src/renderer/Weather.h diff --git a/src/rw/MemoryMgr.cpp b/src/rw/MemoryMgr.cpp index 2379692c..b9cff043 100644 --- a/src/rw/MemoryMgr.cpp +++ b/src/rw/MemoryMgr.cpp @@ -28,10 +28,10 @@ RwMemoryFunctions memFuncs = { #ifdef USE_CUSTOM_ALLOCATOR // game seems to be using heap directly here, but this is nicer -void *operator new(size_t sz) { return MemoryMgrMalloc(sz); } -void *operator new[](size_t sz) { return MemoryMgrMalloc(sz); } -void operator delete(void *ptr) noexcept { MemoryMgrFree(ptr); } -void operator delete[](void *ptr) noexcept { MemoryMgrFree(ptr); } +void *operator new(size_t sz) throw() { return MemoryMgrMalloc(sz); } +void *operator new[](size_t sz) throw() { return MemoryMgrMalloc(sz); } +void operator delete(void *ptr) throw() { MemoryMgrFree(ptr); } +void operator delete[](void *ptr) throw() { MemoryMgrFree(ptr); } #endif void* diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp index 65e342ed..35593722 100644 --- a/src/rw/RwHelper.cpp +++ b/src/rw/RwHelper.cpp @@ -6,11 +6,13 @@ #include "Timecycle.h" #include "skeleton.h" #include "Debug.h" +#include "MBlur.h" #if !defined(FINAL) || defined(DEBUGMENU) #include "rtcharse.h" #endif #ifndef FINAL RtCharset *debugCharset; +bool bDebugRenderGroups; #endif #ifdef PS2_ALPHA_TEST @@ -113,6 +115,36 @@ SetCullMode(uint32 mode) RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE); } +#ifndef FINAL +void +PushRendergroup(const char *name) +{ + if(!bDebugRenderGroups) + return; +#if defined(RW_OPENGL) + if(GLAD_GL_KHR_debug) + glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, name); +#elif defined(RW_D3D9) + static WCHAR tmp[256]; + MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, name, -1, tmp, sizeof(tmp)); + D3DPERF_BeginEvent(0xFFFFFFFF, tmp); +#endif +} + +void +PopRendergroup(void) +{ + if(!bDebugRenderGroups) + return; +#if defined(RW_OPENGL) + if(GLAD_GL_KHR_debug) + glPopDebugGroup(); +#elif defined(RW_D3D9) + D3DPERF_EndEvent(); +#endif +} +#endif + RwFrame* GetFirstFrameCallback(RwFrame *child, void *data) { @@ -466,6 +498,12 @@ CameraSize(RwCamera * camera, RwRect * rect, raster->width = zRaster->width = rect->w; raster->height = zRaster->height = rect->h; +#endif +#ifdef FIX_BUGS + if(CMBlur::BlurOn){ + CMBlur::MotionBlurClose(); + CMBlur::MotionBlurOpen(camera); + } #endif } diff --git a/src/rw/RwHelper.h b/src/rw/RwHelper.h index 1a5f64b1..0e04aece 100644 --- a/src/rw/RwHelper.h +++ b/src/rw/RwHelper.h @@ -1,5 +1,6 @@ #pragma once +extern bool bDebugRenderGroups; extern bool gPS2alphaTest; void OpenCharsetSafe(); diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 051a6883..e6d4641d 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -155,7 +155,7 @@ CVisibilityPlugins::Initialise(void) m_alphaList.head.item.sort = 0.0f; m_alphaList.tail.item.sort = 100000000.0f; #ifdef ASPECT_RATIO_SCALE - // default 150 if not enough for bigger FOVs + // default 150 is not enough for bigger FOVs m_alphaEntityList.Init(NUMALPHAENTITYLIST * 3); #else m_alphaEntityList.Init(NUMALPHAENTITYLIST); @@ -293,6 +293,7 @@ CVisibilityPlugins::RenderFadingEntities(void) continue; #endif mi = (CSimpleModelInfo *)CModelInfo::GetModelInfo(e->GetModelIndex()); + #ifdef FIX_BUGS if(mi->GetModelType() == MITYPE_SIMPLE && mi->m_noZwrite) #else @@ -302,13 +303,17 @@ CVisibilityPlugins::RenderFadingEntities(void) #ifdef EXTRA_MODEL_FLAGS else if(mi->m_bIsTree) SetAlphaRef(128); + if(!e->IsBuilding() || mi->RenderDoubleSided()) + BACKFACE_CULLING_OFF; #endif if(e->bDistanceFade){ DeActivateDirectional(); SetAmbientColours(); e->bImBeingRendered = true; + PUSH_RENDERGROUP(mi->GetModelName()); RenderFadingAtomic((RpAtomic*)e->m_rwObject, node->item.sort); + POP_RENDERGROUP(); e->bImBeingRendered = false; }else CRenderer::RenderOneNonRoad(e); @@ -316,6 +321,7 @@ CVisibilityPlugins::RenderFadingEntities(void) #ifdef EXTRA_MODEL_FLAGS if(mi->m_bIsTree) SetAlphaRef(2); + BACKFACE_CULLING_ON; #endif #ifdef FIX_BUGS if(mi->GetModelType() == MITYPE_SIMPLE && mi->m_noZwrite) @@ -652,8 +658,7 @@ CVisibilityPlugins::RenderTrainHiDetailAlphaCB(RpAtomic *atomic) return atomic; if(flags & ATOMIC_FLAG_DRAWLAST){ - // sort before clump - if(!InsertAtomicIntoSortedList(atomic, distsq - 0.0001f)) + if(!InsertAtomicIntoSortedList(atomic, distsq)) RENDERCALLBACK(atomic); }else{ if(!InsertAtomicIntoSortedList(atomic, distsq + dot)) @@ -785,16 +790,6 @@ CVisibilityPlugins::DefaultVisibilityCB(RpClump *clump) return true; } -bool -CVisibilityPlugins::MloVisibilityCB(RpClump *clump) -{ - RwFrame *frame = RpClumpGetFrame(clump); - CMloModelInfo *modelInfo = (CMloModelInfo*)GetFrameHierarchyId(frame); - if (sq(modelInfo->field_34) < GetDistanceSquaredFromCamera(frame)) - return false; - return CVisibilityPlugins::FrustumSphereCB(clump); -} - bool CVisibilityPlugins::FrustumSphereCB(RpClump *clump) { @@ -810,12 +805,23 @@ CVisibilityPlugins::FrustumSphereCB(RpClump *clump) return RwCameraFrustumTestSphere(ms_pCamera, &sphere) != rwSPHEREOUTSIDE; } +bool +CVisibilityPlugins::MloVisibilityCB(RpClump *clump) +{ + RwFrame *frame = RpClumpGetFrame(clump); + CMloModelInfo *modelInfo = (CMloModelInfo*)GetFrameHierarchyId(frame); + if (SQR(modelInfo->drawDist) < GetDistanceSquaredFromCamera(frame)) + return false; + return CVisibilityPlugins::FrustumSphereCB(clump); +} + bool CVisibilityPlugins::VehicleVisibilityCB(RpClump *clump) { - if (GetDistanceSquaredFromCamera(RpClumpGetFrame(clump)) <= ms_vehicleLod1Dist) - return FrustumSphereCB(clump); - return false; + RwFrame *frame = RpClumpGetFrame(clump); + if (ms_vehicleLod1Dist < GetDistanceSquaredFromCamera(frame)) + return false; + return FrustumSphereCB(clump); } bool @@ -921,6 +927,12 @@ CVisibilityPlugins::ClearAtomicFlag(RpAtomic *atomic, int f) ATOMICEXT(atomic)->flags &= ~f; } +void +CVisibilityPlugins::SetAtomicId(RpAtomic *atomic, int id) +{ + ATOMICEXT(atomic)->flags = id; +} + int CVisibilityPlugins::GetAtomicId(RpAtomic *atomic) { @@ -1006,7 +1018,9 @@ CVisibilityPlugins::SetClumpModelInfo(RpClump *clump, CClumpModelInfo *modelInfo // Unused switch (modelInfo->GetModelType()) { - // ignore MLO + case MITYPE_MLO: + CLUMPEXT(clump)->visibilityCB = MloVisibilityCB; + break; case MITYPE_VEHICLE: vmi = (CVehicleModelInfo*)modelInfo; if(vmi->m_vehicleType == VEHICLE_TYPE_TRAIN || @@ -1020,6 +1034,12 @@ CVisibilityPlugins::SetClumpModelInfo(RpClump *clump, CClumpModelInfo *modelInfo } } +CClumpModelInfo* +CVisibilityPlugins::GetClumpModelInfo(RpClump *clump) +{ + return (CClumpModelInfo*)GetFrameHierarchyId(RpClumpGetFrame(clump)); +} + void CVisibilityPlugins::SetClumpAlpha(RpClump *clump, int alpha) { @@ -1031,3 +1051,9 @@ CVisibilityPlugins::GetClumpAlpha(RpClump *clump) { return CLUMPEXT(clump)->alpha; } + +bool +CVisibilityPlugins::IsClumpVisible(RpClump *clump) +{ + return CLUMPEXT(clump)->visibilityCB(clump); +} diff --git a/src/rw/VisibilityPlugins.h b/src/rw/VisibilityPlugins.h index f092de5a..f97fd589 100644 --- a/src/rw/VisibilityPlugins.h +++ b/src/rw/VisibilityPlugins.h @@ -94,6 +94,7 @@ public: static CSimpleModelInfo *GetAtomicModelInfo(RpAtomic *atomic); static void SetAtomicFlag(RpAtomic*, int); static void ClearAtomicFlag(RpAtomic*, int); + static void SetAtomicId(RpAtomic *atomic, int); static int GetAtomicId(RpAtomic *atomic); static void SetAtomicRenderCallback(RpAtomic*, RpAtomicCallBackRender); @@ -117,15 +118,16 @@ public: int32 offset, int32 len); static int32 ms_framePluginOffset; - // Not actually used struct ClumpExt { ClumpVisibilityCB visibilityCB; int alpha; }; static void SetClumpModelInfo(RpClump*, CClumpModelInfo*); + static CClumpModelInfo *GetClumpModelInfo(RpClump*); static void SetClumpAlpha(RpClump*, int); static int GetClumpAlpha(RpClump*); + static bool IsClumpVisible(RpClump*); static void *ClumpConstructor(void *object, int32 offset, int32 len); static void *ClumpDestructor(void *object, int32 offset, int32 len); diff --git a/src/save/GenericGameStorage.cpp b/src/save/GenericGameStorage.cpp index a7cafec8..e4ee4542 100644 --- a/src/save/GenericGameStorage.cpp +++ b/src/save/GenericGameStorage.cpp @@ -220,6 +220,11 @@ GenericSave(int file) WriteSaveDataBlock(CStreaming::MemoryCardSave); WriteSaveDataBlock(CPedType::Save); + // sure just write garbage data repeatedly ... +#ifndef THIS_IS_STUPID + memset(work_buff, 0, sizeof(work_buff)); +#endif + // Write padding for (int i = 0; i < 4; i++) { size = align4bytes(SIZE_OF_ONE_GAME_IN_BYTES - totalSize - 4); @@ -487,7 +492,11 @@ GetNameOfSavedGame(int32 slot) bool CheckDataNotCorrupt(int32 slot, char *name) { +#ifdef FIX_BUGS + char filename[MAX_PATH]; +#else char filename[100]; +#endif int32 blocknum = 0; eLevelName level = LEVEL_GENERIC; @@ -591,6 +600,553 @@ align4bytes(int32 size) return (size + 3) & 0xFFFFFFFC; } +#ifdef FIX_INCOMPATIBLE_SAVES +#define LoadSaveDataBlockNoCheck(buf, file, size) \ +do { \ + CFileMgr::Read(file, (const char *)&size, sizeof(size)); \ + size = align4bytes(size); \ + CFileMgr::Read(file, (const char *)work_buff, size); \ + buf = work_buff; \ +} while(0) + +#define WriteSavaDataBlockNoFunc(buf, file, size) \ +do { \ + if (!PcSaveHelper.PcClassSaveRoutine(file, buf, size)) \ + goto fail; \ + totalSize += size; \ +} while(0) + +#define FixSaveDataBlock(fix_func, file, size) \ +do { \ + ReadDataFromBufferPointer(buf, size); \ + memset(work_buff2, 0, sizeof(work_buff2)); \ + buf2 = work_buff2; \ + reserved = 0; \ + MakeSpaceForSizeInBufferPointer(presize, buf2, postsize); \ + fix_func(save_type, buf, buf2, &size); \ + CopySizeAndPreparePointer(presize, buf2, postsize, reserved, size); \ + if (!PcSaveHelper.PcClassSaveRoutine(file, work_buff2, buf2 - work_buff2)) \ + goto fail; \ + totalSize += buf2 - work_buff2; \ +} while(0) + +#define ReadDataFromBufferPointerWithSize(buf, to, size) memcpy(&to, buf, size); buf += align4bytes(size) + +#define ReadBuf(buf, to) memcpy(&to, buf, sizeof(to)); buf += sizeof(to) +#define WriteBuf(buf, from) memcpy(buf, &from, sizeof(from)); buf += sizeof(from) +#define CopyBuf(from, to, size) memcpy(to, from, size); to += (size); from += (size) +#define CopyPtr(from, to) memcpy(to, from, 4); to += 4; from += 8 +#define SkipBuf(buf, size) buf += (size) +#define SkipBoth(from, to, size) to += (size); from += (size) +#define SkipPtr(from, to) to += 4; from += 8 + +// unfortunately we need a 2nd buffer of the same size to store the fixed output ... +static uint8 work_buff2[sizeof(work_buff)]; + +enum +{ + SAVE_TYPE_NONE = 0, + SAVE_TYPE_32_BIT = 1, + SAVE_TYPE_64_BIT = 2, + SAVE_TYPE_MSVC = 4, + SAVE_TYPE_GCC = 8, +}; + +uint8 +GetSaveType(char *savename) +{ + uint8 save_type = SAVE_TYPE_NONE; + int file = CFileMgr::OpenFile(savename, "rb"); + + uint32 size; + CFileMgr::Read(file, (const char *)&size, sizeof(size)); + + uint8 *buf = work_buff; + CFileMgr::Read(file, (const char *)work_buff, size); // simple vars + scripts + + LoadSaveDataBlockNoCheck(buf, file, size); // ped pool + + LoadSaveDataBlockNoCheck(buf, file, size); // garages + ReadDataFromBufferPointer(buf, size); + + // store for later after we know how much data we need to skip + ReadDataFromBufferPointerWithSize(buf, work_buff2, size); + + LoadSaveDataBlockNoCheck(buf, file, size); // vehicle pool + LoadSaveDataBlockNoCheck(buf, file, size); // object pool + LoadSaveDataBlockNoCheck(buf, file, size); // paths + + LoadSaveDataBlockNoCheck(buf, file, size); // cranes + + CFileMgr::CloseFile(file); + + ReadDataFromBufferPointer(buf, size); + + if (size == 1032) + save_type |= SAVE_TYPE_32_BIT; + else if (size == 1160) + save_type |= SAVE_TYPE_64_BIT; + else + assert(0); // this should never happen + + buf = work_buff2; + + buf += 760; // skip everything before the first garage + buf += save_type & SAVE_TYPE_32_BIT ? 28 : 40; // skip first garage up to m_fX1 + + // now the values we want to verify + float fX1, fX2, fY1, fY2, fZ1, fZ2; + + ReadBuf(buf, fX1); + ReadBuf(buf, fX2); + ReadBuf(buf, fY1); + ReadBuf(buf, fY2); + ReadBuf(buf, fZ1); + ReadBuf(buf, fZ2); + + if (fX1 == CRUSHER_GARAGE_X1 && fX2 == CRUSHER_GARAGE_X2 && + fY1 == CRUSHER_GARAGE_Y1 && fY2 == CRUSHER_GARAGE_Y2 && + fZ1 == CRUSHER_GARAGE_Z1 && fZ2 == CRUSHER_GARAGE_Z2) + save_type |= SAVE_TYPE_MSVC; + else + save_type |= SAVE_TYPE_GCC; + + return save_type; +} + +static void +FixGarages(uint8 save_type, uint8 *buf, uint8 *buf2, uint32 *size) +{ + // hardcoded: 5484 + // x86 msvc: 5240 + // x86 gcc: 5040 + // amd64 msvc: 5880 + // amd64 gcc: 5808 + + uint8 *buf_start = buf; + uint8 *buf2_start = buf2; + uint32 read; + uint32 written = 5240; + + if (save_type & SAVE_TYPE_32_BIT && save_type & SAVE_TYPE_GCC) + read = 5040; + else if (save_type & SAVE_TYPE_64_BIT && save_type & SAVE_TYPE_GCC) + read = 5808; + else + read = 5880; + + uint32 ptrsize = save_type & SAVE_TYPE_32_BIT ? 4 : 8; + + CopyBuf(buf, buf2, 4 * 6); + CopyBuf(buf, buf2, 4 * TOTAL_COLLECTCARS_GARAGES); + CopyBuf(buf, buf2, 4); + + if (save_type & SAVE_TYPE_GCC) + { + for (int32 i = 0; i < NUM_GARAGE_STORED_CARS; i++) + { +#define FixStoredCar(buf, buf2) \ +do { \ + CopyBuf(buf, buf2, 4 + sizeof(CVector) + sizeof(CVector)); \ + uint8 nFlags8; \ + ReadBuf(buf, nFlags8); \ + int32 nFlags32 = nFlags8; \ + WriteBuf(buf2, nFlags32); \ + CopyBuf(buf, buf2, 1 * 6); \ + SkipBuf(buf, 1); \ + SkipBuf(buf2, 2); \ +} while(0) + + FixStoredCar(buf, buf2); + FixStoredCar(buf, buf2); + FixStoredCar(buf, buf2); + +#undef FixStoredCar + } + } + else + { + CopyBuf(buf, buf2, sizeof(CStoredCar) * NUM_GARAGE_STORED_CARS); + CopyBuf(buf, buf2, sizeof(CStoredCar) * NUM_GARAGE_STORED_CARS); + CopyBuf(buf, buf2, sizeof(CStoredCar) * NUM_GARAGE_STORED_CARS); + } + + for (int32 i = 0; i < NUM_GARAGES; i++) + { + // skip the last 5 garages in 64bit builds without FIX_GARAGE_SIZE since they weren't actually saved and are unused + if (save_type & SAVE_TYPE_64_BIT && *size == 5484 && i >= NUM_GARAGES - 5) + { + SkipBuf(buf, 160); // sizeof(CGarage) on x64 + SkipBuf(buf2, 140); // sizeof(CGarage) on x86 + } + else + { + CopyBuf(buf, buf2, 1 * 6); + SkipBoth(buf, buf2, 2); + CopyBuf(buf, buf2, 4); + SkipBuf(buf, ptrsize - 4); // write 4 bytes padding if 8 byte pointer, if not, write 0 + SkipBuf(buf, ptrsize * 2); + SkipBuf(buf2, 4 * 2); + CopyBuf(buf, buf2, 1 * 7); + SkipBoth(buf, buf2, 1); + CopyBuf(buf, buf2, 4 * 15 + 1); + SkipBoth(buf, buf2, 3); + SkipBuf(buf, ptrsize * 2); + SkipBuf(buf2, 4 * 2); + + if (save_type & SAVE_TYPE_GCC) + SkipBuf(buf, save_type & SAVE_TYPE_64_BIT ? 36 + 4 : 36); // sizeof(CStoredCar) on gcc 64/32 before fix + else + SkipBuf(buf, sizeof(CStoredCar)); + + SkipBuf(buf2, sizeof(CStoredCar)); + } + } + + *size = 0; + + assert(buf - buf_start == read); + assert(buf2 - buf2_start == written); + +#ifdef FIX_GARAGE_SIZE + *size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CGarages::CarTypesCollected) + sizeof(uint32) + 3 * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage)); +#else + *size = 5484; +#endif +} + +static void +FixCranes(uint8 save_type, uint8 *buf, uint8 *buf2, uint32 *size) +{ + uint8 *buf_start = buf; + uint8 *buf2_start = buf2; + uint32 read = 2 * sizeof(uint32) + 0x480; // sizeof(aCranes) + uint32 written = 2 * sizeof(uint32) + 0x400; // see CRANES_SAVE_SIZE + + CopyBuf(buf, buf2, 4 + 4); + + for (int32 i = 0; i < NUM_CRANES; i++) + { + CopyPtr(buf, buf2); + CopyPtr(buf, buf2); + CopyBuf(buf, buf2, 15 * 4 + sizeof(CVector) * 3 + sizeof(CVector2D)); + CopyPtr(buf, buf2); + CopyBuf(buf, buf2, 4 + 7 * 1); + SkipBuf(buf, 5); + SkipBuf(buf2, 1); + } + + *size = 0; + + assert(buf - buf_start == read); + assert(buf2 - buf2_start == written); + + *size = written; +} + +static void +FixPickups(uint8 save_type, uint8 *buf, uint8 *buf2, uint32 *size) +{ + uint8 *buf_start = buf; + uint8 *buf2_start = buf2; + uint32 read = 0x3480 + sizeof(uint16) + sizeof(uint16) + sizeof(int32) * NUMCOLLECTEDPICKUPS; // sizeof(aPickUps) + uint32 written = 0x24C0 + sizeof(uint16) + sizeof(uint16) + sizeof(int32) * NUMCOLLECTEDPICKUPS; // see PICKUPS_SAVE_SIZE + + for (int32 i = 0; i < NUMPICKUPS; i++) + { + CopyBuf(buf, buf2, 1 + 1 + 2); + SkipBuf(buf, 4); + CopyPtr(buf, buf2); + CopyBuf(buf, buf2, 4 + 2 + 2 + sizeof(CVector)); + SkipBuf(buf, 4); + } + + CopyBuf(buf, buf2, 2); + SkipBoth(buf, buf2, 2); + + CopyBuf(buf, buf2, NUMCOLLECTEDPICKUPS * 4); + + *size = 0; + + assert(buf - buf_start == read); + assert(buf2 - buf2_start == written); + + *size = written; +} + +static void +FixPhoneInfo(uint8 save_type, uint8 *buf, uint8 *buf2, uint32 *size) +{ + uint8 *buf_start = buf; + uint8 *buf2_start = buf2; + uint32 read = 0x1138; // sizeof(CPhoneInfo) + uint32 written = 0xA30; // see PHONEINFO_SAVE_SIZE + + CopyBuf(buf, buf2, 4 + 4); + + for (int32 i = 0; i < NUMPHONES; i++) + { + CopyBuf(buf, buf2, sizeof(CVector)); + SkipBuf(buf, 4); + SkipPtr(buf, buf2); + SkipPtr(buf, buf2); + SkipPtr(buf, buf2); + SkipPtr(buf, buf2); + SkipPtr(buf, buf2); + SkipPtr(buf, buf2); + CopyBuf(buf, buf2, 4); + SkipBuf(buf, 4); + CopyPtr(buf, buf2); + CopyBuf(buf, buf2, 4 + 1); + SkipBoth(buf, buf2, 3); + } + + *size = 0; + + assert(buf - buf_start == read); + assert(buf2 - buf2_start == written); + + *size = written; +} + +static void +FixZones(uint8 save_type, uint8 *buf, uint8 *buf2, uint32 *size) +{ + uint8 *buf_start = buf; + uint8 *buf2_start = buf2; + uint32 read = 11300; // see SaveAllZones + uint32 written = 10100; // see SaveAllZones + + CopyBuf(buf, buf2, 1 * 4); + + SkipBuf(buf, 4); + uint32 hdr_size = 10100 - (1 * 4 + 4); // see SaveAllZones + WriteBuf(buf2, hdr_size); + + CopyBuf(buf, buf2, 4 * 2 + 2); + SkipBoth(buf, buf2, 2); + +#define FixOneZone(buf, buf2) \ +do { \ + CopyBuf(buf, buf2, 8 + 8 * 4 + 2 * 2); \ + SkipBuf(buf, 4); \ + CopyPtr(buf, buf2); \ + CopyPtr(buf, buf2); \ + CopyPtr(buf, buf2); \ +} while(0) + + for (int32 i = 0; i < NUMZONES; i++) + FixOneZone(buf, buf2); + + CopyBuf(buf, buf2, sizeof(CZoneInfo) * NUMZONES * 2); + CopyBuf(buf, buf2, 2 + 2); + + for (int32 i = 0; i < NUMMAPZONES; i++) + FixOneZone(buf, buf2); + + CopyBuf(buf, buf2, 2 * NUMAUDIOZONES); + CopyBuf(buf, buf2, 2 + 2); + +#undef FixOneZone + + *size = 0; + + assert(buf - buf_start == read); + assert(buf2 - buf2_start == written); + + *size = written; +} + +static void +FixParticles(uint8 save_type, uint8 *buf, uint8 *buf2, uint32 *size) +{ + uint8 *buf_start = buf; + uint8 *buf2_start = buf2; + + int32 numObjects; + ReadBuf(buf, numObjects); + WriteBuf(buf2, numObjects); + + uint32 read = 0xA0 * (numObjects + 1) + 4; // sizeof(CParticleObject) + uint32 written = 0x88 * (numObjects + 1) + 4; // see PARTICLE_OBJECT_SIZEOF + + for (int32 i = 0; i < numObjects; i++) + { + // CPlaceable + SkipPtr(buf, buf2); + CopyBuf(buf, buf2, 4 * 4 * 4); + SkipPtr(buf, buf2); + CopyBuf(buf, buf2, 1); + SkipBuf(buf, 7); + SkipBuf(buf2, 3); + + // CParticleObject + SkipPtr(buf, buf2); + SkipPtr(buf, buf2); + SkipPtr(buf, buf2); + CopyBuf(buf, buf2, 4 * 3 + 2 * 1 + 2 * 2); + SkipBoth(buf, buf2, 2); + CopyBuf(buf, buf2, sizeof(CVector) + 2 * 4 + sizeof(CRGBA) + 2 * 1); + SkipBoth(buf, buf2, 2); + } + + SkipBuf(buf, 0xA0); // sizeof(CParticleObject) + SkipBuf(buf2, 0x88); // see PARTICLE_OBJECT_SIZEOF + + *size = 0; + + assert(buf - buf_start == read); + assert(buf2 - buf2_start == written); + + *size = written; +} + +bool +FixSave(int32 slot, uint8 save_type) +{ + if (save_type & SAVE_TYPE_32_BIT && save_type & SAVE_TYPE_MSVC) + return true; + + bool success = false; + + uint8 *buf, *presize, *postsize, *buf2; + uint32 size; + uint32 reserved; + + uint32 totalSize; + + char savename[MAX_PATH]; + char savename_bak[MAX_PATH]; + + sprintf(savename, "%s%i%s", DefaultPCSaveFileName, slot + 1, ".b"); + sprintf(savename_bak, "%s%i%s.%lld.bak", DefaultPCSaveFileName, slot + 1, ".b", time(nil)); + + assert(caserename(savename, savename_bak) == 0); + + int file_in = CFileMgr::OpenFile(savename_bak, "rb"); + int file_out = CFileMgr::OpenFileForWriting(savename); + + CheckSum = 0; + totalSize = 0; + + CFileMgr::Read(file_in, (const char *)&size, sizeof(size)); + size = align4bytes(size); + + buf = work_buff; + CFileMgr::Read(file_in, (const char *)work_buff, size); // simple vars + scripts + + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // ped pool + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // garages + FixSaveDataBlock(FixGarages, file_out, size); // garages need to be fixed in either case + + LoadSaveDataBlockNoCheck(buf, file_in, size); // vehicle pool + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // object pool + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // paths + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // cranes + if (save_type & SAVE_TYPE_64_BIT) + FixSaveDataBlock(FixCranes, file_out, size); + else + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // pickups + if (save_type & SAVE_TYPE_64_BIT) + FixSaveDataBlock(FixPickups, file_out, size); + else + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // phoneinfo + if (save_type & SAVE_TYPE_64_BIT) + FixSaveDataBlock(FixPhoneInfo, file_out, size); + else + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // restart + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // radar blips + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // zones + if (save_type & SAVE_TYPE_64_BIT) + FixSaveDataBlock(FixZones, file_out, size); + else + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // gang data + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // car generators + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // particles + if (save_type & SAVE_TYPE_64_BIT) + FixSaveDataBlock(FixParticles, file_out, size); + else + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // audio script objects + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // player info + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // stats + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // streaming + WriteSavaDataBlockNoFunc(buf, file_out, size); + + LoadSaveDataBlockNoCheck(buf, file_in, size); // ped type + WriteSavaDataBlockNoFunc(buf, file_out, size); + + memset(work_buff, 0, sizeof(work_buff)); + + for (int i = 0; i < 4; i++) { + size = align4bytes(SIZE_OF_ONE_GAME_IN_BYTES - totalSize - 4); + if (size > sizeof(work_buff)) + size = sizeof(work_buff); + if (size > 4) { + if (!PcSaveHelper.PcClassSaveRoutine(file_out, work_buff, size)) + goto fail; + totalSize += size; + } + } + + if (!CFileMgr::Write(file_out, (const char *)&CheckSum, sizeof(CheckSum))) + goto fail; + + success = true; + +fail:; + CFileMgr::CloseFile(file_in); + CFileMgr::CloseFile(file_out); + + return success; +} + +#undef LoadSaveDataBlockNoCheck +#undef WriteSavaDataBlockNoFunc +#undef FixSaveDataBlock +#undef ReadDataFromBufferPointerWithSize +#undef ReadBuf +#undef WriteBuf +#undef CopyBuf +#undef CopyPtr +#undef SkipBuf +#undef SkipBoth +#undef SkipPtr +#endif + #ifdef MISSION_REPLAY void DisplaySaveResult(int unk, char* name) @@ -598,7 +1154,9 @@ void DisplaySaveResult(int unk, char* name) bool SaveGameForPause(int type) { - if (AllowMissionReplay != 0 || type != 3 && WaitForSave > CTimer::GetTimeInMilliseconds()) + if (AllowMissionReplay != MISSION_RETRY_STAGE_NORMAL) + return false; + if (type != SAVE_TYPE_QUICKSAVE_FOR_MISSION_REPLAY && WaitForSave > CTimer::GetTimeInMilliseconds()) return false; WaitForSave = 0; if (gGameState != GS_PLAYING_GAME || CTheScripts::IsPlayerOnAMission() || CStats::LastMissionPassedName[0] == '\0') { diff --git a/src/save/GenericGameStorage.h b/src/save/GenericGameStorage.h index 069ba7cd..6a5b04fa 100644 --- a/src/save/GenericGameStorage.h +++ b/src/save/GenericGameStorage.h @@ -22,6 +22,11 @@ bool CheckDataNotCorrupt(int32 slot, char *name); bool RestoreForStartLoad(); int align4bytes(int32 size); +#ifdef FIX_INCOMPATIBLE_SAVES +uint8 GetSaveType(char *savename); +bool FixSave(int32 slot, uint8 save_type); +#endif + extern class CDate CompileDateAndTime; extern char DefaultPCSaveFileName[260]; @@ -47,4 +52,12 @@ const char TopLineEmptyFile[] = "THIS FILE IS NOT VALID YET"; extern int8 IsQuickSave; // originally int bool SaveGameForPause(int); + +enum { + SAVE_TYPE_NORMAL, + SAVE_TYPE_QUICKSAVE, + SAVE_TYPE_2, + SAVE_TYPE_QUICKSAVE_FOR_MISSION_REPLAY +}; + #endif diff --git a/src/save/PCSave.cpp b/src/save/PCSave.cpp index d8ede0d3..0c228a6d 100644 --- a/src/save/PCSave.cpp +++ b/src/save/PCSave.cpp @@ -25,7 +25,11 @@ C_PcSave::SetSaveDirectory(const char *path) bool C_PcSave::DeleteSlot(int32 slot) { +#ifdef FIX_BUGS + char FileName[MAX_PATH]; +#else char FileName[200]; +#endif PcSaveHelper.nErrorCode = SAVESTATUS_SUCCESSFUL; sprintf(FileName, "%s%i.b", DefaultPCSaveFileName, slot + 1); @@ -118,6 +122,13 @@ C_PcSave::PopulateSlotInfo() } if (Slots[i + 1] == SLOT_OK) { if (CheckDataNotCorrupt(i, savename)) { +#ifdef FIX_INCOMPATIBLE_SAVES + if (!FixSave(i, GetSaveType(savename))) { + CMessages::InsertNumberInString(TheText.Get("FEC_SLC"), i + 1, -1, -1, -1, -1, -1, SlotFileName[i]); + Slots[i + 1] = SLOT_CORRUPTED; + continue; + } +#endif SYSTEMTIME st; memcpy(&st, &header.SaveDateTime, sizeof(SYSTEMTIME)); const char *month; diff --git a/src/save/PCSave.h b/src/save/PCSave.h index 4a2d9a66..83471b5d 100644 --- a/src/save/PCSave.h +++ b/src/save/PCSave.h @@ -33,7 +33,7 @@ public: void PopulateSlotInfo(); bool DeleteSlot(int32 slot); bool SaveSlot(int32 slot); - bool PcClassSaveRoutine(int32 a2, uint8 *data, uint32 size); + bool PcClassSaveRoutine(int32 file, uint8 *data, uint32 size); static void SetSaveDirectory(const char *path); }; diff --git a/src/save/SaveBuf.h b/src/save/SaveBuf.h new file mode 100644 index 00000000..aad2e1a8 --- /dev/null +++ b/src/save/SaveBuf.h @@ -0,0 +1,73 @@ +#pragma once + +#ifdef VALIDATE_SAVE_SIZE +extern int32 _saveBufCount; +#define INITSAVEBUF _saveBufCount = 0; +#define VALIDATESAVEBUF(b) assert(_saveBufCount == b); +#else +#define INITSAVEBUF +#define VALIDATESAVEBUF(b) +#endif + +inline void +SkipSaveBuf(uint8 *&buf, int32 skip) +{ + buf += skip; +#ifdef VALIDATE_SAVE_SIZE + _saveBufCount += skip; +#endif +} + +template +inline void +ReadSaveBuf(T* out, uint8 *&buf) +{ + *out = *(T *)buf; + SkipSaveBuf(buf, sizeof(T)); +} + +template +inline T * +WriteSaveBuf(uint8 *&buf, const T &value) +{ + T *p = (T *)buf; + *p = value; + SkipSaveBuf(buf, sizeof(T)); + return p; +} + +#ifdef COMPATIBLE_SAVES +inline void +ZeroSaveBuf(uint8 *&buf, uint32 length) +{ + memset(buf, 0, length); + SkipSaveBuf(buf, length); +} +#endif + +#define SAVE_HEADER_SIZE (4 * sizeof(char) + sizeof(uint32)) + +#define WriteSaveHeader(buf, a, b, c, d, size) \ + WriteSaveBuf(buf, a); \ + WriteSaveBuf(buf, b); \ + WriteSaveBuf(buf, c); \ + WriteSaveBuf(buf, d); \ + WriteSaveBuf(buf, (uint32)(size)); + +#ifdef VALIDATE_SAVE_SIZE +#define CheckSaveHeader(buf, a, b, c, d, size) do { \ + char _c; uint32 _size;\ + ReadSaveBuf(&_c, buf);\ + assert(_c == a);\ + ReadSaveBuf(&_c, buf);\ + assert(_c == b);\ + ReadSaveBuf(&_c, buf);\ + assert(_c == c);\ + ReadSaveBuf(&_c, buf);\ + assert(_c == d);\ + ReadSaveBuf(&_size, buf);\ + assert(_size == size);\ + } while(0) +#else +#define CheckSaveHeader(buf, a, b, c, d, size) SkipSaveBuf(buf, 8); +#endif \ No newline at end of file diff --git a/src/skel/crossplatform.cpp b/src/skel/crossplatform.cpp index 0633c0d5..69d3cd2b 100644 --- a/src/skel/crossplatform.cpp +++ b/src/skel/crossplatform.cpp @@ -172,6 +172,29 @@ FILE* _fcaseopen(char const* filename, char const* mode) return result; } +int _caserename(const char *old_filename, const char *new_filename) +{ + int result; + char *real_old = casepath(old_filename); + char *real_new = casepath(new_filename); + + // hack so we don't even try to rename it to new_filename if it already exists + if (!real_new) { + free(real_old); + return -1; + } + + if (!real_old) + result = rename(old_filename, real_new); + else + result = rename(real_old, real_new); + + free(real_old); + free(real_new); + + return result; +} + // Case-insensitivity on linux (from https://github.com/OneSadCookie/fcaseopen) // Returned string should freed manually (if exists) char* casepath(char const* path, bool checkPathFirst) @@ -198,6 +221,20 @@ char* casepath(char const* path, bool checkPathFirst) size_t rl = 0; DIR* d; + char* c; + + #if defined(__SWITCH__) || defined(PSP2) + if( (c = strstr(p, ":/")) != NULL) // scheme used by some environments, eg. switch, vita + { + size_t deviceNameOffset = c - p + 3; + char* deviceNamePath = (char*)alloca(deviceNameOffset + 1); + strlcpy(deviceNamePath, p, deviceNameOffset); + deviceNamePath[deviceNameOffset] = 0; + d = opendir(deviceNamePath); + p = c + 1; + } + else + #endif if (p[0] == '/' || p[0] == '\\') { #ifdef __WIIU__ @@ -228,7 +265,7 @@ char* casepath(char const* path, bool checkPathFirst) bool cantProceed = false; // just convert slashes in what's left in string, don't correct case of letters(because we can't) bool mayBeTrailingSlash = false; - char* c; + while (c = strsep(&p, "/\\")) { // May be trailing slash(allow), slash at the start(avoid), or multiple slashes(avoid) @@ -295,3 +332,133 @@ char* casepath(char const* path, bool checkPathFirst) return out; } #endif + +#ifdef __SWITCH__ +/* Taken from glibc */ +char *realpath(const char *name, char *resolved) +{ + char *rpath, *dest = NULL; + const char *start, *end, *rpath_limit; + long int path_max; + + /* As per Single Unix Specification V2 we must return an error if + either parameter is a null pointer. We extend this to allow + the RESOLVED parameter to be NULL in case the we are expected to + allocate the room for the return value. */ + if (!name) + return NULL; + + /* As per Single Unix Specification V2 we must return an error if + the name argument points to an empty string. */ + if (name[0] == '\0') + return NULL; + +#ifdef PATH_MAX + path_max = PATH_MAX; +#else + path_max = pathconf(name, _PC_PATH_MAX); + if (path_max <= 0) + path_max = 1024; +#endif + + if (!resolved) + { + rpath = (char*)malloc(path_max); + if (!rpath) + return NULL; + } + else + rpath = resolved; + rpath_limit = rpath + path_max; + + if (name[0] != '/') + { + if (!getcwd(rpath, path_max)) + { + rpath[0] = '\0'; + goto error; + } + dest = (char*)memchr(rpath, '\0', path_max); + } + else + { + rpath[0] = '/'; + dest = rpath + 1; + } + + for (start = end = name; *start; start = end) + { + /* Skip sequence of multiple path-separators. */ + while (*start == '/') + ++start; + + /* Find end of path component. */ + for (end = start; *end && *end != '/'; ++end) + /* Nothing. */; + + if (end - start == 0) + break; + else if (end - start == 1 && start[0] == '.') + /* nothing */; + else if (end - start == 2 && start[0] == '.' && start[1] == '.') + { + /* Back up to previous component, ignore if at root already. */ + if (dest > rpath + 1) + while ((--dest)[-1] != '/') + ; + } + else + { + size_t new_size; + + if (dest[-1] != '/') + *dest++ = '/'; + + if (dest + (end - start) >= rpath_limit) + { + ptrdiff_t dest_offset = dest - rpath; + char *new_rpath; + + if (resolved) + { + if (dest > rpath + 1) + dest--; + *dest = '\0'; + goto error; + } + new_size = rpath_limit - rpath; + if (end - start + 1 > path_max) + new_size += end - start + 1; + else + new_size += path_max; + new_rpath = (char *)realloc(rpath, new_size); + if (!new_rpath) + goto error; + rpath = new_rpath; + rpath_limit = rpath + new_size; + + dest = rpath + dest_offset; + } + + dest = (char*)memcpy(dest, start, end - start); + *dest = '\0'; + } + } + if (dest > rpath + 1 && dest[-1] == '/') + --dest; + *dest = '\0'; + + return rpath; + +error: + if (!resolved) + free(rpath); + return NULL; +} + +ssize_t readlink (const char * __path, char * __buf, size_t __buflen) +{ + errno = ENOSYS; + return -1; +} +#endif diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index 05e93726..2da26777 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -1,4 +1,5 @@ #include +#include // This is the common include for platform/renderer specific skeletons(glfw.cpp, win.cpp etc.) and using cross platform things (like Windows directories wrapper, platform specific global arrays etc.) // Functions that's different on glfw and win but have same signature, should be located on platform.h. @@ -28,6 +29,7 @@ enum eWinVersion #endif extern DWORD _dwOperatingSystemVersion; #define fcaseopen fopen +#define caserename rename #else #ifdef __WIIU__ #include "wiiu.h" @@ -54,6 +56,8 @@ extern long _dwOperatingSystemVersion; char *casepath(char const *path, bool checkPathFirst = true); FILE *_fcaseopen(char const *filename, char const *mode); #define fcaseopen _fcaseopen +int _caserename(const char *old_filename, const char *new_filename); +#define caserename _caserename #endif #ifdef RW_GL3 @@ -75,7 +79,7 @@ void CapturePad(RwInt32 padID); void joysChangeCB(int jid, int event); #endif -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU extern char gSelectedJoystickName[128]; #endif @@ -136,13 +140,18 @@ void GetLocalTime_CP(SYSTEMTIME* out); typedef void* HANDLE; #define INVALID_HANDLE_VALUE NULL -#define FindClose(h) closedir((DIR*)h) +#define FindClose(h) \ + do { \ + if (h != nil) \ + closedir((DIR*)h); \ + } while(0) + #define LOCALE_USER_DEFAULT 0 #define DATE_SHORTDATE 0 struct WIN32_FIND_DATA { char extension[32]; // for searching - char folder[32]; // for searching + char folder[MAX_PATH]; // for searching char cFileName[256]; // because tSkinInfo has it 256 time_t ftLastWriteTime; }; @@ -152,3 +161,28 @@ bool FindNextFile(HANDLE, WIN32_FIND_DATA*); void FileTimeToSystemTime(time_t*, SYSTEMTIME*); void GetDateFormat(int, int, SYSTEMTIME*, int, char*, int); #endif + +#ifdef __SWITCH__ + +// tweak glfw values for switch to match expected pc bindings +#ifdef GLFW_GAMEPAD_BUTTON_A + #undef GLFW_GAMEPAD_BUTTON_A +#endif +#define GLFW_GAMEPAD_BUTTON_A 1 + +#ifdef GLFW_GAMEPAD_BUTTON_B + #undef GLFW_GAMEPAD_BUTTON_B +#endif +#define GLFW_GAMEPAD_BUTTON_B 0 + +#ifdef GLFW_GAMEPAD_BUTTON_X + #undef GLFW_GAMEPAD_BUTTON_X +#endif +#define GLFW_GAMEPAD_BUTTON_X 3 + +#ifdef GLFW_GAMEPAD_BUTTON_Y + #undef GLFW_GAMEPAD_BUTTON_Y +#endif +#define GLFW_GAMEPAD_BUTTON_Y 2 + +#endif diff --git a/src/skel/events.cpp b/src/skel/events.cpp index 3e1e95b3..87447819 100644 --- a/src/skel/events.cpp +++ b/src/skel/events.cpp @@ -821,7 +821,9 @@ PadHandler(RsEvent event, void *param) RwBool AttachInputDevices(void) { +#ifndef IGNORE_MOUSE_KEYBOARD RsInputDeviceAttach(rsKEYBOARD, KeyboardHandler); +#endif RsInputDeviceAttach(rsPAD, PadHandler); diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 9643c63b..92a5a93f 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -12,12 +12,14 @@ DWORD _dwOperatingSystemVersion; #include "resource.h" #else long _dwOperatingSystemVersion; +#ifndef __SWITCH__ #ifndef __APPLE__ #include #else #include #include #endif +#endif #include #include #include @@ -50,12 +52,26 @@ long _dwOperatingSystemVersion; #include "Font.h" #include "MemoryMgr.h" -#define MAX_SUBSYSTEMS (16) +// This is defined on project-level, via premake5 or cmake +#ifdef GET_KEYBOARD_INPUT_FROM_X11 +#include +#include +#define GLFW_EXPOSE_NATIVE_X11 +#include +#endif +#ifdef _WIN32 +#define GLFW_EXPOSE_NATIVE_WIN32 +#include +#endif + +#define MAX_SUBSYSTEMS (16) rw::EngineOpenParams openParams; static RwBool ForegroundApp = TRUE; +static RwBool WindowIconified = FALSE; +static RwBool WindowFocused = TRUE; static RwBool RwInitialised = FALSE; @@ -81,7 +97,7 @@ static psGlobalType PsGlobal; size_t _dwMemAvailPhys; RwUInt32 gGameState; -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU char gSelectedJoystickName[128] = ""; #endif @@ -204,6 +220,7 @@ psGrabScreen(RwCamera *pCamera) } #else rw::Image *image = RwCameraGetRaster(pCamera)->toImage(); + image->removeMask(); if(image) return image; #endif @@ -305,6 +322,78 @@ psNativeTextureSupport(void) #define CMDSTR LPSTR #endif +/* + ***************************************************************************** + */ + +#ifdef __SWITCH__ + +static HidVibrationValue SwitchVibrationValues[2]; +static HidVibrationDeviceHandle SwitchVibrationDeviceHandles[2][2]; +static HidVibrationDeviceHandle SwitchVibrationDeviceGC; + +static PadState SwitchPad; + +static Result HidInitializationResult[2]; +static Result HidInitializationGCResult; + +static void _psInitializeVibration() +{ + HidInitializationResult[0] = hidInitializeVibrationDevices(SwitchVibrationDeviceHandles[0], 2, HidNpadIdType_Handheld, HidNpadStyleTag_NpadHandheld); + if(R_FAILED(HidInitializationResult[0])) { + printf("Failed to initialize VibrationDevice for Handheld Mode\n"); + } + HidInitializationResult[1] = hidInitializeVibrationDevices(SwitchVibrationDeviceHandles[1], 2, HidNpadIdType_No1, HidNpadStyleSet_NpadFullCtrl); + if(R_FAILED(HidInitializationResult[1])) { + printf("Failed to initialize VibrationDevice for Detached Mode\n"); + } + HidInitializationGCResult = hidInitializeVibrationDevices(&SwitchVibrationDeviceGC, 1, HidNpadIdType_No1, HidNpadStyleTag_NpadGc); + if(R_FAILED(HidInitializationResult[1])) { + printf("Failed to initialize VibrationDevice for GC Mode\n"); + } + + SwitchVibrationValues[0].freq_low = 160.0f; + SwitchVibrationValues[0].freq_high = 320.0f; + + padConfigureInput(1, HidNpadStyleSet_NpadFullCtrl); + padInitializeDefault(&SwitchPad); +} + +static void _psHandleVibration() +{ + padUpdate(&SwitchPad); + + uint8 target_device = padIsHandheld(&SwitchPad) ? 0 : 1; + + if(R_SUCCEEDED(HidInitializationResult[target_device])) { + CPad* pad = CPad::GetPad(0); + + // value conversion based on SDL2 switch port + SwitchVibrationValues[0].amp_high = SwitchVibrationValues[0].amp_low = pad->ShakeFreq == 0 ? 0.0f : 320.0f; + SwitchVibrationValues[0].freq_low = pad->ShakeFreq == 0.0 ? 160.0f : (float)pad->ShakeFreq * 1.26f; + SwitchVibrationValues[0].freq_high = pad->ShakeFreq == 0.0 ? 320.0f : (float)pad->ShakeFreq * 1.26f; + + if (pad->ShakeDur < CTimer::GetTimeStepInMilliseconds()) + pad->ShakeDur = 0; + else + pad->ShakeDur -= CTimer::GetTimeStepInMilliseconds(); + if (pad->ShakeDur == 0) pad->ShakeFreq = 0; + + + if(target_device == 1 && R_SUCCEEDED(HidInitializationGCResult)) { + // gamecube rumble + hidSendVibrationGcErmCommand(SwitchVibrationDeviceGC, pad->ShakeFreq > 0 ? HidVibrationGcErmCommand_Start : HidVibrationGcErmCommand_Stop); + } + + memcpy(&SwitchVibrationValues[1], &SwitchVibrationValues[0], sizeof(HidVibrationValue)); + hidSendVibrationValues(SwitchVibrationDeviceHandles[target_device], SwitchVibrationValues, 2); + } +} +#else +static void _psInitializeVibration() {} +static void _psHandleVibration() {} +#endif + /* ***************************************************************************** */ @@ -316,7 +405,9 @@ psInitialize(void) RsGlobal.ps = &PsGlobal; PsGlobal.fullScreen = FALSE; - PsGlobal.cursorIsInWindow = TRUE; + PsGlobal.cursorIsInWindow = FALSE; + WindowFocused = TRUE; + WindowIconified = FALSE; PsGlobal.joy1id = -1; PsGlobal.joy2id = -1; @@ -386,6 +477,8 @@ psInitialize(void) #endif #endif + + _psInitializeVibration(); gGameState = GS_START_UP; TRACE("gGameState = GS_START_UP"); @@ -463,6 +556,9 @@ psInitialize(void) _dwMemAvailPhys = (uint64_t)(vm_stat.free_count * page_size); debug("Physical memory size %llu\n", _dwMemAvailPhys); debug("Available physical memory %llu\n", size); +#elif defined (__SWITCH__) + svcGetInfo(&_dwMemAvailPhys, InfoType_UsedMemorySize, CUR_PROCESS_HANDLE, 0); + debug("Physical memory size %llu\n", _dwMemAvailPhys); #else struct sysinfo systemInfo; sysinfo(&systemInfo); @@ -832,16 +928,20 @@ psSelectDevice() return TRUE; } +#ifndef GET_KEYBOARD_INPUT_FROM_X11 void keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods); +#endif void resizeCB(GLFWwindow* window, int width, int height); void scrollCB(GLFWwindow* window, double xoffset, double yoffset); void cursorCB(GLFWwindow* window, double xpos, double ypos); void cursorEnterCB(GLFWwindow* window, int entered); +void windowFocusCB(GLFWwindow* window, int focused); +void windowIconifyCB(GLFWwindow* window, int iconified); void joysChangeCB(int jid, int event); bool IsThisJoystickBlacklisted(int i) { -#ifndef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifndef DETECT_JOYSTICK_MENU return false; #else if (glfwJoystickIsGamepad(i)) @@ -906,7 +1006,7 @@ void _InputInitialiseJoys() if (PSGLOBAL(joy1id) != -1) { int count; glfwGetJoystickButtons(PSGLOBAL(joy1id), &count); -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU strcpy(gSelectedJoystickName, glfwGetJoystickName(PSGLOBAL(joy1id))); #endif ControlsManager.InitDefaultControlConfigJoyPad(count); @@ -924,11 +1024,17 @@ void psPostRWinit(void) RwVideoMode vm; RwEngineGetVideoModeInfo(&vm, GcurSelVM); - glfwSetKeyCallback(PSGLOBAL(window), keypressCB); glfwSetFramebufferSizeCallback(PSGLOBAL(window), resizeCB); +#ifndef IGNORE_MOUSE_KEYBOARD +#ifndef GET_KEYBOARD_INPUT_FROM_X11 + glfwSetKeyCallback(PSGLOBAL(window), keypressCB); +#endif glfwSetScrollCallback(PSGLOBAL(window), scrollCB); glfwSetCursorPosCallback(PSGLOBAL(window), cursorCB); glfwSetCursorEnterCallback(PSGLOBAL(window), cursorEnterCB); +#endif + glfwSetWindowIconifyCallback(PSGLOBAL(window), windowIconifyCB); + glfwSetWindowFocusCallback(PSGLOBAL(window), windowFocusCB); glfwSetJoystickCallback(joysChangeCB); _InputInitialiseJoys(); @@ -1280,6 +1386,10 @@ void scrollCB(GLFWwindow* window, double xoffset, double yoffset) { PSGLOBAL(mouseWheel) = yoffset; } +bool lshiftStatus = false; +bool rshiftStatus = false; + +#ifndef GET_KEYBOARD_INPUT_FROM_X11 int keymap[GLFW_KEY_LAST + 1]; static void @@ -1410,9 +1520,6 @@ initkeymap(void) keymap[GLFW_KEY_MENU] = rsNULL; } -bool lshiftStatus = false; -bool rshiftStatus = false; - void keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods) { @@ -1430,6 +1537,266 @@ keypressCB(GLFWwindow* window, int key, int scancode, int action, int mods) } } +#else + +uint32 keymap[512]; // 256 ascii + 256 KeySyms between 0xff00 - 0xffff +bool keyStates[512]; +uint32 keyCodeToKeymapIndex[256]; // cache for physical keys + +#define KEY_MAP_OFFSET (0xff00 - 256) +static void +initkeymap(void) +{ + Display *display = glfwGetX11Display(); + int i; + + for (i = 0; i < ARRAY_SIZE(keymap); i++) + keymap[i] = rsNULL; + + // You can add new ASCII mappings to here freely (but beware that if right hand side of assignment isn't supported on CFont, it'll be blank/won't work on binding screen) + // Right hand side of assigments should always be uppercase counterpart of character + keymap[XK_space] = ' '; + keymap[XK_apostrophe] = '\''; + keymap[XK_ampersand] = '&'; + keymap[XK_percent] = '%'; + keymap[XK_dollar] = '$'; + keymap[XK_comma] = ','; + keymap[XK_minus] = '-'; + keymap[XK_period] = '.'; + keymap[XK_slash] = '/'; + keymap[XK_question] = '?'; + keymap[XK_exclam] = '!'; + keymap[XK_quotedbl] = '"'; + keymap[XK_colon] = ':'; + keymap[XK_semicolon] = ';'; + keymap[XK_equal] = '='; + keymap[XK_bracketleft] = '['; + keymap[XK_backslash] = '\\'; + keymap[XK_bracketright] = ']'; + keymap[XK_grave] = '`'; + keymap[XK_0] = '0'; + keymap[XK_1] = '1'; + keymap[XK_2] = '2'; + keymap[XK_3] = '3'; + keymap[XK_4] = '4'; + keymap[XK_5] = '5'; + keymap[XK_6] = '6'; + keymap[XK_7] = '7'; + keymap[XK_8] = '8'; + keymap[XK_9] = '9'; + keymap[XK_a] = 'A'; + keymap[XK_b] = 'B'; + keymap[XK_c] = 'C'; + keymap[XK_d] = 'D'; + keymap[XK_e] = 'E'; + keymap[XK_f] = 'F'; + keymap[XK_g] = 'G'; + keymap[XK_h] = 'H'; + keymap[XK_i] = 'I'; + keymap[XK_I] = 'I'; // Turkish I problem + keymap[XK_j] = 'J'; + keymap[XK_k] = 'K'; + keymap[XK_l] = 'L'; + keymap[XK_m] = 'M'; + keymap[XK_n] = 'N'; + keymap[XK_o] = 'O'; + keymap[XK_p] = 'P'; + keymap[XK_q] = 'Q'; + keymap[XK_r] = 'R'; + keymap[XK_s] = 'S'; + keymap[XK_t] = 'T'; + keymap[XK_u] = 'U'; + keymap[XK_v] = 'V'; + keymap[XK_w] = 'W'; + keymap[XK_x] = 'X'; + keymap[XK_y] = 'Y'; + keymap[XK_z] = 'Z'; + + // Some of regional but ASCII characters that GTA supports + keymap[XK_agrave] = 0x00c0; + keymap[XK_aacute] = 0x00c1; + keymap[XK_acircumflex] = 0x00c2; + keymap[XK_adiaeresis] = 0x00c4; + + keymap[XK_ae] = 0x00c6; + + keymap[XK_egrave] = 0x00c8; + keymap[XK_eacute] = 0x00c9; + keymap[XK_ecircumflex] = 0x00ca; + keymap[XK_ediaeresis] = 0x00cb; + + keymap[XK_igrave] = 0x00cc; + keymap[XK_iacute] = 0x00cd; + keymap[XK_icircumflex] = 0x00ce; + keymap[XK_idiaeresis] = 0x00cf; + + keymap[XK_ccedilla] = 0x00c7; + keymap[XK_odiaeresis] = 0x00d6; + keymap[XK_udiaeresis] = 0x00dc; + + // These are 0xff00 - 0xffff range of KeySym's, and subtracting KEY_MAP_OFFSET is needed + keymap[XK_Escape - KEY_MAP_OFFSET] = rsESC; + keymap[XK_Return - KEY_MAP_OFFSET] = rsENTER; + keymap[XK_Tab - KEY_MAP_OFFSET] = rsTAB; + keymap[XK_BackSpace - KEY_MAP_OFFSET] = rsBACKSP; + keymap[XK_Insert - KEY_MAP_OFFSET] = rsINS; + keymap[XK_Delete - KEY_MAP_OFFSET] = rsDEL; + keymap[XK_Right - KEY_MAP_OFFSET] = rsRIGHT; + keymap[XK_Left - KEY_MAP_OFFSET] = rsLEFT; + keymap[XK_Down - KEY_MAP_OFFSET] = rsDOWN; + keymap[XK_Up - KEY_MAP_OFFSET] = rsUP; + keymap[XK_Page_Up - KEY_MAP_OFFSET] = rsPGUP; + keymap[XK_Page_Down - KEY_MAP_OFFSET] = rsPGDN; + keymap[XK_Home - KEY_MAP_OFFSET] = rsHOME; + keymap[XK_End - KEY_MAP_OFFSET] = rsEND; + keymap[XK_Caps_Lock - KEY_MAP_OFFSET] = rsCAPSLK; + keymap[XK_Scroll_Lock - KEY_MAP_OFFSET] = rsSCROLL; + keymap[XK_Num_Lock - KEY_MAP_OFFSET] = rsNUMLOCK; + keymap[XK_Pause - KEY_MAP_OFFSET] = rsPAUSE; + + keymap[XK_F1 - KEY_MAP_OFFSET] = rsF1; + keymap[XK_F2 - KEY_MAP_OFFSET] = rsF2; + keymap[XK_F3 - KEY_MAP_OFFSET] = rsF3; + keymap[XK_F4 - KEY_MAP_OFFSET] = rsF4; + keymap[XK_F5 - KEY_MAP_OFFSET] = rsF5; + keymap[XK_F6 - KEY_MAP_OFFSET] = rsF6; + keymap[XK_F7 - KEY_MAP_OFFSET] = rsF7; + keymap[XK_F8 - KEY_MAP_OFFSET] = rsF8; + keymap[XK_F9 - KEY_MAP_OFFSET] = rsF9; + keymap[XK_F10 - KEY_MAP_OFFSET] = rsF10; + keymap[XK_F11 - KEY_MAP_OFFSET] = rsF11; + keymap[XK_F12 - KEY_MAP_OFFSET] = rsF12; + keymap[XK_F13 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F14 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F15 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F16 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F17 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F18 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F19 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F20 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F21 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F22 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F23 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F24 - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_F25 - KEY_MAP_OFFSET] = rsNULL; + + keymap[XK_KP_0 - KEY_MAP_OFFSET] = rsPADINS; + keymap[XK_KP_1 - KEY_MAP_OFFSET] = rsPADEND; + keymap[XK_KP_2 - KEY_MAP_OFFSET] = rsPADDOWN; + keymap[XK_KP_3 - KEY_MAP_OFFSET] = rsPADPGDN; + keymap[XK_KP_4 - KEY_MAP_OFFSET] = rsPADLEFT; + keymap[XK_KP_5 - KEY_MAP_OFFSET] = rsPAD5; + keymap[XK_KP_6 - KEY_MAP_OFFSET] = rsPADRIGHT; + keymap[XK_KP_7 - KEY_MAP_OFFSET] = rsPADHOME; + keymap[XK_KP_8 - KEY_MAP_OFFSET] = rsPADUP; + keymap[XK_KP_9 - KEY_MAP_OFFSET] = rsPADPGUP; + keymap[XK_KP_Insert - KEY_MAP_OFFSET] = rsPADINS; + keymap[XK_KP_End - KEY_MAP_OFFSET] = rsPADEND; + keymap[XK_KP_Down - KEY_MAP_OFFSET] = rsPADDOWN; + keymap[XK_KP_Page_Down - KEY_MAP_OFFSET] = rsPADPGDN; + keymap[XK_KP_Left - KEY_MAP_OFFSET] = rsPADLEFT; + keymap[XK_KP_Begin - KEY_MAP_OFFSET] = rsPAD5; + keymap[XK_KP_Right - KEY_MAP_OFFSET] = rsPADRIGHT; + keymap[XK_KP_Home - KEY_MAP_OFFSET] = rsPADHOME; + keymap[XK_KP_Up - KEY_MAP_OFFSET] = rsPADUP; + keymap[XK_KP_Page_Up - KEY_MAP_OFFSET] = rsPADPGUP; + + keymap[XK_KP_Decimal - KEY_MAP_OFFSET] = rsPADDEL; + keymap[XK_KP_Divide - KEY_MAP_OFFSET] = rsDIVIDE; + keymap[XK_KP_Multiply - KEY_MAP_OFFSET] = rsTIMES; + keymap[XK_KP_Subtract - KEY_MAP_OFFSET] = rsMINUS; + keymap[XK_KP_Add - KEY_MAP_OFFSET] = rsPLUS; + keymap[XK_KP_Enter - KEY_MAP_OFFSET] = rsPADENTER; + keymap[XK_KP_Equal - KEY_MAP_OFFSET] = rsNULL; + keymap[XK_Shift_L - KEY_MAP_OFFSET] = rsLSHIFT; + keymap[XK_Control_L - KEY_MAP_OFFSET] = rsLCTRL; + keymap[XK_Alt_L - KEY_MAP_OFFSET] = rsLALT; + keymap[XK_Super_L - KEY_MAP_OFFSET] = rsLWIN; + keymap[XK_Shift_R - KEY_MAP_OFFSET] = rsRSHIFT; + keymap[XK_Control_R - KEY_MAP_OFFSET] = rsRCTRL; + keymap[XK_Alt_R - KEY_MAP_OFFSET] = rsRALT; + keymap[XK_Super_R - KEY_MAP_OFFSET] = rsRWIN; + keymap[XK_Menu - KEY_MAP_OFFSET] = rsNULL; + + // Cache the key codes' key symbol equivelants, otherwise we will have to do it on each frame + // KeyCode is always in [0,255], and represents a physical key + + int min_keycode, max_keycode, keysyms_per_keycode; + KeySym *keymap, *origkeymap; + + char *keyboardLang = setlocale (LC_CTYPE, NULL); + setlocale(LC_CTYPE, ""); + + XDisplayKeycodes(display, &min_keycode, &max_keycode); + origkeymap = XGetKeyboardMapping(display, min_keycode, (max_keycode - min_keycode + 1), &keysyms_per_keycode); + keymap = origkeymap; + for (int i = min_keycode; i <= max_keycode; i++) { + int j, lastKeysym; + + lastKeysym = keysyms_per_keycode - 1; + while ((lastKeysym >= 0) && (keymap[lastKeysym] == NoSymbol)) + lastKeysym--; + + for (j = 0; j <= lastKeysym; j++) { + KeySym ks = keymap[j]; + + if (ks == NoSymbol) + continue; + + if (ks < 256) { + keyCodeToKeymapIndex[i] = ks; + break; + } else if (ks >= 0xff00 && ks < 0xffff) { + keyCodeToKeymapIndex[i] = ks - KEY_MAP_OFFSET; + break; + } + } + keymap += keysyms_per_keycode; + } + XFree(origkeymap); + + setlocale(LC_CTYPE, keyboardLang); +} +#undef KEY_MAP_OFFSET + +void checkKeyPresses() +{ + Display *display = glfwGetX11Display(); + char keys[32]; + XQueryKeymap(display, keys); + for (int i = 0; i < sizeof(keys); i++) { + for (int j = 0; j < 8; j++) { + KeyCode keycode = 8 * i + j; + uint32 keymapIndex = keyCodeToKeymapIndex[keycode]; + if (keymapIndex != 0) { + int rsCode = keymap[keymapIndex]; + if (rsCode == rsNULL) + continue; + + bool pressed = WindowFocused && !!(keys[i] & (1 << j)); + + // idk why R* does that + if (rsCode == rsLSHIFT) + lshiftStatus = pressed; + else if (rsCode == rsRSHIFT) + rshiftStatus = pressed; + + if (keyStates[keymapIndex] != pressed) { + if (pressed) { + RsKeyboardEventHandler(rsKEYDOWN, &rsCode); + } else { + RsKeyboardEventHandler(rsKEYUP, &rsCode); + } + } + + keyStates[keymapIndex] = pressed; + } + } + } + +} +#endif + // R* calls that in ControllerConfig, idk why void _InputTranslateShiftKeyUpDown(RsKeyCodes *rs) { @@ -1454,6 +1821,16 @@ cursorEnterCB(GLFWwindow* window, int entered) { PSGLOBAL(cursorIsInWindow) = !!entered; } +void +windowFocusCB(GLFWwindow* window, int focused) { + WindowFocused = !!focused; +} + +void +windowIconifyCB(GLFWwindow* window, int iconified) { + WindowIconified = !!iconified; +} + /* ***************************************************************************** */ @@ -1491,7 +1868,7 @@ main(int argc, char *argv[]) InitMemoryMgr(); #endif -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__SWITCH__) struct sigaction act; act.sa_sigaction = terminateHandler; act.sa_flags = SA_SIGINFO; @@ -1559,6 +1936,15 @@ main(int argc, char *argv[]) return 0; } +#ifdef _WIN32 + HWND wnd = glfwGetWin32Window(PSGLOBAL(window)); + + HICON icon = LoadIcon(instance, MAKEINTRESOURCE(IDI_MAIN_ICON)); + + SendMessage(wnd, WM_SETICON, ICON_BIG, (LPARAM)icon); + SendMessage(wnd, WM_SETICON, ICON_SMALL, (LPARAM)icon); +#endif + psPostRWinit(); ControlsManager.InitDefaultControlConfigMouse(MousePointerStateHelper.GetMouseSetUp()); @@ -1626,10 +2012,12 @@ main(int argc, char *argv[]) #ifdef LOAD_INI_SETTINGS LoadINIControllerSettings(); - if (connectedPadButtons != 0) { - ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons); - SaveINIControllerSettings(); - } + if (connectedPadButtons != 0) + ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons); // add (connected-saved) amount of new button assignments on top of ours + + // these have 2 purposes: creating .ini at the start, and adding newly introduced settings to old .ini at the start + SaveINISettings(); + SaveINIControllerSettings(); #endif } @@ -1697,6 +2085,9 @@ main(int argc, char *argv[]) #endif { glfwPollEvents(); +#ifdef GET_KEYBOARD_INPUT_FROM_X11 + checkKeyPresses(); +#endif #ifndef MASTER if (gbModelViewer) { // This is TheModelViewerCore in LCS, but TheModelViewer on other state-machine III-VCs. @@ -1834,7 +2225,7 @@ main(int argc, char *argv[]) case GS_FRONTEND: { - if(!glfwGetWindowAttrib(PSGLOBAL(window), GLFW_ICONIFIED)) + if(!WindowIconified) RsEventHandler(rsFRONTENDIDLE, nil); #ifdef PS2_MENU @@ -2141,6 +2532,8 @@ void CapturePad(RwInt32 padID) if ( Abs(rightStickPos.y) > 0.3f ) pad->PCTempJoyState.RightStickY = (int32)(rightStickPos.y * 128.0f); } + + _psHandleVibration(); return; } @@ -2150,7 +2543,7 @@ void joysChangeCB(int jid, int event) if (event == GLFW_CONNECTED && !IsThisJoystickBlacklisted(jid)) { if (PSGLOBAL(joy1id) == -1) { PSGLOBAL(joy1id) = jid; -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU strcpy(gSelectedJoystickName, glfwGetJoystickName(jid)); #endif // This is behind LOAD_INI_SETTINGS, because otherwise the Init call below will destroy/overwrite your bindings. diff --git a/src/skel/win/gta3.ico b/src/skel/win/gta3.ico index 2017c811..d0a47713 100644 Binary files a/src/skel/win/gta3.ico and b/src/skel/win/gta3.ico differ diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 3bda4e9d..95ac28aa 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -121,6 +121,10 @@ DWORD _dwOperatingSystemVersion; RwUInt32 gGameState; CJoySticks AllValidWinJoys; +#ifdef DETECT_JOYSTICK_MENU +char gSelectedJoystickName[128] = ""; +#endif + // What is that for anyway? #ifndef IMPROVED_VIDEOMODE static RwBool defaultFullscreenRes = TRUE; @@ -255,6 +259,7 @@ psGrabScreen(RwCamera *pCamera) } #else rw::Image *image = RwCameraGetRaster(pCamera)->toImage(); + image->removeMask(); if(image) return image; #endif @@ -909,14 +914,14 @@ void WaitForState(FILTER_STATE State) */ void HandleGraphEvent(void) { - LONG evCode, evParam1, evParam2; + LONG evCode; + LONG_PTR evParam1, evParam2; HRESULT hr=S_OK; ASSERT(pME != nil); // Process all queued events - while (SUCCEEDED(pME->GetEvent(&evCode, (LONG_PTR *)&evParam1, - (LONG_PTR *)&evParam2, 0))) + while (SUCCEEDED(pME->GetEvent(&evCode, &evParam1, &evParam2, 0))) { // Free memory associated with callback, since we're not using it hr = pME->FreeEventParams(evCode, evParam1, evParam2); @@ -1325,7 +1330,11 @@ InitApplication(HANDLE instance) windowClass.cbClsExtra = 0; windowClass.cbWndExtra = 0; windowClass.hInstance = (HINSTANCE)instance; +#ifdef FIX_BUGS + windowClass.hIcon = LoadIcon((HINSTANCE)instance, MAKEINTRESOURCE(IDI_MAIN_ICON)); +#else windowClass.hIcon = nil; +#endif windowClass.hCursor = LoadCursor(nil, IDC_ARROW); windowClass.hbrBackground = nil; windowClass.lpszMenuName = NULL; @@ -2172,10 +2181,12 @@ WinMain(HINSTANCE instance, #ifdef LOAD_INI_SETTINGS LoadINIControllerSettings(); - if (connectedPadButtons != 0) { - ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons); - SaveINIControllerSettings(); - } + if (connectedPadButtons != 0) + ControlsManager.InitDefaultControlConfigJoyPad(connectedPadButtons); // add (connected-saved) amount of new button assignments on top of ours + + // these have 2 purposes: creating .ini at the start, and adding newly introduced settings to old .ini at the start + SaveINISettings(); + SaveINIControllerSettings(); #endif } @@ -2266,7 +2277,7 @@ WinMain(HINSTANCE instance, case GS_START_UP: { #ifdef NO_MOVIES - gGameState = GS_INIT_ONCE; + gGameState = gbNoMovies ? GS_INIT_ONCE : GS_INIT_LOGO_MPEG; #else gGameState = GS_INIT_LOGO_MPEG; #endif @@ -2305,8 +2316,11 @@ WinMain(HINSTANCE instance, case GS_INIT_INTRO_MPEG: { -#ifndef NO_MOVIES +#ifdef NO_MOVIES + if (!gbNoMovies) +#endif CloseClip(); +#ifndef FIX_BUGS CoUninitialize(); #endif @@ -2342,8 +2356,11 @@ WinMain(HINSTANCE instance, case GS_INIT_ONCE: { -#ifndef NO_MOVIES +#ifdef NO_MOVIES + if (!gbNoMovies) +#endif CloseClip(); +#ifndef FIX_BUGS CoUninitialize(); #endif diff --git a/src/text/Text.cpp b/src/text/Text.cpp index 656e4ac0..482324ec 100644 --- a/src/text/Text.cpp +++ b/src/text/Text.cpp @@ -8,7 +8,7 @@ #include "Messages.h" #include "Text.h" -static wchar WideErrorString[25]; +wchar WideErrorString[25]; CText TheText; diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 7e8c4702..417dd140 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -45,6 +45,7 @@ #include "Object.h" #include "Automobile.h" #include "Wanted.h" +#include "SaveBuf.h" bool bAllCarCheat; // unused @@ -333,7 +334,11 @@ CAutomobile::ProcessControl(void) bool playerRemote = false; switch(GetStatus()){ case STATUS_PLAYER_REMOTE: - if(CPad::GetPad(0)->WeaponJustDown()){ +#ifdef FIX_BUGS + if (CPad::GetPad(0)->CarGunJustDown()) { +#else + if (CPad::GetPad(0)->WeaponJustDown()) { +#endif BlowUpCar(FindPlayerPed()); CRemote::TakeRemoteControlledCarFromPlayer(); } @@ -990,19 +995,19 @@ CAutomobile::ProcessControl(void) }else{ if(GetModelIndex() == MI_MRWHOOP){ if(Pads[0].bHornHistory[Pads[0].iCurrHornHistory] && - !Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+4) % 5]){ + !Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+CPad::HORNHISTORY_SIZE-1) % CPad::HORNHISTORY_SIZE]){ m_bSirenOrAlarm = !m_bSirenOrAlarm; printf("m_bSirenOrAlarm toggled to %d\n", m_bSirenOrAlarm); } }else if(UsesSiren(GetModelIndex())){ if(Pads[0].bHornHistory[Pads[0].iCurrHornHistory]){ - if(Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+4) % 5] && - Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+3) % 5]) + if(Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+CPad::HORNHISTORY_SIZE-1) % CPad::HORNHISTORY_SIZE] && + Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+CPad::HORNHISTORY_SIZE-2) % CPad::HORNHISTORY_SIZE]) m_nCarHornTimer = 1; else m_nCarHornTimer = 0; - }else if(Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+4) % 5] && - !Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+1) % 5]){ + }else if(Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+CPad::HORNHISTORY_SIZE-1) % CPad::HORNHISTORY_SIZE] && + !Pads[0].bHornHistory[(Pads[0].iCurrHornHistory+1) % CPad::HORNHISTORY_SIZE]){ m_nCarHornTimer = 0; m_bSirenOrAlarm = !m_bSirenOrAlarm; }else @@ -1358,7 +1363,7 @@ CAutomobile::PreRender(void) break; default: - if(Abs(fwdSpeed) > 0.5f) + if(Abs(fwdSpeed) > 5.0f) AddWheelDirtAndWater(&m_aWheelColPoints[i], drawParticles); if(m_aWheelSkidmarkBloody[i] && m_aWheelTimer[i] > 0.0f) CSkidmarks::RegisterOne((uintptr)this + i, m_aWheelColPoints[i].point, @@ -1383,7 +1388,7 @@ CAutomobile::PreRender(void) CVector(0.0f, 0.0f, 0.0f)); if(m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f) - CSkidmarks::RegisterOne((uintptr)this + CARWHEEL_REAR_LEFT, + CSkidmarks::RegisterOne((uintptr)this + 5, m_aWheelColPoints[CARWHEEL_REAR_LEFT].point + offset, GetForward().x, GetForward().y, &m_aWheelSkidmarkMuddy[CARWHEEL_REAR_LEFT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_LEFT]); @@ -1401,12 +1406,12 @@ CAutomobile::PreRender(void) CVector(0.0f, 0.0f, 0.0f)); if(m_aWheelTimer[CARWHEEL_REAR_RIGHT] > 0.0f) - CSkidmarks::RegisterOne((uintptr)this + CARWHEEL_REAR_RIGHT, + CSkidmarks::RegisterOne((uintptr)this + 6, m_aWheelColPoints[CARWHEEL_REAR_RIGHT].point + offset, GetForward().x, GetForward().y, &m_aWheelSkidmarkMuddy[CARWHEEL_REAR_RIGHT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_RIGHT]); break; - default: break; + default: break; } } @@ -1534,7 +1539,7 @@ CAutomobile::PreRender(void) r *= f; g *= f; b *= f; - }else if(t > 412){ + }else if(t > (512-100)){ float f = (512-t)/100.0f; r *= f; g *= f; @@ -1660,7 +1665,7 @@ CAutomobile::PreRender(void) // 1.0 if directly behind car, -1.0 if in front // BUG on PC: Abs of DotProduct is taken float behindness = DotProduct(lookVector, GetForward()); - behindness = clamp(behindness, -1.0f, 1.0f); // shouldn't be necessary + behindness = Clamp(behindness, -1.0f, 1.0f); // shouldn't be necessary // 0.0 if behind car, PI if in front // Abs not necessary float angle = Abs(Acos(behindness)); @@ -1765,20 +1770,20 @@ CAutomobile::PreRender(void) // Taillight coronas if(behindness > 0.0f){ // Behind car - float intensity = 0.4f*behindness + 0.4f; - float size = (behindness + 1.0f)/2.0f; + float intensity = (behindness + 1.0f)*0.4f; + float size = (behindness + 1.0f)*0.5f; if(m_fGasPedal < 0.0f){ // reversing intensity += 0.4f; size += 0.3f; if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 2, 128*intensity, 128*intensity, 128*intensity, 255, + CCoronas::RegisterCorona((uintptr)this + 14, 128*intensity, 128*intensity, 128*intensity, 255, lightL, size, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 3, 128*intensity, 128*intensity, 128*intensity, 255, + CCoronas::RegisterCorona((uintptr)this + 15, 128*intensity, 128*intensity, 128*intensity, 255, lightR, size, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle); @@ -1790,23 +1795,23 @@ CAutomobile::PreRender(void) if(alarmOff){ if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 2, 0, 0, 0, 0, + CCoronas::RegisterCorona((uintptr)this + 14, 0, 0, 0, 0, lightL, size, 0.0f, CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 3, 0, 0, 0, 0, + CCoronas::RegisterCorona((uintptr)this + 15, 0, 0, 0, 0, lightR, size, 0.0f, CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle); }else{ if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 2, 128*intensity, 0, 0, 255, + CCoronas::RegisterCorona((uintptr)this + 14, 128*intensity, 0, 0, 255, lightL, size, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 3, 128*intensity, 0, 0, 255, + CCoronas::RegisterCorona((uintptr)this + 15, 128*intensity, 0, 0, 255, lightR, size, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle); @@ -1814,10 +1819,11 @@ CAutomobile::PreRender(void) } }else{ // In front of car + // missing LODDistMultiplier probably a BUG if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::UpdateCoronaCoors((uintptr)this + 2, lightL, 50.0f*TheCamera.LODDistMultiplier, angle); + CCoronas::UpdateCoronaCoors((uintptr)this + 14, lightL, 50.0f, angle); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::UpdateCoronaCoors((uintptr)this + 3, lightR, 50.0f*TheCamera.LODDistMultiplier, angle); + CCoronas::UpdateCoronaCoors((uintptr)this + 15, lightR, 50.0f, angle); } // bright lights @@ -1883,12 +1889,12 @@ CAutomobile::PreRender(void) if(m_fGasPedal < 0.0f){ // reversing if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 2, 120, 120, 120, 255, + CCoronas::RegisterCorona((uintptr)this + 14, 120, 120, 120, 255, lightL, 1.2f, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 3, 120, 120, 120, 255, + CCoronas::RegisterCorona((uintptr)this + 15, 120, 120, 120, 255, lightR, 1.2f, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); @@ -1899,12 +1905,12 @@ CAutomobile::PreRender(void) }else{ // braking if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 2, 120, 0, 0, 255, + CCoronas::RegisterCorona((uintptr)this + 14, 120, 0, 0, 255, lightL, 1.2f, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::RegisterCorona((uintptr)this + 3, 120, 0, 0, 255, + CCoronas::RegisterCorona((uintptr)this + 15, 120, 0, 0, 255, lightR, 1.2f, 50.0f*TheCamera.LODDistMultiplier, CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON, CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f); @@ -1915,15 +1921,15 @@ CAutomobile::PreRender(void) } }else{ if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::UpdateCoronaCoors((uintptr)this + 2, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f); + CCoronas::UpdateCoronaCoors((uintptr)this + 14, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::UpdateCoronaCoors((uintptr)this + 3, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f); + CCoronas::UpdateCoronaCoors((uintptr)this + 15, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f); } }else{ if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK) - CCoronas::UpdateCoronaCoors((uintptr)this + 2, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f); + CCoronas::UpdateCoronaCoors((uintptr)this + 14, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f); if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK) - CCoronas::UpdateCoronaCoors((uintptr)this + 3, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f); + CCoronas::UpdateCoronaCoors((uintptr)this + 15, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f); } } // end of lights @@ -2259,7 +2265,7 @@ CAutomobile::ProcessControlInputs(uint8 pad) 0.2f*CTimer::GetTimeStep(); nLastControlInput = 0; } - m_fSteerInput = clamp(m_fSteerInput, -1.0f, 1.0f); + m_fSteerInput = Clamp(m_fSteerInput, -1.0f, 1.0f); // Accelerate/Brake float acceleration = (CPad::GetPad(pad)->GetAccelerate() - CPad::GetPad(pad)->GetBrake())/255.0f; @@ -2372,7 +2378,11 @@ void CAutomobile::FireTruckControl(void) { if(this == FindPlayerVehicle()){ - if(!CPad::GetPad(0)->GetWeapon()) +#ifdef FIX_BUGS + if (!CPad::GetPad(0)->GetCarGunFired()) +#else + if (!CPad::GetPad(0)->GetWeapon()) +#endif // FIX_BUGS return; #ifdef FREE_CAM if (!CCamera::bFreeCam) @@ -2381,7 +2391,7 @@ CAutomobile::FireTruckControl(void) m_fCarGunLR += CPad::GetPad(0)->GetCarGunLeftRight() * 0.00025f * CTimer::GetTimeStep(); m_fCarGunUD += CPad::GetPad(0)->GetCarGunUpDown() * 0.0001f * CTimer::GetTimeStep(); } - m_fCarGunUD = clamp(m_fCarGunUD, 0.05f, 0.3f); + m_fCarGunUD = Clamp(m_fCarGunUD, 0.05f, 0.3f); CVector cannonPos(0.0f, 1.5f, 1.9f); @@ -2826,7 +2836,7 @@ CAutomobile::HydraulicControl(void) float limitDiff = extendedLowerLimit - normalLowerLimit; if(limitDiff != 0.0f && Abs(maxDelta/limitDiff) > 0.01f){ float f = (maxDelta + limitDiff)/2.0f/limitDiff; - f = clamp(f, 0.0f, 1.0f); + f = Clamp(f, 0.0f, 1.0f); DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_HYDRAULIC_3, f); if(f < 0.4f || f > 0.6f) setPrevRatio = true; @@ -3058,21 +3068,21 @@ CAutomobile::DoDriveByShootings(void) if(lookingLeft || lookingRight){ if(lookingLeft){ - anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_DRIVEBY_R); + anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT); if(anim) anim->blendDelta = -1000.0f; - anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_DRIVEBY_L); + anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT); if(anim == nil || anim->blendDelta < 0.0f) - CAnimManager::AddAnimation(pDriver->GetClump(), ASSOCGRP_STD, ANIM_DRIVEBY_L); + CAnimManager::AddAnimation(pDriver->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVEBY_LEFT); else anim->SetRun(); }else if(pDriver->m_pMyVehicle->pPassengers[0] == nil || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_1STPERSON){ - anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_DRIVEBY_L); + anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT); if(anim) anim->blendDelta = -1000.0f; - anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_DRIVEBY_R); + anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT); if(anim == nil || anim->blendDelta < 0.0f) - CAnimManager::AddAnimation(pDriver->GetClump(), ASSOCGRP_STD, ANIM_DRIVEBY_R); + CAnimManager::AddAnimation(pDriver->GetClump(), ASSOCGRP_STD, ANIM_STD_CAR_DRIVEBY_RIGHT); else anim->SetRun(); } @@ -3083,10 +3093,10 @@ CAutomobile::DoDriveByShootings(void) } }else{ weapon->Reload(); - anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_DRIVEBY_L); + anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_STD_CAR_DRIVEBY_LEFT); if(anim) anim->blendDelta = -1000.0f; - anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_DRIVEBY_R); + anim = RpAnimBlendClumpGetAssociation(pDriver->GetClump(), ANIM_STD_CAR_DRIVEBY_RIGHT); if(anim) anim->blendDelta = -1000.0f; } @@ -3094,11 +3104,11 @@ CAutomobile::DoDriveByShootings(void) // TODO: what is this? if(!lookingLeft && m_weaponDoorTimerLeft > 0.0f){ m_weaponDoorTimerLeft = Max(m_weaponDoorTimerLeft - CTimer::GetTimeStep()*0.1f, 0.0f); - ProcessOpenDoor(CAR_DOOR_LF, NUM_ANIMS, m_weaponDoorTimerLeft); + ProcessOpenDoor(CAR_DOOR_LF, ANIM_STD_NUM, m_weaponDoorTimerLeft); } if(!lookingRight && m_weaponDoorTimerRight > 0.0f){ m_weaponDoorTimerRight = Max(m_weaponDoorTimerRight - CTimer::GetTimeStep()*0.1f, 0.0f); - ProcessOpenDoor(CAR_DOOR_RF, NUM_ANIMS, m_weaponDoorTimerRight); + ProcessOpenDoor(CAR_DOOR_RF, ANIM_STD_NUM, m_weaponDoorTimerRight); } } @@ -3487,9 +3497,9 @@ CAutomobile::dmgDrawCarCollidingParticles(const CVector &pos, float amount) nil, CGeneral::GetRandomNumberInRange(0.02f, 0.08f), CVehicleModelInfo::ms_vehicleColourTable[m_currentColour1], - CGeneral::GetRandomNumberInRange(-40.0f, 40.0f), + CGeneral::GetRandomNumberInRange(-40, 40), 0, - CGeneral::GetRandomNumberInRange(0.0f, 4.0f)); + CGeneral::GetRandomNumberInRange(0, 4)); } void @@ -3736,55 +3746,55 @@ CAutomobile::ProcessOpenDoor(uint32 component, uint32 anim, float time) return; switch(anim){ - case ANIM_CAR_QJACK: - case ANIM_CAR_OPEN_LHS: - case ANIM_CAR_OPEN_RHS: + case ANIM_STD_QUICKJACK: + case ANIM_STD_CAR_OPEN_DOOR_LHS: + case ANIM_STD_CAR_OPEN_DOOR_RHS: ProcessDoorOpenAnimation(this, component, door, time, 0.66f, 0.8f); break; - case ANIM_CAR_CLOSEDOOR_LHS: - case ANIM_CAR_CLOSEDOOR_LOW_LHS: - case ANIM_CAR_CLOSEDOOR_RHS: - case ANIM_CAR_CLOSEDOOR_LOW_RHS: + case ANIM_STD_CAR_CLOSE_DOOR_LHS: + case ANIM_STD_CAR_CLOSE_DOOR_LO_LHS: + case ANIM_STD_CAR_CLOSE_DOOR_RHS: + case ANIM_STD_CAR_CLOSE_DOOR_LO_RHS: ProcessDoorCloseAnimation(this, component, door, time, 0.2f, 0.63f); break; - case ANIM_CAR_ROLLDOOR: - case ANIM_CAR_ROLLDOOR_LOW: + case ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS: + case ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS: ProcessDoorOpenCloseAnimation(this, component, door, time, 0.1f, 0.6f, 0.95f); break; - case ANIM_CAR_GETOUT_LHS: - case ANIM_CAR_GETOUT_LOW_LHS: - case ANIM_CAR_GETOUT_RHS: - case ANIM_CAR_GETOUT_LOW_RHS: + case ANIM_STD_GETOUT_LHS: + case ANIM_STD_GETOUT_LO_LHS: + case ANIM_STD_GETOUT_RHS: + case ANIM_STD_GETOUT_LO_RHS: ProcessDoorOpenAnimation(this, component, door, time, 0.06f, 0.43f); break; - case ANIM_CAR_CLOSE_LHS: - case ANIM_CAR_CLOSE_RHS: + case ANIM_STD_CAR_CLOSE_LHS: + case ANIM_STD_CAR_CLOSE_RHS: ProcessDoorCloseAnimation(this, component, door, time, 0.1f, 0.23f); break; - case ANIM_CAR_PULLOUT_RHS: - case ANIM_CAR_PULLOUT_LOW_RHS: + case ANIM_STD_CAR_PULL_OUT_PED_RHS: + case ANIM_STD_CAR_PULL_OUT_PED_LO_RHS: OpenDoor(component, door, 1.0f); break; - case ANIM_COACH_OPEN_L: - case ANIM_COACH_OPEN_R: + case ANIM_STD_COACH_OPEN_LHS: + case ANIM_STD_COACH_OPEN_RHS: ProcessDoorOpenAnimation(this, component, door, time, 0.66f, 0.8f); break; - case ANIM_COACH_OUT_L: + case ANIM_STD_COACH_GET_OUT_LHS: ProcessDoorOpenAnimation(this, component, door, time, 0.0f, 0.3f); break; - case ANIM_VAN_OPEN_L: - case ANIM_VAN_OPEN: + case ANIM_STD_VAN_OPEN_DOOR_REAR_LHS: + case ANIM_STD_VAN_OPEN_DOOR_REAR_RHS: ProcessDoorOpenAnimation(this, component, door, time, 0.37f, 0.55f); break; - case ANIM_VAN_CLOSE_L: - case ANIM_VAN_CLOSE: + case ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS: + case ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS: ProcessDoorCloseAnimation(this, component, door, time, 0.5f, 0.8f); break; - case ANIM_VAN_GETOUT_L: - case ANIM_VAN_GETOUT: + case ANIM_STD_VAN_GET_OUT_REAR_LHS: + case ANIM_STD_VAN_GET_OUT_REAR_RHS: ProcessDoorOpenAnimation(this, component, door, time, 0.5f, 0.6f); break; - case NUM_ANIMS: + case ANIM_STD_NUM: OpenDoor(component, door, time); break; } @@ -3879,7 +3889,7 @@ CAutomobile::BlowUpCar(CEntity *culprit) if(!pDriver->IsPlayer()) pDriver->FlagToDestroyWhenNextProcessed(); }else - pDriver->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f); + pDriver->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f); } for(i = 0; i < m_nNumMaxPassengers; i++){ if(pPassengers[i]){ @@ -3889,7 +3899,7 @@ CAutomobile::BlowUpCar(CEntity *culprit) if(!pPassengers[i]->IsPlayer()) pPassengers[i]->FlagToDestroyWhenNextProcessed(); }else - pPassengers[i]->SetDie(ANIM_KO_SHOT_FRONT1, 4.0f, 0.0f); + pPassengers[i]->SetDie(ANIM_STD_KO_FRONT, 4.0f, 0.0f); } } @@ -3946,7 +3956,9 @@ CAutomobile::SetUpWheelColModel(CColModel *colModel) return true; } -// this probably isn't used in III yet +float fBurstForceMult = 0.03f; + +// this isn't used in III yet void CAutomobile::BurstTyre(uint8 wheel) { @@ -3966,8 +3978,8 @@ CAutomobile::BurstTyre(uint8 wheel) CCarCtrl::SwitchVehicleToRealPhysics(this); } - ApplyMoveForce(GetRight() * m_fMass * CGeneral::GetRandomNumberInRange(-0.03f, 0.03f)); - ApplyTurnForce(GetRight() * m_fTurnMass * CGeneral::GetRandomNumberInRange(-0.03f, 0.03f), GetForward()); + ApplyMoveForce(GetRight() * m_fMass * CGeneral::GetRandomNumberInRange(-fBurstForceMult, fBurstForceMult)); + ApplyTurnForce(GetRight() * m_fTurnMass * CGeneral::GetRandomNumberInRange(-fBurstForceMult, fBurstForceMult), GetForward()); } } @@ -4042,7 +4054,7 @@ CAutomobile::GetHeightAboveRoad(void) void CAutomobile::PlayCarHorn(void) { - int r; + uint32 r; if(m_nCarHornTimer != 0) return; @@ -4708,15 +4720,15 @@ void CAutomobile::Save(uint8*& buf) { CVehicle::Save(buf); - WriteSaveBuf(buf, Damage); - SkipSaveBuf(buf, 800 - sizeof(CDamageManager)); + WriteSaveBuf(buf, Damage); + ZeroSaveBuf(buf, 800 - sizeof(CDamageManager)); } void CAutomobile::Load(uint8*& buf) { CVehicle::Load(buf); - Damage = ReadSaveBuf(buf); + ReadSaveBuf(&Damage, buf); SkipSaveBuf(buf, 800 - sizeof(CDamageManager)); SetupDamageAfterLoad(); } diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 4bbbadbd..65cdd8c6 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -19,6 +19,7 @@ #include "Pools.h" #include "Pad.h" #include "Boat.h" +#include "SaveBuf.h" #define INVALID_ORIENTATION (-9999.99f) @@ -122,9 +123,9 @@ CBoat::ProcessControl(void) r = 114.75f*(CTimeCycle::GetAmbientRed() + 0.5f*CTimeCycle::GetDirectionalRed()); g = 114.75f*(CTimeCycle::GetAmbientGreen() + 0.5f*CTimeCycle::GetDirectionalGreen()); b = 114.75f*(CTimeCycle::GetAmbientBlue() + 0.5f*CTimeCycle::GetDirectionalBlue()); - r = clamp(r, 0, 255); - g = clamp(g, 0, 255); - b = clamp(b, 0, 255); + r = Clamp(r, 0, 255); + g = Clamp(g, 0, 255); + b = Clamp(b, 0, 255); splashColor.red = r; splashColor.green = g; splashColor.blue = b; @@ -133,9 +134,9 @@ CBoat::ProcessControl(void) r = 242.25f*(CTimeCycle::GetAmbientRed() + 0.5f*CTimeCycle::GetDirectionalRed()); g = 242.25f*(CTimeCycle::GetAmbientGreen() + 0.5f*CTimeCycle::GetDirectionalGreen()); b = 242.25f*(CTimeCycle::GetAmbientBlue() + 0.5f*CTimeCycle::GetDirectionalBlue()); - r = clamp(r, 0, 255); - g = clamp(g, 0, 255); - b = clamp(b, 0, 255); + r = Clamp(r, 0, 255); + g = Clamp(g, 0, 255); + b = Clamp(b, 0, 255); jetColor.red = r; jetColor.green = g; jetColor.blue = b; @@ -541,17 +542,17 @@ CBoat::ProcessControlInputs(uint8 pad) m_nPadID = 3; m_fBrake += (CPad::GetPad(pad)->GetBrake()/255.0f - m_fBrake)*0.1f; - m_fBrake = clamp(m_fBrake, 0.0f, 1.0f); + m_fBrake = Clamp(m_fBrake, 0.0f, 1.0f); if(m_fBrake < 0.05f){ m_fBrake = 0.0f; m_fAccelerate += (CPad::GetPad(pad)->GetAccelerate()/255.0f - m_fAccelerate)*0.1f; - m_fAccelerate = clamp(m_fAccelerate, 0.0f, 1.0f); + m_fAccelerate = Clamp(m_fAccelerate, 0.0f, 1.0f); }else m_fAccelerate = -m_fBrake*0.2f; m_fSteeringLeftRight += (-CPad::GetPad(pad)->GetSteeringLeftRight()/128.0f - m_fSteeringLeftRight)*0.2f; - m_fSteeringLeftRight = clamp(m_fSteeringLeftRight, -1.0f, 1.0f); + m_fSteeringLeftRight = Clamp(m_fSteeringLeftRight, -1.0f, 1.0f); float steeringSq = m_fSteeringLeftRight < 0.0f ? -SQR(m_fSteeringLeftRight) : SQR(m_fSteeringLeftRight); m_fSteerAngle = pHandling->fSteeringLock * DEGTORAD(steeringSq); @@ -939,7 +940,7 @@ void CBoat::Save(uint8*& buf) { CVehicle::Save(buf); - SkipSaveBuf(buf, 1156 - 648); + ZeroSaveBuf(buf, 1156 - 648); } void diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp index 7524444b..ebb767dd 100644 --- a/src/vehicles/CarGen.cpp +++ b/src/vehicles/CarGen.cpp @@ -13,6 +13,7 @@ #include "Timer.h" #include "Vehicle.h" #include "World.h" +#include "SaveBuf.h" uint8 CTheCarGenerators::ProcessCounter; uint32 CTheCarGenerators::NumOfCarGenerators; @@ -171,8 +172,8 @@ void CCarGenerator::Setup(float x, float y, float z, float angle, int32 mi, int1 m_nTimer = CTimer::GetTimeInMilliseconds() + 1; m_nUsesRemaining = 0; m_bIsBlocking = false; - m_vecInf = CModelInfo::GetModelInfo(m_nModelIndex)->GetColModel()->boundingBox.min; - m_vecSup = CModelInfo::GetModelInfo(m_nModelIndex)->GetColModel()->boundingBox.max; + m_vecInf = CModelInfo::GetColModel(m_nModelIndex)->boundingBox.min; + m_vecSup = CModelInfo::GetColModel(m_nModelIndex)->boundingBox.max; m_fSize = Max(m_vecInf.Magnitude(), m_vecSup.Magnitude()); } @@ -254,14 +255,17 @@ void CTheCarGenerators::LoadAllCarGenerators(uint8* buffer, uint32 size) Init(); INITSAVEBUF CheckSaveHeader(buffer, 'C','G','N','\0', size - SAVE_HEADER_SIZE); - assert(ReadSaveBuf(buffer) == nGeneralDataSize); - NumOfCarGenerators = ReadSaveBuf(buffer); - CurrentActiveCount = ReadSaveBuf(buffer); - ProcessCounter = ReadSaveBuf(buffer); - GenerateEvenIfPlayerIsCloseCounter = ReadSaveBuf(buffer); - ReadSaveBuf(buffer); // alignment - assert(ReadSaveBuf(buffer) == sizeof(CarGeneratorArray)); + uint32 tmp; + ReadSaveBuf(&tmp, buffer); + assert(tmp == nGeneralDataSize); + ReadSaveBuf(&NumOfCarGenerators, buffer); + ReadSaveBuf(&CurrentActiveCount, buffer); + ReadSaveBuf(&ProcessCounter, buffer); + ReadSaveBuf(&GenerateEvenIfPlayerIsCloseCounter, buffer); + SkipSaveBuf(buffer, 2); + ReadSaveBuf(&tmp, buffer); + assert(tmp == sizeof(CarGeneratorArray)); for (int i = 0; i < NUM_CARGENS; i++) - CarGeneratorArray[i] = ReadSaveBuf(buffer); + ReadSaveBuf(&CarGeneratorArray[i], buffer); VALIDATESAVEBUF(size) } diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp index 1191465a..db9d2e00 100644 --- a/src/vehicles/Cranes.cpp +++ b/src/vehicles/Cranes.cpp @@ -11,6 +11,7 @@ #include "Replay.h" #include "Object.h" #include "World.h" +#include "SaveBuf.h" #define MAX_DISTANCE_TO_FIND_CRANE (10.0f) #define CRANE_UPDATE_RADIUS (300.0f) @@ -36,6 +37,12 @@ #define MIN_VALID_POSITION (-10000.0f) #define DEFAULT_OFFSET (20.0f) +#ifdef COMPATIBLE_SAVES +#define CRANES_SAVE_SIZE 0x400 +#else +#define CRANES_SAVE_SIZE sizeof(aCranes) +#endif + uint32 TimerForCamInterpolation; uint32 CCranes::CarsCollectedMilitaryCrane; @@ -85,7 +92,7 @@ void CCranes::AddThisOneCrane(CEntity* pEntity) pCrane->m_bWasMilitaryCrane = false; pCrane->m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[NumCranes]); if (pCrane->m_nAudioEntity >= 0) - DMAudio.SetEntityStatus(pCrane->m_nAudioEntity, true); + DMAudio.SetEntityStatus(pCrane->m_nAudioEntity, TRUE); pCrane->m_bIsTop = (MODELID_CRANE_1 != pEntity->GetModelIndex()); // Is this used to avoid military crane? if (pCrane->m_bIsTop || pEntity->GetPosition().y > 0.0f) { @@ -633,10 +640,46 @@ void CCranes::Save(uint8* buf, uint32* size) { INITSAVEBUF - *size = 2 * sizeof(uint32) + sizeof(aCranes); + *size = 2 * sizeof(uint32) + CRANES_SAVE_SIZE; WriteSaveBuf(buf, NumCranes); WriteSaveBuf(buf, CarsCollectedMilitaryCrane); for (int i = 0; i < NUM_CRANES; i++) { +#ifdef COMPATIBLE_SAVES + int32 tmp = aCranes[i].m_pCraneEntity != nil ? CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(aCranes[i].m_pCraneEntity) + 1 : 0; + WriteSaveBuf(buf, tmp); + tmp = aCranes[i].m_pHook != nil ? CPools::GetObjectPool()->GetJustIndex_NoFreeAssert(aCranes[i].m_pHook) + 1 : 0; + WriteSaveBuf(buf, tmp); + WriteSaveBuf(buf, aCranes[i].m_nAudioEntity); + WriteSaveBuf(buf, aCranes[i].m_fPickupX1); + WriteSaveBuf(buf, aCranes[i].m_fPickupX2); + WriteSaveBuf(buf, aCranes[i].m_fPickupY1); + WriteSaveBuf(buf, aCranes[i].m_fPickupY2); + WriteSaveBuf(buf, aCranes[i].m_vecDropoffTarget); + WriteSaveBuf(buf, aCranes[i].m_fDropoffHeading); + WriteSaveBuf(buf, aCranes[i].m_fPickupAngle); + WriteSaveBuf(buf, aCranes[i].m_fDropoffAngle); + WriteSaveBuf(buf, aCranes[i].m_fPickupDistance); + WriteSaveBuf(buf, aCranes[i].m_fDropoffDistance); + WriteSaveBuf(buf, aCranes[i].m_fPickupHeight); + WriteSaveBuf(buf, aCranes[i].m_fDropoffHeight); + WriteSaveBuf(buf, aCranes[i].m_fHookAngle); + WriteSaveBuf(buf, aCranes[i].m_fHookOffset); + WriteSaveBuf(buf, aCranes[i].m_fHookHeight); + WriteSaveBuf(buf, aCranes[i].m_vecHookInitPos); + WriteSaveBuf(buf, aCranes[i].m_vecHookCurPos); + WriteSaveBuf(buf, aCranes[i].m_vecHookVelocity); + tmp = aCranes[i].m_pVehiclePickedUp != nil ? CPools::GetVehiclePool()->GetJustIndex_NoFreeAssert(aCranes[i].m_pVehiclePickedUp) + 1 : 0; + WriteSaveBuf(buf, tmp); + WriteSaveBuf(buf, aCranes[i].m_nTimeForNextCheck); + WriteSaveBuf(buf, aCranes[i].m_nCraneStatus); + WriteSaveBuf(buf, aCranes[i].m_nCraneState); + WriteSaveBuf(buf, aCranes[i].m_nVehiclesCollected); + WriteSaveBuf(buf, aCranes[i].m_bIsCrusher); + WriteSaveBuf(buf, aCranes[i].m_bIsMilitaryCrane); + WriteSaveBuf(buf, aCranes[i].m_bWasMilitaryCrane); + WriteSaveBuf(buf, aCranes[i].m_bIsTop); + ZeroSaveBuf(buf, 1); +#else CCrane *pCrane = WriteSaveBuf(buf, aCranes[i]); if (pCrane->m_pCraneEntity != nil) pCrane->m_pCraneEntity = (CBuilding*)(CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pCrane->m_pCraneEntity) + 1); @@ -644,6 +687,7 @@ void CCranes::Save(uint8* buf, uint32* size) pCrane->m_pHook = (CObject*)(CPools::GetObjectPool()->GetJustIndex_NoFreeAssert(pCrane->m_pHook) + 1); if (pCrane->m_pVehiclePickedUp != nil) pCrane->m_pVehiclePickedUp = (CVehicle*)(CPools::GetVehiclePool()->GetJustIndex_NoFreeAssert(pCrane->m_pVehiclePickedUp) + 1); +#endif } VALIDATESAVEBUF(*size); @@ -653,10 +697,48 @@ void CCranes::Load(uint8* buf, uint32 size) { INITSAVEBUF - NumCranes = ReadSaveBuf(buf); - CarsCollectedMilitaryCrane = ReadSaveBuf(buf); - for (int i = 0; i < NUM_CRANES; i++) - aCranes[i] = ReadSaveBuf(buf); + ReadSaveBuf(&NumCranes, buf); + ReadSaveBuf(&CarsCollectedMilitaryCrane, buf); + for (int i = 0; i < NUM_CRANES; i++) { +#ifdef COMPATIBLE_SAVES + int32 tmp; + ReadSaveBuf(&tmp, buf); + aCranes[i].m_pCraneEntity = tmp != 0 ? CPools::GetBuildingPool()->GetSlot(tmp - 1) : nil; + ReadSaveBuf(&tmp, buf); + aCranes[i].m_pHook = tmp != 0 ? CPools::GetObjectPool()->GetSlot(tmp - 1) : nil; + ReadSaveBuf(&aCranes[i].m_nAudioEntity, buf); + ReadSaveBuf(&aCranes[i].m_fPickupX1, buf); + ReadSaveBuf(&aCranes[i].m_fPickupX2, buf); + ReadSaveBuf(&aCranes[i].m_fPickupY1, buf); + ReadSaveBuf(&aCranes[i].m_fPickupY2, buf); + ReadSaveBuf(&aCranes[i].m_vecDropoffTarget, buf); + ReadSaveBuf(&aCranes[i].m_fDropoffHeading, buf); + ReadSaveBuf(&aCranes[i].m_fPickupAngle, buf); + ReadSaveBuf(&aCranes[i].m_fDropoffAngle, buf); + ReadSaveBuf(&aCranes[i].m_fPickupDistance, buf); + ReadSaveBuf(&aCranes[i].m_fDropoffDistance, buf); + ReadSaveBuf(&aCranes[i].m_fPickupHeight, buf); + ReadSaveBuf(&aCranes[i].m_fDropoffHeight, buf); + ReadSaveBuf(&aCranes[i].m_fHookAngle, buf); + ReadSaveBuf(&aCranes[i].m_fHookOffset, buf); + ReadSaveBuf(&aCranes[i].m_fHookHeight, buf); + ReadSaveBuf(&aCranes[i].m_vecHookInitPos, buf); + ReadSaveBuf(&aCranes[i].m_vecHookCurPos, buf); + ReadSaveBuf(&aCranes[i].m_vecHookVelocity, buf); + ReadSaveBuf(&tmp, buf); + aCranes[i].m_pVehiclePickedUp = tmp != 0 ? CPools::GetVehiclePool()->GetSlot(tmp - 1) : nil; + ReadSaveBuf(&aCranes[i].m_nTimeForNextCheck, buf); + ReadSaveBuf(&aCranes[i].m_nCraneStatus, buf); + ReadSaveBuf(&aCranes[i].m_nCraneState, buf); + ReadSaveBuf(&aCranes[i].m_nVehiclesCollected, buf); + ReadSaveBuf(&aCranes[i].m_bIsCrusher, buf); + ReadSaveBuf(&aCranes[i].m_bIsMilitaryCrane, buf); + ReadSaveBuf(&aCranes[i].m_bWasMilitaryCrane, buf); + ReadSaveBuf(&aCranes[i].m_bIsTop, buf); + SkipSaveBuf(buf, 1); +#else + ReadSaveBuf(&aCranes[i], buf); + } for (int i = 0; i < NUM_CRANES; i++) { CCrane *pCrane = &aCranes[i]; if (pCrane->m_pCraneEntity != nil) @@ -665,11 +747,12 @@ void CCranes::Load(uint8* buf, uint32 size) pCrane->m_pHook = CPools::GetObjectPool()->GetSlot((uintptr)pCrane->m_pHook - 1); if (pCrane->m_pVehiclePickedUp != nil) pCrane->m_pVehiclePickedUp = CPools::GetVehiclePool()->GetSlot((uintptr)pCrane->m_pVehiclePickedUp - 1); +#endif } for (int i = 0; i < NUM_CRANES; i++) { aCranes[i].m_nAudioEntity = DMAudio.CreateEntity(AUDIOTYPE_CRANE, &aCranes[i]); if (aCranes[i].m_nAudioEntity != 0) - DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, true); + DMAudio.SetEntityStatus(aCranes[i].m_nAudioEntity, TRUE); } VALIDATESAVEBUF(size); diff --git a/src/vehicles/Door.cpp b/src/vehicles/Door.cpp index c80965aa..1b3f9e8f 100644 --- a/src/vehicles/Door.cpp +++ b/src/vehicles/Door.cpp @@ -52,11 +52,11 @@ CDoor::Process(CVehicle *vehicle) fSpeedDiff = vecSpeedDiff.y - vecSpeedDiff.x; break; } - fSpeedDiff = clamp(fSpeedDiff, -0.2f, 0.2f); + fSpeedDiff = Clamp(fSpeedDiff, -0.2f, 0.2f); if(Abs(fSpeedDiff) > 0.002f) m_fAngVel += fSpeedDiff; m_fAngVel *= 0.945f; - m_fAngVel = clamp(m_fAngVel, -0.3f, 0.3f); + m_fAngVel = Clamp(m_fAngVel, -0.3f, 0.3f); m_fAngle += m_fAngVel; m_nDoorState = DOORST_SWINGING; diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp index 98e1f5fa..6e302e01 100644 --- a/src/vehicles/Heli.cpp +++ b/src/vehicles/Heli.cpp @@ -250,7 +250,7 @@ CHeli::ProcessControl(void) // Move up if too low if(GetPosition().z - 2.0f < groundZ && m_heliStatus != HELI_STATUS_SHOT_DOWN) m_vecMoveSpeed.z += CTimer::GetTimeStep()*0.01f; - m_vecMoveSpeed.z = clamp(m_vecMoveSpeed.z, -0.3f, 0.3f); + m_vecMoveSpeed.z = Clamp(m_vecMoveSpeed.z, -0.3f, 0.3f); } float fTargetDist = vTargetDist.Magnitude(); diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp index 532be938..8ea03bf7 100644 --- a/src/vehicles/Plane.cpp +++ b/src/vehicles/Plane.cpp @@ -106,7 +106,7 @@ void CPlane::DeleteRwObject(void) { if(m_rwObject && RwObjectGetType(m_rwObject) == rpATOMIC){ - m_matrix.Detach(); + GetMatrix().Detach(); if(RwObjectGetType(m_rwObject) == rpATOMIC){ // useless check RwFrame *f = RpAtomicGetFrame((RpAtomic*)m_rwObject); RpAtomicDestroy((RpAtomic*)m_rwObject); @@ -556,13 +556,13 @@ CPlane::ProcessControl(void) m_rwObject = CModelInfo::GetModelInfo(mi->m_planeLodId)->CreateInstance(); POP_MEMID(); if(m_rwObject) - m_matrix.AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject))); + GetMatrix().AttachRW(RwFrameGetMatrix(RpAtomicGetFrame((RpAtomic*)m_rwObject))); } } }else if(CStreaming::HasModelLoaded(GetModelIndex())){ if(m_rwObject && RwObjectGetType(m_rwObject) == rpATOMIC){ // Get rid of LOD model - m_matrix.Detach(); + GetMatrix().Detach(); if(m_rwObject){ // useless check if(RwObjectGetType(m_rwObject) == rpATOMIC){ // useless check RwFrame *f = RpAtomicGetFrame((RpAtomic*)m_rwObject); diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 6696f4a6..451f3a39 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -18,6 +18,7 @@ #include "Radar.h" #include "Fire.h" #include "Darkel.h" +#include "SaveBuf.h" bool CVehicle::bWheelsOnlyCheat; bool CVehicle::bAllDodosCheat; @@ -29,10 +30,10 @@ bool CVehicle::bAltDodoCheat; #endif bool CVehicle::m_bDisableMouseSteering = true; -void *CVehicle::operator new(size_t sz) { return CPools::GetVehiclePool()->New(); } -void *CVehicle::operator new(size_t sz, int handle) { return CPools::GetVehiclePool()->New(handle); } -void CVehicle::operator delete(void *p, size_t sz) { CPools::GetVehiclePool()->Delete((CVehicle*)p); } -void CVehicle::operator delete(void *p, int handle) { CPools::GetVehiclePool()->Delete((CVehicle*)p); } +void *CVehicle::operator new(size_t sz) throw() { return CPools::GetVehiclePool()->New(); } +void *CVehicle::operator new(size_t sz, int handle) throw() { return CPools::GetVehiclePool()->New(handle); } +void CVehicle::operator delete(void *p, size_t sz) throw() { CPools::GetVehiclePool()->Delete((CVehicle*)p); } +void CVehicle::operator delete(void *p, int handle) throw() { CPools::GetVehiclePool()->Delete((CVehicle*)p); } #ifdef FIX_BUGS // I think they meant that @@ -108,7 +109,7 @@ CVehicle::CVehicle(uint8 CreatedBy) m_fMapObjectHeightAhead = m_fMapObjectHeightBehind = 0.0f; m_audioEntityId = DMAudio.CreateEntity(AUDIOTYPE_PHYSICAL, this); if(m_audioEntityId >= 0) - DMAudio.SetEntityStatus(m_audioEntityId, true); + DMAudio.SetEntityStatus(m_audioEntityId, TRUE); m_nRadioStation = CGeneral::GetRandomNumber() % USERTRACK; m_pCurGroundEntity = nil; m_bRainAudioCounter = 0; @@ -429,8 +430,8 @@ CVehicle::FlyingControl(eFlightModel flightModel) } if (CPad::GetPad(0)->GetHorn()) { fYaw = 0.0f; - fPitch = clamp(10.0f * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f); - fRoll = clamp(10.0f * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f); + fPitch = Clamp(10.0f * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f); + fRoll = Clamp(10.0f * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f); } ApplyTurnForce(fPitch * GetUp() * fPitchVar * m_fTurnMass * CTimer::GetTimeStep(), GetForward()); ApplyTurnForce(fRoll * GetUp() * fRollVar * m_fTurnMass * CTimer::GetTimeStep(), GetRight()); @@ -497,11 +498,12 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon if(contactSpeedRight != 0.0f){ // exert opposing force right = -contactSpeedRight/wheelsOnGround; -#ifdef FIX_BUGS + // BUG? // contactSpeedRight is independent of framerate but right has timestep as a factor // so we probably have to fix this - right *= CTimer::GetTimeStepFix(); -#endif + // fixing this causes jittery cars at 15fps, and causes the car to move backwards slowly at 18fps + // at 19fps, the effects are gone ... + //right *= CTimer::GetTimeStepFix(); if(wheelStatus == WHEEL_STATUS_BURST){ float fwdspeed = Min(contactSpeedFwd, fBurstSpeedMax); @@ -525,7 +527,8 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon #ifdef FIX_BUGS // contactSpeedFwd is independent of framerate but fwd has timestep as a factor // so we probably have to fix this - fwd *= CTimer::GetTimeStepFix(); + // better get rid of it here too + //fwd *= CTimer::GetTimeStepFix(); #endif if(!bBraking){ @@ -858,12 +861,11 @@ CVehicle::ProcessDelayedExplosion(void) if(IsCar() && ((CAutomobile*)this)->m_bombType == CARBOMB_TIMEDACTIVE && (m_nBombTimer & 0xFE00) != (prev & 0xFE00)) DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_BOMB_TICK, 0.0f); - if (m_nBombTimer != 0) - return; - - if(FindPlayerVehicle() != this && m_pBlowUpEntity == FindPlayerPed()) - CWorld::Players[CWorld::PlayerInFocus].AwardMoneyForExplosion(this); - BlowUpCar(m_pBlowUpEntity); + if (m_nBombTimer == 0){ + if(FindPlayerVehicle() != this && m_pBlowUpEntity == FindPlayerPed()) + CWorld::Players[CWorld::PlayerInFocus].AwardMoneyForExplosion(this); + BlowUpCar(m_pBlowUpEntity); + } } bool @@ -1205,7 +1207,7 @@ CVehicle::ProcessCarAlarm(void) { uint32 step; - if(!IsAlarmOn()) + if(m_nAlarmState == 0 || m_nAlarmState == -1) return; step = CTimer::GetTimeStepInMilliseconds(); @@ -1260,42 +1262,42 @@ DestroyVehicleAndDriverAndPassengers(CVehicle* pVehicle) void CVehicle::Save(uint8*& buf) { - SkipSaveBuf(buf, 4); - WriteSaveBuf(buf, GetRight().x); - WriteSaveBuf(buf, GetRight().y); - WriteSaveBuf(buf, GetRight().z); - SkipSaveBuf(buf, 4); - WriteSaveBuf(buf, GetForward().x); - WriteSaveBuf(buf, GetForward().y); - WriteSaveBuf(buf, GetForward().z); - SkipSaveBuf(buf, 4); - WriteSaveBuf(buf, GetUp().x); - WriteSaveBuf(buf, GetUp().y); - WriteSaveBuf(buf, GetUp().z); - SkipSaveBuf(buf, 4); - WriteSaveBuf(buf, GetPosition().x); - WriteSaveBuf(buf, GetPosition().y); - WriteSaveBuf(buf, GetPosition().z); - SkipSaveBuf(buf, 16); + ZeroSaveBuf(buf, 4); + WriteSaveBuf(buf, GetRight().x); + WriteSaveBuf(buf, GetRight().y); + WriteSaveBuf(buf, GetRight().z); + ZeroSaveBuf(buf, 4); + WriteSaveBuf(buf, GetForward().x); + WriteSaveBuf(buf, GetForward().y); + WriteSaveBuf(buf, GetForward().z); + ZeroSaveBuf(buf, 4); + WriteSaveBuf(buf, GetUp().x); + WriteSaveBuf(buf, GetUp().y); + WriteSaveBuf(buf, GetUp().z); + ZeroSaveBuf(buf, 4); + WriteSaveBuf(buf, GetPosition().x); + WriteSaveBuf(buf, GetPosition().y); + WriteSaveBuf(buf, GetPosition().z); + ZeroSaveBuf(buf, 16); SaveEntityFlags(buf); - SkipSaveBuf(buf, 212); + ZeroSaveBuf(buf, 212); AutoPilot.Save(buf); - WriteSaveBuf(buf, m_currentColour1); - WriteSaveBuf(buf, m_currentColour2); - SkipSaveBuf(buf, 2); - WriteSaveBuf(buf, m_nAlarmState); - SkipSaveBuf(buf, 43); - WriteSaveBuf(buf, m_nNumMaxPassengers); - SkipSaveBuf(buf, 2); - WriteSaveBuf(buf, field_1D0[0]); - WriteSaveBuf(buf, field_1D0[1]); - WriteSaveBuf(buf, field_1D0[2]); - WriteSaveBuf(buf, field_1D0[3]); - SkipSaveBuf(buf, 8); - WriteSaveBuf(buf, m_fSteerAngle); - WriteSaveBuf(buf, m_fGasPedal); - WriteSaveBuf(buf, m_fBrakePedal); - WriteSaveBuf(buf, VehicleCreatedBy); + WriteSaveBuf(buf, m_currentColour1); + WriteSaveBuf(buf, m_currentColour2); + ZeroSaveBuf(buf, 2); + WriteSaveBuf(buf, m_nAlarmState); + ZeroSaveBuf(buf, 43); + WriteSaveBuf(buf, m_nNumMaxPassengers); + ZeroSaveBuf(buf, 2); + WriteSaveBuf(buf, field_1D0[0]); + WriteSaveBuf(buf, field_1D0[1]); + WriteSaveBuf(buf, field_1D0[2]); + WriteSaveBuf(buf, field_1D0[3]); + ZeroSaveBuf(buf, 8); + WriteSaveBuf(buf, m_fSteerAngle); + WriteSaveBuf(buf, m_fGasPedal); + WriteSaveBuf(buf, m_fBrakePedal); + WriteSaveBuf(buf, VehicleCreatedBy); uint8 flags = 0; if (bIsLawEnforcer) flags |= BIT(0); if (bIsLocked) flags |= BIT(3); @@ -1303,19 +1305,19 @@ CVehicle::Save(uint8*& buf) if (bIsHandbrakeOn) flags |= BIT(5); if (bLightsOn) flags |= BIT(6); if (bFreebies) flags |= BIT(7); - WriteSaveBuf(buf, flags); - SkipSaveBuf(buf, 10); - WriteSaveBuf(buf, m_fHealth); - WriteSaveBuf(buf, m_nCurrentGear); - SkipSaveBuf(buf, 3); - WriteSaveBuf(buf, m_fChangeGearTime); - SkipSaveBuf(buf, 4); - WriteSaveBuf(buf, m_nTimeOfDeath); - SkipSaveBuf(buf, 2); - WriteSaveBuf(buf, m_nBombTimer); - SkipSaveBuf(buf, 12); - WriteSaveBuf(buf, m_nDoorLock); - SkipSaveBuf(buf, 99); + WriteSaveBuf(buf, flags); + ZeroSaveBuf(buf, 10); + WriteSaveBuf(buf, m_fHealth); + WriteSaveBuf(buf, m_nCurrentGear); + ZeroSaveBuf(buf, 3); + WriteSaveBuf(buf, m_fChangeGearTime); + ZeroSaveBuf(buf, 4); + WriteSaveBuf(buf, m_nTimeOfDeath); + ZeroSaveBuf(buf, 2); + WriteSaveBuf(buf, m_nBombTimer); + ZeroSaveBuf(buf, 12); + WriteSaveBuf(buf, m_nDoorLock); + ZeroSaveBuf(buf, 96); } void @@ -1323,43 +1325,44 @@ CVehicle::Load(uint8*& buf) { CMatrix tmp; SkipSaveBuf(buf, 4); - tmp.GetRight().x = ReadSaveBuf(buf); - tmp.GetRight().y = ReadSaveBuf(buf); - tmp.GetRight().z = ReadSaveBuf(buf); + ReadSaveBuf(&tmp.GetRight().x, buf); + ReadSaveBuf(&tmp.GetRight().y, buf); + ReadSaveBuf(&tmp.GetRight().z, buf); SkipSaveBuf(buf, 4); - tmp.GetForward().x = ReadSaveBuf(buf); - tmp.GetForward().y = ReadSaveBuf(buf); - tmp.GetForward().z = ReadSaveBuf(buf); + ReadSaveBuf(&tmp.GetForward().x, buf); + ReadSaveBuf(&tmp.GetForward().y, buf); + ReadSaveBuf(&tmp.GetForward().z, buf); SkipSaveBuf(buf, 4); - tmp.GetUp().x = ReadSaveBuf(buf); - tmp.GetUp().y = ReadSaveBuf(buf); - tmp.GetUp().z = ReadSaveBuf(buf); + ReadSaveBuf(&tmp.GetUp().x, buf); + ReadSaveBuf(&tmp.GetUp().y, buf); + ReadSaveBuf(&tmp.GetUp().z, buf); SkipSaveBuf(buf, 4); - tmp.GetPosition().x = ReadSaveBuf(buf); - tmp.GetPosition().y = ReadSaveBuf(buf); - tmp.GetPosition().z = ReadSaveBuf(buf); + ReadSaveBuf(&tmp.GetPosition().x, buf); + ReadSaveBuf(&tmp.GetPosition().y, buf); + ReadSaveBuf(&tmp.GetPosition().z, buf); m_matrix = tmp; SkipSaveBuf(buf, 16); LoadEntityFlags(buf); SkipSaveBuf(buf, 212); AutoPilot.Load(buf); - m_currentColour1 = ReadSaveBuf(buf); - m_currentColour2 = ReadSaveBuf(buf); + ReadSaveBuf(&m_currentColour1, buf); + ReadSaveBuf(&m_currentColour2, buf); SkipSaveBuf(buf, 2); - m_nAlarmState = ReadSaveBuf(buf); + ReadSaveBuf(&m_nAlarmState, buf); SkipSaveBuf(buf, 43); - m_nNumMaxPassengers = ReadSaveBuf(buf); + ReadSaveBuf(&m_nNumMaxPassengers, buf); SkipSaveBuf(buf, 2); - field_1D0[0] = ReadSaveBuf(buf); - field_1D0[1] = ReadSaveBuf(buf); - field_1D0[2] = ReadSaveBuf(buf); - field_1D0[3] = ReadSaveBuf(buf); + ReadSaveBuf(&field_1D0[0], buf); + ReadSaveBuf(&field_1D0[1], buf); + ReadSaveBuf(&field_1D0[2], buf); + ReadSaveBuf(&field_1D0[3], buf); SkipSaveBuf(buf, 8); - m_fSteerAngle = ReadSaveBuf(buf); - m_fGasPedal = ReadSaveBuf(buf); - m_fBrakePedal = ReadSaveBuf(buf); - VehicleCreatedBy = ReadSaveBuf(buf); - uint8 flags = ReadSaveBuf(buf); + ReadSaveBuf(&m_fSteerAngle, buf); + ReadSaveBuf(&m_fGasPedal, buf); + ReadSaveBuf(&m_fBrakePedal, buf); + ReadSaveBuf(&VehicleCreatedBy, buf); + uint8 flags; + ReadSaveBuf(&flags, buf); bIsLawEnforcer = !!(flags & BIT(0)); bIsLocked = !!(flags & BIT(3)); bEngineOn = !!(flags & BIT(4)); @@ -1367,16 +1370,16 @@ CVehicle::Load(uint8*& buf) bLightsOn = !!(flags & BIT(6)); bFreebies = !!(flags & BIT(7)); SkipSaveBuf(buf, 10); - m_fHealth = ReadSaveBuf(buf); - m_nCurrentGear = ReadSaveBuf(buf); + ReadSaveBuf(&m_fHealth, buf); + ReadSaveBuf(&m_nCurrentGear, buf); SkipSaveBuf(buf, 3); - m_fChangeGearTime = ReadSaveBuf(buf); + ReadSaveBuf(&m_fChangeGearTime, buf); SkipSaveBuf(buf, 4); - m_nTimeOfDeath = ReadSaveBuf(buf); + ReadSaveBuf(&m_nTimeOfDeath, buf); SkipSaveBuf(buf, 2); - m_nBombTimer = ReadSaveBuf(buf); + ReadSaveBuf(&m_nBombTimer, buf); SkipSaveBuf(buf, 12); - m_nDoorLock = (eCarLock)ReadSaveBuf(buf); - SkipSaveBuf(buf, 99); + ReadSaveBuf(&m_nDoorLock, buf); + SkipSaveBuf(buf, 96); } #endif diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index a6a4f815..738cfc0f 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -25,8 +25,7 @@ enum eCarLock { CARLOCK_LOCKOUT_PLAYER_ONLY, CARLOCK_LOCKED_PLAYER_INSIDE, CARLOCK_LOCKED_INITIALLY, - CARLOCK_FORCE_SHUT_DOORS, - CARLOCK_SKIP_SHUT_DOORS + CARLOCK_FORCE_SHUT_DOORS }; enum eDoors @@ -182,21 +181,21 @@ public: float m_fMapObjectHeightBehind; // rear Z? eCarLock m_nDoorLock; int8 m_nLastWeaponDamage; // see eWeaponType, -1 if no damage - int8 m_nRadioStation; + uint8 m_nRadioStation; uint8 m_bRainAudioCounter; uint8 m_bRainSamplesCounter; uint8 m_nCarHornTimer; uint8 m_nCarHornPattern; // last horn? - bool m_bSirenOrAlarm; + uint8 m_bSirenOrAlarm; int8 m_comedyControlState; CStoredCollPoly m_aCollPolys[2]; // poly which is under front/rear part of car float m_fSteerInput; eVehicleType m_vehType; - static void *operator new(size_t); - static void *operator new(size_t sz, int slot); - 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 sz, int slot) throw(); + static void operator delete(void*, size_t) throw(); + static void operator delete(void*, int) throw(); CVehicle(void) {} // FAKE CVehicle(uint8 CreatedBy); @@ -276,7 +275,7 @@ public: #endif CVehicleModelInfo* GetModelInfo() { return (CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()); } bool IsTaxi(void) { return GetModelIndex() == MI_TAXI || GetModelIndex() == MI_CABBIE || GetModelIndex() == MI_BORGNINE; } - AnimationId GetDriverAnim(void) { return IsCar() && bLowVehicle ? ANIM_CAR_LSIT : (IsBoat() && GetModelIndex() != MI_SPEEDER ? ANIM_DRIVE_BOAT : ANIM_CAR_SIT); } + AnimationId GetDriverAnim(void) { return IsCar() && bLowVehicle ? ANIM_STD_CAR_SIT_LO : (IsBoat() && GetModelIndex() != MI_SPEEDER ? ANIM_STD_BOAT_DRIVE : ANIM_STD_CAR_SIT); } static bool bWheelsOnlyCheat; static bool bAllDodosCheat; diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp index e87a7407..bfe27e18 100644 --- a/src/weapons/BulletInfo.cpp +++ b/src/weapons/BulletInfo.cpp @@ -121,7 +121,7 @@ void CBulletInfo::Update(void) if (pPed->DoesLOSBulletHitPed(point)) { if (pPed->IsPedInControl() && !pPed->bIsDucking) { pPed->ClearAttackByRemovingAnim(); - CAnimBlendAssociation* pAnim = CAnimManager::AddAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_SHOT_FRONT_PARTIAL); + CAnimBlendAssociation* pAnim = CAnimManager::AddAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HITBYGUN_FRONT); pAnim->SetBlend(0.0f, 8.0f); } pPed->InflictDamage(pBullet->m_pSource, pBullet->m_eWeaponType, pBullet->m_nDamage, (ePedPieceTypes)point.pieceB, pPed->GetLocalDirection(pPed->GetPosition() - point.point)); @@ -146,9 +146,9 @@ void CBulletInfo::Update(void) if (pPed->GetPedState() == PED_DEAD) { CAnimBlendAssociation* pAnim; if (RpAnimBlendClumpGetFirstAssociation(pPed->GetClump(), ASSOC_FRONTAL)) - pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f); + pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f); else - pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT, 8.0f); + pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR, 8.0f); if (pAnim) { pAnim->SetCurrentTime(0.0f); pAnim->flags |= ASSOC_RUNNING; diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp index 8ab81748..f79c0278 100644 --- a/src/weapons/Explosion.cpp +++ b/src/weapons/Explosion.cpp @@ -46,7 +46,7 @@ CExplosion::Initialise() } AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1); if (AudioHandle >= 0) - DMAudio.SetEntityStatus(AudioHandle, true); + DMAudio.SetEntityStatus(AudioHandle, TRUE); debug("CExplosion ready\n"); } diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index a987a4c7..d6af8202 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -30,6 +30,7 @@ #include "WaterLevel.h" #include "WeaponInfo.h" #include "World.h" +#include "SaveBuf.h" uint16 gReloadSampleTime[WEAPONTYPE_LAST_WEAPONTYPE] = { @@ -49,6 +50,29 @@ uint16 gReloadSampleTime[WEAPONTYPE_LAST_WEAPONTYPE] = 0 // HELICANNON }; +#ifdef FREE_CAM +static bool +Find3rdPersonCamTargetVectorFromCachedVectors(float dist, CVector pos, CVector& source, CVector& target, CVector camSource, CVector camFront, CVector camUp) +{ + if (CPad::GetPad(0)->GetLookBehindForPed()) { + source = pos; + target = dist * FindPlayerPed()->GetForward() + source; + return false; + } else { + float angleX = DEGTORAD((TheCamera.m_f3rdPersonCHairMultX - 0.5f) * 1.8f * 0.5f * TheCamera.Cams[TheCamera.ActiveCam].FOV * CDraw::GetAspectRatio()); + float angleY = DEGTORAD((0.5f - TheCamera.m_f3rdPersonCHairMultY) * 1.8f * 0.5f * TheCamera.Cams[TheCamera.ActiveCam].FOV); + source = camSource; + target = camFront; + target += camUp * Tan(angleY); + target += CrossProduct(camFront, camUp) * Tan(angleX); + target.Normalise(); + source += DotProduct(pos - source, target) * target; + target = dist * target + source; + return true; + } +} +#endif + CWeaponInfo * CWeapon::GetInfo() { @@ -202,7 +226,7 @@ CWeapon::Fire(CEntity *shooter, CVector *fireSource) else if ( shooter->IsPed() && ((CPed*)shooter)->m_pSeekTarget != nil ) { float distToTarget = (shooter->GetPosition() - ((CPed*)shooter)->m_pSeekTarget->GetPosition()).Magnitude(); - float power = clamp((distToTarget-10.0f)*0.02f, 0.2f, 1.0f); + float power = Clamp((distToTarget-10.0f)*0.02f, 0.2f, 1.0f); fired = FireProjectile(shooter, source, power); } @@ -473,9 +497,9 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource) victimPed->ApplyMoveForce(posOffset.x*-5.0f, posOffset.y*-5.0f, 3.0f); if ( isBat && victimPed->IsPlayer() ) - victimPed->SetFall(3000, AnimationId(ANIM_KO_SKID_FRONT + localDir), false); + victimPed->SetFall(3000, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false); else - victimPed->SetFall(1500, AnimationId(ANIM_KO_SKID_FRONT + localDir), false); + victimPed->SetFall(1500, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false); shooterPed->m_pSeekTarget = victimPed; shooterPed->m_pSeekTarget->RegisterReference(&shooterPed->m_pSeekTarget); @@ -578,11 +602,43 @@ CWeapon::FireInstantHit(CEntity *shooter, CVector *fireSource) ProcessLineOfSight(*fireSource, target, point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false); } +#ifdef FIX_BUGS + // fix muzzleflash rotation + heading = CGeneral::GetAngleBetweenPoints(fireSource->x, fireSource->y, target.x, target.y); + angle = DEGTORAD(heading); + + ahead = CVector2D(-Sin(angle), Cos(angle)); + ahead.Normalise(); +#endif } else if ( shooter == FindPlayerPed() && TheCamera.Cams[0].Using3rdPersonMouseCam() ) { CVector src, trgt; - TheCamera.Find3rdPersonCamTargetVector(info->m_fRange, *fireSource, src, trgt); +#ifdef FREE_CAM + if (CCamera::bFreeCam) { + CPlayerPed *shooterPed = (CPlayerPed*)shooter; + Find3rdPersonCamTargetVectorFromCachedVectors(info->m_fRange, *fireSource, src, trgt, shooterPed->m_cachedCamSource, shooterPed->m_cachedCamFront, shooterPed->m_cachedCamUp); + if ((shooterPed->m_pedIK.m_flags & CPedIK::GUN_POINTED_SUCCESSFULLY) == 0) { + trgt.x = info->m_fRange; + trgt.y = 0.0f; + trgt.z = 0.0f; + + shooterPed->TransformToNode(trgt, PED_HANDR); + } + } else +#endif + { + TheCamera.Find3rdPersonCamTargetVector(info->m_fRange, *fireSource, src, trgt); + } + +#ifdef FIX_BUGS + // fix muzzleflash rotation + heading = CGeneral::GetAngleBetweenPoints(src.x, src.y, trgt.x, trgt.y); + angle = DEGTORAD(heading); + + ahead = CVector2D(-Sin(angle), Cos(angle)); + ahead.Normalise(); +#endif CWorld::bIncludeDeadPeds = true; ProcessLineOfSight(src, trgt,point, victim, m_eWeaponType, shooter, true, true, true, true, true, true, false); @@ -904,7 +960,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim, victimPed->bIsStanding = false; victimPed->ApplyMoveForce(posOffset.x*-5.0f, posOffset.y*-5.0f, 5.0f); - victimPed->SetFall(1500, AnimationId(ANIM_KO_SKID_FRONT + localDir), false); + victimPed->SetFall(1500, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false); victimPed->InflictDamage(shooter, m_eWeaponType, info->m_nDamage, (ePedPieceTypes)point->pieceB, localDir); } @@ -917,7 +973,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim, { victimPed->ClearAttackByRemovingAnim(); - CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir)); + CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir)); ASSERT(asoc!=nil); asoc->blendAmount = 0.0f; @@ -933,7 +989,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim, { victimPed->ClearAttackByRemovingAnim(); - CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir)); + CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir)); ASSERT(asoc!=nil); asoc->blendAmount = 0.0f; @@ -983,9 +1039,9 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim, { CAnimBlendAssociation *asoc; if ( RpAnimBlendClumpGetFirstAssociation(victimPed->GetClump(), ASSOC_FRONTAL) ) - asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f); + asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f); else - asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT, 8.0f); + asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR, 8.0f); if ( asoc ) { @@ -1181,8 +1237,19 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource) if ( shooter == FindPlayerPed() && TheCamera.Cams[0].Using3rdPersonMouseCam() ) { - TheCamera.Find3rdPersonCamTargetVector(1.0f, *fireSource, source, target); - CVector Left = CrossProduct(TheCamera.Cams[TheCamera.ActiveCam].Front, TheCamera.Cams[TheCamera.ActiveCam].Up); + CVector Left; +#ifdef FREE_CAM + if (CCamera::bFreeCam) { + CPlayerPed* shooterPed = (CPlayerPed*)shooter; + Find3rdPersonCamTargetVectorFromCachedVectors(1.0f, *fireSource, source, target, shooterPed->m_cachedCamSource, shooterPed->m_cachedCamFront, shooterPed->m_cachedCamUp); + Left = CrossProduct(shooterPed->m_cachedCamFront, shooterPed->m_cachedCamUp); + } + else +#endif + { + TheCamera.Find3rdPersonCamTargetVector(1.0f, *fireSource, source, target); + Left = CrossProduct(TheCamera.Cams[TheCamera.ActiveCam].Front, TheCamera.Cams[TheCamera.ActiveCam].Up); + } float f = float(i - 2) * (DEGTORAD(7.5f) / 2); target = f * Left + target - source; @@ -1248,7 +1315,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource) victimPed->ApplyMoveForce(posOffset.x*-2.0f, posOffset.y*-2.0f, 0.0f); if ( cantStandup ) - victimPed->SetFall(1500, AnimationId(ANIM_KO_SKID_FRONT + localDir), false); + victimPed->SetFall(1500, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false); victimPed->InflictDamage(shooter, m_eWeaponType, info->m_nDamage, (ePedPieceTypes)point.pieceB, localDir); @@ -1497,7 +1564,16 @@ CWeapon::FireAreaEffect(CEntity *shooter, CVector *fireSource) if ( shooter == FindPlayerPed() && TheCamera.Cams[0].Using3rdPersonMouseCam() ) { - TheCamera.Find3rdPersonCamTargetVector(info->m_fRange, *fireSource, source, target); +#ifdef FREE_CAM + if (CCamera::bFreeCam) { + CPlayerPed *shooterPed = (CPlayerPed*)shooter; + Find3rdPersonCamTargetVectorFromCachedVectors(info->m_fRange, *fireSource, source, target, shooterPed->m_cachedCamSource, shooterPed->m_cachedCamFront, shooterPed->m_cachedCamUp); + } + else +#endif + { + TheCamera.Find3rdPersonCamTargetVector(info->m_fRange, *fireSource, source, target); + } float norm = (1.0f / info->m_fRange); dir = (target - source) * norm; } @@ -1719,7 +1795,7 @@ CWeapon::FireInstantHitFromCar(CAutomobile *shooter, bool left) victimPed->ReactToAttack(FindPlayerPed()); victimPed->ClearAttackByRemovingAnim(); - CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir)); + CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir)); ASSERT(asoc!=nil); asoc->blendAmount = 0.0f; asoc->blendDelta = 8.0f; @@ -2089,7 +2165,7 @@ FireOneInstantHitRound(CVector *source, CVector *target, int32 damage) victimPed->ClearAttackByRemovingAnim(); - CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir)); + CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir)); ASSERT(asoc!=nil); asoc->blendAmount = 0.0f; asoc->blendDelta = 8.0f; @@ -2248,7 +2324,11 @@ CWeapon::HitsGround(CEntity *holder, CVector *fireSource, CEntity *aimingTo) void CWeapon::BlowUpExplosiveThings(CEntity *thing) { +#ifdef FIX_BUGS + if ( thing && thing->IsObject() ) +#else if ( thing ) +#endif { CObject *object = (CObject*)thing; int32 mi = object->GetModelIndex(); @@ -2315,7 +2395,7 @@ CWeapon::Save(uint8*& buf) CopyToBuf(buf, m_nAmmoTotal); CopyToBuf(buf, m_nTimer); CopyToBuf(buf, m_bAddRotOffset); - SkipSaveBuf(buf, 3); + ZeroSaveBuf(buf, 3); } void diff --git a/src/weapons/WeaponEffects.cpp b/src/weapons/WeaponEffects.cpp index 214ae9c7..32e55fb1 100644 --- a/src/weapons/WeaponEffects.cpp +++ b/src/weapons/WeaponEffects.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "WeaponEffects.h" #include "TxdStore.h" #include "Sprite.h" @@ -84,11 +85,15 @@ CWeaponEffects::Render(void) float w, h; if ( CSprite::CalcScreenCoors(gCrossHair.m_vecPos, &pos, &w, &h, true) ) { + PUSH_RENDERGROUP("CWeaponEffects::Render"); + float recipz = 1.0f / pos.z; CSprite::RenderOneXLUSprite(pos.x, pos.y, pos.z, gCrossHair.m_fSize * w, gCrossHair.m_fSize * h, gCrossHair.m_nRed, gCrossHair.m_nGreen, gCrossHair.m_nBlue, 255, recipz, 255); + + POP_RENDERGROUP(); } RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)FALSE); diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp index 10737acb..ba872454 100644 --- a/src/weapons/WeaponInfo.cpp +++ b/src/weapons/WeaponInfo.cpp @@ -37,8 +37,8 @@ CWeaponInfo::Initialise(void) debug("Initialising CWeaponInfo...\n"); for (int i = 0; i < WEAPONTYPE_TOTALWEAPONS; i++) { aWeaponInfo[i].m_eWeaponFire = WEAPON_FIRE_INSTANT_HIT; - aWeaponInfo[i].m_AnimToPlay = ANIM_PUNCH_R; - aWeaponInfo[i].m_Anim2ToPlay = NUM_ANIMS; + aWeaponInfo[i].m_AnimToPlay = ANIM_STD_PUNCH; + aWeaponInfo[i].m_Anim2ToPlay = ANIM_STD_NUM; aWeaponInfo[i].m_Flags = WEAPONFLAG_USE_GRAVITY | WEAPONFLAG_SLOWS_DOWN | WEAPONFLAG_RAND_SPEED | WEAPONFLAG_EXPANDS | WEAPONFLAG_EXPLODES; } debug("Loading weapon data...\n"); @@ -96,7 +96,7 @@ CWeaponInfo::LoadWeaponData(void) fireType[0] = '\0'; fireOffsetY = 0.0f; fireOffsetZ = 0.0f; - animId = ANIM_WALK; + animId = ANIM_STD_WALK; sscanf( &line[lp], "%s %s %f %d %d %d %d %f %f %f %f %f %f %f %s %s %f %f %f %f %d %d", diff --git a/utils/gxt/american.txt b/utils/gxt/american.txt index 3b010736..57ec4d74 100644 --- a/utils/gxt/american.txt +++ b/utils/gxt/american.txt @@ -2221,11 +2221,11 @@ Car bombs are $1000 each [GA_5] Your car is already fitted with a bomb. -[GA_6] -Park it, prime it by pressing the ~h~~k~~PED_FIREWEAPON~ button~w~ and LEG IT! +[GA_6] { re3 change } +Park it, prime it by pressing the ~h~~k~~VEHICLE_FIREWEAPON~ button~w~ and LEG IT! -[GA_7] -Arm with ~h~~k~~PED_FIREWEAPON~ button~w~. Bomb will go off when engine is started. +[GA_7] { re3 change } +Arm with ~h~~k~~VEHICLE_FIREWEAPON~ button~w~. Bomb will go off when engine is started. [GA_8] Use the detonator to activate the bomb. @@ -2440,33 +2440,6 @@ Accelerate [FEC_SMT] Special mission trigger -[FEC_CCF] -Configuration: - -[FEC_CF1] -Setup1 - -[FEC_CF2] -Setup2 - -[FEC_CF3] -Setup3 - -[FEC_CF4] -Setup4 - -[FEC_CDP] -Controller Display: - -[FEC_ONF] -On Foot - -[FEC_INC] -In Car - -[FEC_VIB] -Vibration: - [FEA_OUT] Output: @@ -3592,11 +3565,11 @@ Alright? [JM6_1] Get to the bank on the main drag. -[GA_6B] -Park it, prime it by pressing the ~h~~k~~PED_FIREWEAPON~ button~w~ and LEG IT! +[GA_6B] { re3 change } +Park it, prime it by pressing the ~h~~k~~VEHICLE_FIREWEAPON~ button~w~ and LEG IT! -[GA_7B] -Arm with ~h~~k~~PED_FIREWEAPON~ button~w~. Bomb will go off when engine is started. +[GA_7B] { re3 change } +Arm with ~h~~k~~VEHICLE_FIREWEAPON~ button~w~. Bomb will go off when engine is started. [BAT1] ~g~Pick up the bat! @@ -4027,11 +4000,11 @@ Drive your vehicle into the spray shop to lose your ~h~wanted level~w~, ~h~repai [HM1_1] ~g~Ice 20 Purple Nines in 2 minutes 30 seconds. -[KM1_8A] -Press the~h~ ~k~~PED_FIREWEAPON~ button~w~ to ~h~activate the bomb,~w~ remember to get out of the way. +[KM1_8A] { re3 change } +Press the~h~ ~k~~VEHICLE_FIREWEAPON~ button~w~ to ~h~activate the bomb,~w~ remember to get out of the way. -[KM1_8D] -Press the~h~ ~k~~PED_FIREWEAPON~ button~w~ to ~h~activate the bomb,~w~ remember to get out of the way. +[KM1_8D] { re3 change } +Press the~h~ ~k~~VEHICLE_FIREWEAPON~ button~w~ to ~h~activate the bomb,~w~ remember to get out of the way. [KM1_12] ~g~Get him to the dojo but get rid of the cops first! @@ -4168,11 +4141,11 @@ I don't need to see any I.D. you look trustworthy. [DETON] DETONATION: -[DRIVE_A] -Have an Uzi selected when entering a vehicle then look left or right and press the ~h~~k~~PED_FIREWEAPON~ button~w~ to fire. +[DRIVE_A] { re3 change } +Have an Uzi selected when entering a vehicle then look left or right and press the ~h~~k~~VEHICLE_FIREWEAPON~ button~w~ to fire. -[DRIVE_B] -Have an Uzi selected when entering a vehicle then look left or right and press the ~h~~k~~PED_FIREWEAPON~ button~w~ to fire. +[DRIVE_B] { re3 change } +Have an Uzi selected when entering a vehicle then look left or right and press the ~h~~k~~VEHICLE_FIREWEAPON~ button~w~ to fire. [RECORD] ~g~NEW RECORD!! @@ -4180,11 +4153,11 @@ Have an Uzi selected when entering a vehicle then look left or right and press t [NRECORD] ~r~NO NEW RECORD! -[RCHELP] -Press ~k~~PED_FIREWEAPON~, or drive the RC car into a vehicle's wheels to detonate. +[RCHELP] { re3 change } +Press ~k~~VEHICLE_FIREWEAPON~, or drive the RC car into a vehicle's wheels to detonate. -[RCHELPA] -Press the ~k~~PED_FIREWEAPON~ button, or drive the RC car into a vehicle's wheels to detonate. +[RCHELPA] { re3 change } +Press the ~k~~VEHICLE_FIREWEAPON~ button, or drive the RC car into a vehicle's wheels to detonate. [RC_1] You have 2 minutes to blow up as many Diablo Gang Cars as possible! @@ -4684,11 +4657,11 @@ LOVE'S DISAPPEARANCE [RM5_6] ~g~He's bailed out!! Smash his bodycast with a vehicle or an explosion!! -[PBOAT_1] -Press the ~h~~k~~PED_FIREWEAPON~ button~w~ to fire the boat cannons. +[PBOAT_1] { re3 change } +Press the ~h~~k~~VEHICLE_FIREWEAPON~ button~w~ to fire the boat cannons. -[PBOAT_2] -Press the ~h~~k~~PED_FIREWEAPON~ button~w~ to fire the boat cannons. +[PBOAT_2] { re3 change } +Press the ~h~~k~~VEHICLE_FIREWEAPON~ button~w~ to fire the boat cannons. [DIAB1_B] This is El Burro of the Diablos. @@ -4702,11 +4675,11 @@ There's a street race starting by the old school hall near the Callahan Bridge. [DIAB1_F] Get yourself some wheels and first through all the checkpoints wins the prize. -[HM2_1] -Use the RC buggies to destroy the armored cars. Press the ~h~~k~~PED_FIREWEAPON~ button ~w~to detonate. +[HM2_1] { re3 change } +Use the RC buggies to destroy the armored cars. Press the ~h~~k~~VEHICLE_FIREWEAPON~ button ~w~to detonate. -[HM2_1A] -Use the RC buggies to destroy the armored cars. Press the ~h~~k~~PED_FIREWEAPON~ button ~w~to detonate. +[HM2_1A] { re3 change } +Use the RC buggies to destroy the armored cars. Press the ~h~~k~~VEHICLE_FIREWEAPON~ button ~w~to detonate. [HM2_2] ~r~You failed to destroy all the armored cars! @@ -6517,11 +6490,11 @@ This Memory Card (PS2) is already formatted. [FEDSAS4] ;=<> - CHANGE SELECTION -[SPRAY_4] -Use the ~h~~k~~PED_FIREWEAPON~ button ~w~to fire the water cannon. +[SPRAY_4] { re3 change } +Use the ~h~~k~~VEHICLE_FIREWEAPON~ button ~w~to fire the water cannon. -[SPRAY_1] -Use the ~h~~k~~PED_FIREWEAPON~ button ~w~to fire the water cannon. +[SPRAY_1] { re3 change } +Use the ~h~~k~~VEHICLE_FIREWEAPON~ button ~w~to fire the water cannon. [LITTLE] LITTLE T @@ -7243,9 +7216,6 @@ CONNECTION [FET_AUD] AUDIO SETUP -[FET_GFX] -GFX SETUP - [FET_DIS] DISPLAY SETUP @@ -7957,7 +7927,7 @@ POLISH RUSSIAN { new display menus } -[FET_GRA] +[FET_GFX] GRAPHICS SETUP [FED_MIP] @@ -8022,6 +7992,7 @@ REPLAY MISSION [FESZ_RM] RETRY? +{ more graphics } [FED_VPL] VEHICLE PIPELINE @@ -8061,18 +8032,77 @@ PS2 [FEM_XBX] XBOX -[FEM_AUT] +[FEM_AUT] { aspect ratio related } AUTO +{ controls } [FEC_IVP] INVERT PAD VERTICALLY +{ map } [FEM_TWP] Toggle Waypoint [FEA_FMN] RADIO OFF +[FEC_DS2] +DUALSHOCK 2 + +[FEC_DS3] +DUALSHOCK 3 + +[FEC_DS4] +DUALSHOCK 4 + +[FEC_360] +XBOX 360 CONTROLLER + +[FEC_ONE] +XBOX ONE CONTROLLER + +[FEC_NSW] +NINTENDO SWITCH CONTROLLER + +[FEC_TYP] +GAMEPAD TYPE + +[FEC_CCF] +CONFIGURATION + +[FEC_CF1] +SETUP 1 + +[FEC_CF2] +SETUP 2 + +[FEC_CF3] +SETUP 3 + +[FEC_CF4] +SETUP 4 + +[FEC_CDP] +CONTROLLER DISPLAY + +[FEC_ONF] +ON FOOT + +[FEC_INC] +IN CAR + +[FEC_VIB] +VIBRATION + +[FET_AGS] +GAMEPAD SETTINGS + +[FEM_PED] +PED DENSITY + +[FEM_CAR] +CAR DENSITY + { end of file } [DUMMY] diff --git a/utils/gxt/build.bat b/utils/gxt/build.bat index 17eb7983..a674850e 100644 --- a/utils/gxt/build.bat +++ b/utils/gxt/build.bat @@ -4,4 +4,5 @@ gxt -g III -i "french.txt" -o "../../gamefiles/TEXT/french.gxt" gxt -g III -i "german.txt" -o "../../gamefiles/TEXT/german.gxt" gxt -g III -i "italian.txt" -o "../../gamefiles/TEXT/italian.gxt" gxt -g III -i "spanish.txt" -o "../../gamefiles/TEXT/spanish.gxt" -gxt -g III -r -i "russian.txt" -o "../../gamefiles/TEXT/russian.gxt" \ No newline at end of file +gxt -g III -r -i "russian.txt" -o "../../gamefiles/TEXT/russian.gxt" +gxt -g III -p -i "polish.txt" -o "../../gamefiles/TEXT/polish.gxt" diff --git a/utils/gxt/french.txt b/utils/gxt/french.txt index c2c125f0..bdb12c7b 100644 --- a/utils/gxt/french.txt +++ b/utils/gxt/french.txt @@ -1,4 +1,11 @@ -[LETTER1] +{ + New strings are at the bottom of file. + Do not change the order of strings. + You can fix the typos of existing translation but please refrain from + unnecessary edits like rephasing because you think it suits better for your taste. +} + +[LETTER1] abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"$,.'-?!!SDBF [DEFNAM] @@ -2233,11 +2240,11 @@ Une voiture piégée coûte 1000$ pièce! [GA_5] Ta voiture est déjà équipée d'une bombe. -[GA_6] -Gare-la, arme la bombe avec la ~h~touche ~k~~PED_FIREWEAPON~~w~ et CASSE-TOI! +[GA_6] { re3 change } +Gare-la, arme la bombe avec la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ et CASSE-TOI! -[GA_7] -Arme la bombe avec la ~h~touche ~k~~PED_FIREWEAPON~~w~. Elle explose au démarrage. +[GA_7] { re3 change } +Arme la bombe avec la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~. Elle explose au démarrage. [GA_8] Utilise le détonateur pour armer la bombe. @@ -2452,33 +2459,6 @@ Accélérateur [FEC_SMT] Déclencheur de mission spéciale -[FEC_CCF] -Configuration: - -[FEC_CF1] -Config1 - -[FEC_CF2] -Config2 - -[FEC_CF3] -Config3 - -[FEC_CF4] -Config4 - -[FEC_CDP] -Affichage de la manette: - -[FEC_ONF] -A pied - -[FEC_INC] -Dans un véhicule - -[FEC_VIB] -Vibrations: - [FEA_OUT] Sortie audio: @@ -3511,11 +3491,11 @@ D'accord ? [JM6_1] Va à la banque par la rue principale. -[GA_6B] -Tu la gares, tu l'amorces en appuyant sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ et tu te barres! +[GA_6B] { re3 change } +Tu la gares, tu l'amorces en appuyant sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ et tu te barres! -[GA_7B] -Pour armer la bombe, appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~. Elle explosera au démarrage. +[GA_7B] { re3 change } +Pour armer la bombe, appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~. Elle explosera au démarrage. [BAT1] ~g~Ramasse la batte! @@ -3946,11 +3926,11 @@ Amène ton véhicule à l'atelier de peinture pour annuler ton ~h~indice de rech [HM1_1] ~G~Refroidis 20 Nines violets en 2 minutes et 30 secondes. -[KM1_8A] -Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour ~h~activer la bombe~w~, n'oublie pas de t'éloigner. +[KM1_8A] { re3 change } +Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour ~h~activer la bombe~w~, n'oublie pas de t'éloigner. -[KM1_8D] -Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour ~h~activer la bombe~w~, n'oublie pas de t'éloigner. +[KM1_8D] { re3 change } +Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour ~h~activer la bombe~w~, n'oublie pas de t'éloigner. [KM1_12] ~g~Amène-le au dojo mais débarrasse-toi des flics d'abord! @@ -4087,11 +4067,11 @@ J'ai pas besoin de tes papiers d'identité. Je pense qu'on peut te faire confian [DETON] DETONATION : -[DRIVE_A] -Selectionne un Uzi quand tu montes dans la voiture, regarde à gauche ou à droite et appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour tirer. +[DRIVE_A] { re3 change } +Selectionne un Uzi quand tu montes dans la voiture, regarde à gauche ou à droite et appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour tirer. -[DRIVE_B] -Selectionne un Uzi quand tu montes dans la voiture, regarde à gauche ou à droite et appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour tirer. +[DRIVE_B] { re3 change } +Selectionne un Uzi quand tu montes dans la voiture, regarde à gauche ou à droite et appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour tirer. [RECORD] ~g~NOUVEAU RECORD! @@ -4099,11 +4079,11 @@ Selectionne un Uzi quand tu montes dans la voiture, regarde à gauche ou à droi [NRECORD] ~r~PAS DE RECORD! -[RCHELP] -Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ ou heurte une roue de voiture avec le véhicule télécommandé pour le faire exploser. +[RCHELP] { re3 change } +Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ ou heurte une roue de voiture avec le véhicule télécommandé pour le faire exploser. -[RCHELPA] -Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ ou heurte une roue de voiture avec le véhicule télécommandé pour le faire exploser. +[RCHELPA] { re3 change } +Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ ou heurte une roue de voiture avec le véhicule télécommandé pour le faire exploser. [RC_1] Tu as 2 minutes pour faire péter autant de voitures de Diablo que tu peux! @@ -4603,11 +4583,11 @@ LA DISPARITION DE LOVE [RM5_6] ~g~Il s'est enfui! Bousille-lui son plâtre avec une bagnole ou une explosion! -[PBOAT_1] -Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour tirer avec les canons du bateau. +[PBOAT_1] { re3 change } +Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour tirer avec les canons du bateau. -[PBOAT_2] -Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour tirer avec les canons du bateau. +[PBOAT_2] { re3 change } +Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour tirer avec les canons du bateau. [DIAB1_B] C'est El Burro des Diablos. @@ -4621,11 +4601,11 @@ Il y a une course de bagnoles qui va partir de la vieille école près du pont d [DIAB1_F] Trouve-toi une caisse et le premier qui franchit tous les points de passage, gagne le gros lot. -[HM2_1] -Utilise les buggies télécommandés pour détruire les voitures blindées. Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour les faire exploser. +[HM2_1] { re3 change } +Utilise les buggies télécommandés pour détruire les voitures blindées. Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour les faire exploser. -[HM2_1A] -Utilise les buggies télécommandés pour détruire les voitures blindées. Appuie sur la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour les faire exploser. +[HM2_1A] { re3 change } +Utilise les buggies télécommandés pour détruire les voitures blindées. Appuie sur la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour les faire exploser. [HM2_2] ~r~T'as pas réussi à détruire toutes leurs voitures blindées! @@ -6637,11 +6617,11 @@ Cette memory card (PS2) est déjà formatée. [FEDSAS4] ;=<> - CHANGER SELECTION -[SPRAY_4] -Utilise la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour tirer à l'aide du canon à eau. +[SPRAY_4] { re3 change } +Utilise la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour tirer à l'aide du canon à eau. -[SPRAY_1] -Utilise la ~h~touche ~k~~PED_FIREWEAPON~~w~ pour tirer à l'aide du canon à eau. +[SPRAY_1] { re3 change } +Utilise la ~h~touche ~k~~VEHICLE_FIREWEAPON~~w~ pour tirer à l'aide du canon à eau. [AM1_10] ~g~Salvatore Leone partira de chez Luigi vers 0~1~:~1~. @@ -7504,9 +7484,6 @@ CONNEXION [FET_AUD] CONFIG. AUDIO -[FET_GFX] -CONFIG. EFFETS SPECIAUX - [FET_DIS] CONFIG. AFFICHAGE @@ -8206,6 +8183,196 @@ MATERIEL INDISPONIBLE - PARAMETRE D'ORIGINE RETABLI [CRED270] MIKE HONG +{ re3 updates } +{ new languages } +[FEL_JAP] +JAPONAIS + +[FEL_POL] +POLONAIS + +[FEL_RUS] +RUSSE + +{ new display menus } +[FET_GFX] { this probably needs to be retranslated } +CONFIG. EFFETS SPECIAUX + +[FED_MIP] +MIP MAPPING + +[FED_AAS] +ANTI ALIASING + +[FED_FIL] +TEXTURE FILTERING + +[FED_BIL] +BILINEAR + +[FED_TRL] +TRILINEAR + +[FED_WND] +WINDOWED + +[FED_FLS] +FULLSCREEN + +[FEM_CSB] +CUTSCENE BORDERS + +[FEM_SCF] +SCREEN FORMAT + +[FEM_ISL] +MAP MEMORY USAGE + +[FEM_LOW] +LOW + +[FEM_MED] +MEDIUM + +[FEM_HIG] +HIGH + +[FEM_2PR] +PS2 ALPHA TEST + +[FEC_FRC] +FREE CAM + +{ Linux joy detection } +[FEC_JOD] +DETECT JOYSTICK + +[FEC_JPR] +Press any key on the joystick of your choice that you want to use on the game, and it will be selected. + +[FEC_JDE] +Detected joystick + +{ mission restart } +[FET_RMS] +REJOUER MISSION + +[FESZ_RM] +REJOUER? + +{ more graphics } +[FED_VPL] +VEHICLE PIPELINE + +[FED_PRM] +PED RIM LIGHT + +[FED_RGL] +ROAD GLOSS + +[FED_CLF] +COLOUR FILTER + +[FED_WLM] +WORLD LIGHTMAPS + +[FED_MBL] +MOTION BLUR + +[FEM_SIM] +SIMPLE + +[FEM_NRM] +NORMAL + +[FEM_MOB] +MOBILE + +[FED_MFX] +MATFX + +[FED_NEO] +NEO + +[FEM_PS2] +PS2 + +[FEM_XBX] +XBOX + +[FEM_AUT] { aspect ratio related } +AUTO + +{ controls } +[FEC_IVP] +INVERT PAD VERTICALLY + +{ map } +[FEM_TWP] +Toggle Waypoint + +[FEA_FMN] +RADIO ETEINTE + +[FEC_DS2] +DUALSHOCK 2 + +[FEC_DS3] +DUALSHOCK 3 + +[FEC_DS4] +DUALSHOCK 4 + +[FEC_360] +XBOX 360 CONTROLLER + +[FEC_ONE] +XBOX ONE CONTROLLER + +[FEC_NSW] +NINTENDO SWITCH CONTROLLER + +[FEC_TYP] +GAMEPAD TYPE + +[FEC_CCF] +CONFIGURATION + +[FEC_CF1] +CONFIGURATION 1 + +[FEC_CF2] +CONFIGURATION 2 + +[FEC_CF3] +CONFIGURATION 3 + +[FEC_CF4] +CONFIGURATION 4 + +[FEC_CDP] +AFFICHAGE DE LA MANETTE + +[FEC_ONF] +A PIED + +[FEC_INC] +DANS UN VÉHICULE + +[FEC_VIB] +VIBRATIONS + +[FET_AGS] +GAMEPAD SETTINGS + +[FEM_PED] +PED DENSITY + +[FEM_CAR] +CAR DENSITY + +{ end of file } + [DUMMY] THIS LABEL NEEDS TO BE HERE !!! AS THE LAST LABEL DOES NOT GET COMPILED \ No newline at end of file diff --git a/utils/gxt/german.txt b/utils/gxt/german.txt index 8f3f207e..b77cb17c 100644 --- a/utils/gxt/german.txt +++ b/utils/gxt/german.txt @@ -1,11 +1,18 @@ -[LETTER1] +{ + New strings are at the bottom of file. + Do not change the order of strings. + You can fix the typos of existing translation but please refrain from + unnecessary edits like rephasing because you think it suits better for your taste. +} + +[LETTER1] abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"$,.'-?!!SDBF [DEFNAM] Claude---------------------- [ARSE] -ü ß ã +ü ß ä [IN_VEH] ~g~Hey! Zurück ins Auto!! @@ -17,7 +24,7 @@ Claude---------------------- ~g~Du brauchst ein Boot für diesen Job! [HEY] -~g~Keine Alleingãnge. Halt die Gang beisammen! +~g~Keine Alleingänge. Halt die Gang beisammen! [HEY2] ~g~Nicht aufteilen. Halt die Leute zusammen! @@ -29,7 +36,7 @@ Claude---------------------- ~g~Wenn du Misty verlierst, kriegst du's mit Luigi zu tun. Los, hol sie. [HEY5] -~g~Eines der Girls fehlt. Los, zurück! Treib das Mãdchen auf! +~g~Eines der Girls fehlt. Los, zurück! Treib das Mädchen auf! [HEY6] ~g~Du stehst mit deiner Ehre für den Yakuza Kanbu ein. Du musst ihn beschützen! @@ -71,16 +78,16 @@ Drücke die~h~ ~k~~VEHICLE_HANDBRAKE~-Taste~w~, um die ~h~Handbremse anzuziehen. Drücke die~h~ ~k~~VEHICLE_HANDBRAKE~-Taste~w~, um die ~h~Handbremse anzuziehen. [HELP7_A] -Halte die~h~ ~k~~PED_LOCK_TARGET~-Taste ~w~gedrückt, um mit dem Prãzisionsgewehr zu zielen. +Halte die~h~ ~k~~PED_LOCK_TARGET~-Taste ~w~gedrückt, um mit dem Präzisionsgewehr zu zielen. [HELP7_D] -Halte die~h~ ~k~~PED_LOCK_TARGET~-Taste ~w~gedrückt, um mit dem Prãzisionsgewehr zu zielen. +Halte die~h~ ~k~~PED_LOCK_TARGET~-Taste ~w~gedrückt, um mit dem Präzisionsgewehr zu zielen. [HELP8_A] Drücke die~h~ ~k~~PED_SNIPER_ZOOM_IN~-Taste~w~, um ~h~an das Ziel heranzuzoomen ~w~und die~h~ ~k~~PED_SNIPER_ZOOM_OUT~-Taste~w~,um ~h~herauszuzoomen ~w~. [HELP9_A] -Drücke die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um das Prãzisionsgewehr abzufeuern. +Drücke die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um das Präzisionsgewehr abzufeuern. [HELP10] Dieser Stern zeigt an, dass du von der Polizei gesucht wirst. @@ -107,7 +114,7 @@ Fahr den Wagen in eine Garage und geh dann nach draußen. ~g~Schüttle die Cops ab. Verringere deinen Fahndungslevel. [NODOORS] -~g~Das sind keine Sardinen! Besorg einen Wagen mit ausreichend Sitzplãtzen. +~g~Das sind keine Sardinen! Besorg einen Wagen mit ausreichend Sitzplätzen. [TRASH] ~g~Du hast deine Karre ziemlich geschrottet! Repariere sie! @@ -212,7 +219,7 @@ Molotowcocktails wurden im Versteck angeliefert. AK47 wurde im Versteck angeliefert. [PAGEB8] -Prãzisionsgewehr wurde im Versteck angeliefert. +Präzisionsgewehr wurde im Versteck angeliefert. [PAGEB9] M16 wurde im Versteck angeliefert. @@ -242,7 +249,7 @@ drei... Steigt dein ~h~Fahndungslevel~w~, wirst du von besser ausgebildeten Polizisten gejagt. [WANT_G] -Wirst du ~h~verhaftet~w~, wirst du zum nãchsten Polizeirevier gebracht. +Wirst du ~h~verhaftet~w~, wirst du zum nächsten Polizeirevier gebracht. [WANT_H] Die Cops werden dir alle Waffen abnehmen und kassieren ein wenig Bestechungsgeld von dir. @@ -257,13 +264,13 @@ Im Verlauf des Spiels wirst du Möglichkeiten entdecken, deinen Fahndungslevel z Wenn du in einem Wagen sitzt, werden ~h~LACKIEREREIEN~w~ den Fahndungslevel ~h~annullieren. [HEAL_B] -Wenn du ~h~'außer Gefecht'~w~ bist, wirst du zur nãchsten Klinik gebracht. +Wenn du ~h~'außer Gefecht'~w~ bist, wirst du zur nächsten Klinik gebracht. [HEAL_C] -Du verlierst alle Waffen, und die Ãrzte knöpfen dir ein wenig Cash für die Behandlung ab. +Du verlierst alle Waffen, und die Ärzte knöpfen dir ein wenig Cash für die Behandlung ab. [HEAL_E] -Je lãnger du spielst, desto mehr Wege wirst du finden, dich selbst zu verarzten oder zu schützen. +Je länger du spielst, desto mehr Wege wirst du finden, dich selbst zu verarzten oder zu schützen. [DAM] SCHADEN: @@ -290,7 +297,7 @@ GESAMMELT: Fahr deinen Wagen in die Bombenwerkstatt, um eine ~h~Bombe~w~ anzubringen. Kosten - ~h~$1000. [SAVE1] -Geh durch den Eingang. So kannst du dein ~h~Spiel speichern~w~. Wãhrend einer Mission kannst du nicht speichern. +Geh durch den Eingang. So kannst du dein ~h~Spiel speichern~w~. Während einer Mission kannst du nicht speichern. [SAVE2] Jedes Fahrzeug, das in dieser Garage abgestellt wird, wird für dich aufbewahrt, wenn das Spiel gespeichert wird. @@ -566,28 +573,28 @@ Luigis Club ~g~Du bist bereits auf einer Mission! [LUIGGO] -~g~Luigi checkt gerade ein paar neue Girls aus. Komm spãter wieder! +~g~Luigi checkt gerade ein paar neue Girls aus. Komm später wieder! [JOEYGO] -~g~Joey ist mit Misty in der Stadt unterwegs. Komm spãter wieder! +~g~Joey ist mit Misty in der Stadt unterwegs. Komm später wieder! [TONIGO] ~g~Toni ist mit seiner Mamma in der Oper. Probier's ein andermal! [KEMUGO] -~g~Maria und Kemuri sind gerade beschãftigt. Versuch's spãter nochmal! +~g~Maria und Kemuri sind gerade beschäftigt. Versuch's später nochmal! [KENJGO] ~g~Kenji ist bei einem Yakuza-Treffen. Schau ein andermal wieder vorbei. [RAYGO] -~g~Ray hãngt gerade auf irgend einem anderen Klo rum. Komm spãter wieder! +~g~Ray hängt gerade auf irgend einem anderen Klo rum. Komm später wieder! [LOVEGO] -~g~Donald Love hat anderes zu tun. Vielleicht hat er spãter Zeit! +~g~Donald Love hat anderes zu tun. Vielleicht hat er später Zeit! [KENSGO] -~g~Kenji hat zu tun! Komm spãter wieder! +~g~Kenji hat zu tun! Komm später wieder! [ASUSGO] ~g~Asuka hat gerade überhaupt keine Zeit! @@ -623,10 +630,10 @@ Halte die ~h~~k~~PED_LOCK_TARGET~-Taste~w~ gedrückt und drücke die ~h~~k~~PED_ Halte die ~h~~k~~PED_LOCK_TARGET~-Taste~w~ gedrückt und drücke die ~h~~k~~PED_CYCLE_TARGET_LEFT~-Taste~w~ oder die ~h~~k~~PED_CYCLE_TARGET_RIGHT~-Taste, um das Ziel zu wechseln. [GUN_4A] -Mit gedrückter ~h~~k~~PED_LOCK_TARGET~-Taste~w~ kannst du gehen oder laufen und behãltst dein Ziel im Visier. +Mit gedrückter ~h~~k~~PED_LOCK_TARGET~-Taste~w~ kannst du gehen oder laufen und behältst dein Ziel im Visier. [GUN_4B] -Mit gedrückter ~h~~k~~PED_LOCK_TARGET~-Taste~w~ kannst du gehen oder laufen und behãltst dein Ziel im Visier. +Mit gedrückter ~h~~k~~PED_LOCK_TARGET~-Taste~w~ kannst du gehen oder laufen und behältst dein Ziel im Visier. [GUN_5] An diesen Pappkameraden kannst du zielen und schießen üben. Wenn du fertig bist, widme dich wieder deiner Mission. @@ -683,7 +690,7 @@ An diesen Pappkameraden kannst du zielen und schießen üben. Wenn du fertig bis ~g~Fahrtziel: ~w~'Museum' ~g~in Newport. [FARE18] -~g~Fahrtziel: ~w~'AmCo Gebãude' ~g~in Torrington. +~g~Fahrtziel: ~w~'AmCo Gebäude' ~g~in Torrington. [FARE19] ~g~Fahrtziel: ~w~'Bolt Burgers' ~g~in Bedford Point. @@ -707,7 +714,7 @@ An diesen Pappkameraden kannst du zielen und schießen üben. Wenn du fertig bis ~g~Fahrtziel: ~w~'North West Towers' ~g~in Wichita Gardens. [NEW_TAX] -GRÖSSER! SCHNELLER! HÃRTER! Neu! Borgnine Taxis jetzt in Harwood! Rufen Sie 555-BORGNINE! Heute noch! +GRÖSSER! SCHNELLER! HÄRTER! Neu! Borgnine Taxis jetzt in Harwood! Rufen Sie 555-BORGNINE! Heute noch! [TSCORE2] $~1~ @@ -731,7 +738,7 @@ Drücke die ~h~~k~~TOGGLE_SUBMISSIONS~-Taste~w~, um Taxi-Missionen an- oder abzu ~r~Krankenwagen voll!! [A_RANGE] -~g~Du bist außer Reichweite des Notarztfunks. Fahr nãher an die Klinik heran! +~g~Du bist außer Reichweite des Notarztfunks. Fahr näher an die Klinik heran! [FTUTOR] Drücke die ~h~~k~~TOGGLE_SUBMISSIONS~-Taste~w~, um Feuerwehr Missionen an- oder abzuschalten. @@ -743,22 +750,22 @@ Drücke die ~h~~k~~TOGGLE_SUBMISSIONS~-Taste~w~, um Feuerwehr Missionen an- oder Feuer gelöscht! [F_RANGE] -~g~Du bist außer Reichweite des Feuerwehrfunks. Fahr nãher an eine Feuerwache heran! +~g~Du bist außer Reichweite des Feuerwehrfunks. Fahr näher an eine Feuerwache heran! [C_BREIF] -~g~Verdãchtiger wurde zuletzt in der Gegend von ~a~ gesichtet. +~g~Verdächtiger wurde zuletzt in der Gegend von ~a~ gesichtet. [C_RANGE] -~g~Du bist außer Reichweite des Polizeifunks. Fahr nãher an ein Polizeirevier heran! +~g~Du bist außer Reichweite des Polizeifunks. Fahr näher an ein Polizeirevier heran! [DODO_FT] Du bist ~1~ Sekunden geflogen! [EBAL_A] -Ich kenn ein Plãtzchen im Rotlichtbezirk, wo wir untertauchen können. +Ich kenn ein Plätzchen im Rotlichtbezirk, wo wir untertauchen können. [EBAL_A1] -Aber meine Hãnde sind im Eimer. Also, fahr du. +Aber meine Hände sind im Eimer. Also, fahr du. [EBAL_1] Drücke die~h~ ~k~~VEHICLE_ENTER_EXIT~-Taste~w~, um in ein Fahrzeug ~h~ein- oder auszusteigen~w~. @@ -794,7 +801,7 @@ Du könntest mir einen Gefallen tun. Eines meiner Girls braucht 'nen Fahrer. Schnapp dir ein Auto, hol Misty von der Klinik ab und bring sie her. [EBAL_N] -Also lass die Hãnde am Lenkrad! +Also lass die Hände am Lenkrad! [EBAL_4] ~r~8-Ball ist tot! @@ -830,7 +837,7 @@ Also lass die Hãnde am Lenkrad! Halte neben Misty an und lass sie einsteigen. [LM1_8] -Du kannst dir bei Luigi den nãchsten Job abholen oder Liberty City erkunden. +Du kannst dir bei Luigi den nächsten Job abholen oder Liberty City erkunden. [LM2_A] Da ist eine neue Droge in Umlauf, sie heißt SPANK. @@ -839,7 +846,7 @@ Da ist eine neue Droge in Umlauf, sie heißt SPANK. Irgendein Kerl hat diesen Müll meinen Girls in Portland Harbour verabreicht. [LM2_B] -Fahr hin und verabreich ihm ein paar mit 'nem Baseballschlãger! +Fahr hin und verabreich ihm ein paar mit 'nem Baseballschläger! [LM2_G] Der Typ soll bezahlen für diese Beleidigung! @@ -848,13 +855,13 @@ Der Typ soll bezahlen für diese Beleidigung! ~g~Nimm sein Auto und spritz es um. [LM2_2A] -Benutze die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um zu ~h~schlagen und zu treten~w~ oder um ~h~den Schlãger zu schwingen~w~! +Benutze die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um zu ~h~schlagen und zu treten~w~ oder um ~h~den Schläger zu schwingen~w~! [LM2_2C] -Benutze die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um zu ~h~schlagen und zu treten~w~ oder um ~h~den Schlãger zu schwingen~w~! +Benutze die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um zu ~h~schlagen und zu treten~w~ oder um ~h~den Schläger zu schwingen~w~! [LM2_2D] -Benutze die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um zu ~h~schlagen und zu treten~w~ oder um ~h~den Schlãger zu schwingen~w~! +Benutze die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um zu ~h~schlagen und zu treten~w~ oder um ~h~den Schläger zu schwingen~w~! [LM2_3] ~g~Stell das Auto in Luigis Garage ab! @@ -863,7 +870,7 @@ Benutze die~h~ ~k~~PED_FIREWEAPON~-Taste~w~, um zu ~h~schlagen und zu treten~w~ ~g~Lackiere das Auto um! [LM3_A] -He, ich muss mit dir reden... Okay, Mick, wir reden spãter. +He, ich muss mit dir reden... Okay, Mick, wir reden später. [LM3_B] Na? Alles klar, mein Junge? @@ -893,7 +900,7 @@ Drücke die~h~ L3-Taste~w~, um zu ~h~hupen~w~. So weiß Misty, dass du da bist. ~g~Hol Misty ab! [LM3_5] -Du arbeitest jetzt fest für Luigi? War auch Zeit, dass er 'nen verlãsslichen Fahrer anbringt. +Du arbeitest jetzt fest für Luigi? War auch Zeit, dass er 'nen verlässlichen Fahrer anbringt. [LM3_7] Ich bin gleich bei dir, Süße. @@ -911,7 +918,7 @@ Wenn du 'ne Knarre brauchst, geh zum Hintereingang von AmmuNation, gegenüber de Der Polizeiball findet in der alten Schulhalle nahe der Callahan Bridge statt, [LM5_B] -und bei solchen Bãllen möchten auch Cops ein wenig 'Action' haben. +und bei solchen Bällen möchten auch Cops ein wenig 'Action' haben. [LM5_C] Ich hab Girls in der ganzen Stadt stehen. @@ -920,7 +927,7 @@ Ich hab Girls in der ganzen Stadt stehen. Bring sie zu dem Ball. Das bringt 'nen Haufen Kohle. [LM5_1] -~g~Wenn du zu viele Ladies ins Auto stopfst, holen sie sich Schrammen! ~g~Liefere erst diese Mãdchen ab und hol dann den Rest. +~g~Wenn du zu viele Ladies ins Auto stopfst, holen sie sich Schrammen! ~g~Liefere erst diese Mädchen ab und hol dann den Rest. [LM5_2] ~r~Eins von Luigis Girls ist hinüber! @@ -1004,7 +1011,7 @@ Er startet jeden Tag an der Grenze zu Chinatown. Kugeln können der Karre nichts anhaben. Also besorg dir einen Wagen und ramm ihn von der Straße. [JM3_D] -Fahr ihm voll rein, dann dürften die Wachmãnner schnell abhauen. +Fahr ihm voll rein, dann dürften die Wachmänner schnell abhauen. [JM3_E] Fahr den Transporter dann zum Lagerhaus bei den Docks, von da an übernehmen meine Leute. @@ -1019,7 +1026,7 @@ Der Transporter ist nicht ewig unterwegs, also beeil dich. ~g~Ramm den Wagen, bis der Schadenswert unter 70 Prozent liegt. [JM4_B] -Oh! Da ist der Typ, von dem ich dir erzãhlt habe! +Oh! Da ist der Typ, von dem ich dir erzählt habe! [JM4_C] Okay, hör zu. Der Typ ist kein Italiener und kein Mechaniker, aber er kann alles 'richten'. @@ -1034,7 +1041,7 @@ Ja, ich bin Toni Cipriani. Bring ihn zu Mammas Restaurant in St. Mark's. [JM4_G] -Hör zu, ich plane eine Sache, da brauche ich einen guten Fahrer. Also komm spãter wieder, okay? +Hör zu, ich plane eine Sache, da brauche ich einen guten Fahrer. Also komm später wieder, okay? [JM4_2] Warte hier. Lass den Motor laufen. Das ist kein Freundschaftsbesuch. @@ -1085,7 +1092,7 @@ Die überfallen eine Bank und brauchen einen Fahrer. Ich hab ihnen gesagt, du bist der richtige. Also, vermassle es nicht. [JM6_E] -Bring sie vor 5 Uhr zu der Bank, keine Minute spãter. +Bring sie vor 5 Uhr zu der Bank, keine Minute später. [JM6_2] Lass den Motor laufen. Wir sind gleich wieder da. @@ -1094,16 +1101,16 @@ Lass den Motor laufen. Wir sind gleich wieder da. Bring uns hier weg!! [JM6_4] -Hãng die Cops ab und bring uns in die sichere Wohnung! +Häng die Cops ab und bring uns in die sichere Wohnung! [JM6_6] -~g~Los, besorge ein weniger verdãchtiges Fahrzeug! +~g~Los, besorge ein weniger verdächtiges Fahrzeug! [JM6_7] ~g~Du brauchst alle 3 für den Überfall! [TM1] -'SCHMUTZIGE WÃSCHE' +'SCHMUTZIGE WÄSCHE' [TM2] 'DER GELDBOTE' @@ -1124,7 +1131,7 @@ Ich habe einen dringenden Job für dich! -Toni ~w~Setz dich, Junge. Los, mach's dir bequem. [TM1_B] -~w~Die Wãscherei will also kein Schutzgeld zahlen, was? +~w~Die Wäscherei will also kein Schutzgeld zahlen, was? [TM1_C] ~w~Denken die Triaden, sie können mich verscheißern? @@ -1142,7 +1149,7 @@ Ich habe einen dringenden Job für dich! -Toni ~w~Sorry, Ma. Ja, Ma. [TM1_H] -~w~Ich will, dass du ihre Wãscherei-Transporter zerstörst +~w~Ich will, dass du ihre Wäscherei-Transporter zerstörst [TM1_I] ~w~und jeden Triaden-Tölpel niedermachst, der dir in die Quere kommt. @@ -1157,7 +1164,7 @@ Ich habe einen dringenden Job für dich! -Toni Er wird nie so sein wie sein Papa. Auf dem Tisch hat er dir eine Nachricht hinterlassen. [TM2_B] -~w~Die Wãscherei will jetzt bezahlen. Gute Arbeit, mein Junge! +~w~Die Wäscherei will jetzt bezahlen. Gute Arbeit, mein Junge! [TM2_C] ~w~Hol das Geld ab und bring es hierher. Pass auf die Triaden auf. @@ -1214,7 +1221,7 @@ Er wird nie so sein wie sein Papa. Auf dem Tisch hat er dir eine Nachricht hinte ~g~Jetzt hol Toni ab. [TM3_4] -~g~Jetzt fahr die Mãnner zu Salvatore. +~g~Jetzt fahr die Männer zu Salvatore. [TM3_5] ~y~Ein Hinterhalt der Triaden!! @@ -1223,10 +1230,10 @@ Er wird nie so sein wie sein Papa. Auf dem Tisch hat er dir eine Nachricht hinte ~w~Es herrscht KRIEG! Die Triaden betreiben zur Tarnung einen Fischmarkt in Chinatown. [TM4_C] -~w~Die meisten ihrer Geschãfte werden auf diesem Fischmarkt durchgezogen. +~w~Die meisten ihrer Geschäfte werden auf diesem Fischmarkt durchgezogen. [TM4_D] -~w~Diese Wãscherei schuldet uns immer noch Geld. +~w~Diese Wäscherei schuldet uns immer noch Geld. [TM4_E] ~w~Die denken, die Triaden beschützen sie jetzt. Ich schlage vor, wir führen eine Strafaktion durch. @@ -1250,7 +1257,7 @@ TEXT NO LONGER REQUIRED ~w~Wir machen die Triaden ein für alle Mal fertig. [TM5_D] -8-Ball hat einen Müllkarren mit einer Bombe prãpariert. +8-Ball hat einen Müllkarren mit einer Bombe präpariert. [TM5_E] ~w~Sie hat einen Zeitzünder. Wenn du's vermasselst, hinterlassen wir keine Spuren. Hol den Müllkarren ab. @@ -1286,7 +1293,7 @@ TEXT NO LONGER REQUIRED ~w~HEY, MARIA! WO BLEIBST DU? [FM1_D] -~w~Dãmliche Ziege. Jedes Mal dasselbe. +~w~Dämliche Ziege. Jedes Mal dasselbe. [FM1_E] ~w~Und hier ist sie, die Königin der Nacht höchstpersönlich! @@ -1307,7 +1314,7 @@ TEXT NO LONGER REQUIRED ~w~Nimm die Limo, aber bring sie mir heil wieder, hörst du? [FM1_K] -~w~Und pass auf sie auf, sie kann eine Menge Ãrger machen. +~w~Und pass auf sie auf, sie kann eine Menge Ärger machen. [FM1_L] ~w~Ja, ja, ja! Dein neues Schoßhündchen wird schon alles im Griff haben. @@ -1334,7 +1341,7 @@ TEXT NO LONGER REQUIRED ~g~Steig in die Limo! [FM1_3] -~r~Wenn du Maria im Stich lãsst, bringt Salvatore dich um. Kehr um und hol sie! +~r~Wenn du Maria im Stich lässt, bringt Salvatore dich um. Kehr um und hol sie! [FM1_4] ~g~Du hast die Frau des Don im Stich gelassen! Los, zurück zur Lagerhalle! Warte dort auf Maria! @@ -1367,16 +1374,16 @@ Es gibt da einen Typ namens Curly Bob. Er arbeitet in Luigis Bar. Der verpulvert schon dauernd mehr Geld als er verdient. [FM2_N] -Normalerweise fãhrt er nach der Arbeit mit dem Taxi nach Hause. Folge ihm. +Normalerweise fährt er nach der Arbeit mit dem Taxi nach Hause. Folge ihm. [FM2_O] -Und wenn er der Verrãter ist, mach ihn fertig. +Und wenn er der Verräter ist, mach ihn fertig. [FM2_F] -Da kommt ja unser kleiner, gesprãchiger Freund. +Da kommt ja unser kleiner, gesprächiger Freund. [FM2_G] -Ist man dir gefolgt? Du weißt, was hier lãuft, muss unter uns bleiben. +Ist man dir gefolgt? Du weißt, was hier läuft, muss unter uns bleiben. [FM2_H] Nein, nein, niemand ist mir gefolgt. Hast du meinen Stoff? @@ -1388,7 +1395,7 @@ Hier ist dein SPANK, du Ratte, und jetzt rede. Okay. Die Leones führen einen Zwei-Fronten-Krieg. [FM2_Q] -Sie kãmpfen mit den Triaden um ein Territorium, und keiner der beiden gibt nach. +Sie kämpfen mit den Triaden um ein Territorium, und keiner der beiden gibt nach. [FM2_R] Gleichzeitig hat Joey Leone Streit mit den Forellis angefangen. @@ -1397,7 +1404,7 @@ Gleichzeitig hat Joey Leone Streit mit den Forellis angefangen. Jeden Tag verlieren sie Leute und Einfluss in der Stadt. [FM2_T] -Salvatore wird gefãhrlich und paranoid. Er verdãchtigt alles und jeden. +Salvatore wird gefährlich und paranoid. Er verdächtigt alles und jeden. [FM2_U] Bei treuen Gefolgsleuten wie dir, wie kann er sich da nur Sorgen machen? @@ -1436,7 +1443,7 @@ Bei treuen Gefolgsleuten wie dir, wie kann er sich da nur Sorgen machen? ~w~Wir sollten diese kolumbianischen Mistkerle fertigmachen, [FM3_B] -~w~aber durch den Krieg mit den Triaden sind wir dazu zu geschwãcht. +~w~aber durch den Krieg mit den Triaden sind wir dazu zu geschwächt. [FM3_C] ~w~Das Kartell hat unendlich Geld aus dem Handel mit diesem Mistzeug SPANK. @@ -1472,7 +1479,7 @@ Bei treuen Gefolgsleuten wie dir, wie kann er sich da nur Sorgen machen? ~w~Okay, dann wollen wir mal! [FM3_8F] -~w~Ich kann das Baby scharf machen, aber eine Knarre kann ich mit diesen Hãnden immer noch nicht halten. +~w~Ich kann das Baby scharf machen, aber eine Knarre kann ich mit diesen Händen immer noch nicht halten. [FM3_8G] ~w~Hier, das Gewehr hier wirst du sicher brauchen. @@ -1484,7 +1491,7 @@ Bei treuen Gefolgsleuten wie dir, wie kann er sich da nur Sorgen machen? ~r~8-Ball hat's erwischt! [FM3_8] -~r~Die Wachmãnner wurden alarmiert! +~r~Die Wachmänner wurden alarmiert! [FM4_A] ~w~Ah, sieh an! Mein bester Troubleshooter. @@ -1517,10 +1524,10 @@ Bei treuen Gefolgsleuten wie dir, wie kann er sich da nur Sorgen machen? 'V-MANN TANNER' [AM1_A] -Wir müssen ein paar Dinge klãren, bevor wir unsere Beziehungen fortsetzen, +Wir müssen ein paar Dinge klären, bevor wir unsere Beziehungen fortsetzen, [AM1_B] -geschãftlich oder sonstwie. Legen wir also die Karten auf den Tisch. +geschäftlich oder sonstwie. Legen wir also die Karten auf den Tisch. [AM1_C] Ich bin eine Yakuza und ich weiß, dass du für Salvatore Leones Familie gearbeitet hast. @@ -1544,7 +1551,7 @@ Oh, Asuka, du hast einen Massagestab. Das ist kein Massagestab. [AM1_1] -~g~Salvatore verlãsst jetzt Luigis Club! +~g~Salvatore verlässt jetzt Luigis Club! [AM1_2] ~r~Man hat dich entdeckt! @@ -1556,7 +1563,7 @@ Das ist kein Massagestab. ~r~Na, prima! Du hast dein Opfer verscheucht. Und du willst ein Profi sein? [AM1_5] -~g~Begib dich in den Rotlichtbezirk und warte, bis Salvatore den Club verlãsst. +~g~Begib dich in den Rotlichtbezirk und warte, bis Salvatore den Club verlässt. [AM1_7] ~r~Salvatore sitzt bequem zu Hause und schlürft einen Cocktail. 'Der Schakal' bist du nicht gerade! @@ -1577,10 +1584,10 @@ Maria und ich sind ein bisschen ins Grüne gefahren, bis du diesen miesen Voyeur Ah, mein hübsches Helferlein! [AM4_B] -Maria ist gerade beschãftigt, aber ich richte ihr aus, dass du hier warst. +Maria ist gerade beschäftigt, aber ich richte ihr aus, dass du hier warst. [AM4_C] -Wer ist da? Asuka? Ich weiß, ich war ein böses Mãdchen, aber ich muss dringend pinkeln! +Wer ist da? Asuka? Ich weiß, ich war ein böses Mädchen, aber ich muss dringend pinkeln! [AM4_D] Wird Zeit dass du unseren Mann bei der Polizei kennenlernst. @@ -1589,7 +1596,7 @@ Wird Zeit dass du unseren Mann bei der Polizei kennenlernst. Das ist seine Bezahlung für den letzten Job, den er für uns erledigt hat. [AM4_F] -Verstãndlicherweise ist er vorsichtig. +Verständlicherweise ist er vorsichtig. [AM4_G] Begib dich so schnell wie möglich zu dem öffentlichen Fernsprecher in Torrington und warte auf seine Anweisungen. @@ -1625,49 +1632,49 @@ Tanner hat dich bemerkt! ~w~Trotzdem hat er uns mitgeteilt, wie sehr Catalina deine Rache fürchtet. [AS2_A] -~w~Wir haben Catalinas Plãne mit dem SPANK unterschãtzt. +~w~Wir haben Catalinas Pläne mit dem SPANK unterschätzt. [AS2_B] -~w~Das beschrãnkt sich bei weitem nicht darauf, dass die Yardies es an der Straßenecke verkaufen. +~w~Das beschränkt sich bei weitem nicht darauf, dass die Yardies es an der Straßenecke verkaufen. [AS2_D] -~w~Die verkaufen SPANK über Kaffeestãnde. +~w~Die verkaufen SPANK über Kaffeestände. [AS2_1] -~g~Alle Espressostãnde in Portland zerstört!! +~g~Alle Espressostände in Portland zerstört!! [AS2_2] -~g~Alle Espressostãnde auf Staunton Island zerstört!! +~g~Alle Espressostände auf Staunton Island zerstört!! [AS2_3] -~g~Alle Espressostãnde in Shoreside Vale zerstört!! +~g~Alle Espressostände in Shoreside Vale zerstört!! [AS2_4] ~r~Das Kartell hat seine Dealer gewarnt!! [AS2_5] -~g~Da sind noch Espressostãnde in Shoreside Vale und auf Staunton Island! +~g~Da sind noch Espressostände in Shoreside Vale und auf Staunton Island! [AS2_6] -~g~Da sind noch Espressostãnde in Shoreside Vale! +~g~Da sind noch Espressostände in Shoreside Vale! [AS2_7] -~g~Da sind noch Espressostãnde auf Staunton Island! +~g~Da sind noch Espressostände auf Staunton Island! [AS2_8] -~g~Da sind noch Espressostãnde in Portland! +~g~Da sind noch Espressostände in Portland! [AS2_9] -~g~Da sind noch Espressostãnde in Portland und Shoreside Vale! +~g~Da sind noch Espressostände in Portland und Shoreside Vale! [AS2_10] -~g~Da sind noch Espressostãnde in Portland und auf Staunton Island! +~g~Da sind noch Espressostände in Portland und auf Staunton Island! [AS2_12] -~g~Suche in den Sadtteilen von Liberty City nach ~b~Espresso-2-Go-Stãnden! +~g~Suche in den Sadtteilen von Liberty City nach ~b~Espresso-2-Go-Ständen! [AS3_A] -~W~Drücken wir noch fester zu oder warten wir, bis es von selbst abfãllt? +~W~Drücken wir noch fester zu oder warten wir, bis es von selbst abfällt? [AS3_B] ~w~Hau einfach drauf... @@ -1709,7 +1716,7 @@ Tanner hat dich bemerkt! 'DIE ABRECHNUNG' [KM1_A] -Meine Schwester hãlt große Stücke auf dich, +Meine Schwester hält große Stücke auf dich, [KM1_E] aber ich bin noch nicht überzeugt, dass ein Gajin wie du was auf dem Kasten hat. @@ -1718,13 +1725,13 @@ aber ich bin noch nicht überzeugt, dass ein Gajin wie du was auf dem Kasten hat Vielleicht kannst du mir bei einer etwas kniffligen Sache helfen. [KM1_F] -Ein Fehlschlag wãre natürlich unverzeihlich. +Ein Fehlschlag wäre natürlich unverzeihlich. [KM1_C] Ein Yakuza Kanbu sitzt in Haft und wartet auf seine Überführung zum Prozess. [KM1_G] -Er ist ein geschãtztes Mitglied der Familie. +Er ist ein geschätztes Mitglied der Familie. [KM1_H] Befreie ihn aus der Haft und bring ihn in das Dojo beim Bedford Point. @@ -1760,7 +1767,7 @@ Wir danken dir für deinen selbstlosen Einsatz. Solltest du jemals Hilfe brauche ~r~Du hast dich selbst in Schwierigkeiten gebracht! [KM2_A] -Gewisse Umgangsformen sind in diesem Beruf von nicht zu unterschãtzender Wichtigkeit. +Gewisse Umgangsformen sind in diesem Beruf von nicht zu unterschätzender Wichtigkeit. [KM2_B] Es ist eine Schande. Jemand hat mir einmal einen Gefallen getan, und ich konnte mich nie dafür erkenntlich zeigen. @@ -1775,7 +1782,7 @@ Mein Ehrgefühl verlangt das von mir. ~g~Auto abgeliefert. [KM3_A] -Wenn Ungemach droht, wendet der Narr sich ab, wãhrend der Weise sich ihm stellt. +Wenn Ungemach droht, wendet der Narr sich ab, während der Weise sich ihm stellt. [KM3_B] Das kolumbianische Kartell hat unsere wiederholten Bitten ignoriert, unsere Interessen in Liberty zu berücksichtigen. @@ -1787,7 +1794,7 @@ Jetzt verhandeln die mit den Jamaikanern, um uns weiter zu demütigen. Sie wollen den Deal am anderen Ende der Stadt besiegeln. [KM3_F] -Nimm einen meiner Mãnner, klau einen Yardie-Wagen und statte den Kolumbianern einen Besuch ab. +Nimm einen meiner Männer, klau einen Yardie-Wagen und statte den Kolumbianern einen Besuch ab. [KM3_E] Unser Ehrgefühl verlangt es, dass niemand am Leben bleibt. @@ -1814,7 +1821,7 @@ Unser Ehrgefühl verlangt es, dass niemand am Leben bleibt. ~r~Der Kontaktmann ist tot! [KM4_A] -Um wahrhaft stark zu sein, darfst du niemals Schwãche zeigen. +Um wahrhaft stark zu sein, darfst du niemals Schwäche zeigen. [KM4_C] Sammle die Gelder umgehend ein, damit wir sie in unsere Casinos stecken können. @@ -1859,7 +1866,7 @@ Es scheint, deine Versuche, die Jamaikaner davon abzuhalten, sich mit dem Kartell einzulassen, sind komplett fehlgeschlagen! [KM5_C] -Yardie-Pusher verdealen pãckchenweise SPANK in den Straßen von Liberty, als würden sie Hotdogs verkaufen! +Yardie-Pusher verdealen päckchenweise SPANK in den Straßen von Liberty, als würden sie Hotdogs verkaufen! [KM5_D] Die Mistkerle vom Kartell lachen uns aus, lachen MICH aus! @@ -1880,7 +1887,7 @@ Mach diese Dreckskerle fertig und wasch deine befleckte Ehre im Blut unserer Fei ~g~Du hast ~1~ der Yardies erwischt. BONUS $~1~ [RM1] -'DAS SCHWEIGEN DES VERRÃTERS' +'DAS SCHWEIGEN DES VERRÄTERS' [RM3] 'BRENNENDE BEWEISE' @@ -1892,7 +1899,7 @@ Mach diese Dreckskerle fertig und wasch deine befleckte Ehre im Blut unserer Fei 'DER GEPANZERTE ZEUGE' [RM1_D] -Er steht unter Zeugenschutz und sitzt mit bewaffneten Leibwãchtern in einer Wohnung in Newport, irgendwo hinter dem Parkplatz. +Er steht unter Zeugenschutz und sitzt mit bewaffneten Leibwächtern in einer Wohnung in Newport, irgendwo hinter dem Parkplatz. [RM1_E] Zünde die Bude an, und wenn sie rausgerannt kommen, kannst du sie dir vornehmen. Sorge dafür, dass er mit niemandem redet. @@ -1907,7 +1914,7 @@ Zünde die Bude an, und wenn sie rausgerannt kommen, kannst du sie dir vornehmen Hey, Junge! Hier rüber! [RM2_A] -Ein alter Kumpel aus der Army macht Geschãfte in Rockford. +Ein alter Kumpel aus der Army macht Geschäfte in Rockford. [RM2_D] Er braucht Hilfe. Zum Dank will er dir Superpreise machen für alles, was du bei ihm kaufst. @@ -1925,7 +1932,7 @@ Na ja, drei Arme sind besser als einer, also nimm dir, was du brauchst. ~r~Phil hat's erwischt!! [RM2_L] -Heh-hey! Wãre ich mit DIR in Nicaragua gewesen, hãtte ich vielleicht meinen Arm noch! +Heh-hey! Wäre ich mit DIR in Nicaragua gewesen, hätte ich vielleicht meinen Arm noch! [RM2_N] Lass das Geld da. Und jetzt verschwinde. Ich regle das mit den Cops. @@ -1934,7 +1941,7 @@ Lass das Geld da. Und jetzt verschwinde. Ich regle das mit den Cops. Das Beweismaterial wird gerade quer durch die Stadt transportiert. [RM3_E] -Du wirst diesen Wagen rammen und jedes kleine Beweisstück einsammeln, wenn es rausfãllt. +Du wirst diesen Wagen rammen und jedes kleine Beweisstück einsammeln, wenn es rausfällt. [RM3_F] Wenn du alles hast, lass das Zeug im Wagen und zünde ihn an. @@ -1955,10 +1962,10 @@ Das bringt uns beiden eine Stange Geld ein, mein Junge. ~g~Steck jetzt das Auto in Brand! [RM4_A] -Ich glaube, mein Partner ist ein Verrãter. +Ich glaube, mein Partner ist ein Verräter. [RM4_C] -Meistens fãhrt er abends mit seinem Boot fischen, nahe dem Leuchtturm auf dem Portland Rock. +Meistens fährt er abends mit seinem Boot fischen, nahe dem Leuchtturm auf dem Portland Rock. [RM4_D] Klau ein Polizeiboot und mach seinen miesen Machenschaften ein Ende! @@ -1970,7 +1977,7 @@ Klau ein Polizeiboot und mach seinen miesen Machenschaften ein Ende! ~g~Fahr zum Leuchtturm und nimm dir Rays Partner vor! [RM5_A] -Du unfãhiger Idiot! +Du unfähiger Idiot! [RM5_A1] Du hast alles vermasselt! Es geht um mein Leben, und du kannst nicht mal eine Fliege totschlagen! @@ -2015,10 +2022,10 @@ Also los, erledige den Job, für den ich dich bezahlt habe! 'DAS KENJI-KOMPLOTT' [LOVE3] -'NÃCHTLICHER FISCHZUG' +'NÄCHTLICHER FISCHZUG' [LOVE1_A] -Zunãchst möchte ich dir danken, dass du diese Sache für mich geregelt hast. +Zunächst möchte ich dir danken, dass du diese Sache für mich geregelt hast. [LOVE1_F] Die Leute interpretieren heute in alles etwas hinein. @@ -2048,7 +2055,7 @@ Befreie meinen Freund, egal wie. ~g~Das Tor öffnet sich nur für Autos der kolumbianischen Gang. [LOVE2_A] -Nichts lãsst die Grundstückspreise so tief purzeln wie ein guter alter Bandenkrieg, +Nichts lässt die Grundstückspreise so tief purzeln wie ein guter alter Bandenkrieg, [LOVE2_B] außer vielleicht eine Pestepidemie... Aber das ginge hier wohl zu weit. @@ -2069,7 +2076,7 @@ Kenji ist bei einem Treffen auf dem Dach der Parkgarage in Newport. Besorg dir einen Wagen des Kartells und nimm ihn dir vor. [LOVE2_H] -Die Yakuza werden das als Kriegserklãrung des Kartells auffassen. +Die Yakuza werden das als Kriegserklärung des Kartells auffassen. [LOVE2_1] ~g~Klau in Fort Staunton einen Wagen der kolumbianischen Gang! @@ -2084,13 +2091,13 @@ Die Yakuza werden das als Kriegserklãrung des Kartells auffassen. ~r~Die Yakuza haben dich erkannt! [LOVE2_6] -~r~Du hast alle Zeugen aus dem Weg gerãumt!! +~r~Du hast alle Zeugen aus dem Weg geräumt!! [LOVE3_A] In scheinheiligen Zeiten wie diesen sind bestimmte wertvolle Waren schwer zu importieren. [LOVE3_C] -Es wird einige kleine Pãckchen ins Wasser abwerfen. +Es wird einige kleine Päckchen ins Wasser abwerfen. [LOVE3_D] Sammle sie ein, bevor es ein anderer tut. @@ -2105,10 +2112,10 @@ Sammle sie ein, bevor es ein anderer tut. 'BODYGUARD ACTION' [LOVE4_A] -Danke, dass du die Pãckchen geholt hast. Aber die sollten nur als Köder dienen. +Danke, dass du die Päckchen geholt hast. Aber die sollten nur als Köder dienen. [LOVE4_B] -Sorry, aber so lãuft das manchmal in dem Geschãft. +Sorry, aber so läuft das manchmal in dem Geschäft. [LOVE4_C] Die Ware, um die es mir wirklich geht, ist noch in dem Flugzeug versteckt. @@ -2120,19 +2127,19 @@ Ich habe die Beamten bestochen. ~r~Das kolumbianische Kartell ist da!! [LOVE4_2] -~g~Das Pãckchen ist weg! Du musst die Kolumbianer finden und es ihnen abjagen. +~g~Das Päckchen ist weg! Du musst die Kolumbianer finden und es ihnen abjagen. [LOVE4_3] ~g~Bauunternehmen Panlantic...? [LOVE4_5] -~g~Das Pãckchen müsste im Flugzeug sein... +~g~Das Päckchen müsste im Flugzeug sein... [LOVE4_6] ~g~Nimm den Lift nach oben in den Tower! [LOVE5_B] -Mein asiatischer Freund braucht einen Bodyguard. Er lãsst meine neue Lieferung auf Qualitãt überprüfen. +Mein asiatischer Freund braucht einen Bodyguard. Er lässt meine neue Lieferung auf Qualität überprüfen. [LOVE5_1] ~g~Los! @@ -2171,16 +2178,16 @@ Pass gut auf meinen kugelsicheren Patriot auf, Ray. Wir sehen uns in Miami. 'DIE ÜBERGABE' [CAT1_A] -Ich habe deine Maria. Wenn ihr Gesicht nicht aussehen soll, als wãr's in einen Fleischwolf geraten, +Ich habe deine Maria. Wenn ihr Gesicht nicht aussehen soll, als wär's in einen Fleischwolf geraten, [CAT2_F] Ich hab mir 'nen Fingernagel abgebrochen und meine Frisur ist hin! Fünfzig Dollar im Eimer! [CAT2_G] -Mann, hatte ich Angst. Aber dann dachte ich mir, du bist doch kein kleines Mãdchen mehr. +Mann, hatte ich Angst. Aber dann dachte ich mir, du bist doch kein kleines Mädchen mehr. [CAT2_H] -Du, das wird lustig, weißt du, meine Schwester will nãmlich mit ihren zwei Kindern eine zeitlang bei uns wohnen, +Du, das wird lustig, weißt du, meine Schwester will nämlich mit ihren zwei Kindern eine zeitlang bei uns wohnen, [CAT2_I] weil ihr Mann gerade mal wieder fremdgeht und... @@ -2225,7 +2232,7 @@ XXXX ~g~Maria ist tot! [WEATHER] -WETTER ÃNDERN +WETTER ÄNDERN [WEATHE2] WETTER NORMAL @@ -2269,11 +2276,11 @@ Autobomben kosten $1000 pro Stück. [GA_5] In deinem Wagen ist schon eine Autobombe. -[GA_6] -Park die Karre, mach sie durch Drücken der ~h~~k~~PED_FIREWEAPON~-Taste~w~ scharf, und dann nichts wie weg! +[GA_6] { re3 change } +Park die Karre, mach sie durch Drücken der ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~ scharf, und dann nichts wie weg! -[GA_7] -Mach die Bombe mit der ~h~~k~~PED_FIREWEAPON~-Taste~w~ scharf. Dann geht sie hoch, wenn der Wagen angelassen wird. +[GA_7] { re3 change } +Mach die Bombe mit der ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~ scharf. Dann geht sie hoch, wenn der Wagen angelassen wird. [GA_8] Benutze den Zünder, um die Bombe hochgehen zu lassen. @@ -2297,7 +2304,7 @@ Auf dich ist Verlass. Wenn du alle, die auf der Liste stehen, abgeliefert hast, Du hast alle georderten Karren geliefert. Sehr gut. Hier, für dich. [GA_15] -Hoffentlich gefãllt dir die neue Farbe. +Hoffentlich gefällt dir die neue Farbe. [GA_16] Das Umspritzen ist gratis. @@ -2306,7 +2313,7 @@ Das Umspritzen ist gratis. An dem Modell haben wir kein Interesse. [GA_20] -Von der Sorte haben wir schon mehr als genug. Sorry, da kommen wir nicht ins Geschãft. +Von der Sorte haben wir schon mehr als genug. Sorry, da kommen wir nicht ins Geschäft. [CR_1] Kran kann dieses Fahrzeug nicht anheben. @@ -2381,7 +2388,7 @@ Du blickst bei der Story nicht mehr durch? Taste dich ran, Mann! [FEF_CO2] -Wãhle das Controller-Setup, das zu deinem Spielstil am besten passt +Wähle das Controller-Setup, das zu deinem Spielstil am besten passt [FEF_SA1] Bring deine Daten in Sicherheit! @@ -2390,10 +2397,10 @@ Bring deine Daten in Sicherheit! Spiele laden und speichern [FEF_AU1] -Volle Dröhnung gefãllig? +Volle Dröhnung gefällig? [FEF_AU2] -Radiosender und Soundeffekt auswãhlen +Radiosender und Soundeffekt auswählen [FEF_DI1] Andere Optik? @@ -2405,7 +2412,7 @@ Spiel für deinen Fernseher optimieren Was für ein Gefasel! [FEF_LA2] -Sprache auswãhlen +Sprache auswählen [FEB_PMB] Vorherige Missionsinfos: @@ -2471,10 +2478,10 @@ Hupe Fahrzeug steuern [FEC_RSC] -Radiosender auswãhlen +Radiosender auswählen [FEC_BRA] -Bremsen\rückwãrts fahren +Bremsen\rückwärts fahren [FEC_HAB] Handbremse @@ -2488,33 +2495,6 @@ Beschleunigen [FEC_SMT] Spezialmission aktivieren -[FEC_CCF] -Konfiguration: - -[FEC_CF1] -Konfig1 - -[FEC_CF2] -Konfig2 - -[FEC_CF3] -Konfig3 - -[FEC_CF4] -Konfig4 - -[FEC_CDP] -Controller-Anzeige: - -[FEC_ONF] -Zu Fuß - -[FEC_INC] -Im Auto - -[FEC_VIB] -Vibration: - [FEA_OUT] Tonausgabe: @@ -2654,7 +2634,7 @@ Explodierte Autos Zahl deiner Verhaftungen [M_WASTE] -Mãnnliche Passanten +Männliche Passanten [F_WASTE] Weibliche Passanten @@ -2666,10 +2646,10 @@ Cops Gang-Mitglieder [MED_WST] -Sanitãter +Sanitäter [FIRE_WS] -Feuerwehrmãnner +Feuerwehrmänner [DED_CRI] Kriminelle @@ -2708,7 +2688,7 @@ Krankenhausbesuche Im Spiel verstrichene Tage [MMRAIN] -Regenfãlle in mm +Regenfälle in mm [MXCARD] Weitester IRRSINNS-Sprung (in Fuß) @@ -2771,7 +2751,7 @@ Begonnene Missionen Erfüllte Missionen [PASDRO] -Beförderte Fahrgãste +Beförderte Fahrgäste [MONTAX] Mit Taxi verdientes Geld @@ -2843,10 +2823,10 @@ Zurück SOUND [MUSVOL] -Lautstãrke Musik +Lautstärke Musik [SFXVOL] -Lautstãrke SFX +Lautstärke SFX [SCROPT] BILDSCHIRMOPTIONEN @@ -2870,25 +2850,25 @@ Du kannst nur in deinem Unterschlupf speichern. GTA3 Dateien löschen [CHFILE] -ZU LADENDE DATEI AUSWÃHLEN +ZU LADENDE DATEI AUSWÄHLEN [CHCDLD] -Wãhle Memory Card (PS2) von der geladen werden soll +Wähle Memory Card (PS2) von der geladen werden soll [CDUNFR] Memory Card (PS2) ist nicht formatiert. [CHFIDL] -ZU LÖSCHENDE DATEI AUSWÃHLEN +ZU LÖSCHENDE DATEI AUSWÄHLEN [SVCONF] -SPEICHERBESTÃTIGUNG +SPEICHERBESTÄTIGUNG [SVFNAM] Dateiname des gespeicherten Spiels: [SAVEDN] -Fehler - Speicherung nicht vollstãndig. +Fehler - Speicherung nicht vollständig. [LANGSL] SPRACHAUSWAHL @@ -2978,10 +2958,10 @@ Mittel Hoch [SCASSL] -Gewalt-Level 'mittel' gewãhlt +Gewalt-Level 'mittel' gewählt [SCSCSL] -Gewalt-Level 'hoch' gewãhlt +Gewalt-Level 'hoch' gewählt [PRVMEN] Vorherige Missionsinfos @@ -3050,7 +3030,7 @@ x Letzte Nachricht [FEDS_XB] -Auswãhlen +Auswählen [FEDS_ST] START-Taste - WEITER @@ -3065,7 +3045,7 @@ Geschützsteuerung Spezialmission aktivieren (R3-Taste) [FEC_RS3] -Radiosender auswãhlen (L3-Taste) +Radiosender auswählen (L3-Taste) [FEC_HO3] Hupe (L3-Taste) @@ -3080,10 +3060,10 @@ Hupe (L3-Taste) 'FEUERTAUFE' [DIAB4] -'JÃGER DES VERLORENEN SCHUNDES' +'JÄGER DES VERLORENEN SCHUNDES' [DIAB1_A] -El Burro bietet dir eine Chance. Über den öffentlichen Fernsprecher in Hepburn Heights erfãhrst du nãheres. +El Burro bietet dir eine Chance. Über den öffentlichen Fernsprecher in Hepburn Heights erfährst du näheres. [DIAB1_C] Du bist kein übler Fahrer. Komm wieder zu dem Telefon. Vielleicht hat El Burro noch mehr Jobs für dich. @@ -3155,13 +3135,13 @@ King Courtney will dich sprechen - am Telefon in Aspatria!! ~w~Meine Yardies könnten einen Fahrer brauchen, und du hast keinen schlechten Ruf. [YD1_B] -~w~Fahr mit einem Wagen zu dem Gelãnde gegenüber dem Stadion und warte auf die anderen Mitbewerber. +~w~Fahr mit einem Wagen zu dem Gelände gegenüber dem Stadion und warte auf die anderen Mitbewerber. [YD1_C] -~w~Meine Mãnner beobachten Checkpoints überall in Staunton. +~w~Meine Männer beobachten Checkpoints überall in Staunton. [YD1_D] -~w~Wer einen Checkpoint als erster erreicht, kriegt $1000. Dann geht's weiter zur nãchsten Station. +~w~Wer einen Checkpoint als erster erreicht, kriegt $1000. Dann geht's weiter zur nächsten Station. [YD1_D1] ~w~Wenn du mehr Checkpoints als die anderen gewinnst, habe ich vielleicht Arbeit für dich. @@ -3170,7 +3150,7 @@ King Courtney will dich sprechen - am Telefon in Aspatria!! ~g~Fertigmachen zum Start! [YD1_F] -~g~Du bist zu früh gestartet. Das gefãllt mir!! +~g~Du bist zu früh gestartet. Das gefällt mir!! [YD1_G] ~r~Dies ist ein AUTORENNEN. Du brauchst ein AUTO, Hirni! @@ -3206,7 +3186,7 @@ $1000!! ~y~Du teilst dir den 1. Platz. ~1~ gewonnene Checkpoints. ~y~Gut, aber du musst der Beste sein, um für Queen Lizzy zu fahren! [Y1_J2ND] -~r~Du teilst dir den 2. Platz. ~1~ gewonnene Checkpoints. Du Schlãfer! +~r~Du teilst dir den 2. Platz. ~1~ gewonnene Checkpoints. Du Schläfer! [Y1JLAST] ~r~Du bist unter den Letzten! Wo hast du deinen Führerschein gemacht? @@ -3233,7 +3213,7 @@ Wollen sehen, ob du so gut bist, wie du sagst. ~w~Hier, du wirst 'ne Knarre brauchen. [YD2_D] -~w~Du fãhrst UND ballerst. Wir achten drauf, dass du keine kalten Füße kriegst. +~w~Du fährst UND ballerst. Wir achten drauf, dass du keine kalten Füße kriegst. [YD2_E] ~w~Los geht's!! @@ -3320,7 +3300,7 @@ Komm nach Bedford Point. In einem alten Wagen ist etwas versteckt. Das brauche ich pronto! [YD4_B] -BRIEF: Man hört, du bist ein viel beschãftigter Mann. Nun, ich bin eine viel beschãftigte Frau. +BRIEF: Man hört, du bist ein viel beschäftigter Mann. Nun, ich bin eine viel beschäftigte Frau. [YD4_C] Es wird Zeit, dass du die wahre Macht von 'SPANK' kennen lernst! Besos y fuderes, Catalina, xxx. @@ -3353,10 +3333,10 @@ Komm zu dem Fernsprecher in Wichita Gardens. Es gibt Arbeit. Yo! Hier spricht D-Ice von den Red Jacks! [HM1_C] -Diese pubertãren Idioten treiben sich hier rum und haben nichts als Knarren und SPANK im Sinn. +Diese pubertären Idioten treiben sich hier rum und haben nichts als Knarren und SPANK im Sinn. [HM1_3] -~g~Die 'Nines' hãngen in ihrem Gebiet in Wichita Gardens rum. +~g~Die 'Nines' hängen in ihrem Gebiet in Wichita Gardens rum. [HM2_3] Wenn du die Reifen eines Wagens triffst, explodiert der Buggy! @@ -3368,7 +3348,7 @@ Wenn er außer Reichweite kommt, explodiert der Buggy! ~r~Außer Reichweite! [HM3_1] -~g~Fahr zur Garage. Aber Vorsicht: Wird der Wagen zu stark beschãdigt, explodiert er! +~g~Fahr zur Garage. Aber Vorsicht: Wird der Wagen zu stark beschädigt, explodiert er! [HM3_2] ~g~Bring den Wagen zurück. Er muss in 1A Zustand sein. Keine Delle! @@ -3389,7 +3369,7 @@ TEXT NO LONGER REQUIRED ~g~Denk dran: Wird der Wagen zu schwer und zu langsam, fahr in die Garage und lade das Zeug aus. [HM5_3] -~r~Du solltest nur einen Baseball-Schlãger verwenden! +~r~Du solltest nur einen Baseball-Schläger verwenden! [HM5_4] ~r~Deine Kontaktperson ist tot! @@ -3464,7 +3444,7 @@ Man sagt, du kannst mir bei einigen Problemen helfen. Wenn das so ist, komm zu d ~g~Hol den Liebhaber seiner Frau ab. [MEA4_B6] -Dazu ist es jetzt zu spãt, Marty. Du hattest deine Chance. Jetzt übernehme ich den Laden hier. +Dazu ist es jetzt zu spät, Marty. Du hattest deine Chance. Jetzt übernehme ich den Laden hier. [MEA4_1] ~r~Carlos ist tot! @@ -3491,7 +3471,7 @@ Die CIA scheint sich sehr für SPANK zu interessieren. Sie wollen, dass wir das Kartell in Ruhe lassen. [C_PASS] -BEDROHUNG AUSGERÃUMT! +BEDROHUNG AUSGERÄUMT! [CTUTOR] Drücke die ~h~~k~~TOGGLE_SUBMISSIONS~-Taste~w~, um Bürgerwehr Missionen zu aktivieren oder zu deaktivieren. @@ -3509,7 +3489,7 @@ Mission beendet! ~r~Bürgerwehr Mission abgebrochen! [C_ESCP] -~r~Der Verdãchtige ist entwischt! +~r~Der Verdächtige ist entwischt! [C_TIME] ~r~Deine Zeit als Gesetzeshüter ist vorbei! @@ -3527,13 +3507,13 @@ BÜRGERWEHR BONUS!! Gerettet! [F_FAIL2] -~r~Du kommst zu spãt! +~r~Du kommst zu spät! [A_COMP2] Du ermüdest nie! [RM2_M] -Wenn du eine Waffe brauchst, komm vorbei und nimm dir aus den Kãsten, was du brauchst. +Wenn du eine Waffe brauchst, komm vorbei und nimm dir aus den Kästen, was du brauchst. [HEAL_A] Dein ~h~Gesundheit~w~ wird rechts oben auf dem Bildschirm in Orange angezeigt. @@ -3542,7 +3522,7 @@ Dein ~h~Gesundheit~w~ wird rechts oben auf dem Bildschirm in Orange angezeigt. ~1~ von 15! [FM1_9] -~g~Da vorne ist die Party. Setz Maria vor dem Gebãude ab. +~g~Da vorne ist die Party. Setz Maria vor dem Gebäude ab. [FM1_Y] ~w~Das war seit langem mal wieder ein guter Abend. Und du hast mich wirklich gut behandelt, mit Respekt und so. @@ -3587,7 +3567,7 @@ Komm wieder, wenn du nicht so viel zu tun hast... In die Garage nebenan kann 1 Fahrzeug eingestellt werden, wenn du das Spiel speicherst. [STOCK] -Nicht vorrãtig +Nicht vorrätig [FM1_O] ~w~Er ist beim Bahnhof am Chinatown-Ufer, glaube ich. @@ -3626,10 +3606,10 @@ Aber ich brauch Hilfe von außerhalb der Polizei. Falls du interessiert bist... du weißt, wo du mich findest. [CAM_A] -Drücke die ~h~~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~-taste~w~, um den ~h~Blickwinkel ~w~zu verãndern, wenn du zu Fuß oder in einem Fahrzeug unterwegs bist. +Drücke die ~h~~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~-taste~w~, um den ~h~Blickwinkel ~w~zu verändern, wenn du zu Fuß oder in einem Fahrzeug unterwegs bist. [CAM_B] -Drücke die ~h~Richtungstaste Oben~w~ und die ~h~Richtungstaste Unten~w~, um den ~h~Blickwinkel ~w~zu verãndern, wenn du zu Fuß oder in einem Fahrzeug unterwegs bist. +Drücke die ~h~Richtungstaste Oben~w~ und die ~h~Richtungstaste Unten~w~, um den ~h~Blickwinkel ~w~zu verändern, wenn du zu Fuß oder in einem Fahrzeug unterwegs bist. [KM2_1] ~g~Repariere den Wagen. Er muss top aussehen. @@ -3638,7 +3618,7 @@ Drücke die ~h~Richtungstaste Oben~w~ und die ~h~Richtungstaste Unten~w~, um den Joey... [LM3_6A] -Na, ein bisschen Nahkampf mit deiner Braut gefãllig? +Na, ein bisschen Nahkampf mit deiner Braut gefällig? [LM3_9A] Vielleicht gibt's Arbeit für dich. @@ -3655,29 +3635,29 @@ Okay? [JM6_1] Fahr zu der Bank auf dem Boulevard. -[GA_6B] -Park die Karre, mach sie durch Drücken der ~h~~k~~PED_FIREWEAPON~-Taste~w~ scharf, und dann HAU AB! +[GA_6B] { re3 change } +Park die Karre, mach sie durch Drücken der ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~ scharf, und dann HAU AB! -[GA_7B] -Mach die Bombe mit der ~h~~k~~PED_FIREWEAPON~-Taste~w~ scharf. Sie geht hoch, wenn der Wagen angelassen wird. +[GA_7B] { re3 change } +Mach die Bombe mit der ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~ scharf. Sie geht hoch, wenn der Wagen angelassen wird. [BAT1] -~g~Nimm dir den Schlãger! +~g~Nimm dir den Schläger! [EBAL_O] Wenn du deine Sache gut machst, gibt's vielleicht noch mehr Jobs für dich. Und jetzt verschwinde! [HELP9_B] -Drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um mit dem Prãzisionsgewehr zu ~h~feuern~w~. +Drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um mit dem Präzisionsgewehr zu ~h~feuern~w~. [HELP9_C] -Drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um mit dem Prãzisionsgewehr zu ~h~feuern~w~. +Drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um mit dem Präzisionsgewehr zu ~h~feuern~w~. [JM6_8] -~r~Du hast alle Rãuber verloren! +~r~Du hast alle Räuber verloren! [COLT_IN] -Die Pistole ist jetzt im AmmuNation vorrãtig! +Die Pistole ist jetzt im AmmuNation vorrätig! [TAXI2] ~r~Die Zeit ist um! @@ -3707,7 +3687,7 @@ Polizei-Schmiergelder wurde im Versteck angeliefert. Gesundheits-Powerups wurde im Versteck angeliefert. [PAGEB14] -Adrenalin wurde im Versteck vorrãtig. +Adrenalin wurde im Versteck vorrätig. [KM1_4] ~g~Du brauchst einen Polizeiwagen für diesen Job! @@ -3722,7 +3702,7 @@ Er hat eine Imbissbude in Chinatown. Hier ist ein Schlüssel für eine Garage. [RM6_2] -Darin findest du Bargeld und ein paar 'Requisiten' für alle Fãlle. +Darin findest du Bargeld und ein paar 'Requisiten' für alle Fälle. [RM6_3] Bis dann. @@ -3791,7 +3771,7 @@ MEMORY CARD-Steckplatz 1: Datei geschützt. ~1~ von 15! [T4X4_1C] -~y~PASSIERE~g~ den ersten Checkpoint, dann lãuft die Zeit. ~g~Jeder Checkpoint bringt dir ~y~20 SEKUNDEN~g~. +~y~PASSIERE~g~ den ersten Checkpoint, dann läuft die Zeit. ~g~Jeder Checkpoint bringt dir ~y~20 SEKUNDEN~g~. [T4X4_2A] ~g~Du hast ~y~2 Minuten~g~, um ~y~12~g~ Checkpoints abzufahren. ~g~Die ~y~REIHENFOLGE IST BELIEBIG. @@ -3800,13 +3780,13 @@ MEMORY CARD-Steckplatz 1: Datei geschützt. ~1~ von 12! [T4X4_2C] -~y~PASSIERE~g~ den ersten Checkpoint, dann lãuft die Zeit. ~g~Jeder Checkpoint bringt dir ~y~10 SEKUNDEN~g~. +~y~PASSIERE~g~ den ersten Checkpoint, dann läuft die Zeit. ~g~Jeder Checkpoint bringt dir ~y~10 SEKUNDEN~g~. [T4X4_3A] ~g~Du hast ~y~5 Minuten~g~, um ~y~20~g~ Checkpoints abzufahren. ~g~Die ~y~REIHENFOLGE IST BELIEBIG. [T4X4_3B] -~y~PASSIERE~g~ den ersten Checkpoint, dann lãuft die Zeit. ~g~Jeder Checkpoint bringt dir ~y~15 SEKUNDEN~g~. +~y~PASSIERE~g~ den ersten Checkpoint, dann läuft die Zeit. ~g~Jeder Checkpoint bringt dir ~y~15 SEKUNDEN~g~. [T4X4_3C] ~1~ von 20! @@ -3821,7 +3801,7 @@ MEMORY CARD-Steckplatz 1: Datei geschützt. ~1~ von 20! [MM_1_C] -~g~Das macht 20 Sekunden plus ~y~5 SEKUNDEN~g~ für jeden Checkpoint. ~g~Die Zeit lãuft ~y~AB SOFORT. +~g~Das macht 20 Sekunden plus ~y~5 SEKUNDEN~g~ für jeden Checkpoint. ~g~Die Zeit läuft ~y~AB SOFORT. [FM2_14] ~r~Du warst zu nah dran und hast Curly aufgeschreckt! @@ -4043,10 +4023,10 @@ Kriminelle bei Bürgerwehr Mission Gelöschte Feuer gesamt [FEST_LF] -Lãngster Flug in Dodo +Längster Flug in Dodo [FEST_BD] -Bestzeit Bombenentschãrfung +Bestzeit Bombenentschärfung [FEST_RP] Bestandene Amokfahrten @@ -4093,14 +4073,14 @@ Fahre deinen Wagen in die Lackiererei, um deinen ~h~Fahndungslevel~w~ loszuwerde [HM1_1] ~g~Fertige 20 Purple Nines in 2 Min. 30 Sek. ab. -[KM1_8A] -Drücke die~h~ ~k~~PED_FIREWEAPON~-Taste~w~ zum ~h~Zünden der Bombe~w~. Aber geh vorher in Deckung! +[KM1_8A] { re3 change } +Drücke die~h~ ~k~~VEHICLE_FIREWEAPON~-Taste~w~ zum ~h~Zünden der Bombe~w~. Aber geh vorher in Deckung! -[KM1_8D] -Drücke die~h~ ~k~~PED_FIREWEAPON~-Taste~w~ zum ~h~Zünden der Bombe~w~. Aber geh vorher in Deckung! +[KM1_8D] { re3 change } +Drücke die~h~ ~k~~VEHICLE_FIREWEAPON~-Taste~w~ zum ~h~Zünden der Bombe~w~. Aber geh vorher in Deckung! [KM1_12] -~g~Bring ihm zum Dojo, aber hãng vorher die Cops ab! +~g~Bring ihm zum Dojo, aber häng vorher die Cops ab! [RATNG1] Taschendieb @@ -4163,7 +4143,7 @@ Boss ~r~Dein Fahrzeug liegt auf dem Kopf [JM4_10] -Okay, Junge. Fahr mich zuerst in die Wãscherei in Chinatown. Ich hab da was zu erledigen. +Okay, Junge. Fahr mich zuerst in die Wäscherei in Chinatown. Ich hab da was zu erledigen. [JM4_11] Die Waschweiber da haben ihr Schutzgeld nicht bezahlt. @@ -4211,7 +4191,7 @@ Fahre deinen Wagen in die Lackiererei, um deinen ~h~Fahndungslevel~w~ loszuwerde Ja, ich weiß, Toni, ich hab sie gut erzogen. Sie schnurrt, falls du verstehst, was ich meine. [JM4_5] -Komm spãter wieder, dann zeigen wir den Kerlen, was Sache ist. +Komm später wieder, dann zeigen wir den Kerlen, was Sache ist. [AMMU_A] Luigi sagt, du brauchst 'ne Knarre... @@ -4234,11 +4214,11 @@ Auf den Ausweis verzichte ich. Du siehst vertrauenswürdig aus. [DETON] DETONATION: -[DRIVE_A] -Halt eine Uzi im Anschlag, wenn du in ein Fahrzeug steigst. Schau dann nach links oder rechts und drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um zu feuern. +[DRIVE_A] { re3 change } +Halt eine Uzi im Anschlag, wenn du in ein Fahrzeug steigst. Schau dann nach links oder rechts und drücke die ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~, um zu feuern. -[DRIVE_B] -Halt eine Uzi im Anschlag, wenn du in ein Fahrzeug steigst. Schau dann nach links oder rechts und drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um zu feuern. +[DRIVE_B] { re3 change } +Halt eine Uzi im Anschlag, wenn du in ein Fahrzeug steigst. Schau dann nach links oder rechts und drücke die ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~, um zu feuern. [RECORD] ~g~NEUER REKORD!! @@ -4246,11 +4226,11 @@ Halt eine Uzi im Anschlag, wenn du in ein Fahrzeug steigst. Schau dann nach link [NRECORD] ~r~KEIN NEUER REKORD! -[RCHELP] -Drücke die ~k~~PED_FIREWEAPON~-Taste oder fahre das ferngesteuerte Auto in die Rãder eines Fahrzeugs, um es zu sprengen. +[RCHELP] { re3 change } +Drücke die ~k~~VEHICLE_FIREWEAPON~-Taste oder fahre das ferngesteuerte Auto in die Räder eines Fahrzeugs, um es zu sprengen. -[RCHELPA] -Drücke die ~k~~PED_FIREWEAPON~-Taste oder fahre das ferngesteuerte Auto in die Rãder eines Fahrzeugs, um es zu sprengen. +[RCHELPA] { re3 change } +Drücke die ~k~~VEHICLE_FIREWEAPON~-Taste oder fahre das ferngesteuerte Auto in die Räder eines Fahrzeugs, um es zu sprengen. [RC_1] Du hast 2 Minuten, um so viele Diablo-Autos wie möglich zu sprengen! @@ -4343,10 +4323,10 @@ Dein Job: ~1~ Kolumbianer in 120 Sekunden! Dein Job: ~1~ Hoods in 120 Sekunden! [JM1_A] -Mir ist langweilig. Wann lãuft hier endlich mal was ab? +Mir ist langweilig. Wann läuft hier endlich mal was ab? [JM1_B] -Gleich, Schãtzchen. Muss nur schnell was erledigen. +Gleich, Schätzchen. Muss nur schnell was erledigen. [JM1_C] Ich hab 'nen kleinen Job für dich. @@ -4355,7 +4335,7 @@ Ich hab 'nen kleinen Job für dich. Die Forelli Brüder zahlen ihre Schulden nicht. [JM1_E] -Ich muss ihnen ein bisschen Respekt einblãuen. +Ich muss ihnen ein bisschen Respekt einbläuen. [JM1_F] Lips Forelli stopft sich gerade in Marcos Bistro seinen fetten Bauch voll. @@ -4394,7 +4374,7 @@ Du bist ein armes Würstchen, Amigo. Wirf die Kohle rüber! [CAT2_E] -Du bist an sich ein fãhiger Bursche. +Du bist an sich ein fähiger Bursche. [CAT2_E2] Aber du kapierst nicht, dass man mir nicht trauen kann. @@ -4406,7 +4386,7 @@ Macht den Idioten fertig. Bring das Ding in die Luft!! [HM5_1] -Yo, Ice hat dich angekündigt. Es gibt hier Regeln. Nur Schlãger. Keine Knarren, keine Autos. +Yo, Ice hat dich angekündigt. Es gibt hier Regeln. Nur Schläger. Keine Knarren, keine Autos. [HM5_5] Hier geht's um Respekt und Achtung, klar? @@ -4418,19 +4398,19 @@ Um Waffen aufzunehmen, gehe darüber hinweg. Dies funktioniert nicht, wenn du in Parke in der markierten Zone und steig aus. Das Fahrzeug wird dann geschrottet. [DIAB2_B] -Eine Bande von Taugenichtsen will mir ans Leder, falls ich sie nicht an meinen Geschãften beteilige. +Eine Bande von Taugenichtsen will mir ans Leder, falls ich sie nicht an meinen Geschäften beteilige. [DIAB2_C] Aber da sind sie an den Falschen geraten, Amigo. [DIAB2_D] -Die haben eine Schwãche für Eiscreme. +Die haben eine Schwäche für Eiscreme. [DIAB2_E] Hol die Bombe ab, die ich in Harwood versteckt habe, [DIAB2_F] -schnapp dir einen normalen Eis-Wagen, der rumfãhrt +schnapp dir einen normalen Eis-Wagen, der rumfährt [DIAB2_G] und locke diese Idioten mit dem Eis-Jingle in ihr Verderben. @@ -4469,7 +4449,7 @@ Aber dieser SPANK-Junkie hat die Hecktüren offen gelassen und jetzt verteilt sich mein wunderschönes, [DIAB4_D] -geschmackvoll fotografiertes Magazin gleichmãßig über ganz Liberty! +geschmackvoll fotografiertes Magazin gleichmäßig über ganz Liberty! [DIAB4_E] Nimm den Transporter, folge der Spur von 'Donkey Does Dallas' Nr. 1, 2 und 3. @@ -4499,7 +4479,7 @@ Die Nines bringen mich in die Klemme. Die Kerle haben gepanzerte Autos, und jetzt verhökern sie SPANK [HM2_C] -an meine Brüder, als wãre das gar nichts. +an meine Brüder, als wäre das gar nichts. [HM2_D] Auf dem Weg steht ein Wagen geparkt. @@ -4517,10 +4497,10 @@ Wenn ich die Karre verliere, stehe ich als Trottel da. Hol meinen Wagen ab und bring ihn in die Werkstatt in St. Mark's. [HM3_D] -Die sollen die Bombe da entschãrfen. +Die sollen die Bombe da entschärfen. [HM3_E] -Die Uhr tickt und die Drãhte sind locker. +Die Uhr tickt und die Drähte sind locker. [HM3_F] Ein Schlagloch zuviel, und das Ding geht hoch. @@ -4544,7 +4524,7 @@ Du kannst das Zeug in einer meiner Garagen abladen. Platin ist verdammt schwer. Dein Auto wird etwas langsamer laufen. [HM4_H] -Also, lade regelmãßig etwas davon in einer Garage ab. +Also, lade regelmäßig etwas davon in einer Garage ab. [HM5_A] Die Nines sind nur noch ein versprengter Haufen... @@ -4562,10 +4542,10 @@ Eine Gang von denen gegen zwei von uns. Oder vielmehr... zwei von euch. [HM5_F] -Ich wãre ja dabei, aber... +Ich wäre ja dabei, aber... [HM5_G] -ich hab noch drei Monate Bewãhrung, +ich hab noch drei Monate Bewährung, [HM5_H] verstehst du, was ich meine? @@ -4586,10 +4566,10 @@ Mir gehört die Bitchin' Dog Food Fleischfabrik um die Ecke. Ich hab Geldsorgen, aber wer hat die nicht, was? [MEA1_E] -Ich treff mich spãter mit meinem Banker. +Ich treff mich später mit meinem Banker. [MEA1_F] -Das ist ein linker Sãger, der mir dauernd die Kreditraten raufsetzt, um sich 'ne Scheibe abzuschneiden. +Das ist ein linker Säger, der mir dauernd die Kreditraten raufsetzt, um sich 'ne Scheibe abzuschneiden. [MEA1_G] Nimm mein Auto, hol ihn ab und bring ihn hierher. @@ -4601,7 +4581,7 @@ Ich habe eine kleine Überraschung für diesen Blutsauger!! Ich hab Diebe angeheuert, um in meine Wohnung einzubrechen. [MEA2_C] -Jetzt drohen diese Dreckskerle, sie erzãhlen alles der Versicherung, +Jetzt drohen diese Dreckskerle, sie erzählen alles der Versicherung, [MEA2_D] wenn ich sie nicht beteilige. @@ -4637,7 +4617,7 @@ Mist, ich steck in der Klemme! Meine Frau hatte was mit einem Typen, dem ich Geld schulde. [MEA4_C] -Der ist jetzt ziemlich sauer und will sich rãchen! +Der ist jetzt ziemlich sauer und will sich rächen! [MEA4_E] Der denkt, er kann mich erpressen... @@ -4652,7 +4632,7 @@ dass auch dieser gute Mann als Hundefutter enden wird. WILLKOMMEN IN [HM1_2] -~g~Besorg dir ein Fahrzeug. Beachte: Hier zãhlt nur die Uzi! +~g~Besorg dir ein Fahrzeug. Beachte: Hier zählt nur die Uzi! [HELP8_B] Drücke die ~h~~k~~PED_SNIPER_ZOOM_IN~-Taste~w~ zum ~h~Heranzoomen~w~ mit dem Gewehr, und die ~h~~k~~PED_SNIPER_ZOOM_OUT~-Taste~w~ zum ~h~Wegzoomen~w~. @@ -4682,7 +4662,7 @@ Dann können wir uns ein bisschen unterhalten. Wenn du 'ne Knarre brauchst, geh zum Hintereingang vom AmmuNation gegenüber der U-Bahn. [LOVE4_7] -~g~Es gibt einen Bauhof auf Staunton Island. Vielleicht haben sie das Pãckchen dorthin gebracht. +~g~Es gibt einen Bauhof auf Staunton Island. Vielleicht haben sie das Päckchen dorthin gebracht. [LOVE4_8] ~g~Du brauchst ein Auto, um die Garage zu öffnen. @@ -4694,7 +4674,7 @@ EINKÜNFTE: $~1~ ~r~Salvatore hat sich in Luigis Club abgesetzt! [AM1_6] -~g~Wenn du vor Luigis Club rumhãngst, bemerken dich die Mafiosi! +~g~Wenn du vor Luigis Club rumhängst, bemerken dich die Mafiosi! [TM2_3] ~g~Das ist eine Falle! Nimm sie dir alle vor! @@ -4721,7 +4701,7 @@ Hier Maria. Das mit dem Wagen ist eine Falle! Komm zu dem Steg südlich der Call Hi, ich bin Joey. [LM3_9] -Luigi sagt, du bist verlãsslich. Also komm spãter wieder. +Luigi sagt, du bist verlässlich. Also komm später wieder. [KM3_5] ~g~Drück die Hupe, damit der Deal in Gang kommt. @@ -4742,7 +4722,7 @@ LOVES VERSCHWINDEN ~g~Das Kartell wurde angegriffen. Die Aktentasche wurde nicht sichergestellt. [KM3_12] -~g~Nimm dir sãmtliche Kolumbianer vor, zerstöre die Fahrzeuge und stell die Aktentasche sicher. +~g~Nimm dir sämtliche Kolumbianer vor, zerstöre die Fahrzeuge und stell die Aktentasche sicher. [KM3_13] ~g~Bring die Aktentasche ins Casino. @@ -4750,11 +4730,11 @@ LOVES VERSCHWINDEN [RM5_6] ~g~Er ist abgehauen! Zerstöre seine Panzerung mit einem Auto oder einer Explosion!! -[PBOAT_1] -Drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um die Bordkanonen abzufeuern. +[PBOAT_1] { re3 change } +Drücke die ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~, um die Bordkanonen abzufeuern. -[PBOAT_2] -Drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~, um die Bordkanonen abzufeuern. +[PBOAT_2] { re3 change } +Drücke die ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~, um die Bordkanonen abzufeuern. [DIAB1_B] Hier El Burro, von den Diablos. @@ -4766,13 +4746,13 @@ Du bist neu in Liberty, aber du hast bereits eine guten Ruf auf der Straße. Bei der alten Schulhalle nahe der Callahan Bridge findet ein Rennen statt. [DIAB1_F] -Besorg dir 'nen fahrbaren Untersatz. Wer als erster alle Checkpoints abfãhrt, ist Sieger. +Besorg dir 'nen fahrbaren Untersatz. Wer als erster alle Checkpoints abfährt, ist Sieger. -[HM2_1] -Zerstöre die gepanzerten Fahrzeuge mit den Buggies. Zur Zündung drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~. +[HM2_1] { re3 change } +Zerstöre die gepanzerten Fahrzeuge mit den Buggies. Zur Zündung drücke die ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~. -[HM2_1A] -Zerstöre die gepanzerten Fahrzeuge mit den Buggies. Zur Zündung drücke die ~h~~k~~PED_FIREWEAPON~-Taste~w~. +[HM2_1A] { re3 change } +Zerstöre die gepanzerten Fahrzeuge mit den Buggies. Zur Zündung drücke die ~h~~k~~VEHICLE_FIREWEAPON~-Taste~w~. [HM2_2] ~r~Du hast nicht alle gepanzerten Fahrzeuge zerstört! @@ -4799,16 +4779,16 @@ Kleine Lektion in Sachen Business, mein Freund: Hast du eine hochinteressante Ware, wird Gott und die Welt sie dir abjagen wollen... [LOVE6_C] -Spezialeinheiten haben die Gegend um meinen Geschãftsfreund und das Pãckchen abgeriegelt. +Spezialeinheiten haben die Gegend um meinen Geschäftsfreund und das Päckchen abgeriegelt. [LOVE6_D] Mach, dass du hinkommst, nimm den Transporter und lenk sie ab. [LOVE6_F] -Beschãftige die Typen, damit er sich absetzen kann. +Beschäftige die Typen, damit er sich absetzen kann. [AM3_C] -Vermutlich ist er in der Bucht draußen, wãhrend du dies liest. Nimm mein Boot und mach seiner Karriere ein Ende! +Vermutlich ist er in der Bucht draußen, während du dies liest. Nimm mein Boot und mach seiner Karriere ein Ende! [FESZ_UC] ABBRECHEN @@ -4817,13 +4797,13 @@ ABBRECHEN L1, R1-MENÜ WECHSELN [FEDS_AS] -;=-AUSWAHL ÃNDERN +;=-AUSWAHL ÄNDERN [FEDSAS2] -<>-AUSWAHL ÃNDERN +<>-AUSWAHL ÄNDERN [FEDS_SS] -L1, R1-AUSWAHL ÃNDERN +L1, R1-AUSWAHL ÄNDERN [FEDSSC1] ;-SCHNELLER BILDLAUF @@ -4868,7 +4848,7 @@ TEXT NO LONGER NEEDED aber wenn du in mein Büro kommst, könnte ich... [MEA3_B4] -Marty will mich sehen? Das muss aber schnell gehen, ich hab nãmlich einen Friseurtermin. +Marty will mich sehen? Das muss aber schnell gehen, ich hab nämlich einen Friseurtermin. [KM3_7] Das ist eine Falle der Yakuza, Mann! @@ -4886,7 +4866,7 @@ Memory Card (PS2) in MEMORY CARD-Steckplatz 1: Kein freier Speicherplatz. Bitte DATEI [FES_ISC] -IST BESCHÃDIGT +IST BESCHÄDIGT [FESZ_TI] Z1 SPEICHERN @@ -4907,10 +4887,10 @@ Laden fehlgeschlagen! Spiel wird neu gestartet [LOVE6_3] -~g~Du hast ~1~ Sekunden, um zu dem Securicar zurückzukehren, bevor die Mission fehlschlãgt. +~g~Du hast ~1~ Sekunden, um zu dem Securicar zurückzukehren, bevor die Mission fehlschlägt. [LOVE6_4] -~r~Du hast den falschen Securicar abgehãngt! +~r~Du hast den falschen Securicar abgehängt! [HELP1] Halte in der Mitte der blauen Markierung. @@ -4976,7 +4956,7 @@ Ich hab 'n Problem. Die wollen mich verscheißern. Sehr erfreulich, dass Salvatore nicht mehr unter uns weilt. [AM2_A2] -Du bist ein effizienter Mann - das gefãllt mir. +Du bist ein effizienter Mann - das gefällt mir. [AM2_B] Das ist mein Bruder Kenji. @@ -4988,7 +4968,7 @@ Asuka hat einen kleinen Job für dich, aber wenn du fertig bist, komm in mein Ca Typisch Kenji, immer will er mit meinen Spielsachen spielen. [AM2_E] -Mein Spitzel bei der Polizei hat mir gesteckt, dass die Mafia unsere Aktivitãten im Auge behãlt. +Mein Spitzel bei der Polizei hat mir gesteckt, dass die Mafia unsere Aktivitäten im Auge behält. [AM2_E2] Sie wollen dich aufstöbern. @@ -5012,7 +4992,7 @@ Komm zu dem Fernsprecher auf dem Liberty Campus. Komm zu dem Fernsprecher im South Belleville Park. [AM4_1D] -Wir treffen uns im Toilettenhãuschen im Park. +Wir treffen uns im Toilettenhäuschen im Park. [HJSTATF] Distanz: ~1~Fuß Höhe: ~1~Fuß Saltos: ~1~ Drehungen: ~1~_ @@ -5045,7 +5025,7 @@ Und stiehl ein paar Sachen, damit ich die Versicherung kassieren kann. ~w~Meine Girls fragen andauernd nach dir, Salvatore. Du warst so lange nicht mehr bei uns. [TM3_L] -~w~Sag ihnen, wenn diese lãstige Geschichte hier vorbei ist, +~w~Sag ihnen, wenn diese lästige Geschichte hier vorbei ist, [TM3_M] ~w~gehen wir alle in den Club und feiern, okay? @@ -5090,7 +5070,7 @@ Dieser McAffrey! Der hat mehr Bestechungsgeld kassiert als jeder andere. Jetzt denkt er, er wird ehrenhaft entlassen, wenn er als Kronzeuge aussagt. [RM1_C] -Er ist einfach ein Verrãter. +Er ist einfach ein Verräter. [RM4_B] Wir müssen ihn zum Schweigen bringen - für immer. @@ -5126,7 +5106,7 @@ DU! Hey, ganz ruhig, Amigo! De nada! De nada! [GTAB_F] -Ich dachte, ich hãtte dich erledigt! +Ich dachte, ich hätte dich erledigt! [GTAB_G] Nicht schießen, Amigo! Kein Problem. Wir sind alle Freunde. Hier, nimm. @@ -5138,7 +5118,7 @@ Nicht so memmenhaft! Wir haben keine Wahl, Baby! [GTAB_J] -Wir haben immer eine Wahl, du dãmlicher Idiot! +Wir haben immer eine Wahl, du dämlicher Idiot! [GTAB_K] Sorry wegen dem abgedrehten Flittchen, Mann. Die sind doch alle gleich. Por favor? @@ -5159,7 +5139,7 @@ Dieser Wurm hat meinen Bruder auf dem Gewissen! I hab nie einen Yakuza umgebracht! [GTAB_Q] -Lügner! Wir alle haben den Kartell-Attentãter gesehen. +Lügner! Wir alle haben den Kartell-Attentäter gesehen. [GTAB_R] Wir werden euch kolumbianische Hunde alle erledigen! @@ -5168,7 +5148,7 @@ Wir werden euch kolumbianische Hunde alle erledigen! Ich befasse mich mit unserem Freund. Mal sehen, was ich aus ihm rauskriege. [GTAB_T] -Komm spãter wieder. Ich werde deine Dienste brauchen. +Komm später wieder. Ich werde deine Dienste brauchen. [GTAB_U] Bitte, Amigo, lass mich nicht hier bei ihr! Die ist 'n Psycho! Amigo? Hey, AMIIIGO!!!...Aiiieeeeaaargghh! @@ -5183,7 +5163,7 @@ Du bist eine sichere Bank. So etwas ist selten in diesen schlechten Zeiten. ~g~Mit einem Wagen der Kolumbianer kommst du in ihren Unterschlupf rein. Im Norden, in Fort Staunton, findest du einen. [FM1_Q1] -~w~Na, kleine Erfrischung gefãllig? Ein bisschen SPANK? +~w~Na, kleine Erfrischung gefällig? Ein bisschen SPANK? [FM1_R] ~w~Hi, Chico. Nein, nur das übliche. @@ -5234,7 +5214,7 @@ da hat er dem Kartell deinen Kopf angeboten, um einen Deal mit denen zu machen. Das kann ich nicht zulassen. Das ist alles meine Schuld. [FM4_4B] -Ich hab ihm erzãhlt, dass wir uns gut verstehen. +Ich hab ihm erzählt, dass wir uns gut verstehen. [FM4_5] Frag mich nicht wieso. Ich weiß es nicht. @@ -6101,7 +6081,7 @@ Cinematic-Kamera Fahr das Fahrzeug in die Garage! [KM3_14] -~r~Du bist gesehen worden. Der Deal fãllt flach! +~r~Du bist gesehen worden. Der Deal fällt flach! [EBAL_H] Warte hier. Ich gehe rein und rede mit Luigi. @@ -6119,13 +6099,13 @@ Hier. Hier, nimm. Hi. Ich bin Misty. [LM4_A] -So ein Mistkerl von den Diablos hat in meinem Gebiet Mãdchen laufen. +So ein Mistkerl von den Diablos hat in meinem Gebiet Mädchen laufen. [FM2_B] -Wir haben einen Verrãter unter uns! +Wir haben einen Verräter unter uns! [FM2_C] -Er verdient kein Geld mit Mãdchen oder Dealen, also wird er Informationen verkaufen. +Er verdient kein Geld mit Mädchen oder Dealen, also wird er Informationen verkaufen. [FM3_CC] ~w~Komm wieder, wenn du die Kohle hast, Bruder. @@ -6152,13 +6132,13 @@ Er verdient kein Geld mit Mãdchen oder Dealen, also wird er Informationen verka ~r~Das Flugzeug ist zerstört worden! [LOV4_10] -~r~Die einzige Spur auf den Verbleib des Pãckchens ist vernichtet worden. +~r~Die einzige Spur auf den Verbleib des Päckchens ist vernichtet worden. [KM2_D] Unnötig zu sagen, dass wir ihm die Autos schenken müssen, um meine Schuld bei ihm zu begleichen. [KM4_B] -Für Lãden, die das Glück haben, unter unserem Schutz zu stehen, ist heute Zahltag. +Für Läden, die das Glück haben, unter unserem Schutz zu stehen, ist heute Zahltag. [KM2_E] Du musst die Autos auf der Liste besorgen und zu einer Garage hinter dem Parkplatz in Newport bringen. @@ -6173,7 +6153,7 @@ Ich weiß, dass einer wie du sehr loyal sein kann, wenn das Geld stimmt. Aber je mehr Leute, desto größer die Gier. [LOVE1_C] -Ein werter Geschãftsfreund, ein alter Asiate, +Ein werter Geschäftsfreund, ein alter Asiate, [LOVE1_I] wird von irgendwelchen Südamerikanern in Aspatria als Geisel festgehalten. @@ -6182,10 +6162,10 @@ wird von irgendwelchen Südamerikanern in Aspatria als Geisel festgehalten. Ich habe ein Treffen mit ihm vereinbart... [MEA4_B4] -Marty schickt dich also? Dem Penner werde ich zeigen, was es heißt, mit mir Geschãfte zu machen. +Marty schickt dich also? Dem Penner werde ich zeigen, was es heißt, mit mir Geschäfte zu machen. [MEA4_B5] -Carl, hi. Ich, ãh, ich brauche noch ein bisschen Zeit, um dein Geld aufzutreiben. +Carl, hi. Ich, äh, ich brauche noch ein bisschen Zeit, um dein Geld aufzutreiben. [MEA1_B4] Mr Chonks schickt dich also. Wollen wir dem Burschen doch mal einen Besuch abstatten. @@ -6194,7 +6174,7 @@ Mr Chonks schickt dich also. Wollen wir dem Burschen doch mal einen Besuch absta Dann wollen wir doch mal ein paar Leute aufmischen... [LOVE1_5] -~g~Hãng hier nicht rum, besorg dir ein Auto der Kolumbianer und rette Loves Geschãftsfreund. +~g~Häng hier nicht rum, besorg dir ein Auto der Kolumbianer und rette Loves Geschäftsfreund. [AS1_D] ~w~Spiel den Köder und locke die Killerkommandos nach Pine Creek, @@ -6230,7 +6210,7 @@ Um die Sirenen dieses Fahrzeugs einzuschalten, drücke die ~h~~k~~VEHICLE_HORN~- ~w~Oh, hi, Baby. [AS3_F] -~w~Das Mãdchen ist ein Naturtalent. +~w~Das Mädchen ist ein Naturtalent. [AS3_F1] ~w~Sie hat unserem Gast eine kleine Info entlockt. @@ -6242,7 +6222,7 @@ Um die Sirenen dieses Fahrzeugs einzuschalten, drücke die ~h~~k~~VEHICLE_HORN~- ~w~Es ist voll mit Catalinas Giftzeug. [AS3_H] -~w~Du entgehst den Security Checks am Flughafen, wenn du dir ein Boot besorgst, zu den Leuchtbojen rausfãhrst +~w~Du entgehst den Security Checks am Flughafen, wenn du dir ein Boot besorgst, zu den Leuchtbojen rausfährst [AS3_H1] und die Maschine im Anflug abschießt. @@ -6272,7 +6252,7 @@ Verdammt, da sind sie!! LOS, LADEN!! Salvatore Leone wird Luigis Club in zirka drei Stunden verlassen (~1~:~1~). [LOVE5_C] -Folge ihm und sorg dafür, dass er und mein Pãckchen wohlbehalten in Pike Creek ankommen. +Folge ihm und sorg dafür, dass er und mein Päckchen wohlbehalten in Pike Creek ankommen. [FESZ_SR] Speicherung fehlgeschlagen! Bitte Memory Card (PS2) in MEMORY CARD-Steckplatz 1 überprüfen und noch einmal versuchen. @@ -6359,13 +6339,13 @@ Daten werden gelöscht. Bitte die Memory Card (PS2) in MEMORY CARD-Steckplatz 1 Luigi sagt, das soll ich dir geben... [LM3_G] -Joey ist einer, den man nicht warten lãsst. Das ist deine Chance. +Joey ist einer, den man nicht warten lässt. Das ist deine Chance. [LM5_E] Bring so viele wie möglich hin, bevor die Cops ihr ganzes Geld versaufen. [JM5_C] -Vor dem Cafe in der Nãhe vom Callahan Point steht ein Auto mit einem Toten drin. +Vor dem Cafe in der Nähe vom Callahan Point steht ein Auto mit einem Toten drin. [RM2_B] Wir waren zusammen in Nicaragua, als dieses Land noch wusste, was es tut. @@ -6374,7 +6354,7 @@ Wir waren zusammen in Nicaragua, als dieses Land noch wusste, was es tut. Irgendwelche Dreckskerle vom Kartell haben ihn gestern verprügelt und kommen heute wieder, um ihm seine Ware abzunehmen. [RM2_D1] -Ich würde es selbst machen, aber meine Bronchien melden sich wieder. Tja, ãh, viel Glück. +Ich würde es selbst machen, aber meine Bronchien melden sich wieder. Tja, äh, viel Glück. [CATINF1] ~g~Schnapp dir Catalina! @@ -6386,13 +6366,13 @@ Ich würde es selbst machen, aber meine Bronchien melden sich wieder. Tja, ãh, Spring auf ein Boot und drücke die ~h~~k~~VEHICLE_ENTER_EXIT~-Taste~w~, um hinein zu gelangen. [BOATIN2] -Wenn du in der Nãhe eines Bootes bist, kannst du die ~h~~k~~VEHICLE_ENTER_EXIT~-Taste ~w~benutzen, um an Bord zu gelangen. +Wenn du in der Nähe eines Bootes bist, kannst du die ~h~~k~~VEHICLE_ENTER_EXIT~-Taste ~w~benutzen, um an Bord zu gelangen. [BOATIN3] Spring auf ein Boot und drücke die ~h~~k~~VEHICLE_ENTER_EXIT~-Taste~w~, um hinein zu gelangen. [BOATIN4] -Wenn du in der Nãhe eines Bootes bist, kannst du die ~h~~k~~VEHICLE_ENTER_EXIT~-Taste ~w~benutzen, um an Bord zu gelangen. +Wenn du in der Nähe eines Bootes bist, kannst du die ~h~~k~~VEHICLE_ENTER_EXIT~-Taste ~w~benutzen, um an Bord zu gelangen. [JM6] 'DIE FLUCHT' @@ -6419,7 +6399,7 @@ Wenn du in der Nãhe eines Bootes bist, kannst du die ~h~~k~~VEHICLE_ENTER_EXIT~ 'GTA' [AS3] -'DER ABFANGJÃGER' +'DER ABFANGJÄGER' [RM2] 'DAS WAFFENARSENAL' @@ -6443,16 +6423,16 @@ Wenn du in der Nãhe eines Bootes bist, kannst du die ~h~~k~~VEHICLE_ENTER_EXIT~ 'ROCK'N ROLL MIT RUMPO' [RM2_E1] -Unglaublich, dass die feigen Sãcke mich wieder ohne ausreichenden Schutz ins Gefecht schicken. +Unglaublich, dass die feigen Säcke mich wieder ohne ausreichenden Schutz ins Gefecht schicken. [GREN_1] -Je lãnger du die ~h~~k~~PED_FIREWEAPON~-Taste~w~ gedrückt hãltst, desto weiter kannst du die Granate werfen. +Je länger du die ~h~~k~~PED_FIREWEAPON~-Taste~w~ gedrückt hältst, desto weiter kannst du die Granate werfen. [GREN_2] -Je lãnger du die ~h~~k~~PED_FIREWEAPON~-Taste~w~ gedrückt hãltst, desto weiter kannst du die Granate werfen. +Je länger du die ~h~~k~~PED_FIREWEAPON~-Taste~w~ gedrückt hältst, desto weiter kannst du die Granate werfen. [GREN_3] -Je lãnger du die ~h~~k~~PED_FIREWEAPON~-Taste~w~ gedrückt hãltst, desto weiter kannst du die Granate werfen. +Je länger du die ~h~~k~~PED_FIREWEAPON~-Taste~w~ gedrückt hältst, desto weiter kannst du die Granate werfen. [LOVE4_G] Die Maschine mit meiner Ware steht im Zollhangar. @@ -6515,7 +6495,7 @@ Neuer Motor und neue Lackierung. Die Cops werden dich nicht identifizieren! Warum nicht ein Taxi 'ausleihen', um dir was dazu zu verdienen...? [TAXIH1] -Halte neben einem gehighlighteten Fußgãnger, um ihn einsteigen zu lassen, dann bringe ihn rechtzeitig an sein Fahrtziel. +Halte neben einem gehighlighteten Fußgänger, um ihn einsteigen zu lassen, dann bringe ihn rechtzeitig an sein Fahrtziel. [LM5_7] ~g~Wenn weniger als vier Girls bei dem ~p~Polizeiball~g~ auftauchen, wird Luigi sauer! @@ -6530,13 +6510,13 @@ Halte neben einem gehighlighteten Fußgãnger, um ihn einsteigen zu lassen, dann Sorry, Baby. [BETRA_B] -Ich bin ein anspruchsvolles Mãdchen und du... +Ich bin ein anspruchsvolles Mädchen und du... [BETRA_C] ... du bist ein kleiner Fisch. [JAILB_C] -Noch gibt es keine nãheren Informationen zu den Hãftlingen, die mit dem Konvoi transportiert wurden, +Noch gibt es keine näheren Informationen zu den Häftlingen, die mit dem Konvoi transportiert wurden, [JAILB_E] Der Konvoi war am frühen Morgen vom Polizei-Hauptquartier aus @@ -6590,16 +6570,16 @@ Diese Memory Card (PS2) ist bereits formatiert. > [FEDSAS3] -- AUSWAHL ÃNDERN +- AUSWAHL ÄNDERN [FEDSAS4] -;=<> - AUSWAHL ÃNDERN +;=<> - AUSWAHL ÄNDERN -[SPRAY_4] -~h~~k~~PED_FIREWEAPON~-Taste ~w~benutzen, um die Wasserkanone abzufeuern. +[SPRAY_4] { re3 change } +~h~~k~~VEHICLE_FIREWEAPON~-Taste ~w~benutzen, um die Wasserkanone abzufeuern. -[SPRAY_1] -~h~~k~~PED_FIREWEAPON~-Taste ~w~benutzen, um die Wasserkanone abzufeuern. +[SPRAY_1] { re3 change } +~h~~k~~VEHICLE_FIREWEAPON~-Taste ~w~benutzen, um die Wasserkanone abzufeuern. [LITTLE] LITTLE T @@ -6614,7 +6594,7 @@ NICK LOVE Liberty City ist heute vom Schrecken gezeichnet. [JAILB_A] -Polizei und Noteinsatzkrãfte arbeiten unter Hochdruck, nachdem heute morgen +Polizei und Noteinsatzkräfte arbeiten unter Hochdruck, nachdem heute morgen [JAILB_B] ein verheerender Anschlag auf einen Polizeikonvoi verübt wurde. @@ -6659,13 +6639,13 @@ Ich habe mein Entertainment-Business mit nichts als dem üppigen Inhalt meiner L GIRLS: [PERPIC] -Versteckte Pãckchen gefunden +Versteckte Päckchen gefunden [CO_ONE] -Verstecktes Pãckchen ~1~ von ~1~ +Verstecktes Päckchen ~1~ von ~1~ [LOVE3_3] -~g~Das Flugzeug hat ~1~ von 6 Pãckchen abgeworfen. +~g~Das Flugzeug hat ~1~ von 6 Päckchen abgeworfen. [FARE11] ~g~Fahrziel: ~w~'Baustelle' ~g~in Fort Staunton. @@ -6701,7 +6681,7 @@ Wetter-Cheat "-Taste - ZURÜCK [RAMP_A] -ALLE AMOKLÃUFE BEENDET! +ALLE AMOKLÄUFE BEENDET! [USJ_ALL] ALLE MONSTER-STUNTS ABSOLVIERT! @@ -6734,7 +6714,7 @@ Jan Feb [MAR] -Mãr +Mär [APR] Apr @@ -6845,7 +6825,7 @@ SUPER-VIERFACH-IRRSINNS-STUNT-BONUS: $~1~ Salvatore Leone wird Luigis Club in zirka drei Stunden verlassen. (0~1~:~1~) [IMPEXPP] -Import-Export Garage, Portland Harbor. Wir haben Bestellungen für verschiedene Fahrzeuge. Nãheres steht auf unserem Schwarzen Brett. +Import-Export Garage, Portland Harbor. Wir haben Bestellungen für verschiedene Fahrzeuge. Näheres steht auf unserem Schwarzen Brett. [VANHSTP] Willst du noch mehr Securicars aufgebrochen haben? Bring sie zu unserer Garage in Portland Harbor. @@ -6854,7 +6834,7 @@ Willst du noch mehr Securicars aufgebrochen haben? Bring sie zu unserer Garage i Zahlen Bestpreise für Neu- und Gebrauchtwagen. Bring sie zum Kran im Nordosten von Portland Harbor. [STANDS] -ZERSTÖRTE ESPRESSOSTÃNDE: +ZERSTÖRTE ESPRESSOSTÄNDE: [STASH] ~g~Deponiere das SPANK auf der ~p~Baustelle! @@ -6866,7 +6846,7 @@ Keine Memory Card (PS2) in MEMORY CARD-Steckplatz 1. Trotzdem starten? (JA oder ~g~Das Flugzeug ist jetzt in Reichweite. [LOVE3_6] -~r~Die Polizei war vor dir bei den Pãckchen! +~r~Die Polizei war vor dir bei den Päckchen! [SIREN_1] Um die Sirenen dieses Fahrzeugs einzuschalten, drücke die ~h~~k~~VEHICLE_HORN~-Taste~w~. @@ -6890,13 +6870,13 @@ Soll die Memory Card (PS2) in MEMORY CARD-Steckplatz 1 wirklich formatiert werde Ladevorgang abgeschlossen. [RM3_5] -~g~Du hast ~1~ von 6 Pãckchen mit Beweisfotos. +~g~Du hast ~1~ von 6 Päckchen mit Beweisfotos. [LOVE3_2] -~g~Du hast alle Pãckchen. Bring sie zu Donald Love. +~g~Du hast alle Päckchen. Bring sie zu Donald Love. [LOVE4_4] -~g~Bring das Pãckchen zu Donald Love! +~g~Bring das Päckchen zu Donald Love! [FEB_SAV] Laden @@ -6914,7 +6894,7 @@ SPIEL LADEN Bitte stecken Sie einen Analog Controller (DUALSHOCK#) oder einen Analog Controller (DUALSHOCK#2) in Controller-Anschluss 1, um fortzufahren. [BET_JB] -VON CATALINA, SEINER GELIEBTEN, IM STICH GELASSEN, FÜR SCHULDIG BEFUNDEN UND VERURTEILT, BEFINDET ER SICH AUF DEM WEG INS GEFÃNGNIS VON LIBERTY CITY. DOCH IN SEINEM KOPF HÃMMERT EIN GEDANKE... MIT EUCH BIN ICH NOCH NICHT FERTIG! +VON CATALINA, SEINER GELIEBTEN, IM STICH GELASSEN, FÜR SCHULDIG BEFUNDEN UND VERURTEILT, BEFINDET ER SICH AUF DEM WEG INS GEFÄNGNIS VON LIBERTY CITY. DOCH IN SEINEM KOPF HÄMMERT EIN GEDANKE... MIT EUCH BIN ICH NOCH NICHT FERTIG! [END_A] Die Bewohner von Cedar Grove erholen sich langsam @@ -6929,13 +6909,13 @@ die sich gestern hier abgespielt haben. Clive Denver, ein Augenzeuge, beschrieb der Polizei [END_E] -den Tãter, den er zusammen mit einer dunkelhaarigen Frau flüchten sah. +den Täter, den er zusammen mit einer dunkelhaarigen Frau flüchten sah. [END_F] Hör mal, wir werden sehr viel Spaß miteinander haben. Weißt du, [END_G] -ich liebe dich nãmlich. Wirklich, du bist so groß und stark, +ich liebe dich nämlich. Wirklich, du bist so groß und stark, [END_H] und genau so einen Mann brauche ich. @@ -6947,7 +6927,7 @@ Jedenfalls - was wollte ich gerade sagen? Weiß nicht mehr. Aber du verstehst doch, was ich meine, oder? [END_K] -Der Donner von Explosionen erschütterte umliegende Hãuser. Menschen rannten in Deckung. +Der Donner von Explosionen erschütterte umliegende Häuser. Menschen rannten in Deckung. [END_L] Mehrere Anwohner wurden verletzt, als es in dem Chaos zu einem Schusswechsel @@ -6956,7 +6936,7 @@ Mehrere Anwohner wurden verletzt, als es in dem Chaos zu einem Schusswechsel zwischen Bodeneinheiten und einem Helikopter kam, der über dem Damm kreiste. [END_N] -Ja, von hier in den Gãrten konnten wir alles genau beobachten. +Ja, von hier in den Gärten konnten wir alles genau beobachten. [END_O] Wie sie den Helikopter dann abgeschossen haben, @@ -6986,7 +6966,7 @@ Ich hab mir 'nen Fingernagel abgebrochen und meine Frisur ist hin! Fünfzig Dollar im Eimer! [PAPER1] -GANGSTER VON KOMPLIZIN, DIE ER LIEBT, VERRATEN. GERICHT BEFINDET RÃUBER EINSTIMMIG FÜR SCHULDIG. +GANGSTER VON KOMPLIZIN, DIE ER LIEBT, VERRATEN. GERICHT BEFINDET RÄUBER EINSTIMMIG FÜR SCHULDIG. [PAPER2] ZEHN JAHRE AUS LIEBE! @@ -6995,10 +6975,10 @@ ZEHN JAHRE AUS LIEBE! und es hat sich bisher auch keine kriminelle Vereinigung zu dem Attentat bekannt. [JAILB_H] -Die meisten Zeugen kamen ums Leben und die Brücke wurde schwer beschãdigt. +Die meisten Zeugen kamen ums Leben und die Brücke wurde schwer beschädigt. [JAILB_I] -Man geht davon aus, dass auch einige der Hãftlinge bei der sich ereignenden Explosion umkamen. +Man geht davon aus, dass auch einige der Häftlinge bei der sich ereignenden Explosion umkamen. [JAILB_J] * @@ -7025,7 +7005,7 @@ Nach links Nach rechts [FEC_PWF] -Vorwãrts gehen +Vorwärts gehen [FEC_PWT] Auf Kamera zugehen @@ -7046,13 +7026,13 @@ Eine Waffe nach rechts Ziel fixieren [FEC_PJP] -Fußgãnger springen +Fußgänger springen [FEC_PSP] -Fußgãnger sprinten +Fußgänger sprinten [FEC_PSH] -Fußgãnger schießen +Fußgänger schießen [FEC_TLF] Ein Ziel nach links @@ -7064,10 +7044,10 @@ Ein Ziel nach rechts Kamera hinter Spieler zentrieren [FEC_SZI] -Mit Prãzisionsgewehr heranzoomen +Mit Präzisionsgewehr heranzoomen [FEC_SZO] -Mit Prãzisionsgewehr herauszoomen +Mit Präzisionsgewehr herauszoomen [FEC_LKL] First-Person nach links schauen @@ -7172,7 +7152,7 @@ Name: Spiel-Name: [FEM_MAP] -Karte auswãhlen +Karte auswählen [FEN_PLS] Spieler-Einstellungen @@ -7327,9 +7307,6 @@ VERBINDUNG [FET_AUD] AUDIO-SETUP -[FET_GFX] -GRAFIK-SETUP - [FET_DIS] ANZEIGEN-SETUP @@ -7349,7 +7326,7 @@ NEUES SPIEL SPIEL SPEICHERN [FET_MAP] -KARTE AUSWÃHLEN +KARTE AUSWÄHLEN [FET_GT] SPIEL-TYP @@ -7376,7 +7353,7 @@ Achtung! OK [FED_CON] -Löschen bestãtigen +Löschen bestätigen [FES_SSC] Spiel wurde gespeichert. @@ -7397,7 +7374,7 @@ Löschen fehlgeschlagen. Speichern fehlgeschlagen. [FEC_LUN] -Laden fehlgeschlagen. Datei beschãdigt. Bitte löschen. +Laden fehlgeschlagen. Datei beschädigt. Bitte löschen. [FEN_PLA] Anzahl der Spieler: @@ -7490,7 +7467,7 @@ Controller-Typ: ÜBERNEHMEN [FES_CSA] -Wãhlen Sie eine Skin aus der Liste aus: +Wählen Sie eine Skin aus der Liste aus: [FES_SKN] SKIN-NAME @@ -7508,7 +7485,7 @@ SPIELER MP3 Dieses Spiel wirklich speichern? [FES_CGA] -Momentan verfügbare Speicherplãtze: +Momentan verfügbare Speicherplätze: [FES_SCG] Laufendes Spiel speichern? @@ -7520,16 +7497,16 @@ Spiel laden und weiterspielen? Feuern [FEC_NWE] -Nãchste Waffe +Nächste Waffe [FEC_PWE] Vorherige Waffe [FEC_FOR] -Vorwãrts +Vorwärts [FEC_BAC] -Rückwãrts +Rückwärts [FEC_LEF] Links @@ -7553,7 +7530,7 @@ Radio Spezialmission [FEC_CMR] -Blickwinkel ãndern +Blickwinkel ändern [FEC_JMP] Springen @@ -7577,7 +7554,7 @@ Nach links schauen Nach rechts schauen [FEC_NTR] -Nãchstes Ziel +Nächstes Ziel [FEC_PTT] Vorheriges Ziel @@ -7622,7 +7599,7 @@ NICHT BEL. STEUERUNGSART [FET_RDK] -STEUERUNG ÃNDERN +STEUERUNG ÄNDERN [FET_AMS] MAUS-EINSTELLG. @@ -7646,10 +7623,10 @@ Geschütz Links Geschütz Rechts [FEC_TFU] -Geschütz /Dodo aufwãrts +Geschütz /Dodo aufwärts [FEC_TFD] -Geschütz /Dodo abwãrts +Geschütz /Dodo abwärts [FEC_MWF] RAD AUFW. @@ -7781,7 +7758,7 @@ WINKLICK GTA 3 [WIN_95] -GTA 3 lãuft nicht unter Windows 95 +GTA 3 läuft nicht unter Windows 95 [WIN_DX] GTA 3 benötigt mind. DirectX Version 8.1 @@ -7832,7 +7809,7 @@ STANDARD WIEDERHERST. HELLIGKEIT [FED_TRA] -UNSCHÃRFE-FX +UNSCHÄRFE-FX [FEM_LOD] DISTANZ-DARSTELLG. @@ -7949,10 +7926,10 @@ NUM STERN LINKS,RECHTS,MAUSRAD ZUR EINSTLLG. [FET_CIG] -RÜCKT. ZUM LÖSCHEN - LMT,RETURN ZUM ÃNDERN +RÜCKT. ZUM LÖSCHEN - LMT,RETURN ZUM ÄNDERN [FET_RIG] -NEUE STEUERUNG FÜR DIESE AKTION WÃHLEN ODER ESC FÜR ABBRUCH +NEUE STEUERUNG FÜR DIESE AKTION WÄHLEN ODER ESC FÜR ABBRUCH [FET_EIG] KANN DIESER AKTION KEINE STEUERUNG ZUWEISEN @@ -8009,7 +7986,7 @@ Lösche Daten, bitte warten... Lade Daten, bitte warten... [FEC_SLC] -Slot ist beschãdigt +Slot ist beschädigt [FED_LFL] Spiel konnte nicht geladen werden. Das Spiel wird neu gestartet. @@ -8023,6 +8000,194 @@ HARDWARE NICHT VERFÜGBAR - ORIGINAL-EINSTELLG. WIEDERHERGESTELLT [CRED270] MIKE HONG +{ re3 updates } +{ new languages } +[FEL_JAP] +JAPANISCH + +[FEL_POL] +POLNISCH + +[FEL_RUS] +RUSSISCH + +{ new display menus } +[FET_GFX] +GRAFIK-SETUP + +[FED_MIP] +MIP MAPPING + +[FED_AAS] +KANTENGLÄTTUNG + +[FED_FIL] +TEXTURFILTER + +[FED_BIL] +BILINEAR + +[FED_TRL] +TRILINEAR + +[FED_WND] +FENSTERMODUS + +[FED_FLS] +VOLLBILD + +[FEM_CSB] +CUTSCENE BALKEN + +[FEM_SCF] +BILDSCHIRMFORMAT + +[FEM_ISL] +KARTENSPEICHERNUTZUNG + +[FEM_LOW] +NIEDRIG + +[FEM_MED] +MITTEL + +[FEM_HIG] +HOCH + +[FEM_2PR] +PS2 ALPHA TEST + +[FEC_FRC] +FREIE KAMERA + +{ Linux joy detection } +[FEC_JOD] +JOYSTICK ERKENNEN + +[FEC_JPR] +Drücke eine beliebige Taste auf dem Joystick der für das Spiel verwendet werden soll, und er wird ausgewählt. + +[FEC_JDE] +Joystick erkannt + +{ mission restart } +[FET_RMS] +MISSION WIEDERHOLEN + +[FESZ_RM] +WIEDERHOLEN? + +{ more graphics } +[FED_VPL] +FAHRZEUG-PIPELINE + +[FED_PRM] +CHARAKTER KANTEN LICHT + +[FED_RGL] +GLÄNZENDE STRAßEN + +[FED_CLF] +FARBFILTER + +[FED_WLM] +WELT LIGHTMAPS + +[FED_MBL] +BEWEGUNGSUNSCHÄRFE + +[FEM_SIM] +SIMPEL + +[FEM_NRM] +NORMAL + +[FEM_MOB] +MOBILE + +[FED_MFX] +MATFX + +[FED_NEO] +NEO + +[FEM_PS2] +PS2 + +[FEM_XBX] +XBOX + +[FEM_AUT] { aspect ratio related } +AUTO + +{ controls } +[FEC_IVP] +PAD VERTIKAL INVERTIEREN + +{ map } +[FEM_TWP] +Wegpunkt umschalten + +[FEA_FMN] +RADIO AUS + +[FEC_DS2] +DUALSHOCK 2 + +[FEC_DS3] +DUALSHOCK 3 + +[FEC_DS4] +DUALSHOCK 4 + +[FEC_360] +XBOX 360 CONTROLLER + +[FEC_ONE] +XBOX ONE CONTROLLER + +[FEC_NSW] +NINTENDO SWITCH CONTROLLER + +[FEC_TYP] +GAMEPAD-TYP + +[FEC_CCF] +KONFIGURATION + +[FEC_CF1] +KONFIGURATION 1 + +[FEC_CF2] +KONFIGURATION 2 + +[FEC_CF3] +KONFIGURATION 3 + +[FEC_CF4] +KONFIGURATION 4 + +[FEC_CDP] +CONTROLLER-ANZEIGE + +[FEC_ONF] +Zu Fuß + +[FEC_INC] +Im Auto + +[FEC_VIB] +Vibration : + +[FET_AGS] +KONTROLLEREINSTELLUNGEN + +[FEM_PED] +PED DENSITY + +[FEM_CAR] +CAR DENSITY + [DUMMY] THIS LABEL NEEDS TO BE HERE !!! -AS THE LAST LABEL DOES NOT GET COMPILED \ No newline at end of file +AS THE LAST LABEL DOES NOT GET COMPILED diff --git a/utils/gxt/gxt.exe b/utils/gxt/gxt.exe index ff264dad..0f55b760 100644 Binary files a/utils/gxt/gxt.exe and b/utils/gxt/gxt.exe differ diff --git a/utils/gxt/italian.txt b/utils/gxt/italian.txt index 822a30b8..9dfee85c 100644 --- a/utils/gxt/italian.txt +++ b/utils/gxt/italian.txt @@ -1,4 +1,11 @@ -[LETTER1] +{ + New strings are at the bottom of file. + Do not change the order of strings. + You can fix the typos of existing translation but please refrain from + unnecessary edits like rephasing because you think it suits better for your taste. +} + +[LETTER1] abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"$,.'-?!!SDBFàèéìòùÀÈÉÌÒÙ [DEFNAM] @@ -2260,11 +2267,11 @@ Le bombe per le macchine costano 1000$ [GA_5] La tua macchina ha già una bomba installata. -[GA_6] -Parcheggiala, attivala premendo il ~h~tasto ~k~~PED_FIREWEAPON~~w~ e DATTELA A GAMBE! +[GA_6] { re3 change } +Parcheggiala, attivala premendo il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ e DATTELA A GAMBE! -[GA_7] -Arma la bomba con il ~h~tasto ~k~~PED_FIREWEAPON~~w~: esploderà non appena qualcuno cercherà di avviarla. +[GA_7] { re3 change } +Arma la bomba con il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~: esploderà non appena qualcuno cercherà di avviarla. [GA_8] Usa il detonatore per attivare la bomba. @@ -2479,33 +2486,6 @@ Accelera [FEC_SMT] Attivatore missione speciale -[FEC_CCF] -Configurazione: - -[FEC_CF1] -Config1 - -[FEC_CF2] -Config2 - -[FEC_CF3] -Config3 - -[FEC_CF4] -Config4 - -[FEC_CDP] -Schermata controller: - -[FEC_ONF] -A piedi - -[FEC_INC] -In macchina - -[FEC_VIB] -Vibrazione: - [FEA_OUT] Uscita: @@ -3646,11 +3626,11 @@ OK? [JM6_1] Raggiungi la banca sulla strada principale. -[GA_6B] -Parcheggiala, innesca la bomba schiacciando il ~h~tasto ~k~~PED_FIREWEAPON~~w~ e BATTITELA! +[GA_6B] { re3 change } +Parcheggiala, innesca la bomba schiacciando il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ e BATTITELA! -[GA_7B] -Innescala col ~h~tasto ~k~~PED_FIREWEAPON~~w~. La bomba esploderà quando si tenterà di avviare il motore. +[GA_7B] { re3 change } +Innescala col ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~. La bomba esploderà quando si tenterà di avviare il motore. [BAT1] ~g~Prendi la mazza! @@ -4084,11 +4064,11 @@ Porta l'auto dal carrozziere per perdere il ~h~livello di sospetto~w~, ~h~ripara [HM1_1] ~g~Fredda 20 Purple Nine in 2 minuti e 30 secondi. -[KM1_8A] -Premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per ~h~attivare la bomba~w~: ricorda di toglierti di mezzo! +[KM1_8A] { re3 change } +Premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per ~h~attivare la bomba~w~: ricorda di toglierti di mezzo! -[KM1_8D] -Premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per ~h~attivare la bomba~w~: e ricorda di toglierti di mezzo! +[KM1_8D] { re3 change } +Premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per ~h~attivare la bomba~w~: e ricorda di toglierti di mezzo! [KM1_12] ~g~Portalo nel dojo, ma prima sbarazzati degli sbirri! @@ -4225,11 +4205,11 @@ Non mi serve che mi mostri i documenti, hai una faccia fidata. [DETON] DETONAZIONE: -[DRIVE_A] -Seleziona un Uzi quando entri in un veicolo, poi guarda a destra o a sinistra e premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per sparare. +[DRIVE_A] { re3 change } +Seleziona un Uzi quando entri in un veicolo, poi guarda a destra o a sinistra e premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per sparare. -[DRIVE_B] -Seleziona un Uzi quando entri in un veicolo, poi guarda a destra o a sinistra e premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per sparare. +[DRIVE_B] { re3 change } +Seleziona un Uzi quando entri in un veicolo, poi guarda a destra o a sinistra e premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per sparare. [RECORD] ~g~NUOVO RECORD!!! @@ -4237,11 +4217,11 @@ Seleziona un Uzi quando entri in un veicolo, poi guarda a destra o a sinistra e [NRECORD] ~r~NESSUN NUOVO RECORD! -[RCHELP] -Premi il tasto ~k~~PED_FIREWEAPON~ o dirigi l'auto radiocomandata contro i pneumatici di un veicolo per provocarne la detonazione. +[RCHELP] { re3 change } +Premi il tasto ~k~~VEHICLE_FIREWEAPON~ o dirigi l'auto radiocomandata contro i pneumatici di un veicolo per provocarne la detonazione. -[RCHELPA] -Premi il tasto ~k~~PED_FIREWEAPON~ o dirigi l'auto radiocomandata contro i pneumatici di un veicolo per provocarne la detonazione. +[RCHELPA] { re3 change } +Premi il tasto ~k~~VEHICLE_FIREWEAPON~ o dirigi l'auto radiocomandata contro i pneumatici di un veicolo per provocarne la detonazione. [RC_1] Hai 2 minuti per far esplodere quante più auto dei Diablo possibile! @@ -4744,11 +4724,11 @@ LA SCOMPARSA DI LOVE [RM5_6] ~g~Ci è scappato! Spaccagli la corazza con un veicolo o con una bella esplosione! -[PBOAT_1] -Premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per sparare con i cannoni della barca. +[PBOAT_1] { re3 change } +Premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per sparare con i cannoni della barca. -[PBOAT_2] -Premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per sparare con i cannoni della barca. +[PBOAT_2] { re3 change } +Premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per sparare con i cannoni della barca. [DIAB1_B] Sono El Burro dei Diablo. @@ -4762,11 +4742,11 @@ C'e una corsa d'auto con inizio alla vecchia scuola vicino al ponte Callahan. [DIAB1_F] Procurati un mezzo, il primo che attraversa tutti i posti di blocco vince il premio. -[HM2_1] -Usa i maggiolini radiocomandati per distruggere le auto blindate. Premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per farli esplodere. +[HM2_1] { re3 change } +Usa i maggiolini radiocomandati per distruggere le auto blindate. Premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per farli esplodere. -[HM2_1A] -Usa i maggiolini radiocomandati per distruggere le auto blindate. Premi il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per farli esplodere. +[HM2_1A] { re3 change } +Usa i maggiolini radiocomandati per distruggere le auto blindate. Premi il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per farli esplodere. [HM2_2] ~r~Non sei riuscito a distruggere tutte le auto blindate! @@ -6592,11 +6572,11 @@ Questa memory card (PS2) è già formattata. [FEDSAS4] ;=<> - CAMBIA SELEZIONE -[SPRAY_4] -Usa il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per sparare col cannone ad acqua. +[SPRAY_4] { re3 change } +Usa il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per sparare col cannone ad acqua. -[SPRAY_1] -Usa il ~h~tasto ~k~~PED_FIREWEAPON~~w~ per sparare col cannone ad acqua. +[SPRAY_1] { re3 change } +Usa il ~h~tasto ~k~~VEHICLE_FIREWEAPON~~w~ per sparare col cannone ad acqua. [LITTLE] LITTLE T @@ -7333,9 +7313,6 @@ CONNESSIONE [FET_AUD] IMPOSTAZIONI AUDIO -[FET_GFX] -IMPOSTAZIONI GRAFICA - [FET_DIS] IMPOSTAZIONI VIDEO @@ -8035,6 +8012,194 @@ RIPRISTINATE IMPOSTAZIONI ORIGINALI [FET_RSC] HARDWARE NON DISPONIBILE - RIPRISTINATE IMPOSTAZIONI ORIGINALI +{ re3 updates } +{ new languages } +[FEL_JAP] +GIAPPONESE + +[FEL_POL] +POLACCO + +[FEL_RUS] +RUSSO + +{ new display menus } +[FET_GFX] +IMPOSTAZIONI GRAFICA + +[FED_MIP] +MIP MAPPING + +[FED_AAS] +ANTI ALIASING + +[FED_FIL] +TEXTURE FILTERING + +[FED_BIL] +BILINEAR + +[FED_TRL] +TRILINEAR + +[FED_WND] +WINDOWED + +[FED_FLS] +FULLSCREEN + +[FEM_CSB] +CUTSCENE BORDERS + +[FEM_SCF] +SCREEN FORMAT + +[FEM_ISL] +MAP MEMORY USAGE + +[FEM_LOW] +LOW + +[FEM_MED] +MEDIUM + +[FEM_HIG] +HIGH + +[FEM_2PR] +PS2 ALPHA TEST + +[FEC_FRC] +FREE CAM + +{ Linux joy detection } +[FEC_JOD] +DETECT JOYSTICK + +[FEC_JPR] +Press any key on the joystick of your choice that you want to use on the game, and it will be selected. + +[FEC_JDE] +Detected joystick + +{ mission restart } +[FET_RMS] +RIGIOCA MISSIONE + +[FESZ_RM] +RIGIOCA? + +{ more graphics } +[FED_VPL] +VEHICLE PIPELINE + +[FED_PRM] +PED RIM LIGHT + +[FED_RGL] +ROAD GLOSS + +[FED_CLF] +COLOUR FILTER + +[FED_WLM] +WORLD LIGHTMAPS + +[FED_MBL] +MOTION BLUR + +[FEM_SIM] +SIMPLE + +[FEM_NRM] +NORMAL + +[FEM_MOB] +MOBILE + +[FED_MFX] +MATFX + +[FED_NEO] +NEO + +[FEM_PS2] +PS2 + +[FEM_XBX] +XBOX + +[FEM_AUT] { aspect ratio related } +AUTO + +{ controls } +[FEC_IVP] +INVERT PAD VERTICALLY + +{ map } +[FEM_TWP] +Toggle Waypoint + +[FEA_FMN] +RADIO SPENTA + +[FEC_DS2] +DUALSHOCK 2 + +[FEC_DS3] +DUALSHOCK 3 + +[FEC_DS4] +DUALSHOCK 4 + +[FEC_360] +XBOX 360 CONTROLLER + +[FEC_ONE] +XBOX ONE CONTROLLER + +[FEC_NSW] +NINTENDO SWITCH CONTROLLER + +[FEC_TYP] +GAMEPAD TYPE + +[FEC_CCF] +CONFIGURAZIONE + +[FEC_CF1] +CONFIGURAZIONE 1 + +[FEC_CF2] +CONFIGURAZIONE 2 + +[FEC_CF3] +CONFIGURAZIONE 3 + +[FEC_CF4] +CONFIGURAZIONE 4 + +[FEC_CDP] +SCHERMATA CONTROLLER + +[FEC_ONF] +A PIEDI + +[FEC_INC] +IN MACCHINA + +[FEC_VIB] +VIBRAZIONE + +[FET_AGS] +GAMEPAD SETTINGS + +[FEM_PED] +PED DENSITY + +[FEM_CAR] +CAR DENSITY + [DUMMY] THIS LABEL NEEDS TO BE HERE !!! AS THE LAST LABEL DOES NOT GET COMPILED \ No newline at end of file diff --git a/utils/gxt/polish.txt b/utils/gxt/polish.txt new file mode 100755 index 00000000..98d373ef --- /dev/null +++ b/utils/gxt/polish.txt @@ -0,0 +1,8117 @@ +{ + New strings are at the bottom of file. + Do not change the order of strings. + You can fix the typos of existing translation but please refrain from + unnecessary edits like rephasing because you think it suits better for your taste. +} + +[LETTER1] +abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789'$,.'-?!!SDBF + +[DEFNAM] +Claude---------------------- + +[IN_VEH] +~g~Hej! Wracaj do samochodu! + +[IN_VEH2] +~g~Do tej roboty jest ci potrzebna jakaś gablota! + +[IN_BOAT] +~g~Do tej roboty jest ci potrzebna łódź! + +[HEY] +~g~Nie idź sam, trzymaj się całej paczki! + +[HEY2] +~g~Nie rozdzielajcie się, niech cała grupa porusza się razem! + +[HEY3] +~g~Straciłeś z oczu swojego podopiecznego - wracaj i odszukaj 8-Balla! + +[HEY4] +~g~Jeżeli stracisz Misty, to Luigi zadba, abyś stracił życie! Wracaj po nią! + +[HEY5] +~g~One of the girls is AWOL, Go back and round her up! + +[HEY6] +~g~Twój honor jest związany z osobą Kanbu z Yakuzy. Musisz go chronić! + +[HEY7] +~g~Przydałaby się dodatkowa spluwa. Wracaj i zabierz ze sobą swój kontakt! + +[HEY8] +~g~Ochrona oznacza właśnie to, co podejrzewasz - ochraniaj starego dżentelmena z dalekiego wschodu! + +[HEY9] +~g~Chcesz posłuchać, co się dzieje w mieście? Odszukaj swój kontakt! + +[HELP2_A] +Jeżeli w trakcie biegu chcesz ~h~przyspieszyć~h~, naciśnij klawisz ~h~/~w~. + +[HELP3] +Sprintem można pokonywać wyłącznie krótkie odcinki, dopóki postać ma zapas sił. + +[HELP4_A] +Aby ~h~przyspieszyć~w~, naciśnij klawisz ~h~ ~k~~VEHICLE_ACCELERATE~~w~. + +[HELP4_D] +Aby ~h~przyspieszyć~w~, popchnij ~h~prawy drążek analogowy~w~ do góry. + +[HELP5_A] +Naciśnij klawisz ~h~ ~k~~VEHICLE_BRAKE~~w~, aby ~h~zahamować~w~ lub włączyć ~h~wsteczny bieg~w~, jeżeli pojazd już stoi. + +[HELP5_D] +Pociągnij ~h~prawy drążek analogowy~w~ do tyłu, aby ~h~zahamować~w~ lub włączyć ~h~wsteczny bieg~w~, jeżeli pojazd już stoi. + +[HELP6_A] +Aby skorzystać z ~h~hamulca ręcznego~w~, naciśnij klawisz ~h~ ~k~~VEHICLE_HANDBRAKE~~w~. + +[HELP6_C] +Aby skorzystać z ~h~hamulca ręcznego~w~, naciśnij klawisz ~h~ ~k~~VEHICLE_HANDBRAKE~~w~. + +[HELP6_D] +Aby skorzystać z ~h~hamulca ręcznego~w~, naciśnij klawisz ~h~ ~k~~VEHICLE_HANDBRAKE~~w~. + +[HELP7_A] +Aby ~h~wycelować~w~ karabin snajperski, naciśnij i przytrzymaj klawisz~h~ ~k~~PED_LOCK_TARGET~~w~. + +[HELP7_D] +Aby ~h~wycelować~w~ karabin snajperski, naciśnij i przytrzymaj klawisz~h~ ~k~~PED_LOCK_TARGET~~w~. + +[HELP8_A] +Naciśnij klawisz~h~ ~k~~PED_SNIPER_ZOOM_IN~~w~, aby ~h~przybliżyć ~w~widok przez lunetkę karabinu oraz klawisz~h~ ~k~~PED_SNIPER_ZOOM_OUT~~w~, aby ~h~oddalić~w~ widok. + +[HELP9_A] +Naciśnij klawisz~h~ ~k~~PED_FIREWEAPON~~w~, aby oddać ~h~strzał~w~ z karabinu snajperskiego. + +[HELP10] +Gwiazda szeryfa oznacza, że jesteś poszukiwany przez policję. + +[HELP11] +Im więcej gwiazdek, tym wyższy jest poziom twojej złej sławy. + +[HELP13] +Niekiedy trzeba będzie skorzystać z tras, które nie są zaznaczone na radarze. + +[TIMER] +Jest to misja na czas - musisz ją wykonać, zanim licznik czasu osiągnie zero. + +[MISTY1] +~r~Misty nadaje się już tylko na łóżko w kostnicy! + +[OUT_VEH] +~g~Wysiądź z samochodu! + +[GARAGE] +Wprowadź samochód do garażu, a potem wyjdź na zewnątrz. + +[WANTED1] +~g~Zgub gliniarzy i obniż swój poziom złej sławy! + +[NODOORS] +~g~To nie są sardynki! Załatw furę, która pomieści więcej osób. + +[TRASH] +~g~Doprowadziłeś gablotę do ruiny! Połataj ją trochę! + +[WRECKED] +~r~Samochód jest zniszczony! + +[HORN] +~g~Naciśnij klakson. + +[NOMONEY] +~g~Masz za mało forsy! + +[OUTTIME] +~r~Za wolno, koleś, za wolno! + +[SPOTTED] +~r~Gonią cię! + +[REWARD] +NAGRODA $~1~ + +[GAMEOVR] +KONIEC GRY + +[Z] +Wartość osi Z: ~1~ + +[M_FAIL] +MISJA NIEUDANA! + +[M_PASS] +MISJA ZALICZONA! $~1~ + +[O_PASS] +ROBOTA ZAKOŃCZONA + +[O_FAIL] +ROBOTA NIEUDANA + +[DEAD] +KONIEC Z TOBĄ! + +[BUSTED] +WPADKA! + +[S_PROMP] +Kiedy nie jesteś w trakcie misji, możesz w tym miejscu ~h~zapisać stan gry~w~. Wiąże się to z upływem sześciu godzin w grze. + +[NUMBER] +~1~ + +[SCORE] +$~1~ + +[LOADCAR] +ŁADOWANIE POJAZDU (NACIŚNIJ L1, ABY ANULOWAĆ) + +[CARSOFF] +Wyłączone samochody: + +[CARS_ON] +Uruchomione samochody: + +[TEXTXYZ] +Zapisywanie współrzędnych w pliku... + +[CHEATON] +Tryb ułatwień WŁĄCZONY + +[CHEATOF] +Tryb ułatwień WYŁĄCZONY + +[UZI_IN] +Amu-Nacja zaczyna sprzedawać uzi! + +[IMPORT1] +Wyjdź na zewnątrz i poczekaj na swój samochód. + +[PAGEB1] +Pistolet dostarczony do kryjówki + +[PAGEB2] +Uzi dostarczone do kryjówki + +[PAGEB3] +Pancerz dostarczony do kryjówki + +[PAGEB4] +Obrzyn dostarczony do kryjówki + +[PAGEB5] +Granaty dostarczone do kryjówki + +[PAGEB6] +Koktajle Mołotowa dostarczone do kryjówki + +[PAGEB7] +AK 47 dostarczony do kryjówki + +[PAGEB8] +Karabin snajperski dostarczony do kryjówki + +[PAGEB9] +M16 dostarczony do kryjówki + +[PAGEB10] +Wyrzutnia rakiet dostarczona do kryjówki + +[PAGEB11] +Miotacz ognia dostarczony do kryjówki + +[WANT_A] +Aresztowanie grozi ci dopiero wtedy, kiedy posiadasz ~h~złą sławę. + +[WANT_B] +Twój ~h~poziom złej sławy~w~ przedstawia rząd gwiazdek znajdujących się w prawym górnym rogu ekranu. + +[WANT_C] +W tym momencie twój ~h~poziom złej sławy~w~ wynosi jeden... + +[WANT_D] +dwa... + +[WANT_E] +trzy... + +[WANT_F] +W miarę wzrostu ~h~złej sławy~w~ ścigać cię będą coraz potężniejsze siły policyjne. + +[WANT_G] +Kiedy zaliczysz ~h~'wpadkę'~w~, zostajesz odwieziony na najbliższy posterunek policji. + +[WANT_H] +Gliniarze zarekwirują ci całą broń i będziesz musiał wypłacić im małą łapówkę. + +[WANT_I] +Misja, którą właśnie wykonywałeś, zostanie uznana za nieudaną. + +[WANT_J] +W miarę rozwoju gry odkryjesz sposoby zmniejszania swojego poziomu złej sławy. + +[WANT_K] +Jeżeli jesdziesz samochodem, ~h~WARSZTATY LAKIERNICZE~w~ umożliwiają ~h~usunięcie złej sławy. + +[HEAL_B] +Kiedy zostajesz ~h~'załatwiony'~w~, trafiasz do najbliższego szpitala. + +[HEAL_C] +Tracisz całą broń oraz musisz zapłacić lekarzom trochę forsy za ich wysiłki. + +[HEAL_E] +W trakcie gry poznasz rozmaite metody leczenia bądź chronienia głównego bohatera. + +[DAM] +USZKODZENIA: + +[KILLS] +OFIARY: + +[FARES] +PRZEJAZDY: + +[BULL] +SZTABKI: + +[EVID] +DOWODY: + +[HEALTH] +STAN POJAZDU: + +[COLLECT] +ZEBRANO: + +[BOMB] +Wprowadź samochód do garażu, aby przymocować do niego ~h~bombę~w~. Cena - ~h~$1000. + +[SAVE1] +Aby ~h~zapisać stan gry~w~, przejdź przez drzwi. Jeżeli jesteś w trakcie misji, nie można zapisać gry. + +[SAVE2] +Samochody pozostawione w tym garażu zostaną zachowane wraz z zapisem stanu gry. + +[AMMU] +Wejdź do Amu-nacji, aby zakupić broń. + +[BRIDGE1] +Kiedy naprawa Mostu Callahan zostanie ukończona, będziesz mógł przejechać nim na Wyspę Staunton. + +[TUNNEL] +Kiedy Tunel Porter zostanie otwarty, będziesz mógł przejechać na Wyspę Staunton. + +[LUIGI] +MISJE LUIGIEGO + +[TONI] +MISJE TONIEGO + +[JOEY] +MISJE JOEYA + +[FRANK] +MISJE SALVATORE + +[DIABLO] +MISJE DIABLO + +[ASUKA] +MISJE ASUKI + +[B_SITE] +MISJE PODMIEJSKIE ASUKI + +[KENJI] +MISJE KENJIEGO + +[RAY] +MISJE RAYA + +[LOVE] +MISJE LOVE'A + +[YARDIE] +MISJE DLA GANGU YARDIE + +[HOOD] +MISJE DLA GANGU HOOD + +[CITYZON] +Liberty City + +[IND_ZON] +Portland + +[PORT_W] +Callahan Point + +[PORT_S] +Atlantic Quays + +[PORT_E] +Portland Harbor + +[PORT_I] +Trenton + +[S_VIEW] +Portland View + +[CHINA] +Chinatown + +[EASTBAY] +Plaza Portland + +[LITTLEI] +Saint Mark's + +[REDLIGH] +Dz. Czerwonych Świateł + +[TOWERS] +Wzgórza Hepburn + +[HARWOOD] +Harwood + +[ROADBR1] +Most Callahan + +[ROADBR2] +Most Callahan + +[TUNNELP] +Tunel Porter + +[BOMB1] +Warsztat 8-Balla. + +[COM_ZON] +Wyspa Staunton + +[STADIUM] +Aspatria + +[HOSPI_2] +Rockford + +[UNIVERS] +Kampus Liberty + +[CONSTRU] +Fort Staunton + +[PARK] +Park Belleville + +[COM_EAS] +Newport + +[SHOPING] +Bedford Point + +[YAKUSA] +Torrington + +[SUB_ZON] +Shoreside Vale + +[AIRPORT] +Port Lotniczy Francis + +[PROJECT] +Wichita Gardens + +[SUB_IND] +Pike Creek + +[SWANKS] +Cedar Grove + +[BIG_DAM] +Tama Cochrane + +[SUB_ZO2] +Shoreside Vale + +[SUB_ZO3] +Shoreside Vale + +[CAR_1] +Karetka + +[CAR_2] +Straż pożarna + +[CAR_3] +Radiowóz + +[CAR_4] +Enforcer + +[CAR_5] +Barracks + +[CAR_6] +Hipcio + +[CAR_7] +Samochód FBI + +[CAR_8] +Konwojowóz + +[CAR_9] +Moonbeam + +[CAR_10] +Autokar + +[CAR_11] +Flatbed + +[CAR_12] +Linerunner + +[CAR_13] +Śmieciożer + +[CAR_14] +Patriot + +[CAR_15] +Pan Smakołyk + +[CAR_16] +Muł + +[CAR_17] +Yankee + +[CAR_18] +Pony + +[CAR_19] +Bobcat + +[CAR_20] +Rumpo + +[CAR_21] +Blista + +[CAR_22] +Dodo + +[CAR_23] +Autobus + +[CAR_24] +Sentinel + +[CAR_25] +Cheetah + +[CAR_26] +Demon + +[CAR_27] +Stinger + +[CAR_28] +Infernus + +[CAR_29] +Esperanto + +[CAR_30] +Kuruma + +[CAR_31] +Stretch + +[CAR_32] +Perennial + +[CAR_33] +Landstalker + +[CAR_34] +Manana + +[CAR_35] +Idaho + +[CAR_36] +Ogier + +[CAR_37] +Taksówka + +[CAR_38] +Taksówka + +[CAR_39] +Buggy + +[LUIGIS] +Lokal Luigiego + +[GOAWAY] +~g~Już podjąłeś się jednej misji! + +[LUIGGO] +~g~Luigi sprawdza nowe dziewczyny. Przyjdź później! + +[JOEYGO] +~g~Joey wyszedł do miasta z Misty. Przyjdź później. + +[TONIGO] +~g~Toni zabrał swoją Mamuśkę do opery - wpadnij kiedy indziej! + +[KEMUGO] +~g~Maria i Kemuri mają chwilowo inne obowiązki - wpadnij później! + +[KENJGO] +~g~Kenji jest na naradzie Yakuzy. Wpadnij innym razem! + +[RAYGO] +~g~Ray kręci się przy innych kiblach - wpadnij później! + +[LOVEGO] +~g~Donald Love chwilowo zajmuje się innymi sprawami. Umów się z nim na późniejszą godzinę! + +[KENSGO] +~g~Kenji jest zajęty! Wpadnij później! + +[HOODGO] +~g~Hoods są aktualnie niedostępni! + +[WRONGT1] +~g~Jeżeli szukasz zajęcia, wróć między 5:00 a 21:00. + +[WRONGT2] +~g~Jeżeli szukasz zajęcia, wróć między 6:00 a 14:00. + +[WRONGT3] +~g~Jeżeli szukasz zajęcia, wróć między 15:00 a 00:00. + +[GUN_1A] +Użyj klawiszy ~h~~k~~PED_CYCLE_WEAPON_RIGHT~~w~ oraz ~h~~k~~PED_CYCLE_WEAPON_LEFT~ ~w~, aby przełączać się między kolejnymi rodzajami broni. + +[GUN_2A] +Przytrzymaj klawisz ~h~~k~~PED_LOCK_TARGET~ ~w~, aby ~h~wykonać autocelowanie~w~ i naciśnij klawisz ~h~ ~k~~PED_FIREWEAPON~ ~w~, aby ~h~otworzyć ogień! Spróbuj postrzelać do celu... + +[GUN_2C] +Przytrzymaj klawisz ~h~~k~~PED_LOCK_TARGET~ ~w~, aby ~h~wykonać autocelowanie~w~ i naciśnij klawisz ~h~ ~k~~PED_FIREWEAPON~ ~w~, aby ~h~otworzyć ogień! Spróbuj postrzelać do celu... + +[GUN_2D] +Przytrzymaj klawisz ~h~~k~~PED_LOCK_TARGET~ ~w~, aby ~h~wykonać autocelowanie~w~ i naciśnij klawisz ~h~ ~k~~PED_FIREWEAPON~ ~w~, aby ~h~otworzyć ogień! Spróbuj postrzelać do celu... + +[GUN_3A] +Trzymając wciśnięty klawisz ~h~~k~~PED_LOCK_TARGET~,~w~ naciśnij klawisz ~h~~k~~PED_CYCLE_TARGET_LEFT~~w~ lub klawisz ~h~~k~~PED_CYCLE_TARGET_RIGHT~ , aby przełączać się między celami. + +[GUN_3B] +Trzymając wciśnięty klawisz ~h~~k~~PED_LOCK_TARGET~,~w~ naciśnij klawisz ~h~~k~~PED_CYCLE_TARGET_LEFT~~w~ lub klawisz ~h~~k~~PED_CYCLE_TARGET_RIGHT~ , aby przełączać się między celami. + +[GUN_4A] +Trzymając wciśnięty klawisz ~h~~k~~PED_LOCK_TARGET~~w~, możesz chodzić lub biegać, a celownik cały czas pozostanie zablokowany na wybranym celu. + +[GUN_4B] +Trzymając wciśnięty klawisz ~h~~k~~PED_LOCK_TARGET~~w~, możesz chodzić lub biegać, a celownik cały czas pozostanie zablokowany na wybranym celu. + +[GUN_5] +Możesz przećwiczyć wybieranie celów i prowadzenie ognia na tych papierowych celach. Po treningu wróć do wykonywania misji. + +[TAXI1] +~g~Poszukaj pasażera. + +[FARE1] +~g~Cel podróży ~w~'Klub Seksownego Kociaka Miauu'~g~ w Dzielnicy Czerwonych Świateł. + +[FARE2] +~g~Cel podróży ~w~Super Przecena~g~ w Portland View. + +[FARE3] +~g~Cel podróży ~w~'stara szkoła'~g~ w Chinatown. + +[FARE4] +~g~Cel podróży ~w~'kawiarenka Tłustego Joe'~g~ w Callahan Point. + +[FARE5] +~g~Cel podróży ~w~'Amu-Nacja'~g~ w Dzielnicy Czerwonych Świateł. + +[FARE6] +~g~Cel podróży ~w~'Auta na Kredyt'~g~ w Saint Mark's. + +[FARE7] +~g~Cel podróży ~w~'bar topless 'U Woody'ego''~g~ w Dzielnicy Czerwonych Świateł. + +[FARE8] +~g~Cel podróży ~w~'Bistro Marcos'~g~ w Saint Mark's. + +[FARE9] +~g~Cel podróży ~w~'warsztat importowo-eksportowy'~g~ w Portland Harbor. + +[FARE10] +~g~Cel podróży ~w~'Smażony Makaron'~g~ w Chinatown. + +[FARE12] +~g~Cel podróży ~w~'stadion piłkarski'~g~ w Aspatrii. + +[FARE13] +~g~Cel podróży ~w~'kościół'~g~ w Bedford Point. + +[FARE14] +~g~Cel podróży ~w~'kasyno'~g~ w Torrington. + +[FARE15] +~g~Cel podróży ~w~biblioteka Liberty~g~ w Kampusie Liberty. + +[FARE16] +~g~Cel podróży ~w~galeria handlowa~g~ w okolicach Belville Park. + +[FARE17] +~g~Cel podróży ~w~muzeum~g~ w Newport. + +[FARE18] +~g~Cel podróży ~w~siedziba AmCo~g~ w Torrington. + +[FARE19] +~g~Cel podróży ~w~Bolt Burgers~g~ w Bedford Point. + +[FARE20] +~g~Cel podróży ~w~park~g~ w Belville. + +[FARE21] +~g~Cel podróży ~w~Port Lotniczy im. Francisa. + +[FARE22] +~g~Cel podróży ~w~'Tama Cochrane'. + +[FARE24] +~g~Cel podróży ~w~'szpital' ~g~w Pike Creek. + +[FARE25] +~g~Cel podróży ~w~'park'~g~ w Soherside Vale. + +[FARE26] +~g~Cel podróży ~w~'North West Towers'~g~ w Wichita Gardens. + +[NEW_TAX] +WIĘKSZE! SZYBSZE! MOCNIEJSZE! Nowe taksówki Borgnine rozpoczynają pracę w Harwood. Dzwoń już dziś: 555-BORGNINE. + +[TSCORE2] +$~1~ + +[IN_ROW] +~1~Premia za SEKWENCJĘ! $~1~ + +[TTUTOR] +Naciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~~w~, aby włączyć lub wyłączyć misje w taksówce. + +[TTUTOR2] +Naciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~~w~, aby włączyć lub wyłączyć misje taksówkarskie. + +[A_TIME] ++~1~ sekund + +[A_FULL] +~r~Karetka jest pełna! + +[A_RANGE] +~g~Radiostacja w karetce ma zbyt mały zasięg, zbliż się bardziej w stronę szpitala! + +[FTUTOR] +Naciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~~w~, aby włączyć lub wyłączyc misje strażackie. + +[FTUTOR2] +Naciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~~w~, aby włączyć lub wyłączyc misje strażackie. + +[F_PASS1] +Pożar ugaszony! + +[F_RANGE] +~g~Radiostacja w samochodzie strażackim ma zbyt mały zasięg - zbliż się bardziej w stronę remizy! + +[C_BREIF] +~g~Podejrzany ostatnio widziany był w rejonie ~a~. + +[C_RANGE] +~g~Radiostacja w samochodzie ma zbyt mały zasięg, zbliż się bardziej w stronę komisariatu! + +[DODO_FT] +Leciałeś przez ~1~ sekund! + +[EBAL_A] +Znam takie miejsce na skraju Dzielnicy Czerwonych Świateł, w którym możemy się zamelinować na jakiś czas, + +[EBAL_A1] +ale moje ręce są do niczego, więc lepiej ty prowadź, brachu. + +[EBAL_1] +Naciśnij klawisz ~h~ ~k~~VEHICLE_ENTER_EXIT~~w~, aby ~h~wsiąść ~w~lub ~h~wysiąść~w~ z pojazdu. + +[EBAL_1B] +Naciśnij klawisz ~h~ ~k~~VEHICLE_ENTER_EXIT~~w~, aby ~h~wsiąść ~w~lub ~h~wysiąść~w~ z pojazdu. + +[EBAL_2] +~g~Wracaj do samochodu! + +[EBAL_3] +To jest ~h~radar~w~. Korzystaj z niego podczas poruszania się po mieście. Jedź za ~h~kropką~w~ na ~h~radarze~w~, aby dotrzeć do kryjówki! + +[EBAL_D] +Jest tu taki jeden gość, który zna kogo trzeba. Nazywa się Luigi. + +[EBAL_D1] +Niejedno razem przeszliśmy. Dla ciebie też pewnie znajdzie się jakaś robota. Zajrzyjmy do niego! + +[EBAL_E] +Wpadniemy tam, a ja przedstawię cię komu trzeba. + +[EBAL_I] +Szef zaraz wyjdzie do ciebie... + +[EBAL_J] +8-Ball ma jakiś interes na górze. + +[EBAL_K] +Może zrobisz coś dla mnie? + +[EBAL_L] +Trzeba podwieźć jedną z moich dziewczynek. Załatw gablotę i odbierz Misty z kliniki. Przywieź ją tutaj. + +[EBAL_N] +I lepiej cały czas gap się tylko na drogę! + +[EBAL_4] +~r~8-Ball nie żyje~! + +[EBAL_5] +~g~Załatw samochód! + +[EBAL_6] +~g~Zabierz Misty! + +[LM1] +'DZIEWCZYNKI LUIGIEGO' + +[LM2] +'MOJE DZIWKI NIE ĆPAJĄ!' + +[LM3] +'WOŻĄC PANNĘ MISTY' + +[LM5] +'ACH, CÓŻ TO BYŁ ZA BAL...' + +[LM1_2] +~g~Zabierz Misty do klubu 'U Luigiego'. + +[LM1_3] +~g~Naciśnij klakson, aby zaprosić dziewczynę do samochodu. + +[LM1_6] +~g~Wracaj do samochodu! + +[LM1_7] +Zatrzymaj samochód obok Misty i poczekaj, aż wsiądzie. + +[LM1_8] +Możesz wrócić do Luigiego i zapytać go o pracę albo pozwiedzać Liberty City. + +[LM2_A] +Na ulicy pojawił się nowy towar, HEROINA. + +[LM2_E] +Jakiś mądrala wciska ten syf moim dziewczynkom na Portland Harbor. + +[LM2_B] +Jedź tam i zapoznaj jego twarz z bejsbolem! + +[LM2_G] +Należy mi się jakaś rekompensata za tę zniewagę! + +[LM2_1] +~g~Weź jego samochód i przemaluj go. + +[LM2_2A] +Użyj klawisza ~h~ ~k~~PED_FIREWEAPON~~w~, aby zadawać ciosy ~h~pięścią ~w~i ~h~nogą~w~ lub ~h~uderzyć kijem ~w~! + +[LM2_2C] +Użyj klawisza ~h~ ~k~~PED_FIREWEAPON~~w~, aby zadawać ciosy ~h~pięścią ~w~i ~h~nogą~w~ lub ~h~uderzyć kijem ~w~! + +[LM2_2D] +Użyj klawisza ~h~ ~k~~PED_FIREWEAPON~~w~, aby zadawać ciosy ~h~pięścią ~w~i ~h~nogą~w~ lub ~h~uderzyć kijem ~w~! + +[LM2_3] +~g~Schowaj samochód w kryjówce Luigiego! + +[LM2_4] +~g~Przemaluj samochód! + +[LM3_A] +Ej, muszę z tobą pogadać... Spoko, Mick, dokończymy później. + +[LM3_B] +Jak leci, młody? + +[LM3_C] +Syn Dona, Joey, chce się zabawić ze swoją ulubioną dziewczynką, Misty. + +[LM3_D] +Jedź po nią na Wzgórza Hepburn... + +[LM3_E] +ale uważaj, to terytorium gangu Diablo. + +[LM3_F] +Potem odwieź ją do warsztatu Joeya w Trenton, byle szybko. + +[LM3_H] +więc gap się na drogę, a nie na cycki Misty! + +[LM3_2] +~g~Zabierz Misty do Joeya. + +[LM3_4] +~g~Jedź po Misty! + +[LM3_5] +To ty pracujesz teraz jako szoferak dla Luigiego, co? Najwyższy czas, od dawna potrzebujemy zaufanego kierowcy! + +[LM3_7] +Zajmę się tobą za chwilkę, iskierko. + +[LM3_10] +~g~Zdobądź samochód! + +[LM4_B] +Jedź tam i załatw dla mnie ten problem. + +[LM4_C] +Jeżeli potrzebujesz spluwy, wpadnij na zaplecze sklepu Amu-Nacja, naprzeciwko stacji metra. + +[LM5_A] +Przy Moście Callahan, w budynku starej szkoły trwa Bal Policjanta. + +[LM5_B] +Skoro budynek jest stary, to i goście zapewne będą szukać rozrywek 'w starym stylu'. + +[LM5_C] +Moje dziewczyny pracują na ulicach w całym mieście. + +[LM5_D] +Zawieź je na bal, aby mogły solidnie popracować. + +[LM5_1] +~g~Jeżeli zabierzesz za dużo dziewczyn, to się poobijają w środku!~g~ Najpierw wysadź te, które już masz, potem wróć po następne. + +[LM5_2] +~r~Jedna z dziewczyn Luigiego jest już tylko kupą padliny! + +[LM5_3] +~g~Jest ci potrzebny samochód! + +[LM5_4] +~g~Zgarnij dziewczyny pracujące w St. Mark's. + +[LM5_5] +~g~Zawieź dziewczyny na Bal Policjanta! + +[LM5_8] +~g~Dziewczyny na balu: ~1~ + +[JM2] +'ŻEGNAJ 'OKRĄGŁY' LEE CHONG' + +[JM4] +'SZOFER CIPRIANIEGO' + +[JM5] +'TRUP W BAGAŻNIKU' + +[JM1_1] +~g~Zabierz samochód Forelliego do warsztatu 8-Balla na północ stąd, zaraz za salonem 'Auta na Kredyt'. + +[JM1_2] +~g~Potem zaparkuj wózek z powrotem na właściwym miejscu pod Bistro Marcos. + +[JM1_3] +~g~Uaktywnij bombę i spadaj stamtąd! + +[JM1_4] +~g~Niszczysz samochód! Napraw go! + +[JM1_5] +~g~Bomba w samochodzie nie została uzbrojona! + +[JM1_6] +~g~Zaparkuj samochód we właściwej pozycji. + +[JM1_8A] +~y~Hej, przecież to mój kumpel! + +[JM1_8B] +~y~Warsztat jest zautomatyzowany. Po prostu wjedź do środka, zatrzymaj samochód, a obsługa załatwi całą resztę. + +[JM1_8C] +~y~Pierwszy raz montujemy ładunek za darmo, ale za każdym następnym razem będziesz musiał zapłacić. + +[JM2_A] +'Okrągły' Lee Chong handluje prochami dla jakiegoś nowego gangu z Kolumbii... Czy z Kolorado... Nieważne... + +[JM2_B] +Nie pamiętam. Zresztą, kogo to obchodzi. + +[JM2_D] +Ten szczurek właśnie sprzedaje ostatnie sajgonki, rozumiesz? + +[JM2_E] +Masz go zdmuchnąć! + +[JM2_G] +Załatw sobie dziewiątkę. Znajdziesz ten sklep, nie? + +[JM2_H] +Tylko pamiętaj, w Chinatown lepiej dobrze pilnować własnego dupska. To terytorium Triady. + +[JM3_A] +W porządku, mam zamiar skubnąć ciężarówkę z wypłatami. + +[JM3_B] +Codziennie wyjeżdża na miasto z okolic Chinatown. + +[JM3_C] +Zwykłe kule nawet nie zarysują jej pancerza, więc musisz po prostu zdobyć ciężki samochód i zepchnąć ją z drogi. + +[JM3_D] +Jak mocno walniesz, to ci tchórze z ochrony zwieją, gdzie pieprz rośnie. + +[JM3_E] +Wtedy zabierz ciężarówkę do magazynu w dokach - moi ludzie już się nią tam zajmą. + +[JM3_F] +Ciężarówka nie będzie na ciebie czekać, dlatego lepiej się streszczaj. + +[JM3_1] +~g~Zabierz ciężarówkę do kryjówki. + +[JM3_2] +~g~Taranuj ciężarówkę dopóki poziom jej uszkodzeń nie przekroczy 70 procent. + +[JM4_B] +O, to jest ten gość, o którym ci mówiłem! + +[JM4_C] +Posłuchaj, on nie jest Włochem i żaden z niego mechanik, ale potrafi radzić sobie z problemami. + +[JM4_D] +To jest Pops Capo, a to Tony Cipriani. + +[JM4_E] +Tak, Tony Cipriani to ja. + +[JM4_F] +Podrzuć go do restauracji Mamuśki w St. Marks. + +[JM4_G] +Jeszcze jedno. Posłuchaj, planuję taką robótkę, do której potrzebny jest dobry kierowca. Wpadnij później, to pogadamy, OK? + +[JM4_2] +Zaczekaj tutaj. Nie gaś silnika - to nie jest wizyta towarzyska. + +[JM4_3] +To pułapka Triad! Zabierz nas stąd, młody! + +[JM4_4] +Triady myślą, że mogą ze mną zadzierać... ZE MNĄ! + +[JM4_6] +Ostrożnie z tym wozem! Mówiłem, bez numerów! + +[JM4_7] +~g~Zabierz Toniego do restauracji jego matki. + +[JM4_8] +~r~Toni został załatwiony! + +[JM5_A] +Pięknie! Po prostu pięknie. + +[JM5_B] +Oto i facet, którego mi potrzeba! + +[JM5_D] +Jeden z braci Forelli myślał, że jest bystrzejszy niż woda w kiblu, a więc doczekał się odpowiedniej kary. + +[JM5_E] +Zabierz samochód z ciałem do zgniatarki w Harwood, OK? + +[JM5_1] +~g~Zabierz samochód do zgniatarki! + +[JM5_2] +~g~To bracia Forelli! + +[JM6_A] +Ale z niej sztuka, co? + +[JM6_B] +W porząsiu, posłuchaj. Załatw sobie gablotę i jedź do kryjówki w St. Marks. Tam zabierzesz paru moich kumpli. + +[JM6_C] +Robią napad na bank i potrzebują kierowcy. + +[JM6_D] +Dałem im słowo, że znasz się na tym fachu, więc nie spieprz sprawy, dobra? + +[JM6_E] +Dowieź ich do banku przed godziną piątą i nie waż się spóźnić nawet minutę. + +[JM6_2] +Nie gaś silnika, zaraz wracamy. + +[JM6_3] +Zabierz nas stąd!! + +[JM6_4] +Zgub gliniarzy i dowież nas do kryjówki! + +[JM6_6] +~g~Skombinuj jakiś samochód, który będzie trochę mniej rzucał się w oczy. + +[JM6_7] +~g~Musisz zabrać wszystkich 3 bandytów, aby móc przeprowadzić skok! + +[TM1] +'ZABIERZ BRUDY DO PRALNI' + +[TM2] +'HARACZ' + +[TM3] +'SALVATORE ZWOŁUJE NARADĘ' + +[TM4] +'TRIADY I TROSKI' + +[TM5] +'SMAŻONE RYBY' + +[TONI_P] +Mam dla ciebie pilną pracę, Toni! + +[TM1_A] +~w~Siadaj, synu! Siadaj, zamknij jadaczkę i słuchaj. + +[TM1_B] +~w~Więc pralnie nie chcą płacić haraczu, co? + +[TM1_C] +~w~Triady myślą, że mogą mi podskakiwać? + +[TM1_D] +~w~Nauczymy tych dmuchanych twardzieli, co to znaczy być prawdziwym twardzielem. + +[TM1_E] +~w~Tak, damy im lekcję pokory. Mój syn nie będzie znosić upokorzeń od jakiejś Triady! + +[TM1_F] +~w~Twój ojciec, Panie świeć nad jego duszą, jeszcze na Sycylii trzymał ich krótko i nie pozwalał, żeby Triady wciskały mu kit.v + +[TM1_G] +~w~Przepraszam, Mamo. Tak jest, Mamo. + +[TM1_H] +~w~Chcę, żebyś zniszczył ciężarówki z pralni + +[TM1_I] +~w~i rozdeptał każdego sługusa Triad, który wejdzie ci w drogę. + +[TM1_J] +~w~8-Ball załatwi ci wszystko, co jest potrzebne do tej roboty. + +[TM2_A] +~w~TONI gdzieś polazł, znowu będzie straszyć ludzi albo przynajmniej usiłować kogoś przestraszyć. + +[TM2_AA] +~w~Nigdy nie będzie nawet w połowie takim twardzielem jak jego Papa. Zostawił dla ciebie kartkę na stole. + +[TM2_B] +~w~Pralnie zgodziły się zapłacić - spisałeś się dobrze, synu! + +[TM2_C] +~w~Odbierz forsę i przywieź ją tutaj. Uważaj na Triady. + +[TM2_D] +~w~Możliwe, że będą chcieli podłożyć nam świnię, ale nie daj sobie wciskać żadnego gówna. + +[TM2_E] +~w~Nikt, powtarzam, nikt nie zadziera z TONIM CIPRIANI! + +[TM2_1] +~g~Odwieź forsę Toniemu!!! + +[TM2_2] +~g~Zdmuchnąłeś ich wszystkich! + +[TM3_MA] +~w~Nie wiem, gdzie on się podziewa! + +[TM3_MB] +~w~Jak pragnę zdrowia, ten mój chłopak czasami jest taki głupi. + +[TM3_MC] +~w~Jego ojciec był zupełnie inny. Zawsze silny, męski, u steru wydarzeń... + +[TM3_A] +~w~Don Salvatore zwołał naradę. + +[TM3_B] +~w~Masz odebrać z warsztatu limuzynę i jego chłopaka, Joeya. + +[TM3_C] +~w~Potem zabierz Luigiego z klubu i wróć tutaj po mnie. + +[TM3_D] +~w~Razem pojedziemy do domu szefa. + +[TM3_E] +~w~Triady nie znają umiaru. + +[TM3_F] +~w~Chcą wojny, będą mieli wojnę. + +[TM3_G] +~w~Teraz zmykaj. + +[TM3_1] +~g~Odbierz limuzynę od Joeya. + +[TM3_2] +~g~Teraz jedź po Luigiego. + +[TM3_3] +~g~Teraz jedź po Toniego. + +[TM3_4] +~g~Zawieź ferajnę do rezydencji Salvatore. + +[TM3_5] +~y~Triady przygotowały zasadzkę! + +[TM4_B] +~w~A więc WOJNA! Triady używają jako przykrywki fabryki przetwórstwa ryb. + +[TM4_C] +~w~Większość ich interesów odbywa się na targu rybnym w chińskiej dzielnicy. + +[TM4_D] +~w~Pralnie nadal wiszą nam haracz za ochronę. + +[TM4_E] +~w~Żółtki myślą, że Triady ich obronią, więc czas wymierzyć im stosowną karę. + +[TM4_F] +~w~Weź tych dwóch chłopaków i załatwcie szefów Triady! + +[TM4_G] +~w~Tam, u diabła, jeżeli nadarzy się okazja, to załatwcie też paru żołnierzy Triady. + +[TM4_GAT] +~g~Do środka może wjechać tylko ciężarówka Triad. + +[TM5_B] +~w~Wystarczy już tego pitolenia. + +[TM5_C] +~w~Czas wykończyć Triady w Liberty raz na zawsze! + +[TM5_D] +8-Ball założył ładunek wybuchowy w śmieciarce. + +[TM5_E] +~w~To jest bomba z zegarem czasowym, więc jak się spóźnisz, nie pozostanie po tobie żaden ślad. Jedź po śmieciarkę. + +[TM5_F] +~w~Tylko ostrożnie, 8-Ball mówi, że mechanizm jest cholernie czuły i byle wstrząs może spowodować wybuch! + +[TM5_G] +~w~Zaparkuj między cysternami z benzyną i znikaj stamtąd! + +[TM5_H] +~w~Zaparkuj pomiędzy zbiornikami z gazem i spadaj gdzie pieprz rośnie! + +[TM5_I] +~w~Chcę, żeby na miasto spadł deszcz makreli. + +[TM5_J] +~w~Zobaczysz, tym razem to nie żadne wielkanocne bum-bum, tylko prawdziwa plaga biblijna! + +[FM2] +'RÓWNO Z TRAWĄ' + +[FM4] +'OSTATNIE PROŚBY' + +[FM1_A] +~w~Ja i moi ludzie musimy obgadać parę kwestii, + +[FM1_B] +~w~a więc ty zapewnisz mojej dziewczynie rozrywkę na wieczór. + +[FM1_C] +~w~HEJ, MARIA! RUSZ DUPĘ! + +[FM1_D] +~w~Głupia suka, zawsze się tak zachowuje. + +[FM1_E] +~w~A oto i ona, jedyna w swoim rodzaju królowa piękności! + +[FM1_F] +~w~Co tam robiłaś tyle czasu? + +[FM1_G] +~w~Cokolwiek to było, na pewno straciłem na tym jakieś pieniądze. + +[FM1_H] +~w~Chyba nie myślisz, że jestem tu, bo lubię z tobą gadać? + +[FM1_I] +~w~Wsiadaj do samochodu i zamknij swoją wielką gębę. + +[FM1_J] +~w~Możesz zabrać limuzynę, ale przyprowadź ją z powrotem w jednym kawałku, zrozumiano? + +[FM1_K] +~w~I uważaj na nią! Ona lubi pakować się w kłopoty! + +[FM1_L] +~w~Dość! Twój nowy piesek gończy na pewno zna już te historyjki, + +[FM1_M] +~w~a poza tym to przecież kawał chłopa! + +[FM1_N] +~w~Hej, piesku! Odwiedzimy Chico i załatwimy jakieś dopalacze na imprezę. + +[FM1_P] +~g~To właśnie Chico, podjedź do niego. + +[FM1_S] +~w~Jak sobie życzysz, moja pani. + +[FM1_TT] +~w~NALOT POLICYJNY! + +[FM1_1] +~g~Wracaj do limuzyny! + +[FM1_2] +~g~Wsiadaj do limuzyny! + +[FM1_3] +~r~Jeżeli zostawisz Marię, Salvatore każe cię obić jak psa! Zawróćj i zabierz ją ze sobą! + +[FM1_4] +~g~Zostawiłeś kobietę Dona! Wracaj do magazynu i zaczekaj na Marię! + +[FM1_5] +~g~Zawieź Marię do domu Salvatore tak, aby włos jej z głowy nie spadł! + +[FM1_6] +~g~Chico nie będzie czekał wiecznie - zabierz Marię na wybrzeże! + +[FM1_7] +~r~Maria nie żyje! Salvatore nie ucieszy się z tej wiadomości... + +[FM1_8] +~r~Załatwiłeś dostawcę Marii!!! + +[FM2_J] +Zostaw nas na chwilkę samych. + +[FM2_A] +Kartel Kolumbijski produkuje HEROINĘ gdzieś na terenie Liberty. + +[FM2_K] +ale nadal nie wiemy, gdzie, a oni działają tak, jakby z góry znali wszystkie nasze posunięcia. + +[FM2_L] +Za barem 'U Luigiego' pracuje pewien gość. Nazywa się Kudłaty Bob. + +[FM2_M] +Ostatnio wydaje więcej kasy niż mógłby zarobić. + +[FM2_N] +Zazwyczaj po pracy wraca do domu taksówką. Jedź za nim. + +[FM2_O] +A jeżeli okaże się, że to nasz kret... Zabij go! + +[FM2_F] +Oto nasz mały przyjaciel, pan wielka gęba we własnej osobie. + +[FM2_G] +Ktoś cię śledził? Wiesz, że to, co się tu dzieje, to nasz mały sekret. + +[FM2_H] +Nie, nikt mnie nie śledził. Masz mój towar? + +[FM2_I] +Masz swoje prochy, śmieciu, a teraz mów. + +[FM2_P] +A więc rodzina Leone prowadzi teraz wojnę na dwa fronty. + +[FM2_Q] +Z Triadami toczą wojnę o terytorium i wygląda na to, że żadna ze stron nie ma zamiaru się poddać. + +[FM2_R] +Z drugiej strony, Joey Leone wplątał się w krwawe porachunki z rodziną Forellich. + +[FM2_S] +Rodzina Leone z każdym dniem traci ludzi i wpływy w mieście. + +[FM2_T] +Salvatore zaczyna zachowywać się jak niebezpieczny dla otoczenia paranoik. Podejrzewa wszystkich i wszędzie wietrzy spisek. + +[FM2_U] +Ale jeżeli wszyscy są tak lojalni jak ty, to nie ma się o co martwić, prawda? + +[FM2_1] +~g~To Kudłaty Bob! + +[FM2_2] +~g~Kudłaty wyszedł z klubu - śledź go! + +[FM2_5] +~g~Zabierz go do Portland Harbor. + +[FM2_6] +~r~Kudłaty nie wsiądzie do porozbijanej taksówki! + +[FM2_7] +~r~Kudłaty zwiał! Spotkanie odwołane! + +[FM2_8] +~g~Walnij Kudłatego Boba! + +[FM2_9] +~r~Kudłaty Bob nie żyje! + +[FM2_10] +~r~Kudłaty ucieka! + +[FM2_11] +~g~Zaparkuj przed klubem 'U Luigiego'! Kudłaty Bob powinien niedługo wyjść. + +[FM2_12] +~r~Zgubiłeś go! + +[FM3_A] +~w~Powinniśmy sprzątnąć tych łajdaków z Kartelu, + +[FM3_B] +~w~ale dopóki mamy na głowie wojnę z Triadami, nie mamy na to dość sił. + +[FM3_C] +~w~Kartel zarabia ogromne pieniądze na sprzedaży tej syfiastej HEROINY. + +[FM3_D] +~w~Jeżeli przypuścimy otwarty atak, rozsmarują nas na miazgę. + +[FM3_E] +~w~Zapewne produkują prochy na tym wielkim statku, do którego doprowadził cię Kudłaty. + +[FM3_F] +~w~Dlatego właśnie musimy działać z głową. I to z twoją głową. + +[FM3_G] +~w~Chciałbym prosić cię, abyś zrobił mi osobistą przysługę i zniszczył tę fabrykę HERY, Salvatore. + +[FM3_H] +~w~Jeżeli to ci się uda, spędzisz resztę życia w dostatku. + +[FM3_I] +~w~Spotkaj się z 8-Ballem. On zna się na dynamicie jak nikt inny - będziesz potrzebował jego doświadczenia. + +[FM3_8A] +~w~Mój czarnuch! Salvatore już dzwonił, + +[FM3_8B] +~w~ale do takiej roboty potrzeba będzie sporo fajerwerków. + +[FM3_8D] +~w~ale chyba wiesz, że żaden dolar z tej sumy nie zostanie zmarnowany. + +[FM3_8E] +~w~W porządku, zróbmy to! + +[FM3_8F] +~w~Mogę nastawić to maleństwo na wybuch, ale rany na moich łapskach jeszcze się nie wygoiły i nie poradzę sobię z giwerą. + +[FM3_8G] +~w~Weź karabin i rozwal parę łbów. + +[FM3_4] +~g~Zatrzymaj samochód i wypuść 8-Balla! + +[FM3_7] +~r~Zgubiłeś 8-Balla! + +[FM3_8] +~r~Strażnicy podnieśli alarm! + +[FM4_A] +~w~To mój ulubiony czyściciel. + +[FM4_B] +~w~Jestem z ciebie dumny, chłopcze Wybiłeś tym tępakom to ich gówno z głów. + +[FM4_C] +~w~Zanim będziemy mogli uczcić twój sukces, mam dla ciebie jeszcze jedną małą robótkę. + +[FM4_D] +~w~Na następnej przecznicy stoi samochód z klubu Lugiego. + +[FM4_E] +~w~W środku jest cały upaćkany mózgiem. + +[FM4_F] +~w~Musieliśmy pomóc jednemu gościowi namyślić się nad paroma sprawami i wyszedł z tego niezły bałagan. + +[FM4_H] +~w~Zabierz ten samochód do zgniatacza, zanim wypatrzą go gliniarze. + +[AM3] +'PAPARAZZO NA DNIE' + +[AM4] +'WYPŁATA DLA RAYA' + +[AM5] +DWULICOWY TANNER + +[AM1_A] +Zanim przejdziemy do jakichkolwiek interesów, musimy wyjaśnić sobie + +[AM1_B] +pewne kwestie. Wyłóżmy nasze karty na stół. + +[AM1_C] +Należę do Yakuzy i wiem, że pracowałeś dla rodziny Salvatore Leone. + +[AM1_D] +Myślę, że znajdzie się dla ciebie miejsce w naszej organiacji. + +[AM1_E] +Ale najpierw musisz udowodnić, że naprawdę zerwałeś wszystkie związki z Mafią. + +[AM1_G] +Zadbaj, aby nie dotarł do celu żywy. + +[AM1_H] +W międzyczasie, ja i Maria pogawędzimy o starych dobrych czasach. + +[AM1_I] +Asuka, przyszedł twój masażysta. + +[AM1_J] +To nie żaden masażysta. + +[AM1_1] +~g~Salvatore wychodzi z knajpy 'U Luigiego'! + +[AM1_2] +~r~Zostałeś zauważony! + +[AM1_3] +~r~Spudłowałeś do Salvatore! + +[AM1_4] +~r~Znakomicie, wystraszyłeś cel! I ty uważasz się za zawodowca? + +[AM1_5] +~g~Jedź do Dzielnicy Czerwonych Świateł i poczekaj, aż Salvatore wyjdzie z klubu. + +[AM1_7] +~r~Salvatore siedzi sobie bezpiecznie w domu i sączy swój koktajl. Nie spodziewaj się, że ktoś nazwie cię 'Szakalem'! + +[AM1_8] +~g~Salvatore będzie wychodzić z klubu Luigiego około ~1~:~1~ + +[AM2_4] +~g~Skradałeś się z gracją słonia w składzie porcelany! + +[AM3_A] +Jakiś nieproszony reporter wtykał tu swój nos + +[AM3_B] +Maria i ja jedziemy razem na małe wakacje, a ty pozbądź się tego zboczonego podglądacza. + +[AM4_A] +A oto i mój ulubiony człowiek do każdej roboty! + +[AM4_B] +Maria chciałaby cię widzieć, ale... nie może podejść. Powiem jej, że pytałeś. + +[AM4_C] +Kto tam? Asuka? Wiem, że byłam niegrzeczną dziewczynką, ale naprawdę muszę do toalety! OK? + +[AM4_D] +Czas, abyś poznał naszą wtyczkę w tutejszej policji. + +[AM4_E] +Tu masz zapłatę za ostatnią robótkę, jaką dla nas wykonał. + +[AM4_F] +Facet jest bardzo ostrożny, to chyba jasne. + +[AM4_G] +Jak najszybciej odszukaj budkę telefoniczną w Torrington i czekaj na instrukcje. + +[AM5_A] +Maria i ja wyszliśmy na zakupy. + +[AM5_B] +Nasze źródło w policji donosi, że jeden z naszych kierowców to policyjny tajniak. + +[AM5_C] +Bez samochodu nie jest groźny. Przyczepiliśmy do jego gabloty nadajnik. + +[AM5_D] +Niech się dowie, czym grozi taka zabawa. + +[AM5_1] +Tanner chyba ma coś do ciebie! + +[AS1] +'PRZYNĘTA' + +[AS2] +'ESPRESSO NA WYNOS!' + +[AS4] +'OKUP' + +[AS1_A] +~w~Miguel chyba uważa, że źle go traktuję. + +[AS1_B] +~w~Mimo to zdradził mi, jak bardzo Catalina obawia się twojej zemsty. + +[AS2_A] +~w~Nie doceniliśmy planów, jakie Catalina wiąże ze swoją heroiną. + +[AS2_B] +~w~Marzy jej się coś więcej niż banda Yardies sprzedająca prochy na rogu. + +[AS2_D] +~w~Sprzedają herę w swojej sieci budek ulicznych. + +[AS2_1] +~g~Wszystkie budki z espresso w Portland zostałyzniszczone!! + +[AS2_2] +~g~Wszystkie budki z espresso na Wyspie Staunton zostały zniszczone!! + +[AS2_3] +~g~Wszystkie budki z espresso w Shoreside Vale zostały zniszczone!! + +[AS2_4] +~r~Kartel ostrzegł swoich dilerów!! + +[AS2_5] +~g~W Shoreside Vale i na Wyspie Staunton nadal stoi kilka budek z espresso! + +[AS2_6] +~g~W Shoreside Vale nadal stoi kilka budek z espresso! + +[AS2_7] +~g~Na Wyspie Staunton nadal stoi kilka budek z espresso! + +[AS2_8] +~g~W Portland nadal stoi kilka budek z espresso + +[AS2_9] +~g~W Portland i Shoreside Vale nadal stoi kilka budek z espresso + +[AS2_10] +~g~W Portland i na Wyspie Staunton nadal stoi kilka budek z espresso + +[AS2_12] +~g~Badaj dzielnice miasta i szukaj budek Espresso-2-Go! + +[AS3_A] +~W~Przyciskamy już teraz czy poczekamy, aż trochę osłabnie? + +[AS3_B] +~w~Popieść go trochę... + +[AS3_D] +~w~Mój Człowiek do Każdej Roboty! + +[AS3_E] +~w~Nudziłam się, więc wpadłam żeby dotrzymać Asuce towarzystwa. + +[AS3_1] +~g~Odszukaj ~r~łódź~g~ i dopłyń do ~b~boi! + +[AS3_3] +~g~Odczekaj, aż ~y~samolot~g~ rozpocznie podejście!! + +[AS3_5] +~g~Zbierz ładunek! + +[AS3_4] +~g~Użyj wyrzutni rakietowej aby zestrzelić ~y~samolot~g~!! + +[AS3_2] +~b~Płyń do boi wyznaczających lądowisko! ~y~Samolot wykonuje już ostatnie podejście!! + +[AS3_6] +~g~~1~ Z 8! + +[KM1] +'UCIECZKA KANBU' + +[KM3] +'ZDUSIĆ UKŁADY' + +[KM4] +'SHIMA' + +[KM5] +'UDERZENIE' + +[KM1_A] +Moja siostra ma o tobie dobre mniemanie, + +[KM1_E] +choć nie mogę sobie wyobrazić, żeby gaijin mógł dać nam coś innego niż rozczarowania. + +[KM1_B] +Być może mógłbyś pomóc w rozwiązaniu problemu, który leży mi na sercu. + +[KM1_F] +Rzecz jasna, porażka oznacza utratę honoru. + +[KM1_C] +Kanbu, członek Yakuzy, przebywa w areszcie, gdzie czeka na proces. + +[KM1_G] +To ceniony członek rodziny. + +[KM1_H] +Odbij go z aresztu i przywieź do dojo w Bedford Point. + +[KM1_D] +Dziękujemy ci za twoje bezinteresowne działania. Jeżeli kiedykolwiek będziesz potrzebował pomocy, dojo z radością przydzieli ci dwóch wojowników, którzy staną u twego boku. + +[KM1_1] +~g~Ukradnij radiowóz! + +[KM1_2] +~g~Załóż bombę w samochodzie! + +[KM1_3] +~g~Teraz zawieź go do dojo Yakuzy. + +[KM1_5] +~g~W porządku, teraz jazda na posterunek. + +[KM1_6] +~g~Zamontuj w samochodzie ładunek wybuchowy! + +[KM1_7] +~g~Tylko dla pojazdów policyjnych! + +[KM1_9] +~r~Nie użyłeś bomby samochodowej, aby zniszczyć mur. + +[KM1_10] +~r~Kanbu z Yakuzy jest trupem - tak samo jak twój honor! + +[KM1_11] +~r~Ściągnąłeś sobie na głowę kłopoty! + +[KM2_A] +Nie sposób przecenić znaczenia etykiety w tej branży. + +[KM2_B] +Na moją hańbę, pewien człowiek oddał mi kiedyś przysługę, a ja nigdy nie miałem okazji, aby mu się odwdzięczyć. + +[KM2_C] +Konikiem tego człowieka są samochody. Poprosił mnie, abym zgromadził pewne modele aut do jego kolekcji. + +[KM2_F] +Od tego zależy mój honor. + +[KM2_2] +~g~Samochód dostarczony. + +[KM3_A] +Kiedy nadciągają ciemne chmury, głupiec odwraca wzrok, a mędrzec stawia im czoła. + +[KM3_B] +Kartel Kolumbijski zignorował liczne prośby, aby nie naruszać naszych interesów w Liberty City. + +[KM3_C] +Teraz negocjują układ z Jamajczykami, aby jeszcze bardziej nas upokorzyć. + +[KM3_D] +Właśnie finalizują układ o podziale wpływów w mieście. + +[KM3_F] +Weź jednego z moich ludzi, ukradnij samochód gangu Yardie i jedź przekazać Kolumbijczykom nasze wyrazy szacunku. + +[KM3_E] +Nasz honor wymaga, aby wszyscy umarli. + +[KM3_2] +~g~Jedź po swój kontakt. + +[KM3_3] +~g~Spotkanie odbędzie się na parkingu szpitalnym w Rockford! + +[KM3_4] +~r~Uciekają! + +[KM3_6] +~g~Zabij ich, zabij ich wszystkich! + +[KM3_8] +~g~Aby wykonać zadanie, potrzebujesz samochodu gangu Yardie. + +[KM3_9] +~r~Jeden z Kolumbiczyków nie żyje, układ odwołany. + +[KM3_10] +~r~Twój kontakt nie żyje! + +[KM4_A] +Jeżeli chcesz być naprawdę silny, nie możesz nigdy okazywać słabości. + +[KM4_C] +Jak najszybciej odbierz pieniądze, abyśmy mogli wpłacić je na konto kasyna. + +[KM4_1] +Nie mam wam czym zapłacić, ale nawet gdybym miał, to i tak bym tego nie zrobił! + +[KM4_9] +Jakaś banda szczeniaków właśnie stąd uciekła! Zabrali wszystko! + +[KM4_2] +Nie ma z was żadnego pożytku. + +[KM4_10] +A czy ty w ogóle należysz do Yakuzy...? + +[KM4_3] +Nie za to wam płacę, obwiesie. Gdybym chciał takiej ochrony, to zaprosiłbym cholerną policję. + +[KM4_4] +~g~Wymierz karę gangowi odpowiedzialnemu za napad i odzyskaj ~b~opłatę za ochronę~g~! + +[KM4_7] +~r~Sklepikarz wydał ostatnie tchnienie! + +[KM4_5] +Donald Love zaprasza cię do swojego ogrodu herbacianego na rozmowę. + +[KM4_6] +Tam są pieniądze! + +[KM4_8] +~r~Teczka odebrana! + +[KM5_A] +TO TY! Wybrałeś najwłaściwszy moment, aby pokazać swoją bezwartościową postać! + +[KM5_B] +Zdaje się, że twoje marne próby, aby odwieść Jamajczyków + +[KM5_B1] +od skumplowania się z Kartelem były całkowicie chybione! + +[KM5_C] +Handlarze Yardie krążą po ulicach Liberty, sprzedając woreczki HERY tak, jakby sprzedawali hotdogi! + +[KM5_D] +Te wieprze z Kartelu śmieją się z nas, ze mnie! + +[KM5_E] +Dam ci ostatnią szansę, abyś mógł dowieść, że zaufanie, jakim obdarzyła cię moja siostra, nie było bezpodstawne. + +[KM5_F] +Rozjedź tych śmieci i spłucz swoją hańbę w potokach krwi naszych wrogów!!! + +[KM5_3] +~r~Nie udało ci się zabić co najmniej ~1~ członków gangu Yardie. + +[KM5_4] +~g~Gratulacje, zabiłeś ~1~ członków gangu Yardie. + +[KM5_5] +~g~Gratulacje, zabiłeś ~1~ członków gangu Yardie. PREMIA $~1~. + +[RM1] +'UCISZYĆ KAPUSIA' + +[RM3] +'GONIĄC DOWODY' + +[RM4] +'NA RYBY' + +[RM5] +'DOKOŃCZYĆ DZIEŁO' + +[RM1_D] +Siedzi pod ochroną policji w budynku WitSec w Newport, w którymś z mieszkań za parkingiem. + +[RM1_E] +Podpal tę budę, to powinno ich wypłoszyć. Wtedy na nich zapoluj - zadbaj, aby McAffrey już nigdy z nikim nie rozmawiał! + +[RM1_1] +~g~Znajdź miejsce, w którym przebywa chroniony świadek. + +[RM1_2] +~g~Wykończ McAffrey'a! + +[RM2_A1] +Hej, synu, chodź tutaj! + +[RM2_A] +Mój stary kumpel z wojska prowadzi sklepik w Rockford. + +[RM2_D] +Potrzeba mu wsparcia. W zamian możesz liczyć na spore obniżki cen na spluwy, które ma na składzie. + +[RM2_E] +Ray wspominał, że ktoś przyjdzie... ale nie myślałem, że przyśle takiego szczeniaka. + +[RM2_F] +No cóż, trzy ramiona to zawsze więcej niż jedno, więc bierz broń według życzenia. + +[RM2_G] +~g~Zasuwaj i pilnuj Phila! + +[RM2_H] +~r~Phil zginął! + +[RM2_L] +No, no! Gdybyś był z nami wtedy w Nikaragui, może jeszcze miałbym swoją rękę! + +[RM2_N] +Zostaw forsę. Teraz lepiej znikaj, sam zajmę się policją. + +[RM3_D] +Dowody będą przewożone przez miasto. + +[RM3_E] +Musisz staranować ten samochód i zebrać wszystkie dowody, co do jednego! + +[RM3_F] +Kiedy już je zbierzesz, zostaw je w samochodzie i podpal go. + +[RM3_G] +Obaj będziemy mieć sporo korzyści, chłopcze. + +[RM3_1] +~g~Zostaw dowody w samochodzie i podpal wóz. + +[RM3_4] +~g~Samochód prokuratury zgubił dowody! + +[RM3_6] +~r~Teraz te fotografie obejrzy całe miasto! + +[RM3_7] +~g~Podpal samochód! + +[RM4_A] +Podejrzewam, że mój wspólnik to kret. + +[RM4_C] +On każdego wieczoru wypływa na morze, w okolice latarni przy Portland Rock, aby łowić ryby. + +[RM4_D] +Podwędź policyjną łódź i dopilnuj, aby poszedł na dno razem ze swoimi zdradzieckimi planami! + +[RM4_1] +~g~Ukradnij łódź policyjną! + +[RM4_2] +~g~Płyń do latarni morskiej i załatw kolegę Raya! + +[RM5_A] +Ty nieudaczny łajdaku! + +[RM5_A1] +Schrzaniłeś robotę! Moja dupa już się zaczyna smażyć, a ty nie potrafisz zabić nawet cholernej muchy. + +[RM5_B] +Zapłaciłem ci kupę szmalu, żebyś sprzątnął świadka, a on dalej żyje! + +[RM5_B1] +Dzisiaj będzie składał pierwsze zeznania w Sądzie Federalnym! + +[RM5_C] +Lada chwila będzie wyjeżdżał ze Szpitala Ogólnego Carson w Rockford. + +[RM5_D] +Jeżeli on zacznie sypać, koniec ze mną... + +[RM5_E] +więc lepiej zrób to, za co ci zapłaciłem! + +[RM5_1] +~g~Przechwyć karetkę. + +[RM5_2] +~g~Zostałeś rozpoznany! + +[RM5_3] +~g~To była tylko przynęta! + +[RM5_4] +~g~Kule nie przebiją pancernego kadłuba! + +[RM5_5] +~g~Pancerna karoseria jest ognioodporna! + +[RM5_7] +~r~Świadek dotarł na miejsce! + +[RM5_8] +~g~Świadek poszedł na dno! + +[LOVE2] +'SPRZĄTNĄĆ WAKA-GASHIRĘ' + +[LOVE3] +'KROPLA W OCEANIE' + +[LOVE1_A] +Przede wszystkim pozwól mi podziękować, że zechciałeś zająć się tą sprawą o charakterze osobistym. + +[LOVE1_F] +W dzisiejszych czasach ludzie nie szanują żadnych porozumień. + +[LOVE1_D] +Usiłują wymusić na mnie dodatkowe pieniądze, ale ja nie wierzę w renegocjacje. + +[LOVE1_E] +Umowa to umowa, więc nie powinni spodziewać się ode mnie nawet grosza. + +[LOVE1_G] +Uratuj mojego przyjaciela, zrób wszystko, co będzie trzeba. + +[LOVE1_2] +~g~Uratuj starego pana z dalekiego wschodu. + +[LOVE1_3] +~g~Zabierz starego pana z dalekiego wschodu do budynku Donalda Love'a. + +[LOVE1_4] +~g~Stary pan z dalekiego wschodu musi się znajdować w jednym z tych garaży... + +[LOVE1_6] +~r~Flaki starego pana z dalekiego wschodu zostały rozsmarowane po całej ulicy! + +[LOVE1_7] +~g~Brama otworzy się wyłącznie przed samochodem gangu kolumbijskiego. + +[LOVE2_A] +Nic tak nie wpływa na spadek cen nieruchomości, jak stara dobra wojna gangów. + +[LOVE2_B] +No, może z wyjątkiem wybuchu epidemii... ale w tym wypadku nie trzeba się posuwać aż tak daleko. + +[LOVE2_C] +Zauważyłem, że Yakuza i Kolumbijczycy nie są do siebie przyjaźnie nastawieni. + +[LOVE2_D] +Skorzystajmy z tej szansy. + +[LOVE2_E] +Masz zabić Waka-gashirę gangu Yakuzy, Kenji'ego Kasena. + +[LOVE2_F] +Kenji właśnie jest na spotkaniu na szczycie parkingu piętrowego w Newport. + +[LOVE2_G] +Załatw sobie samochód Kartelu i rozsmaruj go na ścianie! + +[LOVE2_H] +Zrób to tak, aby Yakuza obciążyła Kartel za ten akt. + +[LOVE2_1] +~g~Jedź do Fort Staunton i zwędź samochód gangu kolumbijskiego! + +[LOVE2_2] +~g~Teraz jedź na ~p~parking wielopiętrowy w Newport~p~ i załatw Kenjiego! + +[LOVE2_3] +~r~Jeżeli pojedziesz tam bez samochodu Kartelu, zostaniesz rozpoznany! + +[LOVE2_4] +~r~Członkowie Yakuzy cię rozpoznali! + +[LOVE2_6] +~r~Zabiłeś wszystkich świadków!!! + +[LOVE3_A] +W czasach hipokryzji moralnej ciężko jest zdobyć niektóre cenne towary z zagranicy. + +[LOVE3_C] +Pilot zrzuci do wody kilka pakunków. + +[LOVE3_D] +Zbierz je, zanim wpadną w niepowołane ręce. + +[LOVE3_1] +~g~Załatw sobie ~r~łódź~g~ i płyń za ~y~samolotem~g~! + +[LOVE4] +'GRAND THEFT AERO' + +[LOVE5] +'KONWOJENT' + +[LOVE4_A] +Dziękuję za odzyskanie paczek. Przykro mi to mówić, ale była to jedynie przynęta. + +[LOVE4_B] +Nie chciałem cię urazić, po prostu czasami w interesach trzeba tak postąpić. + +[LOVE4_C] +Mój prawdziwy cel przez cały czas był ukryty w samolocie. + +[LOVE4_F] +Przekupiłem kogo trzeba. + +[LOVE4_1] +~r~Są tu ludzie z Kartelu Kolumbijskiego! + +[LOVE4_2] +~g~Pakunek zniknął! Wyśledź Kolumbijczyków i odzyskaj ładunek. + +[LOVE4_3] +~g~Firma budowlana Panlantic Construction? + +[LOVE4_5] +~g~Paczka powinna nadal być w samolocie... + +[LOVE4_6] +~g~Wjedź windą na wieżę! + +[LOVE5_B] +Mój orientalny przyjaciel potrzebuje eskorty, kiedy będze wiózł mój najnowszy nabytek do specjalistów. + +[LOVE5_1] +~g~Ruszamy! + +[LOVE5_2] +~g~Potrzebujesz samochodu! + +[LOVE5_3] +~g~Jedź przodem i zbadaj wylot tunelu! + +[LOVE5_4] +~r~Osłaniaj ciężarówkę! + +[RM6] +'NA WIDELCU' + +[RM6_A] +Nikt cię nie śledził? To dobrze. + +[RM6_B] +To już koniec. Jestem po uszy w gównie i nadal się zapadam. + +[RM6_D] +Jestem na widelcu, więc postanowiłem zniknąć. + +[RM6_E] +Zawieź mnie na mój samolot, a dobrze ci się odwdzięczę! + +[RM6_666] +Zatroszcz się o mojego kuloodpornego Patriota. Do zobaczenia w Miami, Ray. + +[CAT1] +'OKUP' + +[CAT2] +'WYMIANA' + +[CAT1_A] +Mam twoją słodziutką Marię. Jeżeli nie chcesz, żeby jej twarz wyglądała jak po randce z rzeźnikiem, + +[CAT2_F] +Złamałam paznokieć i cała jestem potargana. Nie do wiary! Ta fryzura kosztowała mnie pięćdziesiąt dolców! + +[CAT2_G] +Strasznie się bałam, ale w końcu powiedziałam sobie: jesteś już przecież dużą dziewczyną. + +[CAT2_H] +Och, będziemy się wspaniale bawić, bo moja siostra powiedziała, że chciałaby wpaść do nas ze swoimi dziećmi, + +[CAT2_I] +bo jej mąż znowu się gdzieś szwenda i... + +[CAT1_E] +XXXX + +[CAT1_F] +Dotrzyj do Cataliny sprzed upływem wyznaczonego czasu! + +[CAT_MON] +~g~Nie masz jeszcze tyle pieniędzy. Potrzebujesz $500.000 + +[BITCH_D] +~g~Maria nie żyje! + +[WEATHER] +POGODA WYMUSZONA + +[WEATHE2] +ZWYKŁA POGODA + +[8001] +Marnie kończysz!! + +[1000] +JESTEŚ MARTWY + +[1001] +JESTEŚ MARTWY + +[1002] +JESTEŚ MARTWY + +[1003] +JESTEŚ MARTWY + +[1004] +JESTEŚ MARTWY + +[1005] +WPADKA + +[1006] +WPADKA + +[1007] +WPADKA + +[1008] +WPADKA + +[1009] +WPADKA + +[GA_4] +Bomby samochodowe kosztują 1000 dolarów za sztukę. + +[GA_5] +W twoim samochodzie bomba już została zainstalowana. + +[GA_6] { re3 change } +Zaparkuj wóz, włącz mechanizm klawiszem ~h~~k~~VEHICLE_FIREWEAPON~~w~ i W NOGI! + +[GA_7] { re3 change } +Uaktywnij bombę za pomocą klawisza ~h~~k~~VEHICLE_FIREWEAPON~~w~. Bomba wybuchnie w momencie włączenia silnika. + +[GA_8] +Użyj detonatora, aby aktywować bombę. + +[GA_9] +Zgromadziłeś ~1~ z 10 samochodów specjalnych. + +[GA_10] +Ładne cacko. Oto twoje ~1~$. + +[GA_11] +Mamy już taki wózek. Dla nas jest on bez wartości. + +[GA_12] +Bomba uzbrojona + +[GA_13] +Robota zawodowca. Skombinuj dla mnie wszystkie wózki z listy, a czeka cię premia. + +[GA_14] +Wszystkie samochody? DOSKONALE! Oto niespodzianka dla ciebie! + +[GA_15] +Mam nadzieję, że podoba ci się nowy kolor. + +[GA_16] +Lakierowanie zakończone. + +[GA_19] +Nie interesuje nas ten model. + +[GA_20] +Mamy tego więcej, niż możemy zepchnąć. Sorry, facet, ale nie wchodzę w to. + +[CR_1] +Dźwig nie jest w stanie podnieść tego pojazdu. + +[PU_MONY] +Nie masz dość forsy. + +[CO_ALL] +Masz już wszystkie. Oto mała niespodzianka... + +[PAUSED] +GRA ZATRZYMANA + +[HEALTH1] +Spadaj stąd! Jesteś zdrów jak ryba. + +[HEALTH2] +Koszty opieki medycznej. + +[HEALTH3] +Trochę cię połatam. + +[HEALTH4] +To kosztuje 250 dolarów. + +[FEB_STA] +Statystyki + +[FEB_BRI] +Zadania + +[FEB_CON] +Sterowanie + +[FEB_AUD] +Audio + +[FEB_DIS] +Ekran + +[FEB_LAN] +Język + +[FEP_STA] +STATYSTYKI + +[FEP_BRI] +CELE + +[FEP_CON] +STEROWANIE + +[FEP_AUD] +DŹWIĘK + +[FEP_DIS] +EKRAN + +[FEP_LAN] +JĘZYK + +[FEF_ST1] +Kto tu jest złym facetem? + +[FEF_ST2] +Ile paniki dzisiaj wzbudziłeś? + +[FEF_BR1] +Straciłeś wątek? + +[FEF_CO1] +Potrzebujesz lepszej kontroli, perfekcjonisto? + +[FEF_CO2] +Określ taką konfigurację klawiszy sterujących, która najlepiej odpowiada preferowanemu stylowi gry. + +[FEF_SA1] +Trzymaj wszystko na kupie! + +[FEF_SA2] +Zapisuj i wczytuj swoje gry + +[FEF_AU1] +Więcej czadu! + +[FEF_AU2] +Wybierz stację radiową oraz efekty dźwiękowe + +[FEF_DI1] +Zmień grę! + +[FEF_DI2] +Dostosuj grę do odbiornika TV + +[FEF_LA1] +O czym gadasz? + +[FEF_LA2] +Wybierz preferowany język + +[FEB_PMB] +Cele poprzednich misji: + +[FEC_NA] +N.D. + +[FEC_CWL] +Przełącz rodzaj broni w lewo + +[FEC_CWR] +Przełącz rodzaj broni w prawo + +[FEC_LOF] +Spójrz do przodu + +[FEC_TAR] +Cel + +[FEC_MOV] +Ruch + +[FEC_CAM] +Tryby kamery + +[FEC_PAU] +Pauza + +[FEC_ENV] +Wsiadanie do pojazdu + +[FEC_JUM] +Skok + +[FEC_ATT] +Atak lub strzał z broni + +[FEC_RUN] +Bieg + +[FEC_FPC] +Kamera - widok z oczu postaci + +[FEC_LL] +Spójrz w lewo + +[FEC_LB1] +Spójrz + +[FEC_LB2] +do tyłu + +[FEC_LB] +Spójrz do tyłu + +[FEC_LR] +Spójrz w prawo + +[FEC_HOR] +Klakson + +[FEC_VES] +Sterowanie w pojeździe + +[FEC_RSC] +Przełącz stacje radiowe + +[FEC_BRA] +Hamulec lub wsteczny + +[FEC_HAB] +Hamulec ręczny + +[FEC_CAW] +Broń w samochodzie + +[FEC_ACC] +Przyspieszenie + +[FEC_SMT] +Włączenie misji specjalnych + +[FEA_OUT] +Wyjście: + +[FEA_ST] +stereo + +[FEA_MNO] +mono + +[FEA_NON] +Brak + +[FEA_FM0] +HEAD RADIO + +[FEA_FM1] +DOUBLE CLEFF FM + +[FEA_FM2] +JAH RADIO + +[FEA_FM3] +RISE FM + +[FEA_FM4] +LIPS 106 + +[FEA_FM5] +GAME FM + +[FEA_FM6] +MSX FM + +[FEA_FM7] +FLASHBACK 95.6 + +[FEA_FM8] +GADUŁA 109 + +[FED_DBG] +Menu debugowania + +[FED_RID] +Ponowne wczytanie IDE + +[FED_RIP] +Ponowne wczytanie IPL + +[FED_PAH] +Parse Heap + +[FED_RCD] +CCullZones::RecalculateCullZoneData + +[FED_DFL] +CTheScripts::DbgFlag + +[FED_DLS] +Big White Debug Light Switched + +[FED_SPR] +Show Ped Road Groups + +[FED_SCR] +Show Car Road Grups + +[FED_SCZ] +Show Cull Zones + +[FED_DSR] +Żądania przetworzenia w trybie debugowania + +[FED_SCP] +gbShowCollisionPolys + +[FEM_MCM] +Menu karty pamięci + +[FEM_RMC] +Register MemCard One + +[FEM_TFM] +Próbne formatowanie karty pamięci 1 + +[FEM_TUM] +Próbne odformatowanie karty pamięci 1 + +[FEM_CRD] +Utwórz katalog główny + +[FEM_CLI] +Twórz i wczytuj ikony + +[FEM_FFF] +Fill First File with Guff + +[FEM_SOG] +Zapisz tylko grę + +[FEM_CES] +Check Every 0kB4 Save + +[FEM_STG] +Zapisz grę + +[FEM_STS] +Zapisz grę pod nazwą GTA3 + +[FEM_CPD] +Utwórz chroniony katalog magazynowy + +[FEM_MC2] +Menu karty pamięci 2 + +[FEM_TS] +Próbne zapisywanie: + +[FEM_TL] +Próbne wczytywanie: + +[FEM_TD] +Próbne kasowanie: + +[PL_STAT] +Statystyki gracza + +[PE_WAST] +Ludzie załatwieni przez gracza + +[PE_WSOT] +Ludzie załatwieni przez innych + +[CAR_EXP] +Wysadzone samochody: + +[TM_BUST] +Liczba wpadek + +[M_WASTE] +Załatwieni mężczyźni-cywile + +[F_WASTE] +Załatwione kobiety-cywile: + +[PIG_WST] +Załatwieni gliniarze + +[GNG_WST] +Członkowie gangu załatwieni. + +[MED_WST] +Załatwieni lekarze + +[FIRE_WS] +Strażak załatwiony + +[DED_CRI] +Załatwieni przestępcy: + +[DED_DED] +Załatwione lumpy: + +[DED_HOK] +Załatwione dziwki: + +[HEL_DST] +Zniszczone helikoptery + +[PER_COM] +Procent ukończenia gry + +[KGS_EXP] +Użyte materiały wybuchowe (kg) + +[ACCURA] +Dokładność + +[ELBURRO] +Najlepsze czasy wyścigu w sekundach: + +[CAR_CRU] +Zmiażdżone samochody: + +[HED_EX] +Rozbite głowy + +[TM_DED] +Wizyty w szpitalu + +[DAYSPS] +Liczba dni, które upłynęły w grze: + +[MMRAIN] +mm deszczu + +[MXCARD] +Maks. odległość SZALONEGO skoku (w stopach) + +[MXCARJ] +Maks. wysokość SZALONEGO skoku (w stopach) + +[MXCARDM] +Maks. odległość SZALONEGO skoku (w metrach) + +[MXCARJM] +Maks. wysokość SZALONEGO skoku (w metrach) + +[MXFLIP] +Maks. liczba salt w SZALONYM skoku + +[MXJUMP] +Maks. liczba obrotów w SZALONYM skoku + +[BSTSTU] +Najlepszy SZALONY skok do tej pory: + +[INSTUN] +Szalony skok + +[PRINST] +Bezbłędny szalony skok + +[DBINST] +Podwójny szalony skok + +[DBPINS] +Bezbłędny podwójny szalony skok + +[TRINST] +Potrójny szalony skok + +[PRTRST] +Bezbłędny potrójny szalony skok + +[QUINST] +Poczwórny szalony skok + +[PQUINS] +Bezbłędny poczwórny szalony skok + +[NOSTUC] +Nie wykonano żadnych SZALONYCH skoków + +[NOUNIF] +Wyjątkowe skoki wykonane + +[NOUNGM] +Wyjątkowe skoki razem + +[NMISON] +Próby wykonania misji + +[NMMISP] +Wykonane misje + +[PASDRO] +Zgubieni pasażerowie + +[MONTAX] +Forsa zarobiona w taksówce + +[DAYPLC] +Dzienne wydatki policji: + +[CRIMRA] +Ranking zbrodni: + +[GMSTOR] +Zachowanie gry + +[PREBRF] +Poprzednie zapisy + +[CNTLS] +Sterowanie + +[MUSMEN] +Muzyka/dźwięki + +[GAMSET] +Ustawienia gry + +[LANGUA] +Język + +[DSPLAY] +Ekran + +[DEBUGM] +Menu funkcji debugowania + +[QUITOP] +Wyjście z menu opcji + +[CONTRL] +Konfiguracja sterowania + +[SET1EN] +SetUp 1. Enabled + +[SET1] +SetUp 1. + +[SET2EN] +SetUp 2. Enabled + +[SET2] +SetUp 2 + +[SET3EN] +SetUp 3. Enabled + +[SET3] +SetUp 3 + +[SET4EN] +SetUp 4. Enabled + +[SET4] +SetUp 4 + +[GOBACK] +Wróć + +[SOUND] +DŹWIĘK + +[MUSVOL] +Głośność muzyki + +[SFXVOL] +Głośność efektów dźwiękowych + +[SCROPT] +OPCJE EKRANU + +[CTRSCR] +Wyśrodkowanie Ekranu + +[SCRFOR] +Format ekranu + +[GMSVLQ] +WCZYTAJ-ZAPISZ-WYJDŹ Z GRY + +[GMREST] +Ponowne uruchomienie gry + +[NOGMSV] +Zapisywanie stanu gry jest możliwe tylko w kryjówce. + +[DLFILE] +Skasować pliki Grand Theft Auto III + +[CHFILE] +WYBIERZ PLIK, KTÓRY MA ZOSTAĆ WCZYTANY + +[CHFIDL] +WYBIERZ PLIK, KTÓRY MA ZOSTAĆ SKASOWANY + +[SVCONF] +POTWIERDZENIE ZAPISU + +[LANGSL] +WYBÓR JĘZYKA + +[ENGLIS] +Polski + +[GERMAN] +Niemiecki + +[ITALIA] +Włoski + +[FRENCH] +Francuski + +[SPAIN] +Hiszpański + +[RELIDE] +ReLoadIde + +[RELIPE] +ReLoadIpl + +[PARSHP] +Parse Heap + +[DBGFON] +CTheScripts::DbgFlag On + +[DBFOFF] +CTheScripts::DbgFlag Off + +[BGWHON] +Big White Debug Light - włączony + +[BGWOFF] +Big White Debug Light - wyłączony + +[DSTRON] +Debug Streaming Requests On + +[DSTROFF] +Debug Streaming Requests Off + +[PDRGON] +ShowPedRoadGroups On + +[PRGOFF] +ShowPedRoadGroups Off + +[CRRGON] +ShowCarRoad Group Włączone + +[CRGOFF] +ShowCarRoadGroups Wyłączone + +[CLZOON] +Wyłączone pokazywanie stref zniszczeń + +[CLZOOF] +Włączone pokazywanie stref zniszczeń + +[SHPLON] +gbShowCollisionPolys On + +[SHPLOF] +gbShowCollisionPolys Off + +[CULREC] +CCullZones::RecalculateCullZoneData() + +[FORMM1] +FormatMemCard 1 (element testowy) + +[UNFRM1] +UnFormatMemCard 1 (element próbny) + +[GORLEV] +Poziom 'Krwawy' + +[SICASS] +Sick Fuck + +[SICSIC] +Sick Fucker + +[SCASSL] +Sick Fuck wybrany + +[SCSCSL] +Sick Fucker wybrany + +[PRVMEN] +Cele poprzednich misji + +[FORMEN] +Menu formatu + +[MEMTST] +Ekran TestKartPamięci + +[REGCAR] +Rejestracja KartaPamięci Jeden + +[TEFONE] +Próbne formatowanie karty pamięci 1 + +[TEUFON] +Próbne odformatowanie karty pamięci 1 + +[CRROOT] +Utwórz Katalog Główny + +[CRLDIC] +Tworzenie i wczytywanie ikon + +[FLFSGF] +Fill First File With Guff + +[PUSAVE] +Zapisz tylko grę + +[CHEVOK] +CheckEveryOkB4Save + +[SVGMON] +Zapisz grę + +[CNTSAV] +Nie można zapisać stanu gry. Jesteś w trakcie misji. + +[CNCSAV] +Nie można zapisać stanu gry. Jesteś w samochodzie. + +[CRMGSV] +Utwórz chroniony katalog magazynowy + +[MGSVCN] +Katalog magazynowy utworzony + +[MGSVNC] +Katalog magazynowy nieutworzony + +[YES] +Tak + +[NO] +Nie + +[X] +x + +[LAST] +Ostatnia wiadomość + +[FEDS_XB] +Wybierz + +[FEDS_ST] +klawisz START - WZNÓW + +[FEST_OO] +z + +[FEC_TUC] +Sterowanie wieżyczką + +[FEC_SM3] +Włączenie misji specjalnych (klawisz R3) + +[FEC_RS3] +Przełącz stacje radiowe (klawisz L3) + +[FEC_HO3] +Klakson (klawisz lewy SHIFT) + +[DIAB1] +'WYŚCIG' + +[DIAB2] +'PRZEŁAMAĆ LODY' + +[DIAB3] +'PRÓBA OGNIA' + +[DIAB4] +'WIELKI I ŻYLASTY' + +[DIAB1_A] +El Burro ma dla ciebie propozycję. Jeżeli jesteś zainteresowany, odszukaj budkę telefoniczną w Hepburn Heights. + +[DIAB1_C] +Niezły z ciebie kierowca! Jedź do wskazanej budki telefonicznej, a może El Burro da ci jakieś zajęcie. + +[DIAB1_1] +~g~3... 2... 1... NAPRZÓD! NAPRZÓD! NAPRZÓD! + +[DIAB1_4] +~g~Załatw sobie szybki wóz i jedź na miejsce startu. + +[DIAB1_3] +~r~Nie wygrałbyś nawet z własną babcią, LESZCZU! + +[DIAB1_2] +~g~Gratulacje, wygrywasz, uzyskując niesamowity czas: ~1~sekund. + +[FIRST] +~g~pierwszy + +[SECOND] +~g~drugi + +[THIRD] +~g~trzeci + +[FOURTH] +~g~4 + +[DIAB2_1] +~g~Zabierz teczkę z Harwood. + +[DIAB2_2] +~g~Odszukaj półciężarówkę lodziarza. + +[DIAB2_3] +~g~Zaparkuj samochód lodziarza na Atlantic Quays. + +[DIAB2_4] +~g~Naciśnij klawisz ~w~~k~~VEHICLE_HORN~~g~, aby włączyć sygnał reklamujący lody. + +[DIAB2_6] +~g~Naciśnij klawisz ~w~~k~~VEHICLE_HORN~~g~, aby włączyć sygnał reklamujący lody. + +[DIAB2_7] +~g~Naciśnij klawisz ~w~~k~~VEHICLE_HORN~~g~, aby włączyć sygnał reklamujący lody. + +[DIAB2_5] +~g~Wysiądź z samochodu, a następnie zdetonuj go za pomocą nadajnika. + +[YD1] +'SZUKAJ PUNKTÓW!' + +[YD2] +'RUCHOMY CEL' + +[YD3] +'KOLEKCJONER WOZÓW' + +[YD4] +'KRÓLESTWO NIEBIESKIE' + +[YD_P] +King Courtney prosi cię na słówko. Znajdź budkę telefoniczną w Aspatrii!! + +[YD1_A] +~w~Z tej strony King Courtney. + +[YD1_A1] +~w~Moja paczka, Yardies, potrzebuje kierowcy, a ty masz reputację bystrego faceta. + +[YD1_B] +~w~Jedź na wysypisko naprzeciwko stadionu i poczekaj na innych zawodników. + +[YD1_C] +~w~Moi ludzie pilnują punktów kontrolnych w całym Staunton. + +[YD1_D] +~w~Kierowca, który pierwszy dotrze do takiego miejsca, otrzymuje jeden punkt. Potem ścigamy się do następnego przystanku. + +[YD1_D1] +~w~Jeżeli zaliczysz więcej punktów niż inni kierowcy, być może będę miał dla ciebie zadanie. + +[YD1_E] +~g~Gotowi do wyścigu! + +[YD1_F] +~g~Minąłeś punkt startu - podoba mi się twój styl!!! + +[YD1_G] +~r~To jest WYŚCIG SAMOCHODOWY. Masz jechać SAMOCHODEM, IDIOTO! + +[YD1GO] +~g~START! + +[YD1_1] +~r~1 + +[YD1_2] +~r~2 + +[YD1_3] +~r~3 + +[YD1_BON] +$1000!! + +[Y1_1ST] +~g~Kończysz na pierwszym miejscu i pomyślnie zaliczasz ~1~ punktów kontrolnych! + +[Y1_2ND] +~y~Jesteś drugi, pomyślnie zaliczyłeś ~1~ punktów kontrolnych. ~r~Było blisko, ale trochę ci jeszcze brakuje. + +[Y1_3RD] +~r~Jesteś trzeci, pomyślnie zaliczyłeś ~1~ punktów kontrolnych. ~r~A mówiłeś, że jesteś niezły! + +[Y1_LAST] +~r~Jesteś ostatni! ~r~Tylko marnujesz mój czas, IDIOTO! + +[Y1_J1ST] +~y~Pierwsze miejsce ex aequo, pomyślnie zaliczyłeś ~1~ punktów kontrolnych. ~y~Nieźle, ale musisz być najlepszy z najlepszych, aby móc jeździć dla Królowej Lizzy! + +[Y1_J2ND] +~r~Drugie miejsce ex aequo, pomyślnie zaliczyłeś ~1~ punktów kontrolnych. Jechałeś jak wściekły goryl! + +[Y1JLAST] +~r~Ostatnie miejsce ex aequo! Wymądrzałeś się jak stary kierowca, ale kierowałeś jak stary przemądrzalec! + +[Y1_TEST] +SAMOCHÓD W WODZIE!! + +[YD2_A] +~w~Muszę sprawdzić, czy dajesz sobie radę z mokrą robotą. + +[YD2_A1] +~w~Zobaczymy, czy można ci zaufać. + +[YD2_B] +~w~Dwóch moich chłopców zaraz po ciebie przyjedzie, żeby zabrać cię na przejażdżkę + +[YD2_B1] +~w~i sprawdzić, czy naprawdę umiesz tyle, ile twierdzisz. + +[YD2_C] +~w~Jedziemy na mały wypad na Wzgórza Hepburn, żeby sprzątnąc paru śmierdziuchów z gangu Diablo, którzy wkurzali Królową Lizzy. + +[YD2_CC] +~w~Będziesz potrzebował gnata, trzymaj. + +[YD2_D] +~w~Ty kierujesz i strzelasz. My zadbamy, żeby nie zabrakło ci odwagi. + +[YD2_E] +~w~Jazda! + +[YD2_F] +~w~Oszukał nas! Dorwać jego zdradliwą dupę! + +[YD2_G1] +~w~Wzgórza Hepburn. Zabijmy paru śmierdzących Diablo... + +[YD2_G2] +~w~Tylko pamiętaj, ~r~ masz nie wysiadać z samochodu!!! + +[YD2_H] +~w~W porządku, wracamy na terytorium Yardies! JAZDA, SZYBCIEJ!! + +[YD2_L] +~w~Dobrze się spisałeś, żniwiarzu! + +[YD2_M] +~r~Rozwalił mój samochód! Załatwić go! + +[YD2_N] +~w~Posadź tyłek z powrotem w samochodzie! + +[YD3_A] +Masz porwać dla mnie kilka samochodów gangów tak, + +[YD3_A1] +abyśmy mogli uderzyć we wrogów na ich własnym terytorium. + +[YD3_B] +Potrzebuję mafijnego Sentinela, + +[YD3_B1] +Stingera Yakuzy oraz + +[YD3_B2] +Ogiera gangu Diablo. Wtedy będzie można uderzyć na każdego w Liberty. + +[YD3_C] +Zostaw je przy garażu w Newport, ale pamiętaj, + +[YD3_C1] +potrzebujemy tylko fury w dobrym stanie!!! + +[YD3_D] +Wolne miejsce na tekst + +[YD3_E] +~r~Już zdobyłeś samochód gangu Diablo! + +[YD3_F] +~r~Już zdobyłeś samochód mafii! + +[YD3_G] +~r~Już zdobyłeś samochód Yakuzy! + +[YD3_H] +~r~Zdobyłeś samochód gangu Diablo! + +[YD3_I] +~r~Zdobyłeś samochód mafii! + +[YD3_J] +~r~Zdobyłeś samochód Yakuzy! + +[YD3_K] +~r~Ten samochód to ruina! Musisz go naprawić! + +[YD3_L] +~g~Zabierz samochód do garażu! + +[YD3_M] +~r~Straciłeś wóz! Musisz zdobyć jeszcze jeden! + +[YD4_A] +Posłuchaj! + +[YD4_A1] +Jedź do Bedford Point. + +[YD4_A2] +W starym samochodzie jest coś, czego potrzebuję, pronto! + +[YD4_B] +LIST: Słyszałam, że ostatnio byłeś pilnym uczniem. Cóż, ja byłam pilną uczennicą. + +[YD4_C] +Czas, abyś poznał prawdziwą siłę HEROINY! Besos y fuderes, Catalina, xxx. + +[YD4_D] +PS. ZDYCHAJ KUNDLU! + +[YD4_1] +~g~Naćpani szaleńcy! + +[YD4_2] +~g~Zniszcz ciężarówki wariatów! + +[HM_1] +'AGRESYWNA JAZDA' + +[HM_2] +'ZABAWKOWY ZABÓJCA' + +[HM_3] +'ZDĄŻYĆ PRZED WYBUCHEM'v + +[HM_5] +'ROZRÓBA' + +[HOOD1_A] +Znajdź budkę telefoniczną w Wichita Gardens, to pogadamy o interesach. + +[HM1_A] +Yo! Z tej strony D-Ice z gangu Red Jacks! + +[HM1_C] +Te szczeniaki wyłażą na ulice i myślą tylko o tym, kogo by tu zastrzelić i co zaćpać. + +[HM1_3] +~g~'Dziewiątki' mają swoje terytorium w Wichita Gardens. + +[HM2_3] +Jeżeli uderzysz zdalnie sterowanym samochodzikiem w koła pojazdu, ładunek wybuchnie! + +[HM2_4] +Jeżeli samochodzik wyjedzie poza zasięg nadajnika, ładunek wybuchnie! + +[HM2_5] +~r~Samochodzik poza zasięgiem! + +[HM3_1] +~g~Zabierz samochód do warsztatu, ale uważaj! Jeżeli samochód zostanie mocno uszkodzony, ładunek może wybuchnąć! + +[HM3_2] +~g~Zwróć samochód właścicielowi. Jedź ostrożnie, wóz musi być w doskonałym stanie! + +[HM3_3] +~g~Napraw samochód! + +[HM4_D] +~g~Zdobądź samochód! + +[HM4_E] +TEKST NIEPOTRZEBNY + +[HM4_1] +~g~Jedź do miejsca, w któym rozsypał się ładunek. Musisz zebrać 30 sztabek. + +[HM4_2] +~g~Pamiętaj, kiedy samochód zrobi się ciężki, poturlaj się do garażu i wysyp ładunek. + +[HM5_3] +~r~Miałeś używać wyłącznie kija bejsbolowego! + +[HM5_4] +~r~Twój kontakt nie żyje! + +[MEA1] +'CWANIAK' + +[MEA2] +'ZŁODZIEJE' + +[MEA3] +'ŻONA' + +[MEA4] +'KOCHANEK' + +[MEAT1_A] +Znajomy powiedział mi, że potrafisz rozwiązywać problemy. Jeżeli chcesz zająć się moimi kłopotami, znajdź budkę telefoniczną w Trenton. + +[MEA1_B3] +~g~Spotkaj się z kierownikiem banku. + +[MEA1_B6] +~g~Zabierz samochód do zgniatarki, aby pozbyć się dowodów. Wysiądź z samochodu, a dźwig już się wszystkim zajmie. + +[MEA1_1] +~r~Kierownik banku nie żyje! + +[MEA1_2] +~r~Miałeś zniszczyć ten pojazd! + +[MEA1_3] +~g~Wysiądź z samochodu! + +[MEA1_4] +~r~Zgubiłeś kierownika banku! + +[MEA2_B3] +~g~Jedź po złodziei. + +[MEA2_B4] +~g~Zabierz ich do fabryki Delikatesów Pod Psem. + +[MEA2_B6] +~g~Przemaluj samochód, aby zatrzeć ślady. + +[MEA2_1] +~r~Miałeś zniszczyć ten pojazd! + +[MEA2_2] +~r~Złodziej nie żyje! + +[MEA2_4] +~r~Zgubiłeś jednego ze złodziei! + +[MEA3_B3] +~g~Jedź po panią Chonks. + +[MEA3_B6] +~g~Zabierz samochód i wrzuć go do wody, aby pozbyć się dowodów. + +[MEA3_1] +~r~Żona nie żyje! + +[MEA3_2] +~r~Miałeś wrzucić samochód do wody! + +[MEA3_3] +~r~Zgubiłeś żonę Marty'ego! + +[MEA4_B3] +~g~Zabierz kochanka żony. + +[MEA4_B6] +Na to już za późno, Marty. Miałeś szansę, ale teraz przejmuję twoją budę... + +[MEA4_1] +~r~Carlos nie żyje! + +[MEA4_3] +~r~Zgubiłeś Carlosa lichwiarza! + +[LOOK_A] +Naciśnij i przytrzymaj klawisz ~h~~k~~VEHICLE_LOOKLEFT~ ~w~lub klawisz ~h~~k~~VEHICLE_LOOKRIGHT~ ~w~, aby spojrzeć ~h~w lewo~w~ lub ~h~w prawo~w~ przez szyby pojadu. Naciśnij oba klawisze naraz, aby spojrzeć ~h~do tyłu~w~. + +[LOVE6_1] +~g~Teraz odciągnij gliniarzy od magazynu! + +[LOVE6_2] +~r~Nie udało ci się odciągnąć glin na wystarczającą odległość! + +[RM4_3] +~r~Kumpel Raya zwiał! + +[RM6_C] +Zdaje się, że CIA ma jakiś swój interes w utrzymaniu handlu PROCHAMI + +[RM6_C1] +i nie spodobało im się, że zadarliśmy z Kartelem. + +[C_PASS] +ZAGROŻENIE ZLIKWIDOWANE + +[CTUTOR] +Naciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~, aby włączyć lub wyłączyć misje patrolowe. + +[CTUTOR2] +Naciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~, aby włączyć lub wyłączyć misje patrolowe. + +[COPCART] +~g~Masz ~1~ sekund na powrót do radiowozu albo misja zakończy się. + +[C_FAIL] +Misja patrolowa zakończona! + +[C_CANC] +~r~Misja patrolowa anulowana! + +[C_ESCP] +~r~Podejrzany uciekł! + +[C_TIME] +~r~Twój czas w roli stróża prawa minął! + +[C_VIGIL] +PREMIA PATROLOWA!! + +[A_FAIL2] +~r~Twoje ślamazarność kosztowała pacjenta życie! + +[A_FAIL3] +~r~Pacjent nie żyje! + +[A_PASS] +Uratowany! + +[F_FAIL2] +~r~Spóźniłeś się! + +[A_COMP2] +Ty chyba nigdy się nie męczysz! + +[RM2_M] +Jak będziesz potrzebował spluwy, wpadaj do mnie jak w dym i bierz z szafek, co ci się podoba. + +[HEAL_A] +Twój ~h~poziom życia~w~ jest wyświetlony na pomarańczowo w prawym górnym narożniku ekranu. + +[YD1_CNT] +~1~ z 15! + +[FM1_9] +~g~Przed nami miejsce imprezy - wysadź Marię przed budynkiem. + +[FM1_Y] +~w~Wiesz, dawno się tak dobrze nie bawiłam, a ty traktowałeś mnie naprawdę dobrze. Z szacunkiem i w ogóle.. + +[FM1_AA] +~w~Chyba już pójdę. W takim razie - do zobaczenia! + +[NOCONTE] +Aby kontynuować, proszę ponownie umieścić wtyczki kontrolera analogowego (DUALSHOCK@) lub kontrolera analogowego (DUALSHOCK@2) w porcie kontrolerów gry nr 1. + +[WRCONT] +Kontroler w porcie nr 1 nie jest rozpoznany. Gra Grand Theft Auto III wymaga kontrolera analogowego (DUALSHOCK@) lub kontrolera analogowego (DUALSHOCK@2). + +[WRCONTE] +Kontroler w porcie nr 2 nie jest rozpoznany. Gra Grand Theft Auto III wymaga kontrolera analogowego (DUALSHOCK@) lub kontrolera analogowego (DUALSHOCK@2). + +[WRONGCD] +Niewłaściwa płyta. Proszę włożyć właściwą płytę. + +[NOCD] +Nie znaleziono GTAIII CD w czytniku. + +[OPENCD] +Taca napędu jest wysunięta. Wsuń tacę napędu CD-ROM. + +[CDERROR] +Błąd w odczycie płyty Grand Theft Auto III. + +[RESTART] +Trwa rozpoczynanie nowej gry + +[GA_3] +Koniec z promocjami. 1000 dolców za malowanie! + +[GA_1] +Coś ty! Nawet nie dotknę takiego trefnego towaru! + +[GA_1A] +Wróć, kiedy będziesz miał chwilę wolnego czasu... + +[S_PROM2] +Garaż znajdujący się za sąsiednimi drzwiami służy do przechowywania pojazdów podczas zapisywania stanu gry. + +[STOCK] +brak towaru + +[FM1_O] +~w~Myślę, że znajdziemy go nad brzegiem morza, w okolicach Chinatown. + +[EBAL_B] +To właśnie tu. Zjedźmy z ulicy i poszukajmy jakichś ciuchów, żeby zmienić te więzienne łachy! + +[EBAL_G] +To jest właśnie klub 'U Luigiego'. Obejdziemy tę budę i skorzystamy z tylnych drzwi. + +[AM4_3] +A więc to ty jesteś nowym chłopcem na posyłki Asuki? + +[AM4_4] +Masz forsę? Mam nadzieję, że wszystko jest jak trzeba? + +[AM4_5] +Wiem, co sobie myślisz, następny sprzedajny gliniarz. + +[AM4_6] +Cóż, każdy orze jak może. + +[AM4_7] +Straciłem ostatnio paru partnerów i ci frajerzy z wydziału wewnetrznego zaczęli coś przewąchiwać. + +[AM4_8] +Żeby tylko nie wyniuchali moich śladów. + +[AM4_9] +To miasto to jeden wielki otwarty ściek. + +[AM4_10] +Przyda mi się pomoc kogoś niezrzeszonego. + +[AM4_11] +Jeżeli masz jakiś interes, wiesz gdzie mnie znaleźć. + +[CAM_A] +Wciskaj klawisz ~h~~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~~w~, aby zmieniać tryby pracy ~h~kamery ~w~, zarówno w samochodzie jak i poza nim. + +[CAM_B] +Wciskaj klawisz ~h~strzałki w gorę~w~ oraz ~h~strzałki w dół~w~, aby zmieniać tryby pracy ~h~kamery ~w~, zarówno w pojeździe jak i poza nim. + +[KM2_1] +~g~Napraw samochód. Wóz musi być w idealnym stanie. + +[LM3_6] +Joey... + +[LM3_6A] +Znowu będę mogła się pobawić twoim drągiem? + +[LM3_9A] +może będę miał dla ciebie jakieś zajęcie. + +[LM3_9B] +W porządku? + +[AWAY2] +~r~Uciekli. + +[AWAY] +~r~Zwiał stąd, gdzie pieprz rośnie! + +[JM6_1] +Jedź do banku na głównej ulicy. + +[GA_6B] { re3 change } +Zaparkuj wóz, włącz mechanizm klawiszem ~h~~k~~VEHICLE_FIREWEAPON~~w~ i W NOGI! + +[GA_7B] { re3 change } +Uaktywnij bombę za pomocą klawisza ~h~~k~~VEHICLE_FIREWEAPON~~w~. Bomba wybuchnie w momencie włączenia silnika. + +[BAT1] +~g~Podnieś kij bejsbolowy! + +[EBAL_O] +Jeśli nic nie schrzanisz, może znajdzie się dla ciebie jakaś praca. A teraz zjeżdżaj! + +[HELP9_B] +Naciśnij klawisz~h~ ~k~~PED_FIREWEAPON~~w~, aby oddać ~h~strzał~w~ z karabinu snajperskiego. + +[HELP9_C] +Naciśnij klawisz~h~ ~k~~PED_FIREWEAPON~~w~, aby oddać ~h~strzał~w~ z karabinu snajperskiego. + +[JM6_8] +~r~Straciłeś wszystkich złodziei! + +[COLT_IN] +Ammu-nacja zaczyna sprzedaż pistoletów! + +[TAXI2] +~r~Koniec czasu! + +[TAXI3] +~r~Przerażony pasażer ucieka! + +[TAXI7] +~r~Twoja taksówka to ruina, połataj ją trochę. + +[TAXI4] +Kurs wykonany! + +[TAXI5] +PREMIA ZA SZYBKOŚĆ!!! + +[TAXI6] +Koniec misji w taksówce + +[FRANGO] +~g~Salvatore chce, abyś najpierw pomógł Toniemu załatwić porachunki z Triadami! + +[PAGEB12] +Łapówka policyjna dostarczona do kryjówki + +[PAGEB13] +Życie dostarczone do kryjówki + +[PAGEB14] +Adrenalina dostarczona do kryjówki + +[KM1_4] +~g~Do tej roboty przydałby się radiowóz! + +[CAT1_B] +przynieś 500.000 $ do Willi w Cedar Grove. + +[JM2_C] +Gość ma budę z makaronem w Chinatown. + +[RM6_1] +Tu masz klucz do dziupli. + +[RM6_2] +Znajdziesz tam trochę forsy i 'zapasów', które zbierałem na czarną godzinę. + +[RM6_3] +Trzymaj się. + +[FE_INIP] +Inicjalizacja i wczytywanie menu pauzy... Proszę czekać. + +[FESZ_CA] +Anuluj + +[FESZ_QU] +Wyjście + +[FESZ_L1] +Gra została pomyślnie zapisana. + +[FESZ_L2] +Gra została zapisana w pliku o nazwie: + +[FESZ_OK] +OK + +[FES_LGA] +Wczytaj grę + +[FES_NGA] +Nowa gra + +[FES_CAN] +Anuluj + +[FESZ_QL] +Wszelkie niezapisane osiągnięcia i zdobycze w trwającej grze zostaną utracone. Wczytać grę? + +[FESZ_QD] +Czy skasować ten zapis gry? + +[FESZ_QO] +Czy nadpisać tę grę na starszym pliku? + +[FESZ_QR] +Czy jesteś pewien, że chcesz rozpocząć nową grę? Wszelkie osiągnięcia i postępy poczynione od momentu ostatniego zapisu gry zostaną utracone. Kontynuować? + +[FESZ_QS] +KONTYNUOWAĆ ZAPIS? + +[T4X4_1] +'PLAC ZABAW PATRIOTÓW' + +[T4X4_2] +'PRZEJAŻDŻKA W PARKU' + +[T4X4_3] +'W POTRZASKU!' + +[MM_1] +'KOSZMAR WIELU PIĘTER' + +[T4X4_1A] +~g~Masz ~y~5 minut~g~ na zaliczenie ~y~15~g~ punktów kontrolnych. ~g~Możesz zaliczać je w ~y~DOWOLNEJ KOLEJNOŚCI. + +[T4X4_1B] +~1~ z 15! + +[T4X4_1C] +~y~PRZEJEDŹ PRZEZ~g~ pierwszy punkt kontrolny, aby uruchomić odliczanie czasu. ~g~Zaliczenie każdego punktu jest premiowane dodatkowymi ~y~20 SEKUNDAMI~g~ + +[T4X4_2A] +~g~Masz ~y~2 minuty~g~ na zaliczenie ~y~12~g~ punktów kontrolnych. ~g~Możesz zaliczać je w ~y~DOWOLNEJ KOLEJNOŚCI. + +[T4X4_2B] +~1~ z 12! + +[T4X4_2C] +~y~PRZEJEDŹ PRZEZ~g~ pierwszy punkt kontrolny, aby uruchomić odliczanie czasu. ~g~Zaliczenie każdego punktu jest premiowane dodatkowymi ~y~10 SEKUNDAMI~g~ + +[T4X4_3A] +~g~Masz ~y~5 minut~g~ na zaliczenie ~y~20~g~ punktów kontrolnych. ~g~Możesz zaliczać je w ~y~DOWOLNEJ KOLEJNOŚCI. + +[T4X4_3B] +~y~PRZEJEDŹ PRZEZ~g~ pierwszy punkt kontrolny, aby uruchomić odliczanie czasu. ~g~Zaliczenie każdego punktu jest premiowane dodatkowymi ~y~15 SEKUNDAMI~g~ + +[T4X4_3C] +~1~ z 20! + +[T4X4_F] +~r~Wymiękasz! Może lepiej sprawdzisz się w wyścigach na hulajnodze?! + +[MM_1_A] +~g~Masz ~y~2 minuty~g~ na zaliczenie ~y~20 punktów kontrolnych~g~ w całym obiekcie! ~g~Możesz zaliczać punkty w ~y~DOWOLNEJ KOLEJNOŚCI. + +[MM_1_B] +~1~ z 20! + +[MM_1_C] +~g~To oznacza 20 sekund plus ~y~5 SEKUND~g~ premii za każdy zaliczony punkt. ~g~Zegar zaczyna odliczanie ~y~NATYCHMIAST. + +[FM2_14] +~r~Zbliżyłeś się za bardzo i wystraszyłeś Kudłatego! + +[FM2_15] +~g~Nie zbliżaj się zbytnio, bo Kudłaty zacznie coś podejrzewać! + +[UPSIDE] +~r~Przewróciłeś samochód! + +[FM2_16] +STRACHOMETR: + +[LM3_11] +~g~Misty nie będzie jeździć autobusem, załatw inny pojazd! + +[LANDSTK] +Landstalker + +[IDAHO] +Idaho + +[STINGER] +Stinger + +[LINERUN] +Linerunner + +[PEREN] +Perennial + +[SENTINL] +Sentinel + +[PATRIOT] +Patriot + +[FIRETRK] +Wóz strażacki + +[TRASHM] +Śmieciożer + +[STRETCH] +Stretch + +[MANANA] +Manana + +[INFERNS] +Infernus + +[BLISTA] +Blista + +[PONY] +Pony + +[MULE] +Muł + +[CHEETAH] +Cheetah + +[AMBULAN] +Karetka pogotowia + +[FBICAR] +Samochód FBI: + +[MOONBM] +Moonbeam + +[ESPERAN] +Esperanto + +[TAXI] +Taksówka + +[KURUMA] +KURUMA + +[BOBCAT] +Bobcat + +[WHOOPEE] +Pan Smakołyk + +[BFINJC] +Zastrzyk BF + +[POLICAR] +Policja + +[ENFORCR] +Enforcer + +[SECURI] +Konwojowóz + +[BANSHEE] +Demon + +[PREDATR] +Predator + +[BUS] +Autobus + +[RHINO] +Hipcio + +[BARRCKS] +Koszary OL + +[TRAIN] +Pociąg + +[HELI] +Helikopter + +[DODO] +Dodo + +[COACH] +Autokar + +[CABBIE] +Taksówka + +[STALION] +Ogier + +[RUMPO] +Rumpo + +[RCBANDT] +Bandziorek + +[BELLYUP] +Ciężarówka Triady + +[MRWONGS] +Mr Wongs + +[MAFIACR] +Sentinel mafii + +[YARDICR] +Lobo gangu Yardie + +[YAKUZCR] +Stinger gangu Yakuza + +[DIABLCR] +Ogier gangu Diablo + +[COLOMCR] +Krążownik Kartelu + +[HOODSCR] +Rumpo XL gangu Hoods + +[AEROPL] +Samolot + +[SPEEDER] +Speeder + +[REEFER] +Reefer + +[PANLANT] +Panlantic + +[FLATBED] +Flatbed + +[YANKEE] +Yankee + +[BORGNIN] +Borgnine + +[TOYZ] +ZABAWKI + +[FEST_DF] +Odległość przebyta pieszo (w milach) + +[FEST_DC] +Odległość przebyta samochodem (w milach) + +[FESTDFM] +Odległość przebyta pieszo (w metrach) + +[FESTDCM] +Odległość przebyta samochodem (w metrach) + +[FEST_R1] +Plac Zabaw Patriotów w sekundach + +[FEST_R2] +Przejażdżka w parku w sekundach + +[FEST_R3] +W Potrzasku! w sekundach + +[FEST_RM] +Koszmar Wielu Pięter w sekundach + +[FEST_LS] +Ludzie uratowani przez karetkę + +[FEST_CC] +Przestępcy zabici podczas misji patrolowych + +[FEST_FE] +Liczba ugaszonych pożarów + +[FEST_LF] +Najdłuższy lot dodo + +[FEST_BD] +Najlepszy czas rozbrojenia bomby + +[FEST_RP] +Wykonane rozwałki: + +[FEST_MP] +Wykonane misje + +[FEST_BB] +Szukaj Punktów + +[FEST_H0] +Najwięcej punktów kontrolnych + +[FEST_GC] +Łączna liczba pojazdów gangów: + +[FEST_H1] +Diabelska demolka + +[FEST_H2] +Mafijna masakra + +[FEST_H3] +Krwawe kasyno + +[FEST_H4] +Rumpo-rozróba + +[USJI1] +TEKST DŁUŻEJ NIEPOTRZEBNY + +[USJI2] +TEKST DŁUŻEJ NIEPOTRZEBNY + +[USJI3] +TEKST DŁUŻEJ NIEPOTRZEBNY + +[USJ] +PREMIA ZA NIETYPOWY SKOK! + +[SPRAY] +Wprowadź samochód do warsztatu lakierniczego, aby obniżyć swój ~h~poziom złek sławy~w~, ~h~naprawić~h~ oraz przemalować~w~ swój wóz. Koszt - ~h~$1000. + +[HM1_1] +~g~Załatw 20 Purpurowych Dziewiątek w 2 minuty 30 sekund. + +[KM1_8A] { re3 change } +Naciśnij klawisz ~h~ ~k~~VEHICLE_FIREWEAPON~ ~w~, aby ~h~aktywować bombę.~w~ Nie zapomnij oddalić się od miejsca eksplozji. + +[KM1_8D] { re3 change } +Naciśnij klawisz ~h~ ~k~~VEHICLE_FIREWEAPON~ ~w~, aby ~h~aktywować bombę.~w~ Nie zapomnij oddalić się od miejsca eksplozji. + +[KM1_12] +~g~Odwieź go do dojo, ale najpierw pozbądź się gliniarzy! + +[RATNG1] +Kieszonkowiec + +[RATNG2] +Mięśniak + +[RATNG3] +Łotr + +[RATNG4] +Hazardzista + +[RATNG5] +Zbir + +[RATNG6] +Kierowca + +[RATNG7] +Twardziel do wynajęcia + +[RATNG8] +Oszust + +[RATNG9] +Współpracownik + +[RATNG10] +Sprzątacz + +[RATNG11] +Zabójca + +[RATNG12] +Złota rączka + +[RATNG13] +Egzekutor + +[RATNG14] +Capo + +[RATNG15] +Szef + +[1010] +~r~Twój pojazd dachował + +[1011] +~r~Twój pojazd dachował + +[1012] +~r~Twój pojazd dachował + +[1013] +~r~Twój pojazd dachował + +[1014] +~r~Twój pojazd dachował + +[JM4_10] +Słuchaj, młody! Najpierw zawieź mnie do pralni w chińskiej dzielnicy. Mam małą sprawę do załatwienia. + +[JM4_11] +Praczki przestały płacić haracz za ochronę. + +[JM4_12] +Tylko uważaj na wóz, Joey dopiero poskładał ten szmelc. + +[JM4_13] +Więc bez żadnych numerów, OK? + +[KM4_11] +~g~Odwieź pieniądze do kasyna! + +[FEF_BR2] +Możesz przypomnieć sobie fabułę gry, czytając zebrane dotąd streszczenia celów misji. + +[TRAIN_1] +Stacja Kurowski + +[TRAIN_2] +Stacja Rothwell + +[TRAIN_3] +Stacja Baillie + +[SUBWAY1] +Portland Station + +[SUBWAY2] +Rockford Station + +[SUBWAY3] +Staunton South Station + +[SUBWAY4] +Shoreside Terminal + +[MEA4_2] +~r~Marty Chonks nie żyje! + +[SPRAY1] +Wprowadź samochód do warsztatu lakierniczego, aby obniżyć swój ~h~poziom złej sławy~w~, ~h~naprawić~h~ oraz przemalować~w~ swój wóz. Koszt - ~h~$1000~w~. Tym razem zrobimy to za darmo. + +[JM4_A] +Tak, wiem Toni, naprawdę nieźle ją sobie wychowałem. Aż mruczy z zadowolenia, kapujesz? + +[JM4_5] +Wpadnij później to damy im coś do prania - ich własne pokrwawione gacie! + +[AMMU_A] +Luigi mówił, że potrzebujesz gnata... + +[AMMU_B] +Joey wspominał, że potrzebna ci artyleria... + +[AMMU_C] +Idź na tył sklepu. Na podwórzu zostawiłem dla ciebie dziewiątkę. + +[AMMU_D] +Mam wszystko, co potrzeba do obrony własnego gospodarstwa domowego. + +[AMMU_E] +Chcesz jeszcze pozwolenie? + +[AMMU_F] +Nie musisz pokazywać dowodu, wyglądasz na wiarygodnego gościa. + +[DETON] +DETONACJA: + +[DRIVE_A] { re3 change } +Wybierz jako broń uzi i wsiądź do pojazdu. Następnie spójrz w lewo lub w prawo - aby otworzyć ogień, naciśnij klawisz ~h~~k~~VEHICLE_FIREWEAPON~~w~. + +[DRIVE_B] { re3 change } +Wybierz jako broń uzi i wsiądź do pojazdu. Następnie spójrz w lewo lub w prawo - aby otworzyć ogień, naciśnij klawisz ~h~~k~~VEHICLE_FIREWEAPON~~w~. + +[RECORD] +~g~NOWY REKORD! + +[NRECORD] +~r~NIE MA NOWEGO REKORDU! + +[RCHELP] { re3 change } +Naciśnij klawisz ~k~~VEHICLE_FIREWEAPON~ lub uderz zdalnie sterowanym samochodzikiem w koła pojazdu, aby spowodować eksplozję. + +[RCHELPA] { re3 change } +Naciśnij klawisz ~k~~VEHICLE_FIREWEAPON~ lub uderz zdalnie sterowanym samochodzikiem w koła pojazdu, aby spowodować eksplozję. + +[RC_1] +Masz 2 minuty, aby wysadzić tyle samochodów gangu Diablo, ile tylko się da! + +[RC_2] +Masz 2 minuty, aby wysadzić tyle samochodów mafii, ile tylko się da! + +[RC_3] +Masz 2 minuty, aby wysadzić tyle samochodów Yakuzy, ile tylko się da! + +[RC_4] +Masz 2 minuty, aby wysadzić tyle samochodów gangu Yardie, ile tylko się da! + +[RC_5] +Masz 2 minuty, aby wysadzić tyle samochodów gangu Hoods, ile tylko się da! + +[RC_6] +Masz 2 minuty, aby wysadzić tyle samochodów Kartelu, ile tylko się da! + +[RAMPAGE] +ROZWAŁKA!! + +[RAMP_P] +ROZWAŁKA WYKONANA! + +[RAMP_F] +ROZWAŁKA NIEUDANA! + +[PAGE_00] +. + +[PAGE_01] +Załatw ~1~ludzi z gangu Diablo w 120 sekund! + +[PAGE_02] +Zniszcz ~1~ pojazdów w ciągu 120 sekund! + +[PAGE_03] +Zabij ~1~ członków mafii w ciągu 120 sekund! + +[PAGE_04] +Zabij ~1~ członków Triady w ciągu 120 sekund! + +[PAGE_05] +Zabij ~1~ członków Triady w ciągu 120 sekund! + +[PAGE_06] +Zniszcz ~1~ pojazdów w ciągu 120 sekund! + +[PAGE_07] +Rozwal ~1~ łebków z gangu Yardie w ciągu 120 sekund! + +[PAGE_08] +Spal ~1~ członków Yakuzy w ciągu 120 sekund! + +[PAGE_09] +Zniszcz ~1~ pojazdów w ciągu 120 sekund! + +[PAGE_10] +Zniszcz ~1~ pojazdów w ciągu 120 sekund! + +[PAGE_11] +Skasuj ~1~ członków gangu Yardie w ciągu 120 sekund! + +[PAGE_12] +Podpal ~1~ członków Yakuzy w ciągu 120 sekund! + +[PAGE_13] +Wysadź w powietrze ~1~ członków gangu Yardie w ciągu 120 sekund! + +[PAGE_14] +Usmaż ~1~ Kolumbijczyków w ciągu 120 sekund. + +[PAGE_15] +Rozjedź ~1~ członków gangu Hoods w ciągu 120 sekund! + +[PAGE_16] +Zniszcz ~1~ pojazdów w ciągu 120 sekund! + +[PAGE_17] +Rozjedź samochodem ~1~ Kolumbijczyków w ciągu 120 sekund! + +[PAGE_18] +Rozjedź i zniszcz ~1~ pojazdów w ciągu 120 sekund! + +[PAGE_19] +Urwij ~1~ głów Kolumbijczyków w ciągu 120 sekund! + +[PAGE_20] +Obetnij głowy ~1~ członkom gangu Hoods w ciągu 120 sekund! + +[JM1_A] +Hej, umieram z nudów! Kiedy w końcu mnie przelecisz? + +[JM1_B] +Za chwileczkę, złotko! Muszę się zająć jedną drobną kwestią... + +[JM1_C] +Mam dla ciebie robótkę, kolego. + +[JM1_D] +Bracia Forelli od dawna wiszą mi kasę. Od zbyt dawna. + +[JM1_E] +Trzeba dać im lekcję szacunku. + +[JM1_F] +Buźka Forelli napycha właśnie swój bęben w Bistro w St. Marks, + +[JM1_G] +więc ukradnij jego samochód i zabierz go do warsztatu 8-Balla w Harwood. + +[JM1_H] +Znasz 8-Balla, nie? + +[JM1_I] +Kiedy 8-Ball założy w samochodzie ładunek, odprowadź furę na to samo miejsce, z którego ją wziąłeś. + +[JM1_J] +Potem usiądź w bezpiecznej odległości i podziwiaj fajerwerki. + +[JM1_K] +Tylko się pospiesz, grubas nie będzie przecież jadł cały dzień. + +[CAT2_A1] +Jazda, głupia dziwko! + +[CAT2_A] +Trzeba zadać sobie pytanie: czy przyjechałeś ratować Marię czy też żeby spotkać się ze mną? + +[CAT2_B] +Mam dla ciebie wiadomość: + +[CAT2_B2] +romans z tobą to był wyłącznie interes, za to zastrzelę cię dla przyjemności. + +[CAT2_C] +Jesteś muy peccino amigo! + +[CAT2_D] +Rzuć forsę. + +[CAT2_E] +Ostatnio byłeś bardzo pilnym uczniem! + +[CAT2_E2] +Ale nic się nie nauczyłeś. Mnie nie wolno ufać. + +[CAT2_E3] +Zabić tego idiotę. + +[CAT2_J] +Poderwij ten złom w powietrze! + +[HM5_1] +Yo, Ice mówił, że przyjdziesz. Teraz zasady: bierzemy tylko bejsbole - bez spluw i bez samochodów. + +[HM5_5] +To bitwa o honor, czaisz? + +[HELP14] +Aby podnieść broń, po prostu wejdź na nią. Nie możesz podnieść broni, jeżeli siedzisz w samochodzie. + +[CRUSH] +Zaparkuj w oznaczonym miejscu i wysiądź z pojazdu. Samochód zostanie zgnieciony. + +[DIAB2_B] +Gang brzydkich panów zagroził, że pozbawi mnie mojego gwiazdora, jeżeli nie odpalę im doli. + +[DIAB2_C] +Zatańczyli z niewłaściwym człowiekiem, amigo. + +[DIAB2_D] +Oni mają słabość do lodów. + +[DIAB2_E] +Odszukaj bombę, którą zostawiłem w Harwood, + +[DIAB2_F] +porwij jeden z samochodów sprzedających lody w całym mieście, + +[DIAB2_G] +a potem zwab tych idiotów reklamowym sygnałem lodziarza. + +[DIAB2_H] +Ukrywają się w magazynach przy Atlantic Quay. + +[DIAB3_A] +Jacyś niegrzeczni członkowie Triady ukradli wczoraj w nocy mój samochód, + +[DIAB3_B] +rozbili go i zostawili, aby się dopalił. + +[DIAB3_C] +W bagażniku miałem kilka wyjątkowo cennych pamiątek - + +[DIAB3_D] +prawdziwe rzadkie okazy, których nie da się niczym zastąpić, mój przyjacielu. + +[DIAB3_E] +Na granicy Chinatown ukryłem dla ciebie naprawdę potężną broń. + +[DIAB3_F] +Skorzystaj z niej i naucz wandali z Triady, co oznacza zasłużony gniew El Burro. + +[DIAB3_1] +ZABIJ 25 CZŁONKÓW TRIADY + +[DIAB4_A] +Jakiś marny złodziejaszek ukradł mi półciężarówkę z najnowszym wydaniem moich magazynów... Prosto z drukarni! + +[DIAB4_B] +Ale ten zaćpany idiota nie zamknął tylnych drzwi + +[DIAB4_C] +i teraz moja starannie opracowana literatura dla dorosłych, + +[DIAB4_D] +opatrzona wysmakowanymi zdjęciami, wala się po całym Liberty! + +[DIAB4_E] +Weź półciężarówkę i jedź śladem magazynów 'Donkey Daje Całemu Dallas' część 1, 2 i 3. + +[DIAB4_F] +Zbieraj wszystko, co znajdziesz. + +[DIAB4_G] +Kiedy dotrzesz po tropie do tego złodziejskiego ĆPUNA, załatw go! + +[DIAB4_H] +A potem zawieź moje książeczki z Donkey do Magazynów XXX w Dzielnicy Czerwonych Świateł. + +[DIAB4_1] +~g~Zabierz samochód na zaplecze Magazynów XXX. + +[HM1_E] +Pokaż tym zaćpanym siuśkom, na czym polega prawdziwa jazda samochodem. + +[HM1_H] +Usuń mi te 'Dziewiątki' z widoku! + +[HM2_A] +Te 'Dziewiątki' nadal nadeptują mi na odcisk. + +[HM2_B] +Szczeniaki załatwiły sobie samochody opancerzone i sprzedają PROCHY... + +[HM2_C] +...naszym niewinnym czarnym braciom. + +[HM2_D] +Zostawiłem dla ciebie samochód. + +[HM2_E] +W środku znajdziesz parę zabawek, które pomogą ci dać siuśkom nauczkę... + +[HM3_A] +Jakiś samobójca wsadził bombę do mojej gabloty. + +[HM3_B] +Jeżeli stracę tę furę, mogę pożegnać się z moją reputacją na ulicach. + +[HM3_C] +Weź mój wóz i zabierz go do warsztatu w St. Marks, brachu. + +[HM3_D] +Niech chłopaki się nim zajmą i rozbroją bombę. + +[HM3_E] +Zegar już odlicza czas, a bomba chyba jest uszkodzona. + +[HM3_F] +Wpadniesz w jedną dziurę za dużo i to cacko wyleci w powietrze. + +[HM3_G] +Na co jeszcze czekasz? + +[HM4_A] +Yo, na lotnisku im. Francisa właśnie roztrzaskał się samolot Banku Narodowego. + +[HM4_B] +Platyna wala się po całym pasie startowym. + +[HM4_C] +Załatw samochód i zgarnij tyle, ile tylko się da. + +[HM4_F] +Możesz wysypać platynę przy jednym z moich garaży. + +[HM4_G] +Platyna jest cholernie ciężka, więc nie zdziw się, kiedy przeciążysz gablotę i fura będzie się wlokła jak ślimak. + +[HM4_H] +Lepiej regularnie zrzucaj towar przy jakimś garażu. + +[HM5_A] +Z gangu 'Dziewiątek' zostały już tylko niedobitki... + +[HM5_B] +ale nadal chcą się pobawić. + +[HM5_C] +Zgodzili się na pojedynek twarzą w twarz. + +[HM5_D] +Ich banda przeciwko dwóm spośród nas, a raczej... + +[HM5_E] +przeciwko tobie i jeszcze komuś + +[HM5_F] +Poszedłbym z tobą, ale... + +[HM5_G] +jeszcze przez trzy miesiące mam wyrok w zawieszeniu i nie mogę rozrabiać, + +[HM5_H] +sam rozumiesz. + +[HM5_I] +Weźmiesz ze sobą mojego młodszego brata. + +[HM5_J] +On ci pokaże, gdzie jesteście umówieni. + +[MEA1_B] +Nazywam się Chonks, Marty Chonks. + +[MEA1_C] +Prowadzę Delikatesy Pod Psem, tuż za rogiem. + +[MEA1_D] +Mam kłopoty z kasą, ale kto ich dzisiaj nie ma? + +[MEA1_E] +Jestem umówiony z kierownikiem mojego banku. + +[MEA1_F] +Ten cwaniaczek cały czas podnosi odsetki mojego kredytu, żeby móc odkroić swoją działkę. + +[MEA1_G] +Weź mój samochód, jedź po niego i przywieź go tutaj. + +[MEA1_H] +Mam małą niespodziankę dla tego krwiopijcy!! + +[MEA2_A] +Wynająłem paru złodziejaszków, aby włamali się do mojego mieszkania + +[MEA2_C] +Te złodziejskie szumowiny grożą, że zakapują mnie w firmie ubezpieczeniowej, + +[MEA2_D] +jeżeli nie odpalę im doli. + +[MEA2_E] +To się po prostu w głowie nie mieści! + +[MEA2_F] +W fabryce zostawiłem samochód. + +[MEA2_G] +Skorzystaj z niego i zabierz złodziei z Dzielnicy Czerwonych Świateł. + +[MEA2_H] +Potem przywieź ich do fabryki. Tam wytłumaczę im mój punkt widzenia w tej sprawie. + +[MEA3_A] +Mój interes zbankrutuje, jeżeli szybko nie dostanę do rąk większej gotówki. + +[MEA3_B] +Moja żona ma sporą polisę ubezpieczeniową, a i tak przez całe życie tylko wyciągała ode mnie pieniądze. + +[MEA3_C] +Zostawiłem samochód w umówionym miejscu. + +[MEA3_D] +Jedź po moją żonę do pawilonu 'Klasyczny Manicure' i przywieź ją do fabryki. + +[MEA4_A] +Cholera, wpakowałem się w tarapaty! + +[MEA4_B] +Okazuje się, że moja żona romansowała z gościem, któremu wiszę pieniądze. + +[MEA4_C] +Jest mocno wkurzony i chce mi się zrewanżować! + +[MEA4_E] +on myśli, że chcę oddać mu kasę... + +[MEA4_F] +ale mnie się zdaje... + +[MEA4_G] +że do misek psów z Liberty jeszcze w tym miesiącu trafi kolejny rodzaj mięska! + +[WELCOME] +WITAMY W + +[HM1_2] +~g~Zdobądź samochód! Pamiętaj, że liczą się tylko kolesie rozjechani samochodem! + +[HELP8_B] +Naciśnij klawisz~h~ ~k~~PED_SNIPER_ZOOM_IN~~w~, aby ~h~przybliżyć ~w~widok przez lunetkę karabinu oraz klawisz~h~ ~k~~PED_SNIPER_ZOOM_OUT~~w~, aby ~h~oddalić~w~ widok. + +[LRQC_1] +Muszę, hm, porozmawiać z Asuką. + +[LRQC_2] +Może wyskoczysz na spacer po mieście? + +[LRQC_3] +Musisz znaleźć sobie jakąś kryjówkę. + +[LRQC_4] +W Belville jest magazyn, który powinien ci odpowiadać. + +[LRQC_5] +Kiedy będziesz gotowy, wróć do mojego apartamentu, + +[LRQC_6] +to pogadamy, co robić dalej. + +[JM6_5] +~g~Musisz załatwić pojazd, którym uciekniemy, idioto! + +[JM2_F] +Jeżeli potrzebujesz giwery, to idź na zaplecze Amu-Nacji naprzeciwko stacji metra. + +[LOVE4_7] +~g~Na Wyspie Staunton jest jakiś plac budowy, może to właśnie tam zabrali pakunek. + +[LOVE4_8] +~g~Aby otworzyć ten garaż, musisz mieć samochód. + +[TSCORE] +ZAROBEK: $~1~ + +[AM1_9] +~r~Salvatore uciekł z powrotem do klubu 'U Luigiego'! + +[AM1_6] +~g~Jeżeli będziesz kręcił się wokół klubu Luigiego, to mafia z pewnością cię wypatrzy! + +[TM2_3] +~g~To pułapka! Załatw ich!!! + +[FM4_1] +Tu mówi Maria. Ten samochód to pułapka! Spotkaj się ze mną na południowym końcu Mostu Callahan. + +[JM1_7] +~g~Zamknij drzwi samochodu! Mike może coś zwąchać! + +[KM5_1] +~g~DILER ROZJECHANY!!! + +[KM5_6] +~g~Musisz zamordować co najmniej 8 dilerów z gangu Yardie. + +[KM5_7] +~g~Zabijaj jak najszybciej! Kiedy sprzedadzą cały towar, pochowają się w swoich norach! + +[RM3_8] +~r~Ten samochód to tylko przynęta!! + +[LM3_8] +Cześć, jestem Joey. + +[LM3_9] +Luigi mówił, że można ci ufać, więc wpadnij później, + +[KM3_5] +~g~Naciśnij klakson, aby zacząć rozmowy. + +[LOVE7] +ZNIKNIĘCIE LOVE'A + +[LOVE2_5] +~g~Z Kenji'ego została już tylko kupa mięsa na twoje masce! Uciekaj z Newport i pozbądź się samochodu! + +[AS2_11] +~g~~1~ Z 9! + +[GARAGE1] +~g~Wysiądź z samochodu i wyjdź na zewnątrz. + +[KM3_11] +~g~Kartel został zaatakowany, a teczka nie została odzyskana. + +[KM3_12] +~g~Zabij wszystkich Kolumbijczyków, zniszcz pojazdy i odzyskaj teczkę. + +[KM3_13] +~g~Odwieź teczkę do kasyna. + +[RM5_6] +~g~Prawie go masz! Staranuj jego wóz swoim pojazdem albo rozwal materiałami wybuchowymi! + +[PBOAT_1] { re3 change } +Naciśnij klawisz ~h~~k~~VEHICLE_FIREWEAPON~~w~, aby otworzyć ogień z działek na łodzi. + +[PBOAT_2] { re3 change } +Naciśnij klawisz ~h~~k~~VEHICLE_FIREWEAPON~~w~, aby otworzyć ogień z działek na łodzi. + +[DIAB1_B] +Mówi El Burro z gangu Diablo. + +[DIAB1_D] +Jesteś nowy w Liberty, ale na ulicach już zaczyna być o tobie głośno. + +[DIAB1_E] +Organizuję dla rozrywki mały wyścig. Punkt startu znajduje się przy starej szkole w okolicach Mostu Callahan. + +[DIAB1_F] +Skołuj sobie gablotę. Wygrywa ten, kto pierwszy zaliczy wszystkie punkty na trasie. + +[HM2_1] { re3 change } +Użyj zdalnie sterowanych samochodzików, aby zniszczyć samochody opancerzone. Naciśnij klawisz ~h~~k~~VEHICLE_FIREWEAPON~~w~, aby zdetonować ładunek. + +[HM2_1A] { re3 change } +Użyj zdalnie sterowanych samochodzików, aby zniszczyć samochody opancerzone. Naciśnij klawisz ~h~~k~~VEHICLE_FIREWEAPON~~w~, aby zdetonować ładunek. + +[HM2_2] +~r~Nie udało ci się zniszczyć wszystkich samochodów opancerzonych! + +[HM2_6] +~g~Samochód opancerzony został zniszczony! + +[RM3_A] +Znam w tym mieście jednego bardzo ważnego faceta, prawdziwą grubą rybę, + +[RM3_H] +który słynie ze swych, jak to ująć, nietypowych upodobań i wielkiej fortuny, jaką na nie wydaje. + +[RM3_B] +Uwikłał się w proces sądowy, a prokuratura zdobyła kompromitujące go fotografie. + +[RM3_C] +Zrobili je na imprezie w kostnicy czy coś takiego. + +[LOVE6_A] +Przyjacielu, przyjmij ode mnie lekcję prowadzenia interesów. + +[LOVE6_E] +Jeżeli posiadasz przedmiot jedyny w swoim rodzaju, to dokładnie wszyscy, nawet ze swoimi żonami, będą się ze wszystkich sił starać ci go odebrać, + +[LOVE6_C] +Oddziały antyterrorystyczne otoczyły obszar, na którym znajduje się mój współpracownik wraz z pakunkiem. + +[LOVE6_D] +Jedź tam i weź ciężarówkę. Posłużysz jako przynęta. + +[LOVE6_F] +Odciągnij ich uwagę tak, aby mój przyjaciel mógł spokojnie opuścić to miejsce. + +[AM3_C] +Teraz najprawdopodobniej czyha na zatoce! Ukradnij łódź policyjną i raz na zawsze zakończ jego karierę! + +[FESZ_UC] +ANULUJ + +[FEDS_SM] +L1, R1 - ZMIANA MENU + +[FEDS_AS] +;= - ZMIANA WYBORU + +[FEDSAS2] +<> - ZMIANA WYBORU + +[FEDS_SS] +L1, R1 - ZMIANA WYBORU + +[FEDSSC1] +; - SZYBSZE PRZEWIJANIE + +[FEDSSC2] +Err:509 + +[MEA2_3] +~g~Odwieź samochód do fabryki. + +[RM1_3] +~r~McAffrey zwiał! + +[RM1_4] +~g~Zużyłeś wszystkie granaty! Wróć po nowy zapas do Amu-Nacji! + +[RM1_5] +~g~Wracaj i podpal ten dom! + +[RM6_4] +~g~Jedź do dziupli i zabierz rzeczy Raya. + +[RM6_5] +~g~CIA nieustannie obserwuje most, znajdź inną trasę. + +[HM2_F] +i sprzątnąć ich pancerny złom. + +[HM_4] +'W POGONI ZA KASĄ' + +[MEA2_B5] +TEKST JUŻ NIEPOTRZEBNY + +[MEA1_B5] +TEKST JUŻ NIEPOTRZEBNY + +[MEA3_B5] +TEKST JUŻ NIEPOTRZEBNY + +[MEA4_B7] +ale jeżeli zechcesz wpaść do mojego biura... + +[MEA3_B4] +Marty chce się ze mną widzieć? Lepiej niech się streszcza, bo muszę jeszcze zrobić sobie dzisiaj nową fryzurę. + +[KM3_7] +Ludzie, to pułapka Yakuzy! + +[FES_LOF] +Wczytywanie nieudane. + +[FES_SLO] +ZAPISZ PLIK + +[FES_ISC] +USZKODZONY + +[FESZ_TI] +ZAPISZ Z1 + +[FESZ_SA] +Zapis gry + +[MC_LDFL] +Wczytywanie nieudane! + +[MC_NWRE] +Trwa ponowne uruchamianie gry. + +[LOVE6_3] +~g~Masz ~1~ sekund na powrót do konwojowozu albo misja zakończy się porażką. + +[LOVE6_4] +~r~Straciłeś fałszywy konwojowóz! + +[HELP1] +Zatrzymaj się wewnątrz niebieskiego pola. + +[HELP12] +Stań na niebieskim polu, aby rozpocząć misję. + +[HJSTAT] +Odległość: ~1~,~1~m Wysokość:~1~,~1~m Salta: ~1~ Obroty: ~1~_ + +[HJSTATW] +Odległość: ~1~.~1~m Wysokość: ~1~.~1~m Salta: ~1~ Obroty: ~1~_ Plus doskonałe lądowanie! + +[DIAB1_5] +CZAS WYŚCIGU: + +[LOVE3_4] +~r~Zniszczyłeś samolot! + +[F_FAIL1] +Misja strażacka zakończona. + +[F_CANC] +~r~Misja strażacka anulowana! + +[F_EXTIN] +POŻARY: + +[A_COMP1] +Misja ratunkowa wykonana! + +[A_CANC] +~R~Misja ratunkowa anulowana! + +[A_COMP3] +Misja ratunkowa wykonana! Ty chyba nigdy się nie męczysz! + +[ATUTOR] +Wciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~~w~, aby włączyć lub wyłączyć misje ratunkowe. + +[ATUTOR3] +Wciśnij klawisz ~h~~k~~TOGGLE_SUBMISSIONS~~w~, aby włączyć lub wyłączyć misje ratunkowe. + +[ALEVEL] +Misja Ratunkowa, Poziom ~1~ + +[A_FAIL1] +Misja ratunkowa zakończona. + +[FEST_HA] +Najwyższy poziom misji ratunkowej + +[A_SAVES] +URATOWANI LUDZIE:~1~ + +[C_KILLS] +ZABICI PRZESTĘPCY: ~1~ + +[HM1_B] +Mam problem z paroma frajerami. + +[AM2_A] +Śmierć Salvatore to radosna wiadomość, + +[AM2_A2] +widać, że jesteś dobrym zabójcą. Lubię tę cechę u ludzi. + +[AM2_B] +To mój brat Kenji. + +[AM2_C] +Asuka ma dla ciebie małą robótkę. Kiedy skończysz, wpadnij do mojego kasyna, to pogadamy. + +[AM2_D] +Zupełnie jak Kenji, on też zawsze chce bawić się moimi zabawkami. + +[AM2_E] +Moja wtyczka w policji donosi, że Mafia obserwuje nasze lokale w całym mieście. + +[AM2_E2] +Prawdopodobnie usiłują cię wytropić. + +[AM2_F] +Dopóki nie załatwimy tej sprawy, nie możemy prowadzić zwykłej działalności. + +[AM2_G] +Załatw tych głupawych szpiegów i raz na zawsze zakończ tę wendettę. + +[F_START] +~g~W okolicach ~a~ zauważono płonący pojazd. Udaj się tam i ugaś pożar. + +[AM4_1A] +Odszukaj telefon na Park West Belleville. + +[AM4_1B] +Odszukaj telefon na kampusie Liberty. + +[AM4_1C] +Odszukaj telefon na Park South Belleville. + +[AM4_1D] +Spotkajmy się w parku przy toaletach. + +[HJSTATF] +Odległość: ~1~ stóp Wysokość: ~1~ stóp Salta: ~1~ Obroty: ~1~_ + +[HJSTAWF] +Odległość: ~1~.~1~ stóp Wysokość: ~1~.~1~ stóp Salta: ~1~ Obroty: ~1~_ Plus doskonałe lądowanie! + +[HM1_F] +Lepiej uważaj - na ulicach będą też ludzie z Jacks, którzy mogą uznać, że polujesz również na nich! + +[HM1_D] +Nazywają się 'Dziewiątki' i ubierają się na purpurowo. Każdy dzień, kiedy te leszcze obnoszą się ze swoim barwami, + +[HM1_G] +to dzień wstydu dla mojego gangu. + +[MEA2_B] +i ukradli parę rzeczy, co pozwoli mi wyciągnąć kasę z odszkodowania. + +[TM3_H] +~w~Dobrze się spisałeś, młody, naprawdę dobrze. + +[TM3_I] +~w~Chodź, Don chce cię poznać. + +[TM3_J] +~w~Heeeej, Luigi! + +[TM3_K] +~w~Moje dziewczynki tęsknią za tobą, Salvatore, dawno cię u nas nie było. + +[TM3_L] +~w~Przekaż im ode mnie, że kiedy załatwimy całą tę nieszczęsną sprawę, + +[TM3_M] +~w~razem pojedziemy do klubu i uczcimy zwycięstwo + +[TM3_N] +~w~Oto i mój chłopak. + +[TM3_N2] +~w~Jak się masz, tato? + +[TM3_O] +~w~Znalazłeś już sobie przyzwoitą kobietę? + +[TM3_P] +~w~Ech, twoja matka, wieczny odpoczynek racz jej dać Panie, przewraca się w grobie, + +[TM3_Q] +~w~bo jej syn jeszcze nie ma żony. + +[TM3_R] +~w~Wiem, tato. Pracuję nad tym. + +[TM3_S] +~w~TONI! Jak twoja Mamuśka? + +[TM3_T] +~w~To wspaniała kobieta. Silna. Firenze. + +[TM3_U] +~w~Mama ma się dobrze... Znakomicie. + +[TM3_V] +~w~Doskonale, doskonale. Posłuchajcie, panowie, rozgośćcie się w środku, a ja porozmawiam z naszym nowym przyjacielem. + +[TM3_W] +~w~Widzę przed tobą wielką przyszłość, chłopcze... + +[RM1_A] +Ta szuja McAffrey wziął więcej łapówek niż ktokolwiek inny. + +[RM1_B] +Teraz myśli, że zasłuży na wygodną emeryturę, jeżeli zakapuje nas policji. + +[RM1_C] +Właśnie nas wsypał! + +[RM4_B] +Trzeba go uciszyć raz na zawsze. + +[RM4_E] +Od jutra ma spać z rybami, a nie jadać je na kolację. + +[LOVE3_B] +Dziś w nocy mały samolot przeleci nad zatoką, podchodząc do lądowania. + +[LOVE4_D] +Niestety, władze lotniska przejęły samolot i zaczęły rozbierać go na części, + +[LOVE4_H] +dopóki nie rzuciłem na szalę całego swojego autorytetu. + +[LOVE4_E] +Przejedź przez most do Shoreside Vale i jedź na lotnisko im. Francisa. + +[GTAB_A] +Lepiej stąd znikajmy. Cholera wie, co to jest, + +[GTAB_B] +ale zdaje się, że temu facetowi bardzo na tym zależy, więc to z pewnością musi mieć jakąś wartość. + +[GTAB_C] +Co, u diabła! + +[GTAB_D] +TO TY! + +[GTAB_E] +Hej, spokojnie, amigo! De nada! De nada! + +[GTAB_F] +Kiedy ostatni raz cię widziałem, twoje truchło spływało do ścieków! + +[GTAB_G] +Nie strzelaj, amigo. Nie ma problemu. My przyjaciele. Proszę, weź to sobie. + +[GTAB_H] +Nie bądź taką ciotą! + +[GTAB_I] +Nie mamy wyboru, kotku! + +[GTAB_J] +Zawsze mamy wybór, tępaku! + +[GTAB_K] +Przepraszam za tę głupią sukę, one wszystkie są jednakowe... por favor? + +[GTAB_L] +Więc ta dziwka zwiała? + +[GTAB_M] +Ale zrobiłeś mi przysługę, + +[GTAB_N] +nie jesteś jedyną osobą, która ma rachunki do wyrównania z Kartelem. + +[GTAB_O] +Ten gnidy zabiły mi brata! + +[GTAB_P] +Nigdy nie zabiłem żadnego członka Yakuzy! + +[GTAB_Q] +KŁAMIESZ! Wszyscy widzieliśmy zabójcę z Kartelu. + +[GTAB_R] +Wytropimy i wytłuczemy was wszystkich, wy kolumbijskie kundle! + +[GTAB_S] +Pobawię się z twoim przyjacielem, aby wydobyć z niego jakieś informacje i troszkę się rozerwać. + +[GTAB_T] +Ej, wpadnij później, będe cię jeszcze potrzebował. + +[GTAB_U] +Proszę, amigo, nie zostawiaj mnie z nią! Ta chica to wariatka! Amigo? Hej, AMIGOOO!!!... Aaaaaa! + +[LOVE5_A] +Raz po raz dowodzisz, że warto w ciebie inwestować, a to rzadkość w dzisiejszych czasach kłamstwa i obłudy. + +[KM3_1] +~g~Kartel spodziewa się kolesia z Yardies, więc idź i ukradnij samochód gangu Yardie! Powinieneś znaleźć ich w Newport, na północy. + +[LOVE1_1] +~g~Podwędź samochód gangu kolumbijskiego, abyś mógł swobodnie przeniknąć do ich kryjówki. Samochód znajdziesz na północ stąd, w Fort Staunton. + +[FM1_Q1] +~w~Szukasz mocnych wrażeń? Może odrobinę... Hm? Odrobinę HEROINY? + +[FM1_R] +~w~Czołem, Chico. Nie, daj mi to, co zawsze. + +[FM1_T] +~w~Dzięki, Chico. Na razie! + +[FM1_W] +~w~W porządku, piesku! Posiedź tu i popilnuj samochodu, a ja wyskoczę i poruszam trochę tyłkiem. + +[FM1_X] +~w~OK, piesku! Znikajmy stąd. Hau hau! + +[FM1_Q] +~g~Cześć, Mario! Moja ulubiona klientka! + +[FM1_S1] +~w~Hej, może wpadniesz na imprezę w tej pustej hali magazynowej na wschodnim krańcu Atlantic Quays? + +[FM1_U] +~w~Gracias i życzę przyjemnych wrażeń. To niezły towar... + +[FM1_V] +~w~Jazda, piesku! Jedziemy zajrzeć na tę imprezę! + +[FM1_SS] +~r~NASŁUCH RADIOWY: ~g~Cztery-pięć do wszystkich jednostek: Zapewnić wsparcie akcji antynarkotykowej w Atlantic Quays... + +[LOVE6_B] +nawet jeżeli mają tylko blade pojęcie na temat jego rzeczywistej wartości. + +[TM3_A1] +~r~Joey się usmażył! + +[TM3_A2] +~r~Joey i Lugi spiekli się na węgiel! + +[TM3_A3] +~r~Joey, Luigi i Toni usmażeni! + +[FM4_2] +Posłuchaj, Salvatore podejrzewa, że kombinujemy coś za jego plecami, + +[FM4_3] +dlatego postanowił sprzedać cię Kartelowi. + +[FM4_4] +Nie mogę do tego dopuścić. Najgorsze w tym wszystkim jest to, + +[FM4_4B] +że to moja wina... To ja mu powiedziałam, że między nami coś jest... + +[FM4_5] +Nie pytaj mnie, po co. Sama nie wiem. + +[FM4_6] +Posłuchaj, na terytorium mafii jesteś poszukiwany, ja też chciałabym się stąd wyrwać. + +[FM4_6B] +Widziałam już za dużo śmierci, zbyt wiele krwi! + +[FM4_7] +Mam starą dobrą przyjaciółkę... Nazywa się Asuka. Możemy jej zaufać. + +[FM4_8] +Dobra, wystarczy już tych przemówień. + +[FM4_9] +Zbierajmy się stąd, zanim pojawią się tu całe wycieczki rozhisteryzowanych Włochów, którzy będą chcieli rozstrzygać z nami rodzinne zatargi. + +[CRED001] +ROCKSTAR STUDIOS + +[CRED002] +PRODUCENT + +[CRED003] +LESLIE BENZIES + +[CRED004] +KIEROWNIK ARTYSTYCZNY + +[CRED005] +AARON GARBUT + +[CRED006] +KIEROWNIK TECHNICZNY + +[CRED007] +OBBE VERMEIJ + +[CRED008] +ADAM FOWLER + +[CRED009] +PROJEKT + +[CRED010] +CRAIG FILSHIE + +[CRED011] +WILLIAM MILLS + +[CRED012] +CHRIS ROTHWELL + +[CRED013] +JAMES WORRALL + +[CRED014] +SCENARIUSZ + +[CRED015] +JAMES WORRALL + +[CRED016] +PAUL KUROWSKI + +[CRED017] +DAN HOUSER + +[CRED018] +POSTACI + +[CRED019] +IAN MCQUE + +[CRED020] +ANIMACJA & REŻYSERIA + +[CRED021] +ALEX HORTON + +[CRED022] +LEE MONTGOMERY + +[CRED023] +PROJEKTY POJAZDÓW + +[CRED024] +PAUL KUROWSKI + +[CRED025] +GRAFICY + +[CRED026] +KEIRAN BAILLIE + +[CRED027] +ADAM COCHRANE + +[CRED028] +GARY MCADAM + +[CRED029] +MICHAEL PIRSO + +[CRED030] +ANDREW SOOSAY + +[CRED031] +ALISDAIR WOOD + +[CRED032] +KODERZY + +[CRED033] +ALAN CAMPBELL + +[CRED034] +MARK HANLON + +[CRED035] +ANDRZEJ MADAJCZYK + +[CRED036] +ALEXANDER ROGER + +[CRED037] +GRAEME WILLIAMSON + +[CRED038] +MUZYKA + +[CRED039] +CRAIG CONNER + +[CRED040] +STUART ROSS + +[CRED041] +KONCEPCJA I MASTERING DŹWIĘKU + +[CRED042] +ALLAN WALKER + +[CRED043] +PROGRAMOWANIE AUDIO + +[CRED044] +RAYMOND USHER + +[CRED045] +KIEROWNIK TESTÓW + +[CRED046] +CRAIG ARBUTHNOTT + +[CRED047] +GŁÓWNI TESTERZY + +[CRED048] +ANDY DUTHIE + +[CRED049] +JOHN HAIME + +[CRED050] +NEIL CORBETT + +[CRD050A] +TESTERZY + +[CRED051] +GRAEME JENNINGS + +[CRED052] +DAVID MURDOCH + +[CRED053] +DAVID BEDDOES + +[CRED054] +EDWIN SMITH + +[CRED055] +MARK FLETT + +[CRED056] +MICHAEL SUTHERLAND + +[CRED057] +POMOC TECHNICZNA + +[CRED058] +LORRAINE ROY + +[CRED059] +CHRISTINE CHALMERS + +[CRED060] +ROCKSTAR + +[CRED061] +PRODUCENT WYKONAWCZY + +[CRED062] +SAM HOUSER + +[CRED063] +PRODUCENT + +[CRED064] +DAN HOUSER + +[CRED065] +DYREKTOR DS. ROZWOJU + +[CRED066] +JAMIE KING + +[CRED067] +PRODUCENT TECHNICZNY + +[CRED068] +GARY J. FOREMAN + +[CRED069] +PRODUCENT POMOCNICZY + +[CRED070] +JEREMY POPE + +[CRED071] +KOORDYNACJA MUZYCZNA + +[CRED072] +TERRY DONOVAN + +[CRED073] +ZESPÓŁ PRODUKCYJNY ROCKSTAR + +[CRED074] +TERRY DONOVAN + +[CRED075] +JENNIFER KOLBE + +[CRED076] +JENEFER GROSS + +[CRED077] +LAURA PATERSON + +[CRED078] +JEFF CASTANEDA + +[CRED079] +CHRIS CARRO + +[CRED080] +ADAM TEDMAN + +[CRED081] +JUNG KWAK + +[CRED082] +BRIAN WOOD + +[CRED083] +PAUL YEATES + +[CRED084] +STANTON SARJEANT + +[CRED085] +WICEPREZES DS. MARKETINGU + +[CRED086] +TERRY DONOVAN + +[CRED087] +KOORDYNACJA TECHNICZNA + +[CRED088] +BRANDON ROSE + +[CRED089] +KIEROWNIK DS. ZAPEWNIENIA JAKOŚCI + +[CRED090] +JEFF ROSA + +[CRED091] +GŁÓWNY ANALITYK + +[CRED092] +ADAM DAVIDSON + +[CRED093] +ANALITYK GRY + +[CRED094] +RICHARD HUIE + +[CRED095] +ZESPÓŁ TESTUJĄCY + +[CRED096] +LANCE WILLIAMS + +[CRED097] +JOE GREENE + +[CRED098] +BRIAN PLANER + +[CRED099] +OSWALD GREENE + +[CRED100] +REDAKCJA 'LIBERTY TREE' + +[CRED101] +JAMES WORRALL + +[CRED102] +DAN HOUSER + +[CRED103] +ADAM TEDMAN + +[CRED104] +PAUL YEATES + +[CRED105] +JENEFER GROSS + +[CRED106] +LAURA PATERSON + +[CRED107] +SEKWENCJE FILMOWE + +[CRED108] +SCENARIUSZ: DAN HOUSER I JAMES WORALL + +[CRED109] +REŻYSERIA DŹWIĘKU: DAN HOUSER + +[CRED110] +PRODUKCJA DŹWIĘKU: RENAUD SEBBANE + +[CRED111] +OBSADA + +[CRED112] +FRANK VINCENT JAKO SALVATORE LEONE + +[CRED113] +JOE PANTOLIANO JAKO LUIGI GOTERELLI + +[CRED114] +MICHAEL MADSEN JAKO TONI CIPRIANI + +[CRED115] +MICHAEL RAPAPORT JAKO JOEY LEONE + +[CRED116] +DEBBI MAZAR JAKO MARIA + +[CRED117] +KYLE MACLACHLAN JAKO DONALD LOVE + +[CRED118] +ROBERT LOGGIA JAKO RAY MACHOWSKI + +[CRED119] +GURU JAKO 8-BALL + +[CRED120] +SONDRA JAMES JAKO MAMUŚKA + +[CRED121] +LIANA PAI JAKO ASUKA + +[CRED122] +LES MAU JAKO KENJI + +[CRED123] +CYNTHIA FARRELL JAKO CATALINA + +[CRED124] +AL. ESPINOSA JAKO MIGUEL + +[CRED125] +CHRIS PHILLIPS JAKO EL BURRO + +[CRED126] +HUNTER PLATIN JAKO CHICO + +[CRED127] +WALTER MUDU JAKO D-ICE + +[CRED128] +CURTIS MCCLARIN JAKO CURTLY + +[CRED129] +BILL FIORE JAKO DARKEL + +[CRED130] +CHRIS PHILLIPS JAKO MARTY CHONKS + +[CRED131] +HUNTER PLATIN JAKO KUDŁATY BOB + +[CRED132] +WALTER MUDU JAKO KING COURTNEY + +[CRED133] +HUNTER PLATIN JAKO JEDNORĘKI PHIL + +[CRED134] +KIM GURNEY JAKO MISTY + +[CRED135] +MOTION CAPTURE + +[CRED136] +ANIMACJA + +[CRD136A] +ALEX HORTON + +[CRED137] +REŻYSERIA + +[CRD137A] +NAVID KHONSARI + +[CRED138] +PRODUKCJA + +[CRD138A] +JAMIE KING + +[CRD138B] +RENAUD SEBBANE + +[CRED139] +NAGRANIA PRZEPROWADZONO W MODERN UPRISINGS STUDIOS, BROOKLYN + +[CRED140] +AKTORZY + +[CRD140A] +MARTINEZ + +[CRD140B] +GISELLE JONES + +[CRD140C] +STEPHEN DANIELS + +[CRD140D] +ROBERT STIO + +[CRD140E] +JENNY GROSS. + +[CRED141] +DIALOGI PRZECHODNIÓW + +[CRED142] +TEKST: DAN HOUSER, NAVID KHONSARI I JAMES WORALL + +[CRED143] +REŻYSERIA: CRAIG CONNER, DAN HOUSER I LAZLOW + +[CRED144] +PRODUKCJA: RENAUD SEBBANE + +[CRED145] +OBSADA + +[CRED146] +HUNTER PLATIN + +[CRED147] +DAN HOUSER + +[CRED148] +RENAUD SEBBANE + +[CRED149] +MARIA CHAMBERS + +[CRED150] +JEFF STANTON + +[CRED151] +RYAN CROY + +[CRED152] +DEENA BERMAN + +[CRED153] +MARIA CHAMBERS + +[CRED154] +ALICE B. SALTZMAN + +[CRED155] +ALEX ANTHONY SIOUKAS + +[CRED156] +SEAN R. LYNCH + +[CRED157] +AMY SALZMAN + +[CRED158] +COLIN MCSHANE + +[CRED159] +COREY WADE + +[CRED160] +GERALD COSGROVE + +[CRED161] +STEPHANIE ROY + +[CRED162] +DORIS WOO + +[CRED163] +JOSEPH GREENE + +[CRED164] +LAZLOW JONES + +[CRED165] +HSIANG LIN + +[CRED166] +STEVE MICHAEL ROBERT + +[CRED167] +MATHEW MURRAY + +[CRED168] +RICHARD HUIE + +[CRED169] +GARVIN ATWELL + +[CRED170] +STEVE KNEZEVICH + +[CRED171] +YUKIMURA SATO + +[CRED172] +FRANK CHAVEZ + +[CRED173] +LIEZL JACINTO + +[CRED174] +CANAAN MCKOY + +[CRED175] +ADAM DAVIDSON + +[CRED176] +LANCE WILLIAMS + +[CRED177] +NEIL MCCAFFREY + +[CRED178] +LAURA PATERSON + +[CRED179] +REY CONCEPCION + +[CRED180] +CHARLES HEROLD + +[CRED181] +ANDREW GREENWALD + +[CRED182] +JAMES MIELKE + +[CRED183] +PETER SUCIU + +[CRED184] +ALEX ODULIO + +[CRED185] +DON NKRUMAH + +[CRED186] +KENDALL PITTMAN + +[CRED187] +SAL SUAZO + +[CRED188] +EREK MATEO + +[CRED189] +CHRIS DIFATE + +[CRED190] +LEILA MILTON + +[CRED191] +DARREN ZOLTOWSKI + +[CRED192] +VIRGINIA SMITH + +[CRED193] +KEVIN CASSIN + +[CRED194] +JASON SHIGEMORI + +[CRED195] +KELLY KINSELLA + +[CRED196] +MOLLIE STICKNEY + +[CRED197] +STANTON SARJEANT + +[CRED198] +LAURA WALSH + +[CRED199] +MARK GARONE + +[CRED200] +JOANNA SLY + +[CRED201] +ELIZABETH HOWELL + +[CRED202] +ANA HERCULES + +[CRED203] +SHIRLEY IRICK + +[CRED204] +KASHONA FIELDS + +[CRED205] +JOEL M. LILJE + +[CRED206] +JOHN DIBENEDETTO + +[CRED207] +NANCY GILES + +[CRED208] +RYAN CROY + +[CRED209] +JENNIFER KOLBE + +[CRED210] +LIAM BURKE + +[CRED211] +SIGRID PREISSL + +[CRED212] +ANITA FITZSIMONS + +[CRED213] +PHILIPPA RASELLI + +[CRED214] +WIL QUESNEL + +[CRED215] +FALKO BURKERT + +[CRED216] +SARA SEWELL + +[CRED217] +STACJE RADIOWE ORAZ MUZYKA + +[CRED218] +PRODUKCJA DLA ROCKSTAR UK + +[CRD218A] +CRAIG CONNER + +[CRD218B] +STUART ROSS + +[CRED219] +KOORDYNATOR ŚCIEŻKI DŹWIĘKOWEJ + +[CRED220] +TERRY DONOVAN + +[CRED221] +PRODUKCJA DLA ROCKSTAR GAMES + +[CRED222] +DAN HOUSER + +[CRED223] +REDAKCJA + +[CRED224] +CRAIG CONNER + +[CRED225] +ALLAN WALKER + +[CRED226] +LAZLOW + +[CRED227] +TEKSTY I WIZERUNKI PREZENTERÓW: + +[CRED228] +DAN HOUSER + +[CRED229] +LAZLOW + +[CRED230] +SPECJALNE PODZIĘKOWANIA DLA: + +[CRED231] +ADAM TEDMAN + +[CRED232] +ALEX MASON + +[CRED233] +JUDY HENDERSON CASTING + +[CRED234] +HAMISH BROWN + +[CRED235] +CHRISSY HOBAN + +[CRED236] +INNES RICARD + +[CRED237] +LILION BROZSKA + +[CRED238] +BOB HILLARY + +[CRED239] +EMILY ANDERSON + +[CRED240] +RICHIE HENDERSON + +[CRED241] +CHRSTIAN CANTAMESSA + +[CRED242] +JERONIMO BARRERA + +[CRED243] +ALEXANDER ILLES + +[CRED244] +BARANE CHAN + +[CRED245] +DUNCAN SHIELDS + +[CRED246] +BARANE CHAN + +[CRED247] +DEREK PAYNE + +[CRED248] +KEVIN WONG + +[CRED249] +ROSS ELLIOTT + +[CRED250] +ROSS BEAZLEY + +[CRED251] +ALEX BAZLINTON + +[CRED252] +DAVE WATSON + +[CRED253] +MALCOLM SMITH + +[CRED255] +ANDREW SEMPLE + +[CRED256] +ARTYŚCI + +[CRED257] +STUART PETRI + +[CRED258] +JERONIMO BARRERA + +[CRED259] +CARLY SLATER + +[CRED260] +GREG LAU + +[CRED261] +STEVE KNEZEVICH + +[CRED262] +DEVIN WINTERBOTTOM + +[CRED263] +JAMEEL VEGA + +[CRED264] +LEE CUMMINGS + +[CRED265] +DEVIN BENNET + +[CRED266] +ELIZABETH SATTERWHITE + +[CRED267] +AARON RIGBY + +[CRED268] +STEVE K. + +[CRED269] +GREG LAU + +[CRED270] +MIKE HONG + +[CINCAM] +Kamera Filmowa + +[KM1_13] +Wprowadź samochód do garażu! + +[KM3_14] +~r~Zostałeś zauważony, układ odwołany! + +[EBAL_H] +Poczekaj tutaj, brachu, a ja pójdę do środka i pogadam z Luigim. + +[EBAL_M] +Tylko pamiętaj - nic nie kombinuj z moimi dziewczynami! + +[LM2_F] +Potem zabierz jego samochód i przemaluj go. + +[LM2_D] +proszę bardzo. + +[LM1_9] +Cześć, jestem Misty... + +[LM4_A] +Jakaś gnida z gangu Diablo nasyła swoje brudne dziwki na moje terytorium. + +[FM2_B] +Mamy kreta! + +[FM2_C] +Żaden z niego alfons czy diler, więc pewnie dorabia na boku sprzedając informacje. + +[FM3_CC] +~w~Bracie, wróć, kiedy będziesz miał pieniądze. + +[FEDS_AM] +<> - ZMIANA MENU + +[LOVE5_5] +~r~Nie udało cię się ochronić ciężarówki! + +[RM6_6] +~r~Ray nie żyje! + +[RM6_7] +~r~Ray spóźnił się na samolot. + +[RM6_8] +~r~Zgubiłeś Raya, wracaj po niego. + +[FM1_10] +~g~Zostawiłeś Marię - zawróć i ją zabierz. + +[LOVE4_9] +~r~Samolot został zniszczony! + +[LOV4_10] +~r~Jedyny ślad, który wskazywał, gdzie zniknęła paczka, został zniszczony! + +[KM2_D] +Nie muszę chyba dodawać, że przekażę mu te samochody w darze, aby spłacić dług, który u niego zaciągnąłem. + +[KM4_B] +Interes idzie na tyle dobrze, że dziś możemy odebrać należną nam opłatę za ochronę. + +[KM2_E] +Zdobądź samochody z tej listy i dostarcz je do warsztatu za parkingiem w Newport. + +[FM3_8I] +~w~Znajdź dobre stanowisko strzeleckie. Kiedy oddasz pierwszy strzał, ja zrobię to, co do mnie należy. + +[LOVE1_B] +Doświadczenie uczy mnie, że ludzie tacy jak ty potrafią być niezwykle lojalni za odpowiednią cenę. + +[LOVE1_H] +ale niektórzy ludzie robią się coraz bardziej chciwi. + +[LOVE1_C] +Znam pewnego starszego pana, pochodzącego z krajów Orientu, który jest dla mnie niezwykle cenny. + +[LOVE1_I] +Niestety został on porwany przez jakiś gang z Ameryki Południowej w okolicach Aspatrii. + +[MEA4_D] +Zgodziłem się z nim spotkać... + +[MEA4_B4] +Marty cię przysyła, co? W porząsiu, pokażę tej gliście, jak się robi interesy. + +[MEA4_B5] +Carl, cześć! Ee, potrzebuję jeszcze trochę czasu, żeby zebrać dla ciebie pieniądze. + +[MEA1_B4] +Ach, przysłał cię Chonks, prawda? Chodźmy odwiedzić naszego wspólnego przyjaciela. + +[HM5_6] +Trzeba rozłupać parę łbów... + +[LOVE1_5] +~g~Przestań się obijać, załatw samochód Kolumbijczyków i uratuj przyjaciela Love'a. + +[AS1_D] +~w~Posłuzysz jako przynęta i ściągniesz szwadrony śmierci za sobą do Pike Creek, + +[AS1_E] +~w~gdzie moi ludzie urzadzą im właściwe przyjęcie. + +[AS2_C] +~w~Kartel działa pod przykrywką firmy Dom Kawy Kappa. + +[AS2_E] +~w~Nie mamy wyjścia, trzeba wyłączyć z gry te punkty sprzedaży dragów. + +[AS2_F] +~w~Rozwal je w drzazgi!! + +[AS2_A1] +~w~Miguel to doskonały przykład słynnej latynoskiej odporności. + +[AS2_A2] +~w~Ręce opadają mi ze zmęczenia. + +[SIREN_3] +Aby włączyc syrenę pojazdu, naciśnij klawisz ~h~~k~~VEHICLE_HORN~ ~w~. + +[SIREN_4] +Aby włączyc syrenę pojazdu, naciśnij klawisz ~h~~k~~VEHICLE_HORN~ ~w~. + +[AS3_C] +~w~Eeej! Co to za lepkie żółte świństwo? + +[AS3_C1] +~w~O, cześć, kochanie. + +[AS3_F] +~w~Ta dziewczyna po prostu ma talent. + +[AS3_F1] +~w~Udało jej się wydobyć z naszego gościa ten oto klejnocik. + +[AS3_G] +~w~Za 2 godziny na Lotnisko Francisa przyleci pewien samolot. + +[AS3_G1] +~w~Jest on wyładowany trucizną Cataliny. + +[AS3_H] +~w~Możesz ominąć lotniskowe służby bezpieczeństwa, jeżeli popłyniesz łodzią + +[AS3_H1] +do boi wyznaczających lądowisko i zestrzelisz lądujący samolot. + +[AS3_I] +~w~Zabierz z wraku ładunek! + +[AS3_J] +~w~Tylko bądź ostrożny, dobrze, kochanie? + +[AS3_K] +~w~A teraz spróbujemy olejku chilli... + +[RM2_F1] +Kolumbijczycy będą tutaj lada chwila! + +[RM2_K] +Cholera, już tu są! OGNIA! + +[LOVE2_7] +~g~Teraz pozbądź się samochodu!v + +[LOVE2_8] +~g~Uciekaj z Newport! + +[AM1_F] +Za około trzy godziny (~1~:~1~), Salvatore Leone będzie wychodził z klubu 'U Luigiego'. + +[LOVE5_C] +Masz za nim jechać i pilnować, aby zarówno on, jak i mój pakunek dotarli do Pike Creek bez szwanku. + +[FESZ_SR] +Zapisywanie zakończone niepowodzeniem! Sprawdź kartę pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 i ponów próbę. + +[FESZ_FO] +Czy chcesz sformatować kartę pamięci (PS2) w gnieździe KART PAMIĘCI nr 1? + +[FELZ_FO] +Karta pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 nie jest sformatowana. + +[FES_NOC] +Brak karty pamięci (PS2) w gnieździe KART PAMIĘCI nr 1. + +[FES_LOE] +Wczytywanie zakończone niepowodzeniem! Sprawdź kartę pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 i ponów próbę. + +[FES_DEE] +Kasowanie zakończone niepowodzeniem! Sprawdź kartę pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 i ponów próbę. + +[SLONFM] +Błąd podczas formatowania karty pamięci (PS2) w gnieździe KART PAMIĘCI nr 1. + +[SLONDR] +Niewystarczająca ilość miejsca, aby zapisać stan gry. Proszę włożyć kartę pamięci (PS2) zawierającą co najmniej 500KB wolnego miejsca do gniazda KART PAMIĘCI nr 1. + +[SLNSP] +Niewystarczająca ilość miejsca, aby zapisać stan gry. Proszę włożyć kartę pamięci (PS2) zawierającą co najmniej 200KB wolnego miejsca do gniazda KART PAMIĘCI nr 1. + +[FEFD_WR] +Trwa formatowanie karty pamięci (PS2) w gnieździe KART PAMIĘCI nr 1. Proszę nie wyjmować karty pamięci (PS2), nie resetować ani nie wyłączać konsoli + +[FES_ISF] +NIEOBECNY + +[FES_SAG] +OBECNY + +[SLONNO] +No Memory Card (PS2) in MEMORY CARD slot 1. + +[SLONNF] +Brak karty pamięci (PS2) w gnieździe KART PAMIĘCI nr 1. + +[FESZ_FM] +Karta pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 nie jest sformatowana. Czy chcesz sformatować kartę pamięci (PS2) w gnieździe KART PAMIĘCI nr 1? + +[FESZ_FF] +Formatowanie zakończone niepowodzeniem! Sprawdź kartę pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 i ponów próbę. + +[MCDNSP] +Na karcie pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 jest zbyt mało wolnego miejsca. Aby zapisać dane aplikacji wymagane jest co najmniej 500KB. Czy chcesz kontynuować? (TAK lub NIE) + +[MCGNSP] +Na karcie pamięci (PS2) w gnieździe KART PAMIĘCI nr 1 jest zbyt mało wolnego miejsca. Aby zapisać dane aplikacji wymagane jest co najmniej 200KB. Czy chcesz kontynuować? (TAK lub NIE) + +[FESZ_WR] +Trwa zapisywanie danych. Proszę nie wyjmować karty pamięci (PS2) z gniazda KART PAMIĘCI nr 1, nie resetować ani nie wyłączać konsoli. + +[FESZ_OW] +Trwa nadpisywanie danych. Proszę nie wyjmować karty pamięci (PS2) z gniazda KART PAMIĘCI nr 1, nie resetować ani nie wyłączać konsoli. + +[FELD_WR] +Trwa wczytywanie danych. Proszę nie wyjmować karty pamięci (PS2), nie resetować ani nie wyłączać konsoli. + +[FEDL_WR] +Trwa usuwanie danych. Proszę nie wyjmować karty pamięci (PS2) z gniazda KART PAMIĘCI nr 1, nie resetować ani nie wyłączać konsoli. + +[LM2_C] +Luigi kazał ci to przekazać, więc... + +[LM3_G] +Joey nie lubi czekać. Pamiętaj, to może być twoja szansa na karierę... + +[LM5_E] +Zawieź tam jak najwięcej dziewczyn, zanim gliniarze przepiją wszystkie pieniądze! + +[JM5_C] +Jest taka kwestia: przy kawiarni w Callahan Point stoi samochód z truposzem w środku. + +[RM2_B] +Powąchaliśmy razem prochu w Nikaragui, kiedy w tym kraju jeszcze rządzili ludzie, którzy wiedzieli, o co chodzi. + +[RM2_C] +Wczoraj groziły mu jakieś mendy z Kartelu. Powiedzieli, że wrócą i zabiorą mu towar. + +[RM2_D1] +Poszedłbym sam, ale moje korzonki znowu się odzywają - więc, ee... Powodzenia! + +[CATINF1] +~g~Dorwij Catalinę! + +[CATINF2] +~g~Śledź helikopter, aby odszukać Catalinę. + +[BOATIN1] +Wskakuj do łodzi i wciśnij klawisz ~h~~k~~VEHICLE_ENTER_EXIT~ button ~w~, aby zająć miejsce. + +[BOATIN2] +Jeżeli jesteś w pobliżu łodzi, możesz wcisnąć klawisz ~h~~k~~VEHICLE_ENTER_EXIT~~w~, aby zająć w niej miejsce. + +[BOATIN3] +Wskakuj do łodzi i wciśnij klawisz ~h~~k~~VEHICLE_ENTER_EXIT~ button ~w~, aby zająć miejsce. + +[BOATIN4] +Jeżeli jesteś w pobliżu łodzi, możesz wcisnąć klawisz ~h~~k~~VEHICLE_ENTER_EXIT~~w~, aby zająć w niej miejsce. + +[JM6] +'UCIECZKA' + +[FM1] +'NIAŃKA' + +[JM1] +'OSTATNI OBIAD MIKE'A BUŹKI' + +[FM21] +'CIOS W SERCE: AKT I' + +[FM3] +'CIOS W SERCE: AKT II' + +[AM1] +'SAYONARA SALVATORE' + +[AM2] +'POD OBSERWACJĄ' + +[KM2] +'GRAND THEFT AUTO' + +[AS3] +'WYRZUTNIA ZIEMIA-POWIETRZE' + +[RM2] +'TOWARZYSZE BRONI' + +[LOVE6] +'ZMYŁKA' + +[LOVE1] +'WYZWOLICIEL' + +[RC1] +'DIABELSKA DEMOLKA' + +[RC2] +'MAFIJNA MASAKRA' + +[RC3] +'KRWAWE KASYNO' + +[RC4] +'RUMPO-ROZRÓBA' + +[RM2_E1] +Nie mogę uwierzyć, że te żółte pokraki znowu zostawiły mnie bez ochrony. + +[GREN_1] +Im dłużej przytrzymasz klawisz ~h~~k~~PED_FIREWEAPON~~w~, tym dalej rzucisz granatem. + +[GREN_2] +Im dłużej przytrzymasz klawisz ~h~~k~~PED_FIREWEAPON~~w~, tym dalej rzucisz granatem. + +[GREN_3] +Im dłużej przytrzymasz klawisz ~h~~k~~PED_FIREWEAPON~~w~, tym dalej rzucisz granatem. + +[LOVE4_G] +Rzecz, która do mnie należy, będzie czekać na ciebie w hangarze celnym przy kadłubie samolotu. + +[KABOOM] +BUM! + +[SPLAT] +PLASK! + +[PANCAK] +UPIECZONY! + +[SOAKED] +DO SUCHEJ NITKI! + +[HEAD] +Head Radio + +[DBL_CLF] +Double Clef FM + +[FLASHB] +Flashback FM + +[RISE] +Rise FM + +[LIPS] +Lips 106 + +[CHAT] +Gaduła FM + +[K_JAH] +Radio K-Jah + +[GAM_FM] +Game Radio FM + +[MSX_FM] +MSX FM + +[TUBE1] +Kiedy metro zostanie otwarte, będziesz mógł przejechać pociągiem na Wyspę Staunton. + +[TUBE2] +Kiedy Shoreside Vale zostanie otwarte, będziesz mógł dotrzeć do stacji końcowej Shoreside Terminal i na Lotnisko Międzynarodowe im. Francisa. + +[TUBE_2] +Aby wsiąść do metra, naciśnij klawisz ~h~'wsiadania do pojazdu'~w~. + +[LEGAL] +~g~Wyeliminuj element przestępczy! + +[GA_2] +Nowy silnik i lakier. Masz spokój z gliniarzami! + +[LM1_8A] +Jeżeli chcesz trochę sobie dorobić, możesz spróbować 'pożyczyć' taksówkę... + +[TAXIH1] +Zatrzymaj się w pobliżu podświetlonego przechodnia i pozwól mu wsiąść, a potem zawieź go pod wskazany adres przed upływem wyznaczonego czasu. + +[LM5_7] +~g~Jeżeli na ~p~Balu Policjanta~g~ pojawią się mniej niż cztery dziewczyny, Luigi będzie niezadowolony! + +[KM2_3] +~g~Pamiętaj, ~r~samochody~g~ muszą być w idealnym stanie albo nie zostaną przyjęte w ~p~warsztacie~g~. + +[KM5_2] +~g~Yardies zniknęli z ulic. + +[BETRA_A] +Przykro mi, kotku. + +[BETRA_B] +Jestem ambitną dziewczyną, + +[BETRA_C] +a ty jesteś tylko małą płotką. + +[JAILB_C] +* + +[JAILB_D] +* + +[JAILB_E] +* + +[JAILB_F] +* + +[JAILB_G] +* + +[JAILB_H] +* + +[JAILB_I] +* + +[JAILB_J] +* + +[JAILB_P] +* + +[JAILB_Q] +Jazda! + +[JAILB_R] +Panie frajerze! + +[JAILB_S] +Zabiję cię bez najmniejszego problemu. + +[JAILB_T] +Pożałujesz tego. + +[JAILB_U] +Dobrze, dobrze! Znikaj stąd. + +[HELP15] +Jeżeli jesteś poza pojazdem i chcesz ~h~spojrzeć za siebie~w~, naciśnij klawisz ~h~~k~~PED_LOOKBEHIND~~w~. + +[FEC_LB3] +Spójrz do tyłu + +[FEC_R3] +(klawisz R3) + +[FES_AFO] +Ta karta pamięci (PS2) jest już sformatowana. + +[FEA_UP] +; + +[FEA_DO] += + +[FEA_LE] +< + +[FEA_RI] +> + +[FEDSAS3] +- ZMIANA WYBORU + +[FEDSAS4] +;=<> - ZMIANA WYBORU + +[SPRAY_4] { re3 change } +Użyj klawisza ~h~~k~~VEHICLE_FIREWEAPON~~w~, aby strzelać z armatki wodnej. + +[SPRAY_1] { re3 change } +Użyj klawisza ~h~~k~~VEHICLE_FIREWEAPON~~w~, aby strzelać z armatki wodnej. + +[LITTLE] +MAŁY T + +[NICK] +NICK LOVE + +[AM1_10] +~g~Salvatore opuści knajpę 'U Luigiego' około 0~1~:~1~ + +[JAILB_V] +* + +[JAILB_A] +* + +[JAILB_B] +* + +[JAILB_W] +* + +[JAILB_K] +* + +[JAILB_L] +* + +[JAILB_M] +* + +[JAILB_N] +* + +[JAILB_O] +* + +[JAILB_X] +* + +[FEDS_SE] +klawisz / - WYBIERZ + +[FEDS_SB] +klawisz / - WYBIERZ klawisz ' - WSTECZ + +[TM4_A] +~w~Ach, to ty. TONIEGO nie ma. + +[TM4_A2] +~w~Ale zostawił na stole jeden ze swoich słodziutkich listów miłosnych do ciebie. + +[DIAB2_A] +Kiedy zaczynałem robić interesy w branży rozrywek egzotycznych, nie miałem nic oprócz pokaźnej zawartości mojego rozporka! + +[LM5_9] +DZIEWCZYNY: + +[PERPIC] +Znalezione ukryte paczki + +[CO_ONE] +Ukryta Paczka ~1~ z ~1~ + +[LOVE3_3] +~g~Samolot zrzucił ~1~ z 6 pakunków. + +[FARE11] +~g~Cel podróży ~w~'Teren budowy'~g~ w Fort Staunton. + +[GA_21] +W tym garażu nie możesz przechowywać więcej samochodów. + +[CHEAT1] +Ułatwienie uaktywnione + +[CHEAT2] +Ułatwienie - broń + +[CHEAT3] +Ułatwienie - życie + +[CHEAT4] +Ułatwienie - pancerz + +[CHEAT5] +Ułatwienie - poziom wanted + +[CHEAT6] +Ułatwienie - pieniądze + +[CHEAT7] +Ułatwienie - pogoda + +[AS1_H] +~w~Nie udało ci się wprowadzić Szwadronu Śmierci w pułapkę Yakuzy!! + +[FEDS_BA] +klawisz ' - WSTECZ + +[RAMP_A] +WSZYSTKIE ROZWAŁKI ZALICZONE! + +[USJ_ALL] +WSZYSTKIE NIETYPOWE SKOKI WYKONANE! + +[FARE23] +~g~Cel podróży ~w~'warsztat importowo-eksportowy'~g~ w okolicach Tamy Cochrane. + +[L_TRN_1] +Po Portland możesz się też poruszać kolejką. Naciśnij klawisz ~h~ ~k~~VEHICLE_ENTER_EXIT~~w~, aby ~h~wsiąść ~w~lub ~h~wysiąść~w~ z pociągu. + +[L_TRN_2] +Po Portland możesz się też poruszać kolejką. Naciśnij klawisz ~h~ ~k~~VEHICLE_ENTER_EXIT~~w~, aby ~h~wsiąść ~w~lub ~h~wysiąść~w~ z pociągu. + +[S_TRN_1] +Przez Liberty możesz także podróżować metrem. Naciśnij klawisz~h~ ~k~~VEHICLE_ENTER_EXIT~~w~, aby ~h~wsiąść ~w~lub ~h~wysiąść~w~ z pociągu. + +[S_TRN_2] +Przez Liberty możesz także podróżować metrem. Naciśnij klawisz~h~ ~k~~VEHICLE_ENTER_EXIT~~w~, aby ~h~wsiąść ~w~lub ~h~wysiąść~w~ z pociągu. + +[AS1_C] +~w~Rozmieściła w całym Liberty trzy szwadrony śmierci, których zadaniem jest wytropić twój tyłek. + +[AS1_G] +~w~Wszyscy członkowie Yakuzy nie żyją!! + +[JAN] +stycz. + +[FEB] +luty + +[MAR] +marzec + +[APR] +kwiec. + +[MAY] +maj + +[JUN] +czerw. + +[JUL] +lip. + +[AUG] +sierp. + +[SEP] +wrz. + +[OCT] +paźdz. + +[NOV] +listop. + +[DEC] +grudz. + +[DEFDT] +--:---:---- --:--:-- + +[BUGGY] +POZOSTAŁE GARBUSKI: + +[BONUS] +~g~PREMIA $~1~v + +[HORN1] +Naciśnij ~h~klawisz L3 ~w~, aby użyć ~h~klaksonu. + +[HORN2] +Naciśnij ~h~klawisz L1 ~w~, aby użyć ~h~klaksonu. + +[HORN3] +Naciśnij ~h~klawisz R1 ~w~, aby użyć ~h~klaksonu. + +[LM3_1A] +Naciśnij klawisz~h~ ~k~~VEHICLE_HORN~~w~, aby użyć ~h~klaksonu~w~ i zaprosić Misty do środka. + +[LM3_1B] +Naciśnij klawisz~h~ ~k~~VEHICLE_HORN~~w~, aby użyć ~h~klaksonu~w~ i zaprosić Misty do środka. + +[LM3_1C] +Naciśnij klawisz~h~ ~k~~VEHICLE_HORN~~w~, aby użyć ~h~klaksonu~w~ i zaprosić Misty do środka. + +[RADIO_A] +Naciśnij klawisz ~h~~k~~VEHICLE_CHANGE_RADIO_STATION~~w~, aby przełączać ~h~stacje radiowe. + +[RADIO_B] +Naciśnij klawisz ~h~~k~~VEHICLE_CHANGE_RADIO_STATION~~w~, aby przełączać ~h~stacje radiowe. + +[RADIO_C] +Naciśnij klawisz ~h~~k~~VEHICLE_CHANGE_RADIO_STATION~~w~, aby przełączać ~h~stacje radiowe.v + +[RADIO_D] +Naciśnij klawisz ~h~~k~~VEHICLE_CHANGE_RADIO_STATION~~w~, aby przełączać ~h~stacje radiowe. + +[FEC_EXV] +Wsiadanie i wysiadanie z pojazdu + +[TAXI_M] +'TAKSÓWKARZ' + +[COP_M] +'PATROL' + +[FIRE_M] +'STRAŻAK' + +[AMBUL_M] +'SANITARIUSZ' + +[HJ_IS] +PREMIA ZA SZALONY SKOK: $~1~ + +[HJ_PIS] +PREMIA ZA BEZBŁĘDNY SZALONY SKOK: $~1~ + +[HJ_DIS] +PREMIA ZA PODWÓJNY SZALONY SKOK: $~1~ + +[HJ_PDIS] +PREMIA ZA BEZBŁĘDNY PODWÓJNY SZALONY SKOK: $~1~ + +[HJ_TIS] +PREMIA ZA POTRÓJNY SZALONY SKOK: $~1~ + +[HJ_PTIS] +PREMIA ZA BEZBŁĘDNY POTRÓJNY SZALONY SKOK: $~1~ + +[HJ_QIS] +PREMIA ZA POCZWÓRNY SZALONY SKOK: $~1~ + +[HJ_PQIS] +PREMIA ZA BEZBŁĘDNY POCZWÓRNY SZALONY SKOK: $~1~ + +[AM1_K] +Za około trzy godziny (0~1~:~1~), Salvatore Leone będzie wychodził z klubu 'U Luigiego'. + +[IMPEXPP] +Warsztat import-eksport w Portland Harbor. Mamy zamówienia na różne pojazdy. Listę aktualnie skupowanych wozów znajdziesz na naszej tablicy ogłoszeniowej. + +[VANHSTP] +Chcesz rozbić konwojowóz? Przywieź go do naszego warsztatu w Portland Harbor! + +[EMVHPUP] +Doskonałe ceny za nowe i używane pojazdy służb miejskich! Skup odbywa się przy dźwigu na północny wschód od Portland Harbor. + +[STANDS] +ROZBITE BUDKI: + +[STASH] +~g~Odwieź PROCHY z powrotem na ~p~teren budowy! + +[MCSTNS] +W gnieździe KART PAMIĘCI nr 1 nie ma karty pamięci (PS2). Czy chcesz kontynuować? (TAK lub NIE) + +[LOVE3_5] +~g~Samolot jest w zasięgu. + +[LOVE3_6] +~r~Policja dotarła do pakunków przed tobą! + +[SIREN_1] +Aby włączyc syrenę pojazdu, naciśnij klawisz ~h~~k~~VEHICLE_HORN~ ~w~. + +[SIREN_2] +Aby włączyc syrenę pojazdu, naciśnij klawisz ~h~~k~~VEHICLE_HORN~ ~w~. + +[FM3_8C] +~w~Potrzebuję jakieś 100 000 dolarów na niezbędne wydatki, + +[MCLOAD] +Trwa wczytywanie danych. Proszę nie wyjmować karty pamięci (PS2) z gniazda KART PAMIĘCI nr 1, nie resetować ani nie wyłączać konsoli. + +[FES_GME] +Błąd odczytu danych z karty pamięci (PS2) w gnieździe KART PAMIĘCI nr 1. Sprawdź kartę i ponów próbę. + +[FESZ_QF] +Czy na pewno chcesz sformatować kartę pamięci (PS2) w gnieździe KART PAMIĘCI nr 1? + +[FESZ_LS] +Pomyślne wczytywanie + +[RM3_5] +~g~Masz już ~1~ z 6 pakietów dowodów. + +[LOVE3_2] +~g~Masz już wszystkie pakunki! Zawieź je do Donalda Love'a. + +[LOVE4_4] +~g~Zabierz pakunek do Donalda Love'a! + +[FEB_SAV] +Wczytanie + +[FEP_SAV] +WCZYTAJ GRĘ + +[AS2_12A] +~g~Od momentu rozwalenia pierwszej budki będziesz miał 8 minut, zanim Kartel ostrzeże swoich dilerów! + +[AS3_1A] +~g~Teraz płyń do ~b~boi ! + +[NOCONT] +Aby kontynuować, proszę ponownie podłączyć kontroler analogowy (DUALSHOCK@) lub kontroler analogowy (DUALSHOCK@2) do portu kontrolerów gry nr 1. + +[BET_JB] +CATALINA, JEGO KOCHANKA, ZDRADZIŁA GO I POZOSTAWIŁA NA PEWNĄ ŚMIERĆ. TERAZ, OSĄDZONY I SKAZANY, ROZPOCZYNA PODRÓŻ DO ZAKŁADU KARNEGO W LIBERTY CITY. ALE W JEGO ZBRODNICZYM UMYŚLE PŁONIE TYLKO JEDNA MYŚL......ZEMSTA! + +[END_A] +Mieszkańcy Cedar Grove nadal dochodzą do siebie + +[END_B] +po gwałtownych wydarzeniach, jakie rozegrały się wczoraj + +[END_C] +w tej dzielnicy, a przypominały regularną wojnę. + +[END_D] +Pan Clive Denver, mieszkający w tej okolicy od lat, opisał wczoraj policji + +[END_E] +samotnego strzelca, który uciekał z miejsca przestępstwa z ciemnowłosą kobietą. + +[END_F] +Och, będziemy się razem świetnie bawić! Bo... no, wiesz... + +[END_G] +Ja cię kocham, naprawdę... Bo jesteś taki silny i w ogóle... + +[END_H] +A właśnie kogoś takiego szukałam. + +[END_I] +Ale... o czym to ja mówiłam? + +[END_J] +Wyleciało mi z głowy! Ale wiesz, o co mi chodzi, prawda? + +[END_K] +Odgłosy eksplozji wstrząsały okolicznymi budynkami, z których wybiegali przerażeni ludzie. + +[END_L] +Kilkunastu obywateli doznało obrażań w wyniku wymiany ognia + +[END_M] +między bandytami na ziemi a helikopterem krążącym nad tamą. + +[END_N] +Tak, tutaj - z ogrodu - miałem na wszystko doskonały widok. + +[END_O] +Kiedy helikopter w końcu został trafiony, + +[END_P] +wyglądało to lepiej niż fajerwerki na Wielkanoc! + +[END_Q] +Liczba zabitych przekroczyła już dwadzieścia osób, + +[END_R] +ale policja ciągle odnajduje nowe ciała. + +[END_S] +Jak dotąd nie wydano żadnego oficjalnego komunikatu, który zaprzeczyłby pogłoskom, + +[END_T] +że ofiary to członkowie Kartelu Kolumbijskiego. + +[END_U] +Nadal nie ma też żadnych informacji na temat przyczyn tej masakry. + +[END_V] +Złamałam paznokieć i zrujnowałam sobie całą fryzurę. To skandal! + +[END_W] +Kosztowała mnie pięćdziesiąt dolców... + +[PAPER1] +* + +[PAPER2] +* + +[PAPER3] +* + +[FEB_CPC] +Konfiguracja klawiszy sterujących + +[FEC_PED] +Sterowanie postacią poza pojazdem + +[FEC_VEH] +Klawisze sterujące pojazdem + +[FEC_FPR] +Sterowanie dla trybu widoku z oczu postaci + +[FEC_CMM] +Standardowe sterowanie + +[FEC_PWL] +IDŹ w lewo + +[FEC_PWR] +Idź w prawo + +[FEC_PWF] +Idź do przodu + +[FEC_PWT] +Idź w stronę kamery + +[FEC_PLB] +Spójrz za siebie + +[FEC_PFR] +Strzał z broni + +[FEC_CLE] +Przełącz rodzaj broni w lewo + +[FEC_CRI] +Przełącz rodzaj broni w prawo + +[FEC_LKT] +Zablokuj cel + +[FEC_PJP] +Skok + +[FEC_PSP] +Szybki bieg + +[FEC_PSH] +Strzał + +[FEC_TLF] +Następny cel w lewo + +[FEC_TRG] +Następny cel w prawo + +[FEC_CCM] +Wyśrodkuj kamerę za graczem + +[FEC_SZI] +Karabin snajperski - przybliżenie + +[FEC_SZO] +Karabin snajperski - oddalenie + +[FEC_LKL] +Spójrz w lewo w trybie widoku z oczu postaci + +[FEC_LRT] +Spójrz w prawo w trybie widoku z oczu postaci + +[FEC_LUP] +Spójrz w górę w trybie widoku z oczu postaci + +[FEC_LDN] +Spójrz w dół w trybie widoku z oczu postaci + +[FEC_LBH] +Spójrz przez tylną szybę + +[FEC_LLF] +Spójrz przez lewą szybę + +[FEC_LRG] +Spójrz przez prawą szybę + +[FEC_HRN] +Klakson + +[FEC_HBR] +Hamulec ręczny pojazdu + +[FEC_ACL] +Przyspieszenie pojazdu + +[FEC_BRK] +Hamulec pojazdu + +[FEC_TSM] +Włącz podmisje + +[FEC_CRD] +Zmiana stacji radiowej + +[FEC_ENT] +Wsiadanie do pojazdu/wysiadanie z pojazdu + +[FEC_WPN] +Strzał z broni + +[FEC_PAS] +Pauza + +[FEC_FPO] +Broń w trybie widoku z oczu postaci + +[FEC_SMS] +Pokazuj kursor myszy + +[FEC_CMS] +Zmiana trybu kamery dla wszystkich sytuacji. + +[FEC_TSS] +Zapisz wygląd ekranu + +[FEN_NET] +Sieć + +[FEN_CON] +Połączenie + +[FEN_GAM] +Szukaj sesji gry + +[FEN_TYP] +Rodzaj gry + +[FEN_TY0] +Tryb Deathmatch + +[FEN_TY1] +Tryb Niewidzialny Deathmatch + +[FEN_TY2] +Zespołowy tryb Deathmatch + +[FEN_TY3] +Zespołowy tryb Niewidzialny Deathmatch + +[FEN_TY4] +Gromadź szmal + +[FEN_TY5] +Zdobądź flagę + +[FEN_TY6] +Wyścig szczurów + +[FEN_TY7] +Dominacja + +[FEN_NAM] +Nazwa: + +[FEN_GNA] +Nazwa gry: + +[FEM_MAP] +Wybierz mapę + +[FEN_PLS] +Ustawienia gracza + +[FEN_PLC] +Kolor gracza + +[FEM_MA0] +Liberty City + +[FEM_MA1] +Dz. Czerwonych Świateł + +[FEM_MA2] +Chinatown + +[FEM_MA3] +Wieża + +[FEM_MA4] +Kanały + +[FEM_MA5] +Park Przemysłowy + +[FEM_MA6] +Doki + +[FEM_MA7] +Staunton + +[FEC_EMS] +Tylko klawisze z klawiatur niestandardowych + +[FEC_DBG] +MENU DEBUGOWANIA + +[FEC_TGD] +Przełącznik gra/debugowanie + +[FEC_TDO] +Wyłącz kamerę trybu debugowania + +[FEC_IVH] +Odwróć osie myszy w poziomie: + +[FEC_MSL] +Lewy przycisk myszy + +[FEC_MSM] +Śr. przycisk myszy + +[FEC_MSR] +Prawy przycisk myszy + +[FEC_QUE] +??? + +[FEC_TWO] +Dozwolone są tylko dwa klawisze z klawiatury + +[FEC_UMS] +Tylko przyciski myszy niestandardowych + +[FEC_OMS] +Dozwolony jest tylko jeden przycisk myszy + +[FEC_UJS] +Tylko przyciski joysticków niestandardowych + +[FEC_OJS] +Dozwolony jest tylko jeden przycisk joysticka na daną czynność . + +[FEC_PTL] +Użyj blokowania celu oraz przełączenia broni w lewo + +[FEC_PTR] +Użyj blokowania celu oraz przełączenia broni w prawo + +[FEC_LBC] +Użyj klawiszy 'spójrz w lewo' oraz 'spójrz w prawo' + +[FEC_JBO] +JOY ~1~ + +[NO_PAUZ] +Nie można zatrzymać gry w trybie wieloosobowym. Dwukrotnie naciśnij klawisz, aby wyjść z gry! + +[FEM_SL1] +Gniazdo 1 jest wolne + +[FEM_SL2] +Gniazdo 2 jest wolne + +[FEM_SL3] +Gniazdo 3 jest wolne + +[FEM_SL4] +Gniazdo 4 jest wolne + +[FEM_SL5] +Gniazdo 5 jest wolne + +[FEM_SL6] +Gniazdo 6 jest wolne + +[FEM_SL7] +Gniazdo 7 jest wolne + +[FEM_SL8] +Gniazdo 8 jest wolne + +[FEM_MM] +MENU GŁÓWNE + +[FEQ_SRE] +Czy na pewno chcesz wyjść z gry? Efekty wszystkich działań podjętych od czasu ostatniego zapisu gry zostaną utracone. Kontynuować? + +[FEQ_SRW] +Czy na pewno chcesz wyjść z gry? + +[FEG_SRV] +SERWER + +[FEG_MAP] +MAPA + +[FEG_PLY] +GRACZE + +[FEG_TYP] +RODZAJ + +[FEG_PNG] +PING + +[FET_FG] +ODSZUKAJ SESJĘ GRY + +[FET_SP] +TRYB DLA JEDNEGO GRACZA + +[FET_MP] +TRYB WIELOOSOBOWY + +[FET_HG] +HOSTUJ GRĘ + +[FET_PS] +KONFIGURACJA GRACZA + +[FET_CON] +POŁĄCZENIE + +[FET_AUD] +KONFIGURACJA DŻWIĘKU + +[FET_DIS] +KONFIGURACJA EKRANU + +[FET_LAN] +OKREŚL JĘZYK + +[FET_LG] +WCZYTAJ GRĘ + +[FET_DG] +USUŃ GRĘ + +[FET_NG] +NOWA GRA + +[FET_SG] +ZAPISZ GRĘ + +[FET_MAP] +WYBIERZ MAPĘ + +[FET_GT] +RODZAJ GRY + +[FET_CTL] +KONFIGURACJA STEROWANIA + +[FET_OPT] +OPCJE + +[FET_QG] +WYJDŹ Z GRY + +[FET_STA] +STATYSTYKI + +[FET_BRE] +CELE + +[FEC_WAR] +Ostrzeżenie + +[FEC_OKK] +OK + +[FED_CON] +Potwierdzenie usunięcia pliku + +[FES_SSC] +Gra została pomyślnie zapisana. + +[DEL_FNM] +Plik został pomyślnie usunięty. + +[PCLOAD] +Wczytywanie danych z pliku + +[PCRESRT] +Trwa uruchamianie Grand Theft Auto III + +[FEC_DLF] +Kasowanie nieudane. + +[FEC_SVU] +Zapis nieudany. + +[FEC_LUN] +Wczytywanie nieudane. Plik uszkodzony. Proszę go usunąć. + +[FEN_PLA] +Liczba graczy: + +[FET_NON] +BRAK DOSTĘPNYCH GIER + +[FET_SFG] +WYSZUKIWANIE SESJI GRY... + +[FET_SRT] +SORTOWANIE SESJI GRY... + +[FEF_LAN] +LAN + +[FEF_INT] +INTERNET + +[FET_REF] +Odśwież + +[FET_FIL] +Filtr + +[FET_JG] +Dołącz + +[FEC_NTW] +Rozmowa przez sieć + +[FEC_ESR] +Klawisz ESC jest zastrzeżony + +[FEC_GSL] +Pokazuj wstrząsy głowy: + +[FIL_FLT] +FILTR LISTY SESJI GRY + +[FET_SAN] +ROZPOCZNIJ NOWĄ GRĘ + +[FIL_MAP] +Mapa: + +[FIL_SRV] +Serwer: + +[FIL_TYP] +Rodzaj gry: + +[FIL_SPC] +Gry z wolnym miejscem? + +[FIL_PNG] +Ping: + +[FEN_UKH] +Nieznany host + +[FEN_UKM] +Nie odnaleziono mapy + +[FEN_UKT] +Nie odnaleziono danego rodzaju gry + +[FEN_NCI] +BRAK POŁĄCZENIA Z INTERNETEM + +[FET_PAU] +MENU PAUZY + +[FET_SGA] +ROZPOCZNIJ GRĘ + +[FEC_SGJ] +Ustaw joystick do gry + +[FEC_PAD] +Gamepad + +[FEC_JOY] +Joystick + +[FEC_WHL] +Kierownica + +[FEC_CNT] +Typ sterownika: + +[FES_CSA] +Wybierz 'skórę' z poniższej listy: + +[FES_SKN] +NAZWA SKÓRY + +[FES_DAT] +DATA + +[FES_NON] +BRAK DOSTĘPNYCH 'SKÓR' + +[FEA_FM9] +ODTWARZACZ MP3 + +[FESZ_QZ] +Czy jesteś pewien, że chcesz zapisać grę? + +[FES_CGA] +Dostępne gniazda gry: + +[FES_SCG] +Zapisać bieżącą grę? + +[FES_LCG] +Wczytać grę i kontynuować rozgrywkę? + +[FEC_FIR] +Strzał + +[FEC_NWE] +Następna broń + +[FEC_PWE] +Poprzednia broń + +[FEC_FOR] +Do przodu + +[FEC_BAC] +Do tyłu + +[FEC_LEF] +W lewo + +[FEC_RIG] +W prawo + +[FEC_ZIN] +Przybliżenie + +[FEC_ZOT] +Oddalenie + +[FEC_EEX] +Wejście/wyjście + +[FEC_RAD] +Radio + +[FEC_SUB] +Podmisja + +[FEC_CMR] +Zmiana kamery + +[FEC_JMP] +Skok + +[FEC_SPN] +Sprint + +[FEC_HND] +Hamulec ręczny + +[FEC_TUL] +Wieżyczka w lewo + +[FEC_TUR] +Wieżyczka w prawo + +[FEC_LOL] +Spójrz w lewo + +[FEC_LOR] +Spójrz w prawo + +[FEC_NTR] +Następny cel + +[FEC_PTT] +Poprzedni cel + +[FEC_LBA] +Spójrz do tyłu + +[FEC_CEN] +Wyśrodkuj kamerę + +[FEC_UND] +(NIE) + +[FET_CFT] +PIESZO + +[FET_CCR] +W AUCIE + +[CVT_MSG] +Trwa konwersja tekstur do formatu optymalnego dla zainstalowanej karty graficznej. + +[FET_CAC] +CZYNNOŚĆ + +[FEC_IBT] +- + +[FEC_SPC] +SPACJA + +[FEC_MXO] +MXB1 + +[FEC_MXT] +MXB2 + +[FEC_UNB] +UNBOUND + +[FET_CME] +SPOSÓB STEROWANIA + +[FET_RDK] +ZMIANA KLAWISZY STERUJĄCYCH + +[FET_AMS] +USTAWIENIA MYSZY + +[FET_STI] +ZWYKŁA KONFIGURACJA STEROWANIA + +[FET_CTI] +STANDARDOWA KONFIGURACJA STEROWANIA + +[FET_MTI] +KONFIGURACJA STEROWANIA MYSZĄ + +[FET_DAM] +DYNAMICZNE MODELOWANIE AKUSTYCZNE + +[FEC_TFL] +Wieżyczka w lewo + +[FEC_TFR] +Wieżyczka w prawo + +[FEC_MWF] +KÓŁKO W GÓRĘ + +[FEC_MWB] +KÓŁKO W DÓŁ + +[FEC_ORR] +lub + +[FEC_NUS] +NIEUŻYWANY + +[FEC_LUD] +Spójrz w górę + +[FEC_LDU] +Spójrz w dół + +[FEC_CMP] +KOMBINACJA: SPÓJRZ W LEWO + SPÓJRZ W PRAWO + +[FEC_NTT] +Brak tekstu dla tego klawisza + +[FEC_FNC] +F~1~ + +[FEC_IRT] +INSERT + +[FEC_DLL] +DELETE + +[FEC_HME] +HOME + +[FEC_END] +END + +[FEC_PGU] +PAGE UP + +[FEC_PGD] +PAGE DOWN + +[FEC_UPA] +STRZAŁKA W GÓRĘ + +[FEC_DWA] +STRZAŁKA W DÓŁ + +[FEC_LFA] +W LEWO + +[FEC_RFA] +STRZAŁKA W PRAWO + +[FEC_NUM] +NUM + +[FEC_NMN] +NUM~1~ + +[FEC_FWS] +NUM / + +[FEC_PLS] +NUM + + +[FEC_MIN] +NUM - + +[FEC_DOT] +NUM . + +[FEC_NLK] +NUM LOCK + +[FEC_ETR] +ENTER + +[FEC_SLK] +SCROLL LOCK + +[FEC_PSB] +PAUSE BREAK + +[FEC_BSP] +BACKSPACE + +[FEC_TAB] +TAB + +[FEC_CLK] +CAPS LOCK + +[FEC_RTN] +RETURN + +[FEC_LSF] +LEWY SHIFT + +[FEC_RSF] +PRAWY SHIFT + +[FEC_LCT] +LEWY CTRL + +[FEC_RCT] +PRAWY CTRL + +[FEC_LAL] +LEWY ALT + +[FEC_RAL] +PRAWY ALT + +[FEC_LWD] +LEWY KLAWISZ WINDOWS + +[FEC_RWD] +PRAWY KLAWISZ WINDOWS + +[FEC_WRC] +WINCLICK + +[WIN_TTL] +Grand Theft Auto III + +[WIN_95] +Gra Grand Theft Auto III nie pracuje pod systemem Windows 95. + +[WIN_DX] +Gra Grand Theft Auto III wymaga bibliotek DirectX w wersji 8.1 lub nowszych. + +[WIN_VDM] +Gra Grand Theft Auto III wymaga karty graficznej z przynajmniej 12 MB RAM. + +[DIAB3_G] +Arriba! + +[FEM_RES] +WZNÓW GRĘ + +[FES_SNG] +ROZPOCZNIJ NOWĄ GRĘ + +[FEM_SP] +TRYB DLA JEDNEGO GRACZA + +[FEM_MP] +TRYB WIELOOSOBOWY + +[FEM_QT] +WYJDŹ Z GRY + +[FES_SG] +ROZPOCZNIJ NOWĄ GRĘ + +[FES_LG] +WCZYTAJ GRĘ + +[FEM_HST] +HOST GRY + +[FEM_OPT] +OPCJE + +[FEM_DBG] +DEBUGOWANIE + +[FET_PSU] +KONFIGURACJA GRACZA + +[FET_DEF] +PRZYWRÓĆ USTAWIENIA DOMYŚLNE + +[FED_BRI] +JASNOŚĆ + +[FED_TRA] +ŚLADY + +[FEM_LOD] +ODLEGŁOŚC RYSOWANIA + +[FEM_VSC] +SYNCHRONIZACJA KLATEK + +[FEM_FRM] +OGRANICZENIE KLATEK + +[FED_RES] +ROZDZIELCZOŚĆ EKRANU + +[FED_WIS] +SZEROKI EKRAN + +[FEDS_TB] +WSTECZ + +[FEA_MUS] +GŁOŚNOŚĆ MUZYKI + +[FEA_SFX] +GŁOŚNOŚĆ EFEKTÓW + +[FEA_RSS] +STACJA RADIOWA + +[FEL_ENG] +ANGIELSKI + +[FEL_FRE] +FRANCUSKI + +[FEL_GER] +NIEMIECKI + +[FEL_ITA] +WŁOSKI + +[FEL_SPA] +HISZPAŃSKI + +[FEA_3DH] +SPRZĘT AUDIO + +[FEA_SPK] +KONFIGURACJA GŁOŚNIKÓW + +[FEA_2SP] +DWA GŁOŚNIKI + +[FEA_4SP] +WIĘCEJ NIŻ DWA GŁOŚNIKI + +[FEA_EAR] +SŁUCHAWKI + +[FEA_NAH] +BRAK SPRZĘTU AUDIO + +[FET_SNG] +ROZPOCZNIJ NOWĄ GRĘ + +[FEN_STA] +ROZPOCZNIJ GRĘ + +[GMLOAD] +WCZYTAJ GRĘ + +[GMSAVE] +ZAPISZ GRĘ + +[FES_DGA] +USUŃ GRĘ + +[FEM_NON] +BRAK + +[FEC_IVV] +ODWRÓĆ OSIE MYSZY W PIONIE + +[FEC_MSH] +CZUŁOŚĆ MYSZY + +[FET_CCN] +STEROWANIE: STANDARDOWE + +[FET_SCN] +STEROWANIE: ZWYKŁE + +[FES_SET] +UŻYJ 'SKÓRY' + +[GHOST] +Ghost + +[WIN_RSZ] +Zmiana rozmiaru ekranu nieudana. + +[FEC_TFU] +Wież./dodo w górę + +[FEC_TFD] +Wież./dodo w dół + +[FET_APL] +ZASTOSUJ + +[FET_APP] +KLIKNIJ LPM LUB RETURN, ABY ZASTOSOWAĆ NOWE USTAWIENIA + +[FET_HRD] +PRZYWRÓCONO USTAWIENIA DOMYŚLNE + +[FET_MST] +STEROWANIE POJAZDAMI ZA POMOCĄ MYSZY + +[FEC_STR] +NUM * + +[FET_MIG] +STRZAŁKA W LEWO, W PRAWO, KÓŁKO MYSZY, ABY REGULOWAĆ + +[FET_CIG] +BACKSPACE: USUWANIE - LPM, RETURN - ZMIANA + +[FET_RIG] +WYBIERZ NOWY KLAWISZ LUB NACIŚNIJ ESC, ABY ANULOWAĆ + +[FET_EIG] +NIE MOŻNA PRZYPISAĆ KLAWISZA TEJ CZYNNOŚCI + +[NO_PCCD] +Włóż do napędu CD-ROM płytę z grą Grand Theft Auto III nr 2 albo naciśnij ESC, aby anulować. + +[CVT_ERR] +Na dysku twardym zabrakło wolnego miejsca. Przed dalszą pracą z programem zwolnij odpowiednią ilość pamięci. Aby wyjść, naciśnij ESC. + +[FED_SUB] +NAPISY + +[FET_DSN] +Skin gracza.bmp + +[JM3] +'SKOK NA KONWÓJ' + +[ATUTOR2] +~g~OSTROŻNIE przewoź pacjentów do Szpitala. Każde zderzenie zmniejsza ich szanse przeżycia. + +[EBAL] +'WOLNOŚĆ W LIBERTY' + +[LM4] +'ALFONS' + +[REPLAY] +POWTÓRKA + +[FEC_SFT] +SHIFT + +[CRED254] +KIEROWNIK STUDIA + +[CVT_CRT] +Nie można dokonać konwersji tekstur dla zainstalowanej karty graficznej. W tym celu należy zalogować się na konto Administratora. Aby wyjść, naciśnij ESC. + +[FEM_ON] +WŁ. + +[FEM_OFF] +WYŁ. + +[FEM_YES] +TAK + +[FEM_NO] +NIE + +[FES_WAR] +Trwa zapisywanie, proszę czekać... + +[FED_DLW] +Trwa kasowanie, proszę czekać... + +[FED_LDW] +Trwa wczytywanie, proszę czekać... + +[FEC_SLC] +Gniazdo jest uszkodzone + +[FED_LFL] +Nieudane wczytanie zapisanej gry. Za chwilę gra uruchomi się ponownie. + +[FET_RSO] +PRZYWRÓCONO PIERWOTNE USTAWIENIA + +[FET_RSC] +URZĄDZENIE NIEDOSTĘPNE - PRZYWRÓCONO PIERWOTNE USTAWIENIA + +{ re3 updates } +{ new languages } +[FEL_JAP] +JAPOŃSKI + +[FEL_POL] +POLSKI + +[FEL_RUS] +ROSYJSKI + +{ new display menus } +[FET_GFX] +USTAWIENIA GRAFIKI + +[FED_MIP] +MIPMAPPING + +[FED_AAS] +WYGŁADZANIE KRAWĘDZI + +[FED_FIL] +FILTROWANIE TEKSTUR + +[FED_BIL] +DWULINIOWE + +[FED_TRL] +TRÓJLINIOWE + +[FED_WND] +OKIENKOWY + +[FED_FLS] +PEŁNY EKRAN + +[FEM_CSB] +RAMKI CUTSCENEK + +[FEM_SCF] +FORMAT OBRAZU + +[FEM_ISL] +PRZYPISZ WYKORZYSTANIE PAMIĘCI + +[FEM_LOW] +NISKIE + +[FEM_MED] +ŚREDNIE + +[FEM_HIG] +WYSOKIE + +[FEM_2PR] +ALFA TEST PS2 + +[FEC_FRC] +SWOBODNA KAMERA + +{ Linux joy detection } +[FEC_JOD] +WYKRYJ PADA + +[FEC_JPR] +Naciśnij dowolny klawisz na padzie, którego chcesz użyć w grze. + +[FEC_JDE] +Wykryto pada + +{ mission restart } +[FET_RMS] +PONÓW MISJĘ + +[FESZ_RM] +PONOWIĆ? + +{ more graphics } +[FED_VPL] +POTOK POJAZDÓW + +[FED_PRM] +PODŚWIETLENIE PED + +[FED_RGL] +POŁYSK DROGI + +[FED_CLF] +FILTR KOLORU + +[FED_WLM] +LIGHTMAPY ŚWIATA + +[FED_MBL] +ROZMYCIE RUCHU + +[FEM_SIM] +PROSTE + +[FEM_NRM] +NORMALNY + +[FEM_MOB] +MOBILNY + +[FED_MFX] +MATFX + +[FED_NEO] +PODŚWIETLENIE + +[FEM_PS2] +PS2 + +[FEM_XBX] +XBOX + +[FEM_AUT] { aspect ratio related } +AUTO + +[FEC_IVP] +ODWRÓĆ OŚ PADA W PIONIE + +{ map } +[FEM_TWP] +Toggle Waypoint + +[FEA_FMN] +RADIO OFF + +[FEC_DS2] +DUALSHOCK 2 + +[FEC_DS3] +DUALSHOCK 3 + +[FEC_DS4] +DUALSHOCK 4 + +[FEC_360] +XBOX 360 CONTROLLER + +[FEC_ONE] +XBOX ONE CONTROLLER + +[FEC_NSW] +NINTENDO SWITCH CONTROLLER + +[FEC_TYP] +GAMEPAD TYPE + +[FEC_CCF] +KONFIGURACJA + +[FEC_CF1] +SETUP1 + +[FEC_CF2] +SETUP2 + +[FEC_CF3] +SETUP3 + +[FEC_CF4] +SETUP4 + +[FEC_CDP] +STEROWNIK EKRANU + +[FEC_ONF] +PIESZO + +[FEC_INC] +W AUCIE + +[FEC_VIB] +WIBRACJA + +[FET_AGS] +GAMEPAD SETTINGS + +[FEM_PED] +PED DENSITY + +[FEM_CAR] +CAR DENSITY + +{ end of file } + +[DUMMY] + +THIS LABEL NEEDS TO BE HERE !!! +AS THE LAST LABEL DOES NOT GET COMPILED \ No newline at end of file diff --git a/utils/gxt/russian.txt b/utils/gxt/russian.txt index 4598dad5..3b42bb21 100644 --- a/utils/gxt/russian.txt +++ b/utils/gxt/russian.txt @@ -1,4 +1,11 @@ -[1000] +{ + New strings are at the bottom of file. + Do not change the order of strings. + You can fix the typos of existing translation but please refrain from + unnecessary edits like rephasing because you think it suits better for your taste. +} + +[1000] ТЫ ПОКОЙНИК [1001] @@ -146,7 +153,7 @@ Кенжи как всегда тянет руки к моим игрушкам. [AM2_E] -Мои люди в полиции собщили, что мафия следит за всеми нашими делами в городе, +Мои люди в полиции сообщили, что мафия следит за всеми нашими делами в городе, [AM2_E2] так они пытаются выйти на тебя. @@ -2029,11 +2036,11 @@ Double Clef FM [DODO_FT] Вы были в воздухе ~1~ секунд! -[DRIVE_A] -Садясь в машину, возьми в руки Узи. Посмотри вправо или влево и нажми ~h~~k~~PED_FIREWEAPON~~w~ для выстрела. +[DRIVE_A] { re3 change } +Садясь в машину, возьми в руки Узи. Посмотри вправо или влево и нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~ для выстрела. -[DRIVE_B] -Садясь в машину, возьми в руки Узи. Посмотри вправо или влево и нажми ~h~~k~~PED_FIREWEAPON~~w~ для выстрела. +[DRIVE_B] { re3 change } +Садясь в машину, возьми в руки Узи. Посмотри вправо или влево и нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~ для выстрела. [DSPLAY] Экран @@ -2425,30 +2432,12 @@ FLASHBACK 95.6 [FEC_CAW] Оружие в машине -[FEC_CCF] -Конфигурация: - [FEC_CCM] Поставить камеру сзади игрока. -[FEC_CDP] -Показ контроллера: - [FEC_CEN] Центровка камеры -[FEC_CF1] -Setup1 - -[FEC_CF2] -Setup2 - -[FEC_CF3] -Setup3 - -[FEC_CF4] -Setup4 - [FEC_CLE] Прокрутка оружия влево @@ -2569,9 +2558,6 @@ HOME [FEC_IBT] - -[FEC_INC] -В машине - [FEC_IRT] INS @@ -2743,8 +2729,6 @@ NUMLOCK [FEC_OMS] Для действия можно задать лишь одну кнопку мыши -[FEC_ONF] -Пешком [FEC_ORR] или @@ -2962,9 +2946,6 @@ Toggle Pad Game/Debug [FEC_VES] Управление машиной -[FEC_VIB] -Vibration: - [FEC_WAR] Внимание! @@ -3692,7 +3673,7 @@ No Memory Card (PS2) in MEMORY CARD slot 1. УДАЛЕНИЕ ИГРЫ [FET_DIS] -НАСТРОЙКА ГРАФИКИ +НАСТРОЙКА ДИСПЛЕЯ [FET_DSN] Обычная}одежда.bmp @@ -3706,9 +3687,6 @@ No Memory Card (PS2) in MEMORY CARD slot 1. [FET_FIL] Фильтр -[FET_GFX] -НАСТРОЙКА ГРАФИКИ - [FET_GT] ТИП ИГРЫ @@ -4109,7 +4087,7 @@ Fill First File With Guff ~w~Вот, это ружьишко поможет тебе снести несколько голов! [FM3_8I] -~w~Займи удобную позицию, я пойду сразу, после твоего первого высрела. +~w~Займи удобную позицию, я пойду сразу, после твоего первого выстрела. [FM3_A] ~w~Мы должны убрать этих колумбийских ублюдков, @@ -4214,7 +4192,7 @@ FormatMemCard 1 (teststuff) ЗАДАНИЯ САЛЬВАТОРЕ [FRENCH] -Французкий +Французский [FTUTOR] Нажми кнопку ~h~~k~~TOGGLE_SUBMISSIONS~~w~, чтобы заняться работой пожарного, или отказаться от нее. @@ -4309,17 +4287,17 @@ FormatMemCard 1 (teststuff) [GA_5] Я уже поставил в бомбу в эту тачку. -[GA_6] -Припаркуй тачку на место, нажми ~h~~k~~PED_FIREWEAPON~~w~ и ДЕЛАЙ НОГИ! +[GA_6] { re3 change } +Припаркуй тачку на место, нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~ и ДЕЛАЙ НОГИ! -[GA_6B] -Припаркуй тачку на место, нажми ~h~~k~~PED_FIREWEAPON~~w~ и ДЕЛАЙ НОГИ! +[GA_6B] { re3 change } +Припаркуй тачку на место, нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~ и ДЕЛАЙ НОГИ! -[GA_7] -Включи бомбу, нажав на ~h~~k~~PED_FIREWEAPON~~w~. Бомба взорвется как только заведется мотор. +[GA_7] { re3 change } +Включи бомбу, нажав на ~h~~k~~VEHICLE_FIREWEAPON~~w~. Бомба взорвется как только заведется мотор. -[GA_7B] -Включи бомбу, нажав на ~h~~k~~PED_FIREWEAPON~~w~. Бомба взорвется как только заведется мотор. +[GA_7B] { re3 change } +Включи бомбу, нажав на ~h~~k~~VEHICLE_FIREWEAPON~~w~. Бомба взорвется как только заведется мотор. [GA_8] Взорви бомбу с помощью детонатора. @@ -4553,10 +4531,10 @@ Pull the ~h~right analog stick~w~ back to ~h~brake~w~, or to ~h~reverse~w~ if th Нажми и удерживай~h~ ~k~~PED_LOCK_TARGET~~w~ кнопку, чтобы ~h~прицелиться~w~ из снайперской винтовки. [HELP8_A] -Нажми ~h~ ~k~~PED_SNIPER_ZOOM_IN~~w~, чтобы ~h~увеличить ~w~ изображение или ~h~ ~k~~PED_SNIPER_ZOOM_OUT~~w~, чтобы ~h~уменьшить~w~ его при при прицеливании из снайперской винтовки. +Нажми ~h~ ~k~~PED_SNIPER_ZOOM_IN~~w~, чтобы ~h~увеличить ~w~ изображение или ~h~ ~k~~PED_SNIPER_ZOOM_OUT~~w~, чтобы ~h~уменьшить~w~ его при прицеливании из снайперской винтовки. [HELP8_B] -Нажми ~h~ ~k~~PED_SNIPER_ZOOM_IN~~w~, чтобы ~h~увеличить ~w~ изображение или ~h~ ~k~~PED_SNIPER_ZOOM_OUT~~w~, чтобы ~h~уменьшить~w~ его при при прицеливании из снайперской винтовки. +Нажми ~h~ ~k~~PED_SNIPER_ZOOM_IN~~w~, чтобы ~h~увеличить ~w~ изображение или ~h~ ~k~~PED_SNIPER_ZOOM_OUT~~w~, чтобы ~h~уменьшить~w~ его при прицеливании из снайперской винтовки. [HELP9_A] Нажми ~h~ ~k~~PED_FIREWEAPON~~w~, чтобы ~h~выстрелить~w~ из снайперской винтовки. @@ -4666,11 +4644,11 @@ Pull the ~h~right analog stick~w~ back to ~h~brake~w~, or to ~h~reverse~w~ if th [HM1_H] Сделай так, чтобы этих Девяток здесь не было! -[HM2_1] -Используй радоуправляемые машинки, чтобы подорвать броневики. Взрыв бомбы - ~h~~k~~PED_FIREWEAPON~~w~. +[HM2_1] { re3 change } +Используй радиоуправляемые машинки, чтобы подорвать броневики. Взрыв бомбы - ~h~~k~~VEHICLE_FIREWEAPON~~w~. -[HM2_1A] -Используй радоуправляемые машинки, чтобы подорвать броневики. Взрыв бомбы - ~h~~k~~PED_FIREWEAPON~~w~. +[HM2_1A] { re3 change } +Используй радиоуправляемые машинки, чтобы подорвать броневики. Взрыв бомбы - ~h~~k~~VEHICLE_FIREWEAPON~~w~. [HM2_2] ~r~Ты так и не смог подорвать все броневики! @@ -5272,11 +5250,11 @@ Italian [KM1_7] ~g~Проезд только для полицейских! -[KM1_8A] -Чтобы ~h~подорвать бомбу~w~, нажми ~h~~k~~PED_FIREWEAPON~~w~, но не забудь отойти подальше от машины. +[KM1_8A] { re3 change } +Чтобы ~h~подорвать бомбу~w~, нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~, но не забудь отойти подальше от машины. -[KM1_8D] -Чтобы ~h~подорвать бомбу~w~, нажми ~h~~k~~PED_FIREWEAPON~~w~, но не забудь отойти подальше от машины. +[KM1_8D] { re3 change } +Чтобы ~h~подорвать бомбу~w~, нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~, но не забудь отойти подальше от машины. [KM1_9] ~r~Установленной в машине бомбой ты должен был взорвать стену! @@ -5903,7 +5881,7 @@ LOADING VEHICLE... (PRESS L1 TO CANCEL) По настоящему важный груз до сих пор все еще в самолете. [LOVE4_D] -К несчастью, власти аэаропорта все же решили задержать и обыскать самолет, +К несчастью, власти аэропорта все же решили задержать и обыскать самолет, [LOVE4_E] Поезжайте через мост в Шорсайд Вейл и затем в Международный аэропорт Фрэнсис. @@ -6520,11 +6498,11 @@ Parse Heap [PAUSED] ИГРА ОСТАНОВЛЕНА -[PBOAT_1] -Чтобы выстрелить из орудия катера нажми ~h~~k~~PED_FIREWEAPON~~w~. +[PBOAT_1] { re3 change } +Чтобы выстрелить из орудия катера нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~. -[PBOAT_2] -Чтобы выстрелить из орудия катера нажми ~h~~k~~PED_FIREWEAPON~~w~. +[PBOAT_2] { re3 change } +Чтобы выстрелить из орудия катера нажми ~h~~k~~VEHICLE_FIREWEAPON~~w~. [PCLOAD] Loading File Data @@ -6700,11 +6678,11 @@ Quit Options [RCBANDT] Багги Бандит -[RCHELP] -Чтобы подорвать машинку, нажми ~k~~PED_FIREWEAPON~, или врежься в колесо жертвы. +[RCHELP] { re3 change } +Чтобы подорвать машинку, нажми ~k~~VEHICLE_FIREWEAPON~, или врежься в колесо жертвы. -[RCHELPA] -Чтобы подорвать машинку, нажми ~k~~PED_FIREWEAPON~, или врежься в колесо жертвы. +[RCHELPA] { re3 change } +Чтобы подорвать машинку, нажми ~k~~VEHICLE_FIREWEAPON~, или врежься в колесо жертвы. [RC_1] У тебя 2 минуты, чтобы подорвать как можно больше машин Дьяволов! @@ -6968,7 +6946,7 @@ Rise FM Вот тебе ключ от тайника. [RM6_2] -В нем я на черный день припрятал наличные и кое какие полезные вещички. +В нем я на черный день припрятал наличные и кое-какие полезные вещички. [RM6_3] Увидимся. @@ -7144,11 +7122,11 @@ Speeder [SPRAY1] В мастерской твою тачку ~h~отремонтируют~w~ и ~h~перекрасят~w~. Копы тебя больше ~h~не узнают~w~. Стоимость - ~h~$1000~w~. Первый раз это бесплатно. -[SPRAY_1] -Чтобы включить брандспойт, нажми на ~h~~k~~PED_FIREWEAPON~~w~. +[SPRAY_1] { re3 change } +Чтобы включить брандспойт, нажми на ~h~~k~~VEHICLE_FIREWEAPON~~w~. -[SPRAY_4] -Чтобы включить брандспойт, нажми на ~h~~k~~PED_FIREWEAPON~~w~. +[SPRAY_4] { re3 change } +Чтобы включить брандспойт, нажми на ~h~~k~~VEHICLE_FIREWEAPON~~w~. [STADIUM] Аспатрия @@ -7706,7 +7684,7 @@ The controller connected to controller port 1 is an unsupported controller. Gran ~r~Машина разбита! [WRONGCD] -Неверный диск. Пожалуйст,а вставьте нужный диск. +Неверный диск. Пожалуйста, вставьте нужный диск. [WRONGT1] ~g~За работой приходи между 05:00 и 21:00 @@ -7787,7 +7765,7 @@ x $1000!! [YD1_C] -~w~Мои люди будут наблюдать на всеми контрольными точками. +~w~Мои люди будут наблюдать за всеми контрольными точками. [YD1_CNT] ~1~ из 15! @@ -7957,6 +7935,9 @@ PS: УМРИ, ПАРШИВЫЙ ПЕС, УМРИ! РУССКИЙ { new display menus } +[FET_GFX] +НАСТРОЙКА ГРАФИКИ + [FED_MIP] МИП-МАППИНГ @@ -7972,6 +7953,164 @@ PS: УМРИ, ПАРШИВЫЙ ПЕС, УМРИ! [FED_TRL] ТРИЛИНЕЙНАЯ +[FED_WND] +ОКОННЫЙ + +[FED_FLS] +ПОЛНОЭКРАННЫЙ + +[FEM_CSB] +CUTSCENE BORDERS + +[FEM_SCF] +ФОРМАТ ОКНА + +[FEM_ISL] +MAP MEMORY USAGE + +[FEM_LOW] +LOW + +[FEM_MED] +MEDIUM + +[FEM_HIG] +HIGH + +[FEM_2PR] +PS2 ALPHA TEST + +[FEC_FRC] +СВОБОДНАЯ КАМЕРА + +{ Linux joy detection } +[FEC_JOD] +DETECT JOYSTICK + +[FEC_JPR] +Press any key on the joystick of your choice that you want to use on the game, and it will be selected. + +[FEC_JDE] +Detected joystick + +{ mission restart } +[FET_RMS] +ПОВТОРИТЬ ЗАДАНИЕ + +[FESZ_RM] +НАЧАТЬ ЗАНОВО? + +{ more graphics } +[FED_VPL] +VEHICLE PIPELINE + +[FED_PRM] +PED RIM LIGHT + +[FED_RGL] +ROAD GLOSS + +[FED_CLF] +COLOUR FILTER + +[FED_WLM] +WORLD LIGHTMAPS + +[FED_MBL] +MOTION BLUR + +[FEM_SIM] +SIMPLE + +[FEM_NRM] +NORMAL + +[FEM_MOB] +MOBILE + +[FED_MFX] +MATFX + +[FED_NEO] +NEO + +[FEM_PS2] +PS2 + +[FEM_XBX] +XBOX + +[FEM_AUT] { aspect ratio related } +АВТО + +{ controls } +[FEC_IVP] +ИНВЕРТИРОВАТЬ ВЕРТИКАЛЬНУЮ ОСЬ + +{ map } +[FEM_TWP] +Поставить метку + +[FEA_FMN] +РАДИО ВЫКЛ + +[FEC_DS2] +DUALSHOCK 2 + +[FEC_DS3] +DUALSHOCK 3 + +[FEC_DS4] +DUALSHOCK 4 + +[FEC_360] +КОНТРОЛЛЕР XBOX 360 + +[FEC_ONE] +КОНТРОЛЛЕР XBOX ONE + +[FEC_NSW] +КОНТРОЛЛЕР NINTENDO SWITCH + +[FEC_TYP] +ГЕЙМПАД + +[FEC_CCF] +КОНФИГУРАЦИЯ + +[FEC_CF1] +СХЕМА 1 + +[FEC_CF2] +СХЕМА 2 + +[FEC_CF3] +СХЕМА 3 + +[FEC_CF4] +СХЕМА 4 + +[FEC_CDP] +ТИП УПРАВЛЕНИЯ + +[FEC_ONF] +ПЕШКОМ + +[FEC_INC] +В МАШИНЕ + +[FEC_VIB] +ВИБРАЦИЯ + +[FET_AGS] +НАСТРОЙКИ ГЕЙМПАДА + +[FEM_PED] +PED DENSITY + +[FEM_CAR] +CAR DENSITY + { end of file } [DUMMY] diff --git a/utils/gxt/spanish.txt b/utils/gxt/spanish.txt index b58fa845..2775d342 100644 --- a/utils/gxt/spanish.txt +++ b/utils/gxt/spanish.txt @@ -1,4 +1,16 @@ -{ Grand Theft Auto III Spanish (Spain) Translation } +{ + New strings are at the bottom of file. + Do not change the order of strings. + You can fix the typos of existing translation but please refrain from + unnecessary edits like rephasing because you think it suits better for your taste. + + SPANISH NOTE: + This is European Spanish, do not mix it with Latin American Spanish. + If you want the Latin American Spanish translation you'd have to create + a separate txt for it. +} + +{ Grand Theft Auto III Spanish (Spain) Translation } { Contains some of the official fixes made by Rockstar for the iOS port } { Additional translation rewrites, corrections and fixes by IlDucci } @@ -372,7 +384,7 @@ Playa de Portland Saint Mark's [REDLIGH] -Barrio rojo +Red Light District [TOWERS] Cerros de Hepburn @@ -636,7 +648,7 @@ Puedes practicar disparando a estas dianas. Vuelve a la misión cuando hayas ter ~g~Busca un cliente. [FARE1] -~g~Ve al ~w~club Sex Kitten Meeouch ~g~en el barrio rojo. +~g~Ve al ~w~club Sex Kitten Meeouch ~g~en el Red Light District. [FARE2] ~g~Ve a ~w~Supa Save ~g~en Portland View. @@ -648,13 +660,13 @@ Puedes practicar disparando a estas dianas. Vuelve a la misión cuando hayas ter ~g~Ve a la ~w~cafetería Greasy Joe ~g~en Callahan Point. [FARE5] -~g~Ve a la ~w~tienda de armas Ammu-Nation ~g~en el barrio rojo. +~g~Ve a la ~w~tienda de armas Ammu-Nation ~g~en el Red Light District. [FARE6] ~g~Ve a ~w~Easy Credit Autos ~g~en Saint Mark's. [FARE7] -~g~Ve al ~w~bar de topless de Woody ~g~en el barrio rojo. +~g~Ve al ~w~bar de topless de Woody ~g~en el Red Light District. [FARE8] ~g~Ve al ~w~restaurante Marcos ~g~en Saint Mark's. @@ -756,7 +768,7 @@ Pulsa ~h~~k~~TOGGLE_SUBMISSIONS~~w~ para activar o desactivar las misiones del c ¡Has volado durante ~1~ segundos! [EBAL_A] -Conozco un lugar en las afueras del barrio rojo donde podemos escondernos, +Conozco un lugar en las afueras del Red Light District donde podemos escondernos, [EBAL_A1] pero mis manos están destrozadas, así que conduce tú, hermano. @@ -1553,7 +1565,7 @@ Eso no es un masajeador. ~r~Muy bonito, ¡has asustado al objetivo! ¿Y te consideras un asesino? [AM1_5] -~g~Ve al barrio rojo y espera a que Salvatore salga del club. +~g~Ve al Red Light District y espera a que Salvatore salga del club. [AM1_7] ~r~Salvatore está en su casita, sano y salvo, tomándose un cóctel. ¡Nadie te va a llamar ''Chacal''! @@ -2246,11 +2258,11 @@ Una bomba de coche vale 1.000 dólares. [GA_5] Tu coche ya tiene una bomba instalada. -[GA_6] -¡Apárcalo, actívala pulsando ~h~~k~~PED_FIREWEAPON~~w~ y SAL PITANDO! +[GA_6] { re3 change } +¡Apárcalo, actívala pulsando ~h~~k~~VEHICLE_FIREWEAPON~~w~ y SAL PITANDO! -[GA_7] -Activa la bomba pulsando ~h~~k~~PED_FIREWEAPON~~w~. Estallará cuando se arranque el motor. +[GA_7] { re3 change } +Activa la bomba pulsando ~h~~k~~VEHICLE_FIREWEAPON~~w~. Estallará cuando se arranque el motor. [GA_8] Utiliza el detonador para activar la bomba. @@ -2466,33 +2478,6 @@ Acelerar [FEC_SMT] Activar misión especial -[FEC_CCF] -Configuración: - -[FEC_CF1] -Ajuste1 - -[FEC_CF2] -Ajuste2 - -[FEC_CF3] -Ajuste3 - -[FEC_CF4] -Ajuste4 - -[FEC_CDP] -Controles a mostrar: - -[FEC_ONF] -A pie - -[FEC_INC] -En vehículos - -[FEC_VIB] -Vibración: - [FEA_OUT] Salida: @@ -3633,11 +3618,11 @@ que tendré trabajo para ti. [JM6_1] Llévanos al banco de la avenida principal. -[GA_6B] -¡Apárcalo, actívala pulsando ~h~~k~~PED_FIREWEAPON~~w~ y SAL PITANDO! +[GA_6B] { re3 change } +¡Apárcalo, actívala pulsando ~h~~k~~VEHICLE_FIREWEAPON~~w~ y SAL PITANDO! -[GA_7B] -Activa la bomba pulsando ~h~~k~~PED_FIREWEAPON~~w~. Estallará cuando se arranque el motor. +[GA_7B] { re3 change } +Activa la bomba pulsando ~h~~k~~VEHICLE_FIREWEAPON~~w~. Estallará cuando se arranque el motor. [BAT1] ~g~¡Coge el bate! @@ -4059,11 +4044,11 @@ Mete tu vehículo en el taller de pintura para perder tu ~h~nivel de búsqueda~w [HM1_1] ~g~Cepíllate a 20 Purple Nines en 2 minutos y 30 segundos. -[KM1_8A] -Pulsa ~h~~k~~PED_FIREWEAPON~~w~ para ~h~activar la bomba~w~. Acuérdate de alejarte de ella. +[KM1_8A] { re3 change } +Pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para ~h~activar la bomba~w~. Acuérdate de alejarte de ella. -[KM1_8D] -Pulsa ~h~~k~~PED_FIREWEAPON~~w~ para ~h~activar la bomba~w~. Acuérdate de alejarte de ella. +[KM1_8D] { re3 change } +Pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para ~h~activar la bomba~w~. Acuérdate de alejarte de ella. [KM1_12] ~g~¡Llévalo al dojo, pero deshazte primero de la policía! @@ -4200,11 +4185,11 @@ No necesito tu documentación, pareces de fiar. [DETON] DETONACIÓN: -[DRIVE_A] -Ten una Uzi seleccionada cuando entres en un vehículo, luego mira a la izquierda o a la derecha y pulsa ~h~~k~~PED_FIREWEAPON~~w~ para disparar. +[DRIVE_A] { re3 change } +Ten una Uzi seleccionada cuando entres en un vehículo, luego mira a la izquierda o a la derecha y pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para disparar. -[DRIVE_B] -Ten una Uzi seleccionada cuando entres en un vehículo, luego mira a la izquierda o a la derecha y pulsa ~h~~k~~PED_FIREWEAPON~~w~ para disparar. +[DRIVE_B] { re3 change } +Ten una Uzi seleccionada cuando entres en un vehículo, luego mira a la izquierda o a la derecha y pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para disparar. [RECORD] ~g~¡NUEVO RÉCORD! @@ -4212,11 +4197,11 @@ Ten una Uzi seleccionada cuando entres en un vehículo, luego mira a la izquierd [NRECORD] ~r~¡NO HAY UN NUEVO RÉCORD! -[RCHELP] -Pulsa ~k~~PED_FIREWEAPON~ o lleva el coche teledirigido hasta las ruedas de otro coche para detonarlo. +[RCHELP] { re3 change } +Pulsa ~k~~VEHICLE_FIREWEAPON~ o lleva el coche teledirigido hasta las ruedas de otro coche para detonarlo. -[RCHELPA] -Pulsa ~k~~PED_FIREWEAPON~ o lleva el coche teledirigido hasta las ruedas de otro coche para detonarlo. +[RCHELPA] { re3 change } +Pulsa ~k~~VEHICLE_FIREWEAPON~ o lleva el coche teledirigido hasta las ruedas de otro coche para detonarlo. [RC_1] ¡Tienes 2 minutos para destruir todos los coches de los Diablos que puedas! @@ -4447,7 +4432,7 @@ tomándolos por el camino. ¡Cuando alcances a ese bandido espaciado con SPANK, chíngatelo! [DIAB4_H] -Luego reparte mis revistas XXX por el barrio rojo. +Luego reparte mis revistas XXX por el Red Light District. [DIAB4_1] ~g~Lleva la furgoneta a la parte de atrás de Revistas XXX. @@ -4579,7 +4564,7 @@ si no les doy una parte. He dejado un coche dentro de la fábrica. [MEA2_G] -Ve a recogerles con él en su territorio, en el barrio rojo. +Ve a recogerles con él en su territorio, en el Red Light District. [MEA2_H] Luego tráelos a la fábrica para que conozcan la opinión de Marty. @@ -4716,11 +4701,11 @@ Luigi dijo que eras de fiar, así que vuelve más tarde, [RM5_6] ~g~¡Ha salido de la ambulancia! ¡Cárgate su escayola con un vehículo o una explosión! -[PBOAT_1] -Pulsa ~h~~k~~PED_FIREWEAPON~~w~ para disparar los cañones de la lancha. +[PBOAT_1] { re3 change } +Pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para disparar los cañones de la lancha. -[PBOAT_2] -Pulsa ~h~~k~~PED_FIREWEAPON~~w~ para disparar los cañones de la lancha. +[PBOAT_2] { re3 change } +Pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para disparar los cañones de la lancha. [DIAB1_B] Al habla El Burro, de los Diablos. @@ -4734,11 +4719,11 @@ Hay una carrera que empezará junto a la sala Clásica, cerca del puente Callaha [DIAB1_F] Consíguete un buen carro y el primero que pase por todos los puntos de control se llevará el premio. -[HM2_1] -Usa los coches teledirigidos para destruir los furgones blindados. Pulsa ~h~~k~~PED_FIREWEAPON~ ~w~para detonarlos. +[HM2_1] { re3 change } +Usa los coches teledirigidos para destruir los furgones blindados. Pulsa ~h~~k~~VEHICLE_FIREWEAPON~ ~w~para detonarlos. -[HM2_1A] -Usa los coches teledirigidos para destruir los furgones blindados. Pulsa ~h~~k~~PED_FIREWEAPON~ ~w~para detonarlos. +[HM2_1A] { re3 change } +Usa los coches teledirigidos para destruir los furgones blindados. Pulsa ~h~~k~~VEHICLE_FIREWEAPON~ ~w~para detonarlos. [HM2_2] ~r~¡No has destruido todos los furgones blindados! @@ -6545,11 +6530,11 @@ Esta Memory Card (PS2) ya está formateada. [FEDSAS4] ;=<> - CAMBIAR SELECCIÓN -[SPRAY_4] -Pulsa ~h~~k~~PED_FIREWEAPON~~w~ para disparar el cañón de agua. +[SPRAY_4] { re3 change } +Pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para disparar el cañón de agua. -[SPRAY_1] -Pulsa ~h~~k~~PED_FIREWEAPON~~w~ para disparar el cañón de agua. +[SPRAY_1] { re3 change } +Pulsa ~h~~k~~VEHICLE_FIREWEAPON~~w~ para disparar el cañón de agua. [LITTLE] LITTLE T @@ -7153,7 +7138,7 @@ Color del jugador Liberty City [FEM_MA1] -Barrio rojo +Red Light District [FEM_MA2] Chinatown @@ -7305,9 +7290,6 @@ CONEXIÓN [FET_AUD] AJUSTES DE AUDIO -[FET_GFX] -AJUSTES GRÁFICOS - [FET_DIS] AJUSTES DE PANTALLA @@ -8015,7 +7997,7 @@ POLACO RUSO { new display menus } -[FET_GRA] +[FET_GFX] AJUSTES GRÁFICOS [FED_MIP] @@ -8119,12 +8101,75 @@ PS2 [FEM_XBX] XBOX +[FEM_AUT] +AUTOM. + [FEC_IVP] INVERTIR VERTICALIDAD MANDO [FEM_TWP] Poner o quitar punto de referencia +[FEA_FMN] +RADIO APAGADA + +[FEC_DS2] +DUALSHOCK 2 + +[FEC_DS3] +DUALSHOCK 3 + +[FEC_DS4] +DUALSHOCK 4 + +[FEC_360] +MANDO DE XBOX 360 + +[FEC_ONE] +MANDO DE XBOX ONE + +[FEC_NSW] +MANDO DE NINTENDO SWITCH + +[FEC_TYP] +TIPO DE MANDO + +[FEC_CCF] +CONFIGURACIÓN + +[FEC_CF1] +AJUSTE 1 + +[FEC_CF2] +AJUSTE 2 + +[FEC_CF3] +AJUSTE 3 + +[FEC_CF4] +AJUSTE 4 + +[FEC_CDP] +CONTROLES A MOSTRAR + +[FEC_ONF] +A PIE + +[FEC_INC] +EN VEHÍCULO + +[FEC_VIB] +VIBRACIÓN + +[FET_AGS] +AJUSTES DE MANDO + +[FEM_PED] +PED DENSITY + +[FEM_CAR] +CAR DENSITY + { end of file } [DUMMY]