mirror of
https://github.com/halpz/re3.git
synced 2026-06-29 13:35:15 +00:00
sync
This commit is contained in:
@@ -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
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
# - os: 'windows-latest'
|
||||
# platform: 'd3d9'
|
||||
# audio: 'miles'
|
||||
- os: 'ubuntu-latest'
|
||||
- os: 'ubuntu-18.04'
|
||||
platform: 'gl3'
|
||||
gl3_gfxlib: 'glfw'
|
||||
audio: 'openal'
|
||||
|
||||
@@ -6,13 +6,9 @@ on:
|
||||
release:
|
||||
types: published
|
||||
env:
|
||||
GLEW_VER: "2.1.0"
|
||||
GLFW_VER: "3.3.2"
|
||||
GLEW_BASE: "glew-2.1.0"
|
||||
GLFW_BASE: "glfw-3.3.2.bin.WIN64"
|
||||
GLEW_FILE: "glew-2.1.0-win32.zip"
|
||||
GLFW_FILE: "glfw-3.3.2.bin.WIN64.zip"
|
||||
GLEW_URL: "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0-win32.zip"
|
||||
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN64.zip"
|
||||
jobs:
|
||||
build:
|
||||
@@ -27,11 +23,6 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
|
||||
name: Download glew
|
||||
uses: carlosperate/download-file-action@v1.0.3
|
||||
with:
|
||||
file-url: ${{env.GLEW_URL}}
|
||||
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
|
||||
name: Download glfw
|
||||
uses: carlosperate/download-file-action@v1.0.3
|
||||
@@ -40,22 +31,29 @@ jobs:
|
||||
- if: ${{ matrix.platform }} == "win-amd64-librw_gl3_glfw-mss"
|
||||
name: Unpack archives
|
||||
run: |
|
||||
7z x ${{env.GLEW_FILE}}
|
||||
7z x ${{env.GLFW_FILE}}
|
||||
- name: Configure build
|
||||
run: |
|
||||
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir64=${{env.GLFW_BASE}}
|
||||
./premake5 vs2019 --with-librw --glfwdir64=${{env.GLFW_BASE}}
|
||||
- name: Build
|
||||
run: |
|
||||
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||
- name: Pack artifacts
|
||||
# - name: Pack artifacts
|
||||
# run: |
|
||||
# 7z a reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||
- name: Move binaries to gamefiles
|
||||
run: |
|
||||
7z a reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reLCS.exe ./gamefiles/
|
||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reLCS.pdb ./gamefiles/
|
||||
- name: Move dynamic dependencies to gamefiles
|
||||
run: |
|
||||
mv ./vendor/mpg123/dist/Win64/libmpg123-0.dll ./gamefiles/
|
||||
mv ./vendor/openal-soft/dist/Win64/OpenAL32.dll ./gamefiles/
|
||||
- name: Upload artifact to actions
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: reLCS_${{matrix.buildtype}}_${{matrix.platform}}
|
||||
path: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
||||
path: ./gamefiles/*
|
||||
# - name: Upload artifact to Bintray
|
||||
# uses: hpcsc/upload-bintray-docker-action@v1
|
||||
# with:
|
||||
|
||||
@@ -6,13 +6,9 @@ on:
|
||||
release:
|
||||
types: published
|
||||
env:
|
||||
GLEW_VER: "2.1.0"
|
||||
GLFW_VER: "3.3.2"
|
||||
GLEW_BASE: "glew-2.1.0"
|
||||
GLFW_BASE: "glfw-3.3.2.bin.WIN32"
|
||||
GLEW_FILE: "glew-2.1.0-win32.zip"
|
||||
GLFW_FILE: "glfw-3.3.2.bin.WIN32.zip"
|
||||
GLEW_URL: "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0-win32.zip"
|
||||
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip"
|
||||
jobs:
|
||||
build:
|
||||
@@ -27,11 +23,6 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'true'
|
||||
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
|
||||
name: Download glew
|
||||
uses: carlosperate/download-file-action@v1.0.3
|
||||
with:
|
||||
file-url: ${{env.GLEW_URL}}
|
||||
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
|
||||
name: Download glfw
|
||||
uses: carlosperate/download-file-action@v1.0.3
|
||||
@@ -40,22 +31,30 @@ jobs:
|
||||
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
|
||||
name: Unpack archives
|
||||
run: |
|
||||
7z x ${{env.GLEW_FILE}}
|
||||
7z x ${{env.GLFW_FILE}}
|
||||
- name: Configure build
|
||||
run: |
|
||||
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir32=${{env.GLFW_BASE}}
|
||||
./premake5 vs2019 --with-librw --glfwdir32=${{env.GLFW_BASE}}
|
||||
- name: Build
|
||||
run: |
|
||||
msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||
- name: Pack artifacts
|
||||
# - name: Pack artifacts
|
||||
# run: |
|
||||
# 7z a reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||
- name: Move binaries to gamefiles
|
||||
run: |
|
||||
7z a reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reLCS.exe ./gamefiles/
|
||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reLCS.pdb ./gamefiles/
|
||||
- if: contains(matrix.platform, 'oal')
|
||||
name: Move dynamic dependencies to gamefiles
|
||||
run: |
|
||||
mv ./vendor/mpg123/dist/Win32/libmpg123-0.dll ./gamefiles/
|
||||
mv ./vendor/openal-soft/dist/Win32/OpenAL32.dll ./gamefiles/
|
||||
- name: Upload artifact to actions
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: reLCS_${{matrix.buildtype}}_${{matrix.platform}}
|
||||
path: reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip
|
||||
path: ./gamefiles/*
|
||||
# - name: Upload artifact to Bintray
|
||||
# uses: hpcsc/upload-bintray-docker-action@v1
|
||||
# with:
|
||||
|
||||
+3
-1
@@ -357,4 +357,6 @@ sdk/
|
||||
|
||||
codewarrior/reVC_Data/
|
||||
codewarrior/Release/
|
||||
codewarrior/Debug/
|
||||
codewarrior/Debug/
|
||||
|
||||
src/extras/GitSHA1.cpp
|
||||
@@ -6,6 +6,10 @@ set(PROJECT RELCS)
|
||||
project(${EXECUTABLE} C CXX)
|
||||
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(WIN32)
|
||||
set(${PROJECT}_AUDIOS "OAL" "MSS")
|
||||
else()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# reLCS
|
||||
[](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=lcs)
|
||||
<a href="https://discord.gg/aKYAwCx92H"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a>
|
||||
<a href="https://discord.gg/ERYg58ttcE"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a>
|
||||
|
||||
## Intro
|
||||
|
||||
|
||||
@@ -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(<refspecvar> <hashvar> [ALLOW_LOOKING_ABOVE_CMAKE_SOURCE_DIR])
|
||||
#
|
||||
# Returns the refspec and sha hash of the current head revision
|
||||
#
|
||||
# git_describe(<var> [<additional arguments to 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(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# 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(<var> [<additional arguments to git describe> ...])
|
||||
#
|
||||
# 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(<var>)
|
||||
#
|
||||
# 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 <ryan.pavlik@gmail.com> <abiryan@ryand.net>
|
||||
# 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()
|
||||
@@ -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 <rpavlik@iastate.edu> <abiryan@ryand.net>
|
||||
# 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()
|
||||
+933
-189
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="reVC.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
|
||||
id="svg8"
|
||||
version="1.1"
|
||||
viewBox="0 0 270.93331 270.93334"
|
||||
height="1024"
|
||||
width="1024"
|
||||
inkscape:export-filename="/home/hazelnot/Design/re3_final.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<defs
|
||||
id="defs2">
|
||||
<filter
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:label="Drop Shadow"
|
||||
id="filter1055">
|
||||
<feFlood
|
||||
flood-opacity="1"
|
||||
flood-color="rgb(0,0,0)"
|
||||
result="flood"
|
||||
id="feFlood1045" />
|
||||
<feComposite
|
||||
in="flood"
|
||||
in2="SourceGraphic"
|
||||
operator="in"
|
||||
result="composite1"
|
||||
id="feComposite1047" />
|
||||
<feGaussianBlur
|
||||
in="composite1"
|
||||
stdDeviation="0"
|
||||
result="blur"
|
||||
id="feGaussianBlur1049" />
|
||||
<feOffset
|
||||
dx="1"
|
||||
dy="1"
|
||||
result="offset"
|
||||
id="feOffset1051" />
|
||||
<feComposite
|
||||
in="SourceGraphic"
|
||||
in2="offset"
|
||||
operator="over"
|
||||
result="composite2"
|
||||
id="feComposite1053" />
|
||||
</filter>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1359"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:pagecheckerboard="false"
|
||||
showgrid="false"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="svg8"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:cy="624.20389"
|
||||
inkscape:cx="108.63858"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
borderopacity="1"
|
||||
bordercolor="#000000"
|
||||
pagecolor="#606060"
|
||||
id="base"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
lock-margins="false"
|
||||
units="px" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="g837"
|
||||
transform="matrix(2.1130708,0,0,2.1130708,14.956432,63.50059)"
|
||||
style="display:none">
|
||||
<path
|
||||
id="path1450"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.83595;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="M 0.91799998,0.91799998 V 54.101316 H 17.960888 v 2.33009 c 0,2.95453 1.347497,6.384348 3.911905,8.332308 2.564408,1.947971 5.514112,2.433445 8.500257,2.433445 h 46.367194 v -14.5464 c 2.171993,1.134845 4.548071,1.450557 6.948413,1.450557 h 17.042893 c 2.98614,0 5.93584,-0.485482 8.50025,-2.433442 2.5644,-1.94796 3.91191,-5.377273 3.91191,-8.331793 V 30.964744 c 0,-1.094128 -0.25094,-2.296243 -0.70487,-3.457153 0.45593,-1.16196 0.70487,-2.363609 0.70487,-3.453019 V 11.81656 c 0,-2.9682265 -1.29681,-6.3966108 -3.85713,-8.3907028 -2.56031,-1.9940909 -5.55104,-2.50785722 -8.55503,-2.50785722 H 83.819398 c -3.003989,0 -5.99213,0.51376632 -8.55245,2.50785722 C 74.832145,3.7645045 74.436551,4.1470248 74.074773,4.5591214 73.713016,4.1470532 73.317379,3.7644843 72.8826,3.4258572 70.322288,1.4317663 67.332073,0.91799998 64.328081,0.91799998 H 47.285195 c -2.976748,0 -5.937909,0.51342982 -8.482687,2.46289872 C 36.275393,1.4370808 33.325985,0.91799998 30.37305,0.91799998 Z"
|
||||
inkscape:label="Border" />
|
||||
<g
|
||||
id="g1475"
|
||||
inkscape:label="Text"
|
||||
style="display:inline"
|
||||
transform="translate(-51.547657,-77.439255)">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:11.136;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 84.566726,139.06892 c -4.562445,0 -6.843668,-1.73285 -6.843668,-5.19856 v -24.61088 c 0,-0.0877 -0.04387,-0.13161 -0.131609,-0.13161 h -3.22442 v 16.84595 H 60.679694 V 83.92475 h 23.887032 c 4.518575,0 6.777863,1.776721 6.777863,5.330164 v 12.239636 c 0,2.01801 -1.118676,3.15862 -3.356029,3.42183 2.281223,0.30709 3.421834,1.46964 3.421834,3.48764 v 20.07037 c 0,0.0877 0.04387,0.13161 0.131609,0.13161 h 33.823507 v 10.46292 z M 77.723058,94.585079 c 0,-0.08774 -0.04387,-0.131609 -0.131609,-0.131609 h -3.22442 v 6.31723 h 3.22442 c 0.08774,0 0.131609,-0.0439 0.131609,-0.13161 z m 33.955122,0 c 0,-0.08774 -0.0439,-0.131609 -0.13161,-0.131609 h -3.09281 c -0.0877,0 -0.13161,0.04387 -0.13161,0.131609 v 5.856601 h 3.35603 z m -10.1997,31.388741 c -4.562444,0 -6.843666,-1.73285 -6.843666,-5.19855 V 89.254914 c 0,-3.553443 2.281222,-5.330164 6.843666,-5.330164 h 17.04337 c 4.56244,0 6.84366,1.776721 6.84366,5.330164 v 20.991636 h -17.04336 v 5.13275 c 0,0.0877 0.0439,0.13161 0.13161,0.13161 h 3.09281 c 0.0877,0 0.13161,-0.0439 0.13161,-0.13161 v -2.50057 h 13.68733 v 7.89654 c 0,3.4657 -2.28122,5.19855 -6.84366,5.19855 z"
|
||||
id="path1452"
|
||||
transform="translate(-2.6458322)"
|
||||
inkscape:label="re" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:Pricedown;-inkscape-font-specification:Pricedown;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#c60000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:11.1359;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 135.23613,125.97382 c -4.56245,0 -6.84367,-1.73285 -6.84367,-5.19855 v -7.89654 h 13.68733 v 2.50057 c 0,0.0877 0.0439,0.13161 0.13161,0.13161 h 3.09281 c 0.0877,0 0.13161,-0.0439 0.13161,-0.13161 v -6.11982 c 0,-0.0877 -0.0439,-0.13161 -0.13161,-0.13161 h -16.71434 v -8.35717 h 16.71434 c 0.0877,0 0.13161,-0.0439 0.13161,-0.13161 v -6.054011 c 0,-0.08774 -0.0439,-0.131609 -0.13161,-0.131609 h -3.09281 c -0.0877,0 -0.13161,0.04387 -0.13161,0.131609 v 2.434766 h -13.55572 v -7.764931 c 0,-3.553443 2.28122,-5.330164 6.84366,-5.330164 h 16.91176 c 4.56245,0 6.84367,1.776721 6.84367,5.330164 v 12.239636 c 0,2.01801 -1.14061,3.15862 -3.42184,3.42183 2.28123,0.30709 3.42184,1.46964 3.42184,3.48764 v 12.37125 c 0,3.4657 -2.28122,5.19855 -6.84367,5.19855 z"
|
||||
id="path1458"
|
||||
inkscape:label="3" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g3625-7"
|
||||
inkscape:label="reVC_10"
|
||||
transform="matrix(2.4113736,0,0,2.4113736,-122.44911,-160.08821)">
|
||||
<path
|
||||
style="display:inline;fill:#00bbe2;fill-opacity:1;stroke:none;stroke-width:0.264583;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 102.78895,112.11187 54.54276,9.96769 -30.34918,43.22598 z"
|
||||
id="path1613-9"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:label="triangle" />
|
||||
<g
|
||||
id="g3669-0"
|
||||
style="display:inline;opacity:1"
|
||||
inkscape:label="re">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#f17db2;stroke-width:1.60863;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 57.388672,80.632812 v 48.632808 h 17.042969 v 4.60547 c 0,2.45514 1.029322,5.01368 3.011718,6.51953 1.982397,1.50586 4.425056,1.97071 7.123047,1.97071 H 128.6582 v -17.04688 h -1.47851 c 0.87224,-1.37715 1.47851,-2.92106 1.47851,-4.53906 v -7.23633 -3.95312 -20.330081 c 0,-2.481169 -1.00049,-5.053605 -2.98047,-6.595703 -1.97997,-1.542097 -4.44771,-2.027344 -7.15625,-2.027344 h -17.04296 c -2.708546,10e-7 -5.176278,0.485247 -7.156254,2.027344 -0.588908,0.458669 -0.913121,1.140613 -1.328125,1.751953 -0.409812,-0.606749 -0.72664,-1.284534 -1.308594,-1.742187 -1.967878,-1.547555 -4.428385,-2.03711 -7.119141,-2.03711 z m 6.582031,6.583985 h 20.595703 c 1.827819,0 2.757419,0.399739 3.048828,0.628906 0.29141,0.229167 0.4375,0.331111 0.4375,1.410156 v 12.238281 c 0,0.0702 0.0022,0.0438 0.002,0.0801 0.03874,-0.0312 0.06635,0.0114 -0.451172,0.0723 l -0.05469,6.53321 c 0.66816,0.0899 0.752817,0.24295 0.65625,0.14453 -0.09657,-0.0984 -0.08594,-0.3087 -0.08594,0.0801 v 20.07031 c 0,0.59276 0.198598,1.6281 0.996093,2.42578 0.797496,0.79768 1.834701,0.99805 2.427735,0.99805 h 30.53125 v 3.8789 H 84.566406 c -1.864454,0 -2.841799,-0.40191 -3.140625,-0.6289 -0.298826,-0.227 -0.410156,-0.26677 -0.410156,-1.27735 v -24.61132 c 0,-0.59276 -0.200551,-1.6281 -0.998047,-2.42579 -0.797496,-0.79768 -1.832748,-0.99804 -2.425781,-0.99804 h -6.517578 v 16.8457 h -7.103516 z m 37.507817,0 h 17.04296 c 1.8539,0 2.80813,0.402095 3.10938,0.636719 0.30124,0.234623 0.44336,0.33007 0.44336,1.402343 V 106.95508 H 105.0293 v 8.42383 c 0,0.59313 0.20067,1.63031 0.99804,2.42773 0.79738,0.79742 1.83258,0.99609 2.42578,0.99609 h 3.09376 c 0.59313,0 1.62836,-0.19872 2.42578,-0.99609 0.51996,-0.51993 0.73732,-1.1028 0.85937,-1.63672 h 7.24219 v 4.60547 c 0,1.01057 -0.11133,1.05035 -0.41016,1.27734 -0.29882,0.227 -1.27812,0.62891 -3.14258,0.62891 h -17.04296 c -1.864458,0 -2.841803,-0.40191 -3.140629,-0.62891 -0.298826,-0.22699 -0.410157,-0.26677 -0.410157,-1.27734 V 89.255859 c 0,-1.072272 0.140161,-1.167719 0.441407,-1.402343 0.301246,-0.234625 1.255472,-0.636719 3.109379,-0.636719 z M 71.074219,91.162109 V 104.0625 h 6.517578 c 0.592903,0 1.628193,-0.20031 2.425781,-0.99805 0.797588,-0.79773 0.998047,-1.83309 0.998047,-2.42578 v -6.052732 c 0,-0.592528 -0.200189,-1.629881 -0.998047,-2.427735 -0.797858,-0.797853 -1.83326,-0.996094 -2.425781,-0.996094 z m 37.378901,0 c -0.59275,0 -1.62809,0.198598 -2.42578,0.996094 -0.79768,0.797496 -0.99804,1.834701 -0.99804,2.427735 v 9.148442 h 9.9414 v -9.148442 c 0,-0.592903 -0.20031,-1.630147 -0.99804,-2.427735 -0.79774,-0.797588 -1.8331,-0.996094 -2.42578,-0.996094 z"
|
||||
id="path3671-2"
|
||||
inkscape:label="outline" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:1.25;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:9.53813;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 84.566726,139.06892 c -4.562445,0 -6.843668,-1.73285 -6.843668,-5.19856 v -24.61088 c 0,-0.0877 -0.04387,-0.13161 -0.131609,-0.13161 h -3.22442 v 16.84595 H 60.679694 V 83.92475 h 23.887032 c 4.518575,0 6.777863,1.776721 6.777863,5.330164 v 12.239636 c 0,2.01801 -1.118676,3.15862 -3.356029,3.42183 2.281223,0.30709 3.421834,1.46964 3.421834,3.48764 v 20.07037 c 0,0.0877 0.04387,0.13161 0.131609,0.13161 h 33.823507 v 10.46292 z M 77.723058,94.585079 c 0,-0.08774 -0.04387,-0.131609 -0.131609,-0.131609 h -3.22442 v 6.31723 h 3.22442 c 0.08774,0 0.131609,-0.0439 0.131609,-0.13161 z m 33.955122,0 c 0,-0.08774 -0.0439,-0.131609 -0.13161,-0.131609 h -3.09281 c -0.0877,0 -0.13161,0.04387 -0.13161,0.131609 v 5.856601 h 3.35603 z m -10.1997,31.388741 c -4.562444,0 -6.843666,-1.73285 -6.843666,-5.19855 V 89.254914 c 0,-3.553443 2.281222,-5.330164 6.843666,-5.330164 h 17.04337 c 4.56244,0 6.84366,1.776721 6.84366,5.330164 v 20.991636 h -17.04336 v 5.13275 c 0,0.0877 0.0439,0.13161 0.13161,0.13161 h 3.09281 c 0.0877,0 0.13161,-0.0439 0.13161,-0.13161 v -2.50057 h 13.68733 v 7.89654 c 0,3.4657 -2.28122,5.19855 -6.84366,5.19855 z"
|
||||
id="path3673-3"
|
||||
inkscape:label="text" />
|
||||
</g>
|
||||
<g
|
||||
id="g861-9-7"
|
||||
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#f17db2;stroke-opacity:1;filter:url(#filter1055)"
|
||||
transform="matrix(1.3835644,0,0,1.3835644,-22.936608,36.936115)"
|
||||
inkscape:label="Vc">
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#f17db2;stroke-width:3.175;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 115.29478,55.979585 a 1.0583349,1.0583349 0 0 0 -0.94727,0.53711 l -13.61915,24.06445 -1.763667,-7.15234 a 1.0583349,1.0583349 0 0 0 -1.28125,-0.77344 1.0583349,1.0583349 0 0 0 -0.77344,1.28125 l 2.40235,9.73438 a 1.0584408,1.0584408 0 0 0 1.947257,0.26757 l 14.9297,-26.38086 a 1.0583349,1.0583349 0 0 0 -0.39844,-1.4414 1.0583349,1.0583349 0 0 0 -0.49609,-0.13672 z"
|
||||
id="path892-1-5" />
|
||||
<path
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#f17db2;stroke-width:3.175;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="m 118.1854,69.604585 a 1.0583349,1.0583349 0 0 0 -0.27343,0.0391 c 0,0 -2.1903,0.59881 -4.46875,2.08789 -2.27846,1.48909 -4.77359,3.96951 -5.16602,7.69531 -0.20107,1.90898 0.49022,3.43086 1.68359,4.15821 1.19338,0.72735 2.6066,0.75222 3.94727,0.60547 2.68134,-0.29351 5.29297,-1.44336 5.29297,-1.44336 a 1.0583349,1.0583349 0 0 0 0.55078,-1.39063 1.0583349,1.0583349 0 0 0 -1.39063,-0.55273 c 0,0 -2.46507,1.04035 -4.68359,1.2832 -1.10926,0.12142 -2.10191,0.002 -2.61523,-0.31055 -0.51333,-0.31286 -0.82729,-0.72566 -0.67969,-2.12695 0.3049,-2.89473 2.23993,-4.85323 4.21875,-6.14648 1.97882,-1.29326 3.87305,-1.82032 3.87305,-1.82032 a 1.0583349,1.0583349 0 0 0 0.73828,-1.30078 1.0583349,1.0583349 0 0 0 -1.02735,-0.77734 z"
|
||||
id="path896-2-9" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 21 KiB |
+24
-23
@@ -1,10 +1,3 @@
|
||||
newoption {
|
||||
trigger = "glewdir",
|
||||
value = "PATH",
|
||||
description = "Directory of GLEW",
|
||||
default = "vendor/glew-2.1.0"
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "glfwdir64",
|
||||
value = "PATH",
|
||||
@@ -65,7 +58,7 @@ end
|
||||
|
||||
workspace "reLCS"
|
||||
language "C++"
|
||||
configurations { "Debug", "Release" }
|
||||
configurations { "Debug", "Release", "Vanilla" }
|
||||
startproject "reLCS"
|
||||
location "build"
|
||||
symbols "Full"
|
||||
@@ -120,13 +113,16 @@ workspace "reLCS"
|
||||
filter "configurations:Debug"
|
||||
defines { "DEBUG" }
|
||||
|
||||
filter "configurations:Release"
|
||||
filter "configurations:not Debug"
|
||||
defines { "NDEBUG" }
|
||||
optimize "Speed"
|
||||
if(_OPTIONS["lto"]) then
|
||||
flags { "LinkTimeOptimization" }
|
||||
end
|
||||
|
||||
filter "configurations:Vanilla"
|
||||
defines { "VANILLA_DEFINES" }
|
||||
|
||||
filter { "platforms:win*" }
|
||||
system "windows"
|
||||
|
||||
@@ -162,7 +158,6 @@ workspace "reLCS"
|
||||
|
||||
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
|
||||
@@ -173,9 +168,6 @@ workspace "reLCS"
|
||||
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)
|
||||
@@ -200,6 +192,7 @@ 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"
|
||||
@@ -208,6 +201,7 @@ project "librw"
|
||||
architecture "amd64"
|
||||
|
||||
filter "platforms:win*"
|
||||
defines { "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE" }
|
||||
staticruntime "on"
|
||||
buildoptions { "/Zc:sizedDealloc-" }
|
||||
|
||||
@@ -239,6 +233,10 @@ project "reLCS"
|
||||
targetname "reLCS"
|
||||
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") }
|
||||
@@ -264,6 +262,7 @@ project "reLCS"
|
||||
files { addSrcFiles("src/vehicles") }
|
||||
files { addSrcFiles("src/weapons") }
|
||||
files { addSrcFiles("src/extras") }
|
||||
files { "src/extras/GitSHA1.cpp" } -- this won't be in repo in first build
|
||||
|
||||
includedirs { "src" }
|
||||
includedirs { "src/animation" }
|
||||
@@ -316,7 +315,7 @@ project "reLCS"
|
||||
|
||||
filter {}
|
||||
if(os.getenv("GTA_LCS_RE_DIR")) then
|
||||
setpaths("$(GTA_LCS_RE_DIR)/", "%(cfg.buildtarget.name)")
|
||||
setpaths(os.getenv("GTA_LCS_RE_DIR") .. "/", "%(cfg.buildtarget.name)")
|
||||
end
|
||||
|
||||
filter "platforms:win*"
|
||||
@@ -330,6 +329,10 @@ project "reLCS"
|
||||
-- external librw is dynamic
|
||||
staticruntime "on"
|
||||
end
|
||||
prebuildcommands { '"%{prj.location}..\\printHash.bat" "%{prj.location}..\\src\\extras\\GitSHA1.cpp"' }
|
||||
|
||||
filter "platforms:not win*"
|
||||
prebuildcommands { '"%{prj.location}/../printHash.sh" "%{prj.location}/../src/extras/GitSHA1.cpp"' }
|
||||
|
||||
filter "platforms:win*glfw*"
|
||||
staticruntime "off"
|
||||
@@ -350,10 +353,10 @@ project "reLCS"
|
||||
libdirs { "vendor/openal-soft/libs/Win64" }
|
||||
|
||||
filter "platforms:linux*oal"
|
||||
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||
links { "openal", "mpg123", "sndfile", "pthread", "X11" }
|
||||
|
||||
filter "platforms:bsd*oal"
|
||||
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||
links { "openal", "mpg123", "sndfile", "pthread", "X11" }
|
||||
|
||||
filter "platforms:macosx*oal"
|
||||
links { "openal", "mpg123", "sndfile", "pthread" }
|
||||
@@ -393,25 +396,23 @@ project "reLCS"
|
||||
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" }
|
||||
links { "glfw" }
|
||||
linkoptions { "-framework OpenGL" }
|
||||
includedirs { "/opt/local/include" }
|
||||
includedirs { "/usr/local/include" }
|
||||
|
||||
@@ -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
|
||||
|
||||
<nul set /p=^"#define GIT_SHA1 ^"^"> %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
|
||||
<nul set /p="%version%" >> %1
|
||||
|
||||
:writeending
|
||||
|
||||
echo ^" >> %1
|
||||
echo const char* g_GIT_SHA1 = GIT_SHA1; >> %1
|
||||
|
||||
EXIT /B
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
> $1
|
||||
|
||||
echo -n "#define GIT_SHA1 \"" > $1
|
||||
|
||||
if (command -v "git" >/dev/null) then
|
||||
git rev-parse --short HEAD | tr -d '\n' >> $1
|
||||
fi
|
||||
|
||||
echo "\"" >> $1
|
||||
echo "const char* g_GIT_SHA1 = GIT_SHA1;" >> $1
|
||||
+6
-1
@@ -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}
|
||||
)
|
||||
@@ -46,6 +49,8 @@ if(LIBRW_PLATFORM_D3D9)
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${EXECUTABLE} PRIVATE CMAKE_BUILD)
|
||||
|
||||
if(${PROJECT}_AUDIO STREQUAL "OAL")
|
||||
find_package(OpenAL REQUIRED)
|
||||
target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})
|
||||
|
||||
@@ -230,3 +230,9 @@ CAnimBlendAssociation::UpdateBlend(float timeDelta)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CAnimBlendAssociation::Remove()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ public:
|
||||
void UpdateTimeStep(float timeDelta, float relSpeed);
|
||||
bool UpdateTime(float timeDelta, float relSpeed);
|
||||
bool UpdateBlend(float timeDelta);
|
||||
void Remove();
|
||||
|
||||
void SetRun(void) { flags |= ASSOC_RUNNING; }
|
||||
|
||||
|
||||
+222
-222
@@ -20,212 +20,212 @@ CAnimBlendAssocGroup *CAnimManager::ms_aAnimAssocGroups;
|
||||
CLinkList<CAnimBlendHierarchy*> 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 },
|
||||
{ ANIM_KO_SHOT_STOM, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ 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 },
|
||||
{ ANIM_KD_RIGHT, ASSOC_PARTIAL },
|
||||
{ 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_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_FIGHT_IDLE, ASSOC_REPEAT },
|
||||
{ ANIM_FIGHT2_IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_FIGHT_SH_F, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_PPUNCH, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_NOWALK },
|
||||
{ ANIM_L_HOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_R_HOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_UPPERCUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_HEADBUTT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FRONTKICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_ROUNDHOUSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_HIT_L_HOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_HIT_R_HOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_HIT_UPPERCUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_HIT_HEADBUTT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_HIT_FRONTKICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_HIT_RHOUSE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_BOMBER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_PUNCH_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_FIGHT_PPUNCH2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_KICK_FLOOR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_WEAPON_THROWU, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_FIGHT_SH_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ 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_JUMPIN_LHS, 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 | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVE_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVE_LOW_L, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVE_LOW_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVEBY_L, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVEBY_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVEBY_LOW_L, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVEBY_LOW_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_CAR_LB, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVE_BOAT, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVE_BOAT_L, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_DRIVE_BOAT_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BOAT_LB, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_PICKUP_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_PICKUP_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_PULLUP_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_PULLUP_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_ELBOW_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_ELBOW_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_FALL_OFF, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_BIKE_FALL_R, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ 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_TRAIN_GETIN, ASSOC_DELETEFADEDOUT },
|
||||
{ ANIM_TRAIN_GETOUT, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE },
|
||||
{ ANIM_CAR_CRAWLOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_CAR_CRAWLOUT_RHS2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_CAR_ROLLOUT_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ ANIM_CAR_ROLLOUT_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ 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 | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_JUMP_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_JUMP_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FALL_FALL, ASSOC_DELETEFADEDOUT },
|
||||
{ ANIM_FALL_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_FALL_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FALL_COLLAPSE, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FALL_BACK, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_FALL_FRONT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL },
|
||||
{ ANIM_EV_STEP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_EV_DIVE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ ANIM_COMMANDO_ROLL, 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_DUCK_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_DUCK_LOW, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_WEAPON_CROUCH, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_RBLOCK_CSHOOT, ASSOC_RUNNING },
|
||||
{ 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_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_PHONE_OUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_PHONE_TALK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_SEAT_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_SEAT_UP, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_SEAT_IDLE, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_SEAT_DOWN2, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_ATM, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_ABSEIL, 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 },
|
||||
{ ANIM_STD_KO_SHOT_STOMACH, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ 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 },
|
||||
{ ANIM_STD_SPINFORWARD_RIGHT, ASSOC_PARTIAL },
|
||||
{ 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 },
|
||||
{ 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_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_PARTIAL_PUNCH, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_NOWALK },
|
||||
{ ANIM_FIGHT_ATTACK_A1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_ATTACK_A2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_ATTACK_A3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_ATTACK_B1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_ATTACK_B2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_ATTACK_B3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_HIT_A1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_HIT_A2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_HIT_A3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_HIT_B1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_HIT_B2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_FIGHT_HIT_B3, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_STD_DETONATE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_PUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_PARTIALPUNCH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_KICKGROUND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_THROW_UNDER, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_FIGHT_SHUFFLE_B, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ 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_CAR_JUMP_IN_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 | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_DRIVE_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_DRIVE_LEFT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_DRIVE_RIGHT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_DRIVEBY_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_DRIVEBY_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_DRIVEBY_LEFT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_DRIVEBY_RIGHT_LO, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_CAR_LOOKBEHIND, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_BOAT_DRIVE, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING },
|
||||
{ ANIM_STD_BOAT_DRIVE_LEFT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_BOAT_DRIVE_RIGHT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_BOAT_LOOKBEHIND, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_STD_BIKE_PICKUP_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_BIKE_PICKUP_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_BIKE_PULLUP_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_BIKE_PULLUP_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_BIKE_ELBOW_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_BIKE_ELBOW_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_BIKE_FALLOFF, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_STD_BIKE_FALLBACK, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ 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_TRAIN_GETIN, ASSOC_DELETEFADEDOUT },
|
||||
{ ANIM_STD_TRAIN_GETOUT, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE },
|
||||
{ ANIM_STD_CRAWLOUT_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_CRAWLOUT_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_ROLLOUT_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ ANIM_STD_ROLLOUT_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ 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 | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_STD_JUMP_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_JUMP_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_STD_FALL, ASSOC_DELETEFADEDOUT },
|
||||
{ ANIM_STD_FALL_GLIDE, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_FALL_LAND, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_STD_FALL_COLLAPSE, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_STD_FALL_ONBACK, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_FALL_ONFRONT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_FRONTAL },
|
||||
{ ANIM_STD_EVADE_STEP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_STD_EVADE_DIVE, ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION | ASSOC_FRONTAL },
|
||||
{ ANIM_STD_COMMANDO_ROLL, 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_STD_DUCK_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_DUCK_LOW, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_DUCK_WEAPON, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_RBLOCK_SHOOT, ASSOC_RUNNING },
|
||||
{ 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_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_PHONE_OUT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_PHONE_TALK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_SEAT_DOWN, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_SEAT_UP, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_SEAT_IDLE, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_SEAT_RVRS, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_ATM, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_STD_ABSEIL, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aVanAnimDescs[] = {
|
||||
{ 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_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 },
|
||||
};
|
||||
AnimAssocDesc aCoachAnimDescs[] = {
|
||||
{ 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_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 },
|
||||
};
|
||||
AnimAssocDesc aBikeAnimDescs[] = {
|
||||
{ ANIM_BIKE_RIDE, ASSOC_DELETEFADEDOUT },
|
||||
{ ANIM_BIKE_STILL, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_READY, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_LEFT, ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_RIGHT, ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_BACK, ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_FWD, ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_PUSHES, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_JUMPON_R, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_JUMPON_L, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_LEANB, ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_LEANF, ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_WALKBACK, ASSOC_REPEAT | ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_JUMPON_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_JUMPON_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_KICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_HIT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_GETOFF_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_GETOFF_LHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_GETOFF_RHS, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_BIKE_GETOFF_BACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_HAS_TRANSLATION },
|
||||
{ ANIM_BIKE_DRIVEBY_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_DRIVEBY_LHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_DRIVEBY_FT, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_PASSENGER, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_DRIVEBY_RHS, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_DRIVEBY_FORWARD, ASSOC_DELETEFADEDOUT | ASSOC_PARTIAL | ASSOC_DRIVING },
|
||||
{ ANIM_BIKE_RIDE_P, ASSOC_DELETEFADEDOUT | ASSOC_DRIVING },
|
||||
};
|
||||
AnimAssocDesc aMeleeAnimDescs[] = {
|
||||
{ ANIM_MELEE_ATTACK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
@@ -242,25 +242,25 @@ AnimAssocDesc aSwingAnimDescs[] = {
|
||||
{ ANIM_MELEE_ATTACK_FINISH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aWeaponAnimDescs[] = {
|
||||
{ ANIM_WEAPON_FIRE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_WEAPON_CROUCHFIRE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_WEAPON_RELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_WEAPON_CROUCHRELOAD, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_ATTACK_1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_ATTACK_2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_ATTACK_EXTRA1, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_ATTACK_EXTRA2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aMedicAnimDescs[] = {
|
||||
{ ANIM_CPR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_MEDIC_CPR, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aSunbatheAnimDescs[] = {
|
||||
{ ANIM_SUNBATHE, ASSOC_REPEAT | ASSOC_PARTIAL },
|
||||
{ ANIM_SUNBATHE_IDLE, ASSOC_REPEAT | ASSOC_PARTIAL },
|
||||
{ ANIM_SUNBATHE_DOWN, ASSOC_HAS_X_TRANSLATION | ASSOC_HAS_TRANSLATION | ASSOC_PARTIAL },
|
||||
{ ANIM_SUNBATHE_UP, ASSOC_HAS_X_TRANSLATION | ASSOC_HAS_TRANSLATION | ASSOC_PARTIAL },
|
||||
{ ANIM_SUNBATHE_ESCAPE, ASSOC_HAS_X_TRANSLATION | ASSOC_HAS_TRANSLATION | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aPlayerIdleAnimDescs[] = {
|
||||
{ ANIM_IDLE_STRETCH, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_IDLE_TIME, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_IDLE_SHOULDER, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_IDLE_STRETCH_LEG, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_PLAYER_IDLE1, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_PLAYER_IDLE2, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_PLAYER_IDLE3, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_PLAYER_IDLE4, ASSOC_DELETEFADEDOUT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aRiotAnimDescs[] = {
|
||||
{ ANIM_RIOT_ANGRY, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
@@ -269,7 +269,7 @@ AnimAssocDesc aRiotAnimDescs[] = {
|
||||
{ ANIM_RIOT_PUNCHES, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_RIOT_SHOUT, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_RIOT_CHALLENGE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_RIOT_FUKU, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
{ ANIM_RIOT_FUCKYOU, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aStripAnimDescs[] = {
|
||||
{ ANIM_STRIP_A, ASSOC_REPEAT | ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
@@ -281,25 +281,25 @@ AnimAssocDesc aStripAnimDescs[] = {
|
||||
{ ANIM_STRIP_G, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL },
|
||||
};
|
||||
AnimAssocDesc aStdAnimDescsSide[] = {
|
||||
{ ANIM_WALK, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK },
|
||||
{ ANIM_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK },
|
||||
{ ANIM_SPRINT, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK },
|
||||
{ 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_HAS_X_TRANSLATION | ASSOC_WALK },
|
||||
{ ANIM_STD_RUN, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK },
|
||||
{ ANIM_STD_RUNFAST, ASSOC_REPEAT | ASSOC_MOVEMENT | ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION | ASSOC_WALK },
|
||||
{ ANIM_STD_IDLE, ASSOC_REPEAT },
|
||||
{ ANIM_STD_STARTWALK, ASSOC_HAS_TRANSLATION | ASSOC_HAS_X_TRANSLATION },
|
||||
};
|
||||
AnimAssocDesc aMPNoteAnimDescs[] = {
|
||||
{ ANIM_MPNOTE, ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_MPNOTE_LOOP, ASSOC_REPEAT | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_MULTIPLAYER_CUTSCENE_MPNOTE, ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP, ASSOC_REPEAT | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
};
|
||||
AnimAssocDesc aCSMiscAnimDescs[] = {
|
||||
{ ANIM_IDLE_LOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_IDLE_NO, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_IDLE_YES, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_IDLE_CHAT2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_IDLE_COUGH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_IDLE_GIGGLE_FEMALE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_IDLE_TOUGH_CHAT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_IDLE_CELL_TALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_LOOK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_NO, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_YES, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_CHAT2, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_COUGH, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_GIGGLE_FEMALE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_TOUGH_CHAT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_CS_MISC_IDLE_CELL_TALK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
};
|
||||
AnimAssocDesc aDONH2AnimDescs[] = {
|
||||
{ ANIM_DONH2_CAMERA, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
@@ -320,7 +320,7 @@ AnimAssocDesc aJDT5AnimDescs[] = {
|
||||
};
|
||||
AnimAssocDesc aJDT6AnimDescs[] = {
|
||||
{ ANIM_JDT6_PICKUP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_JDT6_DOORKNOCK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_JDT6_KNOCK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
};
|
||||
AnimAssocDesc aMAR1AnimDescs[] = {
|
||||
{ ANIM_MAR1_SKIRT, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
@@ -334,7 +334,7 @@ AnimAssocDesc aMAR2AnimDescs[] = {
|
||||
AnimAssocDesc aMAR3AnimDescs[] = {
|
||||
{ ANIM_MAR3_HOOCHY, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_MAR3_NOTE_IDLE, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_MAR3_NOTE_PICK, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_MAR3_NOTE_PICKUP, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
};
|
||||
AnimAssocDesc aSAL1AnimDescs[] = {
|
||||
{ ANIM_SAL1_BIREFCASE_DOWN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
@@ -349,8 +349,8 @@ AnimAssocDesc aSAL3AnimDescs[] = {
|
||||
{ ANIM_SAL3_SIT_DOWN, ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
};
|
||||
AnimAssocDesc aSAL4AnimDescs[] = {
|
||||
{ ANIM_SAL4_DUSTDOWN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_SAL4_GIRLRUN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_SAL4_DUST_DOWN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
{ ANIM_SAL4_GIRL_RUN, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
};
|
||||
AnimAssocDesc aSAL6AnimDescs[] = {
|
||||
{ ANIM_SAL6_ANGRY_SEATED, ASSOC_FADEOUTWHENDONE | ASSOC_PARTIAL | ASSOC_IDLE },
|
||||
|
||||
+229
-225
@@ -2,250 +2,256 @@
|
||||
|
||||
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_HIT_WALL,
|
||||
ANIM_FLOOR_HIT_F,
|
||||
ANIM_HIT_BEHIND,
|
||||
ANIM_FIGHT_IDLE,
|
||||
ANIM_FIGHT2_IDLE,
|
||||
ANIM_FIGHT_SH_F,
|
||||
ANIM_FIGHT_PPUNCH,
|
||||
ANIM_L_HOOK,
|
||||
ANIM_R_HOOK,
|
||||
ANIM_UPPERCUT,
|
||||
ANIM_HEADBUTT,
|
||||
ANIM_FRONTKICK,
|
||||
ANIM_ROUNDHOUSE,
|
||||
ANIM_HIT_L_HOOK,
|
||||
ANIM_HIT_R_HOOK,
|
||||
ANIM_HIT_UPPERCUT,
|
||||
ANIM_HIT_HEADBUTT,
|
||||
ANIM_HIT_FRONTKICK,
|
||||
ANIM_HIT_RHOUSE,
|
||||
ANIM_BOMBER,
|
||||
ANIM_PUNCH_R,
|
||||
ANIM_FIGHT_PPUNCH2,
|
||||
ANIM_KICK_FLOOR,
|
||||
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,
|
||||
ANIM_STD_HIT_WALL,
|
||||
ANIM_STD_HIT_FLOOR_FRONT,
|
||||
ANIM_STD_HIT_BEHIND,
|
||||
ANIM_STD_FIGHT_IDLE,
|
||||
ANIM_STD_FIGHT_2IDLE,
|
||||
ANIM_STD_FIGHT_SHUFFLE_F,
|
||||
ANIM_STD_PARTIAL_PUNCH,
|
||||
ANIM_FIGHT_ATTACK_A1,
|
||||
ANIM_FIGHT_ATTACK_A2,
|
||||
ANIM_FIGHT_ATTACK_A3,
|
||||
ANIM_FIGHT_ATTACK_B1,
|
||||
ANIM_FIGHT_ATTACK_B2,
|
||||
ANIM_FIGHT_ATTACK_B3,
|
||||
ANIM_FIGHT_HIT_A1,
|
||||
ANIM_FIGHT_HIT_A2,
|
||||
ANIM_FIGHT_HIT_A3,
|
||||
ANIM_FIGHT_HIT_B1,
|
||||
ANIM_FIGHT_HIT_B2,
|
||||
ANIM_FIGHT_HIT_B3,
|
||||
ANIM_STD_DETONATE,
|
||||
ANIM_STD_PUNCH,
|
||||
ANIM_STD_PARTIALPUNCH,
|
||||
ANIM_STD_KICKGROUND,
|
||||
|
||||
ANIM_WEAPON_THROWU,
|
||||
ANIM_FIGHT_SH_BACK,
|
||||
ANIM_STD_THROW_UNDER,
|
||||
ANIM_STD_FIGHT_SHUFFLE_B,
|
||||
|
||||
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_JUMPIN_LHS,
|
||||
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_DRIVEBY_LOW_L,
|
||||
ANIM_DRIVEBY_LOW_R,
|
||||
ANIM_CAR_LB,
|
||||
ANIM_DRIVE_BOAT,
|
||||
ANIM_DRIVE_BOAT_L,
|
||||
ANIM_DRIVE_BOAT_R,
|
||||
ANIM_BOAT_LB,
|
||||
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_CAR_JUMP_IN_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_DRIVEBY_LEFT_LO,
|
||||
ANIM_STD_CAR_DRIVEBY_RIGHT_LO,
|
||||
ANIM_STD_CAR_LOOKBEHIND,
|
||||
ANIM_STD_BOAT_DRIVE,
|
||||
ANIM_STD_BOAT_DRIVE_LEFT,
|
||||
ANIM_STD_BOAT_DRIVE_RIGHT,
|
||||
ANIM_STD_BOAT_LOOKBEHIND,
|
||||
|
||||
ANIM_BIKE_PICKUP_R,
|
||||
ANIM_BIKE_PICKUP_L,
|
||||
ANIM_BIKE_PULLUP_R,
|
||||
ANIM_BIKE_PULLUP_L,
|
||||
ANIM_BIKE_ELBOW_R,
|
||||
ANIM_BIKE_ELBOW_L,
|
||||
ANIM_BIKE_FALL_OFF,
|
||||
ANIM_BIKE_FALL_R,
|
||||
ANIM_STD_BIKE_PICKUP_LHS,
|
||||
ANIM_STD_BIKE_PICKUP_RHS,
|
||||
ANIM_STD_BIKE_PULLUP_LHS,
|
||||
ANIM_STD_BIKE_PULLUP_RHS,
|
||||
ANIM_STD_BIKE_ELBOW_LHS,
|
||||
ANIM_STD_BIKE_ELBOW_RHS,
|
||||
ANIM_STD_BIKE_FALLOFF,
|
||||
ANIM_STD_BIKE_FALLBACK,
|
||||
|
||||
ANIM_CAR_GETOUT_RHS,
|
||||
ANIM_CAR_GETOUT_LOW_RHS,
|
||||
ANIM_CAR_CLOSE_RHS,
|
||||
ANIM_CAR_HOOKERTALK,
|
||||
ANIM_STD_GETOUT_RHS,
|
||||
ANIM_STD_GETOUT_LO_RHS,
|
||||
ANIM_STD_CAR_CLOSE_RHS,
|
||||
ANIM_STD_CAR_HOOKERTALK,
|
||||
|
||||
ANIM_TRAIN_GETIN,
|
||||
ANIM_TRAIN_GETOUT,
|
||||
ANIM_STD_TRAIN_GETIN,
|
||||
ANIM_STD_TRAIN_GETOUT,
|
||||
|
||||
ANIM_CAR_CRAWLOUT_RHS,
|
||||
ANIM_CAR_CRAWLOUT_RHS2,
|
||||
ANIM_CAR_ROLLOUT_LHS,
|
||||
ANIM_CAR_ROLLOUT_RHS,
|
||||
ANIM_STD_CRAWLOUT_LHS,
|
||||
ANIM_STD_CRAWLOUT_RHS,
|
||||
ANIM_STD_ROLLOUT_LHS,
|
||||
ANIM_STD_ROLLOUT_RHS,
|
||||
|
||||
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_FALL_BACK,
|
||||
ANIM_FALL_FRONT,
|
||||
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_FALL_ONBACK,
|
||||
ANIM_STD_FALL_ONFRONT,
|
||||
|
||||
ANIM_EV_STEP,
|
||||
ANIM_EV_DIVE,
|
||||
ANIM_COMMANDO_ROLL,
|
||||
ANIM_XPRESS_SCRATCH,
|
||||
ANIM_ROAD_CROSS,
|
||||
ANIM_TURN_180,
|
||||
ANIM_ARREST_GUN,
|
||||
ANIM_DROWN,
|
||||
ANIM_DUCK_DOWN,
|
||||
ANIM_DUCK_LOW,
|
||||
ANIM_STD_EVADE_STEP,
|
||||
ANIM_STD_EVADE_DIVE,
|
||||
ANIM_STD_COMMANDO_ROLL,
|
||||
ANIM_STD_XPRESS_SCRATCH,
|
||||
ANIM_STD_ROADCROSS,
|
||||
ANIM_STD_TURN180,
|
||||
ANIM_STD_ARREST,
|
||||
ANIM_STD_DROWN,
|
||||
ANIM_STD_DUCK_DOWN,
|
||||
ANIM_STD_DUCK_LOW,
|
||||
|
||||
ANIM_WEAPON_CROUCH,
|
||||
ANIM_STD_DUCK_WEAPON,
|
||||
|
||||
ANIM_RBLOCK_CSHOOT,
|
||||
ANIM_HANDSUP,
|
||||
ANIM_HANDSCOWER,
|
||||
ANIM_FUCKU,
|
||||
ANIM_PHONE_IN,
|
||||
ANIM_PHONE_OUT,
|
||||
ANIM_PHONE_TALK,
|
||||
ANIM_STD_RBLOCK_SHOOT,
|
||||
ANIM_STD_HANDSUP,
|
||||
ANIM_STD_HANDSCOWER,
|
||||
ANIM_STD_PARTIAL_FUCKU,
|
||||
ANIM_STD_PHONE_IN,
|
||||
ANIM_STD_PHONE_OUT,
|
||||
ANIM_STD_PHONE_TALK,
|
||||
|
||||
ANIM_SEAT_DOWN,
|
||||
ANIM_SEAT_UP,
|
||||
ANIM_SEAT_IDLE,
|
||||
ANIM_SEAT_DOWN2,
|
||||
ANIM_ATM,
|
||||
ANIM_ABSEIL,
|
||||
ANIM_STD_SEAT_DOWN,
|
||||
ANIM_STD_SEAT_UP,
|
||||
ANIM_STD_SEAT_IDLE,
|
||||
ANIM_STD_SEAT_RVRS,
|
||||
ANIM_STD_ATM,
|
||||
ANIM_STD_ABSEIL,
|
||||
|
||||
NUM_STD_ANIMS,
|
||||
ANIM_STD_NUM,
|
||||
|
||||
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_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_COACH_OPEN_L,
|
||||
ANIM_COACH_OPEN_R,
|
||||
ANIM_COACH_IN_L,
|
||||
ANIM_COACH_IN_R,
|
||||
ANIM_COACH_OUT_L,
|
||||
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_BIKE_RIDE,
|
||||
ANIM_BIKE_STILL,
|
||||
ANIM_BIKE_READY,
|
||||
ANIM_BIKE_LEFT,
|
||||
ANIM_BIKE_RIGHT,
|
||||
ANIM_BIKE_BACK,
|
||||
ANIM_BIKE_FWD,
|
||||
ANIM_BIKE_PUSHES,
|
||||
ANIM_BIKE_JUMPON_R,
|
||||
ANIM_BIKE_JUMPON_L,
|
||||
ANIM_BIKE_LEANB,
|
||||
ANIM_BIKE_LEANF,
|
||||
ANIM_BIKE_WALKBACK,
|
||||
ANIM_BIKE_JUMPON_LHS,
|
||||
ANIM_BIKE_JUMPON_RHS,
|
||||
ANIM_BIKE_KICK,
|
||||
ANIM_BIKE_HIT,
|
||||
ANIM_BIKE_GETOFF_RHS,
|
||||
ANIM_BIKE_GETOFF_LHS,
|
||||
ANIM_BIKE_GETOFF_RHS,
|
||||
ANIM_BIKE_GETOFF_BACK,
|
||||
ANIM_BIKE_DRIVEBY_RHS,
|
||||
ANIM_BIKE_DRIVEBY_LHS,
|
||||
ANIM_BIKE_DRIVEBY_FT,
|
||||
ANIM_BIKE_PASSENGER,
|
||||
ANIM_BIKE_DRIVEBY_RHS,
|
||||
ANIM_BIKE_DRIVEBY_FORWARD,
|
||||
ANIM_BIKE_RIDE_P,
|
||||
|
||||
ANIM_WEAPON_FIRE,
|
||||
ANIM_ATTACK_1,
|
||||
ANIM_ATTACK_2,
|
||||
ANIM_ATTACK_EXTRA1,
|
||||
ANIM_ATTACK_EXTRA2,
|
||||
ANIM_ATTACK_3,
|
||||
|
||||
// our synonyms... because originals are hard to understand
|
||||
ANIM_WEAPON_FIRE = ANIM_ATTACK_1,
|
||||
ANIM_WEAPON_CROUCHFIRE,
|
||||
ANIM_WEAPON_FIRE_2ND = ANIM_WEAPON_CROUCHFIRE,
|
||||
ANIM_WEAPON_RELOAD,
|
||||
ANIM_WEAPON_CROUCHRELOAD,
|
||||
ANIM_WEAPON_SPECIAL,
|
||||
ANIM_MELEE_ATTACK = ANIM_WEAPON_FIRE,
|
||||
ANIM_WEAPON_FIRE_3RD,
|
||||
ANIM_THROWABLE_THROW = ANIM_ATTACK_1,
|
||||
ANIM_THROWABLE_THROWU,
|
||||
ANIM_THROWABLE_START_THROW,
|
||||
ANIM_MELEE_ATTACK = ANIM_ATTACK_1,
|
||||
ANIM_MELEE_ATTACK_2ND,
|
||||
ANIM_MELEE_ATTACK_START,
|
||||
ANIM_MELEE_IDLE_FIGHTMODE,
|
||||
ANIM_MELEE_ATTACK_FINISH,
|
||||
ANIM_THROWABLE_THROW = ANIM_WEAPON_FIRE,
|
||||
ANIM_THROWABLE_THROWU,
|
||||
ANIM_THROWABLE_START_THROW,
|
||||
ANIM_WEAPON_FIRE_2ND = ANIM_WEAPON_CROUCHFIRE,
|
||||
ANIM_WEAPON_FIRE_3RD = ANIM_WEAPON_SPECIAL,
|
||||
|
||||
ANIM_SUNBATHE,
|
||||
ANIM_SUNBATHE_IDLE,
|
||||
ANIM_SUNBATHE_DOWN,
|
||||
ANIM_SUNBATHE_UP,
|
||||
ANIM_SUNBATHE_ESCAPE,
|
||||
|
||||
ANIM_CPR,
|
||||
ANIM_MEDIC_CPR,
|
||||
|
||||
ANIM_IDLE_STRETCH,
|
||||
ANIM_IDLE_TIME,
|
||||
ANIM_IDLE_SHOULDER,
|
||||
ANIM_IDLE_STRETCH_LEG,
|
||||
ANIM_PLAYER_IDLE1,
|
||||
ANIM_PLAYER_IDLE2,
|
||||
ANIM_PLAYER_IDLE3,
|
||||
ANIM_PLAYER_IDLE4,
|
||||
|
||||
ANIM_RIOT_ANGRY,
|
||||
ANIM_RIOT_ANGRY_B,
|
||||
@@ -253,7 +259,7 @@ enum AnimationId
|
||||
ANIM_RIOT_PUNCHES,
|
||||
ANIM_RIOT_SHOUT,
|
||||
ANIM_RIOT_CHALLENGE,
|
||||
ANIM_RIOT_FUKU,
|
||||
ANIM_RIOT_FUCKYOU,
|
||||
|
||||
ANIM_STRIP_A,
|
||||
ANIM_STRIP_B,
|
||||
@@ -264,17 +270,17 @@ enum AnimationId
|
||||
ANIM_STRIP_G,
|
||||
|
||||
|
||||
ANIM_MPNOTE,
|
||||
ANIM_MPNOTE_LOOP,
|
||||
ANIM_MULTIPLAYER_CUTSCENE_MPNOTE,
|
||||
ANIM_MULTIPLAYER_CUTSCENE_MPNOTE_LOOP,
|
||||
|
||||
ANIM_IDLE_LOOK,
|
||||
ANIM_IDLE_NO,
|
||||
ANIM_IDLE_YES,
|
||||
ANIM_IDLE_CHAT2,
|
||||
ANIM_IDLE_COUGH,
|
||||
ANIM_IDLE_GIGGLE_FEMALE,
|
||||
ANIM_IDLE_TOUGH_CHAT,
|
||||
ANIM_IDLE_CELL_TALK,
|
||||
ANIM_CS_MISC_IDLE_LOOK,
|
||||
ANIM_CS_MISC_IDLE_NO,
|
||||
ANIM_CS_MISC_IDLE_YES,
|
||||
ANIM_CS_MISC_IDLE_CHAT2,
|
||||
ANIM_CS_MISC_IDLE_COUGH,
|
||||
ANIM_CS_MISC_IDLE_GIGGLE_FEMALE,
|
||||
ANIM_CS_MISC_IDLE_TOUGH_CHAT,
|
||||
ANIM_CS_MISC_IDLE_CELL_TALK,
|
||||
|
||||
ANIM_DONH2_CAMERA,
|
||||
ANIM_DONH3_HAPPY,
|
||||
@@ -285,7 +291,7 @@ enum AnimationId
|
||||
ANIM_JDT5_CALM_DOWN,
|
||||
ANIM_JDT5_POINT,
|
||||
ANIM_JDT6_PICKUP,
|
||||
ANIM_JDT6_DOORKNOCK,
|
||||
ANIM_JDT6_KNOCK,
|
||||
|
||||
ANIM_MAR1_SKIRT,
|
||||
ANIM_MAR2_CELL_ANSWER,
|
||||
@@ -294,7 +300,7 @@ enum AnimationId
|
||||
ANIM_MAR2_FOOT_TAP,
|
||||
ANIM_MAR3_HOOCHY,
|
||||
ANIM_MAR3_NOTE_IDLE,
|
||||
ANIM_MAR3_NOTE_PICK,
|
||||
ANIM_MAR3_NOTE_PICKUP,
|
||||
|
||||
ANIM_SAL1_BIREFCASE_DOWN,
|
||||
ANIM_SAL2_IDLE_SEATED,
|
||||
@@ -302,8 +308,8 @@ enum AnimationId
|
||||
ANIM_SAL3_SEATED_TALK,
|
||||
ANIM_SAL3_SEATED_IDLE,
|
||||
ANIM_SAL3_SIT_DOWN,
|
||||
ANIM_SAL4_DUSTDOWN,
|
||||
ANIM_SAL4_GIRLRUN,
|
||||
ANIM_SAL4_DUST_DOWN,
|
||||
ANIM_SAL4_GIRL_RUN,
|
||||
ANIM_SAL6_ANGRY_SEATED,
|
||||
ANIM_SAL6_IDLE_SEATED,
|
||||
ANIM_SAL7_LOOKOUT,
|
||||
@@ -322,7 +328,5 @@ enum AnimationId
|
||||
|
||||
ANIM_MAC2_PLEAD,
|
||||
|
||||
ANIM_VIC7_PROD_WITH_FOOT,
|
||||
|
||||
NUM_ANIMS
|
||||
ANIM_VIC7_PROD_WITH_FOOT
|
||||
};
|
||||
@@ -158,7 +158,7 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
|
||||
void
|
||||
cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
|
||||
{
|
||||
bool distCalculated = false;
|
||||
bool8 distCalculated = FALSE;
|
||||
if(col.m_fIntensity2 > 0.0016f) {
|
||||
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
|
||||
if(emittingVol) {
|
||||
@@ -168,20 +168,17 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun
|
||||
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_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);
|
||||
SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex)
|
||||
m_sQueueSample.m_fSpeedMultiplier = 4.0f;
|
||||
m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
|
||||
m_sQueueSample.m_bReleasingSoundFlag = false;
|
||||
m_sQueueSample.m_bReleasingSoundFlag = FALSE;
|
||||
m_sQueueSample.m_nReleasingVolumeDivider = 5;
|
||||
m_sQueueSample.m_bReverbFlag = true;
|
||||
m_sQueueSample.m_bRequireReflection = false;
|
||||
m_sQueueSample.m_bReverbFlag = TRUE;
|
||||
m_sQueueSample.m_bRequireReflection = FALSE;
|
||||
AddSampleToRequestedQueue();
|
||||
}
|
||||
}
|
||||
@@ -311,17 +308,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_bIs2D = FALSE;
|
||||
m_sQueueSample.m_nReleasingVolumeModificator = 11;
|
||||
m_sQueueSample.m_nLoopCount = 1;
|
||||
m_sQueueSample.m_nEmittingVolume = emittingVol;
|
||||
m_sQueueSample.m_nLoopStart = 0;
|
||||
m_sQueueSample.m_nLoopEnd = -1;
|
||||
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_bReleasingSoundFlag = TRUE;
|
||||
m_sQueueSample.m_bReverbFlag = TRUE;
|
||||
m_sQueueSample.m_bRequireReflection = FALSE;
|
||||
AddSampleToRequestedQueue();
|
||||
}
|
||||
}
|
||||
@@ -332,13 +328,12 @@ void
|
||||
cAudioManager::ServiceCollisions()
|
||||
{
|
||||
int i, j;
|
||||
bool abRepeatedCollision1[NUMAUDIOCOLLISIONS];
|
||||
bool abRepeatedCollision2[NUMAUDIOCOLLISIONS];
|
||||
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 (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++) {
|
||||
@@ -348,8 +343,8 @@ cAudioManager::ServiceCollisions()
|
||||
&& (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;
|
||||
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;
|
||||
|
||||
+4261
-2758
File diff suppressed because it is too large
Load Diff
+82
-71
@@ -14,21 +14,17 @@
|
||||
|
||||
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 40
|
||||
|
||||
cAudioManager::cAudioManager()
|
||||
{
|
||||
m_bIsInitialised = false;
|
||||
m_bReverb = true;
|
||||
m_bIsInitialised = FALSE;
|
||||
m_bReverb = TRUE;
|
||||
field_6 = 0;
|
||||
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;
|
||||
@@ -36,16 +32,16 @@ cAudioManager::cAudioManager()
|
||||
ClearActiveSamples();
|
||||
GenerateIntegerRandomNumberTable();
|
||||
field_4 = 0;
|
||||
m_bDynamicAcousticModelingStatus = true;
|
||||
m_bDynamicAcousticModelingStatus = TRUE;
|
||||
|
||||
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_bFifthFrameFlag = FALSE;
|
||||
m_bTimerJustReset = FALSE;
|
||||
m_nTimer = 0;
|
||||
}
|
||||
|
||||
@@ -83,7 +79,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);
|
||||
}
|
||||
|
||||
@@ -98,7 +94,7 @@ cAudioManager::Terminate()
|
||||
|
||||
SampleManager.Terminate();
|
||||
|
||||
m_bIsInitialised = false;
|
||||
m_bIsInitialised = FALSE;
|
||||
PostTerminateGameSpecificShutdown();
|
||||
}
|
||||
}
|
||||
@@ -110,7 +106,7 @@ 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;
|
||||
@@ -132,8 +128,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;
|
||||
@@ -152,7 +148,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)
|
||||
@@ -165,7 +161,7 @@ cAudioManager::DestroyEntity(int32 id)
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -193,7 +189,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;
|
||||
@@ -246,7 +242,7 @@ cAudioManager::SetEffectsFadeVol(uint8 volume) const
|
||||
}
|
||||
|
||||
void
|
||||
cAudioManager::SetMonoMode(uint8 mono)
|
||||
cAudioManager::SetMonoMode(bool8 mono)
|
||||
{
|
||||
SampleManager.SetMonoMode(mono);
|
||||
}
|
||||
@@ -261,7 +257,7 @@ void
|
||||
cAudioManager::ResetTimers(uint32 time)
|
||||
{
|
||||
if (m_bIsInitialised) {
|
||||
m_bTimerJustReset = true;
|
||||
m_bTimerJustReset = TRUE;
|
||||
m_nTimer = time;
|
||||
ClearRequestedQueue();
|
||||
if (m_nActiveSampleQueue) {
|
||||
@@ -276,11 +272,13 @@ cAudioManager::ResetTimers(uint32 time)
|
||||
ClearActiveSamples();
|
||||
ClearMissionAudio(0);
|
||||
ClearMissionAudio(1);
|
||||
SampleManager.StopChannel(policeChannel);
|
||||
SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
|
||||
SampleManager.StopChannel(CHANNEL_MISSION_AUDIO_1);
|
||||
SampleManager.StopChannel(CHANNEL_MISSION_AUDIO_2);
|
||||
SampleManager.SetEffectsFadeVolume(0);
|
||||
SampleManager.SetMusicFadeVolume(0);
|
||||
MusicManager.ResetMusicAfterReload();
|
||||
m_bIsPlayerShutUp = false;
|
||||
m_bIsPlayerShutUp = FALSE;
|
||||
#ifdef AUDIO_OAL
|
||||
SampleManager.Service();
|
||||
#endif
|
||||
@@ -391,13 +389,13 @@ cAudioManager::SetSpeakerConfig(int32 conf) const
|
||||
SampleManager.SetSpeakerConfig(conf);
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cAudioManager::IsMP3RadioChannelAvailable() const
|
||||
{
|
||||
if (m_bIsInitialised)
|
||||
return SampleManager.IsMP3RadioChannelAvailable();
|
||||
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -417,25 +415,25 @@ cAudioManager::ReacquireDigitalHandle() const
|
||||
}
|
||||
|
||||
void
|
||||
cAudioManager::SetDynamicAcousticModelingStatus(uint8 status)
|
||||
cAudioManager::SetDynamicAcousticModelingStatus(bool8 status)
|
||||
{
|
||||
m_bDynamicAcousticModelingStatus = status!=0;
|
||||
m_bDynamicAcousticModelingStatus = status;
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cAudioManager::CheckForAnAudioFileOnCD() const
|
||||
{
|
||||
return SampleManager.CheckForAnAudioFileOnCD();
|
||||
}
|
||||
|
||||
uint8
|
||||
char
|
||||
cAudioManager::GetCDAudioDriveLetter() const
|
||||
{
|
||||
if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter();
|
||||
return 0;
|
||||
return '\0';
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cAudioManager::IsAudioInitialised() const
|
||||
{
|
||||
return m_bIsInitialised;
|
||||
@@ -444,9 +442,12 @@ cAudioManager::IsAudioInitialised() const
|
||||
void
|
||||
cAudioManager::ServiceSoundEffects()
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
if(CTimer::GetLogicalFramesPassed() != 0)
|
||||
#endif
|
||||
m_bFifthFrameFlag = (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();
|
||||
@@ -545,7 +546,7 @@ cAudioManager::RandomDisplacement(uint32 seed) const
|
||||
{
|
||||
int32 value;
|
||||
|
||||
static bool bPos = true;
|
||||
static bool8 bPos = TRUE;
|
||||
static uint32 Adjustment = 0;
|
||||
|
||||
if (!seed)
|
||||
@@ -576,7 +577,7 @@ cAudioManager::AddSampleToRequestedQueue()
|
||||
{
|
||||
int32 calculatedVolume;
|
||||
uint8 sampleIndex;
|
||||
bool bReflections;
|
||||
bool8 bReflections;
|
||||
|
||||
if (m_sQueueSample.m_nSampleIndex < TOTAL_AUDIO_SAMPLES) {
|
||||
calculatedVolume = m_sQueueSample.m_nReleasingVolumeModificator * (MAX_VOLUME - m_sQueueSample.m_nVolume);
|
||||
@@ -589,24 +590,24 @@ cAudioManager::AddSampleToRequestedQueue()
|
||||
++m_SampleRequestQueuesStatus[m_nActiveSampleQueue];
|
||||
}
|
||||
m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
|
||||
m_sQueueSample.m_bLoopEnded = false;
|
||||
m_sQueueSample.m_bLoopEnded = FALSE;
|
||||
if (m_sQueueSample.m_bIs2D || CCullZones::InRoomForAudio()) {
|
||||
m_sQueueSample.m_bRequireReflection = false;
|
||||
m_sQueueSample.m_bRequireReflection = FALSE;
|
||||
m_sQueueSample.m_nLoopsRemaining = 0;
|
||||
}
|
||||
if (m_bDynamicAcousticModelingStatus && m_sQueueSample.m_nLoopCount) {
|
||||
bReflections = m_sQueueSample.m_bRequireReflection;
|
||||
} else {
|
||||
bReflections = false;
|
||||
bReflections = FALSE;
|
||||
m_sQueueSample.m_nLoopsRemaining = 0;
|
||||
}
|
||||
m_sQueueSample.m_bRequireReflection = false;
|
||||
m_sQueueSample.m_bRequireReflection = FALSE;
|
||||
|
||||
if ( m_bReverb && m_sQueueSample.m_bIs2D )
|
||||
m_sQueueSample.field_4C = 30;
|
||||
|
||||
if (!m_bDynamicAcousticModelingStatus)
|
||||
m_sQueueSample.m_bReverbFlag = false;
|
||||
m_sQueueSample.m_bReverbFlag = FALSE;
|
||||
|
||||
m_asSamples[m_nActiveSampleQueue][sampleIndex] = m_sQueueSample;
|
||||
|
||||
@@ -773,7 +774,12 @@ cAudioManager::UpdateReflections()
|
||||
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;
|
||||
|
||||
@@ -782,19 +788,19 @@ cAudioManager::AddReleasingSounds()
|
||||
if (sample.m_bLoopEnded)
|
||||
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)
|
||||
if (sample.m_nReleasingVolumeDivider == 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 (sample.m_nVolumeChange <= 0)
|
||||
@@ -806,12 +812,15 @@ cAudioManager::AddReleasingSounds()
|
||||
}
|
||||
sample.m_nVolume -= sample.m_nVolumeChange;
|
||||
}
|
||||
#ifdef FIX_BUGS
|
||||
if(CTimer::GetLogicalFramesPassed() != 0)
|
||||
#endif
|
||||
--sample.m_nReleasingVolumeDivider;
|
||||
if (m_bFifthFrameFlag) {
|
||||
if (sample.m_nReleasingVolumeModificator < 20)
|
||||
++sample.m_nReleasingVolumeModificator;
|
||||
}
|
||||
sample.m_bReleasingSoundFlag = false;
|
||||
sample.m_bReleasingSoundFlag = FALSE;
|
||||
}
|
||||
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
|
||||
AddSampleToRequestedQueue();
|
||||
@@ -829,12 +838,12 @@ cAudioManager::ProcessActiveQueues()
|
||||
uint8 vol;
|
||||
uint8 offset;
|
||||
float x;
|
||||
bool flag;
|
||||
bool missionState;
|
||||
bool8 flag;
|
||||
bool8 missionState;
|
||||
|
||||
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_bIsProcessed = FALSE;
|
||||
m_asActiveSamples[i].m_bIsProcessed = FALSE;
|
||||
}
|
||||
for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
|
||||
tSound& sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
||||
@@ -847,19 +856,19 @@ cAudioManager::ProcessActiveQueues()
|
||||
|
||||
if (m_FrameCounter & 1) {
|
||||
if (!(j & 1)) {
|
||||
flag = false;
|
||||
flag = FALSE;
|
||||
} else {
|
||||
flag = true;
|
||||
flag = TRUE;
|
||||
}
|
||||
} else if (j & 1) {
|
||||
flag = false;
|
||||
flag = FALSE;
|
||||
} else {
|
||||
flag = true;
|
||||
flag = TRUE;
|
||||
}
|
||||
|
||||
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
|
||||
sample.m_bLoopEnded = true;
|
||||
m_asActiveSamples[j].m_bLoopEnded = true;
|
||||
sample.m_bLoopEnded = TRUE;
|
||||
m_asActiveSamples[j].m_bLoopEnded = TRUE;
|
||||
m_asActiveSamples[j].m_nSampleIndex = NO_SAMPLE;
|
||||
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
|
||||
continue;
|
||||
@@ -867,8 +876,8 @@ cAudioManager::ProcessActiveQueues()
|
||||
if (!sample.m_nReleasingVolumeDivider)
|
||||
sample.m_nReleasingVolumeDivider = 1;
|
||||
}
|
||||
sample.m_bIsProcessed = true;
|
||||
m_asActiveSamples[j].m_bIsProcessed = true;
|
||||
sample.m_bIsProcessed = TRUE;
|
||||
m_asActiveSamples[j].m_bIsProcessed = TRUE;
|
||||
sample.m_nVolumeChange = -1;
|
||||
if (!sample.m_bReleasingSoundFlag) {
|
||||
if (sample.m_bIs2D) {
|
||||
@@ -900,10 +909,10 @@ cAudioManager::ProcessActiveQueues()
|
||||
emittingVol = vol;
|
||||
}
|
||||
|
||||
missionState = false;
|
||||
missionState = FALSE;
|
||||
for (int32 k = 0; k < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); k++) {
|
||||
if (m_sMissionAudio.m_bIsMobile[k]) {
|
||||
missionState = true;
|
||||
missionState = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -924,8 +933,8 @@ cAudioManager::ProcessActiveQueues()
|
||||
SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
|
||||
break; //continue for i
|
||||
}
|
||||
sample.m_bIsProcessed = false;
|
||||
m_asActiveSamples[j].m_bIsProcessed = false;
|
||||
sample.m_bIsProcessed = FALSE;
|
||||
m_asActiveSamples[j].m_bIsProcessed = FALSE;
|
||||
//continue for j
|
||||
}
|
||||
}
|
||||
@@ -966,10 +975,10 @@ cAudioManager::ProcessActiveQueues()
|
||||
}
|
||||
if (SampleManager.InitialiseChannel(k, m_asActiveSamples[k].m_nSampleIndex, m_asActiveSamples[k].m_nBankIndex)) {
|
||||
SampleManager.SetChannelFrequency(k, m_asActiveSamples[k].m_nFrequency);
|
||||
bool isMobile = false;
|
||||
bool8 isMobile = FALSE;
|
||||
for (int32 l = 0; l < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); l++) {
|
||||
if (m_sMissionAudio.m_bIsMobile[l]) {
|
||||
isMobile = true;
|
||||
isMobile = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1000,8 +1009,8 @@ cAudioManager::ProcessActiveQueues()
|
||||
SampleManager.SetChannel3DDistances(k, m_asActiveSamples[k].m_fSoundIntensity, 0.25f * m_asActiveSamples[k].m_fSoundIntensity);
|
||||
SampleManager.StartChannel(k);
|
||||
}
|
||||
m_asActiveSamples[k].m_bIsProcessed = true;
|
||||
sample.m_bIsProcessed = true;
|
||||
m_asActiveSamples[k].m_bIsProcessed = TRUE;
|
||||
sample.m_bIsProcessed = TRUE;
|
||||
sample.m_nVolumeChange = -1;
|
||||
break;
|
||||
}
|
||||
@@ -1029,28 +1038,30 @@ cAudioManager::ClearActiveSamples()
|
||||
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_bIs2D = FALSE;
|
||||
m_asActiveSamples[i].m_nReleasingVolumeModificator = 5;
|
||||
m_asActiveSamples[i].m_nFrequency = 0;
|
||||
m_asActiveSamples[i].m_nVolume = 0;
|
||||
m_asActiveSamples[i].m_nEmittingVolume = 0;
|
||||
m_asActiveSamples[i].m_fDistance = 0.0f;
|
||||
m_asActiveSamples[i].m_bIsProcessed = false;
|
||||
m_asActiveSamples[i].m_bLoopEnded = false;
|
||||
m_asActiveSamples[i].m_bIsProcessed = FALSE;
|
||||
m_asActiveSamples[i].m_bLoopEnded = 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_bReleasingSoundFlag = FALSE;
|
||||
m_asActiveSamples[i].m_nCalculatedVolume = 0;
|
||||
m_asActiveSamples[i].m_nReleasingVolumeDivider = 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_bReverbFlag = FALSE;
|
||||
m_asActiveSamples[i].m_nLoopsRemaining = 0;
|
||||
m_asActiveSamples[i].m_bRequireReflection = false;
|
||||
m_asActiveSamples[i].m_bRequireReflection = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+170
-147
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "audio_enums.h"
|
||||
#include "AudioCollision.h"
|
||||
#include "PoliceRadio.h"
|
||||
#include "PolRadio.h"
|
||||
#include "VehicleModelInfo.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
@@ -13,27 +13,29 @@ public:
|
||||
int32 m_nCounter;
|
||||
int32 m_nSampleIndex;
|
||||
uint8 m_nBankIndex;
|
||||
bool m_bIs2D;
|
||||
bool8 m_bIs2D;
|
||||
int32 m_nReleasingVolumeModificator;
|
||||
uint32 m_nFrequency;
|
||||
uint8 m_nVolume;
|
||||
float m_fDistance;
|
||||
int32 m_nLoopCount;
|
||||
#ifndef GTA_PS2
|
||||
int32 m_nLoopStart;
|
||||
int32 m_nLoopEnd;
|
||||
#endif
|
||||
uint8 m_nEmittingVolume;
|
||||
float m_fSpeedMultiplier;
|
||||
float m_fSoundIntensity;
|
||||
bool m_bReleasingSoundFlag;
|
||||
bool8 m_bReleasingSoundFlag;
|
||||
CVector m_vecPos;
|
||||
bool m_bReverbFlag;
|
||||
bool8 m_bReverbFlag;
|
||||
uint8 m_nLoopsRemaining;
|
||||
bool m_bRequireReflection; // Used for oneshots
|
||||
bool8 m_bRequireReflection; // Used for oneshots
|
||||
uint8 m_nOffset;
|
||||
uint8 field_4C;
|
||||
int32 m_nReleasingVolumeDivider;
|
||||
bool m_bIsProcessed;
|
||||
bool m_bLoopEnded;
|
||||
bool8 m_bIsProcessed;
|
||||
bool8 m_bLoopEnded;
|
||||
int32 m_nCalculatedVolume;
|
||||
int8 m_nVolumeChange;
|
||||
};
|
||||
@@ -48,7 +50,7 @@ class tAudioEntity
|
||||
public:
|
||||
eAudioType m_nType;
|
||||
void *m_pEntity;
|
||||
bool m_bIsUsed;
|
||||
bool8 m_bIsUsed;
|
||||
uint8 m_bStatus;
|
||||
int16 m_awAudioEvent[NUM_AUDIOENTITY_EVENTS];
|
||||
float m_afVolume[NUM_AUDIOENTITY_EVENTS];
|
||||
@@ -78,7 +80,7 @@ public:
|
||||
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
|
||||
uint8 m_nActiveBank;
|
||||
#ifdef GTA_PC
|
||||
bool m_bDelay;
|
||||
bool8 m_bDelay;
|
||||
uint32 m_nDelayTimer;
|
||||
#endif
|
||||
|
||||
@@ -110,14 +112,14 @@ class cMissionAudio
|
||||
{
|
||||
public:
|
||||
CVector m_vecPos[MISSION_AUDIO_SLOTS];
|
||||
bool m_bPredefinedProperties[MISSION_AUDIO_SLOTS];
|
||||
bool8 m_bPredefinedProperties[MISSION_AUDIO_SLOTS];
|
||||
int32 m_nSampleIndex[MISSION_AUDIO_SLOTS];
|
||||
uint8 m_nLoadingStatus[MISSION_AUDIO_SLOTS];
|
||||
uint8 m_nPlayStatus[MISSION_AUDIO_SLOTS];
|
||||
bool m_bIsPlaying[MISSION_AUDIO_SLOTS];
|
||||
bool8 m_bIsPlaying[MISSION_AUDIO_SLOTS];
|
||||
int32 m_nMissionAudioCounter[MISSION_AUDIO_SLOTS];
|
||||
bool m_bIsPlayed[MISSION_AUDIO_SLOTS];
|
||||
bool m_bIsMobile[MISSION_AUDIO_SLOTS];
|
||||
bool8 m_bIsPlayed[MISSION_AUDIO_SLOTS];
|
||||
bool8 m_bIsMobile[MISSION_AUDIO_SLOTS];
|
||||
};
|
||||
VALIDATE_SIZE(cMissionAudio, 0x38);
|
||||
|
||||
@@ -141,7 +143,7 @@ class CPed;
|
||||
class cPedParams
|
||||
{
|
||||
public:
|
||||
bool m_bDistanceCalculated;
|
||||
bool8 m_bDistanceCalculated;
|
||||
float m_fDistance;
|
||||
CPed *m_pPed;
|
||||
|
||||
@@ -157,7 +159,7 @@ class cVehicleParams
|
||||
{
|
||||
public:
|
||||
int32 m_VehicleType;
|
||||
bool m_bDistanceCalculated;
|
||||
bool8 m_bDistanceCalculated;
|
||||
float m_fDistance;
|
||||
CVehicle *m_pVehicle;
|
||||
cTransmission *m_pTransmission;
|
||||
@@ -193,22 +195,22 @@ enum {
|
||||
class cAudioManager
|
||||
{
|
||||
public:
|
||||
bool m_bIsInitialised;
|
||||
bool8 m_bIsInitialised;
|
||||
uint8 m_bReverb; // unused
|
||||
bool m_bFifthFrameFlag;
|
||||
bool8 m_bFifthFrameFlag;
|
||||
uint8 m_nActiveSamples;
|
||||
uint8 field_4; // unused
|
||||
bool m_bDynamicAcousticModelingStatus;
|
||||
bool8 m_bDynamicAcousticModelingStatus;
|
||||
int8 field_6;
|
||||
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;
|
||||
@@ -217,11 +219,11 @@ public:
|
||||
cAudioScriptObjectManager m_sAudioScriptObjectManager;
|
||||
|
||||
// miami
|
||||
uint8 m_bIsPlayerShutUp;
|
||||
bool8 m_bIsPlayerShutUp;
|
||||
uint8 m_nPlayerMood;
|
||||
uint32 m_nPlayerMoodTimer;
|
||||
uint8 field_rest[4];
|
||||
bool m_bGenericSfx;
|
||||
bool8 m_bGenericSfx;
|
||||
|
||||
cPedComments m_sPedComments;
|
||||
int32 m_nFireAudioEntity;
|
||||
@@ -253,19 +255,19 @@ public:
|
||||
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done
|
||||
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 IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
|
||||
bool ShouldDuckMissionAudio(uint8 slot) const;
|
||||
bool8 IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
|
||||
bool8 ShouldDuckMissionAudio(uint8 slot) const;
|
||||
|
||||
// "Should" be in alphabetic order, except "getXTalkSfx"
|
||||
void AddDetailsToRequestedOrderList(uint8 sample); // done (inlined in vc)
|
||||
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool notLooping); // done
|
||||
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping); // done
|
||||
void AddReflectionsToRequestedQueue(); // done
|
||||
void AddReleasingSounds(); // done
|
||||
void AddSampleToRequestedQueue(); // done
|
||||
void AgeCrimes(); // done (inlined in vc)
|
||||
|
||||
void CalculateDistance(bool &condition, float dist); // done
|
||||
bool CheckForAnAudioFileOnCD() const; // done
|
||||
void CalculateDistance(bool8 &condition, float dist); // done
|
||||
bool8 CheckForAnAudioFileOnCD() const; // done
|
||||
void ClearActiveSamples(); // done
|
||||
void ClearMissionAudio(uint8 slot); // done (inlined in vc)
|
||||
void ClearRequestedQueue(); // done (inlined in vc)
|
||||
@@ -288,90 +290,93 @@ public:
|
||||
uint32 GetMedicTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetFiremanTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetDefaultTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFYSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFOSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMYSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMOSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFYRITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFORITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMYRITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMORITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFYBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFOBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMYBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMOBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFYBUTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFYMDTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFYCGTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFYPRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHFOTRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMOTRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMYAPTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHMOCATalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMODKTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMYCRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFYSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFOSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMYSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMOSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFYRITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFORITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMYRITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFYBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMYBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFOBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMOBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMYBUTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFYPRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBFOTRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMOTRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMYPITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBMYBBTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYCRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFOSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMOSTTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYRITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFORITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYRITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMORITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFOBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMOBETalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYCWTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYGOTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFOGOTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMOGOTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYLGTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYLGTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYBUTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYBUTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMOBUTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYPRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFOTRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMOTRTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYPITalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMOCATalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYJGTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYJGTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYSKTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWMYSKTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYSHTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFOSHTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetJFOTOTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetJMOTOTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetCBTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetHNTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetSGTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetCLTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetGDTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetBKTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetPGTalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetVICETalkSfx(CPed *ped, int16 sound, int16 model);
|
||||
uint32 GetWFYG1TalkSfx(CPed *ped, int16 sound);
|
||||
uint32 GetWFYG2TalkSfx(CPed *ped, int16 sound);
|
||||
|
||||
// LCS: Do not delete, some of these are still used
|
||||
|
||||
//uint32 GetHFYSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFOSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMYSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMOSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFYRITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFORITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMYRITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMORITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFYBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFOBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMYBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMOBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFYBUTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFYMDTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFYCGTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFYPRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHFOTRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMOTRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMYAPTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHMOCATalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMODKTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMYCRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFYSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFOSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMYSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMOSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFYRITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFORITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMYRITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFYBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMYBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFOBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMOBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMYBUTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFYPRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBFOTRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMOTRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMYPITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBMYBBTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYCRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFOSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMOSTTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYRITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFORITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYRITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMORITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFOBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMOBETalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYCWTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYGOTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFOGOTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMOGOTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYLGTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYLGTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYBUTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYBUTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMOBUTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYPRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFOTRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMOTRTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYPITalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMOCATalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYJGTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYJGTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYSKTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWMYSKTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYSHTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFOSHTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetJFOTOTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetJMOTOTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetCBTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetHNTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetSGTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetCLTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetGDTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetBKTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetPGTalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetVICETalkSfx(CPed *ped, int16 sound, int16 model);
|
||||
//uint32 GetWFYG1TalkSfx(CPed *ped, int16 sound);
|
||||
//uint32 GetWFYG2TalkSfx(CPed *ped, int16 sound);
|
||||
|
||||
uint32 GetGenericMaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
|
||||
uint32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
|
||||
@@ -379,7 +384,7 @@ public:
|
||||
|
||||
void GenerateIntegerRandomNumberTable(); // done
|
||||
char *Get3DProviderName(uint8 id) const; // done
|
||||
uint8 GetCDAudioDriveLetter() const; // done
|
||||
char GetCDAudioDriveLetter() const; // done
|
||||
int8 GetCurrent3DProviderIndex() const; // done
|
||||
int8 AutoDetect3DProviders() const; // done
|
||||
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
|
||||
@@ -396,17 +401,17 @@ public:
|
||||
float velocityChange); // done
|
||||
float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); // done
|
||||
|
||||
bool HasAirBrakes(int32 model) const; // done
|
||||
bool8 HasAirBrakes(int32 model) const; // done
|
||||
|
||||
void Initialise(); // done
|
||||
void InitialisePoliceRadio(); // done
|
||||
void InitialisePoliceRadioZones(); // done
|
||||
void InterrogateAudioEntities(); // done (inlined)
|
||||
bool IsAudioInitialised() const; // done
|
||||
bool IsMissionAudioSampleFinished(uint8 slot); // done
|
||||
bool IsMP3RadioChannelAvailable() const; // done
|
||||
bool8 IsAudioInitialised() const; // done
|
||||
bool8 IsMissionAudioSampleFinished(uint8 slot); // done
|
||||
bool8 IsMP3RadioChannelAvailable() const; // done
|
||||
|
||||
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
|
||||
bool8 MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
|
||||
|
||||
void PlayLoadedMissionAudio(uint8 slot); // done
|
||||
void PlayOneShot(int32 index, uint16 sound, float vol); // done
|
||||
@@ -420,20 +425,20 @@ public:
|
||||
void PreTerminateGameSpecificShutdown(); // done
|
||||
/// processX - main logic of adding new sounds
|
||||
void ProcessActiveQueues(); // done
|
||||
bool ProcessAirBrakes(cVehicleParams& params); // done
|
||||
bool ProcessBoatEngine(cVehicleParams& params);
|
||||
bool ProcessBoatMovingOverWater(cVehicleParams& params); //done
|
||||
bool8 ProcessAirBrakes(cVehicleParams& params); // done
|
||||
bool8 ProcessBoatEngine(cVehicleParams& params);
|
||||
bool8 ProcessBoatMovingOverWater(cVehicleParams& params); //done
|
||||
#ifdef GTA_BRIDGE
|
||||
void ProcessBridge(); // done(bcs not exists in VC)
|
||||
void ProcessBridgeMotor(); // done(bcs not exists in VC)
|
||||
void ProcessBridgeOneShots(); // done(bcs not exists in VC)
|
||||
void ProcessBridgeWarning(); // done(bcs not exists in VC)
|
||||
#endif
|
||||
bool ProcessCarBombTick(cVehicleParams& params); // done
|
||||
bool8 ProcessCarBombTick(cVehicleParams& params); // done
|
||||
void ProcessCarHeli(cVehicleParams& params); // done
|
||||
void ProcessCesna(cVehicleParams& params); // done
|
||||
//void ProcessCrane(); // done(bcs not exists in VC)
|
||||
bool ProcessEngineDamage(cVehicleParams& params); // done
|
||||
bool8 ProcessEngineDamage(cVehicleParams& params); // done
|
||||
void ProcessEntity(int32 sound); // done
|
||||
void ProcessExplosions(int32 explosion); // done
|
||||
void ProcessFireHydrant(); // done
|
||||
@@ -462,25 +467,25 @@ public:
|
||||
void ProcessProjectiles(); // done
|
||||
void ProcessRainOnVehicle(cVehicleParams& params); // done
|
||||
void ProcessReverb() const; // done
|
||||
bool ProcessReverseGear(cVehicleParams& params); // done
|
||||
bool8 ProcessReverseGear(cVehicleParams& params); // done
|
||||
void ProcessScriptObject(int32 id); // done
|
||||
void ProcessSpecial(); // done
|
||||
#ifdef GTA_TRAIN
|
||||
bool ProcessTrainNoise(cVehicleParams ¶ms); //done(bcs not exists in VC)
|
||||
bool8 ProcessTrainNoise(cVehicleParams ¶ms); //done(bcs not exists in VC)
|
||||
#endif
|
||||
void ProcessVehicle(CVehicle *vehicle); // done
|
||||
bool ProcessVehicleDoors(cVehicleParams ¶ms); // done
|
||||
bool8 ProcessVehicleDoors(cVehicleParams ¶ms); // done
|
||||
void ProcessVehicleEngine(cVehicleParams ¶ms); // done
|
||||
void ProcessVehicleFlatTyre(cVehicleParams ¶ms); // done
|
||||
bool ProcessVehicleHorn(cVehicleParams ¶ms); // done
|
||||
bool8 ProcessVehicleHorn(cVehicleParams ¶ms); // done
|
||||
void ProcessVehicleOneShots(cVehicleParams ¶ms); // done
|
||||
bool ProcessVehicleReverseWarning(cVehicleParams ¶ms); // done
|
||||
bool ProcessVehicleRoadNoise(cVehicleParams ¶ms); // done
|
||||
bool ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); // done
|
||||
bool ProcessVehicleSkidding(cVehicleParams ¶ms); // done
|
||||
bool8 ProcessVehicleReverseWarning(cVehicleParams ¶ms); // done
|
||||
bool8 ProcessVehicleRoadNoise(cVehicleParams ¶ms); // done
|
||||
bool8 ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); // done
|
||||
bool8 ProcessVehicleSkidding(cVehicleParams ¶ms); // done
|
||||
void ProcessWaterCannon(int32); // done
|
||||
void ProcessWeather(int32 id); // done
|
||||
bool ProcessWetRoadNoise(cVehicleParams& params); // done
|
||||
bool8 ProcessWetRoadNoise(cVehicleParams& params); // done
|
||||
void ProcessEscalators(); // done
|
||||
void ProcessExtraSounds(); // done
|
||||
|
||||
@@ -499,26 +504,26 @@ public:
|
||||
void ServicePoliceRadioChannel(uint8 wantedLevel); // done
|
||||
void ServiceSoundEffects(); // done
|
||||
int8 SetCurrent3DProvider(uint8 which); // done
|
||||
void SetDynamicAcousticModelingStatus(uint8 status); // done
|
||||
void SetDynamicAcousticModelingStatus(bool8 status); // done
|
||||
void SetEffectsFadeVol(uint8 volume) const; // done
|
||||
void SetEffectsMasterVolume(uint8 volume) const; // done
|
||||
void SetMP3BoostVolume(uint8 volume) const; // done
|
||||
void SetEntityStatus(int32 id, uint8 status); // done
|
||||
void SetEntityStatus(int32 id, bool8 status); // done
|
||||
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); // done
|
||||
void SetMissionAudioLocation(uint8 slot, float x, float y, float z); // done
|
||||
void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized
|
||||
void SetMonoMode(uint8 mono); // done
|
||||
void SetMonoMode(bool8 mono); // done
|
||||
void SetMusicFadeVol(uint8 volume) const; // done
|
||||
void SetMusicMasterVolume(uint8 volume) const; // done
|
||||
void SetSpeakerConfig(int32 conf) const; // done
|
||||
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); // done
|
||||
void SetUpOneShotCollisionSound(const cAudioCollision &col); // done
|
||||
bool SetupCrimeReport(); // done
|
||||
bool SetupJumboEngineSound(uint8 vol, uint32 freq); // done
|
||||
bool SetupJumboFlySound(uint8 emittingVol); // done
|
||||
bool SetupJumboRumbleSound(uint8 emittingVol); // done
|
||||
bool SetupJumboTaxiSound(uint8 vol); // done
|
||||
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done
|
||||
bool8 SetupCrimeReport(); // done
|
||||
bool8 SetupJumboEngineSound(uint8 vol, uint32 freq); // done
|
||||
bool8 SetupJumboFlySound(uint8 emittingVol); // done
|
||||
bool8 SetupJumboRumbleSound(uint8 emittingVol); // done
|
||||
bool8 SetupJumboTaxiSound(uint8 vol); // done
|
||||
bool8 SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done
|
||||
void SetupPedComments(cPedParams ¶ms, uint16 sound); // done
|
||||
void SetupSuspectLastSeenReport();
|
||||
|
||||
@@ -527,12 +532,12 @@ public:
|
||||
|
||||
void UpdateGasPedalAudio(CVehicle *veh, int vehType); // done
|
||||
void UpdateReflections(); // done
|
||||
bool UsesReverseWarning(int32 model) const; // done
|
||||
bool UsesSiren(cVehicleParams ¶ms) const; // done
|
||||
bool UsesSirenSwitching(cVehicleParams ¶ms) const; // done
|
||||
bool8 UsesReverseWarning(int32 model) const; // done
|
||||
bool8 UsesSiren(cVehicleParams ¶ms) const; // done
|
||||
bool8 UsesSirenSwitching(cVehicleParams ¶ms) const; // done
|
||||
|
||||
CVehicle *FindVehicleOfPlayer(); // done
|
||||
void SetPedTalkingStatus(CPed *ped, uint8 status); // done
|
||||
void SetPedTalkingStatus(CPed *ped, bool8 status); // done
|
||||
void SetPlayersMood(uint8 mood, uint32 time); // done
|
||||
|
||||
float Sqrt(float v) const { return v <= 0.0f ? 0.0f : ::Sqrt(v); }
|
||||
@@ -544,8 +549,26 @@ public:
|
||||
#endif
|
||||
};
|
||||
|
||||
//#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
|
||||
|
||||
//#if defined(AUDIO_MSS) && !defined(PS2_AUDIO_CHANNELS)
|
||||
//static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
|
||||
//#endif
|
||||
|
||||
|
||||
extern cAudioManager AudioManager;
|
||||
|
||||
+5534
-630
File diff suppressed because it is too large
Load Diff
@@ -23,25 +23,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);
|
||||
}
|
||||
@@ -90,6 +90,8 @@ cAudioScriptObject::SaveAllAudioScriptObjects(uint8 *buf, uint32 *size)
|
||||
void
|
||||
PlayOneShotScriptObject(uint8 id, CVector const &pos)
|
||||
{
|
||||
if (!DMAudio.IsAudioInitialised()) return;
|
||||
|
||||
cAudioScriptObject *audioScriptObject = new cAudioScriptObject();
|
||||
audioScriptObject->Posn = pos;
|
||||
audioScriptObject->AudioId = id;
|
||||
|
||||
@@ -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);
|
||||
|
||||
+13
-13
@@ -39,7 +39,7 @@ cDMAudio::DestroyEntity(int32 audioEntity)
|
||||
}
|
||||
|
||||
void
|
||||
cDMAudio::SetEntityStatus(int32 audioEntity, uint8 status)
|
||||
cDMAudio::SetEntityStatus(int32 audioEntity, bool8 status)
|
||||
{
|
||||
AudioManager.SetEntityStatus(audioEntity, status);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ cDMAudio::DestroyAllGameCreatedEntities(void)
|
||||
}
|
||||
|
||||
void
|
||||
cDMAudio::SetMonoMode(uint8 mono)
|
||||
cDMAudio::SetMonoMode(bool8 mono)
|
||||
{
|
||||
AudioManager.SetMonoMode(mono);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ cDMAudio::SetSpeakerConfig(int32 config)
|
||||
AudioManager.SetSpeakerConfig(config);
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cDMAudio::IsMP3RadioChannelAvailable(void)
|
||||
{
|
||||
return AudioManager.IsMP3RadioChannelAvailable();
|
||||
@@ -161,12 +161,12 @@ cDMAudio::ReacquireDigitalHandle(void)
|
||||
}
|
||||
|
||||
void
|
||||
cDMAudio::SetDynamicAcousticModelingStatus(uint8 status)
|
||||
cDMAudio::SetDynamicAcousticModelingStatus(bool8 status)
|
||||
{
|
||||
AudioManager.SetDynamicAcousticModelingStatus(status);
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cDMAudio::CheckForAnAudioFileOnCD(void)
|
||||
{
|
||||
return AudioManager.CheckForAnAudioFileOnCD();
|
||||
@@ -178,7 +178,7 @@ cDMAudio::GetCDAudioDriveLetter(void)
|
||||
return AudioManager.GetCDAudioDriveLetter();
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cDMAudio::IsAudioInitialised(void)
|
||||
{
|
||||
return AudioManager.IsAudioInitialised();
|
||||
@@ -196,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;
|
||||
}
|
||||
@@ -214,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);
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ cDMAudio::PlayRadioAnnouncement(uint32 announcement)
|
||||
}
|
||||
|
||||
void
|
||||
cDMAudio::PlayFrontEndTrack(uint32 track, uint8 frontendFlag)
|
||||
cDMAudio::PlayFrontEndTrack(uint32 track, bool8 frontendFlag)
|
||||
{
|
||||
MusicManager.PlayFrontEndTrack(track, frontendFlag);
|
||||
}
|
||||
@@ -309,7 +309,7 @@ cDMAudio::PlayLoadedMissionAudio(uint8 slot)
|
||||
AudioManager.PlayLoadedMissionAudio(slot);
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cDMAudio::IsMissionAudioSampleFinished(uint8 slot)
|
||||
{
|
||||
return AudioManager.IsMissionAudioSampleFinished(slot);
|
||||
@@ -340,7 +340,7 @@ cDMAudio::SetRadioChannel(uint32 radio, int32 pos)
|
||||
}
|
||||
|
||||
void
|
||||
cDMAudio::SetStartingTrackPositions(uint8 isStartGame)
|
||||
cDMAudio::SetStartingTrackPositions(bool8 isStartGame)
|
||||
{
|
||||
MusicManager.SetStartingTrackPositions(isStartGame);
|
||||
}
|
||||
@@ -364,7 +364,7 @@ cDMAudio::GetRadioPosition(uint32 station)
|
||||
}
|
||||
|
||||
void
|
||||
cDMAudio::SetPedTalkingStatus(CPed *ped, uint8 status)
|
||||
cDMAudio::SetPedTalkingStatus(CPed *ped, bool8 status)
|
||||
{
|
||||
return AudioManager.SetPedTalkingStatus(ped, status);
|
||||
}
|
||||
@@ -376,7 +376,7 @@ cDMAudio::SetPlayersMood(uint8 mood, uint32 time)
|
||||
}
|
||||
|
||||
void
|
||||
cDMAudio::ShutUpPlayerTalking(uint8 state)
|
||||
cDMAudio::ShutUpPlayerTalking(bool8 state)
|
||||
{
|
||||
AudioManager.m_bIsPlayerShutUp = state;
|
||||
}
|
||||
+11
-11
@@ -25,11 +25,11 @@ public:
|
||||
|
||||
int32 CreateEntity(eAudioType type, void *UID);
|
||||
void DestroyEntity(int32 audioEntity);
|
||||
void SetEntityStatus(int32 audioEntity, uint8 status);
|
||||
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 SetMP3BoostVolume(uint8 volume);
|
||||
void SetEffectsMasterVolume(uint8 volume);
|
||||
void SetMusicMasterVolume(uint8 volume);
|
||||
@@ -46,17 +46,17 @@ 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 ReportCrime(eCrimeType crime, CVector const &pos);
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
|
||||
void PlayFrontEndSound(uint16 frontend, uint32 volume);
|
||||
void PlayRadioAnnouncement(uint32 announcement);
|
||||
void PlayFrontEndTrack(uint32 track, uint8 frontendFlag);
|
||||
void PlayFrontEndTrack(uint32 track, bool8 frontendFlag);
|
||||
void StopFrontEndTrack(void);
|
||||
|
||||
void ResetTimers(uint32 time);
|
||||
@@ -85,19 +85,19 @@ public:
|
||||
uint8 GetMissionAudioLoadingStatus(uint8 slot);
|
||||
void SetMissionAudioLocation(uint8 slot, float x, float y, float z);
|
||||
void PlayLoadedMissionAudio(uint8 slot);
|
||||
bool IsMissionAudioSampleFinished(uint8 slot);
|
||||
bool8 IsMissionAudioSampleFinished(uint8 slot);
|
||||
void ClearMissionAudio(uint8 slot);
|
||||
|
||||
uint8 GetRadioInCar(void);
|
||||
void SetRadioInCar(uint32 radio);
|
||||
void SetRadioChannel(uint32 radio, int32 pos);
|
||||
|
||||
void SetStartingTrackPositions(uint8 isStartGame);
|
||||
void SetStartingTrackPositions(bool8 isStartGame);
|
||||
float *GetListenTimeArray();
|
||||
uint32 GetFavouriteRadioStation();
|
||||
int32 GetRadioPosition(uint32 station);
|
||||
void SetPedTalkingStatus(class CPed *ped, uint8 status);
|
||||
void SetPedTalkingStatus(class CPed *ped, bool8 status);
|
||||
void SetPlayersMood(uint8 mood, uint32 time);
|
||||
void ShutUpPlayerTalking(uint8 state);
|
||||
void ShutUpPlayerTalking(bool8 state);
|
||||
};
|
||||
extern cDMAudio DMAudio;
|
||||
|
||||
+414
-339
File diff suppressed because it is too large
Load Diff
+30
-30
@@ -16,59 +16,59 @@ class CPed;
|
||||
class cMusicManager
|
||||
{
|
||||
public:
|
||||
bool m_bIsInitialised;
|
||||
bool m_bDisabled;
|
||||
bool field_2;
|
||||
bool8 m_bIsInitialised;
|
||||
bool8 m_bDisabled;
|
||||
bool8 m_bSetNextStation;
|
||||
uint8 m_nVolumeLatency;
|
||||
uint8 m_nCurrentVolume;
|
||||
uint8 m_nMaxVolume;
|
||||
uint32 m_nAnnouncement;
|
||||
bool m_bAnnouncementInProgress;
|
||||
bool8 m_bAnnouncementInProgress;
|
||||
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
|
||||
bool m_bResetTimers;
|
||||
bool8 m_bResetTimers;
|
||||
uint32 m_nResetTime;
|
||||
bool m_bRadioSetByScript;
|
||||
uint8 m_nRadioStation;
|
||||
uint32 m_nRadioPosition;
|
||||
bool8 m_bRadioSetByScript;
|
||||
uint8 m_nRadioStationScript;
|
||||
int32 m_nRadioPosition;
|
||||
uint32 m_nRadioInCar;
|
||||
uint32 m_nFrontendTrack;
|
||||
uint32 m_nPlayingTrack;
|
||||
uint8 m_nUpcomingMusicMode;
|
||||
uint8 m_nMusicMode;
|
||||
bool field_398E;
|
||||
bool field_398F;
|
||||
uint32 m_nStreamedTrack;
|
||||
bool field_3994;
|
||||
bool field_3995;
|
||||
bool field_3996;
|
||||
bool field_3997;
|
||||
bool8 m_FrontendLoopFlag;
|
||||
bool8 m_bTrackChangeStarted;
|
||||
uint32 m_nNextTrack;
|
||||
bool8 m_nNextLoopFlag;
|
||||
bool8 m_bVerifyNextTrackStartedToPlay;
|
||||
bool8 m_bGameplayAllowsRadio;
|
||||
bool8 m_bRadioStreamReady;
|
||||
int8 nFramesSinceCutsceneEnded;
|
||||
bool field_3999;
|
||||
bool field_399A;
|
||||
bool8 m_bUserResumedGame;
|
||||
bool8 m_bMusicModeChangeStarted;
|
||||
uint8 m_nMusicModeToBeSet;
|
||||
bool field_399C;
|
||||
bool8 m_bEarlyFrontendTrack;
|
||||
float aListenTimeArray[NUM_RADIOS];
|
||||
float m_nLastTrackServiceTime;
|
||||
|
||||
public:
|
||||
cMusicManager();
|
||||
bool IsInitialised() { return m_bIsInitialised; }
|
||||
bool8 IsInitialised() { return m_bIsInitialised; }
|
||||
uint8 GetMusicMode() { return m_nMusicMode; }
|
||||
uint32 GetCurrentTrack() { return m_nPlayingTrack; }
|
||||
|
||||
void ResetMusicAfterReload();
|
||||
void SetStartingTrackPositions(uint8 isNewGameTimer);
|
||||
bool Initialise();
|
||||
void SetStartingTrackPositions(bool8 isNewGameTimer);
|
||||
bool8 Initialise();
|
||||
void Terminate();
|
||||
|
||||
void ChangeMusicMode(uint8 mode);
|
||||
void StopFrontEndTrack();
|
||||
|
||||
bool PlayerInCar();
|
||||
bool8 PlayerInCar();
|
||||
void DisplayRadioStationName();
|
||||
|
||||
void PlayAnnouncement(uint32);
|
||||
void PlayFrontEndTrack(uint32, uint8);
|
||||
void PlayFrontEndTrack(uint32, bool8);
|
||||
void PreloadCutSceneMusic(uint32);
|
||||
void PlayPreloadedCutSceneMusic(void);
|
||||
void StopCutSceneMusic(void);
|
||||
@@ -83,16 +83,16 @@ public:
|
||||
void ServiceAmbience();
|
||||
void ServiceTrack(CVehicle *veh, CPed *ped);
|
||||
|
||||
bool UsesPoliceRadio(CVehicle *veh);
|
||||
bool UsesTaxiRadio(CVehicle *veh);
|
||||
bool8 UsesPoliceRadio(CVehicle *veh);
|
||||
bool8 UsesTaxiRadio(CVehicle *veh);
|
||||
uint32 GetTrackStartPos(uint32 track);
|
||||
|
||||
void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
|
||||
bool ServiceAnnouncement();
|
||||
void ComputeAmbienceVol(bool8 reset, uint8& outVolume);
|
||||
bool8 ServiceAnnouncement();
|
||||
|
||||
uint32 GetCarTuning();
|
||||
uint32 GetNextCarTuning();
|
||||
bool ChangeRadioChannel();
|
||||
bool8 ChangeRadioChannel();
|
||||
void RecordRadioStats();
|
||||
void SetUpCorrectAmbienceTrack();
|
||||
float *GetListenTimeArray();
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
uint32 GetFavouriteRadioStation();
|
||||
void SetMalibuClubTrackPos(uint8 pos);
|
||||
void SetStripClubTrackPos(uint8 pos);
|
||||
bool CheckForMusicInterruptions();
|
||||
bool8 CheckForMusicInterruptions();
|
||||
|
||||
void Enable();
|
||||
void Disable();
|
||||
@@ -109,5 +109,5 @@ public:
|
||||
VALIDATE_SIZE(cMusicManager, 0x95C);
|
||||
|
||||
extern cMusicManager MusicManager;
|
||||
extern bool g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h
|
||||
extern bool8 g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h
|
||||
float GetHeightScale();
|
||||
|
||||
@@ -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;
|
||||
@@ -41,20 +38,20 @@ cAudioManager::InitialisePoliceRadioZones()
|
||||
strcpy(ZoneSfx[i].m_aName, name); \
|
||||
ZoneSfx[i].m_nSampleIndex = sample;
|
||||
|
||||
SETZONESFX(0, "VICE_C", SFX_POLICE_RADIO_VICE_CITY);
|
||||
SETZONESFX(1, "IND_ZON", SFX_POLICE_RADIO_VICE_CITY_BEACH);
|
||||
SETZONESFX(2, "COM_ZON", SFX_POLICE_RADIO_VICE_CITY_MAINLAND);
|
||||
SETZONESFX(3, "BEACH1", SFX_POLICE_RADIO_OCEAN_BEACH);
|
||||
SETZONESFX(4, "BEACH2", SFX_POLICE_RADIO_WASHINGTON_BEACH);
|
||||
SETZONESFX(5, "BEACH3", SFX_POLICE_RADIO_VICE_POINT);
|
||||
SETZONESFX(6, "GOLFC", SFX_POLICE_RADIO_LEAF_LINKS);
|
||||
SETZONESFX(7, "STARI", SFX_POLICE_RADIO_STRAFISH_ISLAND);
|
||||
SETZONESFX(8, "DOCKS", SFX_POLICE_RADIO_VICE_PORT);
|
||||
SETZONESFX(9, "HAVANA", SFX_POLICE_RADIO_LITTLE_HAVANA);
|
||||
SETZONESFX(10, "HAITI", SFX_POLICE_RADIO_LITTLE_HAITI);
|
||||
SETZONESFX(11, "PORNI", SFX_POLICE_RADIO_PRAWN_ISLAND);
|
||||
SETZONESFX(12, "DTOWN", SFX_POLICE_RADIO_DOWNTOWN);
|
||||
SETZONESFX(13, "A_PORT", SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL);
|
||||
SETZONESFX(0, "VICE_C", SFX_SFX_POLICE_RADIO_VICE_CITY);
|
||||
SETZONESFX(1, "IND_ZON", SFX_SFX_POLICE_RADIO_VICE_CITY_BEACH);
|
||||
SETZONESFX(2, "COM_ZON", SFX_SFX_POLICE_RADIO_VICE_CITY_MAINLAND);
|
||||
SETZONESFX(3, "BEACH1", SFX_SFX_POLICE_RADIO_OCEAN_BEACH);
|
||||
SETZONESFX(4, "BEACH2", SFX_SFX_POLICE_RADIO_WASHINGTON_BEACH);
|
||||
SETZONESFX(5, "BEACH3", SFX_SFX_POLICE_RADIO_VICE_POINT);
|
||||
SETZONESFX(6, "GOLFC", SFX_SFX_POLICE_RADIO_LEAF_LINKS);
|
||||
SETZONESFX(7, "STARI", SFX_SFX_POLICE_RADIO_STARFISH_ISLAND);
|
||||
SETZONESFX(8, "DOCKS", SFX_SFX_POLICE_RADIO_VICEPORT);
|
||||
SETZONESFX(9, "HAVANA", SFX_SFX_POLICE_RADIO_LITTLE_HAVANA);
|
||||
SETZONESFX(10, "HAITI", SFX_SFX_POLICE_RADIO_LITTLE_HAITI);
|
||||
SETZONESFX(11, "PORNI", SFX_SFX_POLICE_RADIO_PRAWN_ISLAND);
|
||||
SETZONESFX(12, "DTOWN", SFX_SFX_POLICE_RADIO_DOWNTOWN);
|
||||
SETZONESFX(13, "A_PORT", SFX_SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL);
|
||||
|
||||
#undef SETZONESFX
|
||||
}
|
||||
@@ -68,8 +65,8 @@ cAudioManager::InitialisePoliceRadio()
|
||||
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++)
|
||||
m_sPoliceRadioQueue.crimes[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;
|
||||
}
|
||||
@@ -78,7 +75,7 @@ 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();
|
||||
}
|
||||
|
||||
@@ -105,19 +102,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_bIs2D = TRUE;
|
||||
m_sQueueSample.m_nReleasingVolumeModificator = 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;
|
||||
SET_LOOP_OFFSETS(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;
|
||||
m_sQueueSample.m_bRequireReflection = FALSE;
|
||||
AddSampleToRequestedQueue();
|
||||
}
|
||||
|
||||
@@ -130,7 +126,7 @@ cAudioManager::ServicePoliceRadio()
|
||||
if(!m_bIsInitialised) return;
|
||||
|
||||
if(m_nUserPause == 0) {
|
||||
bool crimeReport = SetupCrimeReport();
|
||||
bool8 crimeReport = SetupCrimeReport();
|
||||
#ifdef FIX_BUGS // Crash at 0x5fe6ef
|
||||
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
|
||||
return;
|
||||
@@ -141,7 +137,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();
|
||||
@@ -156,31 +156,35 @@ 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 bool8 bChannelOpen = FALSE;
|
||||
static uint8 bMissionAudioPhysicalPlayingStatus = 0;
|
||||
static int32 PoliceChannelFreq = 22050;
|
||||
|
||||
if (!m_bIsInitialised) return;
|
||||
|
||||
if (m_nUserPause != 0) {
|
||||
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
|
||||
if (SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO)) SampleManager.StopChannel(CHANNEL_POLICE_RADIO);
|
||||
if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == 1 &&
|
||||
SampleManager.IsStreamPlaying(1)) {
|
||||
SampleManager.PauseStream(1, 1);
|
||||
SampleManager.PauseStream(TRUE, 1);
|
||||
}
|
||||
} else {
|
||||
if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE &&
|
||||
bMissionAudioPhysicalPlayingStatus == 1) {
|
||||
SampleManager.PauseStream(0, 1);
|
||||
SampleManager.PauseStream(FALSE, 1);
|
||||
}
|
||||
if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = false;
|
||||
if (m_sPoliceRadioQueue.policeChannelTimer == 0) bChannelOpen = FALSE;
|
||||
if (cWait) {
|
||||
#ifdef FIX_BUGS
|
||||
cWait -= CTimer::GetLogicalFramesPassed();
|
||||
#else
|
||||
--cWait;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
if (g_nMissionAudioSfx != NO_SAMPLE && !bChannelOpen) {
|
||||
@@ -200,9 +204,9 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
||||
}
|
||||
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;
|
||||
@@ -211,7 +215,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
||||
}
|
||||
if (bChannelOpen) DoPoliceRadioCrackle();
|
||||
if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != 1) &&
|
||||
!SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) {
|
||||
!SampleManager.GetChannelUsedFlag(CHANNEL_POLICE_RADIO) && m_sPoliceRadioQueue.policeChannelTimer) {
|
||||
if (m_sPoliceRadioQueue.policeChannelTimer) {
|
||||
sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds];
|
||||
m_sPoliceRadioQueue.policeChannelTimer--;
|
||||
@@ -223,35 +227,35 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
||||
if (gSpecialSuspectLastSeenReport) {
|
||||
gSpecialSuspectLastSeenReport = 0;
|
||||
} else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) {
|
||||
bChannelOpen = false;
|
||||
processed = true;
|
||||
bChannelOpen = FALSE;
|
||||
processed = TRUE;
|
||||
}
|
||||
}
|
||||
if (sample == NO_SAMPLE) {
|
||||
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:
|
||||
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);
|
||||
SampleManager.SetChannelLoopCount(CHANNEL_POLICE_RADIO, 1);
|
||||
SampleManager.SetChannelLoopPoints(CHANNEL_POLICE_RADIO, 0, -1);
|
||||
SampleManager.StartChannel(CHANNEL_POLICE_RADIO);
|
||||
}
|
||||
if (processed) ResetPoliceRadio();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cAudioManager::SetupCrimeReport()
|
||||
{
|
||||
int16 audioZoneId;
|
||||
@@ -264,13 +268,13 @@ cAudioManager::SetupCrimeReport()
|
||||
float quarterY;
|
||||
int i;
|
||||
int32 sampleIndex;
|
||||
bool processed = false;
|
||||
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) {
|
||||
AgeCrimes();
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
||||
@@ -278,7 +282,7 @@ cAudioManager::SetupCrimeReport()
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return false;
|
||||
if (i == ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) return FALSE;
|
||||
audioZoneId = CTheZones::FindAudioZone(&m_sPoliceRadioQueue.crimes[i].position);
|
||||
if (audioZoneId >= 0 && audioZoneId < NUMAUDIOZONES) {
|
||||
zone = CTheZones::GetAudioZone(audioZoneId);
|
||||
@@ -303,9 +307,9 @@ cAudioManager::SetupCrimeReport()
|
||||
default: break;
|
||||
}
|
||||
#ifdef FIX_BUGS
|
||||
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1 - 1);
|
||||
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_SFX_CRIME_1 - 1);
|
||||
#else
|
||||
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1);
|
||||
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_SFX_CRIME_1);
|
||||
#endif
|
||||
m_sPoliceRadioQueue.Add(SFX_IN);
|
||||
rangeX = zone->maxx - zone->minx;
|
||||
@@ -317,10 +321,10 @@ cAudioManager::SetupCrimeReport()
|
||||
|
||||
if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
|
||||
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
||||
processed = true;
|
||||
processed = TRUE;
|
||||
} else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
|
||||
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
||||
processed = true;
|
||||
processed = TRUE;
|
||||
}
|
||||
|
||||
if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
|
||||
@@ -339,7 +343,7 @@ cAudioManager::SetupCrimeReport()
|
||||
}
|
||||
m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
|
||||
AgeCrimes();
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -354,85 +358,85 @@ cAudioManager::SetupSuspectLastSeenReport()
|
||||
int32 color_post_modifier;
|
||||
|
||||
const int32 gCarColourTable[][3] = {
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_BRIGHT, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, SFX_SFX_POLICE_RADIO_BLUE, SFX_SFX_POLICE_RADIO_GREY},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{NO_SAMPLE, SFX_SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
||||
@@ -468,7 +472,7 @@ cAudioManager::SetupSuspectLastSeenReport()
|
||||
case MI_RANCHER:
|
||||
case MI_FBIRANCH:
|
||||
case MI_SANDKING:
|
||||
sample = SFX_POLICE_RADIO_OFFROAD;
|
||||
sample = SFX_SFX_POLICE_RADIO_OFFROAD;
|
||||
break;
|
||||
case MI_IDAHO:
|
||||
case MI_MANANA:
|
||||
@@ -479,7 +483,7 @@ cAudioManager::SetupSuspectLastSeenReport()
|
||||
case MI_SABRETUR:
|
||||
case MI_VIRGO:
|
||||
case MI_BLISTAC:
|
||||
sample = SFX_POLICE_RADIO_2_DOOR;
|
||||
sample = SFX_SFX_POLICE_RADIO_TUDOOR;
|
||||
break;
|
||||
case MI_STINGER:
|
||||
case MI_INFERNUS:
|
||||
@@ -489,14 +493,14 @@ cAudioManager::SetupSuspectLastSeenReport()
|
||||
case MI_COMET:
|
||||
case MI_DELUXO:
|
||||
case MI_HOTRING:
|
||||
sample = SFX_POLICE_RADIO_SPORTS_CAR;
|
||||
sample = SFX_SFX_POLICE_RADIO_SPORTS_CAR;
|
||||
break;
|
||||
case MI_LINERUN:
|
||||
sample = SFX_POLICE_RADIO_RIG;
|
||||
sample = SFX_SFX_POLICE_RADIO_RIG;
|
||||
break;
|
||||
case MI_PEREN:
|
||||
case MI_REGINA:
|
||||
sample = SFX_POLICE_RADIO_STATION_WAGON;
|
||||
sample = SFX_SFX_POLICE_RADIO_STATION_WAGON;
|
||||
break;
|
||||
case MI_SENTINEL:
|
||||
case MI_FBICAR:
|
||||
@@ -507,23 +511,23 @@ cAudioManager::SetupSuspectLastSeenReport()
|
||||
case MI_OCEANIC:
|
||||
case MI_HERMES:
|
||||
case MI_GREENWOO:
|
||||
sample = SFX_POLICE_RADIO_SEDAN;
|
||||
sample = SFX_SFX_POLICE_RADIO_SEDAN;
|
||||
break;
|
||||
case MI_RIO:
|
||||
sample = SFX_POLICE_RADIO_CRUISER;
|
||||
sample = SFX_SFX_POLICE_RADIO_CRUISER;
|
||||
break;
|
||||
case MI_FIRETRUCK:
|
||||
sample = SFX_POLICE_RADIO_FIRE_TRUCK;
|
||||
sample = SFX_SFX_POLICE_RADIO_FIRE_TRUCK;
|
||||
break;
|
||||
case MI_TRASH:
|
||||
sample = SFX_POLICE_RADIO_GARBAGE_TRUCK;
|
||||
sample = SFX_SFX_POLICE_RADIO_GARBAGE_TRUCK;
|
||||
break;
|
||||
case MI_STRETCH:
|
||||
case MI_LOVEFIST:
|
||||
sample = SFX_POLICE_RADIO_STRETCH;
|
||||
sample = SFX_SFX_POLICE_RADIO_STRETCH;
|
||||
break;
|
||||
case MI_VOODOO:
|
||||
sample = SFX_POLICE_RADIO_LOWRIDER;
|
||||
sample = SFX_SFX_POLICE_RADIO_LOWRIDER;
|
||||
break;
|
||||
case MI_PONY:
|
||||
case MI_MOONBEAM:
|
||||
@@ -534,31 +538,31 @@ cAudioManager::SetupSuspectLastSeenReport()
|
||||
case MI_TOPFUN:
|
||||
case MI_BURRITO:
|
||||
case MI_SPAND:
|
||||
sample = SFX_POLICE_RADIO_VAN;
|
||||
sample = SFX_SFX_POLICE_RADIO_VAN;
|
||||
break;
|
||||
case MI_MULE:
|
||||
case MI_BARRACKS:
|
||||
case MI_PACKER:
|
||||
case MI_FLATBED:
|
||||
sample = SFX_POLICE_RADIO_TRUCK;
|
||||
sample = SFX_SFX_POLICE_RADIO_TRUCK;
|
||||
break;
|
||||
case MI_AMBULAN:
|
||||
sample = SFX_POLICE_RADIO_AMBULANCE;
|
||||
sample = SFX_SFX_POLICE_RADIO_AMBULANCE;
|
||||
break;
|
||||
case MI_TAXI:
|
||||
case MI_CABBIE:
|
||||
case MI_BORGNINE:
|
||||
sample = SFX_POLICE_RADIO_TAXI;
|
||||
sample = SFX_SFX_POLICE_RADIO_TAXI;
|
||||
break;
|
||||
case MI_BOBCAT:
|
||||
case MI_WALTON:
|
||||
sample = SFX_POLICE_RADIO_PICKUP;
|
||||
sample = SFX_SFX_POLICE_RADIO_PICKUP;
|
||||
break;
|
||||
case MI_MRWHOOP:
|
||||
sample = SFX_POLICE_RADIO_ICE_CREAM_VAN;
|
||||
sample = SFX_SFX_POLICE_RADIO_ICE_CREAM_VAN;
|
||||
break;
|
||||
case MI_BFINJECT:
|
||||
sample = SFX_POLICE_RADIO_BUGGY;
|
||||
sample = SFX_SFX_POLICE_RADIO_BUGGY;
|
||||
break;
|
||||
case MI_HUNTER:
|
||||
case MI_CHOPPER:
|
||||
@@ -567,57 +571,57 @@ cAudioManager::SetupSuspectLastSeenReport()
|
||||
case MI_MAVERICK:
|
||||
case MI_VCNMAV:
|
||||
case MI_POLMAV:
|
||||
sample = SFX_POLICE_RADIO_HELICOPTER;
|
||||
sample = SFX_SFX_POLICE_RADIO_HELICOPTER;
|
||||
break;
|
||||
case MI_POLICE:
|
||||
sample = SFX_POLICE_RADIO_POLICE_CAR;
|
||||
sample = SFX_SFX_POLICE_RADIO_POLICE_CAR;
|
||||
break;
|
||||
case MI_ENFORCER:
|
||||
sample = SFX_POLICE_RADIO_SWAT_VAN;
|
||||
sample = SFX_SFX_POLICE_RADIO_SWAT_VAN;
|
||||
break;
|
||||
case MI_PREDATOR:
|
||||
case MI_SQUALO:
|
||||
case MI_SPEEDER:
|
||||
sample = SFX_POLICE_RADIO_SPEEDBOAT;
|
||||
sample = SFX_SFX_POLICE_RADIO_SPEEDBOAT;
|
||||
break;
|
||||
case MI_BUS:
|
||||
sample = SFX_POLICE_RADIO_BUS;
|
||||
sample = SFX_SFX_POLICE_RADIO_BUS;
|
||||
break;
|
||||
case MI_RHINO:
|
||||
sample = SFX_POLICE_RADIO_TANK;
|
||||
sample = SFX_SFX_POLICE_RADIO_TANK;
|
||||
break;
|
||||
case MI_ANGEL:
|
||||
case MI_PCJ600:
|
||||
case MI_FREEWAY:
|
||||
case MI_SANCHEZ:
|
||||
sample = SFX_POLICE_RADIO_MOTOBIKE;
|
||||
sample = SFX_SFX_POLICE_RADIO_MOTOBIKE;
|
||||
break;
|
||||
case MI_COACH:
|
||||
sample = SFX_POLICE_RADIO_COACH;
|
||||
sample = SFX_SFX_POLICE_RADIO_COACH;
|
||||
break;
|
||||
case MI_ROMERO:
|
||||
sample = SFX_POLICE_RADIO_HEARSE;
|
||||
sample = SFX_SFX_POLICE_RADIO_HEARSE;
|
||||
break;
|
||||
case MI_PIZZABOY:
|
||||
case MI_FAGGIO:
|
||||
sample = SFX_POLICE_RADIO_MOPED;
|
||||
sample = SFX_SFX_POLICE_RADIO_MOPED;
|
||||
break;
|
||||
case MI_DEADDODO:
|
||||
case MI_SKIMMER:
|
||||
sample = SFX_POLICE_RADIO_PLANE;
|
||||
sample = SFX_SFX_POLICE_RADIO_PLANE;
|
||||
break;
|
||||
case MI_REEFER:
|
||||
case MI_TROPIC:
|
||||
case MI_COASTG:
|
||||
case MI_MARQUIS:
|
||||
case MI_JETMAX:
|
||||
sample = SFX_POLICE_RADIO_BOAT;
|
||||
sample = SFX_SFX_POLICE_RADIO_BOAT;
|
||||
break;
|
||||
case MI_CADDY:
|
||||
sample = SFX_POLICE_RADIO_GOLF_CART;
|
||||
sample = SFX_SFX_POLICE_RADIO_GOLF_CART;
|
||||
break;
|
||||
case MI_DINGHY:
|
||||
sample = SFX_POLICE_RADIO_DINGHY;
|
||||
sample = SFX_SFX_POLICE_RADIO_DINGHY;
|
||||
break;
|
||||
default:
|
||||
//debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex());
|
||||
@@ -687,7 +691,7 @@ 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;
|
||||
@@ -712,10 +716,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)
|
||||
@@ -727,7 +731,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
|
||||
m_sPoliceRadioQueue.Add(sample);
|
||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
||||
gSpecialSuspectLastSeenReport = true;
|
||||
gSpecialSuspectLastSeenReport = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
+26
-1
@@ -14,8 +14,8 @@ enum eRadioStation
|
||||
USERTRACK,
|
||||
NUM_RADIOS = 11,
|
||||
POLICE_RADIO = 11,
|
||||
RADIO_OFF = 10,
|
||||
//TAXI_RADIO,
|
||||
RADIO_OFF,
|
||||
};
|
||||
|
||||
enum eMusicMode
|
||||
@@ -137,3 +137,28 @@ enum eAudioType
|
||||
AUDIOTYPE_POLICERADIO,
|
||||
TOTAL_AUDIO_TYPES,
|
||||
};
|
||||
|
||||
#ifdef GTA_PS2
|
||||
enum
|
||||
{
|
||||
NUM_CHANNELS_GENERIC = 40,
|
||||
CHANNEL_POLICE_RADIO = NUM_CHANNELS_GENERIC,
|
||||
CHANNEL_MISSION_AUDIO_1,
|
||||
CHANNEL_MISSION_AUDIO_2,
|
||||
CHANNEL_PLAYER_VEHICLE_ENGINE,
|
||||
NUM_CHANNELS
|
||||
};
|
||||
#else
|
||||
enum
|
||||
{
|
||||
#ifdef PS2_AUDIO_CHANNELS
|
||||
NUM_CHANNELS_GENERIC = 40,
|
||||
#else
|
||||
NUM_CHANNELS_GENERIC = 20,
|
||||
#endif
|
||||
CHANNEL_POLICE_RADIO,
|
||||
CHANNEL_MISSION_AUDIO_1,
|
||||
CHANNEL_MISSION_AUDIO_2,
|
||||
NUM_CHANNELS
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -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);
|
||||
|
||||
+14
-1
@@ -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;
|
||||
|
||||
+80
-13
@@ -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]);
|
||||
@@ -165,10 +190,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)
|
||||
@@ -200,6 +266,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);
|
||||
Data = nil;
|
||||
DataSize = 0;
|
||||
|
||||
@@ -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
|
||||
+62
-34
@@ -464,8 +464,8 @@ 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
|
||||
// fuzzy seek eliminates stutter when playing ADF but spams errors a lot (and breaks radio sometimes)
|
||||
//#define MP3_USE_FUZZY_SEEK
|
||||
|
||||
class CMP3File : public IDecoder
|
||||
{
|
||||
@@ -492,6 +492,8 @@ public:
|
||||
{
|
||||
#ifdef MP3_USE_FUZZY_SEEK
|
||||
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
|
||||
#else
|
||||
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0);
|
||||
#endif
|
||||
long rate = 0;
|
||||
int channels = 0;
|
||||
@@ -499,6 +501,7 @@ public:
|
||||
|
||||
m_bOpened = mpg123_open(m_pMH, path) == MPG123_OK
|
||||
&& mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK;
|
||||
|
||||
m_nRate = rate;
|
||||
m_nChannels = channels;
|
||||
|
||||
@@ -601,6 +604,8 @@ public:
|
||||
{
|
||||
#ifdef MP3_USE_FUZZY_SEEK
|
||||
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
|
||||
#else
|
||||
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_SEEKBUFFER | MPG123_GAPLESS, 0.0);
|
||||
#endif
|
||||
long rate = 0;
|
||||
int channels = 0;
|
||||
@@ -980,7 +985,8 @@ CStream::CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBU
|
||||
m_bReset(false),
|
||||
m_nVolume(0),
|
||||
m_nPan(0),
|
||||
m_nPosBeforeReset(0)
|
||||
m_nPosBeforeReset(0),
|
||||
m_nLoopCount(1)
|
||||
|
||||
{
|
||||
// Be case-insensitive on linux (from https://github.com/OneSadCookie/fcaseopen/)
|
||||
@@ -1078,7 +1084,7 @@ 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;
|
||||
}
|
||||
|
||||
@@ -1150,6 +1156,7 @@ void CStream::SetPan(uint8 nPan)
|
||||
m_nPan = nPan;
|
||||
}
|
||||
|
||||
// Should only be called if source is stopped
|
||||
void CStream::SetPosMS(uint32 nPos)
|
||||
{
|
||||
if ( !IsOpened() ) return;
|
||||
@@ -1232,10 +1239,16 @@ void CStream::ClearBuffers()
|
||||
alSourceUnqueueBuffers(m_pAlSources[1], 1, &value);
|
||||
}
|
||||
|
||||
bool CStream::Setup()
|
||||
bool CStream::Setup(bool imSureQueueIsEmpty)
|
||||
{
|
||||
if ( IsOpened() )
|
||||
{
|
||||
alSourcei(m_pAlSources[0], AL_LOOPING, AL_FALSE);
|
||||
alSourcei(m_pAlSources[1], AL_LOOPING, AL_FALSE);
|
||||
if (!imSureQueueIsEmpty) {
|
||||
SetPlay(false);
|
||||
ClearBuffers();
|
||||
}
|
||||
m_pSoundFile->Seek(0);
|
||||
//SetPosition(0.0f, 0.0f, 0.0f);
|
||||
SetPitch(1.0f);
|
||||
@@ -1246,6 +1259,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;
|
||||
@@ -1305,7 +1325,7 @@ void CStream::Update()
|
||||
|
||||
if ( !m_bPaused )
|
||||
{
|
||||
ALint sourceState[2];
|
||||
ALint totalBuffers[2] = { 0, 0 };
|
||||
ALint buffersProcessed[2] = { 0, 0 };
|
||||
|
||||
// Relying a lot on left buffer states in here
|
||||
@@ -1313,44 +1333,51 @@ void CStream::Update()
|
||||
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]);
|
||||
|
||||
while( buffersProcessed[0]-- )
|
||||
// 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
|
||||
|
||||
bool buffersRefilled = false;
|
||||
|
||||
// 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))
|
||||
Setup(true);
|
||||
buffersRefilled = FillBuffers() != 0;
|
||||
if (m_nLoopCount != 0)
|
||||
m_nLoopCount--;
|
||||
}
|
||||
else
|
||||
{
|
||||
while( buffersProcessed[0]-- )
|
||||
{
|
||||
alSourceQueueBuffers(m_pAlSources[0], 1, &buffer[0]);
|
||||
alSourceQueueBuffers(m_pAlSources[1], 1, &buffer[1]);
|
||||
ALuint buffer[2];
|
||||
|
||||
alSourceUnqueueBuffers(m_pAlSources[0], 1, &buffer[0]);
|
||||
alSourceUnqueueBuffers(m_pAlSources[1], 1, &buffer[1]);
|
||||
|
||||
if (m_bActive && FillBuffer(buffer))
|
||||
{
|
||||
buffersRefilled = true;
|
||||
alSourceQueueBuffers(m_pAlSources[0], 1, &buffer[0]);
|
||||
alSourceQueueBuffers(m_pAlSources[1], 1, &buffer[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( sourceState[0] != AL_PLAYING )
|
||||
{
|
||||
alGetSourcei(m_pAlSources[0], AL_BUFFERS_PROCESSED, &buffersProcessed[0]);
|
||||
SetPlay(buffersProcessed[0]!=0);
|
||||
}
|
||||
|
||||
// Two reasons: 1-Source may be starved to audio and stopped itself, 2- We're already waiting it to starve and die for looping track!
|
||||
if (m_bActive && (buffersRefilled || (totalBuffers[1] - buffersProcessed[1] != 0)))
|
||||
SetPlay(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1358,10 +1385,11 @@ void CStream::ProviderInit()
|
||||
{
|
||||
if ( m_bReset )
|
||||
{
|
||||
if ( Setup() )
|
||||
if ( Setup(true) )
|
||||
{
|
||||
SetPan(m_nPan);
|
||||
SetVolume(m_nVolume);
|
||||
SetLoopCount(m_nLoopCount);
|
||||
SetPosMS(m_nPosBeforeReset);
|
||||
if (m_bActive)
|
||||
FillBuffers();
|
||||
|
||||
@@ -69,6 +69,7 @@ class CStream
|
||||
uint32 m_nVolume;
|
||||
uint8 m_nPan;
|
||||
uint32 m_nPosBeforeReset;
|
||||
int32 m_nLoopCount;
|
||||
|
||||
IDecoder *m_pSoundFile;
|
||||
|
||||
@@ -99,10 +100,12 @@ public:
|
||||
uint32 GetPosMS();
|
||||
uint32 GetLengthMS();
|
||||
|
||||
bool Setup();
|
||||
bool Setup(bool imSureQueueIsEmpty = false);
|
||||
void Start();
|
||||
void Stop();
|
||||
void Update(void);
|
||||
void SetLoopCount(int32);
|
||||
|
||||
|
||||
void ProviderInit();
|
||||
void ProviderTerm();
|
||||
|
||||
+110
-247
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "AudioSamples.h"
|
||||
#include "audio_enums.h"
|
||||
|
||||
#define MAX_VOLUME 127
|
||||
#define MAX_FREQ DIGITALRATE
|
||||
@@ -111,22 +112,29 @@ enum
|
||||
#endif
|
||||
};
|
||||
#define MAX_PEDSFX 7
|
||||
#define PED_BLOCKSIZE 79000
|
||||
#define PED_BLOCKSIZE 160000
|
||||
|
||||
#define MAXPROVIDERS 64
|
||||
|
||||
#define MAXCHANNELS 28
|
||||
#define MAXCHANNELS_SURROUND 24
|
||||
#define MAX2DCHANNELS 1
|
||||
#define CHANNEL2D MAXCHANNELS
|
||||
#define MAXCHANNELS (NUM_CHANNELS_GENERIC+1)
|
||||
#define MAXCHANNELS_SURROUND (MAXCHANNELS-4)
|
||||
#define MAX2DCHANNELS 3
|
||||
|
||||
#define MAX_STREAMS 3
|
||||
#define MAX_STREAMS 1
|
||||
|
||||
#define DIGITALRATE 32000
|
||||
#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" );
|
||||
|
||||
extern int gBankStartOffset[67];
|
||||
|
||||
class cSampleManager
|
||||
{
|
||||
@@ -135,9 +143,9 @@ class cSampleManager
|
||||
uint8 m_nMP3BoostVolume;
|
||||
uint8 m_nEffectsFadeVolume;
|
||||
uint8 m_nMusicFadeVolume;
|
||||
uint8 m_nMonoMode;
|
||||
bool8 m_nMonoMode;
|
||||
char m_szCDRomRootPath[80];
|
||||
bool m_bInitialised;
|
||||
bool8 m_bInitialised;
|
||||
uint8 m_nNumberOfProviders;
|
||||
char *m_aAudioProviders[MAXPROVIDERS];
|
||||
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
|
||||
@@ -167,16 +175,16 @@ public:
|
||||
|
||||
int8 AutoDetect3DProviders();
|
||||
|
||||
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);
|
||||
|
||||
@@ -185,14 +193,14 @@ public:
|
||||
void SetMP3BoostVolume (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);
|
||||
@@ -202,10 +210,10 @@ 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);
|
||||
void SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume);
|
||||
void SetChannel3DPosition (uint32 nChannel, float fX, float fY, float fZ);
|
||||
void SetChannel3DDistances (uint32 nChannel, float fMax, float fMin);
|
||||
@@ -214,241 +222,96 @@ public:
|
||||
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 (uint32 nFile, uint8 nStream);
|
||||
void PauseStream (uint8 nPauseFlag, uint8 nStream);
|
||||
void StartPreloadedStreamedFile (uint8 nStream);
|
||||
bool StartStreamedFile (uint32 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 (uint32 nFile, uint8 nStream = 0);
|
||||
void PauseStream (bool8 nPauseFlag, uint8 nStream = 0);
|
||||
void StartPreloadedStreamedFile (uint8 nStream = 0);
|
||||
bool8 StartStreamedFile (uint32 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);
|
||||
void SetStreamedFileLoopFlag (bool8 nLoopFlag, uint8 nStream = 0);
|
||||
#ifdef AUDIO_OAL
|
||||
void Service(void);
|
||||
#endif
|
||||
bool InitialiseSampleBanks(void);
|
||||
bool8 InitialiseSampleBanks(void);
|
||||
|
||||
uint8 GetMusicVolume() const { return m_nMusicVolume; }
|
||||
void SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nStream);
|
||||
};
|
||||
|
||||
extern cSampleManager SampleManager;
|
||||
extern uint32 BankStartOffset[MAX_SFX_BANKS];
|
||||
|
||||
#if defined(OPUS_AUDIO_PATHS)
|
||||
static char StreamedNameTable[][25] = {
|
||||
"AUDIO\\HEAD.OPUS", "AUDIO\\CLASS.OPUS", "AUDIO\\KJAH.OPUS", "AUDIO\\RISE.OPUS", "AUDIO\\LIPS.OPUS", "AUDIO\\GAME.OPUS",
|
||||
"AUDIO\\MSX.OPUS", "AUDIO\\FLASH.OPUS", "AUDIO\\CHAT.OPUS", "AUDIO\\HEAD.OPUS", "AUDIO\\POLICE.OPUS", "AUDIO\\CITY.OPUS",
|
||||
"AUDIO\\WATER.OPUS", "AUDIO\\COMOPEN.OPUS", "AUDIO\\SUBOPEN.OPUS", "AUDIO\\JB.OPUS", "AUDIO\\BET.OPUS", "AUDIO\\L1_LG.OPUS",
|
||||
"AUDIO\\L2_DSB.OPUS", "AUDIO\\L3_DM.OPUS", "AUDIO\\L4_PAP.OPUS", "AUDIO\\L5_TFB.OPUS", "AUDIO\\J0_DM2.OPUS", "AUDIO\\J1_LFL.OPUS",
|
||||
"AUDIO\\J2_KCL.OPUS", "AUDIO\\J3_VH.OPUS", "AUDIO\\J4_ETH.OPUS", "AUDIO\\J5_DST.OPUS", "AUDIO\\J6_TBJ.OPUS", "AUDIO\\T1_TOL.OPUS",
|
||||
"AUDIO\\T2_TPU.OPUS", "AUDIO\\T3_MAS.OPUS", "AUDIO\\T4_TAT.OPUS", "AUDIO\\T5_BF.OPUS", "AUDIO\\S0_MAS.OPUS", "AUDIO\\S1_PF.OPUS",
|
||||
"AUDIO\\S2_CTG.OPUS", "AUDIO\\S3_RTC.OPUS", "AUDIO\\S5_LRQ.OPUS", "AUDIO\\S4_BDBA.OPUS", "AUDIO\\S4_BDBB.OPUS", "AUDIO\\S2_CTG2.OPUS",
|
||||
"AUDIO\\S4_BDBD.OPUS", "AUDIO\\S5_LRQB.OPUS", "AUDIO\\S5_LRQC.OPUS", "AUDIO\\A1_SSO.OPUS", "AUDIO\\A2_PP.OPUS", "AUDIO\\A3_SS.OPUS",
|
||||
"AUDIO\\A4_PDR.OPUS", "AUDIO\\A5_K2FT.OPUS", "AUDIO\\K1_KBO.OPUS", "AUDIO\\K2_GIS.OPUS", "AUDIO\\K3_DS.OPUS", "AUDIO\\K4_SHI.OPUS",
|
||||
"AUDIO\\K5_SD.OPUS", "AUDIO\\R0_PDR2.OPUS", "AUDIO\\R1_SW.OPUS", "AUDIO\\R2_AP.OPUS", "AUDIO\\R3_ED.OPUS", "AUDIO\\R4_GF.OPUS",
|
||||
"AUDIO\\R5_PB.OPUS", "AUDIO\\R6_MM.OPUS", "AUDIO\\D1_STOG.OPUS", "AUDIO\\D2_KK.OPUS", "AUDIO\\D3_ADO.OPUS", "AUDIO\\D5_ES.OPUS",
|
||||
"AUDIO\\D7_MLD.OPUS", "AUDIO\\D4_GTA.OPUS", "AUDIO\\D4_GTA2.OPUS", "AUDIO\\D6_STS.OPUS", "AUDIO\\A6_BAIT.OPUS", "AUDIO\\A7_ETG.OPUS",
|
||||
"AUDIO\\A8_PS.OPUS", "AUDIO\\A9_ASD.OPUS", "AUDIO\\K4_SHI2.OPUS", "AUDIO\\C1_TEX.OPUS", "AUDIO\\EL_PH1.OPUS", "AUDIO\\EL_PH2.OPUS",
|
||||
"AUDIO\\EL_PH3.OPUS", "AUDIO\\EL_PH4.OPUS", "AUDIO\\YD_PH1.OPUS", "AUDIO\\YD_PH2.OPUS", "AUDIO\\YD_PH3.OPUS", "AUDIO\\YD_PH4.OPUS",
|
||||
"AUDIO\\HD_PH1.OPUS", "AUDIO\\HD_PH2.OPUS", "AUDIO\\HD_PH3.OPUS", "AUDIO\\HD_PH4.OPUS", "AUDIO\\HD_PH5.OPUS", "AUDIO\\MT_PH1.OPUS",
|
||||
"AUDIO\\MT_PH2.OPUS", "AUDIO\\MT_PH3.OPUS", "AUDIO\\MT_PH4.OPUS", "AUDIO\\MISCOM.OPUS", "AUDIO\\END.OPUS", "AUDIO\\lib_a1.OPUS",
|
||||
"AUDIO\\lib_a2.OPUS", "AUDIO\\lib_a.OPUS", "AUDIO\\lib_b.OPUS", "AUDIO\\lib_c.OPUS", "AUDIO\\lib_d.OPUS", "AUDIO\\l2_a.OPUS",
|
||||
"AUDIO\\j4t_1.OPUS", "AUDIO\\j4t_2.OPUS", "AUDIO\\j4t_3.OPUS", "AUDIO\\j4t_4.OPUS", "AUDIO\\j4_a.OPUS", "AUDIO\\j4_b.OPUS",
|
||||
"AUDIO\\j4_c.OPUS", "AUDIO\\j4_d.OPUS", "AUDIO\\j4_e.OPUS", "AUDIO\\j4_f.OPUS", "AUDIO\\j6_1.OPUS", "AUDIO\\j6_a.OPUS",
|
||||
"AUDIO\\j6_b.OPUS", "AUDIO\\j6_c.OPUS", "AUDIO\\j6_d.OPUS", "AUDIO\\t4_a.OPUS", "AUDIO\\s1_a.OPUS", "AUDIO\\s1_a1.OPUS",
|
||||
"AUDIO\\s1_b.OPUS", "AUDIO\\s1_c.OPUS", "AUDIO\\s1_c1.OPUS", "AUDIO\\s1_d.OPUS", "AUDIO\\s1_e.OPUS", "AUDIO\\s1_f.OPUS",
|
||||
"AUDIO\\s1_g.OPUS", "AUDIO\\s1_h.OPUS", "AUDIO\\s1_i.OPUS", "AUDIO\\s1_j.OPUS", "AUDIO\\s1_k.OPUS", "AUDIO\\s1_l.OPUS",
|
||||
"AUDIO\\s3_a.OPUS", "AUDIO\\s3_b.OPUS", "AUDIO\\el3_a.OPUS", "AUDIO\\mf1_a.OPUS", "AUDIO\\mf2_a.OPUS", "AUDIO\\mf3_a.OPUS",
|
||||
"AUDIO\\mf3_b.OPUS", "AUDIO\\mf3_b1.OPUS", "AUDIO\\mf3_c.OPUS", "AUDIO\\mf4_a.OPUS", "AUDIO\\mf4_b.OPUS", "AUDIO\\mf4_c.OPUS",
|
||||
"AUDIO\\a1_a.OPUS", "AUDIO\\a3_a.OPUS", "AUDIO\\a5_a.OPUS", "AUDIO\\a4_a.OPUS", "AUDIO\\a4_b.OPUS", "AUDIO\\a4_c.OPUS",
|
||||
"AUDIO\\a4_d.OPUS", "AUDIO\\k1_a.OPUS", "AUDIO\\k3_a.OPUS", "AUDIO\\r1_a.OPUS", "AUDIO\\r2_a.OPUS", "AUDIO\\r2_b.OPUS",
|
||||
"AUDIO\\r2_c.OPUS", "AUDIO\\r2_d.OPUS", "AUDIO\\r2_e.OPUS", "AUDIO\\r2_f.OPUS", "AUDIO\\r2_g.OPUS", "AUDIO\\r2_h.OPUS",
|
||||
"AUDIO\\r5_a.OPUS", "AUDIO\\r6_a.OPUS", "AUDIO\\r6_a1.OPUS", "AUDIO\\r6_b.OPUS", "AUDIO\\lo2_a.OPUS", "AUDIO\\lo6_a.OPUS",
|
||||
"AUDIO\\yd2_a.OPUS", "AUDIO\\yd2_b.OPUS", "AUDIO\\yd2_c.OPUS", "AUDIO\\yd2_c1.OPUS", "AUDIO\\yd2_d.OPUS", "AUDIO\\yd2_e.OPUS",
|
||||
"AUDIO\\yd2_f.OPUS", "AUDIO\\yd2_g.OPUS", "AUDIO\\yd2_h.OPUS", "AUDIO\\yd2_ass.OPUS", "AUDIO\\yd2_ok.OPUS", "AUDIO\\h5_a.OPUS",
|
||||
"AUDIO\\h5_b.OPUS", "AUDIO\\h5_c.OPUS", "AUDIO\\ammu_a.OPUS", "AUDIO\\ammu_b.OPUS", "AUDIO\\ammu_c.OPUS", "AUDIO\\door_1.OPUS",
|
||||
"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"};
|
||||
#elif defined(PS2_AUDIO_PATHS)
|
||||
static char StreamedNameTable[][40] =
|
||||
{
|
||||
"AUDIO\\MUSIC\\HEAD.VB",
|
||||
"AUDIO\\MUSIC\\DOUBLE.VB",
|
||||
"AUDIO\\MUSIC\\KJAH.VB",
|
||||
"AUDIO\\MUSIC\\RISE.VB",
|
||||
"AUDIO\\MUSIC\\LIPS.VB",
|
||||
"AUDIO\\MUSIC\\MUNDO.VB",
|
||||
"AUDIO\\MUSIC\\MSX.VB",
|
||||
"AUDIO\\MUSIC\\FLASH.VB",
|
||||
"AUDIO\\MUSIC\\LCJ.VB",
|
||||
"AUDIO\\MUSIC\\LCFR.VB",
|
||||
"AUDIO\\MUSIC\\MISCOM2.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\WATER.VB",
|
||||
"AUDIO\\MUSIC\\SAWMILL.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\WATER.VB",
|
||||
"AUDIO\\MUSIC\\WATER.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\CITY.VB",
|
||||
"AUDIO\\MUSIC\\POLICE.VB",
|
||||
"AUDIO\\MUSIC\\TAXI.VB",
|
||||
"AUDIO\\NEWS\\NEWS_A.VB",
|
||||
"AUDIO\\NEWS\\NEWS_B.VB",
|
||||
"AUDIO\\NEWS\\NEWS_C.VB",
|
||||
"AUDIO\\NEWS\\NEWS_D.VB",
|
||||
"AUDIO\\NEWS\\NEWS_E.VB",
|
||||
"AUDIO\\NEWS\\NEWS_F.VB",
|
||||
"AUDIO\\NEWS\\NEWS_G.VB",
|
||||
"AUDIO\\NEWS\\NEWS_H.VB",
|
||||
"AUDIO\\NEWS\\NEWS_I.VB",
|
||||
"AUDIO\\NEWS\\NEWS_J.VB",
|
||||
"AUDIO\\NEWS\\NEWS_K.VB",
|
||||
"AUDIO\\NEWS\\NEWS_L.VB",
|
||||
"AUDIO\\NEWS\\NEWS_M.VB",
|
||||
"AUDIO\\NEWS\\NEWS_N.VB",
|
||||
"AUDIO\\CUTSCENE\\BIKER.VB",
|
||||
"AUDIO\\CUTSCENE\\BONEVOY.VB",
|
||||
"AUDIO\\CUTSCENE\\CAMPAIN.VB",
|
||||
"AUDIO\\CUTSCENE\\CASHCHP.VB",
|
||||
"AUDIO\\CUTSCENE\\CONTBAN.VB",
|
||||
"AUDIO\\CUTSCENE\\CRAZY69.VB",
|
||||
"AUDIO\\CUTSCENE\\CRAZY69.VB",
|
||||
"AUDIO\\CUTSCENE\\DEADLY.VB",
|
||||
"AUDIO\\CUTSCENE\\DONPROB.VB",
|
||||
"AUDIO\\CUTSCENE\\DRIVNMR.VB",
|
||||
"AUDIO\\CUTSCENE\\ELECTON.VB",
|
||||
"AUDIO\\CUTSCENE\\FINAL.VB",
|
||||
"AUDIO\\CUTSCENE\\FINAL_2.VB",
|
||||
"AUDIO\\CUTSCENE\\HOMSWET.VB",
|
||||
"AUDIO\\CUTSCENE\\HOTWHEL.VB",
|
||||
"AUDIO\\CUTSCENE\\KIDNAPP.VB",
|
||||
"AUDIO\\CUTSCENE\\LANDGRB.VB",
|
||||
"AUDIO\\CUTSCENE\\MORGUE.VB",
|
||||
"AUDIO\\CUTSCENE\\OVERDOS.VB",
|
||||
"AUDIO\\CUTSCENE\\RUFJUST.VB",
|
||||
"AUDIO\\CUTSCENE\\SAYONAR.VB",
|
||||
"AUDIO\\CUTSCENE\\SICILAN.VB",
|
||||
"AUDIO\\CUTSCENE\\THEOFER.VB",
|
||||
"AUDIO\\CUTSCENE\\INTRO.VB",
|
||||
"AUDIO\\MUSIC\\FINALE.VB",
|
||||
"AUDIO\\MUSIC\\MISCOM2.VB"
|
||||
#else
|
||||
static char StreamedNameTable[][25] =
|
||||
{
|
||||
"AUDIO\\WILD.ADF",
|
||||
"AUDIO\\FLASH.ADF",
|
||||
"AUDIO\\KCHAT.ADF",
|
||||
"AUDIO\\FEVER.ADF",
|
||||
"AUDIO\\VROCK.ADF",
|
||||
"AUDIO\\VCPR.ADF",
|
||||
"AUDIO\\ESPANT.ADF",
|
||||
"AUDIO\\EMOTION.ADF",
|
||||
"AUDIO\\WAVE.ADF",
|
||||
"AUDIO\\MISCOM.MP3",
|
||||
"AUDIO\\CITY.MP3",
|
||||
"AUDIO\\WATER.MP3",
|
||||
"AUDIO\\BEACHAMB.MP3",
|
||||
"AUDIO\\HCITY.MP3",
|
||||
"AUDIO\\HWATER.MP3",
|
||||
"AUDIO\\HBEACH.MP3",
|
||||
"AUDIO\\MALLAMB.MP3",
|
||||
"AUDIO\\STRIP.MP3",
|
||||
"AUDIO\\MALIBU.MP3",
|
||||
"AUDIO\\HOTEL.MP3",
|
||||
"AUDIO\\DIRTRING.MP3",
|
||||
"AUDIO\\LAW4RIOT.MP3",
|
||||
"AUDIO\\AMBSIL.MP3",
|
||||
"AUDIO\\POLICE.MP3",
|
||||
"AUDIO\\TAXI.MP3",
|
||||
"AUDIO\\BCLOSED.MP3",
|
||||
"AUDIO\\BOPEN.MP3",
|
||||
"AUDIO\\ASS_1.MP3",
|
||||
"AUDIO\\ASS_2.MP3",
|
||||
"AUDIO\\BANK_1.MP3",
|
||||
"AUDIO\\BANK_2A.MP3",
|
||||
"AUDIO\\BANK_2B.MP3",
|
||||
"AUDIO\\BANK_3A.MP3",
|
||||
"AUDIO\\BANK_3B.MP3",
|
||||
"AUDIO\\BANK_4.MP3",
|
||||
"AUDIO\\BIKE_1.MP3",
|
||||
"AUDIO\\BIKE_2.MP3",
|
||||
"AUDIO\\BIKE_3.MP3",
|
||||
"AUDIO\\BUD_1.MP3",
|
||||
"AUDIO\\BUD_2.MP3",
|
||||
"AUDIO\\BUD_3.MP3",
|
||||
"AUDIO\\CAP_1.MP3",
|
||||
"AUDIO\\CAR_1.MP3",
|
||||
"AUDIO\\CNT_1A.MP3",
|
||||
"AUDIO\\CNT_1B.MP3",
|
||||
"AUDIO\\CNT_2.MP3",
|
||||
"AUDIO\\COK_1.MP3",
|
||||
"AUDIO\\COK_2A.MP3",
|
||||
"AUDIO\\COK_2B.MP3",
|
||||
"AUDIO\\COK_3.MP3",
|
||||
"AUDIO\\COK_4A.MP3",
|
||||
"AUDIO\\COK_4A2.MP3",
|
||||
"AUDIO\\COK_4B.MP3",
|
||||
"AUDIO\\COL_1.MP3",
|
||||
"AUDIO\\COL_2.MP3",
|
||||
"AUDIO\\COL_3A.MP3",
|
||||
"AUDIO\\COL_4A.MP3",
|
||||
"AUDIO\\COL_5A.MP3",
|
||||
"AUDIO\\COL_5B.MP3",
|
||||
"AUDIO\\CUB_1.MP3",
|
||||
"AUDIO\\CUB_2.MP3",
|
||||
"AUDIO\\CUB_3.MP3",
|
||||
"AUDIO\\CUB_4.MP3",
|
||||
"AUDIO\\DRUG_1.MP3",
|
||||
"AUDIO\\FIN.MP3",
|
||||
"AUDIO\\FIN2.MP3",
|
||||
"AUDIO\\FINALE.MP3",
|
||||
"AUDIO\\HAT_1.MP3",
|
||||
"AUDIO\\HAT_2.MP3",
|
||||
"AUDIO\\HAT_3.MP3",
|
||||
"AUDIO\\ICE_1.MP3",
|
||||
"AUDIO\\INT_A.MP3",
|
||||
"AUDIO\\INT_B.MP3",
|
||||
"AUDIO\\INT_D.MP3",
|
||||
"AUDIO\\INT_M.MP3",
|
||||
"AUDIO\\LAW_1A.MP3",
|
||||
"AUDIO\\LAW_1B.MP3",
|
||||
"AUDIO\\LAW_2A.MP3",
|
||||
"AUDIO\\LAW_2B.MP3",
|
||||
"AUDIO\\LAW_2C.MP3",
|
||||
"AUDIO\\LAW_3.MP3",
|
||||
"AUDIO\\LAW_4.MP3",
|
||||
"AUDIO\\PHIL_1.MP3",
|
||||
"AUDIO\\PHIL_2.MP3",
|
||||
"AUDIO\\PORN_1.MP3",
|
||||
"AUDIO\\PORN_2.MP3",
|
||||
"AUDIO\\PORN_3.MP3",
|
||||
"AUDIO\\PORN_4.MP3",
|
||||
"AUDIO\\RESC_1A.MP3",
|
||||
"AUDIO\\ROK_1.MP3",
|
||||
"AUDIO\\ROK_2.MP3",
|
||||
"AUDIO\\ROK_3A.MP3",
|
||||
"AUDIO\\STRIPA.MP3",
|
||||
"AUDIO\\TAX_1.MP3",
|
||||
"AUDIO\\TEX_1.MP3",
|
||||
"AUDIO\\TEX_2.MP3",
|
||||
"AUDIO\\TEX_3.MP3",
|
||||
"AUDIO\\GLIGHT.MP3",
|
||||
"AUDIO\\FIST.MP3",
|
||||
"AUDIO\\MISCOM.MP3",
|
||||
"AUDIO\\MISCOM.MP3",
|
||||
"AUDIO\\MISCOM.MP3",
|
||||
"AUDIO\\MISCOM.MP3",
|
||||
#endif
|
||||
|
||||
static char StreamedNameTable[][40] = {
|
||||
"AUDIO\\MUSIC\\HEAD",
|
||||
"AUDIO\\MUSIC\\DOUBLE",
|
||||
"AUDIO\\MUSIC\\KJAH",
|
||||
"AUDIO\\MUSIC\\RISE",
|
||||
"AUDIO\\MUSIC\\LIPS",
|
||||
"AUDIO\\MUSIC\\MUNDO",
|
||||
"AUDIO\\MUSIC\\MSX",
|
||||
"AUDIO\\MUSIC\\FLASH",
|
||||
"AUDIO\\MUSIC\\LCJ",
|
||||
"AUDIO\\MUSIC\\LCFR",
|
||||
"AUDIO\\MUSIC\\MISCOM2",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\WATER",
|
||||
"AUDIO\\MUSIC\\SAWMILL",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\WATER",
|
||||
"AUDIO\\MUSIC\\WATER",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\CITY",
|
||||
"AUDIO\\MUSIC\\POLICE",
|
||||
"AUDIO\\MUSIC\\TAXI",
|
||||
"AUDIO\\NEWS\\NEWS_A",
|
||||
"AUDIO\\NEWS\\NEWS_B",
|
||||
"AUDIO\\NEWS\\NEWS_C",
|
||||
"AUDIO\\NEWS\\NEWS_D",
|
||||
"AUDIO\\NEWS\\NEWS_E",
|
||||
"AUDIO\\NEWS\\NEWS_F",
|
||||
"AUDIO\\NEWS\\NEWS_G",
|
||||
"AUDIO\\NEWS\\NEWS_H",
|
||||
"AUDIO\\NEWS\\NEWS_I",
|
||||
"AUDIO\\NEWS\\NEWS_J",
|
||||
"AUDIO\\NEWS\\NEWS_K",
|
||||
"AUDIO\\NEWS\\NEWS_L",
|
||||
"AUDIO\\NEWS\\NEWS_M",
|
||||
"AUDIO\\NEWS\\NEWS_N",
|
||||
"AUDIO\\CUTSCENE\\BIKER",
|
||||
"AUDIO\\CUTSCENE\\BONEVOY",
|
||||
"AUDIO\\CUTSCENE\\CAMPAIN",
|
||||
"AUDIO\\CUTSCENE\\CASHCHP",
|
||||
"AUDIO\\CUTSCENE\\CONTBAN",
|
||||
"AUDIO\\CUTSCENE\\CRAZY69",
|
||||
"AUDIO\\CUTSCENE\\CRAZY69",
|
||||
"AUDIO\\CUTSCENE\\DEADLY",
|
||||
"AUDIO\\CUTSCENE\\DONPROB",
|
||||
"AUDIO\\CUTSCENE\\DRIVNMR",
|
||||
"AUDIO\\CUTSCENE\\ELECTON",
|
||||
"AUDIO\\CUTSCENE\\FINAL",
|
||||
"AUDIO\\CUTSCENE\\FINAL_2",
|
||||
"AUDIO\\CUTSCENE\\HOMSWET",
|
||||
"AUDIO\\CUTSCENE\\HOTWHEL",
|
||||
"AUDIO\\CUTSCENE\\KIDNAPP",
|
||||
"AUDIO\\CUTSCENE\\LANDGRB",
|
||||
"AUDIO\\CUTSCENE\\MORGUE",
|
||||
"AUDIO\\CUTSCENE\\OVERDOS",
|
||||
"AUDIO\\CUTSCENE\\RUFJUST",
|
||||
"AUDIO\\CUTSCENE\\SAYONAR",
|
||||
"AUDIO\\CUTSCENE\\SICILAN",
|
||||
"AUDIO\\CUTSCENE\\THEOFER",
|
||||
"AUDIO\\CUTSCENE\\INTRO",
|
||||
"AUDIO\\MUSIC\\FINALE",
|
||||
"AUDIO\\MUSIC\\MISCOM2"
|
||||
};
|
||||
+389
-248
File diff suppressed because it is too large
Load Diff
+31
-31
@@ -4,7 +4,7 @@
|
||||
#include "AudioManager.h"
|
||||
|
||||
cSampleManager SampleManager;
|
||||
bool _bSampmanInitialised = false;
|
||||
bool8 _bSampmanInitialised = FALSE;
|
||||
|
||||
uint32 BankStartOffset[MAX_SFX_BANKS];
|
||||
uint32 nNumMP3s;
|
||||
@@ -60,7 +60,7 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cSampleManager::IsMP3RadioChannelAvailable(void)
|
||||
{
|
||||
return nNumMP3s != 0;
|
||||
@@ -75,10 +75,10 @@ void cSampleManager::ReacquireDigitalHandle(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cSampleManager::Initialise(void)
|
||||
{
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -87,9 +87,9 @@ cSampleManager::Terminate(void)
|
||||
|
||||
}
|
||||
|
||||
bool cSampleManager::CheckForAnAudioFileOnCD(void)
|
||||
bool8 cSampleManager::CheckForAnAudioFileOnCD(void)
|
||||
{
|
||||
return true;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
char cSampleManager::GetCDAudioDriveLetter(void)
|
||||
@@ -129,15 +129,15 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
|
||||
}
|
||||
|
||||
void
|
||||
cSampleManager::SetMonoMode(uint8 nMode)
|
||||
cSampleManager::SetMonoMode(bool8 nMode)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cSampleManager::LoadSampleBank(uint8 nBank)
|
||||
{
|
||||
ASSERT( nBank < MAX_SFX_BANKS );
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -146,20 +146,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,11 +169,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cSampleManager::LoadPedComment(uint32 nComment)
|
||||
{
|
||||
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int32
|
||||
@@ -210,22 +210,22 @@ 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;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -281,12 +281,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
|
||||
@@ -308,7 +308,7 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
||||
}
|
||||
|
||||
void
|
||||
cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
|
||||
cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
|
||||
{
|
||||
ASSERT( nStream < MAX_STREAMS );
|
||||
}
|
||||
@@ -319,12 +319,12 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
|
||||
ASSERT( nStream < MAX_STREAMS );
|
||||
}
|
||||
|
||||
bool
|
||||
bool8
|
||||
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
||||
{
|
||||
ASSERT( nStream < MAX_STREAMS );
|
||||
|
||||
return false;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -342,7 +342,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)
|
||||
{
|
||||
ASSERT( nStream < MAX_STREAMS );
|
||||
}
|
||||
@@ -355,23 +355,23 @@ 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;
|
||||
}
|
||||
|
||||
void
|
||||
cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
|
||||
cSampleManager::SetStreamedFileLoopFlag(bool8 nLoopFlag, uint8 nChannel)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+587
-412
File diff suppressed because it is too large
Load Diff
+16
-16
@@ -54,8 +54,8 @@ enum eSound
|
||||
SOUND_49,
|
||||
SOUND_WEAPON_BAT_ATTACK,
|
||||
SOUND_WEAPON_KNIFE_ATTACK,
|
||||
SOUND_WEAPON_CHAINSAW_ATTACK,
|
||||
SOUND_WEAPON_CHAINSAW_IDLE,
|
||||
SOUND_WEAPON_CHAINSAW_ATTACK,
|
||||
SOUND_WEAPON_CHAINSAW_MADECONTACT,
|
||||
SOUND_WEAPON_SHOT_FIRED,
|
||||
SOUND_WEAPON_RELOAD,
|
||||
@@ -116,8 +116,8 @@ enum eSound
|
||||
SOUND_PED_MIAMIVICE_EXITING_CAR,
|
||||
SOUND_PED_COP_HELIPILOTPHRASE,
|
||||
SOUND_PED_PULLOUTWEAPON,
|
||||
SOUND_PED_HELI_PLAYER_FOUND = 114,
|
||||
SOUND_PED_VCPA_PLAYER_FOUND = 115,
|
||||
SOUND_PED_HELI_PLAYER_FOUND,
|
||||
SOUND_PED_VCPA_PLAYER_FOUND,
|
||||
SOUND_PED_ON_FIRE,
|
||||
SOUND_PED_AIMING,
|
||||
SOUND_PED_HANDS_UP,
|
||||
@@ -128,15 +128,15 @@ enum eSound
|
||||
SOUND_PED_CAR_JACKED,
|
||||
SOUND_PED_ROBBED,
|
||||
SOUND_PED_ACCIDENTREACTION1,
|
||||
SOUND_PED_UNK_126,
|
||||
SOUND_PED_INNOCENT,
|
||||
SOUND_PED_PLAYER_AFTERSEX,
|
||||
SOUND_PED_PLAYER_BEFORESEX,
|
||||
SOUND_PED_COP_UNK_129, // also used for medics
|
||||
SOUND_PED_COP_TARGETING, // also used for medics
|
||||
SOUND_PED_COP_MANYCOPSAROUND, // also used for medics
|
||||
SOUND_PED_GUNAIMEDAT2,
|
||||
SOUND_PED_COP_ALONE, // also used for medics
|
||||
SOUND_PED_GUNAIMEDAT3,
|
||||
SOUND_PED_COP_REACTION,
|
||||
SOUND_PED_COP_ASK_FOR_ID,
|
||||
SOUND_PED_COP_LITTLECOPSAROUND, // also used for medics
|
||||
SOUND_PED_PLAYER_FARFROMCOPS, // also used for medics
|
||||
SOUND_PED_TAXI_WAIT,
|
||||
@@ -151,12 +151,12 @@ enum eSound
|
||||
SOUND_PED_ANNOYED_DRIVER,
|
||||
SOUND_PED_147,
|
||||
SOUND_PED_SOLICIT,
|
||||
SOUND_PED_149,
|
||||
SOUND_PED_JEER,
|
||||
SOUND_PED_150,
|
||||
SOUND_PED_EXTINGUISHING_FIRE,
|
||||
SOUND_PED_WAIT_DOUBLEBACK,
|
||||
SOUND_153,
|
||||
SOUND_PED_CHAT_SEXY,
|
||||
SOUND_PED_CHAT_SEXY_FEMALE,
|
||||
SOUND_PED_CHAT_SEXY_MALE,
|
||||
SOUND_PED_CHAT_EVENT,
|
||||
SOUND_PED_PED_COLLISION,
|
||||
SOUND_PED_CHAT,
|
||||
@@ -171,22 +171,22 @@ enum eSound
|
||||
SOUND_CAR_PED_COLLISION,
|
||||
SOUND_CLOCK_TICK,
|
||||
SOUND_PART_MISSION_COMPLETE,
|
||||
SOUND_FRONTEND_MENU_STARTING, // same with SOUND_HUD_SOUND
|
||||
SOUND_FRONTEND_MENU_STARTING, // same sound as SOUND_HUD
|
||||
|
||||
// TODO(Miami): What are 170-175??
|
||||
|
||||
SOUND_FRONTEND_NO_RADIO = 176, // those 3 are all same sound
|
||||
SOUND_FRONTEND_RADIO_CHANGE,
|
||||
SOUND_FRONTEND_RADIO_CHANGE_2,
|
||||
SOUND_HUD_SOUND,
|
||||
SOUND_FRONTEND_RADIO_TURN_OFF = 176, // those 2 are same sound
|
||||
SOUND_FRONTEND_RADIO_TURN_ON,
|
||||
SOUND_FRONTEND_HURRICANE, // yes, frontend
|
||||
SOUND_HUD,
|
||||
SOUND_180,
|
||||
SOUND_181,
|
||||
SOUND_182,
|
||||
SOUND_LIGHTNING,
|
||||
SOUND_BULLETTRACE_1,
|
||||
SOUND_BULLETTRACE_2,
|
||||
SOUND_186, // makes same sound with 40
|
||||
SOUND_187, // makes same sound with 46
|
||||
SOUND_186, // makes same sound as 40
|
||||
SOUND_187, // makes same sound as 46
|
||||
SOUND_MELEE_ATTACK_START,
|
||||
SOUND_SKATING,
|
||||
SOUND_WEAPON_MINIGUN_ATTACK,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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();
|
||||
|
||||
bool GetIsATreadable(void) { return true; }
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ CColModel::~CColModel(void)
|
||||
|
||||
//--LCS: no pool used, but maybe we better keep it?
|
||||
void*
|
||||
CColModel::operator new(size_t)
|
||||
CColModel::operator new(size_t) throw()
|
||||
{
|
||||
CColModel* node = CPools::GetColModelPool()->New();
|
||||
assert(node);
|
||||
@@ -44,7 +44,7 @@ CColModel::operator new(size_t)
|
||||
}
|
||||
|
||||
void
|
||||
CColModel::operator delete(void *p, size_t)
|
||||
CColModel::operator delete(void *p, size_t) throw()
|
||||
{
|
||||
CPools::GetColModelPool()->Delete((CColModel*)p);
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ struct CColModel
|
||||
void SetLinkPtr(CLink<CColModel*>*);
|
||||
void GetTrianglePoint(CVector &v, int i) const;
|
||||
|
||||
void *operator new(size_t);
|
||||
void operator delete(void *p, size_t);
|
||||
void *operator new(size_t) throw();
|
||||
void operator delete(void *p, size_t) throw();
|
||||
CColModel& operator=(const CColModel& other);
|
||||
|
||||
bool Write(base::cRelocatableChunkWriter &writer, bool allocSpace);
|
||||
|
||||
@@ -148,11 +148,10 @@ CCollision::SortOutCollisionAfterLoad(void)
|
||||
void
|
||||
CCollision::LoadCollisionScreen(eLevelName level)
|
||||
{
|
||||
static Const char *levelNames[4] = {
|
||||
static Const char *levelNames[] = {
|
||||
"",
|
||||
"IND_ZON",
|
||||
"COM_ZON",
|
||||
"SUB_ZON"
|
||||
};
|
||||
|
||||
// Why twice?
|
||||
@@ -311,8 +310,16 @@ CCollision::TestLineTriangle(const CColLine &line, const CompressedVector *verts
|
||||
if(plane.CalcPoint(line.p0) * plane.CalcPoint(line.p1) > 0.0f)
|
||||
return false;
|
||||
|
||||
float p0dist = DotProduct(line.p1 - line.p0, normal);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
// line lines in the plane, assume no collision
|
||||
if (p0dist == 0.0f)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// intersection parameter on line
|
||||
t = -plane.CalcPoint(line.p0) / DotProduct(line.p1 - line.p0, normal);
|
||||
t = -plane.CalcPoint(line.p0) / p0dist;
|
||||
// find point of intersection
|
||||
CVector p = line.p0 + (line.p1-line.p0)*t;
|
||||
|
||||
@@ -1131,8 +1138,17 @@ CCollision::ProcessLineTriangle(const CColLine &line,
|
||||
if(plane.CalcPoint(line.p0) * plane.CalcPoint(line.p1) > 0.0f)
|
||||
return false;
|
||||
|
||||
float p0dist = DotProduct(line.p1 - line.p0, normal);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
// line lines in the plane, assume no collision
|
||||
if (p0dist == 0.0f)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
// intersection parameter on line
|
||||
t = -plane.CalcPoint(line.p0) / DotProduct(line.p1 - line.p0, normal);
|
||||
t = -plane.CalcPoint(line.p0) / p0dist;
|
||||
|
||||
// early out if we're beyond the mindist
|
||||
if(t >= mindist)
|
||||
return false;
|
||||
|
||||
@@ -1603,8 +1603,8 @@ void CCarCtrl::WeaveForOtherCar(CEntity* pOtherEntity, CVehicle* pVehicle, float
|
||||
forward.Normalise();
|
||||
float forwardAngle = 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);
|
||||
@@ -2790,7 +2790,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane)
|
||||
up.Normalise();
|
||||
CVector forward(Cos(pPlane->m_fOrientation), Sin(pPlane->m_fOrientation), fForwardZ);
|
||||
forward.Normalise();
|
||||
CVector right = CrossProduct(forward, up);
|
||||
CVector right = CrossProduct(up, forward);
|
||||
right.z -= 5.0f * pPlane->m_fPlaneSteer;
|
||||
right.Normalise();
|
||||
up = CrossProduct(forward, right);
|
||||
@@ -3273,7 +3273,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);
|
||||
|
||||
@@ -163,7 +163,7 @@ void CGarages::Init(void)
|
||||
}
|
||||
hGarages = DMAudio.CreateEntity(AUDIOTYPE_GARAGE, (void*)1);
|
||||
if (hGarages >= 0)
|
||||
DMAudio.SetEntityStatus(hGarages, true);
|
||||
DMAudio.SetEntityStatus(hGarages, TRUE);
|
||||
}
|
||||
|
||||
void CGarages::Shutdown(void)
|
||||
@@ -2357,7 +2357,11 @@ float CGarages::FindDoorHeightForMI(int32 mi)
|
||||
void CGarage::TidyUpGarage()
|
||||
{
|
||||
uint32 i = CPools::GetVehiclePool()->GetSize();
|
||||
#ifdef FIX_BUGS
|
||||
while (i--) {
|
||||
#else
|
||||
while (--i) {
|
||||
#endif
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||
if (pVehicle && (pVehicle->IsCar() || pVehicle->IsBike())) {
|
||||
if (IsPointInsideGarage(pVehicle->GetPosition())) {
|
||||
@@ -2373,7 +2377,11 @@ void CGarage::TidyUpGarage()
|
||||
void CGarage::TidyUpGarageClose()
|
||||
{
|
||||
uint32 i = CPools::GetVehiclePool()->GetSize();
|
||||
#ifdef FIX_BUGS
|
||||
while (i--) {
|
||||
#else
|
||||
while (--i) {
|
||||
#endif
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||
if (!pVehicle)
|
||||
continue;
|
||||
|
||||
@@ -200,8 +200,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);
|
||||
@@ -215,8 +215,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;
|
||||
}
|
||||
@@ -859,7 +859,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor
|
||||
mag = Sqrt(dx*dx + dy*dy);
|
||||
dx /= mag;
|
||||
dy /= mag;
|
||||
int width = Max(m_pathNodes[i].width, m_pathNodes[j].width);
|
||||
uint8 width = Max(m_pathNodes[i].width, m_pathNodes[j].width);
|
||||
if(i < j){
|
||||
dx = -dx;
|
||||
dy = -dy;
|
||||
|
||||
@@ -120,7 +120,7 @@ struct CCarPathLink
|
||||
uint8 trafficLightDirection : 1;
|
||||
uint8 trafficLightType : 2;
|
||||
uint8 bBridgeLights : 1; // at least in LCS...
|
||||
int8 width;
|
||||
uint8 width;
|
||||
|
||||
CVector2D GetPosition(void) { return CVector2D(x/8.0f, y/8.0f); }
|
||||
CVector2D GetDirection(void) { return CVector2D(dirX/100.0f, dirY/100.0f); }
|
||||
@@ -151,7 +151,7 @@ struct CPathInfoForObject
|
||||
int8 numLeftLanes;
|
||||
int8 numRightLanes;
|
||||
int8 speedLimit;
|
||||
int8 width;
|
||||
uint8 width;
|
||||
|
||||
uint8 crossing : 1;
|
||||
uint8 onlySmallBoats : 1;
|
||||
@@ -177,7 +177,7 @@ struct CTempNode
|
||||
int16 link2;
|
||||
int8 numLeftLanes;
|
||||
int8 numRightLanes;
|
||||
int8 width;
|
||||
uint8 width;
|
||||
bool isCross;
|
||||
int8 linkState;
|
||||
};
|
||||
@@ -188,7 +188,7 @@ struct CTempNodeExternal // made up name
|
||||
int16 next;
|
||||
int8 numLeftLanes;
|
||||
int8 numRightLanes;
|
||||
int8 width;
|
||||
uint8 width;
|
||||
bool isCross;
|
||||
};
|
||||
|
||||
|
||||
@@ -48,9 +48,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 {
|
||||
@@ -107,7 +107,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;
|
||||
@@ -363,10 +363,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;
|
||||
}
|
||||
|
||||
+19
-6
@@ -274,10 +274,11 @@ CPickup::CanBePickedUp(CPlayerPed *player, int playerId)
|
||||
{
|
||||
assert(m_pObject != nil);
|
||||
bool cannotBePickedUp =
|
||||
(m_pObject->GetModelIndex() == MI_PICKUP_BODYARMOUR && player->m_fArmour > CWorld::Players[playerId].m_nMaxArmour - 0.5f)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_HEALTH && player->m_fHealth > CWorld::Players[playerId].m_nMaxHealth - 0.5f)
|
||||
(m_pObject->GetModelIndex() == MI_PICKUP_BODYARMOUR && player->m_fArmour > CWorld::Players[playerId].m_nMaxArmour - 0.2f)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_HEALTH && player->m_fHealth > CWorld::Players[playerId].m_nMaxHealth - 0.2f)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_BRIBE && player->m_pWanted->GetWantedLevel() == 0)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_KILLFRENZY && (CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame));
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_KILLFRENZY && (CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame))
|
||||
|| (m_eType == PICKUP_ASSET_REVENUE && m_fRevenue < 10.0f);
|
||||
return !cannotBePickedUp;
|
||||
}
|
||||
|
||||
@@ -1007,8 +1008,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);
|
||||
|
||||
#ifdef FIX_BUGS
|
||||
int16 colorId = 0;
|
||||
@@ -1148,7 +1148,20 @@ CPickups::DoPickUpEffects(CEntity *entity)
|
||||
if (model == MI_MINIGUN || model == MI_MINIGUN2)
|
||||
scale = 1.2f;
|
||||
|
||||
entity->GetMatrix().SetRotateZOnlyScaled((float)(CTimer::GetTimeInMilliseconds() & 0x7FF) * DEGTORAD(360.0f / 0x800), scale);
|
||||
float angle = (float)(CTimer::GetTimeInMilliseconds() & 0x7FF) * DEGTORAD(360.0f / 0x800);
|
||||
float c = Cos(angle) * scale;
|
||||
float s = Sin(angle) * scale;
|
||||
|
||||
// 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 = scale;
|
||||
|
||||
if (entity->GetModelIndex() == MI_MINIGUN2) {
|
||||
CMatrix matrix1;
|
||||
|
||||
+12
-12
@@ -521,7 +521,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
|
||||
state->aFunctionCallbackID[i] = 0;
|
||||
}
|
||||
}else{
|
||||
state->aAnimId[i] = NUM_STD_ANIMS;
|
||||
state->aAnimId[i] = ANIM_STD_NUM;
|
||||
state->aCurTime[i] = 0;
|
||||
state->aSpeed[i] = 85;
|
||||
state->aFunctionCallbackID[i] = 0;
|
||||
@@ -548,7 +548,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState
|
||||
}
|
||||
}
|
||||
else {
|
||||
state->aAnimId2[i] = NUM_STD_ANIMS;
|
||||
state->aAnimId2[i] = ANIM_STD_NUM;
|
||||
state->aCurTime2[i] = 0;
|
||||
state->aSpeed2[i] = 85;
|
||||
state->aFunctionCallbackID2[i] = 0;
|
||||
@@ -611,13 +611,13 @@ bool HasAnimGroupLoaded(uint8 group)
|
||||
void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state)
|
||||
{
|
||||
CAnimBlendAssociation* anim1;
|
||||
if (state->animId <= 3)
|
||||
if (state->animId <= ANIM_STD_IDLE)
|
||||
anim1 = CAnimManager::BlendAnimation(
|
||||
(RpClump*)ped->m_rwObject, ped->m_animGroup, (AnimationId)state->animId, 100.0f);
|
||||
else if (HasAnimGroupLoaded(state->groupId))
|
||||
anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, (AssocGroupId)state->groupId, (AnimationId)state->animId, 100.0f);
|
||||
else
|
||||
anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, ASSOCGRP_STD, ANIM_WALK, 100.0f);
|
||||
anim1 = CAnimManager::BlendAnimation((RpClump*)ped->m_rwObject, ASSOCGRP_STD, ANIM_STD_WALK, 100.0f);
|
||||
|
||||
anim1->SetCurrentTime(state->time * 4.0f / 255.0f);
|
||||
anim1->speed = state->speed * 3.0f / 255.0f;
|
||||
@@ -629,7 +629,7 @@ void CReplay::RetrievePedAnimation(CPed *ped, CStoredAnimationState *state)
|
||||
float blend = state->blendAmount * 2.0f / 255.0f;
|
||||
CAnimBlendAssociation* anim2 = CAnimManager::BlendAnimation(
|
||||
(RpClump*)ped->m_rwObject,
|
||||
(state->secAnimId > 3) ? (AssocGroupId)state->secGroupId : ped->m_animGroup,
|
||||
(state->secAnimId > ANIM_STD_IDLE) ? (AssocGroupId)state->secGroupId : ped->m_animGroup,
|
||||
(AnimationId)state->secAnimId, 100.0f);
|
||||
anim2->SetCurrentTime(time);
|
||||
anim2->speed = speed;
|
||||
@@ -641,7 +641,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 && HasAnimGroupLoaded(state->partGroupId)){
|
||||
if (blend > 0.0f && state->partAnimId != ANIM_STD_IDLE && HasAnimGroupLoaded(state->partGroupId)){
|
||||
CAnimBlendAssociation* anim3 = CAnimManager::BlendAnimation(
|
||||
(RpClump*)ped->m_rwObject, (AssocGroupId)state->partGroupId, (AnimationId)state->partAnimId, 1000.0f);
|
||||
anim3->SetCurrentTime(time);
|
||||
@@ -659,10 +659,10 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt
|
||||
for (int i = 0; ((assoc = RpAnimBlendClumpGetMainPartialAssociation_N(ped->GetClump(), i))); i++)
|
||||
assoc->SetBlend(0.0f, -1.0f);
|
||||
for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++) {
|
||||
if (state->aAnimId[i] == NUM_STD_ANIMS)
|
||||
if (state->aAnimId[i] == ANIM_STD_NUM)
|
||||
continue;
|
||||
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
|
||||
state->aAnimId[i] > 3 ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup,
|
||||
state->aAnimId[i] > ANIM_STD_IDLE ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup,
|
||||
(AnimationId)state->aAnimId[i]);
|
||||
anim->SetCurrentTime(state->aCurTime[i] * 4.0f / 255.0f);
|
||||
anim->speed = state->aSpeed[i] * 3.0f / 255.0f;
|
||||
@@ -677,10 +677,10 @@ 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_STD_ANIMS)
|
||||
if (state->aAnimId2[i] == ANIM_STD_NUM)
|
||||
continue;
|
||||
CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(),
|
||||
state->aAnimId2[i] > 3 ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup,
|
||||
state->aAnimId2[i] > ANIM_STD_IDLE ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup,
|
||||
(AnimationId)state->aAnimId2[i]);
|
||||
anim->SetCurrentTime(state->aCurTime2[i] * 4.0f / 255.0f);
|
||||
anim->speed = state->aSpeed2[i] * 3.0f / 255.0f;
|
||||
@@ -1463,7 +1463,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);
|
||||
for (int j = 0; j < TOTAL_WEAPON_SLOTS; j++) {
|
||||
int mi1 = CWeaponInfo::GetWeaponInfo(ped->m_weapons[j].m_eWeaponType)->m_nModelId;
|
||||
@@ -1529,7 +1529,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);
|
||||
|
||||
@@ -64,7 +64,7 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
|
||||
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())
|
||||
@@ -239,10 +239,10 @@ CRoadBlocks::CreateRoadBlockBetween2Points(CVector point1, CVector point2)
|
||||
pVehicle->SetStatus(STATUS_ABANDONED);
|
||||
// pVehicle->GetHeightAboveRoad(); // called but return value is ignored?
|
||||
tmp.GetPosition().z += fModelRadius - 0.6f;
|
||||
pVehicle->m_matrix = tmp;
|
||||
pVehicle->SetMatrix(tmp);
|
||||
pVehicle->PlaceOnRoadProperly();
|
||||
pVehicle->SetIsStatic(false);
|
||||
pVehicle->m_matrix.UpdateRW();
|
||||
pVehicle->GetMatrix().UpdateRW();
|
||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
pVehicle->bIsLocked = false;
|
||||
|
||||
@@ -2104,7 +2104,7 @@ void CMissionCleanup::Process()
|
||||
CWorld::Players[0].m_bDriveByAllowed = true;
|
||||
CPad::GetPad(0)->unk_B4 = 1.0f;
|
||||
CPad::GetPad(0)->unk_B8 = 0.5f;
|
||||
DMAudio.ShutUpPlayerTalking(0);
|
||||
DMAudio.ShutUpPlayerTalking(FALSE);
|
||||
CVehicle::bDisableRemoteDetonation = false;
|
||||
CVehicle::bDisableRemoteDetonationOnContact = false;
|
||||
CTheScripts::RiotIntensity = 0;
|
||||
@@ -5165,7 +5165,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, 1000.0f);
|
||||
CAnimManager::BlendAnimation(pPlayer->m_pPed->GetClump(), pPlayer->m_pPed->m_animGroup, ANIM_STD_IDLE, 1000.0f);
|
||||
pPlayer->m_pPed->RestartNonPartialAnims();
|
||||
AudioManager.PlayerJustLeftCar();
|
||||
pos.z += pPlayer->m_pPed->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
|
||||
@@ -278,7 +278,7 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command)
|
||||
CollectParameters(&m_nIp, 3);
|
||||
CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0));
|
||||
if (pPed)
|
||||
pPed->SetWaitState((eWaitState)GET_INTEGER_PARAM(0), GET_INTEGER_PARAM(1) >= 0 ? (void*)GET_INTEGER_PARAM(0) : nil); // + true
|
||||
pPed->SetWaitState((eWaitState)GET_INTEGER_PARAM(1), GET_INTEGER_PARAM(2) >= 0 ? (void*)GET_INTEGER_PARAM(2) : nil, true);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_REGISTER_BEST_TIME_GOGO_FAGGIO:
|
||||
|
||||
@@ -467,8 +467,8 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
|
||||
float length = GET_FLOAT_PARAM(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;
|
||||
|
||||
@@ -817,7 +817,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
|
||||
}
|
||||
}
|
||||
pPed->m_pMyVehicle->m_nGettingOutFlags &= ~flags;
|
||||
pPed->m_pMyVehicle->ProcessOpenDoor(pPed->m_vehDoor, NUM_STD_ANIMS, 0.0f);
|
||||
pPed->m_pMyVehicle->ProcessOpenDoor(pPed->m_vehDoor, ANIM_STD_NUM, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -834,7 +834,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, 1000.0f);
|
||||
CAnimManager::BlendAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_STD_IDLE, 1000.0f);
|
||||
pos.z += pPed->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
pPed->Teleport(pos);
|
||||
CTheScripts::ClearSpaceForMissionEntity(pos, pPed);
|
||||
@@ -1396,7 +1396,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
DMAudio.ChangeMusicMode(MUSICMODE_FRONTEND);
|
||||
DMAudio.PlayFrontEndTrack(GET_INTEGER_PARAM(0) + STREAMED_SOUND_MISSION_COMPLETED - 1, 0);
|
||||
DMAudio.PlayFrontEndTrack(GET_INTEGER_PARAM(0) + STREAMED_SOUND_MISSION_COMPLETED - 1, FALSE);
|
||||
//DMAudio.SaveAnnouncementsWhenMissionPassedPlayed(); // TODO!
|
||||
return 0;
|
||||
}
|
||||
@@ -2012,8 +2012,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
||||
case COMMAND_HAS_MISSION_AUDIO_LOADED:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
//UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus(GET_INTEGER_PARAM(0) - 1) == 1);
|
||||
UpdateCompareFlag(true); // TODO
|
||||
UpdateCompareFlag(DMAudio.GetMissionAudioLoadingStatus(GET_INTEGER_PARAM(0) - 1) == 1);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_PLAY_MISSION_AUDIO:
|
||||
@@ -2023,8 +2022,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
||||
case COMMAND_HAS_MISSION_AUDIO_FINISHED:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
//UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished(GET_INTEGER_PARAM(0) - 1)); // TODO
|
||||
UpdateCompareFlag(true);
|
||||
UpdateCompareFlag(DMAudio.IsMissionAudioSampleFinished(GET_INTEGER_PARAM(0) - 1));
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_GET_CLOSEST_CAR_NODE_WITH_HEADING:
|
||||
|
||||
@@ -1002,10 +1002,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();
|
||||
@@ -2674,10 +2674,10 @@ bool CTheScripts::IsPlayerStopped(CPlayerInfo* pPlayer)
|
||||
CPed* pPed = pPlayer->m_pPed;
|
||||
if (pPed->InVehicle())
|
||||
return IsVehicleStopped(pPed->m_pMyVehicle);
|
||||
if (RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_RUN_STOP) ||
|
||||
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_RUN_STOP_R) ||
|
||||
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_LAUNCH) ||
|
||||
RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_JUMP_GLIDE))
|
||||
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) &&
|
||||
!pPed->bIsInTheAir && !pPed->bIsLanding && pPed->bIsStanding && pPed->m_vecAnimMoveDelta.x == 0.0f && pPed->m_vecAnimMoveDelta.y == 0.0f;
|
||||
|
||||
@@ -452,12 +452,12 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
||||
CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0));
|
||||
script_assert(pPed);
|
||||
if (GET_INTEGER_PARAM(1)) {
|
||||
pPed->bIsDucking = true;
|
||||
pPed->bCrouchWhenShooting = true;
|
||||
pPed->SetDuck(GET_INTEGER_PARAM(2), true);
|
||||
}
|
||||
else {
|
||||
pPed->ClearDuck(true);
|
||||
pPed->bIsDucking = false;
|
||||
pPed->bCrouchWhenShooting = false;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -771,7 +771,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
||||
CHud::SetHelpMessage(text, false, true); // + true
|
||||
if (text != CHud::gLastPrintForeverString) {
|
||||
CHud::gLastPrintForeverString = text;
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD_SOUND, 0);
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
||||
((CPlayerPed*)pPed)->m_fMoveSpeed = 0.0f;
|
||||
else
|
||||
pPed->m_nStoredMoveState = PEDMOVE_STILL;
|
||||
CAnimManager::AddAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_IDLE_STANCE);
|
||||
CAnimManager::AddAnimation(pPed->GetClump(), pPed->m_animGroup, ANIM_STD_IDLE);
|
||||
pPed->bIsPedDieAnimPlaying = false;
|
||||
}
|
||||
return 0;
|
||||
@@ -346,7 +346,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
||||
CollectParameters(&m_nIp, 1);
|
||||
CPed* pPed = CPools::GetPedPool()->GetAt(GET_INTEGER_PARAM(0));
|
||||
script_assert(pPed);
|
||||
UpdateCompareFlag(RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_DUCK_DOWN) != nil);
|
||||
UpdateCompareFlag(RpAnimBlendClumpGetAssociation(pPed->GetClump(), ANIM_STD_DUCK_DOWN) != nil);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_CREATE_DUST_EFFECT_FOR_CUTSCENE_HELI:
|
||||
@@ -386,7 +386,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
||||
}
|
||||
case COMMAND_IS_JAPANESE_GAME:
|
||||
#ifdef MORE_LANGUAGES
|
||||
UpdateCompareFlag(FrontEndMenuManager.m_PrefsLanguage == LANGUAGE_JAPANESE);
|
||||
UpdateCompareFlag(FrontEndMenuManager.m_PrefsLanguage == CMenuManager::LANGUAGE_JAPANESE);
|
||||
#elif (defined GTAVC_JP_PATCH)
|
||||
UpdateCompareFlag(true);
|
||||
#else
|
||||
|
||||
@@ -453,8 +453,8 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
|
||||
CollectParameters(&m_nIp, 1);
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0));
|
||||
assert(pVehicle);
|
||||
pVehicle->ProcessOpenDoor(CAR_DOOR_RR, ANIM_VAN_OPEN, 1.0f);
|
||||
pVehicle->ProcessOpenDoor(CAR_DOOR_LR, ANIM_VAN_OPEN_L, 1.0f);
|
||||
pVehicle->ProcessOpenDoor(CAR_DOOR_RR, ANIM_STD_VAN_OPEN_DOOR_REAR_RHS, 1.0f);
|
||||
pVehicle->ProcessOpenDoor(CAR_DOOR_LR, ANIM_STD_VAN_OPEN_DOOR_REAR_LHS, 1.0f);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_GET_CHAR_THREAT_CHAR:
|
||||
@@ -568,11 +568,11 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command)
|
||||
}
|
||||
case COMMAND_LOAD_NON_STANDARD_PED_ANIM:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
// CPed::LoadNonStandardPedAnim(GET_INTEGER_PARAM(0));
|
||||
CPed::LoadNonStandardPedAnim((eWaitState)GET_INTEGER_PARAM(0));
|
||||
return 0;
|
||||
case COMMAND_UNLOAD_NON_STANDARD_PED_ANIM:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
// CPed::UnloadNonStandardPedAnim(SET_INTEGER_PARAM(0));
|
||||
CPed::UnloadNonStandardPedAnim((eWaitState)GET_INTEGER_PARAM(0));
|
||||
return 0;
|
||||
case COMMAND_1566:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
||||
@@ -260,8 +260,8 @@ void CSetPiece::Update(void)
|
||||
CCarAI::AddPoliceCarOccupants(pVehicle1);
|
||||
CVehicle* pVehicle2 = TryToGenerateCopCar(m_vSpawn2, m_vTarget2);
|
||||
if (!pVehicle2) {
|
||||
CWorld::Remove(pVehicle2);
|
||||
delete pVehicle2;
|
||||
CWorld::Remove(pVehicle1);
|
||||
delete pVehicle1;
|
||||
return;
|
||||
}
|
||||
pVehicle2->SetStatus(STATUS_PHYSICS);
|
||||
|
||||
@@ -245,7 +245,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) {
|
||||
@@ -334,14 +334,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_STD_ANIMS - 1;
|
||||
animId = ANIM_STD_NUM - 1;
|
||||
}
|
||||
PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId);
|
||||
|
||||
@@ -350,7 +350,7 @@ CAnimViewer::Update(void)
|
||||
CMessages::AddMessage(gUString, 1000, 0);
|
||||
|
||||
} else if (pad->GetDPadDownJustDown()) {
|
||||
animId = (animId == (NUM_STD_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);
|
||||
|
||||
+10
-10
@@ -4956,9 +4956,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;
|
||||
|
||||
@@ -5232,9 +5232,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;
|
||||
@@ -5244,9 +5244,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;
|
||||
@@ -5399,7 +5399,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
|
||||
|
||||
float alphaToFace = Atan2(hi.z, hi.Magnitude2D()) + DEGTORAD(15.0f);
|
||||
float neededAlphaTurn = alphaToFace - carGunUD;
|
||||
float alphaTurnPerFrame = CTimer::GetTimeStep() * 0.02f;
|
||||
float alphaTurnPerFrame = CTimer::GetTimeStepInSeconds();
|
||||
|
||||
if (neededAlphaTurn > alphaTurnPerFrame) {
|
||||
neededTurn = alphaTurnPerFrame;
|
||||
|
||||
+5
-10
@@ -214,7 +214,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;
|
||||
@@ -1769,7 +1769,7 @@ CCamera::CamControl(void)
|
||||
(m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) &&
|
||||
!m_WideScreenOn &&
|
||||
(WhoIsInControlOfTheCamera != CAMCONTROL_OBBE || bSwitchedToObbeCam))
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD_SOUND, 0);
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD, 0);
|
||||
}
|
||||
|
||||
// What a mess!
|
||||
@@ -4019,7 +4019,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);
|
||||
@@ -4103,16 +4103,11 @@ CCamera::IsSphereVisible(const CVector ¢er, float radius, const CMatrix *mat
|
||||
bool
|
||||
CCamera::IsSphereVisible(const CVector ¢er, float radius)
|
||||
{
|
||||
CMatrix mat = m_cameraMatrix;
|
||||
return IsSphereVisible(center, radius, &mat);
|
||||
return IsSphereVisible(center, radius, &GetCameraMatrix());
|
||||
}
|
||||
|
||||
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 };
|
||||
|
||||
+1
-5
@@ -634,11 +634,7 @@ public:
|
||||
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);
|
||||
#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);
|
||||
|
||||
+27
-14
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -43,6 +43,6 @@ char *CdStreamGetImageName(int32 cd);
|
||||
void CdStreamRemoveImages(void);
|
||||
int32 CdStreamGetNumImages(void);
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
extern bool flushStream[MAX_CDCHANNELS];
|
||||
#endif
|
||||
|
||||
+87
-30
@@ -1,8 +1,8 @@
|
||||
#ifndef _WIN32
|
||||
#include "common.h"
|
||||
#include "crossplatform.h"
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
@@ -12,7 +12,11 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/resource.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
#include "CdStream.h"
|
||||
#include "rwcore.h"
|
||||
@@ -21,9 +25,61 @@
|
||||
#define CDDEBUG(f, ...) debug ("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__)
|
||||
#define CDTRACE(f, ...) printf("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__)
|
||||
|
||||
// #define ONE_THREAD_PER_CHANNEL // Don't use if you're not on SSD/Flash. (Also you may want to benefit from this via using all channels in Streaming.cpp)
|
||||
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
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
|
||||
{
|
||||
@@ -69,14 +125,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, 1);
|
||||
gCdStreamSema = RE3_SEM_OPEN("/semaphore_cd_stream");
|
||||
|
||||
|
||||
if (gCdStreamSema == SEM_FAILED) {
|
||||
@@ -90,8 +145,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, 1);
|
||||
gpReadInfo[i].pDoneSemaphore = RE3_SEM_OPEN("/semaphore_done%d", i);
|
||||
|
||||
if (gpReadInfo[i].pDoneSemaphore == SEM_FAILED)
|
||||
{
|
||||
@@ -99,9 +153,9 @@ CdStreamInitThread(void)
|
||||
ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
sprintf(semName,"/semaphore_start%d",i);
|
||||
gpReadInfo[i].pStartSemaphore = sem_open(semName, O_CREAT, 0644, 1);
|
||||
gpReadInfo[i].pStartSemaphore = RE3_SEM_OPEN("/semaphore_start%d", i);
|
||||
|
||||
if (gpReadInfo[i].pStartSemaphore == SEM_FAILED)
|
||||
{
|
||||
@@ -170,6 +224,7 @@ CdStreamInit(int32 numChannels)
|
||||
gNumImages = 0;
|
||||
|
||||
gNumChannels = numChannels;
|
||||
ASSERT( gNumChannels != 0 );
|
||||
|
||||
gpReadInfo = (CdReadInfo *)calloc(numChannels, sizeof(CdReadInfo));
|
||||
ASSERT( gpReadInfo != nil );
|
||||
@@ -245,10 +300,12 @@ CdStreamRead(int32 channel, void *buffer, uint32 offset, uint32 size)
|
||||
if ( pChannel->nSectorsToRead != 0 || pChannel->bReading ) {
|
||||
if (pChannel->hFile == hImage - 1 && pChannel->nSectorOffset == _GET_OFFSET(offset) && pChannel->nSectorsToRead >= size)
|
||||
return STREAM_SUCCESS;
|
||||
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
flushStream[channel] = 1;
|
||||
CdStreamSync(channel);
|
||||
//return STREAM_NONE;
|
||||
#else
|
||||
return STREAM_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
pChannel->hFile = hImage - 1;
|
||||
@@ -316,34 +373,34 @@ CdStreamSync(int32 channel)
|
||||
CdReadInfo *pChannel = &gpReadInfo[channel];
|
||||
ASSERT( pChannel != nil );
|
||||
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
if (flushStream[channel]) {
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
pChannel->nSectorsToRead = 0;
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
pthread_kill(pChannel->pChannelThread, SIGUSR1);
|
||||
if (pChannel->bReading) {
|
||||
pChannel->bLocked = true;
|
||||
while (pChannel->bLocked)
|
||||
sem_wait(pChannel->pDoneSemaphore);
|
||||
}
|
||||
#else
|
||||
pChannel->nSectorsToRead = 0;
|
||||
if (pChannel->bReading) {
|
||||
pChannel->bLocked = true;
|
||||
pthread_kill(_gCdStreamThread, SIGUSR1);
|
||||
#endif
|
||||
while (pChannel->bLocked)
|
||||
sem_wait(pChannel->pDoneSemaphore);
|
||||
}
|
||||
#endif
|
||||
pChannel->bReading = false;
|
||||
flushStream[channel] = false;
|
||||
return STREAM_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( pChannel->nSectorsToRead != 0 )
|
||||
{
|
||||
pChannel->bLocked = true;
|
||||
while (pChannel->bLocked)
|
||||
while (pChannel->bLocked && pChannel->nSectorsToRead != 0){
|
||||
sem_wait(pChannel->pDoneSemaphore);
|
||||
}
|
||||
pChannel->bLocked = false;
|
||||
}
|
||||
|
||||
pChannel->bReading = false;
|
||||
@@ -395,7 +452,12 @@ void *CdStreamThread(void *param)
|
||||
#ifndef ONE_THREAD_PER_CHANNEL
|
||||
while (gCdStreamThreadStatus != 2) {
|
||||
sem_wait(gCdStreamSema);
|
||||
|
||||
int32 channel = GetFirstInQueue(&gChannelRequestQ);
|
||||
|
||||
// spurious wakeup
|
||||
if (channel == -1)
|
||||
continue;
|
||||
#else
|
||||
int channel = *((int*)param);
|
||||
while (gpReadInfo[channel].nThreadStatus != 2){
|
||||
@@ -447,7 +509,7 @@ void *CdStreamThread(void *param)
|
||||
if ( pChannel->bLocked )
|
||||
{
|
||||
pChannel->bLocked = 0;
|
||||
sem_post(pChannel->pDoneSemaphore);
|
||||
sem_post(pChannel->pDoneSemaphore);
|
||||
}
|
||||
pChannel->bReading = false;
|
||||
}
|
||||
@@ -455,21 +517,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);
|
||||
@@ -524,7 +579,9 @@ void
|
||||
CdStreamRemoveImages(void)
|
||||
{
|
||||
for ( int32 i = 0; i < gNumChannels; i++ ) {
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
flushStream[i] = 1;
|
||||
#endif
|
||||
CdStreamSync(i);
|
||||
}
|
||||
|
||||
|
||||
+105
-17
@@ -131,6 +131,9 @@ void CControllerConfigManager::LoadSettings(int32 file)
|
||||
{
|
||||
bool bValid = true;
|
||||
int nVersion = 0;
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
bool skipVehicleFireWeapon = false;
|
||||
#endif
|
||||
|
||||
if (file)
|
||||
{
|
||||
@@ -148,11 +151,26 @@ void CControllerConfigManager::LoadSettings(int32 file)
|
||||
if (bValid && nVersion >= 3)
|
||||
{
|
||||
ControlsManager.MakeControllerActionsBlank();
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
skipVehicleFireWeapon = nVersion < 4;
|
||||
// Set the default settings of VEHICLE_FIREWEAPON
|
||||
if (skipVehicleFireWeapon) {
|
||||
SetControllerKeyAssociatedWithAction(VEHICLE_FIREWEAPON, rsPADINS, KEYBOARD);
|
||||
SetControllerKeyAssociatedWithAction(VEHICLE_FIREWEAPON, rsLCTRL, OPTIONAL_EXTRA);
|
||||
if (m_bMouseAssociated)
|
||||
SetMouseButtonAssociatedWithAction(VEHICLE_FIREWEAPON, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int32 i = 0; i < MAX_CONTROLLERTYPES; i++)
|
||||
{
|
||||
for (int32 j = 0; j < MAX_CONTROLLERACTIONS; j++)
|
||||
{
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
// Skip file read
|
||||
if (skipVehicleFireWeapon && j == VEHICLE_FIREWEAPON)
|
||||
continue;
|
||||
#endif
|
||||
CFileMgr::Read(file, (char *)&ControlsManager.m_aSettings[j][i], sizeof(tControllerConfigBind));
|
||||
}
|
||||
}
|
||||
@@ -326,6 +344,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;
|
||||
@@ -1765,6 +1788,51 @@ void CControllerConfigManager::DeleteMatching1rstPersonControls(e_ControllerActi
|
||||
|
||||
#undef CLEAR_ACTION_IF_NEEDED
|
||||
|
||||
#ifdef RADIO_SCROLL_TO_PREV_STATION
|
||||
#define CHECK_ACTION(action) \
|
||||
if (key == GetControllerKeyAssociatedWithAction(action, type))\
|
||||
return true;
|
||||
|
||||
bool CControllerConfigManager::IsAnyVehicleActionAssignedToMouseKey(int32 key)
|
||||
{
|
||||
const eControllerType type = MOUSE;
|
||||
if (!GetIsKeyBlank(key, type))
|
||||
{
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
CHECK_ACTION(VEHICLE_FIREWEAPON);
|
||||
#endif
|
||||
CHECK_ACTION(VEHICLE_LOOKBEHIND);
|
||||
CHECK_ACTION(VEHICLE_LOOKLEFT);
|
||||
CHECK_ACTION(VEHICLE_LOOKRIGHT);
|
||||
CHECK_ACTION(VEHICLE_HORN);
|
||||
CHECK_ACTION(VEHICLE_HANDBRAKE);
|
||||
CHECK_ACTION(VEHICLE_ACCELERATE);
|
||||
CHECK_ACTION(VEHICLE_BRAKE);
|
||||
CHECK_ACTION(VEHICLE_CHANGE_RADIO_STATION);
|
||||
CHECK_ACTION(TOGGLE_SUBMISSIONS);
|
||||
CHECK_ACTION(VEHICLE_TURRETLEFT);
|
||||
CHECK_ACTION(VEHICLE_TURRETRIGHT);
|
||||
CHECK_ACTION(VEHICLE_TURRETUP);
|
||||
CHECK_ACTION(VEHICLE_TURRETDOWN);
|
||||
CHECK_ACTION(VEHICLE_ENTER_EXIT);
|
||||
CHECK_ACTION(CAMERA_CHANGE_VIEW_ALL_SITUATIONS);
|
||||
#ifndef BIND_VEHICLE_FIREWEAPON
|
||||
CHECK_ACTION(PED_FIREWEAPON);
|
||||
#endif
|
||||
CHECK_ACTION(GO_LEFT);
|
||||
CHECK_ACTION(GO_RIGHT);
|
||||
CHECK_ACTION(NETWORK_TALK);
|
||||
CHECK_ACTION(SWITCH_DEBUG_CAM_ON);
|
||||
CHECK_ACTION(TOGGLE_DPAD);
|
||||
CHECK_ACTION(TAKE_SCREEN_SHOT);
|
||||
CHECK_ACTION(SHOW_MOUSE_POINTER_TOGGLE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#undef CHECK_ACTION
|
||||
#endif
|
||||
|
||||
void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction action, int32 key, eControllerType type)
|
||||
{
|
||||
if (!GetIsKeyBlank(key, type))
|
||||
@@ -2371,7 +2439,7 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
#define VFB(b)
|
||||
#endif
|
||||
|
||||
#define CONTROLLER_BUTTONS(T, O, X, Q, L1, L2, L3, R1, R2, R3, SELECT, RSL, RSR) \
|
||||
#define CONTROLLER_BUTTONS(T, O, X, Q, L1, L2, L3, R1, R2, R3, SELECT, RSU, RSD, RSL, RSR) \
|
||||
{{ \
|
||||
O, /* PED_FIREWEAPON */ \
|
||||
R2, /* PED_CYCLE_WEAPON_RIGHT */ \
|
||||
@@ -2482,7 +2550,7 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
O, /* PED_SPRINT */ \
|
||||
R3, /* PED_LOOKBEHIND */ \
|
||||
L3, /* PED_DUCK */ \
|
||||
L1, /* PED_ANSWER_PHONE */ \
|
||||
T, /* PED_ANSWER_PHONE */ \
|
||||
VFB(O) /* VEHICLE_FIREWEAPON */ \
|
||||
X, /* VEHICLE_ACCELERATE */ \
|
||||
Q, /* VEHICLE_BRAKE */ \
|
||||
@@ -2529,10 +2597,10 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
X, /* PED_SPRINT */ \
|
||||
R3, /* PED_LOOKBEHIND */ \
|
||||
L3, /* PED_DUCK */ \
|
||||
L1, /* PED_ANSWER_PHONE */ \
|
||||
O, /* PED_ANSWER_PHONE */ \
|
||||
VFB(R1) /* VEHICLE_FIREWEAPON */ \
|
||||
nil, /* VEHICLE_ACCELERATE */ \
|
||||
nil, /* VEHICLE_BRAKE */ \
|
||||
RSU, /* VEHICLE_ACCELERATE */ \
|
||||
RSD, /* VEHICLE_BRAKE */ \
|
||||
O, /* VEHICLE_CHANGE_RADIO_STATION */ \
|
||||
L3, /* VEHICLE_HORN */ \
|
||||
Q, /* TOGGLE_SUBMISSIONS */ \
|
||||
@@ -2573,10 +2641,10 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
#define RIGHT "RIGHT"
|
||||
#endif
|
||||
|
||||
const char *XboxButtons_noIcons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("Y", "B", "A", "X", "LB", "LT", "LS", "RB", "RT", "RS", "BACK", "right stick left", "right stick right");
|
||||
const char *XboxButtons_noIcons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("Y", "B", "A", "X", "LB", "LT", "LS", "RB", "RT", "RS", "BACK", "right stick up", "right stick down", "right stick left", "right stick right");
|
||||
|
||||
#ifdef BUTTON_ICONS
|
||||
const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK", "~(~", "~)~");
|
||||
const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK", "~H~", "~L~", "~(~", "~)~");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2585,11 +2653,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"
|
||||
@@ -2598,11 +2661,11 @@ const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O
|
||||
#endif
|
||||
|
||||
const char *PlayStationButtons_noIcons[][MAX_CONTROLLERACTIONS] =
|
||||
CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "L1", "L2", "L3", "R1", "R2", "R3", "SELECT", "right stick left", "right stick right");
|
||||
CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "L1", "L2", "L3", "R1", "R2", "R3", "SELECT", "right stick up", "right stick down", "right stick left", "right stick right");
|
||||
|
||||
#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", "~H~", "~L~", "~(~", "~)~");
|
||||
#endif
|
||||
|
||||
#undef PS2_TRIANGLE
|
||||
@@ -2624,11 +2687,36 @@ 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;
|
||||
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;
|
||||
default:
|
||||
Buttons = XboxButtons_noIcons;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
assert(Buttons[CPad::GetPad(0)->Mode][action] != nil); // we cannot use these
|
||||
|
||||
@@ -195,6 +195,10 @@ public:
|
||||
void DeleteMatching1rstPersonControls (e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatchingActionInitiators (e_ControllerAction action, int32 key, eControllerType type);
|
||||
|
||||
#ifdef RADIO_SCROLL_TO_PREV_STATION
|
||||
bool IsAnyVehicleActionAssignedToMouseKey(int32 key);
|
||||
#endif
|
||||
|
||||
bool GetIsKeyBlank(int32 key, eControllerType type);
|
||||
e_ControllerActionType GetActionType(e_ControllerAction action);
|
||||
|
||||
|
||||
@@ -1279,7 +1279,7 @@ CFileLoader::LoadObjectInstance(const char *line)
|
||||
if(!CStreaming::IsObjectInCdImage(id))
|
||||
debug("Not in cdimage %s\n", mi->GetModelName());
|
||||
|
||||
angle = -RADTODEG(2.0f * acosf(angle));
|
||||
angle = -RADTODEG(2.0f * Acos(angle));
|
||||
xform = RwMatrixCreate();
|
||||
RwMatrixRotate(xform, &axis, angle, rwCOMBINEREPLACE);
|
||||
RwMatrixTranslate(xform, &trans, rwCOMBINEPOSTCONCAT);
|
||||
|
||||
+891
-50
File diff suppressed because it is too large
Load Diff
+29
-4
@@ -137,6 +137,13 @@ enum eMenuSprites
|
||||
MENUSPRITE_DOWNON,
|
||||
MENUSPRITE_UPOFF,
|
||||
MENUSPRITE_UPON,
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUSPRITE_CONTROLLER,
|
||||
MENUSPRITE_ARROWS1,
|
||||
MENUSPRITE_ARROWS2,
|
||||
MENUSPRITE_ARROWS3,
|
||||
MENUSPRITE_ARROWS4,
|
||||
#endif
|
||||
NUM_MENU_SPRITES
|
||||
};
|
||||
|
||||
@@ -192,8 +199,10 @@ enum eMenuScreen
|
||||
MENUPAGE_MOUSE_CONTROLS = 31,
|
||||
MENUPAGE_PAUSE_MENU = 32,
|
||||
MENUPAGE_NONE = 33, // Then chooses main menu or pause menu
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUPAGE_CONTROLLER_SETTINGS,
|
||||
#endif
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
MENUPAGE_DEBUG_MENU,
|
||||
MENUPAGE_CONTROLLER_PC_OLD1,
|
||||
MENUPAGE_CONTROLLER_PC_OLD2,
|
||||
@@ -206,7 +215,7 @@ enum eMenuScreen
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
MENUPAGE_GRAPHICS_SETTINGS,
|
||||
#endif
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
MENUPAGE_DETECT_JOYSTICK,
|
||||
#endif
|
||||
|
||||
@@ -275,7 +284,7 @@ enum eMenuAction
|
||||
MENUACTION_DRAWDIST,
|
||||
MENUACTION_MOUSESENS,
|
||||
MENUACTION_MP3VOLUMEBOOST,
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUACTION_CTRLVIBRATION,
|
||||
MENUACTION_CTRLCONFIG,
|
||||
#endif
|
||||
@@ -668,6 +677,18 @@ public:
|
||||
int8 m_nDisplayMSAALevel;
|
||||
#endif
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
enum
|
||||
{
|
||||
CONTROLLER_DUALSHOCK2 = 0,
|
||||
CONTROLLER_DUALSHOCK3,
|
||||
CONTROLLER_DUALSHOCK4,
|
||||
CONTROLLER_XBOX360,
|
||||
CONTROLLER_XBOXONE,
|
||||
};
|
||||
|
||||
int8 m_PrefsControllerType;
|
||||
#endif
|
||||
enum LANGUAGE
|
||||
{
|
||||
LANGUAGE_AMERICAN,
|
||||
@@ -714,7 +735,7 @@ public:
|
||||
|
||||
#ifdef XBOX_MESSAGE_SCREEN
|
||||
static uint32 m_nDialogHideTimer;
|
||||
static PauseModeTime m_nDialogHideTimerPauseMode;
|
||||
static uint32 m_nDialogHideTimerPauseMode;
|
||||
static bool m_bDialogOpen;
|
||||
static wchar *m_pDialogText;
|
||||
static bool m_bSaveWasSuccessful;
|
||||
@@ -788,6 +809,10 @@ public:
|
||||
int8 GetPreviousPageOption();
|
||||
|
||||
// uint8 GetNumberOfMenuOptions();
|
||||
#ifdef GAMEPAD_MENU
|
||||
void LoadController(int8 type);
|
||||
void PrintController(void);
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef IMPROVED_VIDEOMODE
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2858,7 +2858,7 @@ CMenuManager::ProcessDPadCrossJustDown(void)
|
||||
{
|
||||
if ( !gMusicPlaying )
|
||||
{
|
||||
DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, 1);
|
||||
DMAudio.PlayFrontEndTrack(m_PrefsRadioStation, TRUE);
|
||||
gMusicPlaying = true;
|
||||
}
|
||||
}
|
||||
|
||||
+17
-9
@@ -246,10 +246,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 = { 64, 64, 64, 255 };
|
||||
rw::MatFX::envMapColor = envcol;
|
||||
#else
|
||||
#ifdef PS2_MATFX
|
||||
ReplaceMatFxCallback();
|
||||
@@ -385,6 +391,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");
|
||||
@@ -444,10 +455,7 @@ bool CGame::Initialise(const char* datFile)
|
||||
|
||||
// CFileLoader::LoadLevel("DATA\\DEFAULT.DAT");
|
||||
CFileLoader::LoadLevel(datFile);
|
||||
#ifdef EXTENDED_PIPELINES
|
||||
// for generic fallback
|
||||
CustomPipes::SetTxdFindCallback();
|
||||
#endif
|
||||
|
||||
LoadingScreen("Loading the Game", "Add Particles", nil);
|
||||
CWorld::AddParticles();
|
||||
CVehicleModelInfo::LoadVehicleColours();
|
||||
@@ -574,7 +582,7 @@ bool CGame::Initialise(const char* datFile)
|
||||
#endif
|
||||
|
||||
|
||||
DMAudio.SetStartingTrackPositions(true);
|
||||
DMAudio.SetStartingTrackPositions(TRUE);
|
||||
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
|
||||
return true;
|
||||
}
|
||||
@@ -596,7 +604,6 @@ bool CGame::ShutDown(void)
|
||||
gPhoneInfo.Shutdown();
|
||||
CWeapon::ShutdownWeapons();
|
||||
CPedType::Shutdown();
|
||||
CMBlur::MotionBlurClose();
|
||||
|
||||
for (int32 i = 0; i < NUMPLAYERS; i++)
|
||||
{
|
||||
@@ -622,7 +629,7 @@ bool CGame::ShutDown(void)
|
||||
CStreaming::Shutdown();
|
||||
CTxdStore::GameShutdown();
|
||||
CCollision::Shutdown();
|
||||
CWaterLevel::DestroyWavyAtomic();
|
||||
CWaterLevel::Shutdown();
|
||||
CRubbish::Shutdown();
|
||||
CClouds::Shutdown();
|
||||
CShadows::Shutdown();
|
||||
@@ -631,6 +638,7 @@ bool CGame::ShutDown(void)
|
||||
CWeaponEffects::Shutdown();
|
||||
CParticle::Shutdown();
|
||||
CPools::ShutDown();
|
||||
CHud::ReInitialise();
|
||||
CTxdStore::RemoveTxdSlot(gameTxdSlot);
|
||||
CMBlur::MotionBlurClose();
|
||||
CdStreamRemoveImages();
|
||||
|
||||
@@ -277,13 +277,6 @@ CMenuScreen aScreens[] = {
|
||||
{ "", 0, 0, },
|
||||
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
// MENUPAGE_CONTROLLER_SETTINGS
|
||||
{ "FET_CON", MENUPAGE_OPTIONS, 0,
|
||||
MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0,
|
||||
MENUACTION_CTRLVIBRATION, "FEC_VIB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0,
|
||||
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
},
|
||||
|
||||
// MENUPAGE_DEBUG_MENU
|
||||
{ "FED_DBG", MENUPAGE_NONE, 0,
|
||||
MENUACTION_RELOADIDE, "FED_RID", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#include "common.h"
|
||||
#if defined DETECT_JOYSTICK_MENU && defined XINPUT
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
#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"
|
||||
@@ -69,11 +78,17 @@
|
||||
#endif
|
||||
|
||||
#ifdef INVERT_LOOK_FOR_PAD
|
||||
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_ILU", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, "Controller", "InvertPad", off_on, 2, false) }, 150, 0, MENUALIGN_LEFT,
|
||||
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_ILU", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, "Controller", "InvertPad", off_on, 2, false) }, 0, 0, MENUALIGN_LEFT,
|
||||
#else
|
||||
#define INVERT_PAD_SELECTOR
|
||||
#endif
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
#define SELECT_CONTROLLER_TYPE MENUACTION_CFO_SELECT, "FEC_TYP", { new CCFOSelect((int8*)&FrontEndMenuManager.m_PrefsControllerType, "Controller", "Type", controllerTypes, ARRAY_SIZE(controllerTypes), false, ControllerTypeAfterChange) }, 0, 0, MENUALIGN_LEFT,
|
||||
#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" };
|
||||
|
||||
@@ -166,38 +181,6 @@ 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();
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
#ifndef MULTISAMPLING
|
||||
void GraphicsGoBack() {
|
||||
}
|
||||
@@ -277,11 +260,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;
|
||||
@@ -312,6 +297,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);
|
||||
@@ -332,6 +348,14 @@ void DetectJoystickGoBack() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
const char* controllerTypes[] = { "FEC_DS2", "FEC_DS3", "FEC_DS4", "FEC_360", "FEC_ONE" };
|
||||
void ControllerTypeAfterChange(int8 before, int8 after)
|
||||
{
|
||||
FrontEndMenuManager.LoadController(after);
|
||||
}
|
||||
#endif
|
||||
|
||||
CMenuScreenCustom aScreens[] = {
|
||||
// MENUPAGE_STATS = 0
|
||||
{ "FEH_STA", MENUPAGE_NONE, nil, nil,
|
||||
@@ -415,11 +439,6 @@ CMenuScreenCustom aScreens[] = {
|
||||
MENUACTION_LANG_GER, "FEL_GER", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_LANG_ITA, "FEL_ITA", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_LANG_SPA, "FEL_SPA", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#ifdef MORE_LANGUAGES
|
||||
MENUACTION_CFO_DYNAMIC, "FEL_POL", { new CCFODynamic(nil, nil, nil, nil, LangPolSelect) }, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_CFO_DYNAMIC, "FEL_RUS", { new CCFODynamic(nil, nil, nil, nil, LangRusSelect) }, 0, 0, MENUALIGN_CENTER
|
||||
MENUACTION_CFO_DYNAMIC, "FEL_JAP", { new CCFODynamic(nil, nil, nil, nil, LangJapSelect) }, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, MENUALIGN_CENTER,
|
||||
},
|
||||
|
||||
@@ -567,11 +586,13 @@ CMenuScreenCustom aScreens[] = {
|
||||
#else
|
||||
MENUACTION_KEYBOARDCTRLS,"FEC_RED", {nil, SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS}, 320, 150, MENUALIGN_CENTER,
|
||||
#endif
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUACTION_CHANGEMENU, "FET_AGS", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
MENUACTION_CHANGEMENU, "FEC_JOD", {nil, SAVESLOT_NONE, MENUPAGE_DETECT_JOYSTICK}, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
MENUACTION_CHANGEMENU, "FEC_MOU", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_CENTER,
|
||||
INVERT_PAD_SELECTOR
|
||||
MENUACTION_RESTOREDEF, "FET_DEF", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC}, 320, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 0, MENUALIGN_CENTER,
|
||||
},
|
||||
@@ -582,7 +603,7 @@ CMenuScreenCustom aScreens[] = {
|
||||
MENUACTION_LOADRADIO, "FEO_AUD", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_CHANGEMENU, "FEO_DIS", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
MENUACTION_CHANGEMENU, "FET_GRA", {nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_CHANGEMENU, "FET_GFX", {nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
MENUACTION_CHANGEMENU, "FEO_LAN", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_PLAYERSETUP, "FET_PS", {nil, SAVESLOT_NONE, MENUPAGE_SKIN_SELECT}, 0, 0, MENUALIGN_CENTER,
|
||||
@@ -611,8 +632,12 @@ CMenuScreenCustom aScreens[] = {
|
||||
{ "FEC_MOU", MENUPAGE_CONTROLLER_PC, nil, nil,
|
||||
MENUACTION_MOUSESENS, "FEC_MSH", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 40, 170, MENUALIGN_LEFT,
|
||||
MENUACTION_INVVERT, "FEC_IVV", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_LEFT,
|
||||
#ifndef GAMEPAD_MENU
|
||||
INVERT_PAD_SELECTOR
|
||||
#endif
|
||||
MENUACTION_MOUSESTEER, "FET_MST", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_LEFT,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 260, MENUALIGN_CENTER,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 0, MENUALIGN_CENTER,
|
||||
//MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 260, MENUALIGN_CENTER, // original y
|
||||
},
|
||||
|
||||
// MENUPAGE_PAUSE_MENU = 32
|
||||
@@ -629,15 +654,17 @@ CMenuScreenCustom aScreens[] = {
|
||||
// MENUPAGE_NONE = 33
|
||||
{ "", 0, nil, nil, },
|
||||
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
{ "FET_AGS", MENUPAGE_CONTROLLER_PC, new CCustomScreenLayout({40, 78, 25, true, true}), nil,
|
||||
MENUACTION_CTRLCONFIG, "FEC_CCF", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS }, 40, 76, MENUALIGN_LEFT,
|
||||
MENUACTION_CTRLDISPLAY, "FEC_CDP", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
INVERT_PAD_SELECTOR
|
||||
MENUACTION_CTRLVIBRATION, "FEC_VIB", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
SELECT_CONTROLLER_TYPE
|
||||
MENUACTION_GOBACK, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE }, 0, 0, MENUALIGN_LEFT,
|
||||
},
|
||||
#endif
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
// MENUPAGE_CONTROLLER_SETTINGS = 4
|
||||
{ "FET_CON", MENUPAGE_OPTIONS, nil, nil,
|
||||
MENUACTION_CTRLCONFIG, "FEC_CCF", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, 0,
|
||||
MENUACTION_CTRLVIBRATION, "FEC_VIB", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, 0,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
|
||||
},
|
||||
|
||||
// MENUPAGE_DEBUG_MENU = 18
|
||||
{ "FED_DBG", MENUPAGE_NONE, nil, nil,
|
||||
MENUACTION_RELOADIDE, "FED_RID", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
|
||||
@@ -692,7 +719,7 @@ CMenuScreenCustom aScreens[] = {
|
||||
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
// MENUPAGE_GRAPHICS_SETTINGS
|
||||
{ "FET_GRA", MENUPAGE_OPTIONS, new CCustomScreenLayout({40, 78, 25, true, true}), GraphicsGoBack,
|
||||
{ "FET_GFX", MENUPAGE_OPTIONS, new CCustomScreenLayout({40, 78, 25, true, true}), GraphicsGoBack,
|
||||
|
||||
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
@@ -715,7 +742,7 @@ CMenuScreenCustom aScreens[] = {
|
||||
},
|
||||
#endif
|
||||
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
// MENUPAGE_DETECT_JOYSTICK
|
||||
{ "FEC_JOD", MENUPAGE_CONTROLLER_PC, new CCustomScreenLayout({0, 0, 0, false, false, 30}), DetectJoystickGoBack,
|
||||
MENUACTION_LABEL, "FEC_JPR", { nil, SAVESLOT_NONE, MENUPAGE_NONE }, 0, 0, 0,
|
||||
|
||||
@@ -1594,8 +1594,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)
|
||||
|
||||
@@ -288,6 +288,8 @@ public:
|
||||
int16 GetSkipCutscene() { return GetCrossJustDown(); }
|
||||
|
||||
#ifdef XINPUT
|
||||
static int XInputJoy1;
|
||||
static int XInputJoy2;
|
||||
void AffectFromXinput(uint32 pad);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
|
||||
class CPlaceable
|
||||
{
|
||||
protected:
|
||||
CMatrix m_matrix;
|
||||
|
||||
public:
|
||||
// disable allocation
|
||||
static void *operator new(size_t);
|
||||
|
||||
CMatrix m_matrix;
|
||||
|
||||
CPlaceable(void);
|
||||
const CVector &GetPosition(void) { return m_matrix.GetPosition(); }
|
||||
void SetPosition(float x, float y, float z) {
|
||||
@@ -20,6 +21,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){
|
||||
|
||||
+1
-1
@@ -105,7 +105,7 @@ CPools::CheckPoolsEmpty()
|
||||
printf("pools have been cleared\n");
|
||||
}
|
||||
|
||||
|
||||
// Thankfully unused, it would break the game!
|
||||
void
|
||||
CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot)
|
||||
{
|
||||
|
||||
+120
-75
@@ -239,6 +239,75 @@ void GetTextureCorners(int32 x, int32 y, CVector2D *out)
|
||||
out[3].y = RADAR_TILE_SIZE * (y);
|
||||
}
|
||||
|
||||
uint8 CRadar::CalculateBlipAlpha(float dist)
|
||||
{
|
||||
if (FrontEndMenuManager.m_bMenuMapActive)
|
||||
return 255;
|
||||
|
||||
if (dist <= 1.0f)
|
||||
return 255;
|
||||
|
||||
if (dist <= 10.0f)
|
||||
return (128.0f * ((dist - 1.0f) / 9.0f)) + ((1.0f - (dist - 1.0f) / 9.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;
|
||||
ms_RadarTrace[index].m_eBlipType = BLIP_NONE;
|
||||
ms_RadarTrace[index].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
|
||||
ms_RadarTrace[index].m_eRadarSprite = RADAR_SPRITE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -319,74 +388,6 @@ int LineRadarBoxCollision(CVector2D &out, const CVector2D &p1, const CVector2D &
|
||||
return edge;
|
||||
}
|
||||
|
||||
uint8 CRadar::CalculateBlipAlpha(float dist)
|
||||
{
|
||||
if (FrontEndMenuManager.m_bMenuMapActive)
|
||||
return 255;
|
||||
|
||||
if (dist <= 1.0f)
|
||||
return 255;
|
||||
|
||||
if (dist <= 10.0f)
|
||||
return (128.0f * ((dist - 1.0f) / 9.0f)) + ((1.0f - (dist - 1.0f) / 9.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;
|
||||
ms_RadarTrace[index].m_eBlipType = BLIP_NONE;
|
||||
ms_RadarTrace[index].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
|
||||
ms_RadarTrace[index].m_eRadarSprite = RADAR_SPRITE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
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] = {
|
||||
@@ -465,6 +466,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)
|
||||
{
|
||||
@@ -488,7 +533,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 += 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, CARBLIP_MARKER_COLOR_R, CARBLIP_MARKER_COLOR_G, CARBLIP_MARKER_COLOR_B, CARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
|
||||
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 2.5f, CARBLIP_MARKER_COLOR_R, CARBLIP_MARKER_COLOR_G, CARBLIP_MARKER_COLOR_B, CARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -502,7 +547,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, CHARBLIP_MARKER_COLOR_R, CHARBLIP_MARKER_COLOR_G, CHARBLIP_MARKER_COLOR_B, CHARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
|
||||
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 1.5f, CHARBLIP_MARKER_COLOR_R, CHARBLIP_MARKER_COLOR_G, CHARBLIP_MARKER_COLOR_B, CHARBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -512,7 +557,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 += 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, OBJECTBLIP_MARKER_COLOR_R, OBJECTBLIP_MARKER_COLOR_G, OBJECTBLIP_MARKER_COLOR_B, OBJECTBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
|
||||
C3dMarkers::PlaceMarker(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_ARROW, pos, 1.0f, OBJECTBLIP_MARKER_COLOR_R, OBJECTBLIP_MARKER_COLOR_G, OBJECTBLIP_MARKER_COLOR_B, OBJECTBLIP_MARKER_COLOR_A, 1024, 0.2f, 5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -521,7 +566,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, COORDBLIP_MARKER_COLOR_R, COORDBLIP_MARKER_COLOR_G, COORDBLIP_MARKER_COLOR_B, COORDBLIP_MARKER_COLOR_A, 2048, 0.2f, 0);
|
||||
C3dMarkers::PlaceMarkerSet(i | (ms_RadarTrace[i].m_BlipIndex << 16), MARKERTYPE_CYLINDER, ms_RadarTrace[i].m_vecPos, 2.0f, COORDBLIP_MARKER_COLOR_R, COORDBLIP_MARKER_COLOR_G, COORDBLIP_MARKER_COLOR_B, COORDBLIP_MARKER_COLOR_A, 2048, 0.2f, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -879,7 +924,7 @@ int32 CRadar::GetNewUniqueBlipIndex(int32 i)
|
||||
|
||||
uint32 CRadar::GetRadarTraceColour(uint32 color, bool bright)
|
||||
{
|
||||
int32 c;
|
||||
uint32 c;
|
||||
switch (color) {
|
||||
case RADAR_TRACE_RED:
|
||||
if (bright)
|
||||
@@ -1458,7 +1503,7 @@ CRadar::InitFrontEndMap()
|
||||
void
|
||||
CRadar::DrawYouAreHereSprite(float x, float y)
|
||||
{
|
||||
static PauseModeTime lastChange = 0;
|
||||
static uint32 lastChange = 0;
|
||||
static bool show = true;
|
||||
|
||||
if (show) {
|
||||
@@ -1658,7 +1703,7 @@ void
|
||||
CRadar::DrawLegend(int32 x, int32 y, int32 sprite)
|
||||
{
|
||||
if (sprite < 0) {
|
||||
static PauseModeTime lastChange = 0;
|
||||
static uint32 lastChange = 0;
|
||||
static int8 blipMode = 0;
|
||||
|
||||
CRGBA color;
|
||||
|
||||
@@ -39,9 +39,7 @@ CEntity::RegisterReference(CEntity **pent)
|
||||
ref->pentity = pent;
|
||||
ref->next = m_pFirstReference;
|
||||
m_pFirstReference = ref;
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Clean up the reference from *pent -> 'this'
|
||||
|
||||
+4
-1
@@ -1,5 +1,6 @@
|
||||
#include "common.h"
|
||||
|
||||
#include "main.h"
|
||||
#include "Timer.h"
|
||||
#include "ModelIndices.h"
|
||||
#include "Streaming.h"
|
||||
@@ -91,9 +92,11 @@ void
|
||||
CRopes::Render(void)
|
||||
{
|
||||
int i;
|
||||
PUSH_RENDERGROUP("CRopes::Render");
|
||||
for(i = 0; i < ARRAY_SIZE(aRopes); i++)
|
||||
if(aRopes[i].m_bActive)
|
||||
aRopes[i].Render();
|
||||
POP_RENDERGROUP();
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -167,7 +170,7 @@ CRopes::CreateRopeWithSwatComingDown(CVector pos)
|
||||
swat->bUsesCollision = false;
|
||||
swat->m_pRopeEntity = (CEntity*)1;
|
||||
swat->m_nRopeID = 100 + ropeId;
|
||||
CAnimManager::BlendAnimation(swat->GetClump(), ASSOCGRP_STD, ANIM_ABSEIL, 4.0f);
|
||||
CAnimManager::BlendAnimation(swat->GetClump(), ASSOCGRP_STD, ANIM_STD_ABSEIL, 4.0f);
|
||||
ropeId++;
|
||||
return true;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user