Compare commits
297 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e35c56ceb3 | ||
|
|
be55085303 | ||
|
|
0b6e46b1e4 | ||
|
|
b2b243e803 | ||
|
|
475a4d71d8 | ||
|
|
0dd5be788f | ||
|
|
4e8f42f6f6 | ||
|
|
9f575a70c1 | ||
|
|
f372420dc0 | ||
|
|
2183e25081 | ||
|
|
8d27dba4cd | ||
|
|
02ac7c309e | ||
|
|
4907c56231 | ||
|
|
42952743ba | ||
|
|
04345643a0 | ||
|
|
80aabfe0aa | ||
|
|
9c7d83ebc1 | ||
|
|
465f156e03 | ||
|
|
d0fbba19d1 | ||
|
|
f407c5a25f | ||
|
|
c1a274d91c | ||
|
|
0f8614221b | ||
|
|
291cdd4bfb | ||
|
|
2ce946584e | ||
|
|
78cc2aa9cc | ||
|
|
9553478d9c | ||
|
|
6689b0be02 | ||
|
|
a44d7d86cb | ||
|
|
8659b9d77c | ||
|
|
1b8d03f3aa | ||
|
|
bf1db80e4f | ||
|
|
e7a4a3516f | ||
|
|
2c194df591 | ||
|
|
6580ddd6cb | ||
|
|
a3a5e5b824 | ||
|
|
788ab8d3a8 | ||
|
|
9e1c048e20 | ||
|
|
a1903e025c | ||
|
|
f3bfdd7857 | ||
|
|
c7dae2aca6 | ||
|
|
69138fc08b | ||
|
|
a6b56e6b7a | ||
|
|
c9f804486d | ||
|
|
1d8d2bd7b7 | ||
|
|
a6d402e8fd | ||
|
|
25703b04a2 | ||
|
|
62f28cc4ac | ||
|
|
d460c3863e | ||
|
|
0eb1913713 | ||
|
|
d224f8b7ee | ||
|
|
6662e60b63 | ||
|
|
c7ba01b034 | ||
|
|
2bd8be5872 | ||
|
|
5385d004ec | ||
|
|
bf299e5c17 | ||
|
|
7aaaaa953b | ||
|
|
ad87a6d185 | ||
|
|
e653f4f7dd | ||
|
|
95208bc3dd | ||
|
|
263a766d8e | ||
|
|
61618389e1 | ||
|
|
e6d86bfab5 | ||
|
|
f7959d5646 | ||
|
|
e077a6bf28 | ||
|
|
c002dd6cba | ||
|
|
f2cd511d9c | ||
|
|
3f8bf89e72 | ||
|
|
91c3bdfa15 | ||
|
|
bd368b29b1 | ||
|
|
2e8429858e | ||
|
|
862f83cc40 | ||
|
|
ac339f4724 | ||
|
|
aeccd8c166 | ||
|
|
f6326606b7 | ||
|
|
f541520040 | ||
|
|
7ff899bd22 | ||
|
|
f42f785c78 | ||
|
|
1667ffdd8f | ||
|
|
a7e11d134f | ||
|
|
adf07aab47 | ||
|
|
91612eb45a | ||
|
|
b47a23ab79 | ||
|
|
e28188edd9 | ||
|
|
b65f8a3fe2 | ||
|
|
8d4c134f80 | ||
|
|
4afa7b86ae | ||
|
|
3d4791f291 | ||
|
|
7a3b80a9b7 | ||
|
|
5de4e88d7a | ||
|
|
da378077f7 | ||
|
|
f61a91c97d | ||
|
|
d52b917c54 | ||
|
|
f7fc919d98 | ||
|
|
2e7405b76c | ||
|
|
3dfffdf351 | ||
|
|
1a7810efe1 | ||
|
|
6700c5fd46 | ||
|
|
f05cfe2627 | ||
|
|
69cb133c57 | ||
|
|
7c38e2db24 | ||
|
|
64a4ed6db6 | ||
|
|
ebb615d080 | ||
|
|
2d0562412e | ||
|
|
a74f597d45 | ||
|
|
2b269ff1c0 | ||
|
|
e9054f2980 | ||
|
|
d2cf090ace | ||
|
|
93ffe6123d | ||
|
|
8846f50cb7 | ||
|
|
843dd9b5e1 | ||
|
|
0f623c2354 | ||
|
|
f27e1ec818 | ||
|
|
d3cd707db7 | ||
|
|
7afb8ff679 | ||
|
|
b4e0c97469 | ||
|
|
cb34060f00 | ||
|
|
4564f7aeea | ||
|
|
1d3b4d1e9a | ||
|
|
5336620f5c | ||
|
|
a0bf47cfd2 | ||
|
|
d7c00841d6 | ||
|
|
3e6bb267f3 | ||
|
|
5183d7cf0f | ||
|
|
db6b7b473d | ||
|
|
6bdc0365ee | ||
|
|
921ca7712e | ||
|
|
35258b9b9c | ||
|
|
2650fa9a92 | ||
|
|
6f4e2ab491 | ||
|
|
5988c0e95a | ||
|
|
fd461ca702 | ||
|
|
0ea72af60c | ||
|
|
6118ed89bb | ||
|
|
226e3b83da | ||
|
|
f6c846d27a | ||
|
|
3b4e79f073 | ||
|
|
2e5898490c | ||
|
|
d58f090198 | ||
|
|
e9adf8162b | ||
|
|
a034661bc9 | ||
|
|
609cad506f | ||
|
|
950a3e82c1 | ||
|
|
d77846bb16 | ||
|
|
497e0b801f | ||
|
|
a511d79bf0 | ||
|
|
69500eed56 | ||
|
|
c67273e92a | ||
|
|
ef24783bff | ||
|
|
034df61f3c | ||
|
|
3c221d9466 | ||
|
|
6df52f06b6 | ||
|
|
f2596b3759 | ||
|
|
ac0f759b27 | ||
|
|
8e825fa629 | ||
|
|
c54f5c4b4f | ||
|
|
9b193a47a2 | ||
|
|
505438cd90 | ||
|
|
bb66028e74 | ||
|
|
a9b8d30ce0 | ||
|
|
e6ef164441 | ||
|
|
25d3066eae | ||
|
|
ef59c623fd | ||
|
|
8c1f4ba65d | ||
|
|
91093305d6 | ||
|
|
7687ce84ed | ||
|
|
da29203219 | ||
|
|
a6faa0384b | ||
|
|
deaaf3d22f | ||
|
|
448e41ecaa | ||
|
|
5a47379bf5 | ||
|
|
357b67e3f5 | ||
|
|
caa7d3177c | ||
|
|
a06bd7f735 | ||
|
|
260591cc54 | ||
|
|
ad908f5dde | ||
|
|
a844cbbc3d | ||
|
|
011a9cc775 | ||
|
|
7f15e11b1b | ||
|
|
e8727cf4a1 | ||
|
|
6aab948be2 | ||
|
|
083aa700e9 | ||
|
|
7c3e43aa2e | ||
|
|
d88a3cf558 | ||
|
|
b9dc81d600 | ||
|
|
57201187de | ||
|
|
4097c20bdd | ||
|
|
fb1bd1a5bd | ||
|
|
4837969e09 | ||
|
|
ef0b2291a0 | ||
|
|
29172e9ee2 | ||
|
|
66b8c870f4 | ||
|
|
6103677914 | ||
|
|
005ddf26c1 | ||
|
|
c210e1bae6 | ||
|
|
4fe64d1b0d | ||
|
|
461e9fe5c2 | ||
|
|
ad1d0ffc5a | ||
|
|
4a96c7c9f2 | ||
|
|
3ae4c00562 | ||
|
|
13d5c5e7e6 | ||
|
|
8929e55bff | ||
|
|
11ecab3ca1 | ||
|
|
48ce6151f9 | ||
|
|
fe1d82c9c3 | ||
|
|
be1e09aad4 | ||
|
|
06fbbaa43f | ||
|
|
31dd135075 | ||
|
|
08e5c8e010 | ||
|
|
3519cbd3e5 | ||
|
|
6b8374f391 | ||
|
|
96e2ba19f8 | ||
|
|
a78e4a3366 | ||
|
|
b375e20c75 | ||
|
|
d9f6a05b7e | ||
|
|
64b585efa1 | ||
|
|
54b88cdfbe | ||
|
|
e9adfd8663 | ||
|
|
8d0b4ede68 | ||
|
|
9707eeb8cb | ||
|
|
2f48d0c828 | ||
|
|
2ff9270279 | ||
|
|
8a157eee0a | ||
|
|
8aaa3c4884 | ||
|
|
59825a5268 | ||
|
|
cc2cebffb6 | ||
|
|
4bb6740bf4 | ||
|
|
9693184cea | ||
|
|
822f0bd40b | ||
|
|
02f6ed7da3 | ||
|
|
39a121351d | ||
|
|
00d23c61d9 | ||
|
|
8eed6ae179 | ||
|
|
6e42c791cf | ||
|
|
368d2f3279 | ||
|
|
c594d89dc5 | ||
|
|
223b49e3be | ||
|
|
ec61964bce | ||
|
|
d8a04c9e43 | ||
|
|
ef13866af6 | ||
|
|
168d3d7ddb | ||
|
|
2173ceae95 | ||
|
|
416a898943 | ||
|
|
02a28996f4 | ||
|
|
36996af82b | ||
|
|
145bd243e8 | ||
|
|
4cb00d3801 | ||
|
|
148383ff53 | ||
|
|
493f6cb578 | ||
|
|
a6409fb445 | ||
|
|
d94e8e8faf | ||
|
|
fd4c2172f5 | ||
|
|
2e734a4750 | ||
|
|
e6ef2f12de | ||
|
|
11de714d9d | ||
|
|
042e21115e | ||
|
|
63e9f6d826 | ||
|
|
150f5302b7 | ||
|
|
047f9c49ec | ||
|
|
0f43523a16 | ||
|
|
8d782a1027 | ||
|
|
c2ff171364 | ||
|
|
3b1400eaed | ||
|
|
2860f6e4a9 | ||
|
|
bbbfe65870 | ||
|
|
ab788a5316 | ||
|
|
f1660d8e05 | ||
|
|
eac0d0c99a | ||
|
|
52df1e65de | ||
|
|
bb5d2c501c | ||
|
|
213a8eb905 | ||
|
|
ee05c7fe42 | ||
|
|
28ec412369 | ||
|
|
941e70a701 | ||
|
|
0d05be4e31 | ||
|
|
78fed0dfe7 | ||
|
|
cdb65e9ced | ||
|
|
482ff4562f | ||
|
|
38bca2332d | ||
|
|
c587203ebe | ||
|
|
716e322246 | ||
|
|
3a0d99d24c | ||
|
|
d3b11c2b8c | ||
|
|
e6914355dd | ||
|
|
b3581bc0b4 | ||
|
|
c9a7fd9435 | ||
|
|
bc7161754f | ||
|
|
7a360b1181 | ||
|
|
8fadca196b | ||
|
|
30236a804d | ||
|
|
24eb7c98f2 | ||
|
|
89e2709304 | ||
|
|
7b9e58f7c6 | ||
|
|
737d41e184 | ||
|
|
97f83c9fb2 | ||
|
|
224e805fe4 | ||
|
|
9e8faebcd6 | ||
|
|
bc4d3a32eb |
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior.
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Version**
|
||||||
|
Tell us what version you're running. Find out using the debug menu (Ctrl-M, Debug -> Version Text)
|
||||||
|
If you send a screenshot just enable it beforehand.
|
||||||
10
.github/workflows/build-cmake-conan.yml
vendored
10
.github/workflows/build-cmake-conan.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: reVC conan+cmake
|
name: re3 conan+cmake
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
@@ -95,13 +95,13 @@ jobs:
|
|||||||
conan export re3mss miles-sdk/master@
|
conan export re3mss miles-sdk/master@
|
||||||
- name: "Download/build dependencies (conan install)"
|
- name: "Download/build dependencies (conan install)"
|
||||||
run: |
|
run: |
|
||||||
conan install ${{ github.workspace }} reVC/master@ -if build -o reVC:audio=${{ matrix.audio }} -o librw:platform=${{ matrix.platform }} -o librw:gl3_gfxlib=${{ matrix.gl3_gfxlib || 'glfw' }} --build missing -pr:h ./host_profile -pr:b default -s reVC:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo
|
conan install ${{ github.workspace }} re3/master@ -if build -o re3:audio=${{ matrix.audio }} -o librw:platform=${{ matrix.platform }} -o librw:gl3_gfxlib=${{ matrix.gl3_gfxlib || 'glfw' }} --build missing -pr:h ./host_profile -pr:b default -s re3:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo
|
||||||
env:
|
env:
|
||||||
CONAN_SYSREQUIRES_MODE: enabled
|
CONAN_SYSREQUIRES_MODE: enabled
|
||||||
- name: "Build reVC (conan build)"
|
- name: "Build re3 (conan build)"
|
||||||
run: |
|
run: |
|
||||||
conan build ${{ github.workspace }} -if build -bf build -pf package
|
conan build ${{ github.workspace }} -if build -bf build -pf package
|
||||||
- name: "Package reVC (conan package)"
|
- name: "Package re3 (conan package)"
|
||||||
run: |
|
run: |
|
||||||
conan package ${{ github.workspace }} -if build -bf build -pf package
|
conan package ${{ github.workspace }} -if build -bf build -pf package
|
||||||
- name: "Create binary package (cpack)"
|
- name: "Create binary package (cpack)"
|
||||||
@@ -112,5 +112,5 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: "${{ matrix.os }}-${{ matrix.platform }}"
|
name: "${{ matrix.os }}-${{ matrix.platform }}"
|
||||||
path: build/*.tar.xz
|
path: build/*.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: reVC premake amd64
|
name: re3 premake amd64
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -47,14 +47,14 @@ jobs:
|
|||||||
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir64=${{env.GLFW_BASE}}
|
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir64=${{env.GLFW_BASE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
msbuild -m build/reVC.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||||
# - name: Pack artifacts
|
# - name: Pack artifacts
|
||||||
# run: |
|
# run: |
|
||||||
# 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
# 7z a re3_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||||
- name: Move binaries to gamefiles
|
- name: Move binaries to gamefiles
|
||||||
run: |
|
run: |
|
||||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./gamefiles/
|
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.exe ./gamefiles/
|
||||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./gamefiles/
|
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.pdb ./gamefiles/
|
||||||
- name: Move dynamic dependencies to gamefiles
|
- name: Move dynamic dependencies to gamefiles
|
||||||
run: |
|
run: |
|
||||||
mv ./vendor/mpg123/dist/Win64/libmpg123-0.dll ./gamefiles/
|
mv ./vendor/mpg123/dist/Win64/libmpg123-0.dll ./gamefiles/
|
||||||
@@ -62,12 +62,12 @@ jobs:
|
|||||||
- name: Upload artifact to actions
|
- name: Upload artifact to actions
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: reVC_${{matrix.buildtype}}_${{matrix.platform}}
|
name: re3_${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
path: ./gamefiles/*
|
path: ./gamefiles/*
|
||||||
# - name: Upload artifact to Bintray
|
# - name: Upload artifact to Bintray
|
||||||
# uses: hpcsc/upload-bintray-docker-action@v1
|
# uses: hpcsc/upload-bintray-docker-action@v1
|
||||||
# with:
|
# with:
|
||||||
# repository: reVC
|
# repository: re3
|
||||||
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
# version: 1.0-$(echo ${GITHUB_SHA}
|
# version: 1.0-$(echo ${GITHUB_SHA}
|
||||||
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: reVC premake x86
|
name: re3 premake x86
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -47,14 +47,14 @@ jobs:
|
|||||||
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir32=${{env.GLFW_BASE}}
|
./premake5 vs2019 --with-librw --glewdir=${{env.GLEW_BASE}} --glfwdir32=${{env.GLFW_BASE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
msbuild -m build/reVC.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
|
||||||
# - name: Pack artifacts
|
# - name: Pack artifacts
|
||||||
# run: |
|
# run: |
|
||||||
# 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
# 7z a re3_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
|
||||||
- name: Move binaries to gamefiles
|
- name: Move binaries to gamefiles
|
||||||
run: |
|
run: |
|
||||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./gamefiles/
|
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.exe ./gamefiles/
|
||||||
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./gamefiles/
|
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.pdb ./gamefiles/
|
||||||
- if: contains(matrix.platform, 'oal')
|
- if: contains(matrix.platform, 'oal')
|
||||||
name: Move dynamic dependencies to gamefiles
|
name: Move dynamic dependencies to gamefiles
|
||||||
run: |
|
run: |
|
||||||
@@ -63,12 +63,12 @@ jobs:
|
|||||||
- name: Upload artifact to actions
|
- name: Upload artifact to actions
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: reVC_${{matrix.buildtype}}_${{matrix.platform}}
|
name: re3_${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
path: ./gamefiles/*
|
path: ./gamefiles/*
|
||||||
# - name: Upload artifact to Bintray
|
# - name: Upload artifact to Bintray
|
||||||
# uses: hpcsc/upload-bintray-docker-action@v1
|
# uses: hpcsc/upload-bintray-docker-action@v1
|
||||||
# with:
|
# with:
|
||||||
# repository: reVC
|
# repository: re3
|
||||||
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
# package: ${{matrix.buildtype}}_${{matrix.platform}}
|
||||||
# version: 1.0-$(echo ${GITHUB_SHA}
|
# version: 1.0-$(echo ${GITHUB_SHA}
|
||||||
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -355,7 +355,7 @@ vendor/glfw-3.3.2.bin.WIN64/
|
|||||||
|
|
||||||
sdk/
|
sdk/
|
||||||
|
|
||||||
codewarrior/reVC_Data/
|
codewarrior/re3_Data/
|
||||||
codewarrior/Release/
|
codewarrior/Release/
|
||||||
codewarrior/Debug/
|
codewarrior/Debug/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
|
|
||||||
set(EXECUTABLE reVC)
|
set(EXECUTABLE re3)
|
||||||
set(PROJECT REVC)
|
set(PROJECT RE3)
|
||||||
|
|
||||||
project(${EXECUTABLE} C CXX)
|
project(${EXECUTABLE} C CXX)
|
||||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||||
@@ -81,6 +81,6 @@ if(${PROJECT}_INSTALL)
|
|||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
|
||||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
||||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
|
||||||
set(CPACK_GENERATOR "TXZ")
|
set(CPACK_GENERATOR "ZIP")
|
||||||
include(CPack)
|
include(CPack)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
56
README.md
56
README.md
@@ -1,6 +1,6 @@
|
|||||||
<img src="https://github.com/GTAmodding/re3/blob/miami/logo.png?raw=true" alt="reVC logo" width="200">
|
<img src="https://github.com/GTAmodding/re3/blob/master/logo.png?raw=true" alt="re3 logo" width="200">
|
||||||
|
|
||||||
[](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=miami)
|
[](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=master)
|
||||||
<a href="https://discord.gg/ERYg58ttcE"><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
|
## Intro
|
||||||
@@ -12,25 +12,29 @@ Rendering is handled either by original RenderWare (D3D8)
|
|||||||
or the reimplementation [librw](https://github.com/aap/librw) (D3D9, OpenGL 2.1 or above, OpenGL ES 2.0 or above).\
|
or the reimplementation [librw](https://github.com/aap/librw) (D3D9, OpenGL 2.1 or above, OpenGL ES 2.0 or above).\
|
||||||
Audio is done with MSS (using dlls from original GTA) or OpenAL.
|
Audio is done with MSS (using dlls from original GTA) or OpenAL.
|
||||||
|
|
||||||
|
The project has also been ported to the [Nintendo Switch](https://github.com/AGraber/re3-nx/),
|
||||||
|
[Playstation Vita](https://github.com/Rinnegatamante/re3) and
|
||||||
|
[Nintendo Wii U](https://github.com/GaryOderNichts/re3-wiiu/).
|
||||||
|
|
||||||
We cannot build for PS2 or Xbox yet. If you're interested in doing so, get in touch with us.
|
We cannot build for PS2 or Xbox yet. If you're interested in doing so, get in touch with us.
|
||||||
|
|
||||||
## How can I try it?
|
## Installation
|
||||||
|
|
||||||
- reVC requires game assets to work, so you **must** own [a copy of GTA Vice City](https://store.steampowered.com/app/12110/Grand_Theft_Auto_Vice_City/).
|
- re3 requires PC game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).
|
||||||
- Build reVC or download the latest nightly build:
|
- Build re3 or download the latest nightly build:
|
||||||
- [Windows D3D9 MSS 32bit](https://nightly.link/GTAmodding/re3/workflows/reVC_msvc_x86/miami/reVC_Release_win-x86-librw_d3d9-mss.zip)
|
- [Windows D3D9 MSS 32bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_x86/master/re3_Release_win-x86-librw_d3d9-mss.zip)
|
||||||
- [Windows D3D9 64bit](https://nightly.link/GTAmodding/re3/workflows/reVC_msvc_amd64/miami/reVC_Release_win-amd64-librw_d3d9-oal.zip)
|
- [Windows D3D9 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_d3d9-oal.zip)
|
||||||
- [Windows OpenGL 64bit](https://nightly.link/GTAmodding/re3/workflows/reVC_msvc_amd64/miami/reVC_Release_win-amd64-librw_gl3_glfw-oal.zip)
|
- [Windows OpenGL 64bit](https://nightly.link/GTAmodding/re3/workflows/re3_msvc_amd64/master/re3_Release_win-amd64-librw_gl3_glfw-oal.zip)
|
||||||
- [Linux 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/miami/ubuntu-latest-gl3.zip)
|
- [Linux 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/ubuntu-latest-gl3.zip)
|
||||||
- [MacOS 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/miami/macos-latest-gl3.zip)
|
- [MacOS 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/master/macos-latest-gl3.zip)
|
||||||
- Extract the downloaded zip over your GTA VC directory and run reVC. The zip includes the gamefiles and in case of OpenAL the required dlls.
|
- Extract the downloaded zip over your GTA 3 directory and run re3. The zip includes the gamefiles and in case of OpenAL the required dlls.
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## Improvements
|
## Improvements
|
||||||
|
|
||||||
@@ -40,22 +44,25 @@ Some of them can be toggled at runtime, some cannot.
|
|||||||
|
|
||||||
* Fixed a lot of smaller and bigger bugs
|
* Fixed a lot of smaller and bigger bugs
|
||||||
* User files (saves and settings) stored in GTA root directory
|
* User files (saves and settings) stored in GTA root directory
|
||||||
* Settings stored in reVC.ini file instead of gta_vc.set
|
* Settings stored in re3.ini file instead of gta3.set
|
||||||
* Debug menu to do and change various things (Ctrl-M to open)
|
* Debug menu to do and change various things (Ctrl-M to open)
|
||||||
* Debug camera (Ctrl-B to toggle)
|
* Debug camera (Ctrl-B to toggle)
|
||||||
* Rotatable camera
|
* Rotatable camera
|
||||||
* Xinput controller support (Windows)
|
* Xinput controller support (Windows)
|
||||||
* No loading screens between islands ("map memory usage" in menu)
|
* No loading screens between islands ("map memory usage" in menu)
|
||||||
|
* Skinned ped support (models from Xbox or Mobile)
|
||||||
* Rendering
|
* Rendering
|
||||||
* Widescreen support (properly scaled HUD, Menu and FOV)
|
* Widescreen support (properly scaled HUD, Menu and FOV)
|
||||||
* PS2 MatFX (vehicle reflections)
|
* PS2 MatFX (vehicle reflections)
|
||||||
* PS2 alpha test (better rendering of transparency)
|
* PS2 alpha test (better rendering of transparency)
|
||||||
|
* PS2 particles
|
||||||
* Xbox vehicle rendering
|
* Xbox vehicle rendering
|
||||||
* Xbox world lightmap rendering (needs Xbox map)
|
* Xbox world lightmap rendering (needs Xbox map)
|
||||||
* Xbox ped rim light
|
* Xbox ped rim light
|
||||||
* Xbox screen rain droplets
|
* Xbox screen rain droplets
|
||||||
* More customizable colourfilter
|
* More customizable colourfilter
|
||||||
* Menu
|
* Menu
|
||||||
|
* Map
|
||||||
* More options
|
* More options
|
||||||
* Controller configuration menu
|
* Controller configuration menu
|
||||||
* ...
|
* ...
|
||||||
@@ -68,6 +75,7 @@ The following things would be nice to have/do:
|
|||||||
|
|
||||||
* Fix physics for high FPS
|
* Fix physics for high FPS
|
||||||
* Improve performance on lower end devices, especially the OpenGL layer on the Raspberry Pi (if you have experience with this, please get in touch)
|
* Improve performance on lower end devices, especially the OpenGL layer on the Raspberry Pi (if you have experience with this, please get in touch)
|
||||||
|
* Compare code with PS2 code (tedious, no good decompiler)
|
||||||
* [PS2 port](https://github.com/GTAmodding/re3/wiki/PS2-port)
|
* [PS2 port](https://github.com/GTAmodding/re3/wiki/PS2-port)
|
||||||
* Xbox port (not quite as important)
|
* Xbox port (not quite as important)
|
||||||
* reverse remaining unused/debug functions
|
* reverse remaining unused/debug functions
|
||||||
@@ -85,9 +93,9 @@ Sorry for the inconvenience.
|
|||||||
|
|
||||||
## Building from Source
|
## Building from Source
|
||||||
|
|
||||||
When using premake, you may want to point GTA_VC_RE_DIR environment variable to GTA Vice City root folder if you want the executable to be moved there via post-build script.
|
When using premake, you may want to point GTA_III_RE_DIR environment variable to GTA3 root folder if you want the executable to be moved there via post-build script.
|
||||||
|
|
||||||
Clone the repository with `git clone --recursive -b miami https://github.com/GTAmodding/re3.git reVC`. Then `cd reVC` into the cloned repository.
|
Clone the repository with `git clone --recursive https://github.com/GTAmodding/re3.git`. Then `cd re3` into the cloned repository.
|
||||||
|
|
||||||
<details><summary>Linux Premake</summary>
|
<details><summary>Linux Premake</summary>
|
||||||
|
|
||||||
@@ -102,7 +110,7 @@ Install python and conan, and then run build.
|
|||||||
conan export vendor/librw librw/master@
|
conan export vendor/librw librw/master@
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
conan install .. reVC/master@ -if build -o reVC:audio=openal -o librw:platform=gl3 -o librw:gl3_gfxlib=glfw --build missing -s reVC:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo
|
conan install .. re3/master@ -if build -o re3:audio=openal -o librw:platform=gl3 -o librw:gl3_gfxlib=glfw --build missing -s re3:build_type=RelWithDebInfo -s librw:build_type=RelWithDebInfo
|
||||||
conan build .. -if build -bf build -pf package
|
conan build .. -if build -bf build -pf package
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
@@ -117,8 +125,8 @@ For FreeBSD using premake, proceed: [Building on FreeBSD](https://github.com/GTA
|
|||||||
|
|
||||||
Assuming you have Visual Studio 2015/2017/2019:
|
Assuming you have Visual Studio 2015/2017/2019:
|
||||||
- Run one of the `premake-vsXXXX.cmd` variants on root folder.
|
- Run one of the `premake-vsXXXX.cmd` variants on root folder.
|
||||||
- Open build/reVC.sln with Visual Studio and compile the solution.
|
- Open build/re3.sln with Visual Studio and compile the solution.
|
||||||
|
|
||||||
Microsoft recently discontinued its downloads of the DX9 SDK. You can download an archived version here: https://archive.org/details/dxsdk_jun10
|
Microsoft recently discontinued its downloads of the DX9 SDK. You can download an archived version here: https://archive.org/details/dxsdk_jun10
|
||||||
|
|
||||||
**If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).
|
**If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).
|
||||||
@@ -126,11 +134,11 @@ Microsoft recently discontinued its downloads of the DX9 SDK. You can download a
|
|||||||
|
|
||||||
> :information_source: premake has an `--lto` option if you want the project to be compiled with Link Time Optimization.
|
> :information_source: premake has an `--lto` option if you want the project to be compiled with Link Time Optimization.
|
||||||
|
|
||||||
> :information_source: There are various settings in [config.h](https://github.com/GTAmodding/re3/tree/miami/src/core/config.h), you may want to take a look there.
|
> :information_source: There are various settings in [config.h](https://github.com/GTAmodding/re3/tree/master/src/core/config.h), you may want to take a look there.
|
||||||
|
|
||||||
> :information_source: reVC uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.
|
> :information_source: re3 uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of re3, but you also can use LIBRW enviorenment variable to specify path to your own librw.
|
||||||
|
|
||||||
If you feel the need, you can also use Codewarrior 7 to compile reVC using the supplied codewarrior/reVC.mcp project - this requires the original RW34 libraries, and the DX8 SDK. The build is unstable compared to the MSVC builds though, and is mostly meant to serve as a reference.
|
If you feel the need, you can also use Codewarrior 7 to compile re3 using the supplied codewarrior/re3.mcp project - this requires the original RW33 libraries, and the DX8 SDK. The build is unstable compared to the MSVC builds though, and is mostly meant to serve as a reference.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
We have a [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) document that isn't followed or enforced very well.
|
We have a [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) document that isn't followed or enforced very well.
|
||||||
|
|||||||
Binary file not shown.
18
conanfile.py
18
conanfile.py
@@ -5,8 +5,8 @@ import shutil
|
|||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
|
||||||
class ReVCConan(ConanFile):
|
class Re3Conan(ConanFile):
|
||||||
name = "reVC"
|
name = "re3"
|
||||||
version = "master"
|
version = "master"
|
||||||
license = "???" # FIXME: https://github.com/GTAmodding/re3/issues/794
|
license = "???" # FIXME: https://github.com/GTAmodding/re3/issues/794
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
settings = "os", "arch", "compiler", "build_type"
|
||||||
@@ -69,10 +69,10 @@ class ReVCConan(ConanFile):
|
|||||||
raise ConanInvalidConfiguration("Only `glfw` is supported as gl3_gfxlib.")
|
raise ConanInvalidConfiguration("Only `glfw` is supported as gl3_gfxlib.")
|
||||||
#if not self.options.with_opus:
|
#if not self.options.with_opus:
|
||||||
# if not self.options["libsndfile"].with_external_libs:
|
# if not self.options["libsndfile"].with_external_libs:
|
||||||
# raise ConanInvalidConfiguration("reVC with opus support requires a libsndfile built with external libs (=ogg/flac/opus/vorbis)")
|
# raise ConanInvalidConfiguration("re3 with opus support requires a libsndfile built with external libs (=ogg/flac/opus/vorbis)")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _reVC_audio(self):
|
def _re3_audio(self):
|
||||||
return {
|
return {
|
||||||
"miles": "MSS",
|
"miles": "MSS",
|
||||||
"openal": "OAL",
|
"openal": "OAL",
|
||||||
@@ -111,16 +111,16 @@ class ReVCConan(ConanFile):
|
|||||||
include("{}/conanbuildinfo.cmake")
|
include("{}/conanbuildinfo.cmake")
|
||||||
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
|
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
|
||||||
|
|
||||||
add_subdirectory("{}" reVC)
|
add_subdirectory("{}" re3)
|
||||||
""").format(self.install_folder.replace("\\", "/"),
|
""").format(self.install_folder.replace("\\", "/"),
|
||||||
self.source_folder.replace("\\", "/")))
|
self.source_folder.replace("\\", "/")))
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
pass
|
pass
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.definitions["REVC_AUDIO"] = self._reVC_audio
|
cmake.definitions["RE3_AUDIO"] = self._re3_audio
|
||||||
cmake.definitions["REVC_WITH_OPUS"] = self.options.with_opus
|
cmake.definitions["RE3_WITH_OPUS"] = self.options.with_opus
|
||||||
cmake.definitions["REVC_INSTALL"] = True
|
cmake.definitions["RE3_INSTALL"] = True
|
||||||
cmake.definitions["REVC_VENDORED_LIBRW"] = False
|
cmake.definitions["RE3_VENDORED_LIBRW"] = False
|
||||||
env = {}
|
env = {}
|
||||||
if self._os_is_playstation2:
|
if self._os_is_playstation2:
|
||||||
cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = self.deps_user_info["ps2dev-cmaketoolchain"].cmake_toolchain_file
|
cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = self.deps_user_info["ps2dev-cmaketoolchain"].cmake_toolchain_file
|
||||||
|
|||||||
BIN
gamefiles/TEXT/JAPANESE.gxt
Normal file
BIN
gamefiles/TEXT/JAPANESE.gxt
Normal file
Binary file not shown.
Binary file not shown.
BIN
gamefiles/TEXT/english.gxt
Normal file
BIN
gamefiles/TEXT/english.gxt
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
gamefiles/TEXT/polish.gxt
Executable file
BIN
gamefiles/TEXT/polish.gxt
Executable file
Binary file not shown.
BIN
gamefiles/TEXT/russian.gxt
Normal file
BIN
gamefiles/TEXT/russian.gxt
Normal file
Binary file not shown.
Binary file not shown.
363
gamefiles/data/PARTICLE.CFG
Normal file
363
gamefiles/data/PARTICLE.CFG
Normal file
@@ -0,0 +1,363 @@
|
|||||||
|
; Author: Alexander Roger
|
||||||
|
; Date: 21/12/2000
|
||||||
|
;
|
||||||
|
; Author: Andrzej Madajczyk
|
||||||
|
; Date: 26/02/2001
|
||||||
|
; 14/03/2001 - Alpha (opacity) support added;
|
||||||
|
; 10/05/2001 - Drag/Friction Decceleration changed to constants;
|
||||||
|
; 28/08/2001 - Initial Color Variation added;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; Note! Last line of the file MUST BE ";the end\n", otherwise you'll get parsing error(s) of the file;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;Particle Systems Configuration Data:: Format
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;A: Particle Type Name (max 20 chars)
|
||||||
|
;
|
||||||
|
;B/C/D: Render Colouring (r,g,b) (0-255)
|
||||||
|
;
|
||||||
|
;CV: Initial Color Variation (for r,g,b only, in %) (0-100);
|
||||||
|
; (i.e. Color=(100,100,100) and CV=20, then v=random(-20,20), real_color=(100+v, 100+v, 100+v));
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;B2/C2/D2: Fade Destination Color (r,g,b) (0-255)
|
||||||
|
;
|
||||||
|
;FT: Color Fade Time for (B,C,D)->(B2,C2,D2), (0 for none);
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;E: Default Initial Radius (float)
|
||||||
|
;F: Expansion Rate (float)
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; Color "Fade-to-Black" options:
|
||||||
|
;G: Initial Intensity (0-255)
|
||||||
|
;H: Fade Time (time between fade steps in frames)
|
||||||
|
;I: Fade Amount (-255 to 255) can get brighter or dimmer
|
||||||
|
;
|
||||||
|
; "Fade Alpha" options:
|
||||||
|
;GA: Initial Intensity (0-255)
|
||||||
|
;HA: Fade Time (time between fade steps in frames)
|
||||||
|
;IA: Fade Amount
|
||||||
|
;
|
||||||
|
; "Z Rotation" options:
|
||||||
|
;GZA: Initial Angle (0-1023)
|
||||||
|
;HZA: Change Time (time between steps in frames)
|
||||||
|
;IZA: Angle Change Amount
|
||||||
|
;
|
||||||
|
;GZR: Initial Z Radius
|
||||||
|
;HZR: Change Time (time between steps in frames)
|
||||||
|
;IZR: Z Radius Change Amount
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;J: Animation Speed (0=no animation)(time between steps msec)
|
||||||
|
;K: Start Animation Frame ( 0 -> )
|
||||||
|
;L: Final Animation Frame ( H -> )
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;M: Rotation Speed (0=None,i-deg/frame)
|
||||||
|
;N: Gravitational Acceleration (0=none, float)
|
||||||
|
;O: Drag/Friction Decceleration (int: 0=none, 50=0.50, 80=0.80, 90=0.90, 95=0.95, 96=0.96, 99=0.99)
|
||||||
|
;
|
||||||
|
;P: Default Life-Span of Particle (msec)
|
||||||
|
;
|
||||||
|
;Q: Position Random Error [position += (+/-)rand(a)]
|
||||||
|
;R: Velocity Random Error [velocity += (+/-)rand(b)]
|
||||||
|
;S: Expansion Rate Error [exp_rate += (+)rand(c)]
|
||||||
|
;T: Rotation Rate Error [rot_speed = (+/-)rand(d)]
|
||||||
|
;U: Life-Span Error Shape [shape distribution, e=0->all at default, e->Inf then shape->0] (max=255!!)
|
||||||
|
;V: Trail Length Multiplier [length *= (float) multiplier] (only used if trail flag active)
|
||||||
|
;
|
||||||
|
;CR:Particle Create Range (in meters: 0=no check); if particles are created enough far away from camera, they are deleted (not added to particle system);
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;Z: Flags! Guide: 1=ZCHECK_FIRST, 2=ZCHECK_STEP, 4=DRAW_OPAQUE, 8=SCREEN_TRAIL,
|
||||||
|
; 16=SPEED_TRAIL, 32=RAND_VERT_V, 64=CYCLE_ANIM, 128=DRAW_DARK, 256=VERT_TRAIL
|
||||||
|
; 1024=DRAWTOP2D, 2048=CLIPOUT2D
|
||||||
|
; 4096=ZCHECK_BUMP, 8192=ZCHECK_BUMP_FIRST
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;default:
|
||||||
|
;GUNFLASH 255 255 255 0 0.1 0.0 255 0 128 0 0 0 0 0.0 1.0 250 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;
|
||||||
|
;good idea for fire-smudge?
|
||||||
|
;GUNFLASH 255 255 255 0 1.0 0.0 255 0 32 100 0 3 0 0.0 1.0 400 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;
|
||||||
|
;current:
|
||||||
|
;GUNFLASH 255 255 255 0 1.0 0.0 255 0 32 100 0 3 0 0.0 1.0 400 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;SPARK_SMALL 255 255 128 0 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.05 0.0 0 0 0.5 40
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
||||||
|
;
|
||||||
|
SPARK 255 128 64 0 0 0 0 0 0.005 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 300 0.0 0.07 0.0 0 0 1.0 20.0 48
|
||||||
|
SPARK_SMALL 255 255 128 0 0 0 0 0 0.005 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 500 0.0 0.05 0.0 0 0 0.6 20.0 40
|
||||||
|
;
|
||||||
|
WHEEL_DIRT 8 24 8 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.002 1 1000 0.15 0.015 0.0 0 0 1.0 30.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;WHEEL_WATER 24 24 24 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.002 1 1000 0.15 0.015 0.0 0 0 1.0 20.0 0
|
||||||
|
WHEEL_WATER 24 24 32 0 0 0 0 0 0.05 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.004 1 1000 0.15 0.015 0.0 0 0 1.0 20.0 1
|
||||||
|
;
|
||||||
|
;
|
||||||
|
BLOOD 128 128 128 0 0 0 0 0 0.02 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.03 1 2000 0.3 0.05 0.0 0 0 1.0 50.0 5
|
||||||
|
BLOOD_SMALL 255 32 32 0 0 0 0 0 0.007 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.005 1 2000 0.05 0.05 0.0 0 0 1.0 50.0 53
|
||||||
|
;BLOOD_SPLAT 128 128 128 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 200 0.3 0.0 0.0 0 0 1.0 400.0 36
|
||||||
|
BLOOD_SPURT 255 32 32 0 0 0 0 0 0.008 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.005 1 2000 0.0 0.01 0.0 0 0 2.0 50.0 52
|
||||||
|
DEBRIS 64 64 64 0 0 0 0 0 0.5 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 95 1000 0.2 0.0 0.0 0 0 1.0 50.0 4
|
||||||
|
DEBRIS2 64 64 64 0 0 0 0 0 0.04 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 5 0.01 99 1000 0.03 0.04 0.0 0 0 1.0 50.0 38
|
||||||
|
WATER 64 64 128 0 0 0 0 0 0.01 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 2000 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;FLAME 255 74 30 0 0 0 0 0 0.2 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 0.0 1 100 0.05 0.0 0.0 0 0 1.0 400.0 0
|
||||||
|
;FLAME 255 74 30 0 0 255 0 400 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 200.0 0
|
||||||
|
FLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 200.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;FIREBALL 255 74 30 0 0 0 0 0 0.1 0.04 255 1 8 255 0 0 0 0 0 0.0 0 0.0 32 0 7 0 0.0 96 1000 0.1 0.0 0.0 0 0 1.0 400.0 0
|
||||||
|
;
|
||||||
|
;FIREBALL 255 74 30 0 0 0 0 0 0.1 0.05 255 0 6 255 0 0 0 0 0 0.0 0 0.0 1 0 7 0 -0.002 96 2000 0.1 0.02 0.02 3 0 1.0 200.0 0
|
||||||
|
FIREBALL 255 74 30 0 0 0 0 0 0.1 0.02 255 0 6 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.003 96 2000 0.1 0.03 0.014 2.5 0 1.0 200.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
GUNFLASH 170 170 170 0 0 0 0 0 0.1 0.0 255 1 50 255 0 0 0 0 0 0.0 0 0.0 51 0 3 0 0.0 1 250 0.0 0.0 0.0 0 0 1.0 35.0 0
|
||||||
|
GUNFLASH_NOANIM 128 128 128 0 0 0 0 0 0.1 0.0 255 1 128 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 25 0.0 0.0 0.0 0 0 1.0 35.0 0
|
||||||
|
;
|
||||||
|
GUNSMOKE 64 64 64 0 0 0 0 0 0.15 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 2 0 7 0 -0.002 95 1000 0.0 0.0 0.0 0 0 1.0 60.0 0
|
||||||
|
GUNSMOKE2 255 255 255 0 0 0 0 0 0.05 0.02 255 0 0 255 0 8 0 0 0 0.0 0 0.0 0 0 3 4 -0.001 80 1400 0.05 0.05 0.01 3 0 1.0 60.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
SMOKE 32 32 32 0 0 0 0 0 0.15 0.015 255 5 25 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.01 95 1000 0.05 0.05 0.01 3 0 1.0 150.0 0
|
||||||
|
;SMOKE_SLOWMOTION 32 32 32 0 0 0 0 0 0.15 0.015 255 5 15 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.003 95 1000 0.05 0.05 0.01 3 0 1.0 400.0 0
|
||||||
|
SMOKE_SLOWMOTION 32 32 32 0 0 0 0 0 0.15 0.015 128 5 11 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.003 95 3000 0.05 0.05 0.01 3 0 1.0 150.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;GARAGEPAINT_SPRAY 32 32 32 0 0 0 0 0 0.15 0.015 255 0 5 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 -0.001 95 2000 0.05 0.05 0.01 3 0 1.0 400.0 0
|
||||||
|
GARAGEPAINT_SPRAY 32 32 32 0 0 0 0 0 0.15 0.015 255 0 5 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 -0.0005 95 4000 0.05 0.05 0.01 3 0 1.0 100.0 0
|
||||||
|
SHARD 255 255 255 0 0 0 0 0 0.03 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 96 300 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||||
|
SPLASH 64 64 128 0 0 0 0 0 0.1 0.007 255 1 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||||
|
;BLOOD_SPLASH 24 64 0 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 96 300 0.0 0.0 0.0 0 0 1.0 100.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;CARFLAME 255 74 30 0 0 0 0 0 0.5 0.04 255 2 20 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 0.0 1 1000 0.4 0.0 0.0 0 0 1.0 400.0 64
|
||||||
|
;CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.001 1 2000 0.4 0.01 0.01 0 0 1.0 400.0 64
|
||||||
|
;CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.001 1 2000 0.4 0.01 0.01 0 0 1.0 400.0 64
|
||||||
|
;
|
||||||
|
CARFLAME 255 74 30 0 0 0 0 0 0.8 -0.02 255 0 10 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 1 2000 0.02 0.01 0.01 0 0 1.0 100.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
STEAM 64 64 64 0 0 0 0 0 0.5 0.05 255 1 16 255 0 0 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 85.0 0
|
||||||
|
;
|
||||||
|
;default:
|
||||||
|
;STEAM2 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 128 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 400.0 4
|
||||||
|
STEAM2 255 255 255 0 0 0 0 0 0.5 0.015 255 0 0 192 0 1 0 0 10 0.5 1 0.02 32 0 4 0 -0.002 95 8000 0.01 0.03 0.0 0 0 1.0 85.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;STEAM_NY 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 128 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 400.0 4
|
||||||
|
STEAM_NY 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 96 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 1400 0.01 0.03 0.0 0 0 1.0 85.0 4
|
||||||
|
STEAM_NY_SLOWMOTION 255 255 255 0 0 0 0 0 0.5 0.05 255 0 0 96 2 8 0 0 0 0.0 0 0.0 32 0 4 0 -0.0015 95 1400 0.01 0.03 0.0 0 0 1.0 85.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;ENGINE_STEAM 210 210 210 0 0 0 0 0 0.5 0.05 255 0 0 192 2 16 0 0 0 0.0 0 0.0 32 0 4 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 250.0 4
|
||||||
|
ENGINE_STEAM 210 210 210 0 0 0 0 0 0.5 0.05 255 0 0 192 0 10 0 0 0 0.0 0 0.0 32 0 4 1 -0.005 95 4000 0.03 0.03 0.02 0 0 1.0 85.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;RAINDROP 32 32 32 0 0 0 0 0 0.6 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.025 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
||||||
|
RAINDROP 64 64 64 0 0 0 0 0 0.4 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 3 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
||||||
|
RAINDROP_SMALL 16 16 16 0 0 0 0 0 0.3 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 15.0 1
|
||||||
|
RAIN_SPLASH 32 32 32 0 0 0 0 0 0.08 0.0 255 0 5 255 0 0 0 0 0 0.0 0 0.0 1 0 4 0 0.0 1 500 0.0 0.0 0.0 0 0 1.0 15.0 0
|
||||||
|
RAIN_SPLASH_BIGGROW 128 128 128 0 0 0 0 0 0.5 0.06 255 0 2 255 0 0 0 0 0 0.0 0 0.0 2 1 4 0 0.0 1 5500 0.0 0.0 0.0 0 0 1.0 15.0 0
|
||||||
|
RAIN_SPLASHUP 48 48 48 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 1 0 0.0 1 50 0.0 0.0 0.0 0 0 1.0 15.0 0
|
||||||
|
;
|
||||||
|
WATERSPRAY 64 64 64 0 0 0 0 0 0.2 0.0 255 0 25 255 0 0 0 0 0 0.0 0 0.0 3 0 2 0 0.002 1 800 0.05 0.0 0.01 0 0 1.0 20.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 5 8 255 0 0 0 0 0 0.0 0 0.0 8 0 11 0 0.0 96 15000 0.2 0.0 0.0 3 0 1.0 400.0 0
|
||||||
|
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 5 8 255 0 0 0 0 0 0.0 0 0.0 8 0 11 0 0.0 96 15000 0.8 0.0 0.0 3 0 1.0 400.0 0
|
||||||
|
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 1 4 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 0.0 96 7000 0.2 0.0 0.0 0 0 1.0 400.0 0
|
||||||
|
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 1 4 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 0.0 96 7000 0.8 0.0 0.0 0 0 1.0 400.0 0
|
||||||
|
;
|
||||||
|
;EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 -0.001 96 6000 0.2 0.0 0.0 0 0 1.0 400.0 0
|
||||||
|
;EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 1 0 11 0 -0.001 96 6000 0.8 0.0 0.0 0 0 1.0 400.0 0
|
||||||
|
EXPLOSION_MEDIUM 80 80 80 0 0 0 0 0 0.6 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 6000 0.2 0.0 0.0 0 0 1.0 200.0 0
|
||||||
|
EXPLOSION_LARGE 80 80 80 0 0 0 0 0 1.1 0.04 255 0 3 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 6000 0.8 0.0 0.0 0 0 1.0 200.0 0
|
||||||
|
EXPLOSION_MFAST 80 80 80 0 0 0 0 0 0.6 0.04 255 0 6 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 3500 0.2 0.0 0.0 0 0 1.0 200.0 0
|
||||||
|
EXPLOSION_LFAST 80 80 80 0 0 0 0 0 1.1 0.04 255 0 6 255 0 0 0 0 0 0.0 0 0.0 2 0 5 0 -0.001 96 3500 0.8 0.0 0.0 0 0 1.0 200.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;BOAT_SPLASH 32 64 32 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 2000 0.0 0.0 0.0 0 0 1.0 200.0 0
|
||||||
|
;BOAT_THRUSTJET 24 32 24 0 0 0 0 0 0.5 0.1 255 0 0 255 0 0 0 0 0 0.0 0 0.0 250 0 4 0 0.01 50 1000 0.0 0.0 0.0 0 4 1.0 200.0 8
|
||||||
|
;BOAT_SPLASH 16 32 32 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 2000 0.0 0.0 0.0 0 0 1.0 200.0 0
|
||||||
|
;BOAT_THRUSTJET 8 24 24 0 0 0 0 0 0.5 0.1 255 0 0 255 0 0 0 0 0 0.0 0 0.0 250 0 4 0 0.01 50 1000 0.0 0.0 0.0 0 4 1.0 200.0 8
|
||||||
|
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.25 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.02 1 2000 0.0 0.0 0.0 0 0 1.0 250.0 0
|
||||||
|
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.25 255 0 0 200 0 8 0 0 0 0.0 0 0.0 0 0 0 0 0.04 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 4
|
||||||
|
;CAR_SPLASH 64 64 64 0 0 0 0 0 2.0 0.35 255 0 0 200 0 8 0 0 0 0.0 0 0.0 0 0 0 0 0.05 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 4
|
||||||
|
;CAR_SPLASH 64 64 64 0 0 0 0 0 1.0 0.25 255 0 0 180 0 5 0 0 0 0.0 0 0.0 2 1 3 0 0.05 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 12
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;CAR_SPLASH 64 64 64 0 0 0 0 0 1.0 0.15 255 0 0 180 0 2 0 0 0 0.0 0 0.0 2 0 3 0 0.02 1 2000 0.0 0.0 0.0 0 0 1.0 150.0 12
|
||||||
|
;CAR_SPLASH 48 48 64 0 0 0 0 0 1.0 0.15 96 0 0 255 0 0 0 0 0 0.0 0 0.0 6 0 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 2.0 150.0 288
|
||||||
|
;CAR_SPLASH 48 48 64 0 0 0 0 0 1.0 0.05 96 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 2.0 150.0 288
|
||||||
|
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
||||||
|
CAR_SPLASH 48 48 60 0 0 0 0 0 1.0 0.00 128 1 4 128 0 0 0 0 0 0.0 0 0.0 0 0 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 1.4 150.0 272
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;BOAT_SPLASH 70 70 70 0 0 0 0 0 0.2 0.2 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 0
|
||||||
|
BOAT_SPLASH 64 64 64 0 0 0 0 0 0.2 0.2 255 0 2 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.01 1 1000 0.0 0.0 0.0 0 0 1.0 150.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;BOAT_THRUSTJET 90 90 90 0 0 0 0 0 1.8 0.1 255 0 0 120 0 1 0 0 0 0.0 0 0.0 0 1 4 0 0.01 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||||
|
BOAT_THRUSTJET 90 90 90 0 0 0 0 0 1.4 0.06 255 0 0 96 0 1 0 0 0 0.0 0 0.0 0 1 4 0 0.01 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;BOAT_WAKE 255 255 255 0 0 0 0 0 2.0 0.2 255 0 0 128 0 1 0 0 0 0.0 0 0.0 0 0 0 0 0.03 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||||
|
BOAT_WAKE 255 255 255 0 0 0 0 0 1.5 0.45 255 0 0 192 0 2 0 0 0 0.0 0 0.0 0 0 0 0 0.0 50 1600 0.8 0.4 0.02 0 4 1.0 150.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; A B C D CV B2 C2 D2 FT E F G H I GA HA IA GZA HZA IZA GZR HZR IZR J K L M N O P Q R S T U V CR Z
|
||||||
|
WATER_HYDRANT 64 64 64 0 0 0 0 0 0.8 0.01 255 1 16 255 1 16 0 0 0 0.0 0 0.0 0 0 2 0 0.007 99 500 0.02 0.08 0.0 0 4 1.0 85.0 16
|
||||||
|
WATER_CANNON 64 64 128 0 0 0 0 0 0.03 0.03 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||||
|
EXTINGUISH_STEAM 32 32 32 0 0 0 0 0 0.1 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;PED_SPLASH 32 32 64 0 0 0 0 0 0.1 0.05 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||||
|
PED_SPLASH 48 48 60 0 0 0 0 0 0.1 0.06 96 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 2 0 0.01 1 2000 0.5 0.04 0.0 0 0 1.4 50.0 256
|
||||||
|
;
|
||||||
|
;
|
||||||
|
PEDFOOT_DUST 170 166 150 0 0 0 0 0 0.01 0.015 255 0 0 63 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.0005 1 1000 0.0 0.0 0.0 0 0 1.0 6.0 4
|
||||||
|
;
|
||||||
|
HELI_DUST 17 15 9 0 0 0 0 0 0.2 0.1 255 1 8 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.001 1 1000 0.2 0.05 0.0 0 0 1.0 85.0 0
|
||||||
|
HELI_ATTACK 255 255 128 0 0 0 0 0 0.01 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 500 0.0 0.0 0.0 0 0 0.5 85.0 10
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;ENGINE_SMOKE 16 16 16 0 0 0 0 0 0.5 0.04 255 0 0 63 0 0 0 0 0 0.0 0 0.0 0 0 0 0 -0.005 95 2000 0.01 0.03 0.0 0 0 1.0 150.0 4
|
||||||
|
;ENGINE_SMOKE2 8 8 8 0 0 0 0 0 1.0 0.2 128 2 4 63 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.001 1 1000 0.0 0.0 0.0 0 3 1.0 150.0 4
|
||||||
|
ENGINE_SMOKE 16 16 16 0 0 0 0 0 0.5 0.04 255 0 0 52 0 2 10 0 80 0.0 0 0.0 0 0 5 2 -0.009 95 2000 0.11 0.03 0.01 1 0 1.0 85.0 4
|
||||||
|
ENGINE_SMOKE2 9 9 9 80 0 0 0 0 1.0 0.06 128 0 1 140 0 5 10 0 80 0.0 0 0.0 0 0 0 2 0.002 1 1300 0.0 0.01 0.0 3 3 1.0 85.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
CARFLAME_SMOKE 32 32 32 0 0 0 0 0 0.05 0.01 255 0 0 64 0 2 0 0 0 0.0 0 0.0 0 0 0 0 -0.008 95 2000 0.01 0.03 0.01 0 0 1.0 85.0 4
|
||||||
|
FIREBALL_SMOKE 32 32 32 0 0 0 0 0 0.05 0.03 255 0 0 128 0 2 0 0 0 0.0 0 0.0 0 0 0 0 -0.004 95 2000 0.01 0.03 0.01 0 0 1.0 85.0 4
|
||||||
|
;
|
||||||
|
PAINT_SMOKE 255 0 0 0 0 0 0 0 0.1 0.01 255 1 8 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 95 3000 0.0 0.005 0.0 0 0 1.0 85.0 0
|
||||||
|
TREE_LEAVES 64 64 64 0 0 0 0 0 0.2 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 85.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;CARCOLLISION_DUST 224 224 224 0 0 0 0 0 0.15 0.04 255 0 0 127 1 8 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 2000 0.02 0.02 0.0 0 0 1.0 80.0 4
|
||||||
|
CARCOLLISION_DUST 76 76 76 0 0 0 0 0 0.10 0.02 255 0 0 160 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.0015 90 2000 0.02 0.02 0.0 0 0 1.0 30.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
CAR_DEBRIS 32 32 32 0 0 0 0 0 0.5 0.0 224 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 50.0 4
|
||||||
|
HELI_DEBRIS 32 32 32 0 0 0 0 0 1.5 0.0 224 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.065 90 1500 0.02 0.02 0.0 0 0 1.0 150.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;EXHAUST_FUMES 80 80 80 0 0 0 0 0 0.03 0.03 255 0 0 122 0 4 0 0 0 0.0 0 0.0 2 0 4 0 -0.001 95 1500 0.01 0.03 0.0 0 0 1.0 50.0 4
|
||||||
|
EXHAUST_FUMES 98 98 108 0 0 0 0 0 0.03 0.06 255 0 0 152 0 12 0 0 0 0.0 0 0.0 2 0 4 0 -0.002 96 1000 0.01 0.03 0.0 0 0 1.0 25.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;RUBBER 40 40 40 0 0 0 0 0 0.4 0.005 255 21 20 255 0 0 0 0 0 0.0 0 0.0 3 0 4 0 -0.0005 1 1000 0.02 0.0 0.0 0 0 1.0 400.0 4
|
||||||
|
RUBBER_SMOKE 255 255 255 0 0 0 0 0 0.4 0.005 255 0 0 127 1 8 0 0 0 0.0 0 0.0 3 0 4 0 -0.0005 1 1000 0.02 0.0 0.0 0 0 1.0 50.0 4
|
||||||
|
;BURNINGRUBBER_SMOKE128 128 128 0 0 0 0 0 0.35 0.06 255 0 0 192 1 6 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 4000 0.02 0.02 0.0 0 0 1.0 400.0 4
|
||||||
|
BURNINGRUBBER_SMOKE 128 128 128 0 0 0 0 0 0.35 0.06 255 0 0 128 0 4 0 0 0 0.0 0 0.0 0 0 0 0 -0.002 90 2000 0.02 0.02 0.0 0 0 1.0 50.0 4
|
||||||
|
;
|
||||||
|
;
|
||||||
|
BULLETHIT_SMOKE 192 192 192 0 0 0 0 0 0.15 0.03 70 0 2 255 1 10 0 0 0 0.0 0 0.0 0 0 0 0 -0.001 90 2000 0.04 0.02 0.0 0 0 1.0 150.0 0
|
||||||
|
;
|
||||||
|
;
|
||||||
|
GUNSHELL_FIRST 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 0.0 12292
|
||||||
|
GUNSHELL 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 12.0 4100
|
||||||
|
GUNSHELL_BUMP1 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 1000 0.02 0.02 0.0 0 0 1.0 8.0 4100
|
||||||
|
GUNSHELL_BUMP2 108 108 108 0 0 0 0 0 0.015 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 0 4 0 0.010 90 400 0.02 0.02 0.0 0 0 1.0 8.0 4100
|
||||||
|
;
|
||||||
|
;
|
||||||
|
TEST 255 64 64 0 0 0 0 0 0.2 0.025 255 1 20 255 0 0 0 0 0 0.0 0 0.0 0 0 0 0 0.0 1 3000 0.0 0.0 0.0 0 0 1.0 400.0 128
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;Particles with flag DRAWTOP2D should be placed last and VR (Visibility Range) set to 0!
|
||||||
|
;
|
||||||
|
;BIRD_FRONT 8 8 8 0 0 0 0 0 0.05 0.0 255 0 0 255 2 1 0 0 0 0.0 0 0.0 1 0 3 0 0.0 1 10000 0.0 0.0 0.0 0 0 1.0 0.0 3140
|
||||||
|
BIRD_FRONT 8 8 8 0 0 0 0 0 1.05 0.0 255 0 0 255 2 2 0 0 0 0.0 0 0.0 1 0 3 0 0.0 1 8000 0.0 0.0 0.0 0 0 1.0 0.0 68
|
||||||
|
;
|
||||||
|
RAINDROP_2D 32 32 32 0 0 0 0 0 0.5 0.0 255 0 0 255 0 0 0 0 0 0.0 0 0.0 0 1 0 0 0.0 1 1000 0.0 0.0 0.0 0 0 1.0 0.0 3072
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; below is just backup of above values:
|
||||||
|
;
|
||||||
|
;SPARK 255 128 64 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 300 0.0 0.07 0.0 0 0 1.0 48
|
||||||
|
;SPARK_SMALL 255 255 128 0.005 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.05 0.0 0 0 0.6 40
|
||||||
|
;BLOOD 128 128 128 0.02 0.0 255 0 0 0 0 0 0 0.03 1.0 2000 0.3 0.05 0.0 0 0 1.0 6
|
||||||
|
;BLOOD_SMALL 255 32 32 0.007 0.0 255 0 0 0 0 0 0 0.005 1.0 2000 0.05 0.05 0.0 0 0 1.0 54
|
||||||
|
;BLOOD_SPLAT 128 128 128 0.1 0.0 255 0 0 0 0 0 0 0.0 1.0 200 0.3 0.0 0.0 0 0 1.0 36
|
||||||
|
;BLOOD_SPURT 255 32 32 0.008 0.0 255 0 0 0 0 0 0 0.005 1.0 2000 0.0 0.01 0.0 0 0 2.0 52
|
||||||
|
;DEBRIS 64 64 64 0.5 0.0 255 0 0 0 0 0 0 0.01 0.95 1000 0.2 0.0 0.0 0 0 1.0 4
|
||||||
|
;DEBRIS2 64 64 64 0.04 0.0 255 0 0 0 0 0 5 0.01 0.99 1000 0.03 0.04 0.0 0 0 1.0 38
|
||||||
|
;WATER 64 64 128 0.01 0.0 255 0 0 0 0 0 0 0.0 1.0 2000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;FLAME 255 74 30 0.2 0.0 255 0 0 31 0 5 0 0.0 1.0 100 0.05 0.0 0.0 0 0 1.0 0
|
||||||
|
;FIREBALL 255 74 30 0.1 0.04 255 0 8 31 0 8 0 0.0 0.96 1000 0.1 0.0 0.0 0 0 1.0 0
|
||||||
|
;GUNFLASH 255 255 255 0.1 0.0 255 0 50 50 0 3 0 0.0 1.0 250 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;GUNFLASHSTATIC 255 255 255 0.1 0.0 255 0 128 0 0 0 0 0.0 1.0 25 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;SMOKE 32 32 32 0.15 0.015 255 4 25 31 0 5 0 -0.01 0.95 1000 0.05 0.05 0.01 3 0 1.0 0
|
||||||
|
;SHARD 255 255 255 0.03 0.0 255 0 0 0 0 0 0 0.0 0.96 300 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;SPLASH 64 64 128 0.1 0.007 255 0 10 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;BLOOD_SPLASH 24 64 0 0.1 0.0 255 0 0 0 0 0 0 0.0 0.96 300 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;RUBBER 40 40 40 0.4 0.005 255 1 25 31 0 5 0 0.0 1.0 1000 0.02 0.0 0.0 0 0 1.0 0
|
||||||
|
;CARFLAME 255 74 30 0.5 0.04 255 1 20 31 0 5 0 0.0 1.0 1000 0.4 0.0 0.0 0 0 1.0 64
|
||||||
|
;STEAM 64 64 64 0.5 0.05 255 0 16 31 0 5 0 -0.005 0.95 2000 0.01 0.03 0.0 0 0 1.0 0
|
||||||
|
;RAINDROP 32 32 32 0.6 0.0 255 0 0 0 0 0 0 0.1 1.0 1000 0.0 0.0 0.0 0 0 1.0 1
|
||||||
|
;RAIN_SPLASH 32 32 32 0.08 0.0 255 0 0 1 0 4 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;RAINDROP_SMALL 32 32 32 0.3 0.0 255 0 0 0 0 0 0 0.1 1.0 1000 0.0 0.0 0.0 0 0 1.0 1
|
||||||
|
;EXPLOSION_MEDIUM 80 80 80 0.6 0.04 255 4 8 7 0 11 0 0.0 0.96 30000 0.2 0.0 0.0 3 0 1.0 0
|
||||||
|
;EXPLOSION_LARGE 80 80 80 1.1 0.04 255 4 8 7 0 11 0 0.0 0.96 30000 0.8 0.0 0.0 3 0 1.0 0
|
||||||
|
;BOAT_SPLASH 32 64 32 0.2 0.2 255 0 0 0 0 0 0 0.01 1.0 2000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;BOAT_THRUSTJET 24 32 24 0.5 0.1 255 0 0 250 0 5 0 0.01 0.5 1000 0.0 0.0 0.0 0 4 1.0 8
|
||||||
|
;WATER_HYDRANT 64 64 128 0.4 0.01 255 1 2 20 0 5 0 0.007 0.99 500 0.02 0.05 0.0 0 4 1.0 256
|
||||||
|
;WATER_CANNON 64 64 128 0.03 0.03 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;EXTINGUISH_STEAM 32 32 32 0.1 0.0 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;PED_SPLASH 32 32 64 0.1 0.05 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;HELI_DUST 17 15 9 0.2 0.1 255 0 8 0 0 0 0 -0.001 1.0 1000 0.2 0.05 0.0 0 0 1.0 0
|
||||||
|
;HELI_ATTACK 255 255 128 0.01 0.0 255 0 0 0 0 0 0 0.0 1.0 500 0.0 0.0 0.0 0 0 0.5 10
|
||||||
|
;ENGINE_SMOKE 16 16 16 0.5 0.04 255 0 0 0 0 0 0 -0.005 0.95 2000 0.01 0.03 0.0 0 0 1.0 4
|
||||||
|
;ENGINE_SMOKE2 4 4 4 1.0 0.2 255 1 4 0 0 0 0 0.001 1.0 1000 0.0 0.0 0.0 0 3 1.0 4
|
||||||
|
;PAINT_SMOKE 255 0 0 0.1 0.01 255 0 8 0 0 0 0 0.0 0.95 3000 0.0 0.005 0.0 0 0 1.0 0
|
||||||
|
;TREE_LEAVES 64 64 64 0.2 0.0 255 0 0 0 0 0 0 0.0 1.0 1000 0.0 0.0 0.0 0 0 1.0 0
|
||||||
|
;TEST 255 64 64 0.2 0.05 255 0 16 0 0 0 0 0.0 1.0 3000 0.0 0.0 0.0 0 0 1.0 128
|
||||||
|
;
|
||||||
|
;
|
||||||
|
;the end
|
||||||
Binary file not shown.
BIN
gamefiles/data/main_d.scm
Normal file
BIN
gamefiles/data/main_d.scm
Normal file
Binary file not shown.
BIN
gamefiles/data/main_freeroam.scm
Normal file
BIN
gamefiles/data/main_freeroam.scm
Normal file
Binary file not shown.
BIN
gamefiles/models/fonts_j.txd
Normal file
BIN
gamefiles/models/fonts_j.txd
Normal file
Binary file not shown.
BIN
gamefiles/models/fonts_p.txd
Normal file
BIN
gamefiles/models/fonts_p.txd
Normal file
Binary file not shown.
BIN
gamefiles/models/fonts_r.txd
Normal file
BIN
gamefiles/models/fonts_r.txd
Normal file
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.
BIN
gamefiles/models/menu.txd
Normal file
BIN
gamefiles/models/menu.txd
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,104 +1,104 @@
|
|||||||
# Fresnel RO Table
|
# Fresnal RO Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # Midnight
|
0.400000 0.400000 0.400000 0.150000 # Midnight
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 1am
|
0.400000 0.400000 0.400000 0.150000 # 1am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 2am
|
0.400000 0.400000 0.400000 0.150000 # 2am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 3am
|
0.400000 0.400000 0.400000 0.150000 # 3am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 4am
|
0.400000 0.400000 0.400000 0.150000 # 4am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 5am
|
0.400000 0.400000 0.400000 0.150000 # 5am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 6am
|
0.400000 0.400000 0.400000 0.150000 # 6am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 7am
|
0.400000 0.400000 0.400000 0.150000 # 7am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 8am
|
0.400000 0.400000 0.400000 0.150000 # 8am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 9am
|
0.400000 0.400000 0.400000 0.150000 # 9am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 10am
|
0.400000 0.400000 0.400000 0.150000 # 10am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 11am
|
0.400000 0.400000 0.400000 0.150000 # 11am
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # Midday
|
0.400000 0.400000 0.400000 0.150000 # Midday
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 1pm
|
0.400000 0.400000 0.400000 0.150000 # 1pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 2pm
|
0.400000 0.400000 0.400000 0.150000 # 2pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 3pm
|
0.400000 0.400000 0.400000 0.150000 # 3pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 4pm
|
0.400000 0.400000 0.400000 0.150000 # 4pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 5pm
|
0.400000 0.400000 0.400000 0.150000 # 5pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 6pm
|
0.400000 0.400000 0.400000 0.150000 # 6pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 7pm
|
0.400000 0.400000 0.400000 0.150000 # 7pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 8pm
|
0.400000 0.400000 0.400000 0.150000 # 8pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 9pm
|
0.400000 0.400000 0.400000 0.150000 # 9pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 10pm
|
0.400000 0.400000 0.400000 0.150000 # 10pm
|
||||||
0.4 0.4 0.4 0.4 0.4 0.4 0.4 # 11pm
|
0.400000 0.400000 0.400000 0.150000 # 11pm
|
||||||
# Specular Power Table (ther higher, the tighter the highlite)
|
# Specular Power Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
25 15 70 10 15 15 18 # Midnight
|
128.000000 80.000000 30.000000 128.000000 # Midnight
|
||||||
25 15 70 10 15 15 18 # 1am
|
128.000000 80.000000 30.000000 128.000000 # 1am
|
||||||
25 15 70 10 15 15 18 # 2am
|
128.000000 80.000000 30.000000 128.000000 # 2am
|
||||||
25 15 70 10 15 15 18 # 3am
|
128.000000 80.000000 30.000000 128.000000 # 3am
|
||||||
25 15 70 10 15 15 18 # 4am
|
128.000000 80.000000 30.000000 128.000000 # 4am
|
||||||
25 15 70 10 15 15 18 # 5am
|
80.000000 60.000000 30.000000 128.000000 # 5am
|
||||||
25 15 70 10 15 15 18 # 6am
|
80.000000 60.000000 30.000000 128.000000 # 6am
|
||||||
25 15 70 10 15 15 18 # 7am
|
80.000000 60.000000 30.000000 128.000000 # 7am
|
||||||
25 15 70 10 15 15 18 # 8am
|
80.000000 60.000000 30.000000 128.000000 # 8am
|
||||||
25 15 70 10 15 15 18 # 9am
|
80.000000 60.000000 30.000000 128.000000 # 9am
|
||||||
25 15 70 10 15 15 18 # 10am
|
80.000000 60.000000 30.000000 128.000000 # 10am
|
||||||
25 15 70 10 15 15 18 # 11am
|
80.000000 60.000000 30.000000 128.000000 # 11am
|
||||||
25 15 70 10 15 15 18 # Midday
|
80.000000 60.000000 30.000000 128.000000 # Midday
|
||||||
25 15 70 10 15 15 18 # 1pm
|
80.000000 60.000000 30.000000 128.000000 # 1pm
|
||||||
25 15 70 10 15 15 18 # 2pm
|
80.000000 60.000000 30.000000 128.000000 # 2pm
|
||||||
25 15 70 10 15 15 18 # 3pm
|
80.000000 60.000000 30.000000 128.000000 # 3pm
|
||||||
25 15 70 10 15 15 18 # 4pm
|
80.000000 60.000000 30.000000 128.000000 # 4pm
|
||||||
25 15 70 10 15 15 18 # 5pm
|
128.000000 80.000000 30.000000 128.000000 # 5pm
|
||||||
25 15 70 10 15 15 18 # 6pm
|
128.000000 80.000000 30.000000 128.000000 # 6pm
|
||||||
25 15 70 10 15 15 18 # 7pm
|
128.000000 80.000000 30.000000 128.000000 # 7pm
|
||||||
25 15 70 10 15 15 18 # 8pm
|
128.000000 80.000000 30.000000 128.000000 # 8pm
|
||||||
25 15 70 10 15 15 18 # 9pm
|
128.000000 80.000000 30.000000 128.000000 # 9pm
|
||||||
25 15 70 10 15 15 18 # 10pm
|
128.000000 80.000000 30.000000 128.000000 # 10pm
|
||||||
25 15 70 10 15 15 18 # 11pm
|
128.000000 80.000000 30.000000 128.000000 # 11pm
|
||||||
# Diffuse Colour Modifier Table (Red,Green,Blue,Amount)
|
# Diffuse Colour Modifier Table (Red,Green,Blue,Amount)
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midnight
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midnight
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11am
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11am
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midday
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # Midday
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 1pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 2pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 3pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 4pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 5pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 6pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 7pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 8pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 9pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 10pm
|
||||||
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11pm
|
0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 0, 0, 0, 0 # 11pm
|
||||||
# Specular Colour Table (Red,Green,Blue,Ignored)
|
# Specular Colour Table (Red,Green,Blue,Amount)
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # Midnight
|
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # Midnight
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 1am
|
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 1am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 2am
|
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 2am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 3am
|
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 3am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 4am
|
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 4am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 5am
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 5am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 6am
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 6am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 7am
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 7am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 8am
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 8am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 9am
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 9am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 10am
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 10am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 11am
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 11am
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # Midday
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # Midday
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 1pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 1pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 2pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 2pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 3pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 3pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 4pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 4pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 5pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 5pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 6pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 6pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 7pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 7pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 8pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 8pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 9pm
|
178, 178, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 9pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 10pm
|
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 10pm
|
||||||
178, 178, 178, 100 140, 140, 150, 50 220, 220, 220, 75 255, 255, 255, 20 178, 178, 178, 100 178, 178, 178, 75 178, 178, 178, 100 # 11pm
|
81, 150, 178, 100 178, 178, 178, 50 178, 178, 178, 75 178, 178, 178, 20 # 11pm
|
||||||
|
|||||||
Binary file not shown.
@@ -1,130 +1,130 @@
|
|||||||
# Ramp Start Table
|
# Ramp Start Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # Midnight
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # Midnight
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 1am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 1am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 2am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 2am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 3am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 3am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 4am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 4am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 5am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 5am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 6am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 6am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 7am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 7am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 8am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 8am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 9am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 9am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 10am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 10am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 11am
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 11am
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # Midday
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # Midday
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 1pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 1pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 2pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 2pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 3pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 3pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 4pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 4pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 5pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 5pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 6pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 6pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 7pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 7pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 8pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 8pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 9pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 9pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 10pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 10pm
|
||||||
0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 0, 0, 0, 255 # 11pm
|
60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 60, 55, 53, 100 # 11pm
|
||||||
# Ramp End Table
|
# Ramp End Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # Midnight
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # Midnight
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 1am
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 1am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 2am
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 2am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 3am
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 3am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 4am
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 4am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 5am
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 5am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 6am
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 6am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 7am
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 7am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 8am
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 8am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 9am
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 9am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 10am
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 10am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 11am
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 11am
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # Midday
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # Midday
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 1pm
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 1pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 2pm
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 2pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 3pm
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 3pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 4pm
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 4pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 5pm
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 5pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 6pm
|
255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 255, 230, 224, 100 # 6pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 7pm
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 7pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 8pm
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 8pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 9pm
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 9pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 10pm
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 10pm
|
||||||
255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 255, 255, 255, 255 # 11pm
|
190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 190, 171, 167, 100 # 11pm
|
||||||
# Offset Table
|
# Offset Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # Midnight
|
0 0 0 0 # Midnight
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 1am
|
0 0 0 0 # 1am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 2am
|
0 0 0 0 # 2am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 3am
|
0 0 0 0 # 3am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 4am
|
0 0 0 0 # 4am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 5am
|
0 0 0 0 # 5am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 6am
|
0 0 0 0 # 6am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 7am
|
0 0 0 0 # 7am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 8am
|
0 0 0 0 # 8am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 9am
|
0 0 0 0 # 9am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 10am
|
0 0 0 0 # 10am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 11am
|
0 0 0 0 # 11am
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # Midday
|
0 0 0 0 # Midday
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 1pm
|
0 0 0 0 # 1pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 2pm
|
0 0 0 0 # 2pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 3pm
|
0 0 0 0 # 3pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 4pm
|
0 0 0 0 # 4pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 5pm
|
0 0 0 0 # 5pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 6pm
|
0 0 0 0 # 6pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 7pm
|
0 0 0 0 # 7pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 8pm
|
0 0 0 0 # 8pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 9pm
|
0 0 0 0 # 9pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 10pm
|
0 0 0 0 # 10pm
|
||||||
0.5 0.5 0.5 0.5 0.5 0.5 0.5 # 11pm
|
0 0 0 0 # 11pm
|
||||||
# Scale Table (the lentgh of the light band?)
|
# Scale Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # Midnight
|
1.5 1.5 1.0 1.0 # Midnight
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 1am
|
1.5 1.5 1.0 1.0 # 1am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 2am
|
1.5 1.5 1.0 1.0 # 2am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 3am
|
1.5 1.5 1.5 1.5 # 3am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 4am
|
2.0 2.0 2.0 2.0 # 4am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 5am
|
2.0 2.0 2.0 2.0 # 5am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 6am
|
2.0 2.0 2.0 2.0 # 6am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 7am
|
2.5 2.5 2.0 2.0 # 7am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 8am
|
2.5 2.5 2.0 2.0 # 8am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 9am
|
2.5 2.5 2.0 2.0 # 9am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 10am
|
2.5 2.5 2.0 2.0 # 10am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 11am
|
2.5 2.5 2.0 2.0 # 11am
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # Midday
|
2.5 2.5 2.0 2.0 # Midday
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 1pm
|
2.5 2.5 2.0 2.0 # 1pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 2pm
|
2.5 2.5 2.0 2.0 # 2pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 3pm
|
2.5 2.5 2.0 2.0 # 3pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 4pm
|
2.5 2.5 2.0 2.0 # 4pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 5pm
|
2.0 2.0 2.0 2.0 # 5pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 6pm
|
2.0 2.0 2.0 2.0 # 6pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 7pm
|
2.0 2.0 2.0 2.0 # 7pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 8pm
|
1.5 1.5 1.5 1.5 # 8pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 9pm
|
1.5 1.5 1.0 1.0 # 9pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 10pm
|
1.5 1.5 1.0 1.0 # 10pm
|
||||||
1 0.5 1.5 0.5 1.5 1.5 1.5 # 11pm
|
1.5 1.5 1.0 1.0 # 11pm
|
||||||
# Scaling Table (how strong the overall effect is)
|
# Scaling Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS time multiplier
|
# SUNNY CLOUDY RAINY, FOGGY
|
||||||
1 0.3 0.5 0.1 1 1 1 # Midnight 0.5
|
0.2 0.2 0.1 0.1 # Midnight
|
||||||
1 0.3 0.5 0.1 1 1 1 # 1am 0.5
|
0.2 0.2 0.1 0.1 # 1am
|
||||||
1 0.3 0.5 0.1 1 1 1 # 2am 0.5
|
0.7 0.7 0.2 0.2 # 6am
|
||||||
1 0.3 0.5 0.1 1 1 1 # 3am 0.5
|
0.7 0.7 0.2 0.2 # 3am
|
||||||
1 0.3 0.5 0.1 1 1 1 # 4am 0.5
|
0.7 0.7 0.2 0.2 # 4am
|
||||||
1 0.3 0.5 0.1 1 1 1 # 5am 0.5
|
2.0 2.0 0.3 0.3 # 5am
|
||||||
1 0.3 0.5 0.1 1 1 1 # 6am 0.5
|
3.0 3.0 0.3 0.3 # 6am
|
||||||
1.2 0.36 0.6 0.12 1.2 1.2 1.2 # 7am 0.6
|
4.0 4.0 0.3 0.3 # 7am
|
||||||
1.4 0.42 0.7 0.14 1.4 1.4 1.4 # 8am 0.7
|
5.0 5.0 0.3 0.3 # 8am
|
||||||
1.6 0.48 0.8 0.16 1.6 1.6 1.6 # 9am 0.8
|
6.0 6.0 1.3 1.3 # 9am
|
||||||
1.8 0.54 0.9 0.18 1.8 1.8 1.8 # 10am 0.9
|
6.0 6.0 2.0 2.0 # 10am
|
||||||
2 0.6 1 0.2 2 2 2 # 11am 1
|
6.0 6.0 2.0 2.0 # 11am
|
||||||
2 0.6 1 0.2 2 2 2 # Midday tweaking value
|
6.0 6.0 2.0 2.0 # Midday
|
||||||
2 0.6 1 0.2 2 2 2 # 1pm 1
|
6.0 6.0 2.0 2.0 # 1pm
|
||||||
2 0.6 1 0.2 2 2 2 # 2pm 1
|
6.0 6.0 1.3 1.3 # 6pm
|
||||||
2.2 0.66 1.1 0.22 2.2 2.2 2.2 # 3pm 1.1
|
5.0 5.0 0.3 0.3 # 3pm
|
||||||
2.2 0.66 1.1 0.22 2.2 2.2 2.2 # 4pm 1.1
|
4.0 4.0 0.3 0.3 # 4pm
|
||||||
2.4 0.72 1.2 0.24 2.4 2.4 2.4 # 5pm 1.2
|
3.0 3.0 0.3 0.3 # 5pm
|
||||||
2.4 0.72 1.2 0.24 2.4 2.4 2.4 # 6pm 1.2
|
2.0 2.0 0.3 0.3 # 6pm
|
||||||
2.2 0.66 1.1 0.22 2.2 2.2 2.2 # 7pm 1.1
|
0.7 0.7 0.2 0.2 # 7pm
|
||||||
2 0.6 1 0.2 2 2 2 # 8pm 1
|
0.7 0.7 0.2 0.2 # 8pm
|
||||||
1.6 0.48 0.8 0.16 1.6 1.6 1.6 # 9pm 0.8
|
0.7 0.7 0.2 0.2 # 9pm
|
||||||
1.2 0.36 0.6 0.12 1.2 1.2 1.2 # 10pm 0.6
|
0.2 0.2 0.1 0.1 # 10pm
|
||||||
1 0.3 0.5 0.1 1 1 1 # 11pm 0.5
|
0.2 0.2 0.1 0.1 # 11pm
|
||||||
|
|||||||
@@ -1,30 +1,26 @@
|
|||||||
# LM blend Table
|
# LM blend Table
|
||||||
# SUNNY CLOUDY RAINY, FOGGY EXTRASUNNY HURRICANE EXTRACOLOURS basic daytime ramp
|
# SUNNY CLOUDY RAINY FOGGY
|
||||||
0.45 0.6 0.75 0.525 0.45 0.75 0.375 # Midnight 0.75 0.1
|
0.700000 0.700000 0.700000 0.550000 # Midnight
|
||||||
0.48 0.64 0.8 0.56 0.48 0.8 0.4 # 1am 0.8 0.2
|
0.700000 0.700000 0.700000 0.550000 # 1am
|
||||||
0.51 0.68 0.85 0.595 0.51 0.85 0.425 # 2am 0.85 0.3
|
0.700000 0.700000 0.700000 0.550000 # 2am
|
||||||
0.54 0.72 0.9 0.63 0.54 0.9 0.45 # 3am 0.9 0.4
|
0.700000 0.700000 0.700000 0.550000 # 3am
|
||||||
0.57 0.76 0.95 0.665 0.57 0.95 0.475 # 4am 0.95 0.6
|
0.700000 0.700000 0.700000 0.550000 # 4am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 5am 1 0.8
|
0.750000 0.750000 0.700000 0.600000 # 5am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 6am 1 1
|
0.800000 0.800000 0.750000 0.600000 # 6am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 7am 1 1
|
0.850000 0.850000 0.800000 0.650000 # 7am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 8am 1 1
|
0.900000 0.900000 0.800000 0.700000 # 8am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 9am 1 1
|
0.950000 0.900000 0.800000 0.700000 # 9am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 10am 1 1
|
1.000000 0.900000 0.800000 0.700000 # 10am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 11am 1 1
|
1.000000 0.900000 0.800000 0.700000 # 11am
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # Midday 1 tweak here
|
1.000000 0.900000 0.800000 0.700000 # Midday
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 1pm 1 1
|
1.000000 0.900000 0.800000 0.700000 # 1pm
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 2pm 1 1
|
1.000000 0.900000 0.800000 0.700000 # 2pm
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 3pm 1 1
|
0.950000 0.900000 0.800000 0.700000 # 3pm
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 4pm 1 1
|
0.900000 0.900000 0.800000 0.700000 # 4pm
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 5pm 1 1
|
0.850000 0.850000 0.800000 0.650000 # 5pm
|
||||||
0.6 0.8 1 0.7 0.6 1 0.5 # 6pm 1 0.8
|
0.800000 0.800000 0.750000 0.600000 # 6pm
|
||||||
0.57 0.76 0.95 0.665 0.57 0.95 0.475 # 7pm 0.95 0.6
|
0.750000 0.750000 0.700000 0.600000 # 7pm
|
||||||
0.54 0.72 0.9 0.63 0.54 0.9 0.45 # 8pm 0.9 0.5
|
0.700000 0.700000 0.700000 0.550000 # 8pm
|
||||||
0.51 0.68 0.85 0.595 0.51 0.85 0.425 # 9pm 0.85 0.4
|
0.700000 0.700000 0.700000 0.550000 # 9pm
|
||||||
0.48 0.64 0.8 0.56 0.48 0.8 0.4 # 10pm 0.8 0.3
|
0.700000 0.700000 0.700000 0.550000 # 10pm
|
||||||
0.45 0.6 0.75 0.525 0.45 0.75 0.375 # 11pm 0.75 0.2
|
0.700000 0.700000 0.700000 0.550000 # 11pm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
logo.png
BIN
logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 24 KiB |
94
logo.svg
94
logo.svg
@@ -7,51 +7,18 @@
|
|||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
sodipodi:docname="reVC.svg"
|
sodipodi:docname="re3_final.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07, custom)"
|
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||||
id="svg8"
|
id="svg8"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
viewBox="0 0 270.93331 270.93334"
|
viewBox="0 0 270.93331 270.93334"
|
||||||
height="1024"
|
height="1024"
|
||||||
width="1024"
|
width="1024"
|
||||||
inkscape:export-filename="/home/hazelnot/Design/re3_final.png"
|
inkscape:export-filename="/home/hazelnot/Design/re3_red.png"
|
||||||
inkscape:export-xdpi="96"
|
inkscape:export-xdpi="96"
|
||||||
inkscape:export-ydpi="96">
|
inkscape:export-ydpi="96">
|
||||||
<defs
|
<defs
|
||||||
id="defs2">
|
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
|
<sodipodi:namedview
|
||||||
inkscape:window-maximized="1"
|
inkscape:window-maximized="1"
|
||||||
inkscape:window-y="0"
|
inkscape:window-y="0"
|
||||||
@@ -63,10 +30,10 @@
|
|||||||
inkscape:pagecheckerboard="false"
|
inkscape:pagecheckerboard="false"
|
||||||
showgrid="false"
|
showgrid="false"
|
||||||
inkscape:document-rotation="0"
|
inkscape:document-rotation="0"
|
||||||
inkscape:current-layer="svg8"
|
inkscape:current-layer="g837"
|
||||||
inkscape:document-units="mm"
|
inkscape:document-units="mm"
|
||||||
inkscape:cy="624.20389"
|
inkscape:cy="544.84615"
|
||||||
inkscape:cx="108.63858"
|
inkscape:cx="415.73725"
|
||||||
inkscape:zoom="0.7"
|
inkscape:zoom="0.7"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:pageopacity="0"
|
inkscape:pageopacity="0"
|
||||||
@@ -94,11 +61,10 @@
|
|||||||
</metadata>
|
</metadata>
|
||||||
<g
|
<g
|
||||||
id="g837"
|
id="g837"
|
||||||
transform="matrix(2.1130708,0,0,2.1130708,14.956432,63.50059)"
|
transform="matrix(2.1130708,0,0,2.1130708,14.956432,63.50059)">
|
||||||
style="display:none">
|
|
||||||
<path
|
<path
|
||||||
id="path1450"
|
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"
|
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.836;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"
|
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" />
|
inkscape:label="Border" />
|
||||||
<g
|
<g
|
||||||
@@ -113,50 +79,10 @@
|
|||||||
transform="translate(-2.6458322)"
|
transform="translate(-2.6458322)"
|
||||||
inkscape:label="re" />
|
inkscape:label="re" />
|
||||||
<path
|
<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"
|
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.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 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"
|
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"
|
id="path1458"
|
||||||
inkscape:label="3" />
|
inkscape:label="3" />
|
||||||
</g>
|
</g>
|
||||||
</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>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 9.2 KiB |
30
premake5.lua
30
premake5.lua
@@ -63,10 +63,10 @@ function getarch(a)
|
|||||||
return a
|
return a
|
||||||
end
|
end
|
||||||
|
|
||||||
workspace "reVC"
|
workspace "re3"
|
||||||
language "C++"
|
language "C++"
|
||||||
configurations { "Debug", "Release", "Vanilla" }
|
configurations { "Debug", "Release", "Vanilla" }
|
||||||
startproject "reVC"
|
startproject "re3"
|
||||||
location "build"
|
location "build"
|
||||||
symbols "Full"
|
symbols "Full"
|
||||||
staticruntime "off"
|
staticruntime "off"
|
||||||
@@ -78,10 +78,10 @@ workspace "reVC"
|
|||||||
|
|
||||||
filter { "system:windows" }
|
filter { "system:windows" }
|
||||||
platforms {
|
platforms {
|
||||||
"win-x86-RW34_d3d8-mss",
|
"win-x86-RW33_d3d8-mss",
|
||||||
"win-x86-librw_d3d9-mss",
|
"win-x86-librw_d3d9-mss",
|
||||||
"win-x86-librw_gl3_glfw-mss",
|
"win-x86-librw_gl3_glfw-mss",
|
||||||
"win-x86-RW34_d3d8-oal",
|
"win-x86-RW33_d3d8-oal",
|
||||||
"win-x86-librw_d3d9-oal",
|
"win-x86-librw_d3d9-oal",
|
||||||
"win-x86-librw_gl3_glfw-oal",
|
"win-x86-librw_gl3_glfw-oal",
|
||||||
"win-amd64-librw_d3d9-oal",
|
"win-amd64-librw_d3d9-oal",
|
||||||
@@ -103,7 +103,7 @@ workspace "reVC"
|
|||||||
"bsd-arm-librw_gl3_glfw-oal",
|
"bsd-arm-librw_gl3_glfw-oal",
|
||||||
"bsd-arm64-librw_gl3_glfw-oal"
|
"bsd-arm64-librw_gl3_glfw-oal"
|
||||||
}
|
}
|
||||||
|
|
||||||
filter { "system:macosx" }
|
filter { "system:macosx" }
|
||||||
platforms {
|
platforms {
|
||||||
"macosx-arm64-librw_gl3_glfw-oal",
|
"macosx-arm64-librw_gl3_glfw-oal",
|
||||||
@@ -143,7 +143,7 @@ workspace "reVC"
|
|||||||
|
|
||||||
filter { "platforms:*arm*" }
|
filter { "platforms:*arm*" }
|
||||||
architecture "ARM"
|
architecture "ARM"
|
||||||
|
|
||||||
filter { "platforms:macosx-arm64-*" }
|
filter { "platforms:macosx-arm64-*" }
|
||||||
buildoptions { "-target", "arm64-apple-macos11", "-std=gnu++14" }
|
buildoptions { "-target", "arm64-apple-macos11", "-std=gnu++14" }
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ project "librw"
|
|||||||
filter "platforms:*gl3_glfw*"
|
filter "platforms:*gl3_glfw*"
|
||||||
staticruntime "off"
|
staticruntime "off"
|
||||||
|
|
||||||
filter "platforms:*RW34*"
|
filter "platforms:*RW33*"
|
||||||
flags { "ExcludeFromBuild" }
|
flags { "ExcludeFromBuild" }
|
||||||
filter {}
|
filter {}
|
||||||
end
|
end
|
||||||
@@ -231,9 +231,9 @@ local function addSrcFiles( prefix )
|
|||||||
return prefix .. "/*cpp", prefix .. "/*.h", prefix .. "/*.c", prefix .. "/*.ico", prefix .. "/*.rc"
|
return prefix .. "/*cpp", prefix .. "/*.h", prefix .. "/*.c", prefix .. "/*.ico", prefix .. "/*.rc"
|
||||||
end
|
end
|
||||||
|
|
||||||
project "reVC"
|
project "re3"
|
||||||
kind "WindowedApp"
|
kind "WindowedApp"
|
||||||
targetname "reVC"
|
targetname "re3"
|
||||||
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
|
targetdir "bin/%{cfg.platform}/%{cfg.buildcfg}"
|
||||||
|
|
||||||
if(_OPTIONS["with-librw"]) then
|
if(_OPTIONS["with-librw"]) then
|
||||||
@@ -311,10 +311,10 @@ project "reVC"
|
|||||||
|
|
||||||
filter "platforms:*oal"
|
filter "platforms:*oal"
|
||||||
defines { "AUDIO_OAL" }
|
defines { "AUDIO_OAL" }
|
||||||
|
|
||||||
filter {}
|
filter {}
|
||||||
if(os.getenv("GTA_VC_RE_DIR")) then
|
if(os.getenv("GTA_III_RE_DIR")) then
|
||||||
setpaths(os.getenv("GTA_VC_RE_DIR") .. "/", "%(cfg.buildtarget.name)")
|
setpaths(os.getenv("GTA_III_RE_DIR") .. "/", "%(cfg.buildtarget.name)")
|
||||||
end
|
end
|
||||||
|
|
||||||
filter "platforms:win*"
|
filter "platforms:win*"
|
||||||
@@ -329,7 +329,7 @@ project "reVC"
|
|||||||
staticruntime "on"
|
staticruntime "on"
|
||||||
end
|
end
|
||||||
prebuildcommands { '"%{prj.location}..\\printHash.bat" "%{prj.location}..\\src\\extras\\GitSHA1.cpp"' }
|
prebuildcommands { '"%{prj.location}..\\printHash.bat" "%{prj.location}..\\src\\extras\\GitSHA1.cpp"' }
|
||||||
|
|
||||||
filter "platforms:not win*"
|
filter "platforms:not win*"
|
||||||
prebuildcommands { '"%{prj.location}/../printHash.sh" "%{prj.location}/../src/extras/GitSHA1.cpp"' }
|
prebuildcommands { '"%{prj.location}/../printHash.sh" "%{prj.location}/../src/extras/GitSHA1.cpp"' }
|
||||||
|
|
||||||
@@ -369,10 +369,10 @@ project "reVC"
|
|||||||
links { "opusfile" }
|
links { "opusfile" }
|
||||||
end
|
end
|
||||||
|
|
||||||
filter "platforms:*RW34*"
|
filter "platforms:*RW33*"
|
||||||
includedirs { "sdk/rwsdk/include/d3d8" }
|
includedirs { "sdk/rwsdk/include/d3d8" }
|
||||||
libdirs { "sdk/rwsdk/lib/d3d8/release" }
|
libdirs { "sdk/rwsdk/lib/d3d8/release" }
|
||||||
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtanim", "rtcharse", "rpanisot" }
|
links { "rwcore", "rpworld", "rpmatfx", "rpskin", "rphanim", "rtbmp", "rtquat", "rtcharse", "rpanisot" }
|
||||||
defines { "RWLIBS" }
|
defines { "RWLIBS" }
|
||||||
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"
|
linkoptions "/SECTION:_rwcseg,ER!W /MERGE:_rwcseg=.text"
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ target_compile_definitions(${EXECUTABLE}
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
$<IF:$<CONFIG:DEBUG>,DEBUG,NDEBUG>
|
$<IF:$<CONFIG:DEBUG>,DEBUG,NDEBUG>
|
||||||
LIBRW
|
LIBRW
|
||||||
CMAKE_NO_AUTOLINK
|
${PROJECT}_NO_AUTOLINK
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LIBRW_PLATFORM_D3D9)
|
if(LIBRW_PLATFORM_D3D9)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "RwHelper.h"
|
#include "RwHelper.h"
|
||||||
#include "ModelIndices.h"
|
|
||||||
#include "ModelInfo.h"
|
#include "ModelInfo.h"
|
||||||
#include "AnimManager.h"
|
#include "AnimManager.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
@@ -21,11 +20,8 @@
|
|||||||
|
|
||||||
CAnimBlendAssocGroup::CAnimBlendAssocGroup(void)
|
CAnimBlendAssocGroup::CAnimBlendAssocGroup(void)
|
||||||
{
|
{
|
||||||
animBlock = nil;
|
|
||||||
assocList = nil;
|
assocList = nil;
|
||||||
numAssociations = 0;
|
numAssociations = 0;
|
||||||
firstAnimId = 0;
|
|
||||||
groupId = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CAnimBlendAssocGroup::~CAnimBlendAssocGroup(void)
|
CAnimBlendAssocGroup::~CAnimBlendAssocGroup(void)
|
||||||
@@ -46,7 +42,7 @@ CAnimBlendAssocGroup::DestroyAssociations(void)
|
|||||||
CAnimBlendAssociation*
|
CAnimBlendAssociation*
|
||||||
CAnimBlendAssocGroup::GetAnimation(uint32 id)
|
CAnimBlendAssocGroup::GetAnimation(uint32 id)
|
||||||
{
|
{
|
||||||
return &assocList[id - firstAnimId];
|
return &assocList[id];
|
||||||
}
|
}
|
||||||
|
|
||||||
CAnimBlendAssociation*
|
CAnimBlendAssociation*
|
||||||
@@ -56,7 +52,6 @@ CAnimBlendAssocGroup::GetAnimation(const char *name)
|
|||||||
for(i = 0; i < numAssociations; i++)
|
for(i = 0; i < numAssociations; i++)
|
||||||
if(!CGeneral::faststricmp(assocList[i].hierarchy->name, name))
|
if(!CGeneral::faststricmp(assocList[i].hierarchy->name, name))
|
||||||
return &assocList[i];
|
return &assocList[i];
|
||||||
debug("\n\nCan't find the fucking animation %s\n\n\n", name);
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +101,7 @@ strcmpIgnoringDigits(const char *s1, const char *s2)
|
|||||||
c2 = __ascii_toupper(c2);
|
c2 = __ascii_toupper(c2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(c1 && c2 && c1 != c2)
|
if(c1 != c2)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,15 +111,6 @@ GetModelFromName(const char *name)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CBaseModelInfo *mi;
|
CBaseModelInfo *mi;
|
||||||
char playername[32];
|
|
||||||
|
|
||||||
if(strncasecmp(name, "CSplay", 6) == 0 &&
|
|
||||||
strncasecmp(CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName(), "ig", 2) == 0){
|
|
||||||
strcpy(playername, CModelInfo::GetModelInfo(MI_PLAYER)->GetModelName());
|
|
||||||
playername[0] = 'C';
|
|
||||||
playername[1] = 'S';
|
|
||||||
name = playername;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i = 0; i < MODELINFOSIZE; i++){
|
for(i = 0; i < MODELINFOSIZE; i++){
|
||||||
mi = CModelInfo::GetModelInfo(i);
|
mi = CModelInfo::GetModelInfo(i);
|
||||||
@@ -141,7 +127,8 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
|
|||||||
int i;
|
int i;
|
||||||
CAnimBlock *animBlock;
|
CAnimBlock *animBlock;
|
||||||
|
|
||||||
DestroyAssociations();
|
if(assocList)
|
||||||
|
DestroyAssociations();
|
||||||
|
|
||||||
animBlock = CAnimManager::GetAnimationBlock(name);
|
animBlock = CAnimManager::GetAnimationBlock(name);
|
||||||
assocList = new CAnimBlendAssociation[animBlock->numAnims];
|
assocList = new CAnimBlendAssociation[animBlock->numAnims];
|
||||||
@@ -150,18 +137,17 @@ CAnimBlendAssocGroup::CreateAssociations(const char *name)
|
|||||||
for(i = 0; i < animBlock->numAnims; i++){
|
for(i = 0; i < animBlock->numAnims; i++){
|
||||||
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
CAnimBlendHierarchy *anim = CAnimManager::GetAnimation(animBlock->firstIndex + i);
|
||||||
CBaseModelInfo *model = GetModelFromName(anim->name);
|
CBaseModelInfo *model = GetModelFromName(anim->name);
|
||||||
if(model){
|
assert(model);
|
||||||
debug("Associated anim %s with model %s\n", anim->name, model->GetModelName());
|
printf("Associated anim %s with model %s\n", anim->name, model->GetModelName());
|
||||||
RpClump *clump = (RpClump*)model->CreateInstance();
|
RpClump *clump = (RpClump*)model->CreateInstance();
|
||||||
RpAnimBlendClumpInit(clump);
|
#ifdef PED_SKIN
|
||||||
assocList[i].Init(clump, anim);
|
if(IsClumpSkinned(clump))
|
||||||
if(IsClumpSkinned(clump))
|
RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil);
|
||||||
RpClumpForAllAtomics(clump, AtomicRemoveAnimFromSkinCB, nil);
|
#endif
|
||||||
RpClumpDestroy(clump);
|
RpAnimBlendClumpInit(clump);
|
||||||
assocList[i].animId = firstAnimId + i;
|
assocList[i].Init(clump, anim);
|
||||||
assocList[i].groupId = groupId;
|
RpClumpDestroy(clump);
|
||||||
}else
|
assocList[i].animId = i;
|
||||||
debug("\n\nCANNOT FIND MODELINFO WITH NAME %s\n\n\n", anim->name);
|
|
||||||
}
|
}
|
||||||
numAssociations = animBlock->numAnims;
|
numAssociations = animBlock->numAnims;
|
||||||
}
|
}
|
||||||
@@ -171,8 +157,10 @@ void
|
|||||||
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs)
|
CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump, const char **animNames, int numAssocs)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
CAnimBlock *animBlock;
|
||||||
|
|
||||||
DestroyAssociations();
|
if(assocList)
|
||||||
|
DestroyAssociations();
|
||||||
|
|
||||||
animBlock = CAnimManager::GetAnimationBlock(blockName);
|
animBlock = CAnimManager::GetAnimationBlock(blockName);
|
||||||
assocList = new CAnimBlendAssociation[numAssocs];
|
assocList = new CAnimBlendAssociation[numAssocs];
|
||||||
@@ -180,8 +168,7 @@ CAnimBlendAssocGroup::CreateAssociations(const char *blockName, RpClump *clump,
|
|||||||
numAssociations = 0;
|
numAssociations = 0;
|
||||||
for(i = 0; i < numAssocs; i++){
|
for(i = 0; i < numAssocs; i++){
|
||||||
assocList[i].Init(clump, CAnimManager::GetAnimation(animNames[i], animBlock));
|
assocList[i].Init(clump, CAnimManager::GetAnimation(animNames[i], animBlock));
|
||||||
assocList[i].animId = firstAnimId + i;
|
assocList[i].animId = i;
|
||||||
assocList[i].groupId = groupId;
|
|
||||||
}
|
}
|
||||||
numAssociations = numAssocs;
|
numAssociations = numAssocs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class CAnimBlendAssociation;
|
class CAnimBlendAssociation;
|
||||||
struct CAnimBlock;
|
|
||||||
|
|
||||||
class CAnimBlendAssocGroup
|
class CAnimBlendAssocGroup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CAnimBlock *animBlock;
|
|
||||||
CAnimBlendAssociation *assocList;
|
CAnimBlendAssociation *assocList;
|
||||||
int32 numAssociations;
|
int32 numAssociations;
|
||||||
int32 firstAnimId;
|
|
||||||
int32 groupId; // id of self in ms_aAnimAssocGroups
|
|
||||||
|
|
||||||
CAnimBlendAssocGroup(void);
|
CAnimBlendAssocGroup(void);
|
||||||
~CAnimBlendAssocGroup(void);
|
~CAnimBlendAssocGroup(void);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
CAnimBlendAssociation::CAnimBlendAssociation(void)
|
CAnimBlendAssociation::CAnimBlendAssociation(void)
|
||||||
{
|
{
|
||||||
groupId = -1;
|
|
||||||
nodes = nil;
|
nodes = nil;
|
||||||
blendAmount = 1.0f;
|
blendAmount = 1.0f;
|
||||||
blendDelta = 0.0f;
|
blendDelta = 0.0f;
|
||||||
@@ -55,8 +54,8 @@ CAnimBlendAssociation::AllocateAnimBlendNodeArray(int n)
|
|||||||
void
|
void
|
||||||
CAnimBlendAssociation::FreeAnimBlendNodeArray(void)
|
CAnimBlendAssociation::FreeAnimBlendNodeArray(void)
|
||||||
{
|
{
|
||||||
if(nodes)
|
assert(nodes != nil);
|
||||||
RwFreeAlign(nodes);
|
RwFreeAlign(nodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -76,10 +75,7 @@ CAnimBlendAssociation::Init(RpClump *clump, CAnimBlendHierarchy *hier)
|
|||||||
// NB: This is where the order of nodes is defined
|
// NB: This is where the order of nodes is defined
|
||||||
for(i = 0; i < hier->numSequences; i++){
|
for(i = 0; i < hier->numSequences; i++){
|
||||||
CAnimBlendSequence *seq = &hier->sequences[i];
|
CAnimBlendSequence *seq = &hier->sequences[i];
|
||||||
if(seq->boneTag == -1)
|
frame = RpAnimBlendClumpFindFrame(clump, seq->name);
|
||||||
frame = RpAnimBlendClumpFindFrame(clump, seq->name);
|
|
||||||
else
|
|
||||||
frame = RpAnimBlendClumpFindBone(clump, seq->boneTag);
|
|
||||||
if(frame && seq->numFrames > 0)
|
if(frame && seq->numFrames > 0)
|
||||||
nodes[frame - clumpData->frames].sequence = seq;
|
nodes[frame - clumpData->frames].sequence = seq;
|
||||||
}
|
}
|
||||||
@@ -94,7 +90,6 @@ CAnimBlendAssociation::Init(CAnimBlendAssociation &assoc)
|
|||||||
numNodes = assoc.numNodes;
|
numNodes = assoc.numNodes;
|
||||||
flags = assoc.flags;
|
flags = assoc.flags;
|
||||||
animId = assoc.animId;
|
animId = assoc.animId;
|
||||||
groupId = assoc.groupId;
|
|
||||||
AllocateAnimBlendNodeArray(numNodes);
|
AllocateAnimBlendNodeArray(numNodes);
|
||||||
for(i = 0; i < numNodes; i++){
|
for(i = 0; i < numNodes; i++){
|
||||||
nodes[i] = assoc.nodes[i];
|
nodes[i] = assoc.nodes[i];
|
||||||
@@ -131,25 +126,12 @@ CAnimBlendAssociation::SetCurrentTime(float time)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for(currentTime = time; currentTime >= hierarchy->totalLength; currentTime -= hierarchy->totalLength)
|
for(currentTime = time; currentTime >= hierarchy->totalLength; currentTime -= hierarchy->totalLength)
|
||||||
if (!IsRepeating()) {
|
if(!IsRepeating())
|
||||||
currentTime = hierarchy->totalLength;
|
return;
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
CAnimManager::UncompressAnimation(hierarchy);
|
CAnimManager::UncompressAnimation(hierarchy);
|
||||||
#ifdef ANIM_COMPRESSION
|
for(i = 0; i < numNodes; i++)
|
||||||
// strangely PC has this but android doesn't
|
if(nodes[i].sequence)
|
||||||
if(hierarchy->keepCompressed){
|
nodes[i].FindKeyFrame(currentTime);
|
||||||
for(i = 0; i < numNodes; i++)
|
|
||||||
if(nodes[i].sequence)
|
|
||||||
nodes[i].SetupKeyFrameCompressed();
|
|
||||||
}else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
for(i = 0; i < numNodes; i++)
|
|
||||||
if(nodes[i].sequence)
|
|
||||||
nodes[i].FindKeyFrame(currentTime);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -165,23 +147,13 @@ CAnimBlendAssociation::Start(float time)
|
|||||||
SetCurrentTime(time);
|
SetCurrentTime(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CAnimBlendAssociation::UpdateTimeStep(float timeDelta, float relSpeed)
|
|
||||||
{
|
|
||||||
if(IsRunning())
|
|
||||||
timeStep = (flags & ASSOC_MOVEMENT ? relSpeed*hierarchy->totalLength : speed) * timeDelta;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CAnimBlendAssociation::UpdateTime(float timeDelta, float relSpeed)
|
CAnimBlendAssociation::UpdateTime(float timeDelta, float relSpeed)
|
||||||
{
|
{
|
||||||
if(!IsRunning())
|
if(!IsRunning())
|
||||||
return true;
|
return true;
|
||||||
if(currentTime >= hierarchy->totalLength){
|
|
||||||
flags &= ~ASSOC_RUNNING;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
timeStep = (flags & ASSOC_MOVEMENT ? relSpeed*hierarchy->totalLength : speed) * timeDelta;
|
||||||
currentTime += timeStep;
|
currentTime += timeStep;
|
||||||
|
|
||||||
if(currentTime >= hierarchy->totalLength){
|
if(currentTime >= hierarchy->totalLength){
|
||||||
@@ -191,6 +163,7 @@ CAnimBlendAssociation::UpdateTime(float timeDelta, float relSpeed)
|
|||||||
currentTime -= hierarchy->totalLength;
|
currentTime -= hierarchy->totalLength;
|
||||||
else{
|
else{
|
||||||
currentTime = hierarchy->totalLength;
|
currentTime = hierarchy->totalLength;
|
||||||
|
flags &= ~ASSOC_RUNNING;
|
||||||
if(flags & ASSOC_FADEOUTWHENDONE){
|
if(flags & ASSOC_FADEOUTWHENDONE){
|
||||||
flags |= ASSOC_DELETEFADEDOUT;
|
flags |= ASSOC_DELETEFADEDOUT;
|
||||||
blendDelta = -4.0f;
|
blendDelta = -4.0f;
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ enum {
|
|||||||
ASSOC_PARTIAL = 0x10,
|
ASSOC_PARTIAL = 0x10,
|
||||||
ASSOC_MOVEMENT = 0x20, // ???
|
ASSOC_MOVEMENT = 0x20, // ???
|
||||||
ASSOC_HAS_TRANSLATION = 0x40,
|
ASSOC_HAS_TRANSLATION = 0x40,
|
||||||
ASSOC_HAS_X_TRANSLATION = 0x80, // for 2d velocity extraction
|
ASSOC_WALK = 0x80, // for CPed::PlayFootSteps(void)
|
||||||
ASSOC_WALK = 0x100, // for CPed::PlayFootSteps(void)
|
ASSOC_IDLE = 0x100, // only used by xpress scratch, see CPed::Chat(void)
|
||||||
ASSOC_IDLE = 0x200, // only xpress scratch has it by default, but game adds it to player's idle animations later
|
ASSOC_NOWALK = 0x200, // see CPed::PlayFootSteps(void)
|
||||||
ASSOC_NOWALK = 0x400, // see CPed::PlayFootSteps(void)
|
ASSOC_BLOCK = 0x400, // unused in assoc description, blocks other anims from being played
|
||||||
ASSOC_BLOCK = 0x800, // unused in assoc description, blocks other anims from being played
|
ASSOC_FRONTAL = 0x800, // anims that we fall to front
|
||||||
ASSOC_FRONTAL = 0x1000, // anims that we fall to front
|
ASSOC_HAS_X_TRANSLATION = 0x1000, // for 2d velocity extraction
|
||||||
ASSOC_DRIVING = 0x2000, // new in VC
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Anim hierarchy associated with a clump
|
// Anim hierarchy associated with a clump
|
||||||
@@ -36,8 +35,7 @@ public:
|
|||||||
|
|
||||||
CAnimBlendLink link;
|
CAnimBlendLink link;
|
||||||
|
|
||||||
int16 numNodes; // taken from CAnimBlendClumpData::numFrames
|
int numNodes; // taken from CAnimBlendClumpData::numFrames
|
||||||
int16 groupId; // ID of CAnimBlendAssocGroup this is in
|
|
||||||
// NB: Order of these depends on order of nodes in Clump this was built from
|
// NB: Order of these depends on order of nodes in Clump this was built from
|
||||||
CAnimBlendNode *nodes;
|
CAnimBlendNode *nodes;
|
||||||
CAnimBlendHierarchy *hierarchy;
|
CAnimBlendHierarchy *hierarchy;
|
||||||
@@ -46,8 +44,8 @@ public:
|
|||||||
float currentTime;
|
float currentTime;
|
||||||
float speed;
|
float speed;
|
||||||
float timeStep;
|
float timeStep;
|
||||||
int16 animId;
|
int32 animId;
|
||||||
int16 flags;
|
int32 flags;
|
||||||
int32 callbackType;
|
int32 callbackType;
|
||||||
void (*callback)(CAnimBlendAssociation*, void*);
|
void (*callback)(CAnimBlendAssociation*, void*);
|
||||||
void *callbackArg;
|
void *callbackArg;
|
||||||
@@ -78,16 +76,16 @@ public:
|
|||||||
void SetCurrentTime(float time);
|
void SetCurrentTime(float time);
|
||||||
void SyncAnimation(CAnimBlendAssociation *other);
|
void SyncAnimation(CAnimBlendAssociation *other);
|
||||||
void Start(float time);
|
void Start(float time);
|
||||||
void UpdateTimeStep(float timeDelta, float relSpeed);
|
|
||||||
bool UpdateTime(float timeDelta, float relSpeed);
|
bool UpdateTime(float timeDelta, float relSpeed);
|
||||||
bool UpdateBlend(float timeDelta);
|
bool UpdateBlend(float timeDelta);
|
||||||
|
|
||||||
void SetRun(void) { flags |= ASSOC_RUNNING; }
|
void SetRun(void) { flags |= ASSOC_RUNNING; }
|
||||||
|
|
||||||
float GetTimeLeft() { return hierarchy->totalLength - currentTime; }
|
inline float GetTimeLeft() { return hierarchy->totalLength - currentTime; }
|
||||||
float GetProgress() { return currentTime / hierarchy->totalLength; }
|
|
||||||
|
|
||||||
static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) {
|
static CAnimBlendAssociation *FromLink(CAnimBlendLink *l) {
|
||||||
return (CAnimBlendAssociation*)((uint8*)l - offsetof(CAnimBlendAssociation, link));
|
return (CAnimBlendAssociation*)((uint8*)l - offsetof(CAnimBlendAssociation, link));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
VALIDATE_SIZE(CAnimBlendAssociation, 0x40);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "AnimBlendClumpData.h"
|
#include "AnimBlendClumpData.h"
|
||||||
#include "MemoryMgr.h"
|
#include "MemoryMgr.h"
|
||||||
|
|
||||||
|
|
||||||
CAnimBlendClumpData::CAnimBlendClumpData(void)
|
CAnimBlendClumpData::CAnimBlendClumpData(void)
|
||||||
{
|
{
|
||||||
numFrames = 0;
|
numFrames = 0;
|
||||||
|
|||||||
@@ -10,19 +10,23 @@ struct AnimBlendFrameData
|
|||||||
IGNORE_TRANSLATION = 4,
|
IGNORE_TRANSLATION = 4,
|
||||||
VELOCITY_EXTRACTION = 8,
|
VELOCITY_EXTRACTION = 8,
|
||||||
VELOCITY_EXTRACTION_3D = 0x10,
|
VELOCITY_EXTRACTION_3D = 0x10,
|
||||||
UPDATE_KEYFRAMES = 0x20,
|
|
||||||
COMPRESSED = 0x40
|
|
||||||
};
|
};
|
||||||
|
|
||||||
uint8 flag;
|
uint8 flag;
|
||||||
RwV3d resetPos;
|
RwV3d resetPos;
|
||||||
|
#ifdef PED_SKIN
|
||||||
union {
|
union {
|
||||||
RwFrame *frame;
|
RwFrame *frame;
|
||||||
RpHAnimStdInterpFrame *hanimFrame;
|
RpHAnimStdInterpFrame *hanimFrame;
|
||||||
};
|
};
|
||||||
int32 nodeID;
|
int32 nodeID;
|
||||||
|
#else
|
||||||
|
RwFrame *frame;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(AnimBlendFrameData, 0x18);
|
#ifndef PED_SKIN
|
||||||
|
VALIDATE_SIZE(AnimBlendFrameData, 0x14);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class CAnimBlendClumpData
|
class CAnimBlendClumpData
|
||||||
@@ -30,6 +34,9 @@ class CAnimBlendClumpData
|
|||||||
public:
|
public:
|
||||||
CAnimBlendLink link;
|
CAnimBlendLink link;
|
||||||
int32 numFrames;
|
int32 numFrames;
|
||||||
|
#ifdef PED_SKIN
|
||||||
|
int32 modelNumber; // doesn't seem to be used
|
||||||
|
#endif
|
||||||
union {
|
union {
|
||||||
CVector2D *velocity2d;
|
CVector2D *velocity2d;
|
||||||
CVector *velocity3d;
|
CVector *velocity3d;
|
||||||
@@ -40,6 +47,11 @@ public:
|
|||||||
CAnimBlendClumpData(void);
|
CAnimBlendClumpData(void);
|
||||||
~CAnimBlendClumpData(void);
|
~CAnimBlendClumpData(void);
|
||||||
void SetNumberOfFrames(int n);
|
void SetNumberOfFrames(int n);
|
||||||
|
#ifdef PED_SKIN
|
||||||
void SetNumberOfBones(int n) { SetNumberOfFrames(n); }
|
void SetNumberOfBones(int n) { SetNumberOfFrames(n); }
|
||||||
|
#endif
|
||||||
void ForAllFrames(void (*cb)(AnimBlendFrameData*, void*), void *arg);
|
void ForAllFrames(void (*cb)(AnimBlendFrameData*, void*), void *arg);
|
||||||
};
|
};
|
||||||
|
#ifndef PED_SKIN
|
||||||
|
VALIDATE_SIZE(CAnimBlendClumpData, 0x14);
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "AnimBlendSequence.h"
|
#include "AnimBlendSequence.h"
|
||||||
#include "AnimBlendHierarchy.h"
|
#include "AnimBlendHierarchy.h"
|
||||||
#include "AnimManager.h"
|
|
||||||
|
|
||||||
CAnimBlendHierarchy::CAnimBlendHierarchy(void)
|
CAnimBlendHierarchy::CAnimBlendHierarchy(void)
|
||||||
{
|
{
|
||||||
@@ -16,10 +15,9 @@ CAnimBlendHierarchy::CAnimBlendHierarchy(void)
|
|||||||
void
|
void
|
||||||
CAnimBlendHierarchy::Shutdown(void)
|
CAnimBlendHierarchy::Shutdown(void)
|
||||||
{
|
{
|
||||||
CAnimManager::RemoveFromUncompressedCache(this);
|
|
||||||
RemoveAnimSequences();
|
RemoveAnimSequences();
|
||||||
totalLength = 0.0f;
|
|
||||||
compressed = 0;
|
compressed = 0;
|
||||||
|
linkPtr = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -32,43 +30,13 @@ void
|
|||||||
CAnimBlendHierarchy::CalcTotalTime(void)
|
CAnimBlendHierarchy::CalcTotalTime(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
totalLength = 0.0f;
|
totalLength = 0.0f;
|
||||||
|
|
||||||
for(i = 0; i < numSequences; i++){
|
for(i = 0; i < numSequences; i++){
|
||||||
#ifdef FIX_BUGS
|
float seqTime = 0.0f;
|
||||||
if(sequences[i].numFrames == 0)
|
for(j = 0; j < sequences[i].numFrames; j++)
|
||||||
continue;
|
seqTime += sequences[i].GetKeyFrame(j)->deltaTime;
|
||||||
#endif
|
totalLength = Max(totalLength, seqTime);
|
||||||
|
|
||||||
totalLength = Max(totalLength, sequences[i].GetKeyFrame(sequences[i].numFrames-1)->deltaTime);
|
|
||||||
for(j = sequences[i].numFrames-1; j >= 1; j--){
|
|
||||||
KeyFrame *kf1 = sequences[i].GetKeyFrame(j);
|
|
||||||
KeyFrame *kf2 = sequences[i].GetKeyFrame(j-1);
|
|
||||||
kf1->deltaTime -= kf2->deltaTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CAnimBlendHierarchy::CalcTotalTimeCompressed(void)
|
|
||||||
{
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
totalLength = 0.0f;
|
|
||||||
|
|
||||||
for(i = 0; i < numSequences; i++){
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
if(sequences[i].numFrames == 0)
|
|
||||||
continue;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
totalLength = Max(totalLength, sequences[i].GetKeyFrameCompressed(sequences[i].numFrames-1)->GetDeltaTime());
|
|
||||||
for(j = sequences[i].numFrames-1; j >= 1; j--){
|
|
||||||
KeyFrameCompressed *kf1 = sequences[i].GetKeyFrameCompressed(j);
|
|
||||||
KeyFrameCompressed *kf2 = sequences[i].GetKeyFrameCompressed(j-1);
|
|
||||||
kf1->deltaTime -= kf2->deltaTime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +53,6 @@ void
|
|||||||
CAnimBlendHierarchy::RemoveAnimSequences(void)
|
CAnimBlendHierarchy::RemoveAnimSequences(void)
|
||||||
{
|
{
|
||||||
delete[] sequences;
|
delete[] sequences;
|
||||||
sequences = nil;
|
|
||||||
numSequences = 0;
|
numSequences = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,11 +65,9 @@ CAnimBlendHierarchy::Uncompress(void)
|
|||||||
for(i = 0; i < numSequences; i++)
|
for(i = 0; i < numSequences; i++)
|
||||||
sequences[i].Uncompress();
|
sequences[i].Uncompress();
|
||||||
#endif
|
#endif
|
||||||
compressed = 0;
|
if(totalLength == 0.0f)
|
||||||
if(totalLength == 0.0f){
|
|
||||||
RemoveQuaternionFlips();
|
|
||||||
CalcTotalTime();
|
CalcTotalTime();
|
||||||
}
|
compressed = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ public:
|
|||||||
char name[24];
|
char name[24];
|
||||||
CAnimBlendSequence *sequences;
|
CAnimBlendSequence *sequences;
|
||||||
int16 numSequences;
|
int16 numSequences;
|
||||||
bool compressed;
|
int16 compressed;
|
||||||
bool keepCompressed;
|
|
||||||
float totalLength;
|
float totalLength;
|
||||||
CLink<CAnimBlendHierarchy*> *linkPtr;
|
CLink<CAnimBlendHierarchy*> *linkPtr;
|
||||||
|
|
||||||
@@ -24,13 +23,11 @@ public:
|
|||||||
void Shutdown(void);
|
void Shutdown(void);
|
||||||
void SetName(char *name);
|
void SetName(char *name);
|
||||||
void CalcTotalTime(void);
|
void CalcTotalTime(void);
|
||||||
void CalcTotalTimeCompressed(void);
|
|
||||||
void RemoveQuaternionFlips(void);
|
void RemoveQuaternionFlips(void);
|
||||||
void RemoveAnimSequences(void);
|
void RemoveAnimSequences(void);
|
||||||
void Uncompress(void);
|
void Uncompress(void);
|
||||||
void RemoveUncompressedData(void);
|
void RemoveUncompressedData(void);
|
||||||
void MoveMemory(bool onlyone = false);
|
void MoveMemory(bool onlyone = false);
|
||||||
bool IsCompressed() { return !!compressed; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(CAnimBlendHierarchy, 0x28);
|
VALIDATE_SIZE(CAnimBlendHierarchy, 0x28);
|
||||||
@@ -45,44 +45,6 @@ CAnimBlendNode::Update(CVector &trans, CQuaternion &rot, float weight)
|
|||||||
return looped;
|
return looped;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
CAnimBlendNode::UpdateCompressed(CVector &trans, CQuaternion &rot, float weight)
|
|
||||||
{
|
|
||||||
bool looped = false;
|
|
||||||
|
|
||||||
trans = CVector(0.0f, 0.0f, 0.0f);
|
|
||||||
rot = CQuaternion(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
|
|
||||||
if(association->IsRunning()){
|
|
||||||
remainingTime -= association->timeStep;
|
|
||||||
if(remainingTime <= 0.0f)
|
|
||||||
looped = NextKeyFrameCompressed();
|
|
||||||
}
|
|
||||||
|
|
||||||
float blend = association->GetBlendAmount(weight);
|
|
||||||
if(blend > 0.0f){
|
|
||||||
KeyFrameTransCompressed *kfA = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameA);
|
|
||||||
KeyFrameTransCompressed *kfB = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameB);
|
|
||||||
float t = kfA->deltaTime == 0 ? 0.0f : (kfA->GetDeltaTime() - remainingTime)/kfA->GetDeltaTime();
|
|
||||||
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
|
||||||
CVector transA, transB;
|
|
||||||
kfA->GetTranslation(&transA);
|
|
||||||
kfB->GetTranslation(&transB);
|
|
||||||
trans = transB + t*(transA - transB);
|
|
||||||
trans *= blend;
|
|
||||||
}
|
|
||||||
if(sequence->type & CAnimBlendSequence::KF_ROT){
|
|
||||||
CQuaternion rotA, rotB;
|
|
||||||
kfA->GetRotation(&rotA);
|
|
||||||
kfB->GetRotation(&rotB);
|
|
||||||
rot.Slerp(rotB, rotA, theta, invSin, t);
|
|
||||||
rot *= blend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return looped;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CAnimBlendNode::NextKeyFrame(void)
|
CAnimBlendNode::NextKeyFrame(void)
|
||||||
{
|
{
|
||||||
@@ -120,43 +82,6 @@ CAnimBlendNode::NextKeyFrame(void)
|
|||||||
return looped;
|
return looped;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
CAnimBlendNode::NextKeyFrameCompressed(void)
|
|
||||||
{
|
|
||||||
bool looped;
|
|
||||||
|
|
||||||
if(sequence->numFrames <= 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
looped = false;
|
|
||||||
frameB = frameA;
|
|
||||||
|
|
||||||
// Advance as long as we have to
|
|
||||||
while(remainingTime <= 0.0f){
|
|
||||||
frameA++;
|
|
||||||
|
|
||||||
if(frameA >= sequence->numFrames){
|
|
||||||
// reached end of animation
|
|
||||||
if(!association->IsRepeating()){
|
|
||||||
frameA--;
|
|
||||||
remainingTime = 0.0f;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
looped = true;
|
|
||||||
frameA = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
remainingTime += sequence->GetKeyFrameCompressed(frameA)->GetDeltaTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
frameB = frameA - 1;
|
|
||||||
if(frameB < 0)
|
|
||||||
frameB += sequence->numFrames;
|
|
||||||
|
|
||||||
CalcDeltasCompressed();
|
|
||||||
return looped;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set animation to time t
|
// Set animation to time t
|
||||||
bool
|
bool
|
||||||
CAnimBlendNode::FindKeyFrame(float t)
|
CAnimBlendNode::FindKeyFrame(float t)
|
||||||
@@ -167,22 +92,20 @@ CAnimBlendNode::FindKeyFrame(float t)
|
|||||||
frameA = 0;
|
frameA = 0;
|
||||||
frameB = frameA;
|
frameB = frameA;
|
||||||
|
|
||||||
if(sequence->numFrames == 1){
|
if(sequence->numFrames >= 2){
|
||||||
remainingTime = 0.0f;
|
frameA++;
|
||||||
}else{
|
|
||||||
// advance until t is between frameB and frameA
|
// advance until t is between frameB and frameA
|
||||||
while (t > sequence->GetKeyFrame(++frameA)->deltaTime) {
|
while(t > sequence->GetKeyFrame(frameA)->deltaTime){
|
||||||
t -= sequence->GetKeyFrame(frameA)->deltaTime;
|
t -= sequence->GetKeyFrame(frameA)->deltaTime;
|
||||||
if (frameA + 1 >= sequence->numFrames) {
|
frameB = frameA++;
|
||||||
|
if(frameA >= sequence->numFrames){
|
||||||
// reached end of animation
|
// reached end of animation
|
||||||
if (!association->IsRepeating()) {
|
if(!association->IsRepeating())
|
||||||
CalcDeltas();
|
|
||||||
remainingTime = 0.0f;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
frameA = 0;
|
frameA = 0;
|
||||||
|
frameB = 0;
|
||||||
}
|
}
|
||||||
frameB = frameA;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t;
|
remainingTime = sequence->GetKeyFrame(frameA)->deltaTime - t;
|
||||||
@@ -192,25 +115,6 @@ CAnimBlendNode::FindKeyFrame(float t)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
CAnimBlendNode::SetupKeyFrameCompressed(void)
|
|
||||||
{
|
|
||||||
if(sequence->numFrames < 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
frameA = 1;
|
|
||||||
frameB = 0;
|
|
||||||
|
|
||||||
if(sequence->numFrames == 1){
|
|
||||||
frameA = 0;
|
|
||||||
remainingTime = 0.0f;
|
|
||||||
}else
|
|
||||||
remainingTime = sequence->GetKeyFrameCompressed(frameA)->GetDeltaTime();
|
|
||||||
|
|
||||||
CalcDeltasCompressed();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendNode::CalcDeltas(void)
|
CAnimBlendNode::CalcDeltas(void)
|
||||||
{
|
{
|
||||||
@@ -225,28 +129,6 @@ CAnimBlendNode::CalcDeltas(void)
|
|||||||
invSin = theta == 0.0f ? 0.0f : 1.0f/Sin(theta);
|
invSin = theta == 0.0f ? 0.0f : 1.0f/Sin(theta);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CAnimBlendNode::CalcDeltasCompressed(void)
|
|
||||||
{
|
|
||||||
if((sequence->type & CAnimBlendSequence::KF_ROT) == 0)
|
|
||||||
return;
|
|
||||||
KeyFrameCompressed *kfA = sequence->GetKeyFrameCompressed(frameA);
|
|
||||||
KeyFrameCompressed *kfB = sequence->GetKeyFrameCompressed(frameB);
|
|
||||||
CQuaternion rotA, rotB;
|
|
||||||
kfA->GetRotation(&rotA);
|
|
||||||
kfB->GetRotation(&rotB);
|
|
||||||
float cos = DotProduct(rotA, rotB);
|
|
||||||
if(cos < 0.0f){
|
|
||||||
rotB *= -1.0f;
|
|
||||||
kfB->SetRotation(rotB);
|
|
||||||
}
|
|
||||||
cos = DotProduct(rotA, rotB);
|
|
||||||
if(cos > 1.0f)
|
|
||||||
cos = 1.0f;
|
|
||||||
theta = Acos(cos);
|
|
||||||
invSin = theta == 0.0f ? 0.0f : 1.0f/Sin(theta);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
||||||
{
|
{
|
||||||
@@ -256,7 +138,7 @@ CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
|||||||
if(blend > 0.0f){
|
if(blend > 0.0f){
|
||||||
KeyFrameTrans *kfA = (KeyFrameTrans*)sequence->GetKeyFrame(frameA);
|
KeyFrameTrans *kfA = (KeyFrameTrans*)sequence->GetKeyFrame(frameA);
|
||||||
KeyFrameTrans *kfB = (KeyFrameTrans*)sequence->GetKeyFrame(frameB);
|
KeyFrameTrans *kfB = (KeyFrameTrans*)sequence->GetKeyFrame(frameB);
|
||||||
float t = kfA->deltaTime == 0.0f ? 0.0f : (kfA->deltaTime - remainingTime)/kfA->deltaTime;
|
float t = (kfA->deltaTime - remainingTime)/kfA->deltaTime;
|
||||||
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
||||||
trans = kfB->translation + t*(kfA->translation - kfB->translation);
|
trans = kfB->translation + t*(kfA->translation - kfB->translation);
|
||||||
trans *= blend;
|
trans *= blend;
|
||||||
@@ -264,26 +146,6 @@ CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CAnimBlendNode::GetCurrentTranslationCompressed(CVector &trans, float weight)
|
|
||||||
{
|
|
||||||
trans = CVector(0.0f, 0.0f, 0.0f);
|
|
||||||
|
|
||||||
float blend = association->GetBlendAmount(weight);
|
|
||||||
if(blend > 0.0f){
|
|
||||||
KeyFrameTransCompressed *kfA = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameA);
|
|
||||||
KeyFrameTransCompressed *kfB = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(frameB);
|
|
||||||
float t = kfA->deltaTime == 0 ? 0.0f : (kfA->GetDeltaTime() - remainingTime)/kfA->GetDeltaTime();
|
|
||||||
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
|
||||||
CVector transA, transB;
|
|
||||||
kfA->GetTranslation(&transA);
|
|
||||||
kfB->GetTranslation(&transB);
|
|
||||||
trans = transB + t*(transA - transB);
|
|
||||||
trans *= blend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendNode::GetEndTranslation(CVector &trans, float weight)
|
CAnimBlendNode::GetEndTranslation(CVector &trans, float weight)
|
||||||
{
|
{
|
||||||
@@ -296,19 +158,3 @@ CAnimBlendNode::GetEndTranslation(CVector &trans, float weight)
|
|||||||
trans = kf->translation * blend;
|
trans = kf->translation * blend;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CAnimBlendNode::GetEndTranslationCompressed(CVector &trans, float weight)
|
|
||||||
{
|
|
||||||
trans = CVector(0.0f, 0.0f, 0.0f);
|
|
||||||
|
|
||||||
float blend = association->GetBlendAmount(weight);
|
|
||||||
if(blend > 0.0f){
|
|
||||||
KeyFrameTransCompressed *kf = (KeyFrameTransCompressed*)sequence->GetKeyFrameCompressed(sequence->numFrames-1);
|
|
||||||
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
|
||||||
CVector pos;
|
|
||||||
kf->GetTranslation(&pos);
|
|
||||||
trans = pos * blend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -20,17 +20,11 @@ public:
|
|||||||
|
|
||||||
void Init(void);
|
void Init(void);
|
||||||
bool Update(CVector &trans, CQuaternion &rot, float weight);
|
bool Update(CVector &trans, CQuaternion &rot, float weight);
|
||||||
bool UpdateCompressed(CVector &trans, CQuaternion &rot, float weight);
|
|
||||||
bool NextKeyFrame(void);
|
bool NextKeyFrame(void);
|
||||||
bool NextKeyFrameCompressed(void);
|
|
||||||
bool FindKeyFrame(float t);
|
bool FindKeyFrame(float t);
|
||||||
bool SetupKeyFrameCompressed(void);
|
|
||||||
void CalcDeltas(void);
|
void CalcDeltas(void);
|
||||||
void CalcDeltasCompressed(void);
|
|
||||||
void GetCurrentTranslation(CVector &trans, float weight);
|
void GetCurrentTranslation(CVector &trans, float weight);
|
||||||
void GetCurrentTranslationCompressed(CVector &trans, float weight);
|
|
||||||
void GetEndTranslation(CVector &trans, float weight);
|
void GetEndTranslation(CVector &trans, float weight);
|
||||||
void GetEndTranslationCompressed(CVector &trans, float weight);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ CAnimBlendSequence::CAnimBlendSequence(void)
|
|||||||
numFrames = 0;
|
numFrames = 0;
|
||||||
keyFrames = nil;
|
keyFrames = nil;
|
||||||
keyFramesCompressed = nil;
|
keyFramesCompressed = nil;
|
||||||
|
#ifdef PED_SKIN
|
||||||
boneTag = -1;
|
boneTag = -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CAnimBlendSequence::~CAnimBlendSequence(void)
|
CAnimBlendSequence::~CAnimBlendSequence(void)
|
||||||
@@ -27,21 +29,18 @@ CAnimBlendSequence::SetName(char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CAnimBlendSequence::SetNumFrames(int numFrames, bool translation, bool compressed)
|
CAnimBlendSequence::SetNumFrames(int numFrames, bool translation)
|
||||||
{
|
{
|
||||||
|
int sz;
|
||||||
|
|
||||||
if(translation){
|
if(translation){
|
||||||
|
sz = sizeof(KeyFrameTrans);
|
||||||
type |= KF_ROT | KF_TRANS;
|
type |= KF_ROT | KF_TRANS;
|
||||||
if(compressed)
|
|
||||||
keyFramesCompressed = RwMalloc(sizeof(KeyFrameTrans) * numFrames);
|
|
||||||
else
|
|
||||||
keyFrames = RwMalloc(sizeof(KeyFrameTrans) * numFrames);
|
|
||||||
}else{
|
}else{
|
||||||
|
sz = sizeof(KeyFrame);
|
||||||
type |= KF_ROT;
|
type |= KF_ROT;
|
||||||
if(compressed)
|
|
||||||
keyFramesCompressed = RwMalloc(sizeof(KeyFrame) * numFrames);
|
|
||||||
else
|
|
||||||
keyFrames = RwMalloc(sizeof(KeyFrame) * numFrames);
|
|
||||||
}
|
}
|
||||||
|
keyFrames = RwMalloc(sz * numFrames);
|
||||||
this->numFrames = numFrames;
|
this->numFrames = numFrames;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +76,7 @@ CAnimBlendSequence::Uncompress(void)
|
|||||||
|
|
||||||
float rotScale = 1.0f/4096.0f;
|
float rotScale = 1.0f/4096.0f;
|
||||||
float timeScale = 1.0f/60.0f;
|
float timeScale = 1.0f/60.0f;
|
||||||
float transScale = 1.0f/1024.0f;
|
float transScale = 1.0f/128.0f;
|
||||||
if(type & KF_TRANS){
|
if(type & KF_TRANS){
|
||||||
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTrans));
|
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTrans));
|
||||||
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)keyFramesCompressed;
|
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)keyFramesCompressed;
|
||||||
@@ -130,7 +129,7 @@ CAnimBlendSequence::CompressKeyframes(void)
|
|||||||
|
|
||||||
float rotScale = 4096.0f;
|
float rotScale = 4096.0f;
|
||||||
float timeScale = 60.0f;
|
float timeScale = 60.0f;
|
||||||
float transScale = 1024.0f;
|
float transScale = 128.0f;
|
||||||
if(type & KF_TRANS){
|
if(type & KF_TRANS){
|
||||||
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTransCompressed));
|
void *newKfs = RwMalloc(numFrames * sizeof(KeyFrameTransCompressed));
|
||||||
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)newKfs;
|
KeyFrameTransCompressed *ckf = (KeyFrameTransCompressed*)newKfs;
|
||||||
@@ -198,3 +197,4 @@ CAnimBlendSequence::MoveMemory(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -19,38 +19,10 @@ struct KeyFrameTrans : KeyFrame {
|
|||||||
struct KeyFrameCompressed {
|
struct KeyFrameCompressed {
|
||||||
int16 rot[4]; // 4096
|
int16 rot[4]; // 4096
|
||||||
int16 deltaTime; // 60
|
int16 deltaTime; // 60
|
||||||
|
|
||||||
void GetRotation(CQuaternion *quat){
|
|
||||||
float scale = 1.0f/4096.0f;
|
|
||||||
quat->x = rot[0]*scale;
|
|
||||||
quat->y = rot[1]*scale;
|
|
||||||
quat->z = rot[2]*scale;
|
|
||||||
quat->w = rot[3]*scale;
|
|
||||||
}
|
|
||||||
void SetRotation(const CQuaternion &quat){
|
|
||||||
rot[0] = quat.x * 4096.0f;
|
|
||||||
rot[1] = quat.y * 4096.0f;
|
|
||||||
rot[2] = quat.z * 4096.0f;
|
|
||||||
rot[3] = quat.w * 4096.0f;
|
|
||||||
}
|
|
||||||
float GetDeltaTime(void) { return deltaTime/60.0f; }
|
|
||||||
void SetTime(float t) { deltaTime = t*60.0f + 0.5f; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct KeyFrameTransCompressed : KeyFrameCompressed {
|
struct KeyFrameTransCompressed : KeyFrameCompressed {
|
||||||
int16 trans[3]; // 1024
|
int16 trans[3]; // 128
|
||||||
|
|
||||||
void GetTranslation(CVector *vec) {
|
|
||||||
float scale = 1.0f/1024.0f;
|
|
||||||
vec->x = trans[0]*scale;
|
|
||||||
vec->y = trans[1]*scale;
|
|
||||||
vec->z = trans[2]*scale;
|
|
||||||
}
|
|
||||||
void SetTranslation(const CVector &vec){
|
|
||||||
trans[0] = vec.x*1024.0f;
|
|
||||||
trans[1] = vec.y*1024.0f;
|
|
||||||
trans[2] = vec.z*1024.0f;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -65,31 +37,32 @@ public:
|
|||||||
int32 type;
|
int32 type;
|
||||||
char name[24];
|
char name[24];
|
||||||
int32 numFrames;
|
int32 numFrames;
|
||||||
|
#ifdef PED_SKIN
|
||||||
int16 boneTag;
|
int16 boneTag;
|
||||||
|
#endif
|
||||||
void *keyFrames;
|
void *keyFrames;
|
||||||
void *keyFramesCompressed;
|
void *keyFramesCompressed;
|
||||||
|
|
||||||
CAnimBlendSequence(void);
|
CAnimBlendSequence(void);
|
||||||
virtual ~CAnimBlendSequence(void);
|
virtual ~CAnimBlendSequence(void);
|
||||||
void SetName(char *name);
|
void SetName(char *name);
|
||||||
void SetNumFrames(int numFrames, bool translation, bool compressed);
|
void SetNumFrames(int numFrames, bool translation);
|
||||||
void RemoveQuaternionFlips(void);
|
void RemoveQuaternionFlips(void);
|
||||||
KeyFrame *GetKeyFrame(int n) {
|
KeyFrame *GetKeyFrame(int n) {
|
||||||
return type & KF_TRANS ?
|
return type & KF_TRANS ?
|
||||||
&((KeyFrameTrans*)keyFrames)[n] :
|
&((KeyFrameTrans*)keyFrames)[n] :
|
||||||
&((KeyFrame*)keyFrames)[n];
|
&((KeyFrame*)keyFrames)[n];
|
||||||
}
|
}
|
||||||
KeyFrameCompressed *GetKeyFrameCompressed(int n) {
|
|
||||||
return type & KF_TRANS ?
|
|
||||||
&((KeyFrameTransCompressed*)keyFramesCompressed)[n] :
|
|
||||||
&((KeyFrameCompressed*)keyFramesCompressed)[n];
|
|
||||||
}
|
|
||||||
bool HasTranslation(void) { return !!(type & KF_TRANS); }
|
bool HasTranslation(void) { return !!(type & KF_TRANS); }
|
||||||
void Uncompress(void);
|
void Uncompress(void);
|
||||||
void CompressKeyframes(void);
|
void CompressKeyframes(void);
|
||||||
void RemoveUncompressedData(void);
|
void RemoveUncompressedData(void);
|
||||||
bool MoveMemory(void);
|
bool MoveMemory(void);
|
||||||
|
|
||||||
|
#ifdef PED_SKIN
|
||||||
void SetBoneTag(int tag) { boneTag = tag; }
|
void SetBoneTag(int tag) { boneTag = tag; }
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(CAnimBlendSequence, 0x30);
|
#ifndef PED_SKIN
|
||||||
|
VALIDATE_SIZE(CAnimBlendSequence, 0x2C);
|
||||||
|
#endif
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,57 +6,24 @@
|
|||||||
enum AssocGroupId
|
enum AssocGroupId
|
||||||
{
|
{
|
||||||
ASSOCGRP_STD,
|
ASSOCGRP_STD,
|
||||||
ASSOCGRP_VAN,
|
|
||||||
ASSOCGRP_COACH,
|
|
||||||
ASSOCGRP_BIKE_STANDARD,
|
|
||||||
ASSOCGRP_BIKE_VESPA,
|
|
||||||
ASSOCGRP_BIKE_HARLEY,
|
|
||||||
ASSOCGRP_BIKE_DIRT,
|
|
||||||
ASSOCGRP_UNARMED,
|
|
||||||
ASSOCGRP_SCREWDRIVER,
|
|
||||||
ASSOCGRP_KNIFE,
|
|
||||||
ASSOCGRP_BASEBALLBAT,
|
|
||||||
ASSOCGRP_GOLFCLUB,
|
|
||||||
ASSOCGRP_CHAINSAW,
|
|
||||||
ASSOCGRP_PYTHON,
|
|
||||||
ASSOCGRP_COLT,
|
|
||||||
ASSOCGRP_SHOTGUN,
|
|
||||||
ASSOCGRP_BUDDY,
|
|
||||||
ASSOCGRP_TEC,
|
|
||||||
ASSOCGRP_UZI,
|
|
||||||
ASSOCGRP_RIFLE,
|
|
||||||
ASSOCGRP_M60,
|
|
||||||
ASSOCGRP_SNIPER,
|
|
||||||
ASSOCGRP_THROW,
|
|
||||||
ASSOCGRP_FLAMETHROWER,
|
|
||||||
ASSOCGRP_MEDIC,
|
|
||||||
ASSOCGRP_SUNBATHE,
|
|
||||||
ASSOCGRP_PLAYER_IDLE,
|
|
||||||
ASSOCGRP_RIOT,
|
|
||||||
ASSOCGRP_STRIP,
|
|
||||||
ASSOCGRP_LANCE,
|
|
||||||
ASSOCGRP_PLAYER,
|
ASSOCGRP_PLAYER,
|
||||||
ASSOCGRP_PLAYERROCKET,
|
ASSOCGRP_PLAYERROCKET,
|
||||||
ASSOCGRP_PLAYER1ARMED,
|
ASSOCGRP_PLAYER1ARMED,
|
||||||
ASSOCGRP_PLAYER2ARMED,
|
ASSOCGRP_PLAYER2ARMED,
|
||||||
ASSOCGRP_PLAYERBBBAT,
|
ASSOCGRP_PLAYERBBBAT,
|
||||||
ASSOCGRP_PLAYERCHAINSAW,
|
|
||||||
ASSOCGRP_SHUFFLE,
|
ASSOCGRP_SHUFFLE,
|
||||||
ASSOCGRP_OLD,
|
ASSOCGRP_OLD,
|
||||||
ASSOCGRP_GANG1,
|
ASSOCGRP_GANG1,
|
||||||
ASSOCGRP_GANG2,
|
ASSOCGRP_GANG2,
|
||||||
ASSOCGRP_FAT,
|
ASSOCGRP_FAT,
|
||||||
ASSOCGRP_OLDFAT,
|
ASSOCGRP_OLDFAT,
|
||||||
ASSOCGRP_JOGGER,
|
|
||||||
ASSOCGRP_WOMAN,
|
ASSOCGRP_WOMAN,
|
||||||
ASSOCGRP_WOMANSHOP,
|
ASSOCGRP_WOMANSHOP,
|
||||||
ASSOCGRP_BUSYWOMAN,
|
ASSOCGRP_BUSYWOMAN,
|
||||||
ASSOCGRP_SEXYWOMAN,
|
ASSOCGRP_SEXYWOMAN,
|
||||||
ASSOCGRP_FATWOMAN,
|
|
||||||
ASSOCGRP_OLDWOMAN,
|
ASSOCGRP_OLDWOMAN,
|
||||||
ASSOCGRP_JOGWOMAN,
|
ASSOCGRP_FATWOMAN,
|
||||||
ASSOCGRP_PANICCHUNKY,
|
ASSOCGRP_PANICCHUNKY,
|
||||||
ASSOCGRP_SKATE,
|
|
||||||
#ifdef PC_PLAYER_CONTROLS
|
#ifdef PC_PLAYER_CONTROLS
|
||||||
ASSOCGRP_PLAYERBACK,
|
ASSOCGRP_PLAYERBACK,
|
||||||
ASSOCGRP_PLAYERLEFT,
|
ASSOCGRP_PLAYERLEFT,
|
||||||
@@ -64,9 +31,6 @@ enum AssocGroupId
|
|||||||
ASSOCGRP_ROCKETBACK,
|
ASSOCGRP_ROCKETBACK,
|
||||||
ASSOCGRP_ROCKETLEFT,
|
ASSOCGRP_ROCKETLEFT,
|
||||||
ASSOCGRP_ROCKETRIGHT,
|
ASSOCGRP_ROCKETRIGHT,
|
||||||
ASSOCGRP_CHAINSAWBACK,
|
|
||||||
ASSOCGRP_CHAINSAWLEFT,
|
|
||||||
ASSOCGRP_CHAINSAWRIGHT,
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NUM_ANIM_ASSOC_GROUPS
|
NUM_ANIM_ASSOC_GROUPS
|
||||||
@@ -75,15 +39,11 @@ enum AssocGroupId
|
|||||||
class CAnimBlendAssociation;
|
class CAnimBlendAssociation;
|
||||||
class CAnimBlendAssocGroup;
|
class CAnimBlendAssocGroup;
|
||||||
|
|
||||||
#define MAX_ANIMBLOCK_NAME 20
|
|
||||||
|
|
||||||
// A block of hierarchies
|
// A block of hierarchies
|
||||||
struct CAnimBlock
|
struct CAnimBlock
|
||||||
{
|
{
|
||||||
char name[MAX_ANIMBLOCK_NAME];
|
char name[24];
|
||||||
bool isLoaded;
|
int32 firstIndex;
|
||||||
int16 refCount;
|
|
||||||
int32 firstIndex; // first animtion in ms_aAnimations
|
|
||||||
int32 numAnims;
|
int32 numAnims;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -117,16 +77,7 @@ public:
|
|||||||
static void Initialise(void);
|
static void Initialise(void);
|
||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
static void UncompressAnimation(CAnimBlendHierarchy *anim);
|
static void UncompressAnimation(CAnimBlendHierarchy *anim);
|
||||||
static void RemoveFromUncompressedCache(CAnimBlendHierarchy *hier);
|
|
||||||
static CAnimBlock *GetAnimationBlock(int32 block) { return &ms_aAnimBlocks[block]; }
|
|
||||||
static CAnimBlock *GetAnimationBlock(const char *name);
|
static CAnimBlock *GetAnimationBlock(const char *name);
|
||||||
static int32 GetAnimationBlockIndex(const char *name);
|
|
||||||
static int32 RegisterAnimBlock(const char *name);
|
|
||||||
static int32 GetNumRefsToAnimBlock(int32 block);
|
|
||||||
static void AddAnimBlockRef(int32 block);
|
|
||||||
static void RemoveAnimBlockRefWithoutDelete(int32 block);
|
|
||||||
static void RemoveAnimBlockRef(int32 block);
|
|
||||||
static void RemoveAnimBlock(int32 block);
|
|
||||||
static CAnimBlendHierarchy *GetAnimation(const char *name, CAnimBlock *animBlock);
|
static CAnimBlendHierarchy *GetAnimation(const char *name, CAnimBlock *animBlock);
|
||||||
static CAnimBlendHierarchy *GetAnimation(int32 n) { return &ms_aAnimations[n]; }
|
static CAnimBlendHierarchy *GetAnimation(int32 n) { return &ms_aAnimations[n]; }
|
||||||
static const char *GetAnimGroupName(AssocGroupId groupId);
|
static const char *GetAnimGroupName(AssocGroupId groupId);
|
||||||
@@ -138,8 +89,6 @@ public:
|
|||||||
static CAnimBlendAssociation *BlendAnimation(RpClump *clump, AssocGroupId groupId, AnimationId animId, float delta);
|
static CAnimBlendAssociation *BlendAnimation(RpClump *clump, AssocGroupId groupId, AnimationId animId, float delta);
|
||||||
static void LoadAnimFiles(void);
|
static void LoadAnimFiles(void);
|
||||||
static void LoadAnimFile(const char *filename);
|
static void LoadAnimFile(const char *filename);
|
||||||
static void LoadAnimFile(RwStream *stream, bool compress, char (*uncompressedAnims)[32] = nil);
|
static void LoadAnimFile(int fd, bool compress);
|
||||||
static void CreateAnimAssocGroups(void);
|
|
||||||
static void RemoveLastAnimFile(void);
|
static void RemoveLastAnimFile(void);
|
||||||
static CAnimBlendAssocGroup* GetAnimAssocGroups(void) { return ms_aAnimAssocGroups; }
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ enum AnimationId
|
|||||||
ANIM_STD_HIT_FLOOR,
|
ANIM_STD_HIT_FLOOR,
|
||||||
|
|
||||||
/* names made up */
|
/* names made up */
|
||||||
|
#if GTA_VERSION <= GTA3_PS2_160
|
||||||
|
ANIM_STD_HIT_BODY,
|
||||||
|
#endif
|
||||||
ANIM_STD_HIT_BODYBLOW,
|
ANIM_STD_HIT_BODYBLOW,
|
||||||
ANIM_STD_HIT_CHEST,
|
ANIM_STD_HIT_CHEST,
|
||||||
ANIM_STD_HIT_HEAD,
|
ANIM_STD_HIT_HEAD,
|
||||||
@@ -51,6 +54,42 @@ enum AnimationId
|
|||||||
ANIM_STD_HIT_WALL,
|
ANIM_STD_HIT_WALL,
|
||||||
ANIM_STD_HIT_FLOOR_FRONT,
|
ANIM_STD_HIT_FLOOR_FRONT,
|
||||||
ANIM_STD_HIT_BEHIND,
|
ANIM_STD_HIT_BEHIND,
|
||||||
|
ANIM_STD_PUNCH,
|
||||||
|
ANIM_STD_KICKGROUND,
|
||||||
|
|
||||||
|
/* names made up */
|
||||||
|
ANIM_STD_WEAPON_BAT_H,
|
||||||
|
ANIM_STD_WEAPON_BAT_V,
|
||||||
|
ANIM_STD_WEAPON_HGUN_BODY,
|
||||||
|
ANIM_STD_WEAPON_AK_BODY,
|
||||||
|
ANIM_STD_WEAPON_PUMP,
|
||||||
|
ANIM_STD_WEAPON_SNIPER,
|
||||||
|
ANIM_STD_WEAPON_THROW,
|
||||||
|
/**/
|
||||||
|
|
||||||
|
ANIM_STD_THROW_UNDER,
|
||||||
|
|
||||||
|
/* names made up */
|
||||||
|
ANIM_STD_START_THROW,
|
||||||
|
/**/
|
||||||
|
|
||||||
|
ANIM_STD_DETONATE,
|
||||||
|
|
||||||
|
/* names made up */
|
||||||
|
ANIM_STD_HGUN_RELOAD,
|
||||||
|
ANIM_STD_AK_RELOAD,
|
||||||
|
#ifdef PC_PLAYER_CONTROLS
|
||||||
|
// maybe wrong define, but unused anyway
|
||||||
|
ANIM_FPS_PUNCH,
|
||||||
|
ANIM_FPS_BAT,
|
||||||
|
ANIM_FPS_UZI,
|
||||||
|
ANIM_FPS_PUMP,
|
||||||
|
ANIM_FPS_AK,
|
||||||
|
ANIM_FPS_M16,
|
||||||
|
ANIM_FPS_ROCKET,
|
||||||
|
#endif
|
||||||
|
/**/
|
||||||
|
|
||||||
ANIM_STD_FIGHT_IDLE,
|
ANIM_STD_FIGHT_IDLE,
|
||||||
ANIM_STD_FIGHT_2IDLE,
|
ANIM_STD_FIGHT_2IDLE,
|
||||||
ANIM_STD_FIGHT_SHUFFLE_F,
|
ANIM_STD_FIGHT_SHUFFLE_F,
|
||||||
@@ -67,23 +106,6 @@ enum AnimationId
|
|||||||
/**/
|
/**/
|
||||||
|
|
||||||
ANIM_STD_PARTIAL_PUNCH,
|
ANIM_STD_PARTIAL_PUNCH,
|
||||||
|
|
||||||
/* names made up */
|
|
||||||
ANIM_STD_FIGHT_JAB,
|
|
||||||
ANIM_STD_FIGHT_ELBOW_L,
|
|
||||||
ANIM_STD_FIGHT_ELBOW_R,
|
|
||||||
ANIM_STD_FIGHT_BKICK_L,
|
|
||||||
ANIM_STD_FIGHT_BKICK_R,
|
|
||||||
/**/
|
|
||||||
|
|
||||||
ANIM_STD_DETONATE,
|
|
||||||
ANIM_STD_PUNCH,
|
|
||||||
ANIM_STD_PARTIALPUNCH,
|
|
||||||
ANIM_STD_KICKGROUND,
|
|
||||||
|
|
||||||
ANIM_STD_THROW_UNDER,
|
|
||||||
ANIM_STD_FIGHT_SHUFFLE_B,
|
|
||||||
|
|
||||||
ANIM_STD_JACKEDCAR_RHS,
|
ANIM_STD_JACKEDCAR_RHS,
|
||||||
ANIM_STD_JACKEDCAR_LO_RHS,
|
ANIM_STD_JACKEDCAR_LO_RHS,
|
||||||
ANIM_STD_JACKEDCAR_LHS,
|
ANIM_STD_JACKEDCAR_LHS,
|
||||||
@@ -102,7 +124,6 @@ enum AnimationId
|
|||||||
ANIM_STD_CAR_CLOSE_DOOR_LO_LHS,
|
ANIM_STD_CAR_CLOSE_DOOR_LO_LHS,
|
||||||
ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS,
|
ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LHS,
|
||||||
ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS,
|
ANIM_STD_CAR_CLOSE_DOOR_ROLLING_LO_LHS,
|
||||||
ANIM_STD_CAR_JUMP_IN_LO_LHS,
|
|
||||||
ANIM_STD_GETOUT_LHS,
|
ANIM_STD_GETOUT_LHS,
|
||||||
ANIM_STD_GETOUT_LO_LHS,
|
ANIM_STD_GETOUT_LO_LHS,
|
||||||
ANIM_STD_CAR_CLOSE_LHS,
|
ANIM_STD_CAR_CLOSE_LHS,
|
||||||
@@ -128,36 +149,29 @@ enum AnimationId
|
|||||||
ANIM_STD_CAR_DRIVE_RIGHT_LO,
|
ANIM_STD_CAR_DRIVE_RIGHT_LO,
|
||||||
ANIM_STD_CAR_DRIVEBY_LEFT,
|
ANIM_STD_CAR_DRIVEBY_LEFT,
|
||||||
ANIM_STD_CAR_DRIVEBY_RIGHT,
|
ANIM_STD_CAR_DRIVEBY_RIGHT,
|
||||||
ANIM_STD_CAR_DRIVEBY_LEFT_LO,
|
|
||||||
ANIM_STD_CAR_DRIVEBY_RIGHT_LO,
|
|
||||||
ANIM_STD_CAR_LOOKBEHIND,
|
ANIM_STD_CAR_LOOKBEHIND,
|
||||||
ANIM_STD_BOAT_DRIVE,
|
ANIM_STD_BOAT_DRIVE,
|
||||||
ANIM_STD_BOAT_DRIVE_LEFT,
|
|
||||||
ANIM_STD_BOAT_DRIVE_RIGHT,
|
|
||||||
ANIM_STD_BOAT_LOOKBEHIND,
|
|
||||||
|
|
||||||
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_STD_GETOUT_RHS,
|
ANIM_STD_GETOUT_RHS,
|
||||||
ANIM_STD_GETOUT_LO_RHS,
|
ANIM_STD_GETOUT_LO_RHS,
|
||||||
ANIM_STD_CAR_CLOSE_RHS,
|
ANIM_STD_CAR_CLOSE_RHS,
|
||||||
ANIM_STD_CAR_HOOKERTALK,
|
ANIM_STD_CAR_HOOKERTALK,
|
||||||
|
ANIM_STD_COACH_OPEN_LHS,
|
||||||
|
ANIM_STD_COACH_OPEN_RHS,
|
||||||
|
ANIM_STD_COACH_GET_IN_LHS,
|
||||||
|
ANIM_STD_COACH_GET_IN_RHS,
|
||||||
|
ANIM_STD_COACH_GET_OUT_LHS,
|
||||||
ANIM_STD_TRAIN_GETIN,
|
ANIM_STD_TRAIN_GETIN,
|
||||||
ANIM_STD_TRAIN_GETOUT,
|
ANIM_STD_TRAIN_GETOUT,
|
||||||
|
|
||||||
ANIM_STD_CRAWLOUT_LHS,
|
ANIM_STD_CRAWLOUT_LHS,
|
||||||
ANIM_STD_CRAWLOUT_RHS,
|
ANIM_STD_CRAWLOUT_RHS,
|
||||||
ANIM_STD_ROLLOUT_LHS,
|
ANIM_STD_VAN_OPEN_DOOR_REAR_LHS,
|
||||||
ANIM_STD_ROLLOUT_RHS,
|
ANIM_STD_VAN_GET_IN_REAR_LHS,
|
||||||
|
ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS,
|
||||||
|
ANIM_STD_VAN_GET_OUT_REAR_LHS,
|
||||||
|
ANIM_STD_VAN_OPEN_DOOR_REAR_RHS,
|
||||||
|
ANIM_STD_VAN_GET_IN_REAR_RHS,
|
||||||
|
ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS,
|
||||||
|
ANIM_STD_VAN_GET_OUT_REAR_RHS,
|
||||||
ANIM_STD_GET_UP,
|
ANIM_STD_GET_UP,
|
||||||
ANIM_STD_GET_UP_LEFT,
|
ANIM_STD_GET_UP_LEFT,
|
||||||
ANIM_STD_GET_UP_RIGHT,
|
ANIM_STD_GET_UP_RIGHT,
|
||||||
@@ -169,9 +183,6 @@ enum AnimationId
|
|||||||
ANIM_STD_FALL_GLIDE,
|
ANIM_STD_FALL_GLIDE,
|
||||||
ANIM_STD_FALL_LAND,
|
ANIM_STD_FALL_LAND,
|
||||||
ANIM_STD_FALL_COLLAPSE,
|
ANIM_STD_FALL_COLLAPSE,
|
||||||
ANIM_STD_FALL_ONBACK,
|
|
||||||
ANIM_STD_FALL_ONFRONT,
|
|
||||||
|
|
||||||
ANIM_STD_EVADE_STEP,
|
ANIM_STD_EVADE_STEP,
|
||||||
ANIM_STD_EVADE_DIVE,
|
ANIM_STD_EVADE_DIVE,
|
||||||
ANIM_STD_XPRESS_SCRATCH,
|
ANIM_STD_XPRESS_SCRATCH,
|
||||||
@@ -179,12 +190,15 @@ enum AnimationId
|
|||||||
ANIM_STD_TURN180,
|
ANIM_STD_TURN180,
|
||||||
ANIM_STD_ARREST,
|
ANIM_STD_ARREST,
|
||||||
ANIM_STD_DROWN,
|
ANIM_STD_DROWN,
|
||||||
|
ANIM_MEDIC_CPR,
|
||||||
ANIM_STD_DUCK_DOWN,
|
ANIM_STD_DUCK_DOWN,
|
||||||
ANIM_STD_DUCK_LOW,
|
ANIM_STD_DUCK_LOW,
|
||||||
|
|
||||||
ANIM_STD_DUCK_WEAPON,
|
|
||||||
|
|
||||||
ANIM_STD_RBLOCK_SHOOT,
|
ANIM_STD_RBLOCK_SHOOT,
|
||||||
|
|
||||||
|
/* names made up */
|
||||||
|
ANIM_STD_THROW_UNDER2,
|
||||||
|
/**/
|
||||||
|
|
||||||
ANIM_STD_HANDSUP,
|
ANIM_STD_HANDSUP,
|
||||||
ANIM_STD_HANDSCOWER,
|
ANIM_STD_HANDSCOWER,
|
||||||
ANIM_STD_PARTIAL_FUCKU,
|
ANIM_STD_PARTIAL_FUCKU,
|
||||||
@@ -192,96 +206,5 @@ enum AnimationId
|
|||||||
ANIM_STD_PHONE_OUT,
|
ANIM_STD_PHONE_OUT,
|
||||||
ANIM_STD_PHONE_TALK,
|
ANIM_STD_PHONE_TALK,
|
||||||
|
|
||||||
ANIM_STD_SEAT_DOWN,
|
ANIM_STD_NUM
|
||||||
ANIM_STD_SEAT_UP,
|
|
||||||
ANIM_STD_SEAT_IDLE,
|
|
||||||
ANIM_STD_SEAT_RVRS,
|
|
||||||
ANIM_STD_ATM,
|
|
||||||
ANIM_STD_ABSEIL,
|
|
||||||
|
|
||||||
ANIM_STD_NUM,
|
|
||||||
|
|
||||||
ANIM_STD_VAN_OPEN_DOOR_REAR_LHS,
|
|
||||||
ANIM_STD_VAN_GET_IN_REAR_LHS,
|
|
||||||
ANIM_STD_VAN_CLOSE_DOOR_REAR_LHS,
|
|
||||||
ANIM_STD_VAN_GET_OUT_REAR_LHS,
|
|
||||||
ANIM_STD_VAN_OPEN_DOOR_REAR_RHS,
|
|
||||||
ANIM_STD_VAN_GET_IN_REAR_RHS,
|
|
||||||
ANIM_STD_VAN_CLOSE_DOOR_REAR_RHS,
|
|
||||||
ANIM_STD_VAN_GET_OUT_REAR_RHS,
|
|
||||||
|
|
||||||
ANIM_STD_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_READY,
|
|
||||||
ANIM_BIKE_LEFT,
|
|
||||||
ANIM_BIKE_RIGHT,
|
|
||||||
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_LHS,
|
|
||||||
ANIM_BIKE_GETOFF_RHS,
|
|
||||||
ANIM_BIKE_GETOFF_BACK,
|
|
||||||
ANIM_BIKE_DRIVEBY_LHS,
|
|
||||||
ANIM_BIKE_DRIVEBY_RHS,
|
|
||||||
ANIM_BIKE_DRIVEBY_FORWARD,
|
|
||||||
ANIM_BIKE_RIDE_P,
|
|
||||||
|
|
||||||
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_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_SUNBATHE_IDLE,
|
|
||||||
ANIM_SUNBATHE_DOWN,
|
|
||||||
ANIM_SUNBATHE_UP,
|
|
||||||
ANIM_SUNBATHE_ESCAPE,
|
|
||||||
|
|
||||||
ANIM_MEDIC_CPR,
|
|
||||||
|
|
||||||
ANIM_PLAYER_IDLE1,
|
|
||||||
ANIM_PLAYER_IDLE2,
|
|
||||||
ANIM_PLAYER_IDLE3,
|
|
||||||
ANIM_PLAYER_IDLE4,
|
|
||||||
|
|
||||||
ANIM_RIOT_ANGRY,
|
|
||||||
ANIM_RIOT_ANGRY_B,
|
|
||||||
ANIM_RIOT_CHANT,
|
|
||||||
ANIM_RIOT_PUNCHES,
|
|
||||||
ANIM_RIOT_SHOUT,
|
|
||||||
ANIM_RIOT_CHALLENGE,
|
|
||||||
ANIM_RIOT_FUCKYOU,
|
|
||||||
|
|
||||||
ANIM_STRIP_A,
|
|
||||||
ANIM_STRIP_B,
|
|
||||||
ANIM_STRIP_C,
|
|
||||||
ANIM_STRIP_D,
|
|
||||||
ANIM_STRIP_E,
|
|
||||||
ANIM_STRIP_F,
|
|
||||||
ANIM_STRIP_G,
|
|
||||||
};
|
};
|
||||||
@@ -2,29 +2,26 @@
|
|||||||
#include "PedModelInfo.h"
|
#include "PedModelInfo.h"
|
||||||
#include "Bones.h"
|
#include "Bones.h"
|
||||||
|
|
||||||
|
#ifdef PED_SKIN
|
||||||
|
|
||||||
int
|
int
|
||||||
ConvertPedNode2BoneTag(int node)
|
ConvertPedNode2BoneTag(int node)
|
||||||
{
|
{
|
||||||
switch(node){
|
switch(node){
|
||||||
case PED_MID: return BONE_spine1;
|
case PED_TORSO: return BONE_waist;
|
||||||
case PED_HEAD: return BONE_head;
|
case PED_MID: return BONE_torso; // this is what Xbox/Mobile use
|
||||||
case PED_UPPERARML: return BONE_l_upperarm;
|
// return BONE_mid; // this is what PS2/PC use
|
||||||
case PED_UPPERARMR: return BONE_r_upperarm;
|
case PED_HEAD: return BONE_head;
|
||||||
case PED_HANDL: return BONE_l_hand;
|
case PED_UPPERARML: return BONE_upperarml;
|
||||||
case PED_HANDR: return BONE_r_hand;
|
case PED_UPPERARMR: return BONE_upperarmr;
|
||||||
case PED_UPPERLEGL: return BONE_l_thigh;
|
case PED_HANDL: return BONE_Lhand;
|
||||||
case PED_UPPERLEGR: return BONE_r_thigh;
|
case PED_HANDR: return BONE_Rhand;
|
||||||
case PED_FOOTL: return BONE_l_foot;
|
case PED_UPPERLEGL: return BONE_upperlegl;
|
||||||
case PED_FOOTR: return BONE_r_foot;
|
case PED_UPPERLEGR: return BONE_upperlegr;
|
||||||
case PED_LOWERLEGR: return BONE_r_calf;
|
case PED_FOOTL: return BONE_footl;
|
||||||
case PED_LOWERLEGL: return BONE_l_calf;
|
case PED_FOOTR: return BONE_footr;
|
||||||
case PED_FOREARML: return BONE_l_forearm;
|
case PED_LOWERLEGR: return BONE_lowerlegl;
|
||||||
case PED_FOREARMR: return BONE_r_forearm;
|
|
||||||
case PED_CLAVICLEL: return BONE_l_clavicle;
|
|
||||||
case PED_CLAVICLER: return BONE_r_clavicle;
|
|
||||||
case PED_NECK: return BONE_neck;
|
|
||||||
}
|
}
|
||||||
assert(0 && "this node has no bone");
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,28 +29,24 @@ const char*
|
|||||||
ConvertBoneTag2BoneName(int tag)
|
ConvertBoneTag2BoneName(int tag)
|
||||||
{
|
{
|
||||||
switch(tag){
|
switch(tag){
|
||||||
case BONE_root: return "Root";
|
case BONE_waist: return "Swaist";
|
||||||
case BONE_pelvis: return "Pelvis";
|
case BONE_upperlegr: return "Supperlegr";
|
||||||
case BONE_spine: return "Spine";
|
case BONE_lowerlegr: return "Slowerlegr";
|
||||||
case BONE_spine1: return "Spine1";
|
case BONE_footr: return "Sfootr";
|
||||||
case BONE_neck: return "Neck";
|
case BONE_upperlegl: return "Supperlegl";
|
||||||
case BONE_head: return "Head";
|
case BONE_lowerlegl: return "Slowerlegl";
|
||||||
case BONE_r_clavicle: return "Bip01 R Clavicle";
|
case BONE_footl: return "Sfootl";
|
||||||
case BONE_r_upperarm: return "R UpperArm";
|
case BONE_mid: return "Smid";
|
||||||
case BONE_r_forearm: return "R Forearm";
|
case BONE_torso: return "Storso";
|
||||||
case BONE_r_hand: return "R Hand";
|
case BONE_head: return "Shead";
|
||||||
case BONE_r_finger: return "R Fingers";
|
case BONE_upperarmr: return "Supperarmr";
|
||||||
case BONE_l_clavicle: return "Bip01 L Clavicle";
|
case BONE_lowerarmr: return "Slowerarmr";
|
||||||
case BONE_l_upperarm: return "L UpperArm";
|
case BONE_Rhand: return "SRhand";
|
||||||
case BONE_l_forearm: return "L Forearm";
|
case BONE_upperarml: return "Supperarml";
|
||||||
case BONE_l_hand: return "L Hand";
|
case BONE_lowerarml: return "Slowerarml";
|
||||||
case BONE_l_finger: return "L Fingers";
|
case BONE_Lhand: return "SLhand";
|
||||||
case BONE_l_thigh: return "L Thigh";
|
|
||||||
case BONE_l_calf: return "L Calf";
|
|
||||||
case BONE_l_foot: return "L Foot";
|
|
||||||
case BONE_r_thigh: return "R Thigh";
|
|
||||||
case BONE_r_calf: return "R Calf";
|
|
||||||
case BONE_r_foot: return "R Foot";
|
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -2,28 +2,22 @@
|
|||||||
|
|
||||||
enum BoneTag
|
enum BoneTag
|
||||||
{
|
{
|
||||||
BONE_root = 0,
|
BONE_waist,
|
||||||
BONE_pelvis = 1,
|
BONE_upperlegr,
|
||||||
BONE_spine = 2,
|
BONE_lowerlegr,
|
||||||
BONE_spine1 = 3,
|
BONE_footr,
|
||||||
BONE_neck = 4,
|
BONE_upperlegl,
|
||||||
BONE_head = 5,
|
BONE_lowerlegl,
|
||||||
BONE_l_clavicle = 31,
|
BONE_footl,
|
||||||
BONE_l_upperarm = 32,
|
BONE_mid,
|
||||||
BONE_l_forearm = 33,
|
BONE_torso,
|
||||||
BONE_l_hand = 34,
|
BONE_head,
|
||||||
BONE_l_finger = 35,
|
BONE_upperarmr,
|
||||||
BONE_r_clavicle = 21,
|
BONE_lowerarmr,
|
||||||
BONE_r_upperarm = 22,
|
BONE_Rhand,
|
||||||
BONE_r_forearm = 23,
|
BONE_upperarml,
|
||||||
BONE_r_hand = 24,
|
BONE_lowerarml,
|
||||||
BONE_r_finger = 25,
|
BONE_Lhand,
|
||||||
BONE_l_thigh = 41,
|
|
||||||
BONE_l_calf = 42,
|
|
||||||
BONE_l_foot = 43,
|
|
||||||
BONE_r_thigh = 51,
|
|
||||||
BONE_r_calf = 52,
|
|
||||||
BONE_r_foot = 53,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int ConvertPedNode2BoneTag(int node);
|
int ConvertPedNode2BoneTag(int node);
|
||||||
|
|||||||
@@ -16,92 +16,94 @@
|
|||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
#include "Wanted.h"
|
#include "Wanted.h"
|
||||||
|
#include "CutsceneHead.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "TempColModels.h"
|
#include "TempColModels.h"
|
||||||
#include "ColStore.h"
|
|
||||||
#include "Radar.h"
|
|
||||||
#include "Pools.h"
|
|
||||||
|
|
||||||
const struct {
|
const struct {
|
||||||
const char *szTrackName;
|
const char *szTrackName;
|
||||||
int iTrackId;
|
int iTrackId;
|
||||||
} musicNameIdAssoc[] = {
|
} musicNameIdAssoc[] = {
|
||||||
{ "ASS_1", STREAMED_SOUND_CUTSCENE_ASS_1 },
|
{ "JB", STREAMED_SOUND_NEWS_INTRO },
|
||||||
{ "ASS_2", STREAMED_SOUND_CUTSCENE_ASS_2 },
|
{ "BET", STREAMED_SOUND_BANK_INTRO },
|
||||||
{ "BANK_1", STREAMED_SOUND_CUTSCENE_BANK_1 },
|
{ "L1_LG", STREAMED_SOUND_CUTSCENE_LUIGI1_LG },
|
||||||
{ "BANK_2A", STREAMED_SOUND_CUTSCENE_BANK_2A },
|
{ "L2_DSB", STREAMED_SOUND_CUTSCENE_LUIGI2_DSB },
|
||||||
{ "BANK_2B", STREAMED_SOUND_CUTSCENE_BANK_2B },
|
{ "L3_DM", STREAMED_SOUND_CUTSCENE_LUIGI3_DM },
|
||||||
{ "BANK_3A", STREAMED_SOUND_CUTSCENE_BANK_3A },
|
{ "L4_PAP", STREAMED_SOUND_CUTSCENE_LUIGI4_PAP },
|
||||||
{ "BANK_3B", STREAMED_SOUND_CUTSCENE_BANK_3B },
|
{ "L5_TFB", STREAMED_SOUND_CUTSCENE_LUIGI5_TFB },
|
||||||
{ "BANK_4", STREAMED_SOUND_CUTSCENE_BANK_4 },
|
{ "J0_DM2", STREAMED_SOUND_CUTSCENE_JOEY0_DM2 },
|
||||||
{ "BIKE_1", STREAMED_SOUND_CUTSCENE_BIKE_1 },
|
{ "J1_LFL", STREAMED_SOUND_CUTSCENE_JOEY1_LFL },
|
||||||
{ "BIKE_2", STREAMED_SOUND_CUTSCENE_BIKE_2 },
|
{ "J2_KCL", STREAMED_SOUND_CUTSCENE_JOEY2_KCL },
|
||||||
{ "BIKE_3", STREAMED_SOUND_CUTSCENE_BIKE_3 },
|
{ "J3_VH", STREAMED_SOUND_CUTSCENE_JOEY3_VH },
|
||||||
{ "BUD_1", STREAMED_SOUND_CUTSCENE_BUD_1 },
|
{ "J4_ETH", STREAMED_SOUND_CUTSCENE_JOEY4_ETH },
|
||||||
{ "BUD_2", STREAMED_SOUND_CUTSCENE_BUD_2 },
|
{ "J5_DST", STREAMED_SOUND_CUTSCENE_JOEY5_DST },
|
||||||
{ "BUD_3", STREAMED_SOUND_CUTSCENE_BUD_3 },
|
{ "J6_TBJ", STREAMED_SOUND_CUTSCENE_JOEY6_TBJ },
|
||||||
{ "CAP_1", STREAMED_SOUND_CUTSCENE_CAP_1 },
|
{ "T1_TOL", STREAMED_SOUND_CUTSCENE_TONI1_TOL },
|
||||||
{ "CAR_1", STREAMED_SOUND_CUTSCENE_CAR_1 },
|
{ "T2_TPU", STREAMED_SOUND_CUTSCENE_TONI2_TPU },
|
||||||
{ "CNT_1A", STREAMED_SOUND_CUTSCENE_CNT_1A },
|
{ "T3_MAS", STREAMED_SOUND_CUTSCENE_TONI3_MAS },
|
||||||
{ "CNT_1B", STREAMED_SOUND_CUTSCENE_CNT_1B },
|
{ "T4_TAT", STREAMED_SOUND_CUTSCENE_TONI4_TAT },
|
||||||
{ "CNT_2", STREAMED_SOUND_CUTSCENE_CNT_2 },
|
{ "T5_BF", STREAMED_SOUND_CUTSCENE_TONI5_BF },
|
||||||
{ "COK_1", STREAMED_SOUND_CUTSCENE_COK_1 },
|
{ "S0_MAS", STREAMED_SOUND_CUTSCENE_SAL0_MAS },
|
||||||
{ "COK_2A", STREAMED_SOUND_CUTSCENE_COK_2A },
|
{ "S1_PF", STREAMED_SOUND_CUTSCENE_SAL1_PF },
|
||||||
{ "COK_2B", STREAMED_SOUND_CUTSCENE_COK_2B },
|
{ "S2_CTG", STREAMED_SOUND_CUTSCENE_SAL2_CTG },
|
||||||
{ "COK_3", STREAMED_SOUND_CUTSCENE_COK_3 },
|
{ "S3_RTC", STREAMED_SOUND_CUTSCENE_SAL3_RTC },
|
||||||
{ "COK_4A", STREAMED_SOUND_CUTSCENE_COK_4A },
|
{ "S5_LRQ", STREAMED_SOUND_CUTSCENE_SAL5_LRQ },
|
||||||
{ "COK_4A2", STREAMED_SOUND_CUTSCENE_COK_4A2 },
|
{ "S4_BDBA", STREAMED_SOUND_CUTSCENE_SAL4_BDBA },
|
||||||
{ "COK_4B", STREAMED_SOUND_CUTSCENE_COK_4B },
|
{ "S4_BDBB", STREAMED_SOUND_CUTSCENE_SAL4_BDBB },
|
||||||
{ "COL_1", STREAMED_SOUND_CUTSCENE_COL_1 },
|
{ "S2_CTG2", STREAMED_SOUND_CUTSCENE_SAL2_CTG2 },
|
||||||
{ "COL_2", STREAMED_SOUND_CUTSCENE_COL_2 },
|
{ "S4_BDBD", STREAMED_SOUND_CUTSCENE_SAL4_BDBD },
|
||||||
{ "COL_3A", STREAMED_SOUND_CUTSCENE_COL_3A },
|
{ "S5_LRQB", STREAMED_SOUND_CUTSCENE_SAL5_LRQB },
|
||||||
{ "COL_4A", STREAMED_SOUND_CUTSCENE_COL_4A },
|
{ "S5_LRQC", STREAMED_SOUND_CUTSCENE_SAL5_LRQC },
|
||||||
{ "COL_5A", STREAMED_SOUND_CUTSCENE_COL_5A },
|
{ "A1_SS0", STREAMED_SOUND_CUTSCENE_ASUKA_1_SSO },
|
||||||
{ "COL_5B", STREAMED_SOUND_CUTSCENE_COL_5B },
|
{ "A2_PP", STREAMED_SOUND_CUTSCENE_ASUKA_2_PP },
|
||||||
{ "CUB_1", STREAMED_SOUND_CUTSCENE_CUB_1 },
|
{ "A3_SS", STREAMED_SOUND_CUTSCENE_ASUKA_3_SS },
|
||||||
{ "CUB_2", STREAMED_SOUND_CUTSCENE_CUB_2 },
|
{ "A4_PDR", STREAMED_SOUND_CUTSCENE_ASUKA_4_PDR },
|
||||||
{ "CUB_3", STREAMED_SOUND_CUTSCENE_CUB_3 },
|
{ "A5_K2FT", STREAMED_SOUND_CUTSCENE_ASUKA_5_K2FT},
|
||||||
{ "CUB_4", STREAMED_SOUND_CUTSCENE_CUB_4 },
|
{ "K1_KBO", STREAMED_SOUND_CUTSCENE_KENJI1_KBO },
|
||||||
{ "DRUG_1", STREAMED_SOUND_CUTSCENE_DRUG_1 },
|
{ "K2_GIS", STREAMED_SOUND_CUTSCENE_KENJI2_GIS },
|
||||||
{ "FIN", STREAMED_SOUND_CUTSCENE_FIN },
|
{ "K3_DS", STREAMED_SOUND_CUTSCENE_KENJI3_DS },
|
||||||
{ "FIN_2", STREAMED_SOUND_CUTSCENE_FIN2 },
|
{ "K4_SHI", STREAMED_SOUND_CUTSCENE_KENJI4_SHI },
|
||||||
{ "FINALE", STREAMED_SOUND_CUTSCENE_FINALE },
|
{ "K5_SD", STREAMED_SOUND_CUTSCENE_KENJI5_SD },
|
||||||
{ "HAT_1", STREAMED_SOUND_CUTSCENE_HAT_1 },
|
{ "R0_PDR2", STREAMED_SOUND_CUTSCENE_RAY0_PDR2 },
|
||||||
{ "HAT_2", STREAMED_SOUND_CUTSCENE_HAT_2 },
|
{ "R1_SW", STREAMED_SOUND_CUTSCENE_RAY1_SW },
|
||||||
{ "HAT_3", STREAMED_SOUND_CUTSCENE_HAT_3 },
|
{ "R2_AP", STREAMED_SOUND_CUTSCENE_RAY2_AP },
|
||||||
{ "ICE_1", STREAMED_SOUND_CUTSCENE_ICE_1 },
|
{ "R3_ED", STREAMED_SOUND_CUTSCENE_RAY3_ED },
|
||||||
{ "INT_A", STREAMED_SOUND_CUTSCENE_INT_A },
|
{ "R4_GF", STREAMED_SOUND_CUTSCENE_RAY4_GF },
|
||||||
{ "INT_B", STREAMED_SOUND_CUTSCENE_INT_B },
|
{ "R5_PB", STREAMED_SOUND_CUTSCENE_RAY5_PB },
|
||||||
{ "INT_D", STREAMED_SOUND_CUTSCENE_INT_D },
|
{ "R6_MM", STREAMED_SOUND_CUTSCENE_RAY6_MM },
|
||||||
{ "INT_M", STREAMED_SOUND_CUTSCENE_INT_M },
|
{ "D1_STOG", STREAMED_SOUND_CUTSCENE_DONALD1_STOG },
|
||||||
{ "LAW_1A", STREAMED_SOUND_CUTSCENE_LAW_1A },
|
{ "D2_KK", STREAMED_SOUND_CUTSCENE_DONALD2_KK },
|
||||||
{ "LAW_1B", STREAMED_SOUND_CUTSCENE_LAW_1B },
|
{ "D3_ADO", STREAMED_SOUND_CUTSCENE_DONALD3_ADO },
|
||||||
{ "LAW_2A", STREAMED_SOUND_CUTSCENE_LAW_2A },
|
{ "D5_ES", STREAMED_SOUND_CUTSCENE_DONALD5_ES },
|
||||||
{ "LAW_2B", STREAMED_SOUND_CUTSCENE_LAW_2B },
|
{ "D7_MLD", STREAMED_SOUND_CUTSCENE_DONALD7_MLD },
|
||||||
{ "LAW_2C", STREAMED_SOUND_CUTSCENE_LAW_2C },
|
{ "D4_GTA", STREAMED_SOUND_CUTSCENE_DONALD4_GTA },
|
||||||
{ "LAW_3", STREAMED_SOUND_CUTSCENE_LAW_3 },
|
{ "D4_GTA2", STREAMED_SOUND_CUTSCENE_DONALD4_GTA2 },
|
||||||
{ "LAW_4", STREAMED_SOUND_CUTSCENE_LAW_4 },
|
{ "D6_STS", STREAMED_SOUND_CUTSCENE_DONALD6_STS },
|
||||||
{ "PHIL_1", STREAMED_SOUND_CUTSCENE_PHIL_1 },
|
{ "A6_BAIT", STREAMED_SOUND_CUTSCENE_ASUKA6_BAIT },
|
||||||
{ "PHIL_2", STREAMED_SOUND_CUTSCENE_PHIL_2 },
|
{ "A7_ETG", STREAMED_SOUND_CUTSCENE_ASUKA7_ETG },
|
||||||
{ "PORN_1", STREAMED_SOUND_CUTSCENE_PORN_1 },
|
{ "A8_PS", STREAMED_SOUND_CUTSCENE_ASUKA8_PS },
|
||||||
{ "PORN_2", STREAMED_SOUND_CUTSCENE_PORN_2 },
|
{ "A9_ASD", STREAMED_SOUND_CUTSCENE_ASUKA9_ASD },
|
||||||
{ "PORN_3", STREAMED_SOUND_CUTSCENE_PORN_3 },
|
{ "K4_SHI2", STREAMED_SOUND_CUTSCENE_KENJI4_SHI2 },
|
||||||
{ "PORN_4", STREAMED_SOUND_CUTSCENE_PORN_4 },
|
{ "C1_TEX", STREAMED_SOUND_CUTSCENE_CATALINA1_TEX },
|
||||||
{ "RESC_1A", STREAMED_SOUND_CUTSCENE_RESC_1A },
|
{ "EL_PH1", STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1 },
|
||||||
{ "ROK_1", STREAMED_SOUND_CUTSCENE_ROK_1 },
|
{ "EL_PH2", STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2 },
|
||||||
{ "ROK_2", STREAMED_SOUND_CUTSCENE_ROK_2 },
|
{ "EL_PH3", STREAMED_SOUND_CUTSCENE_ELBURRO3_PH3 },
|
||||||
{ "ROK_3A", STREAMED_SOUND_CUTSCENE_ROK_3A },
|
{ "EL_PH4", STREAMED_SOUND_CUTSCENE_ELBURRO4_PH4 },
|
||||||
{ "STRIPA", STREAMED_SOUND_CUTSCENE_STRIPA },
|
{ "YD_PH1", STREAMED_SOUND_CUTSCENE_YARDIE_PH1 },
|
||||||
{ "TAX_1", STREAMED_SOUND_CUTSCENE_TAX_1 },
|
{ "YD_PH2", STREAMED_SOUND_CUTSCENE_YARDIE_PH2 },
|
||||||
{ "TEX_1", STREAMED_SOUND_CUTSCENE_TEX_1 },
|
{ "YD_PH3", STREAMED_SOUND_CUTSCENE_YARDIE_PH3 },
|
||||||
{ "TEX_2", STREAMED_SOUND_CUTSCENE_TEX_2 },
|
{ "YD_PH4", STREAMED_SOUND_CUTSCENE_YARDIE_PH4 },
|
||||||
{ "TEX_3", STREAMED_SOUND_CUTSCENE_TEX_3 },
|
{ "HD_PH1", STREAMED_SOUND_CUTSCENE_HOODS_PH1 },
|
||||||
{ "GSPOT", STREAMED_SOUND_CUTSCENE_GLIGHT },
|
{ "HD_PH2", STREAMED_SOUND_CUTSCENE_HOODS_PH2 },
|
||||||
{ "FIST", STREAMED_SOUND_CUTSCENE_FIST },
|
{ "HD_PH3", STREAMED_SOUND_CUTSCENE_HOODS_PH3 },
|
||||||
{ "EL_PH1", STREAMED_SOUND_CUTSCENE_ELBURRO1_PH1 },
|
{ "HD_PH4", STREAMED_SOUND_CUTSCENE_HOODS_PH4 },
|
||||||
{ "EL_PH2", STREAMED_SOUND_CUTSCENE_ELBURRO2_PH2 },
|
{ "HD_PH5", STREAMED_SOUND_CUTSCENE_HOODS_PH5 },
|
||||||
{ NULL, 0 }
|
{ "MT_PH1", STREAMED_SOUND_CUTSCENE_MARTY_PH1 },
|
||||||
|
{ "MT_PH2", STREAMED_SOUND_CUTSCENE_MARTY_PH2 },
|
||||||
|
{ "MT_PH3", STREAMED_SOUND_CUTSCENE_MARTY_PH3 },
|
||||||
|
{ "MT_PH4", STREAMED_SOUND_CUTSCENE_MARTY_PH4 },
|
||||||
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -126,18 +128,7 @@ char CCutsceneMgr::ms_cutsceneName[CUTSCENENAMESIZE];
|
|||||||
CAnimBlendAssocGroup CCutsceneMgr::ms_cutsceneAssociations;
|
CAnimBlendAssocGroup CCutsceneMgr::ms_cutsceneAssociations;
|
||||||
CVector CCutsceneMgr::ms_cutsceneOffset;
|
CVector CCutsceneMgr::ms_cutsceneOffset;
|
||||||
float CCutsceneMgr::ms_cutsceneTimer;
|
float CCutsceneMgr::ms_cutsceneTimer;
|
||||||
bool CCutsceneMgr::ms_wasCutsceneSkipped;
|
|
||||||
uint32 CCutsceneMgr::ms_cutsceneLoadStatus;
|
uint32 CCutsceneMgr::ms_cutsceneLoadStatus;
|
||||||
bool CCutsceneMgr::ms_useCutsceneShadows = true;
|
|
||||||
|
|
||||||
bool bCamLoaded;
|
|
||||||
bool bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver; // pls don't shrink the name :P
|
|
||||||
int32 NumberOfSavedWeapons;
|
|
||||||
eWeaponType SavedWeaponIDs[TOTAL_WEAPON_SLOTS];
|
|
||||||
int32 SavedWeaponAmmo[TOTAL_WEAPON_SLOTS];
|
|
||||||
char uncompressedAnims[8][32];
|
|
||||||
uint32 numUncompressedAnims;
|
|
||||||
|
|
||||||
|
|
||||||
RpAtomic *
|
RpAtomic *
|
||||||
CalculateBoundingSphereRadiusCB(RpAtomic *atomic, void *data)
|
CalculateBoundingSphereRadiusCB(RpAtomic *atomic, void *data)
|
||||||
@@ -159,17 +150,13 @@ CCutsceneMgr::Initialise(void)
|
|||||||
{
|
{
|
||||||
ms_numCutsceneObjs = 0;
|
ms_numCutsceneObjs = 0;
|
||||||
ms_loaded = false;
|
ms_loaded = false;
|
||||||
ms_wasCutsceneSkipped = false;
|
|
||||||
ms_running = false;
|
ms_running = false;
|
||||||
ms_useLodMultiplier = false;
|
|
||||||
ms_animLoaded = false;
|
ms_animLoaded = false;
|
||||||
ms_cutsceneProcessing = false;
|
ms_cutsceneProcessing = false;
|
||||||
|
ms_useLodMultiplier = false;
|
||||||
|
|
||||||
ms_pCutsceneDir = new CDirectory(CUTSCENEDIRSIZE);
|
ms_pCutsceneDir = new CDirectory(CUTSCENEDIRSIZE);
|
||||||
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
|
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
|
||||||
|
|
||||||
numUncompressedAnims = 0;
|
|
||||||
uncompressedAnims[0][0] = '\0';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -187,10 +174,9 @@ CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
|
|||||||
CPlayerPed *pPlayerPed;
|
CPlayerPed *pPlayerPed;
|
||||||
|
|
||||||
ms_cutsceneProcessing = true;
|
ms_cutsceneProcessing = true;
|
||||||
ms_wasCutsceneSkipped = false;
|
if (!strcasecmp(szCutsceneName, "jb"))
|
||||||
CTimer::Suspend();
|
ms_useLodMultiplier = true;
|
||||||
if (!bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver)
|
CTimer::Stop();
|
||||||
CStreaming::RemoveCurrentZonesModels();
|
|
||||||
|
|
||||||
ms_pCutsceneDir->numEntries = 0;
|
ms_pCutsceneDir->numEntries = 0;
|
||||||
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
|
ms_pCutsceneDir->ReadDirFile("ANIM\\CUTS.DIR");
|
||||||
@@ -199,42 +185,32 @@ CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
|
|||||||
CGame::DrasticTidyUpMemory(true);
|
CGame::DrasticTidyUpMemory(true);
|
||||||
|
|
||||||
strcpy(ms_cutsceneName, szCutsceneName);
|
strcpy(ms_cutsceneName, szCutsceneName);
|
||||||
|
file = CFileMgr::OpenFile("ANIM\\CUTS.IMG", "rb");
|
||||||
RwStream *stream;
|
|
||||||
stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "ANIM\\CUTS.IMG");
|
|
||||||
assert(stream);
|
|
||||||
|
|
||||||
// Load animations
|
// Load animations
|
||||||
sprintf(gString, "%s.IFP", szCutsceneName);
|
sprintf(gString, "%s.IFP", szCutsceneName);
|
||||||
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
|
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
|
||||||
CStreaming::MakeSpaceFor(size << 11);
|
CStreaming::MakeSpaceFor(size << 11);
|
||||||
CStreaming::ImGonnaUseStreamingMemory();
|
CStreaming::ImGonnaUseStreamingMemory();
|
||||||
RwStreamSkip(stream, offset << 11);
|
CFileMgr::Seek(file, offset << 11, SEEK_SET);
|
||||||
CAnimManager::LoadAnimFile(stream, true, uncompressedAnims);
|
CAnimManager::LoadAnimFile(file, false);
|
||||||
ms_cutsceneAssociations.CreateAssociations(szCutsceneName);
|
ms_cutsceneAssociations.CreateAssociations(szCutsceneName);
|
||||||
CStreaming::IHaveUsedStreamingMemory();
|
CStreaming::IHaveUsedStreamingMemory();
|
||||||
ms_animLoaded = true;
|
ms_animLoaded = true;
|
||||||
} else {
|
} else {
|
||||||
ms_animLoaded = false;
|
ms_animLoaded = false;
|
||||||
}
|
}
|
||||||
RwStreamClose(stream, nil);
|
|
||||||
|
|
||||||
// Load camera data
|
// Load camera data
|
||||||
file = CFileMgr::OpenFile("ANIM\\CUTS.IMG", "rb");
|
|
||||||
sprintf(gString, "%s.DAT", szCutsceneName);
|
sprintf(gString, "%s.DAT", szCutsceneName);
|
||||||
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
|
if (ms_pCutsceneDir->FindItem(gString, offset, size)) {
|
||||||
CStreaming::ImGonnaUseStreamingMemory();
|
|
||||||
CFileMgr::Seek(file, offset << 11, SEEK_SET);
|
CFileMgr::Seek(file, offset << 11, SEEK_SET);
|
||||||
TheCamera.LoadPathSplines(file);
|
TheCamera.LoadPathSplines(file);
|
||||||
CStreaming::IHaveUsedStreamingMemory();
|
|
||||||
bCamLoaded = true;
|
|
||||||
} else {
|
|
||||||
bCamLoaded = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CFileMgr::CloseFile(file);
|
CFileMgr::CloseFile(file);
|
||||||
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "finale")) {
|
if (CGeneral::faststricmp(ms_cutsceneName, "end")) {
|
||||||
DMAudio.ChangeMusicMode(MUSICMODE_CUTSCENE);
|
DMAudio.ChangeMusicMode(MUSICMODE_CUTSCENE);
|
||||||
int trackId = FindCutsceneAudioTrackId(szCutsceneName);
|
int trackId = FindCutsceneAudioTrackId(szCutsceneName);
|
||||||
if (trackId != -1) {
|
if (trackId != -1) {
|
||||||
@@ -249,23 +225,30 @@ CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName)
|
|||||||
ms_cutsceneOffset = CVector(0.0f, 0.0f, 0.0f);
|
ms_cutsceneOffset = CVector(0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
pPlayerPed = FindPlayerPed();
|
pPlayerPed = FindPlayerPed();
|
||||||
|
CTimer::Update();
|
||||||
|
|
||||||
pPlayerPed->m_pWanted->ClearQdCrimes();
|
pPlayerPed->m_pWanted->ClearQdCrimes();
|
||||||
pPlayerPed->bIsVisible = false;
|
pPlayerPed->bIsVisible = false;
|
||||||
pPlayerPed->m_fCurrentStamina = pPlayerPed->m_fMaxStamina;
|
pPlayerPed->m_fCurrentStamina = pPlayerPed->m_fMaxStamina;
|
||||||
CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE);
|
CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE);
|
||||||
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(true);
|
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(true);
|
||||||
|
}
|
||||||
|
|
||||||
CTimer::Resume();
|
void
|
||||||
|
CCutsceneMgr::SetHeadAnim(const char *animName, CObject *pObject)
|
||||||
|
{
|
||||||
|
CCutsceneHead *pCutsceneHead = (CCutsceneHead*)pObject;
|
||||||
|
char szAnim[CUTSCENENAMESIZE * 2];
|
||||||
|
|
||||||
|
sprintf(szAnim, "%s_%s", ms_cutsceneName, animName);
|
||||||
|
pCutsceneHead->PlayAnimation(szAnim);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CCutsceneMgr::FinishCutscene()
|
CCutsceneMgr::FinishCutscene()
|
||||||
{
|
{
|
||||||
ms_wasCutsceneSkipped = true;
|
CCutsceneMgr::ms_cutsceneTimer = TheCamera.GetCutSceneFinishTime() * 0.001f;
|
||||||
if (bCamLoaded) {
|
TheCamera.FinishCutscene();
|
||||||
CCutsceneMgr::ms_cutsceneTimer = TheCamera.GetCutSceneFinishTime() * 0.001f;
|
|
||||||
TheCamera.FinishCutscene();
|
|
||||||
}
|
|
||||||
|
|
||||||
FindPlayerPed()->bIsVisible = true;
|
FindPlayerPed()->bIsVisible = true;
|
||||||
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false);
|
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false);
|
||||||
@@ -274,11 +257,9 @@ CCutsceneMgr::FinishCutscene()
|
|||||||
void
|
void
|
||||||
CCutsceneMgr::SetupCutsceneToStart(void)
|
CCutsceneMgr::SetupCutsceneToStart(void)
|
||||||
{
|
{
|
||||||
if (bCamLoaded) {
|
TheCamera.SetCamCutSceneOffSet(ms_cutsceneOffset);
|
||||||
TheCamera.SetCamCutSceneOffSet(ms_cutsceneOffset);
|
TheCamera.TakeControlWithSpline(JUMP_CUT);
|
||||||
TheCamera.TakeControlWithSpline(JUMP_CUT);
|
TheCamera.SetWideScreenOn();
|
||||||
TheCamera.SetWideScreenOn();
|
|
||||||
}
|
|
||||||
|
|
||||||
ms_cutsceneOffset.z++;
|
ms_cutsceneOffset.z++;
|
||||||
|
|
||||||
@@ -286,27 +267,12 @@ CCutsceneMgr::SetupCutsceneToStart(void)
|
|||||||
assert(RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP);
|
assert(RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP);
|
||||||
if (CAnimBlendAssociation *pAnimBlendAssoc = RpAnimBlendClumpGetFirstAssociation((RpClump*)ms_pCutsceneObjects[i]->m_rwObject)) {
|
if (CAnimBlendAssociation *pAnimBlendAssoc = RpAnimBlendClumpGetFirstAssociation((RpClump*)ms_pCutsceneObjects[i]->m_rwObject)) {
|
||||||
assert(pAnimBlendAssoc->hierarchy->sequences[0].HasTranslation());
|
assert(pAnimBlendAssoc->hierarchy->sequences[0].HasTranslation());
|
||||||
if (ms_pCutsceneObjects[i]->m_pAttachTo != nil) {
|
ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrame(0))->translation);
|
||||||
pAnimBlendAssoc->flags &= (~ASSOC_HAS_TRANSLATION);
|
CWorld::Add(ms_pCutsceneObjects[i]);
|
||||||
} else {
|
|
||||||
if (pAnimBlendAssoc->hierarchy->IsCompressed()){
|
|
||||||
KeyFrameTransCompressed *keyFrames = ((KeyFrameTransCompressed*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrameCompressed(0));
|
|
||||||
CVector trans;
|
|
||||||
keyFrames->GetTranslation(&trans);
|
|
||||||
ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + trans);
|
|
||||||
}else{
|
|
||||||
KeyFrameTrans *keyFrames = ((KeyFrameTrans*)pAnimBlendAssoc->hierarchy->sequences[0].GetKeyFrame(0));
|
|
||||||
ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset + keyFrames->translation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pAnimBlendAssoc->SetRun();
|
pAnimBlendAssoc->SetRun();
|
||||||
} else {
|
} else {
|
||||||
ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset);
|
ms_pCutsceneObjects[i]->SetPosition(ms_cutsceneOffset);
|
||||||
}
|
}
|
||||||
CWorld::Add(ms_pCutsceneObjects[i]);
|
|
||||||
if (RwObjectGetType(ms_pCutsceneObjects[i]->m_rwObject) == rpCLUMP) {
|
|
||||||
ms_pCutsceneObjects[i]->UpdateRpHAnim();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
@@ -322,55 +288,25 @@ CCutsceneMgr::SetCutsceneAnim(const char *animName, CObject *pObject)
|
|||||||
CAnimBlendClumpData *pAnimBlendClumpData;
|
CAnimBlendClumpData *pAnimBlendClumpData;
|
||||||
|
|
||||||
assert(RwObjectGetType(pObject->m_rwObject) == rpCLUMP);
|
assert(RwObjectGetType(pObject->m_rwObject) == rpCLUMP);
|
||||||
debug("Give cutscene anim %s\n", animName);
|
|
||||||
RpAnimBlendClumpRemoveAllAssociations((RpClump*)pObject->m_rwObject);
|
RpAnimBlendClumpRemoveAllAssociations((RpClump*)pObject->m_rwObject);
|
||||||
|
|
||||||
pNewAnim = ms_cutsceneAssociations.GetAnimation(animName);
|
|
||||||
if (!pNewAnim) {
|
|
||||||
debug("\n\nHaven't I told you I can't find the fucking animation %s\n\n\n", animName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pNewAnim->hierarchy->IsCompressed())
|
|
||||||
pNewAnim->hierarchy->keepCompressed = true;
|
|
||||||
|
|
||||||
CStreaming::ImGonnaUseStreamingMemory();
|
|
||||||
pNewAnim = ms_cutsceneAssociations.CopyAnimation(animName);
|
pNewAnim = ms_cutsceneAssociations.CopyAnimation(animName);
|
||||||
CStreaming::IHaveUsedStreamingMemory();
|
|
||||||
|
|
||||||
pNewAnim->SetCurrentTime(0.0f);
|
pNewAnim->SetCurrentTime(0.0f);
|
||||||
pNewAnim->flags |= ASSOC_HAS_TRANSLATION;
|
pNewAnim->flags |= ASSOC_HAS_TRANSLATION;
|
||||||
pNewAnim->flags &= ~ASSOC_RUNNING;
|
pNewAnim->flags &= ~ASSOC_RUNNING;
|
||||||
|
|
||||||
pAnimBlendClumpData = *RPANIMBLENDCLUMPDATA(pObject->m_rwObject);
|
pAnimBlendClumpData = *RPANIMBLENDCLUMPDATA(pObject->m_rwObject);
|
||||||
pAnimBlendClumpData->link.Prepend(&pNewAnim->link);
|
pAnimBlendClumpData->link.Prepend(&pNewAnim->link);
|
||||||
|
|
||||||
if (pNewAnim->hierarchy->keepCompressed)
|
|
||||||
pAnimBlendClumpData->frames->flag |= AnimBlendFrameData::COMPRESSED;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::SetCutsceneAnimToLoop(const char* animName)
|
|
||||||
{
|
|
||||||
ms_cutsceneAssociations.GetAnimation(animName)->flags |= ASSOC_REPEAT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CCutsceneHead *
|
CCutsceneHead *
|
||||||
CCutsceneMgr::AddCutsceneHead(CObject *pObject, int modelId)
|
CCutsceneMgr::AddCutsceneHead(CObject *pObject, int modelId)
|
||||||
{
|
{
|
||||||
return nil;
|
CCutsceneHead *pHead = new CCutsceneHead(pObject);
|
||||||
}
|
pHead->SetModelIndex(modelId);
|
||||||
|
CWorld::Add(pHead);
|
||||||
void UpdateCutsceneObjectBoundingBox(RpClump* clump, int modelId)
|
ms_pCutsceneObjects[ms_numCutsceneObjs++] = pHead;
|
||||||
{
|
return pHead;
|
||||||
if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) {
|
|
||||||
CColModel* pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01];
|
|
||||||
float radius = 0.0f;
|
|
||||||
RpClumpForAllAtomics(clump, CalculateBoundingSphereRadiusCB, &radius);
|
|
||||||
pColModel->boundingSphere.radius = radius;
|
|
||||||
pColModel->boundingBox.min = CVector(-radius, -radius, -radius);
|
|
||||||
pColModel->boundingBox.max = CVector(radius, radius, radius);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CCutsceneObject *
|
CCutsceneObject *
|
||||||
@@ -378,25 +314,20 @@ CCutsceneMgr::CreateCutsceneObject(int modelId)
|
|||||||
{
|
{
|
||||||
CBaseModelInfo *pModelInfo;
|
CBaseModelInfo *pModelInfo;
|
||||||
CColModel *pColModel;
|
CColModel *pColModel;
|
||||||
|
float radius;
|
||||||
|
RpClump *clump;
|
||||||
CCutsceneObject *pCutsceneObject;
|
CCutsceneObject *pCutsceneObject;
|
||||||
|
|
||||||
CStreaming::ImGonnaUseStreamingMemory();
|
|
||||||
debug("Created cutscene object %s\n", CModelInfo::GetModelInfo(modelId)->GetModelName());
|
|
||||||
if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) {
|
if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05) {
|
||||||
pModelInfo = CModelInfo::GetModelInfo(modelId);
|
pModelInfo = CModelInfo::GetModelInfo(modelId);
|
||||||
pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01];
|
pColModel = &CTempColModels::ms_colModelCutObj[modelId - MI_CUTOBJ01];
|
||||||
|
radius = 0.0f;
|
||||||
|
|
||||||
pModelInfo->SetColModel(pColModel);
|
pModelInfo->SetColModel(pColModel);
|
||||||
UpdateCutsceneObjectBoundingBox((RpClump*)pModelInfo->GetRwObject(), modelId);
|
clump = (RpClump*)pModelInfo->GetRwObject();
|
||||||
} else if (modelId >= MI_SPECIAL01 && modelId <= MI_SPECIAL21) {
|
assert(RwObjectGetType((RwObject*)clump) == rpCLUMP);
|
||||||
pModelInfo = CModelInfo::GetModelInfo(modelId);
|
RpClumpForAllAtomics(clump, CalculateBoundingSphereRadiusCB, &radius);
|
||||||
if (pModelInfo->GetColModel() == &CTempColModels::ms_colModelPed1) {
|
|
||||||
CColModel *colModel = new CColModel();
|
|
||||||
colModel->boundingSphere.radius = 2.0f;
|
|
||||||
colModel->boundingSphere.center = CVector(0.0f, 0.0f, 0.0f);
|
|
||||||
pModelInfo->SetColModel(colModel, true);
|
|
||||||
}
|
|
||||||
pColModel = pModelInfo->GetColModel();
|
|
||||||
float radius = 2.0f;
|
|
||||||
pColModel->boundingSphere.radius = radius;
|
pColModel->boundingSphere.radius = radius;
|
||||||
pColModel->boundingBox.min = CVector(-radius, -radius, -radius);
|
pColModel->boundingBox.min = CVector(-radius, -radius, -radius);
|
||||||
pColModel->boundingBox.max = CVector(radius, radius, radius);
|
pColModel->boundingBox.max = CVector(radius, radius, radius);
|
||||||
@@ -404,10 +335,7 @@ CCutsceneMgr::CreateCutsceneObject(int modelId)
|
|||||||
|
|
||||||
pCutsceneObject = new CCutsceneObject();
|
pCutsceneObject = new CCutsceneObject();
|
||||||
pCutsceneObject->SetModelIndex(modelId);
|
pCutsceneObject->SetModelIndex(modelId);
|
||||||
if (ms_useCutsceneShadows)
|
|
||||||
pCutsceneObject->CreateShadow();
|
|
||||||
ms_pCutsceneObjects[ms_numCutsceneObjs++] = pCutsceneObject;
|
ms_pCutsceneObjects[ms_numCutsceneObjs++] = pCutsceneObject;
|
||||||
CStreaming::IHaveUsedStreamingMemory();
|
|
||||||
return pCutsceneObject;
|
return pCutsceneObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,11 +343,9 @@ void
|
|||||||
CCutsceneMgr::DeleteCutsceneData(void)
|
CCutsceneMgr::DeleteCutsceneData(void)
|
||||||
{
|
{
|
||||||
if (!ms_loaded) return;
|
if (!ms_loaded) return;
|
||||||
CTimer::Suspend();
|
|
||||||
|
|
||||||
ms_cutsceneProcessing = false;
|
ms_cutsceneProcessing = false;
|
||||||
ms_useLodMultiplier = false;
|
ms_useLodMultiplier = false;
|
||||||
ms_useCutsceneShadows = true;
|
|
||||||
|
|
||||||
for (--ms_numCutsceneObjs; ms_numCutsceneObjs >= 0; ms_numCutsceneObjs--) {
|
for (--ms_numCutsceneObjs; ms_numCutsceneObjs >= 0; ms_numCutsceneObjs--) {
|
||||||
CWorld::Remove(ms_pCutsceneObjects[ms_numCutsceneObjs]);
|
CWorld::Remove(ms_pCutsceneObjects[ms_numCutsceneObjs]);
|
||||||
@@ -429,27 +355,12 @@ CCutsceneMgr::DeleteCutsceneData(void)
|
|||||||
}
|
}
|
||||||
ms_numCutsceneObjs = 0;
|
ms_numCutsceneObjs = 0;
|
||||||
|
|
||||||
for (int i = MI_SPECIAL01; i < MI_SPECIAL21; i++) {
|
|
||||||
CBaseModelInfo *minfo = CModelInfo::GetModelInfo(i);
|
|
||||||
CColModel *colModel = minfo->GetColModel();
|
|
||||||
if (colModel != &CTempColModels::ms_colModelPed1) {
|
|
||||||
delete colModel;
|
|
||||||
minfo->SetColModel(&CTempColModels::ms_colModelPed1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ms_animLoaded)
|
if (ms_animLoaded)
|
||||||
CAnimManager::RemoveLastAnimFile();
|
CAnimManager::RemoveLastAnimFile();
|
||||||
|
|
||||||
ms_animLoaded = false;
|
ms_animLoaded = false;
|
||||||
numUncompressedAnims = 0;
|
TheCamera.RestoreWithJumpCut();
|
||||||
uncompressedAnims[0][0] = '\0';
|
TheCamera.SetWideScreenOff();
|
||||||
|
|
||||||
if (bCamLoaded) {
|
|
||||||
TheCamera.RestoreWithJumpCut();
|
|
||||||
TheCamera.SetWideScreenOff();
|
|
||||||
TheCamera.DeleteCutSceneCamDataMemory();
|
|
||||||
}
|
|
||||||
ms_running = false;
|
ms_running = false;
|
||||||
ms_loaded = false;
|
ms_loaded = false;
|
||||||
|
|
||||||
@@ -457,42 +368,14 @@ CCutsceneMgr::DeleteCutsceneData(void)
|
|||||||
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CUTSCENE);
|
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CUTSCENE);
|
||||||
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false);
|
CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(false);
|
||||||
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "finale")) {
|
if (CGeneral::faststricmp(ms_cutsceneName, "end")) {
|
||||||
DMAudio.StopCutSceneMusic();
|
DMAudio.StopCutSceneMusic();
|
||||||
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
|
if (CGeneral::faststricmp(ms_cutsceneName, "bet"))
|
||||||
|
DMAudio.ChangeMusicMode(MUSICMODE_GAME);
|
||||||
}
|
}
|
||||||
|
CTimer::Stop();
|
||||||
CStreaming::ms_disableStreaming = false;
|
CGame::DrasticTidyUpMemory(TheCamera.GetScreenFadeStatus() == FADE_2);
|
||||||
CWorld::bProcessCutsceneOnly = false;
|
CTimer::Update();
|
||||||
|
|
||||||
if(bCamLoaded)
|
|
||||||
CGame::DrasticTidyUpMemory(TheCamera.GetScreenFadeStatus() == FADE_2);
|
|
||||||
|
|
||||||
CPad::GetPad(0)->Clear(false);
|
|
||||||
if (bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver) {
|
|
||||||
CStreaming::LoadInitialPeds();
|
|
||||||
CStreaming::LoadInitialWeapons();
|
|
||||||
CStreaming::LoadInitialVehicles();
|
|
||||||
bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver = false;
|
|
||||||
|
|
||||||
CPlayerPed *pPlayerPed = FindPlayerPed();
|
|
||||||
for (int i = 0; i < NumberOfSavedWeapons; i++) {
|
|
||||||
int32 weaponModelId = CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModelId;
|
|
||||||
uint8 flags = CStreaming::ms_aInfoForModel[weaponModelId].m_flags;
|
|
||||||
CStreaming::RequestModel(weaponModelId, STREAMFLAGS_DONT_REMOVE);
|
|
||||||
CStreaming::LoadAllRequestedModels(false);
|
|
||||||
if (CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id != -1) {
|
|
||||||
CStreaming::RequestModel(CWeaponInfo::GetWeaponInfo(SavedWeaponIDs[i])->m_nModel2Id, 0);
|
|
||||||
CStreaming::LoadAllRequestedModels(false);
|
|
||||||
}
|
|
||||||
if (!(flags & STREAMFLAGS_DONT_REMOVE))
|
|
||||||
CStreaming::SetModelIsDeletable(weaponModelId);
|
|
||||||
pPlayerPed->GiveWeapon(SavedWeaponIDs[i], SavedWeaponAmmo[i], true);
|
|
||||||
}
|
|
||||||
NumberOfSavedWeapons = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
CTimer::Resume();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -509,7 +392,7 @@ CCutsceneMgr::Update(void)
|
|||||||
switch (ms_cutsceneLoadStatus) {
|
switch (ms_cutsceneLoadStatus) {
|
||||||
case CUTSCENE_LOADING_AUDIO:
|
case CUTSCENE_LOADING_AUDIO:
|
||||||
SetupCutsceneToStart();
|
SetupCutsceneToStart();
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "finale"))
|
if (CGeneral::faststricmp(ms_cutsceneName, "end"))
|
||||||
DMAudio.PlayPreloadedCutSceneMusic();
|
DMAudio.PlayPreloadedCutSceneMusic();
|
||||||
ms_cutsceneLoadStatus++;
|
ms_cutsceneLoadStatus++;
|
||||||
break;
|
break;
|
||||||
@@ -527,157 +410,15 @@ CCutsceneMgr::Update(void)
|
|||||||
if (!ms_running) return;
|
if (!ms_running) return;
|
||||||
|
|
||||||
ms_cutsceneTimer += CTimer::GetTimeStepNonClippedInSeconds();
|
ms_cutsceneTimer += CTimer::GetTimeStepNonClippedInSeconds();
|
||||||
|
if (CGeneral::faststricmp(ms_cutsceneName, "end") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
|
||||||
for (int i = 0; i < ms_numCutsceneObjs; i++) {
|
if (CPad::GetPad(0)->GetCrossJustDown()
|
||||||
int modelId = ms_pCutsceneObjects[i]->GetModelIndex();
|
|| (CGame::playingIntro && CPad::GetPad(0)->GetStartJustDown())
|
||||||
if (modelId >= MI_CUTOBJ01 && modelId <= MI_CUTOBJ05)
|
|| CPad::GetPad(0)->GetLeftMouseJustDown()
|
||||||
UpdateCutsceneObjectBoundingBox(ms_pCutsceneObjects[i]->GetClump(), modelId);
|
|| CPad::GetPad(0)->GetEnterJustDown()
|
||||||
|
|| CPad::GetPad(0)->GetCharJustDown(' '))
|
||||||
if (ms_pCutsceneObjects[i]->m_pAttachTo != nil && modelId >= MI_SPECIAL01 && modelId <= MI_SPECIAL21)
|
FinishCutscene();
|
||||||
UpdateCutsceneObjectBoundingBox(ms_pCutsceneObjects[i]->GetClump(), modelId);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bCamLoaded)
|
|
||||||
if (CGeneral::faststricmp(ms_cutsceneName, "finale") && TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_FLYBY && ms_cutsceneLoadStatus == CUTSCENE_LOADING_0) {
|
|
||||||
if (CPad::GetPad(0)->GetCrossJustDown()
|
|
||||||
|| (CGame::playingIntro && CPad::GetPad(0)->GetStartJustDown())
|
|
||||||
|| CPad::GetPad(0)->GetLeftMouseJustDown()
|
|
||||||
|| CPad::GetPad(0)->GetEnterJustDown()
|
|
||||||
|| CPad::GetPad(0)->GetCharJustDown(' '))
|
|
||||||
FinishCutscene();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CCutsceneMgr::HasCutsceneFinished(void) { return !bCamLoaded || TheCamera.GetPositionAlongSpline() == 1.0f; }
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::LoadAnimationUncompressed(char const* name)
|
|
||||||
{
|
|
||||||
strcpy(uncompressedAnims[numUncompressedAnims], name);
|
|
||||||
|
|
||||||
// Because that's how CAnimManager knows the end of array
|
|
||||||
++numUncompressedAnims;
|
|
||||||
assert(numUncompressedAnims < ARRAY_SIZE(uncompressedAnims));
|
|
||||||
uncompressedAnims[numUncompressedAnims][0] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::AttachObjectToParent(CObject *pObject, CEntity *pAttachTo)
|
|
||||||
{
|
|
||||||
((CCutsceneObject*)pObject)->m_pAttachmentObject = nil;
|
|
||||||
((CCutsceneObject*)pObject)->m_pAttachTo = RpClumpGetFrame(pAttachTo->GetClump());
|
|
||||||
|
|
||||||
debug("Attach %s to %s\n", CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(), CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const char *frame)
|
|
||||||
{
|
|
||||||
((CCutsceneObject*)pObject)->m_pAttachmentObject = nil;
|
|
||||||
((CCutsceneObject*)pObject)->m_pAttachTo = RpAnimBlendClumpFindFrame(pAttachTo->GetClump(), frame)->frame;
|
|
||||||
debug("Attach %s to component %s of %s\n",
|
|
||||||
CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(),
|
|
||||||
frame,
|
|
||||||
CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName());
|
|
||||||
if (RwObjectGetType(pObject->m_rwObject) == rpCLUMP) {
|
|
||||||
RpClump *clump = (RpClump*)pObject->m_rwObject;
|
|
||||||
if (IsClumpSkinned(clump))
|
|
||||||
RpAtomicGetBoundingSphere(GetFirstAtomic(clump))->radius *= 1.1f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool CCutsceneMgr::HasCutsceneFinished(void) { return TheCamera.GetPositionAlongSpline() == 1.0f; }
|
||||||
CCutsceneMgr::AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int bone)
|
|
||||||
{
|
|
||||||
RpHAnimHierarchy *hanim = GetAnimHierarchyFromSkinClump(pAttachTo->GetClump());
|
|
||||||
RwInt32 id = RpHAnimIDGetIndex(hanim, bone);
|
|
||||||
RwMatrix *matrixArray = RpHAnimHierarchyGetMatrixArray(hanim);
|
|
||||||
((CCutsceneObject*)pObject)->m_pAttachmentObject = pAttachTo;
|
|
||||||
((CCutsceneObject*)pObject)->m_pAttachTo = &matrixArray[id];
|
|
||||||
debug("Attach %s to %s\n",
|
|
||||||
CModelInfo::GetModelInfo(pObject->GetModelIndex())->GetModelName(),
|
|
||||||
CModelInfo::GetModelInfo(pAttachTo->GetModelIndex())->GetModelName());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CCutsceneMgr::RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver()
|
|
||||||
{
|
|
||||||
CStreaming::ms_disableStreaming = true;
|
|
||||||
CColStore::RemoveAllCollision();
|
|
||||||
CWorld::bProcessCutsceneOnly = true;
|
|
||||||
ms_cutsceneProcessing = true;
|
|
||||||
|
|
||||||
for (int i = CPools::GetPedPool()->GetSize() - 1; i >= 0; i--) {
|
|
||||||
CPed *pPed = CPools::GetPedPool()->GetSlot(i);
|
|
||||||
if (pPed) {
|
|
||||||
if (!pPed->IsPlayer() && pPed->CanBeDeleted()) {
|
|
||||||
CWorld::Remove(pPed);
|
|
||||||
delete pPed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = CPools::GetVehiclePool()->GetSize() - 1; i >= 0; i--) {
|
|
||||||
CVehicle *pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
|
||||||
if (pVehicle) {
|
|
||||||
if (pVehicle->CanBeDeleted()) {
|
|
||||||
CWorld::Remove(pVehicle);
|
|
||||||
delete pVehicle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bIsEverythingRemovedFromTheWorldForTheBiggestFuckoffCutsceneEver = true;
|
|
||||||
CStreaming::RemoveCurrentZonesModels();
|
|
||||||
CStreaming::SetModelIsDeletable(MI_MALE01);
|
|
||||||
CStreaming::SetModelTxdIsDeletable(MI_MALE01);
|
|
||||||
CStreaming::SetModelIsDeletable(MI_TAXI_D);
|
|
||||||
CStreaming::SetModelTxdIsDeletable(MI_TAXI_D);
|
|
||||||
CStreaming::SetModelIsDeletable(MI_NIGHTSTICK);
|
|
||||||
CStreaming::SetModelTxdIsDeletable(MI_NIGHTSTICK);
|
|
||||||
CStreaming::SetModelIsDeletable(MI_MISSILE);
|
|
||||||
CStreaming::SetModelTxdIsDeletable(MI_MISSILE);
|
|
||||||
CStreaming::SetModelIsDeletable(MI_POLICE);
|
|
||||||
CStreaming::SetModelTxdIsDeletable(MI_POLICE);
|
|
||||||
|
|
||||||
while (CStreaming::RemoveLoadedVehicle()) ;
|
|
||||||
|
|
||||||
CRadar::RemoveRadarSections();
|
|
||||||
|
|
||||||
for (int i = CPools::GetDummyPool()->GetSize() - 1; i >= 0; i--) {
|
|
||||||
CDummy* pDummy = CPools::GetDummyPool()->GetSlot(i);
|
|
||||||
if (pDummy)
|
|
||||||
pDummy->DeleteRwObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = CPools::GetObjectPool()->GetSize() - 1; i >= 0; i--) {
|
|
||||||
CObject* pObject = CPools::GetObjectPool()->GetSlot(i);
|
|
||||||
if (pObject)
|
|
||||||
pObject->DeleteRwObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = CPools::GetBuildingPool()->GetSize() - 1; i >= 0; i--) {
|
|
||||||
CBuilding* pBuilding = CPools::GetBuildingPool()->GetSlot(i);
|
|
||||||
if (pBuilding && pBuilding->m_rwObject != nil && pBuilding->bIsBIGBuilding && pBuilding->bStreamBIGBuilding) {
|
|
||||||
if (pBuilding->bIsBIGBuilding)
|
|
||||||
CStreaming::RequestModel(pBuilding->GetModelIndex(), 0);
|
|
||||||
if (!pBuilding->bImBeingRendered)
|
|
||||||
pBuilding->DeleteRwObject();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CPlayerPed *pPlayerPed = FindPlayerPed();
|
|
||||||
pPlayerPed->RemoveWeaponAnims(0, -1000.0f);
|
|
||||||
NumberOfSavedWeapons = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < TOTAL_WEAPON_SLOTS; i++) {
|
|
||||||
if (pPlayerPed->m_weapons[i].m_eWeaponType != WEAPONTYPE_UNARMED) {
|
|
||||||
SavedWeaponIDs[NumberOfSavedWeapons] = pPlayerPed->m_weapons[i].m_eWeaponType;
|
|
||||||
SavedWeaponAmmo[NumberOfSavedWeapons] = pPlayerPed->m_weapons[i].m_nAmmoTotal;
|
|
||||||
NumberOfSavedWeapons++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pPlayerPed->ClearWeapons();
|
|
||||||
CGame::DrasticTidyUpMemory(true);
|
|
||||||
}
|
|
||||||
@@ -21,9 +21,7 @@ class CCutsceneMgr
|
|||||||
static CAnimBlendAssocGroup ms_cutsceneAssociations;
|
static CAnimBlendAssocGroup ms_cutsceneAssociations;
|
||||||
static CVector ms_cutsceneOffset;
|
static CVector ms_cutsceneOffset;
|
||||||
static float ms_cutsceneTimer;
|
static float ms_cutsceneTimer;
|
||||||
static bool ms_wasCutsceneSkipped;
|
|
||||||
static bool ms_cutsceneProcessing;
|
static bool ms_cutsceneProcessing;
|
||||||
static bool ms_useCutsceneShadows;
|
|
||||||
public:
|
public:
|
||||||
static CDirectory *ms_pCutsceneDir;
|
static CDirectory *ms_pCutsceneDir;
|
||||||
static uint32 ms_cutsceneLoadStatus;
|
static uint32 ms_cutsceneLoadStatus;
|
||||||
@@ -32,7 +30,6 @@ public:
|
|||||||
static bool IsRunning(void) { return ms_running; }
|
static bool IsRunning(void) { return ms_running; }
|
||||||
static bool HasLoaded(void) { return ms_loaded; }
|
static bool HasLoaded(void) { return ms_loaded; }
|
||||||
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
|
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
|
||||||
static bool WasCutsceneSkipped(void) { return ms_wasCutsceneSkipped; }
|
|
||||||
static bool UseLodMultiplier(void) { return ms_useLodMultiplier; }
|
static bool UseLodMultiplier(void) { return ms_useLodMultiplier; }
|
||||||
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }
|
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }
|
||||||
static int GetCutsceneTimeInMilleseconds(void) { return 1000.0f * ms_cutsceneTimer; }
|
static int GetCutsceneTimeInMilleseconds(void) { return 1000.0f * ms_cutsceneTimer; }
|
||||||
@@ -44,18 +41,11 @@ public:
|
|||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
static void LoadCutsceneData(const char *szCutsceneName);
|
static void LoadCutsceneData(const char *szCutsceneName);
|
||||||
static void FinishCutscene(void);
|
static void FinishCutscene(void);
|
||||||
|
static void SetHeadAnim(const char *animName, CObject *pObject);
|
||||||
static void SetupCutsceneToStart(void);
|
static void SetupCutsceneToStart(void);
|
||||||
static void SetCutsceneAnim(const char *animName, CObject *pObject);
|
static void SetCutsceneAnim(const char *animName, CObject *pObject);
|
||||||
static void SetCutsceneAnimToLoop(const char *animName);
|
|
||||||
static CCutsceneHead *AddCutsceneHead(CObject *pObject, int modelId);
|
static CCutsceneHead *AddCutsceneHead(CObject *pObject, int modelId);
|
||||||
static CCutsceneObject *CreateCutsceneObject(int modelId);
|
static CCutsceneObject *CreateCutsceneObject(int modelId);
|
||||||
static void DeleteCutsceneData(void);
|
static void DeleteCutsceneData(void);
|
||||||
static void LoadAnimationUncompressed(char const*);
|
|
||||||
static void Update(void);
|
static void Update(void);
|
||||||
|
|
||||||
static void AttachObjectToParent(CObject *pObject, CEntity *pAttachTo);
|
|
||||||
static void AttachObjectToFrame(CObject *pObject, CEntity *pAttachTo, const char *frame);
|
|
||||||
static void AttachObjectToBone(CObject *pObject, CObject *pAttachTo, int frame);
|
|
||||||
static void RemoveEverythingFromTheWorldForTheBiggestFuckoffCutsceneEver();
|
|
||||||
static void DisableCutsceneShadows() { ms_useCutsceneShadows = false; }
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,8 +17,6 @@ void FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg);
|
|||||||
void FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
void FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
|
|
||||||
void FrameUpdateCallBackNonSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
|
||||||
void FrameUpdateCallBackSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg)
|
FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg)
|
||||||
@@ -230,11 +228,12 @@ FrameUpdateCallBackWith3dVelocityExtractionNonSkinned(AnimBlendFrameData *frame,
|
|||||||
RwMatrixUpdate(mat);
|
RwMatrixUpdate(mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PED_SKIN
|
||||||
|
|
||||||
void
|
void
|
||||||
FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
||||||
{
|
{
|
||||||
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
||||||
float transBlendAmount = 0.0f;
|
|
||||||
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
float totalBlendAmount = 0.0f;
|
float totalBlendAmount = 0.0f;
|
||||||
RpHAnimStdInterpFrame *xform = frame->hanimFrame;
|
RpHAnimStdInterpFrame *xform = frame->hanimFrame;
|
||||||
@@ -258,13 +257,13 @@ FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
|||||||
for(node = updateData->nodes; *node; node++){
|
for(node = updateData->nodes; *node; node++){
|
||||||
if((*node)->sequence){
|
if((*node)->sequence){
|
||||||
(*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
(*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
||||||
if((*node)->sequence->HasTranslation()){
|
if((*node)->sequence->HasTranslation())
|
||||||
pos += vec;
|
pos += vec;
|
||||||
transBlendAmount += (*node)->association->blendAmount;
|
#ifdef FIX_BUGS
|
||||||
}
|
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
rot -= q;
|
rot -= q;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
rot += q;
|
rot += q;
|
||||||
}
|
}
|
||||||
++*node;
|
++*node;
|
||||||
@@ -279,12 +278,12 @@ FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
||||||
xform->t.x = transBlendAmount*pos.x;
|
xform->t.x = pos.x;
|
||||||
xform->t.y = transBlendAmount*pos.y;
|
xform->t.y = pos.y;
|
||||||
xform->t.z = transBlendAmount*pos.z;
|
xform->t.z = pos.z;
|
||||||
xform->t.x += (1.0f-transBlendAmount)*frame->resetPos.x;
|
xform->t.x += frame->resetPos.x;
|
||||||
xform->t.y += (1.0f-transBlendAmount)*frame->resetPos.y;
|
xform->t.y += frame->resetPos.y;
|
||||||
xform->t.z += (1.0f-transBlendAmount)*frame->resetPos.z;
|
xform->t.z += frame->resetPos.z;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,9 +319,11 @@ FrameUpdateCallBackWithVelocityExtractionSkinned(AnimBlendFrameData *frame, void
|
|||||||
for(node = updateData->nodes; *node; node++){
|
for(node = updateData->nodes; *node; node++){
|
||||||
if((*node)->sequence){
|
if((*node)->sequence){
|
||||||
bool nodelooped = (*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
bool nodelooped = (*node)->Update(vec, q, 1.0f-totalBlendAmount);
|
||||||
|
#ifdef FIX_BUGS
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
if(DotProduct(rot, q) < 0.0f)
|
||||||
rot -= q;
|
rot -= q;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
rot += q;
|
rot += q;
|
||||||
if((*node)->sequence->HasTranslation()){
|
if((*node)->sequence->HasTranslation()){
|
||||||
pos += vec;
|
pos += vec;
|
||||||
@@ -441,228 +442,4 @@ FrameUpdateCallBackWith3dVelocityExtractionSkinned(AnimBlendFrameData *frame, vo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
FrameUpdateCallBackOffscreen(AnimBlendFrameData *frame, void *arg)
|
|
||||||
{
|
|
||||||
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION && gpAnimBlendClump->velocity2d)
|
|
||||||
FrameUpdateCallBackWithVelocityExtractionSkinned(frame, arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
FrameUpdateCallBackNonSkinnedCompressed(AnimBlendFrameData *frame, void *arg)
|
|
||||||
{
|
|
||||||
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
|
||||||
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
float totalBlendAmount = 0.0f;
|
|
||||||
CVector trans(0.0f, 0.0f, 0.0f);
|
|
||||||
CVector cur(0.0f, 0.0f, 0.0f);
|
|
||||||
CVector end(0.0f, 0.0f, 0.0f);
|
|
||||||
bool looped = false;
|
|
||||||
RwMatrix *mat = RwFrameGetMatrix(frame->frame);
|
|
||||||
CAnimBlendNode **node;
|
|
||||||
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
|
||||||
|
|
||||||
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
|
||||||
gpAnimBlendClump->velocity2d){
|
|
||||||
if(updateData->foobar)
|
|
||||||
for(node = updateData->nodes; *node; node++)
|
|
||||||
if((*node)->sequence && (*node)->association->IsPartial())
|
|
||||||
totalBlendAmount += (*node)->association->blendAmount;
|
|
||||||
|
|
||||||
for(node = updateData->nodes; *node; node++)
|
|
||||||
if((*node)->sequence && (*node)->sequence->HasTranslation()){
|
|
||||||
if((*node)->association->HasTranslation()){
|
|
||||||
(*node)->GetCurrentTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
|
||||||
cur += vec;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(node = updateData->nodes; *node; node++){
|
|
||||||
if((*node)->sequence){
|
|
||||||
bool nodelooped = (*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
|
||||||
rot -= q;
|
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
rot += q;
|
|
||||||
if((*node)->sequence->HasTranslation()){
|
|
||||||
pos += vec;
|
|
||||||
if((*node)->association->HasTranslation()){
|
|
||||||
trans += vec;
|
|
||||||
looped |= nodelooped;
|
|
||||||
if(nodelooped){
|
|
||||||
(*node)->GetEndTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
|
||||||
end += vec;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
++*node;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
|
||||||
RwMatrixSetIdentity(mat);
|
|
||||||
rot.Normalise();
|
|
||||||
rot.Get(mat);
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
|
||||||
*gpAnimBlendClump->velocity3d = trans - cur;
|
|
||||||
if(looped)
|
|
||||||
*gpAnimBlendClump->velocity3d += end;
|
|
||||||
mat->pos.x = (pos - trans).x + frame->resetPos.x;
|
|
||||||
mat->pos.y = (pos - trans).y + frame->resetPos.y;
|
|
||||||
mat->pos.z = (pos - trans).z + frame->resetPos.z;
|
|
||||||
}
|
|
||||||
RwMatrixUpdate(mat);
|
|
||||||
}else{
|
|
||||||
if(updateData->foobar)
|
|
||||||
for(node = updateData->nodes; *node; node++)
|
|
||||||
if((*node)->sequence && (*node)->association->IsPartial())
|
|
||||||
totalBlendAmount += (*node)->association->blendAmount;
|
|
||||||
|
|
||||||
for(node = updateData->nodes; *node; node++){
|
|
||||||
if((*node)->sequence){
|
|
||||||
(*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
|
||||||
if((*node)->sequence->HasTranslation())
|
|
||||||
pos += vec;
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
|
||||||
rot -= q;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
rot += q;
|
|
||||||
}
|
|
||||||
++*node;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
|
||||||
RwMatrixSetIdentity(mat);
|
|
||||||
rot.Normalise();
|
|
||||||
rot.Get(mat);
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
|
||||||
mat->pos.x = pos.x;
|
|
||||||
mat->pos.y = pos.y;
|
|
||||||
mat->pos.z = pos.z;
|
|
||||||
mat->pos.x += frame->resetPos.x;
|
|
||||||
mat->pos.y += frame->resetPos.y;
|
|
||||||
mat->pos.z += frame->resetPos.z;
|
|
||||||
}
|
|
||||||
RwMatrixUpdate(mat);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
FrameUpdateCallBackSkinnedCompressed(AnimBlendFrameData *frame, void *arg)
|
|
||||||
{
|
|
||||||
CVector vec, pos(0.0f, 0.0f, 0.0f);
|
|
||||||
CQuaternion q, rot(0.0f, 0.0f, 0.0f, 0.0f);
|
|
||||||
float totalBlendAmount = 0.0f;
|
|
||||||
CVector trans(0.0f, 0.0f, 0.0f);
|
|
||||||
CVector cur(0.0f, 0.0f, 0.0f);
|
|
||||||
CVector end(0.0f, 0.0f, 0.0f);
|
|
||||||
bool looped = false;
|
|
||||||
RpHAnimStdInterpFrame *xform = frame->hanimFrame;
|
|
||||||
CAnimBlendNode **node;
|
|
||||||
AnimBlendFrameUpdateData *updateData = (AnimBlendFrameUpdateData*)arg;
|
|
||||||
|
|
||||||
if(frame->flag & AnimBlendFrameData::VELOCITY_EXTRACTION &&
|
|
||||||
gpAnimBlendClump->velocity2d){
|
|
||||||
if(updateData->foobar)
|
|
||||||
for(node = updateData->nodes; *node; node++)
|
|
||||||
if((*node)->sequence && (*node)->association->IsPartial())
|
|
||||||
totalBlendAmount += (*node)->association->blendAmount;
|
|
||||||
|
|
||||||
for(node = updateData->nodes; *node; node++)
|
|
||||||
if((*node)->sequence && (*node)->sequence->HasTranslation()){
|
|
||||||
if((*node)->association->HasTranslation()){
|
|
||||||
(*node)->GetCurrentTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
|
||||||
cur += vec;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(node = updateData->nodes; *node; node++){
|
|
||||||
if((*node)->sequence){
|
|
||||||
bool nodelooped = (*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
|
||||||
rot -= q;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
rot += q;
|
|
||||||
if((*node)->sequence->HasTranslation()){
|
|
||||||
pos += vec;
|
|
||||||
if((*node)->association->HasTranslation()){
|
|
||||||
trans += vec;
|
|
||||||
looped |= nodelooped;
|
|
||||||
if(nodelooped){
|
|
||||||
(*node)->GetEndTranslationCompressed(vec, 1.0f-totalBlendAmount);
|
|
||||||
end += vec;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
++*node;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
|
||||||
rot.Normalise();
|
|
||||||
xform->q.imag.x = rot.x;
|
|
||||||
xform->q.imag.y = rot.y;
|
|
||||||
xform->q.imag.z = rot.z;
|
|
||||||
xform->q.real = rot.w;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
|
||||||
*gpAnimBlendClump->velocity3d = trans - cur;
|
|
||||||
if(looped)
|
|
||||||
*gpAnimBlendClump->velocity3d += end;
|
|
||||||
xform->t.x = (pos - trans).x + frame->resetPos.x;
|
|
||||||
xform->t.y = (pos - trans).y + frame->resetPos.y;
|
|
||||||
xform->t.z = (pos - trans).z + frame->resetPos.z;
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
float transBlendAmount = 0.0f;
|
|
||||||
|
|
||||||
if(updateData->foobar)
|
|
||||||
for(node = updateData->nodes; *node; node++)
|
|
||||||
if((*node)->sequence && (*node)->association->IsPartial())
|
|
||||||
totalBlendAmount += (*node)->association->blendAmount;
|
|
||||||
|
|
||||||
for(node = updateData->nodes; *node; node++){
|
|
||||||
if((*node)->sequence){
|
|
||||||
(*node)->UpdateCompressed(vec, q, 1.0f-totalBlendAmount);
|
|
||||||
if((*node)->sequence->HasTranslation()){
|
|
||||||
pos += vec;
|
|
||||||
transBlendAmount += (*node)->association->blendAmount;
|
|
||||||
}
|
|
||||||
if(DotProduct(rot, q) < 0.0f)
|
|
||||||
rot -= q;
|
|
||||||
else
|
|
||||||
rot += q;
|
|
||||||
}
|
|
||||||
++*node;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_ROTATION) == 0){
|
|
||||||
rot.Normalise();
|
|
||||||
xform->q.imag.x = rot.x;
|
|
||||||
xform->q.imag.y = rot.y;
|
|
||||||
xform->q.imag.z = rot.z;
|
|
||||||
xform->q.real = rot.w;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((frame->flag & AnimBlendFrameData::IGNORE_TRANSLATION) == 0){
|
|
||||||
xform->t.x = transBlendAmount*pos.x;
|
|
||||||
xform->t.y = transBlendAmount*pos.y;
|
|
||||||
xform->t.z = transBlendAmount*pos.z;
|
|
||||||
xform->t.x += (1.0f-transBlendAmount)*frame->resetPos.x;
|
|
||||||
xform->t.y += (1.0f-transBlendAmount)*frame->resetPos.y;
|
|
||||||
xform->t.z += (1.0f-transBlendAmount)*frame->resetPos.z;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
#include "AnimBlendAssociation.h"
|
#include "AnimBlendAssociation.h"
|
||||||
#include "AnimManager.h"
|
#include "AnimManager.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
|
#ifdef PED_SKIN
|
||||||
#include "PedModelInfo.h"
|
#include "PedModelInfo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
RwInt32 ClumpOffset;
|
RwInt32 ClumpOffset;
|
||||||
|
|
||||||
@@ -140,6 +142,7 @@ FrameInitCBskin(AnimBlendFrameData *frameData, void*)
|
|||||||
frameData->flag = 0;
|
frameData->flag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PED_SKIN
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpInitSkinned(RpClump *clump)
|
RpAnimBlendClumpInitSkinned(RpClump *clump)
|
||||||
{
|
{
|
||||||
@@ -153,7 +156,7 @@ RpAnimBlendClumpInitSkinned(RpClump *clump)
|
|||||||
|
|
||||||
RpAnimBlendAllocateData(clump);
|
RpAnimBlendAllocateData(clump);
|
||||||
clumpData = *RPANIMBLENDCLUMPDATA(clump);
|
clumpData = *RPANIMBLENDCLUMPDATA(clump);
|
||||||
atomic = GetFirstAtomic(clump);
|
atomic = IsClumpSkinned(clump);
|
||||||
assert(atomic);
|
assert(atomic);
|
||||||
skin = RpSkinGeometryGetSkin(RpAtomicGetGeometry(atomic));
|
skin = RpSkinGeometryGetSkin(RpAtomicGetGeometry(atomic));
|
||||||
assert(skin);
|
assert(skin);
|
||||||
@@ -168,15 +171,12 @@ RpAnimBlendClumpInitSkinned(RpClump *clump)
|
|||||||
for(i = 0; i < numBones; i++){
|
for(i = 0; i < numBones; i++){
|
||||||
frames[i].nodeID = HIERNODEID(hier, i);
|
frames[i].nodeID = HIERNODEID(hier, i);
|
||||||
frames[i].resetPos = boneTab[i];
|
frames[i].resetPos = boneTab[i];
|
||||||
#ifdef LIBRW
|
|
||||||
frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
|
frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rpHANIMHIERARCHYGETINTERPFRAME(hier, i);
|
||||||
#else
|
|
||||||
frames[i].hanimFrame = (RpHAnimStdInterpFrame*)rtANIMGETINTERPFRAME(hier->currentAnim, i);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
clumpData->ForAllFrames(FrameInitCBskin, nil);
|
clumpData->ForAllFrames(FrameInitCBskin, nil);
|
||||||
clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION;
|
clumpData->frames[0].flag |= AnimBlendFrameData::VELOCITY_EXTRACTION;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpInitNotSkinned(RpClump *clump)
|
RpAnimBlendClumpInitNotSkinned(RpClump *clump)
|
||||||
@@ -200,9 +200,11 @@ RpAnimBlendClumpInitNotSkinned(RpClump *clump)
|
|||||||
void
|
void
|
||||||
RpAnimBlendClumpInit(RpClump *clump)
|
RpAnimBlendClumpInit(RpClump *clump)
|
||||||
{
|
{
|
||||||
|
#ifdef PED_SKIN
|
||||||
if(IsClumpSkinned(clump))
|
if(IsClumpSkinned(clump))
|
||||||
RpAnimBlendClumpInitSkinned(clump);
|
RpAnimBlendClumpInitSkinned(clump);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
RpAnimBlendClumpInitNotSkinned(clump);
|
RpAnimBlendClumpInitNotSkinned(clump);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,6 +364,7 @@ FillFrameArrayCBnonskin(AnimBlendFrameData *frame, void *arg)
|
|||||||
frames[CVisibilityPlugins::GetFrameHierarchyId(frame->frame)] = frame;
|
frames[CVisibilityPlugins::GetFrameHierarchyId(frame->frame)] = frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PED_SKIN
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpFillFrameArraySkin(RpClump *clump, AnimBlendFrameData **frames)
|
RpAnimBlendClumpFillFrameArraySkin(RpClump *clump, AnimBlendFrameData **frames)
|
||||||
{
|
{
|
||||||
@@ -371,18 +374,22 @@ RpAnimBlendClumpFillFrameArraySkin(RpClump *clump, AnimBlendFrameData **frames)
|
|||||||
for(i = PED_MID; i < PED_NODE_MAX; i++)
|
for(i = PED_MID; i < PED_NODE_MAX; i++)
|
||||||
frames[i] = &clumpData->frames[RpHAnimIDGetIndex(hier, ConvertPedNode2BoneTag(i))];
|
frames[i] = &clumpData->frames[RpHAnimIDGetIndex(hier, ConvertPedNode2BoneTag(i))];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
RpAnimBlendClumpFillFrameArray(RpClump *clump, AnimBlendFrameData **frames)
|
RpAnimBlendClumpFillFrameArray(RpClump *clump, AnimBlendFrameData **frames)
|
||||||
{
|
{
|
||||||
|
#ifdef PED_SKIN
|
||||||
if(IsClumpSkinned(clump))
|
if(IsClumpSkinned(clump))
|
||||||
RpAnimBlendClumpFillFrameArraySkin(clump, frames);
|
RpAnimBlendClumpFillFrameArraySkin(clump, frames);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FillFrameArrayCBnonskin, frames);
|
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FillFrameArrayCBnonskin, frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimBlendFrameData *pFrameDataFound;
|
AnimBlendFrameData *pFrameDataFound;
|
||||||
|
|
||||||
|
// FrameFindCallBack on PS2
|
||||||
void
|
void
|
||||||
FrameFindByNameCBnonskin(AnimBlendFrameData *frame, void *arg)
|
FrameFindByNameCBnonskin(AnimBlendFrameData *frame, void *arg)
|
||||||
{
|
{
|
||||||
@@ -391,6 +398,7 @@ FrameFindByNameCBnonskin(AnimBlendFrameData *frame, void *arg)
|
|||||||
pFrameDataFound = frame;
|
pFrameDataFound = frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PED_SKIN
|
||||||
void
|
void
|
||||||
FrameFindByNameCBskin(AnimBlendFrameData *frame, void *arg)
|
FrameFindByNameCBskin(AnimBlendFrameData *frame, void *arg)
|
||||||
{
|
{
|
||||||
@@ -398,58 +406,25 @@ FrameFindByNameCBskin(AnimBlendFrameData *frame, void *arg)
|
|||||||
if(name && CGeneral::faststricmp(name, (char*)arg) == 0)
|
if(name && CGeneral::faststricmp(name, (char*)arg) == 0)
|
||||||
pFrameDataFound = frame;
|
pFrameDataFound = frame;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
void
|
|
||||||
FrameFindByBoneCB(AnimBlendFrameData *frame, void *arg)
|
|
||||||
{
|
|
||||||
if(frame->nodeID == (int32)(uintptr)arg)
|
|
||||||
pFrameDataFound = frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
AnimBlendFrameData*
|
AnimBlendFrameData*
|
||||||
RpAnimBlendClumpFindFrame(RpClump *clump, const char *name)
|
RpAnimBlendClumpFindFrame(RpClump *clump, const char *name)
|
||||||
{
|
{
|
||||||
pFrameDataFound = nil;
|
pFrameDataFound = nil;
|
||||||
|
#ifdef PED_SKIN
|
||||||
if(IsClumpSkinned(clump))
|
if(IsClumpSkinned(clump))
|
||||||
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBskin, (void*)name);
|
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBskin, (void*)name);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBnonskin, (void*)name);
|
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByNameCBnonskin, (void*)name);
|
||||||
return pFrameDataFound;
|
return pFrameDataFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimBlendFrameData*
|
|
||||||
RpAnimBlendClumpFindBone(RpClump *clump, uint32 boneTag)
|
|
||||||
{
|
|
||||||
pFrameDataFound = nil;
|
|
||||||
(*RPANIMBLENDCLUMPDATA(clump))->ForAllFrames(FrameFindByBoneCB, (void*)boneTag);
|
|
||||||
return pFrameDataFound;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RpAnimBlendNodeUpdateKeyframes(AnimBlendFrameData *frames, AnimBlendFrameUpdateData *updateData, int32 numNodes)
|
RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta)
|
||||||
{
|
|
||||||
CAnimBlendNode **node;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for(node = updateData->nodes; *node; node++){
|
|
||||||
CAnimBlendAssociation *a = (*node)->association;
|
|
||||||
for(i = 0; i < numNodes; i++)
|
|
||||||
if((frames[i].flag & AnimBlendFrameData::VELOCITY_EXTRACTION) == 0 ||
|
|
||||||
gpAnimBlendClump->velocity2d == nil){
|
|
||||||
if((*node)[i].sequence)
|
|
||||||
(*node)[i].FindKeyFrame(a->currentTime - a->timeStep);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO:
|
|
||||||
// CAnimBlendClumpData::LoadFramesIntoSPR
|
|
||||||
// CAnimBlendClumpData::ForAllFramesInSPR
|
|
||||||
void
|
|
||||||
RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta, bool doRender)
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CAnimBlendAssociation *assoc;
|
|
||||||
AnimBlendFrameUpdateData updateData;
|
AnimBlendFrameUpdateData updateData;
|
||||||
float totalLength = 0.0f;
|
float totalLength = 0.0f;
|
||||||
float totalBlend = 0.0f;
|
float totalBlend = 0.0f;
|
||||||
@@ -465,53 +440,30 @@ RpAnimBlendClumpUpdateAnimations(RpClump *clump, float timeDelta, bool doRender)
|
|||||||
updateData.foobar = 0;
|
updateData.foobar = 0;
|
||||||
for(link = clumpData->link.next; link; link = next){
|
for(link = clumpData->link.next; link; link = next){
|
||||||
next = link->next;
|
next = link->next;
|
||||||
assoc = CAnimBlendAssociation::FromLink(link);
|
CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link);
|
||||||
if(assoc->UpdateBlend(timeDelta)){
|
if(assoc->UpdateBlend(timeDelta)){
|
||||||
if(assoc->hierarchy->sequences){
|
CAnimManager::UncompressAnimation(assoc->hierarchy);
|
||||||
CAnimManager::UncompressAnimation(assoc->hierarchy);
|
updateData.nodes[i++] = assoc->GetNode(0);
|
||||||
if(i < 11)
|
if(assoc->flags & ASSOC_MOVEMENT){
|
||||||
updateData.nodes[i++] = assoc->GetNode(0);
|
totalLength += assoc->hierarchy->totalLength/assoc->speed * assoc->blendAmount;
|
||||||
if(assoc->flags & ASSOC_MOVEMENT){
|
totalBlend += assoc->blendAmount;
|
||||||
totalLength += assoc->hierarchy->totalLength/assoc->speed * assoc->blendAmount;
|
|
||||||
totalBlend += assoc->blendAmount;
|
|
||||||
}else
|
|
||||||
updateData.foobar = 1;
|
|
||||||
}else
|
}else
|
||||||
debug("anim %s is not loaded\n", assoc->hierarchy->name);
|
updateData.foobar = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(link = clumpData->link.next; link; link = link->next){
|
|
||||||
assoc = CAnimBlendAssociation::FromLink(link);
|
|
||||||
assoc->UpdateTimeStep(timeDelta, totalLength == 0.0f ? 1.0f : totalBlend/totalLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateData.nodes[i] = nil;
|
updateData.nodes[i] = nil;
|
||||||
|
|
||||||
#ifdef ANIM_COMPRESSION
|
#ifdef PED_SKIN
|
||||||
if(clumpData->frames[0].flag & AnimBlendFrameData::COMPRESSED){
|
if(IsClumpSkinned(clump))
|
||||||
if(IsClumpSkinned(clump))
|
clumpData->ForAllFrames(FrameUpdateCallBackSkinned, &updateData);
|
||||||
clumpData->ForAllFrames(FrameUpdateCallBackSkinnedCompressed, &updateData);
|
else
|
||||||
else
|
|
||||||
clumpData->ForAllFrames(FrameUpdateCallBackNonSkinnedCompressed, &updateData);
|
|
||||||
}else
|
|
||||||
#endif
|
#endif
|
||||||
if(doRender){
|
clumpData->ForAllFrames(FrameUpdateCallBackNonSkinned, &updateData);
|
||||||
if(clumpData->frames[0].flag & AnimBlendFrameData::UPDATE_KEYFRAMES)
|
|
||||||
RpAnimBlendNodeUpdateKeyframes(clumpData->frames, &updateData, clumpData->numFrames);
|
|
||||||
if(IsClumpSkinned(clump))
|
|
||||||
clumpData->ForAllFrames(FrameUpdateCallBackSkinned, &updateData);
|
|
||||||
else
|
|
||||||
clumpData->ForAllFrames(FrameUpdateCallBackNonSkinned, &updateData);
|
|
||||||
clumpData->frames[0].flag &= ~AnimBlendFrameData::UPDATE_KEYFRAMES;
|
|
||||||
}else{
|
|
||||||
clumpData->ForAllFrames(FrameUpdateCallBackOffscreen, &updateData);
|
|
||||||
clumpData->frames[0].flag |= AnimBlendFrameData::UPDATE_KEYFRAMES;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(link = clumpData->link.next; link; link = link->next){
|
for(link = clumpData->link.next; link; link = link->next){
|
||||||
assoc = CAnimBlendAssociation::FromLink(link);
|
CAnimBlendAssociation *assoc = CAnimBlendAssociation::FromLink(link);
|
||||||
assoc->UpdateTime(timeDelta, totalLength == 0.0f ? 1.0f : totalBlend/totalLength);
|
float relSpeed = totalLength == 0.0f ? 1.0f : totalBlend/totalLength;
|
||||||
|
assoc->UpdateTime(timeDelta, relSpeed);
|
||||||
}
|
}
|
||||||
RwFrameUpdateObjects(RpClumpGetFrame(clump));
|
RwFrameUpdateObjects(RpClumpGetFrame(clump));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ void RpAnimBlendClumpInit(RpClump *clump);
|
|||||||
bool RpAnimBlendClumpIsInitialized(RpClump *clump);
|
bool RpAnimBlendClumpIsInitialized(RpClump *clump);
|
||||||
void RpAnimBlendClumpFillFrameArray(RpClump* clump, AnimBlendFrameData** frames);
|
void RpAnimBlendClumpFillFrameArray(RpClump* clump, AnimBlendFrameData** frames);
|
||||||
AnimBlendFrameData *RpAnimBlendClumpFindFrame(RpClump *clump, const char *name);
|
AnimBlendFrameData *RpAnimBlendClumpFindFrame(RpClump *clump, const char *name);
|
||||||
AnimBlendFrameData *RpAnimBlendClumpFindBone(RpClump *clump, uint32 boneTag);
|
|
||||||
void FillFrameArrayCallBack(AnimBlendFrameData *frame, void *arg);
|
void FillFrameArrayCallBack(AnimBlendFrameData *frame, void *arg);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetAssociation(RpClump *clump, uint32 id);
|
CAnimBlendAssociation *RpAnimBlendClumpGetAssociation(RpClump *clump, uint32 id);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetMainAssociation(RpClump *clump, CAnimBlendAssociation **assocRet, float *blendRet);
|
CAnimBlendAssociation *RpAnimBlendClumpGetMainAssociation(RpClump *clump, CAnimBlendAssociation **assocRet, float *blendRet);
|
||||||
@@ -35,14 +34,9 @@ CAnimBlendAssociation *RpAnimBlendClumpGetMainAssociation_N(RpClump *clump, int
|
|||||||
CAnimBlendAssociation *RpAnimBlendClumpGetMainPartialAssociation_N(RpClump *clump, int n);
|
CAnimBlendAssociation *RpAnimBlendClumpGetMainPartialAssociation_N(RpClump *clump, int n);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump, uint32 mask);
|
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump, uint32 mask);
|
||||||
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump);
|
CAnimBlendAssociation *RpAnimBlendClumpGetFirstAssociation(RpClump *clump);
|
||||||
void RpAnimBlendNodeUpdateKeyframes(AnimBlendFrameData *frames, AnimBlendFrameUpdateData *updateData, int32 numNodes);
|
void RpAnimBlendClumpUpdateAnimations(RpClump* clump, float timeDelta);
|
||||||
void RpAnimBlendClumpUpdateAnimations(RpClump* clump, float timeDelta, bool doRender = true);
|
|
||||||
|
|
||||||
|
|
||||||
extern CAnimBlendClumpData *gpAnimBlendClump;
|
extern CAnimBlendClumpData *gpAnimBlendClump;
|
||||||
void FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackNonSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
void FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg);
|
void FrameUpdateCallBackSkinned(AnimBlendFrameData *frame, void *arg);
|
||||||
void FrameUpdateCallBackOffscreen(AnimBlendFrameData *frame, void *arg);
|
|
||||||
|
|
||||||
void FrameUpdateCallBackNonSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
|
||||||
void FrameUpdateCallBackSkinnedCompressed(AnimBlendFrameData *frame, void *arg);
|
|
||||||
|
|||||||
@@ -71,33 +71,31 @@ cAudioManager::GetCollisionOneShotRatio(int32 a, float b) const
|
|||||||
case SURFACE_TARMAC:
|
case SURFACE_TARMAC:
|
||||||
case SURFACE_PAVEMENT:
|
case SURFACE_PAVEMENT:
|
||||||
case SURFACE_STEEP_CLIFF:
|
case SURFACE_STEEP_CLIFF:
|
||||||
case SURFACE_TRANSPARENT_STONE:
|
case SURFACE_TRANSPARENT_STONE: result = GetCollisionRatio(b, 10.f, 60.f, 50.f); break;
|
||||||
case SURFACE_CONCRETE_BEACH: result = GetCollisionRatio(b, 10.f, 60.f, 50.f); break;
|
|
||||||
case SURFACE_GRASS:
|
case SURFACE_GRASS:
|
||||||
case SURFACE_GRAVEL:
|
|
||||||
case SURFACE_MUD_DRY:
|
|
||||||
case SURFACE_CARDBOARDBOX: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
case SURFACE_CARDBOARDBOX: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
||||||
|
case SURFACE_GRAVEL: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
||||||
|
case SURFACE_MUD_DRY: result = GetCollisionRatio(b, 0.f, 2.f, 2.f); break;
|
||||||
case SURFACE_CAR: result = GetCollisionRatio(b, 6.f, 50.f, 44.f); break;
|
case SURFACE_CAR: result = GetCollisionRatio(b, 6.f, 50.f, 44.f); break;
|
||||||
case SURFACE_GLASS:
|
case SURFACE_GLASS: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
|
||||||
case SURFACE_METAL_CHAIN_FENCE: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
|
|
||||||
case SURFACE_TRANSPARENT_CLOTH:
|
case SURFACE_TRANSPARENT_CLOTH:
|
||||||
case SURFACE_THICK_METAL_PLATE: result = GetCollisionRatio(b, 30.f, 130.f, 100.f); break;
|
case SURFACE_THICK_METAL_PLATE: result = GetCollisionRatio(b, 30.f, 130.f, 100.f); break;
|
||||||
case SURFACE_GARAGE_DOOR: result = GetCollisionRatio(b, 20.f, 100.f, 80.f); break;
|
case SURFACE_GARAGE_DOOR: result = GetCollisionRatio(b, 20.f, 100.f, 80.f); break;
|
||||||
case SURFACE_CAR_PANEL: result = GetCollisionRatio(b, 0.f, 4.f, 4.f); break;
|
case SURFACE_CAR_PANEL: result = GetCollisionRatio(b, 0.f, 4.f, 4.f); break;
|
||||||
case SURFACE_SCAFFOLD_POLE:
|
case SURFACE_SCAFFOLD_POLE:
|
||||||
case SURFACE_METAL_GATE:
|
case SURFACE_METAL_GATE: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
|
||||||
case SURFACE_LAMP_POST: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
|
case SURFACE_LAMP_POST: result = GetCollisionRatio(b, 1.f, 10.f, 9.f); break;
|
||||||
case SURFACE_FIRE_HYDRANT: result = GetCollisionRatio(b, 1.f, 15.f, 14.f); break;
|
case SURFACE_FIRE_HYDRANT: result = GetCollisionRatio(b, 1.f, 15.f, 14.f); break;
|
||||||
case SURFACE_GIRDER: result = GetCollisionRatio(b, 8.f, 50.f, 42.f); break;
|
case SURFACE_GIRDER: result = GetCollisionRatio(b, 8.f, 50.f, 42.f); break;
|
||||||
|
case SURFACE_METAL_CHAIN_FENCE: result = GetCollisionRatio(b, 0.1f, 10.f, 9.9f); break;
|
||||||
case SURFACE_PED: result = GetCollisionRatio(b, 0.f, 20.f, 20.f); break;
|
case SURFACE_PED: result = GetCollisionRatio(b, 0.f, 20.f, 20.f); break;
|
||||||
case SURFACE_SAND:
|
case SURFACE_SAND: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
||||||
case SURFACE_WATER:
|
case SURFACE_WATER: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
||||||
case SURFACE_RUBBER:
|
|
||||||
case SURFACE_WHEELBASE:
|
|
||||||
case SURFACE_SAND_BEACH: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
|
||||||
case SURFACE_WOOD_CRATES: result = GetCollisionRatio(b, 1.f, 4.f, 3.f); break;
|
case SURFACE_WOOD_CRATES: result = GetCollisionRatio(b, 1.f, 4.f, 3.f); break;
|
||||||
case SURFACE_WOOD_BENCH: result = GetCollisionRatio(b, 0.1f, 5.f, 4.9f); break;
|
case SURFACE_WOOD_BENCH: result = GetCollisionRatio(b, 0.1f, 5.f, 4.9f); break;
|
||||||
case SURFACE_WOOD_SOLID: result = GetCollisionRatio(b, 0.1f, 40.f, 39.9f); break;
|
case SURFACE_WOOD_SOLID: result = GetCollisionRatio(b, 0.1f, 40.f, 39.9f); break;
|
||||||
|
case SURFACE_RUBBER:
|
||||||
|
case SURFACE_WHEELBASE: result = GetCollisionRatio(b, 0.f, 10.f, 10.f); break;
|
||||||
case SURFACE_PLASTIC: result = GetCollisionRatio(b, 0.1f, 4.f, 3.9f); break;
|
case SURFACE_PLASTIC: result = GetCollisionRatio(b, 0.1f, 4.f, 3.9f); break;
|
||||||
case SURFACE_HEDGE: result = GetCollisionRatio(b, 0.f, 0.5f, 0.5f); break;
|
case SURFACE_HEDGE: result = GetCollisionRatio(b, 0.f, 0.5f, 0.5f); break;
|
||||||
case SURFACE_CONTAINER: result = GetCollisionRatio(b, 4.f, 40.f, 36.f); break;
|
case SURFACE_CONTAINER: result = GetCollisionRatio(b, 4.f, 40.f, 36.f); break;
|
||||||
@@ -137,8 +135,8 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
|
|||||||
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
|
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
|
||||||
m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000;
|
m_sQueueSample.m_nFrequency = 6050.f * ratio + 16000;
|
||||||
vol = 30.f * ratio;
|
vol = 30.f * ratio;
|
||||||
} else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY || surface2 == SURFACE_MUD_DRY ||
|
} else if(surface1 == SURFACE_GRAVEL || surface2 == SURFACE_GRAVEL || surface1 == SURFACE_MUD_DRY ||
|
||||||
surface1 == SURFACE_SAND || surface2 == SURFACE_SAND || surface1 == SURFACE_SAND_BEACH || surface2 == SURFACE_SAND_BEACH) {
|
surface2 == SURFACE_MUD_DRY || surface1 == SURFACE_SAND || surface2 == SURFACE_SAND) {
|
||||||
ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
|
ratio = GetCollisionRatio(audioCollision.m_fIntensity2, 0.0001f, 0.09f, 0.0899f);
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID;
|
m_sQueueSample.m_nSampleIndex = SFX_GRAVEL_SKID;
|
||||||
m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000;
|
m_sQueueSample.m_nFrequency = 6000.f * ratio + 10000;
|
||||||
@@ -158,12 +156,12 @@ cAudioManager::SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollisio
|
|||||||
void
|
void
|
||||||
cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
|
cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter)
|
||||||
{
|
{
|
||||||
bool distCalculated = false;
|
|
||||||
if(col.m_fIntensity2 > 0.0016f) {
|
if(col.m_fIntensity2 > 0.0016f) {
|
||||||
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
|
uint8 emittingVol = SetLoopingCollisionRequestedSfxFreqAndGetVol(col);
|
||||||
if(emittingVol) {
|
if(emittingVol) {
|
||||||
CalculateDistance(distCalculated, m_sQueueSample.m_fDistance);
|
m_sQueueSample.m_fDistance = Sqrt(col.m_fDistance);
|
||||||
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
|
m_sQueueSample.m_nVolume =
|
||||||
|
ComputeVolume(emittingVol, CollisionSoundIntensity, m_sQueueSample.m_fDistance);
|
||||||
if(m_sQueueSample.m_nVolume) {
|
if(m_sQueueSample.m_nVolume) {
|
||||||
m_sQueueSample.m_nCounter = counter;
|
m_sQueueSample.m_nCounter = counter;
|
||||||
m_sQueueSample.m_vecPos = col.m_vecPosition;
|
m_sQueueSample.m_vecPos = col.m_vecPosition;
|
||||||
@@ -219,9 +217,7 @@ static const int32 gOneShotCol[] = {SFX_COL_TARMAC_1,
|
|||||||
SFX_TYRE_BUMP,
|
SFX_TYRE_BUMP,
|
||||||
SFX_COL_CARDBOARD_1,
|
SFX_COL_CARDBOARD_1,
|
||||||
SFX_COL_TARMAC_1,
|
SFX_COL_TARMAC_1,
|
||||||
SFX_COL_GATE,
|
SFX_COL_GATE};
|
||||||
SFX_COL_SAND_1,
|
|
||||||
SFX_COL_TARMAC_1 };
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
||||||
@@ -270,7 +266,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col)
|
|||||||
m_sQueueSample.m_nSampleIndex += m_anRandomTable[3] % 4;
|
m_sQueueSample.m_nSampleIndex += m_anRandomTable[3] % 4;
|
||||||
break;
|
break;
|
||||||
case SFX_COL_PED_1:
|
case SFX_COL_PED_1:
|
||||||
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 2;
|
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 5;
|
||||||
break;
|
break;
|
||||||
case SFX_COL_WOOD_CRATES_1:
|
case SFX_COL_WOOD_CRATES_1:
|
||||||
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 4;
|
m_sQueueSample.m_nSampleIndex += m_anRandomTable[4] % 4;
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ public:
|
|||||||
void AddCollisionToRequestedQueue();
|
void AddCollisionToRequestedQueue();
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cAudioCollisionManager, 0x354);
|
VALIDATE_SIZE(cAudioCollisionManager, 852);
|
||||||
|
|||||||
11807
src/audio/AudioLogic.cpp
11807
src/audio/AudioLogic.cpp
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,6 @@
|
|||||||
#include "sampman.h"
|
#include "sampman.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "ZoneCull.h"
|
|
||||||
|
|
||||||
cAudioManager AudioManager;
|
cAudioManager AudioManager;
|
||||||
|
|
||||||
@@ -19,13 +18,12 @@ const int policeChannel = channels + 1;
|
|||||||
const int allChannels = channels + 2;
|
const int allChannels = channels + 2;
|
||||||
|
|
||||||
#define SPEED_OF_SOUND 343.f
|
#define SPEED_OF_SOUND 343.f
|
||||||
#define TIME_SPENT 40
|
#define TIME_SPENT 50
|
||||||
|
|
||||||
cAudioManager::cAudioManager()
|
cAudioManager::cAudioManager()
|
||||||
{
|
{
|
||||||
m_bIsInitialised = false;
|
m_bIsInitialised = false;
|
||||||
m_bReverb = true;
|
m_bReverb = true;
|
||||||
field_6 = 0;
|
|
||||||
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
|
m_fSpeedOfSound = SPEED_OF_SOUND / TIME_SPENT;
|
||||||
m_nTimeSpent = TIME_SPENT;
|
m_nTimeSpent = TIME_SPENT;
|
||||||
m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
|
m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
|
||||||
@@ -174,11 +172,11 @@ cAudioManager::SetEntityStatus(int32 id, uint8 status)
|
|||||||
void
|
void
|
||||||
cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
|
cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
|
||||||
{
|
{
|
||||||
static const uint8 OneShotPriority[] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, 2, 5, 5, 3, 5, 2, 2, 1, 1, 3, 1, 3, 3, 1, 1, 1, 1, 4, 4, 4, 3, 1, 1, 1, 1, 1,
|
static const uint8 OneShotPriority[] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 3, 5, 2, 2, 1, 1, 3, 1, 3, 3, 1, 1, 1, 4, 4, 3, 1, 1,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 3, 4, 2, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0, 0,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 3, 2, 2, 2, 2, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 1, 1, 9, 0, 0, 0, 1, 2, 2, 0, 0, 2, 3, 3, 3, 5, 1, 1,
|
1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 3, 1, 1, 1, 9,
|
||||||
1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 7, 1, 4, 3, 4, 2, 2, 2, 3, 1, 2, 1, 3, 5, 3, 4, 6, 4, 6, 3, 0, 0, 0, 0, 0,
|
2, 2, 0, 0, 0, 0, 3, 3, 5, 1, 1, 1, 1, 3, 4, 7, 6, 6, 6, 6, 1, 3, 4, 3, 4, 2, 1, 3, 5, 4, 6, 6, 1, 3,
|
||||||
0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 0, 0, 0, 0, 0, 3, 3, 1, 0 };
|
1, 1, 1, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
if (m_bIsInitialised) {
|
if (m_bIsInitialised) {
|
||||||
if (index >= 0 && index < NUM_AUDIOENTITIES) {
|
if (index >= 0 && index < NUM_AUDIOENTITIES) {
|
||||||
@@ -221,12 +219,6 @@ cAudioManager::PlayOneShot(int32 index, uint16 sound, float vol)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cAudioManager::SetMP3BoostVolume(uint8 volume) const
|
|
||||||
{
|
|
||||||
SampleManager.SetMP3BoostVolume(volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::SetEffectsMasterVolume(uint8 volume) const
|
cAudioManager::SetEffectsMasterVolume(uint8 volume) const
|
||||||
{
|
{
|
||||||
@@ -274,13 +266,11 @@ cAudioManager::ResetTimers(uint32 time)
|
|||||||
m_nActiveSampleQueue = 0;
|
m_nActiveSampleQueue = 0;
|
||||||
}
|
}
|
||||||
ClearActiveSamples();
|
ClearActiveSamples();
|
||||||
ClearMissionAudio(0);
|
ClearMissionAudio();
|
||||||
ClearMissionAudio(1);
|
|
||||||
SampleManager.StopChannel(policeChannel);
|
SampleManager.StopChannel(policeChannel);
|
||||||
SampleManager.SetEffectsFadeVolume(0);
|
SampleManager.SetEffectsFadeVolume(0);
|
||||||
SampleManager.SetMusicFadeVolume(0);
|
SampleManager.SetMusicFadeVolume(0);
|
||||||
MusicManager.ResetMusicAfterReload();
|
MusicManager.ResetMusicAfterReload();
|
||||||
m_bIsPlayerShutUp = false;
|
|
||||||
#ifdef AUDIO_OAL
|
#ifdef AUDIO_OAL
|
||||||
SampleManager.Service();
|
SampleManager.Service();
|
||||||
#endif
|
#endif
|
||||||
@@ -299,7 +289,7 @@ cAudioManager::DestroyAllGameCreatedEntities()
|
|||||||
case AUDIOTYPE_PHYSICAL:
|
case AUDIOTYPE_PHYSICAL:
|
||||||
case AUDIOTYPE_EXPLOSION:
|
case AUDIOTYPE_EXPLOSION:
|
||||||
case AUDIOTYPE_WEATHER:
|
case AUDIOTYPE_WEATHER:
|
||||||
//case AUDIOTYPE_CRANE:
|
case AUDIOTYPE_CRANE:
|
||||||
case AUDIOTYPE_GARAGE:
|
case AUDIOTYPE_GARAGE:
|
||||||
case AUDIOTYPE_FIREHYDRANT:
|
case AUDIOTYPE_FIREHYDRANT:
|
||||||
DestroyEntity(i);
|
DestroyEntity(i);
|
||||||
@@ -353,15 +343,6 @@ cAudioManager::GetCurrent3DProviderIndex() const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
|
||||||
cAudioManager::AutoDetect3DProviders() const
|
|
||||||
{
|
|
||||||
if (m_bIsInitialised)
|
|
||||||
return SampleManager.AutoDetect3DProviders();
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int8
|
int8
|
||||||
cAudioManager::SetCurrent3DProvider(uint8 which)
|
cAudioManager::SetCurrent3DProvider(uint8 which)
|
||||||
{
|
{
|
||||||
@@ -431,7 +412,9 @@ cAudioManager::CheckForAnAudioFileOnCD() const
|
|||||||
uint8
|
uint8
|
||||||
cAudioManager::GetCDAudioDriveLetter() const
|
cAudioManager::GetCDAudioDriveLetter() const
|
||||||
{
|
{
|
||||||
if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter();
|
if (m_bIsInitialised)
|
||||||
|
return SampleManager.GetCDAudioDriveLetter();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,7 +445,7 @@ cAudioManager::ServiceSoundEffects()
|
|||||||
ClearActiveSamples();
|
ClearActiveSamples();
|
||||||
}
|
}
|
||||||
m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1;
|
m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1;
|
||||||
if(m_bReverb) ProcessReverb();
|
ProcessReverb();
|
||||||
ProcessSpecial();
|
ProcessSpecial();
|
||||||
ClearRequestedQueue();
|
ClearRequestedQueue();
|
||||||
InterrogateAudioEntities();
|
InterrogateAudioEntities();
|
||||||
@@ -491,18 +474,12 @@ uint8
|
|||||||
cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const
|
cAudioManager::ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const
|
||||||
{
|
{
|
||||||
float newSoundIntensity;
|
float newSoundIntensity;
|
||||||
float newEmittingVolume;
|
|
||||||
|
|
||||||
if (soundIntensity <= 0.0f)
|
if (soundIntensity <= 0.0f)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
newSoundIntensity = soundIntensity / 5.0f;
|
newSoundIntensity = soundIntensity / 5.0f;
|
||||||
if (newSoundIntensity > distance)
|
if (newSoundIntensity <= distance)
|
||||||
return emittingVolume;
|
emittingVolume = sq((soundIntensity - newSoundIntensity - (distance - newSoundIntensity)) / (soundIntensity - newSoundIntensity)) * emittingVolume;
|
||||||
|
return emittingVolume;
|
||||||
newEmittingVolume = emittingVolume * SQR((soundIntensity - newSoundIntensity - (distance - newSoundIntensity))
|
|
||||||
/ (soundIntensity - newSoundIntensity));
|
|
||||||
return Min(127u, newEmittingVolume);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -514,16 +491,17 @@ cAudioManager::TranslateEntity(Const CVector *in, CVector *out) const
|
|||||||
int32
|
int32
|
||||||
cAudioManager::ComputePan(float dist, CVector *vec)
|
cAudioManager::ComputePan(float dist, CVector *vec)
|
||||||
{
|
{
|
||||||
const uint8 PanTable[64] = { 0, 3, 8, 12, 16, 19, 22, 24, 26, 28, 30, 31, 33, 34, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 53,
|
const uint8 PanTable[64] = {0, 3, 8, 12, 16, 19, 22, 24, 26, 28, 30, 31, 33, 34, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 49, 50, 51, 52, 53, 53,
|
||||||
54, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63};
|
54, 55, 55, 56, 56, 57, 57, 58, 58, 58, 59, 59, 59, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63};
|
||||||
int32 index = Min(63, Abs(int32(vec->x / (dist / 64.f))));
|
|
||||||
|
int32 index = Min(63, Abs(vec->x / (dist / 64.f)));
|
||||||
|
|
||||||
if (vec->x > 0.f)
|
if (vec->x > 0.f)
|
||||||
return Max(20, 63 - PanTable[index]);
|
return Max(20, 63 - PanTable[index]);
|
||||||
return Min(107, PanTable[index] + 63);
|
return Min(107, PanTable[index] + 63);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32
|
int32
|
||||||
cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const
|
cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const
|
||||||
{
|
{
|
||||||
uint32 newFreq = oldFreq;
|
uint32 newFreq = oldFreq;
|
||||||
@@ -532,7 +510,11 @@ cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1,
|
|||||||
if (dist != 0.0f) {
|
if (dist != 0.0f) {
|
||||||
float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier;
|
float speedOfSource = (dist / m_nTimeSpent) * speedMultiplier;
|
||||||
if (m_fSpeedOfSound > Abs(speedOfSource)) {
|
if (m_fSpeedOfSound > Abs(speedOfSource)) {
|
||||||
speedOfSource = clamp2(speedOfSource, 0.0f, 1.5f);
|
if (speedOfSource < 0.0f) {
|
||||||
|
speedOfSource = Max(speedOfSource, -1.5f);
|
||||||
|
} else {
|
||||||
|
speedOfSource = Min(speedOfSource, 1.5f);
|
||||||
|
}
|
||||||
newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
|
newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -590,7 +572,7 @@ cAudioManager::AddSampleToRequestedQueue()
|
|||||||
}
|
}
|
||||||
m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
|
m_sQueueSample.m_nCalculatedVolume = calculatedVolume;
|
||||||
m_sQueueSample.m_bLoopEnded = false;
|
m_sQueueSample.m_bLoopEnded = false;
|
||||||
if (m_sQueueSample.m_bIs2D || CCullZones::InRoomForAudio()) {
|
if (m_sQueueSample.m_bIs2D) {
|
||||||
m_sQueueSample.m_bRequireReflection = false;
|
m_sQueueSample.m_bRequireReflection = false;
|
||||||
m_sQueueSample.m_nLoopsRemaining = 0;
|
m_sQueueSample.m_nLoopsRemaining = 0;
|
||||||
}
|
}
|
||||||
@@ -602,9 +584,6 @@ cAudioManager::AddSampleToRequestedQueue()
|
|||||||
}
|
}
|
||||||
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)
|
if (!m_bDynamicAcousticModelingStatus)
|
||||||
m_sQueueSample.m_bReverbFlag = false;
|
m_sQueueSample.m_bReverbFlag = false;
|
||||||
|
|
||||||
@@ -635,52 +614,26 @@ cAudioManager::AddDetailsToRequestedOrderList(uint8 sample)
|
|||||||
void
|
void
|
||||||
cAudioManager::AddReflectionsToRequestedQueue()
|
cAudioManager::AddReflectionsToRequestedQueue()
|
||||||
{
|
{
|
||||||
#ifdef FIX_BUGS
|
|
||||||
uint32 oldFreq = 0;
|
|
||||||
#else
|
|
||||||
uint32 oldFreq;
|
|
||||||
#endif
|
|
||||||
float reflectionDistance;
|
float reflectionDistance;
|
||||||
int32 noise;
|
int32 noise;
|
||||||
uint8 emittingVolume;
|
uint8 emittingVolume = (m_sQueueSample.m_nVolume / 2) + (m_sQueueSample.m_nVolume / 8);
|
||||||
|
|
||||||
uint32 oldCounter = m_sQueueSample.m_nCounter;
|
|
||||||
float oldDist = m_sQueueSample.m_fDistance;
|
|
||||||
CVector oldPos = m_sQueueSample.m_vecPos;
|
|
||||||
if ( CTimer::GetIsSlowMotionActive() ) {
|
|
||||||
emittingVolume = m_sQueueSample.m_nVolume;
|
|
||||||
oldFreq = m_sQueueSample.m_nFrequency;
|
|
||||||
} else {
|
|
||||||
emittingVolume = (9 * m_sQueueSample.m_nVolume) / 16;
|
|
||||||
}
|
|
||||||
m_sQueueSample.m_fSoundIntensity /= 2.f;
|
|
||||||
|
|
||||||
int halfOldFreq = oldFreq >> 1;
|
|
||||||
|
|
||||||
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
|
for (uint32 i = 0; i < ARRAY_SIZE(m_afReflectionsDistances); i++) {
|
||||||
if ( CTimer::GetIsSlowMotionActive() )
|
|
||||||
m_afReflectionsDistances[i] = GetRandomNumberInRange(i % 4, 0, 2) * 100.f / 8.f;
|
|
||||||
|
|
||||||
reflectionDistance = m_afReflectionsDistances[i];
|
reflectionDistance = m_afReflectionsDistances[i];
|
||||||
if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_fSoundIntensity) {
|
if (reflectionDistance > 0.0f && reflectionDistance < 100.f && reflectionDistance < m_sQueueSample.m_fSoundIntensity) {
|
||||||
m_sQueueSample.m_nLoopsRemaining = CTimer::GetIsSlowMotionActive() ? (reflectionDistance * 800.f / 1029.f) : (reflectionDistance * 500.f / 1029.f);
|
m_sQueueSample.m_nLoopsRemaining = (reflectionDistance * 500.f / 1029.f);
|
||||||
if (m_sQueueSample.m_nLoopsRemaining > 3) {
|
if (m_sQueueSample.m_nLoopsRemaining > 5) {
|
||||||
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
|
m_sQueueSample.m_fDistance = m_afReflectionsDistances[i];
|
||||||
m_sQueueSample.m_nEmittingVolume = emittingVolume;
|
m_sQueueSample.m_nEmittingVolume = emittingVolume;
|
||||||
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
|
m_sQueueSample.m_nVolume = ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
|
||||||
|
|
||||||
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
|
if (m_sQueueSample.m_nVolume > emittingVolume / 16) {
|
||||||
m_sQueueSample.m_nCounter = oldCounter + (i + 1) * 256;
|
m_sQueueSample.m_nCounter += (i + 1) * 256;
|
||||||
if (m_sQueueSample.m_nLoopCount) {
|
if (m_sQueueSample.m_nLoopCount) {
|
||||||
if ( CTimer::GetIsSlowMotionActive() ) {
|
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
||||||
m_sQueueSample.m_nFrequency = halfOldFreq + ((halfOldFreq * i) / ARRAY_SIZE(m_afReflectionsDistances));
|
if (noise <= 0)
|
||||||
} else {
|
m_sQueueSample.m_nFrequency += noise;
|
||||||
noise = RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
|
else
|
||||||
if (noise <= 0)
|
m_sQueueSample.m_nFrequency -= noise;
|
||||||
m_sQueueSample.m_nFrequency += noise;
|
|
||||||
else
|
|
||||||
m_sQueueSample.m_nFrequency -= noise;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
m_sQueueSample.m_nReleasingVolumeModificator += 20;
|
m_sQueueSample.m_nReleasingVolumeModificator += 20;
|
||||||
m_sQueueSample.m_vecPos = m_avecReflectionsPos[i];
|
m_sQueueSample.m_vecPos = m_avecReflectionsPos[i];
|
||||||
@@ -689,84 +642,50 @@ cAudioManager::AddReflectionsToRequestedQueue()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_sQueueSample.m_vecPos = oldPos;
|
|
||||||
m_sQueueSample.m_fDistance = oldDist;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::UpdateReflections()
|
cAudioManager::UpdateReflections()
|
||||||
{
|
{
|
||||||
CVector camPos = TheCamera.GetPosition();
|
const CVector &camPos = TheCamera.GetPosition();
|
||||||
CColPoint colpoint;
|
CColPoint colpoint;
|
||||||
CEntity *ent;
|
CEntity *ent;
|
||||||
|
|
||||||
if (m_FrameCounter % 8 == 0) {
|
if (m_FrameCounter % 8 == 0) {
|
||||||
m_avecReflectionsPos[0] = camPos;
|
m_avecReflectionsPos[0] = camPos;
|
||||||
m_avecReflectionsPos[0].y += 100.f;
|
m_avecReflectionsPos[0].y += 50.f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[0], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[0], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[0] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[0] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[0] = 100.0f;
|
m_afReflectionsDistances[0] = 50.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 1) % 8 == 0) {
|
} else if ((m_FrameCounter + 1) % 8 == 0) {
|
||||||
m_avecReflectionsPos[1] = camPos;
|
m_avecReflectionsPos[1] = camPos;
|
||||||
m_avecReflectionsPos[1].y -= 100.0f;
|
m_avecReflectionsPos[1].y -= 50.0f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[1], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[1], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[1] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[1] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[1] = 100.0f;
|
m_afReflectionsDistances[1] = 50.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 2) % 8 == 0) {
|
} else if ((m_FrameCounter + 2) % 8 == 0) {
|
||||||
m_avecReflectionsPos[2] = camPos;
|
m_avecReflectionsPos[2] = camPos;
|
||||||
m_avecReflectionsPos[2].x -= 100.0f;
|
m_avecReflectionsPos[2].x -= 50.0f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[2], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[2], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[2] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[2] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[2] = 100.0f;
|
m_afReflectionsDistances[2] = 50.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 3) % 8 == 0) {
|
} else if ((m_FrameCounter + 3) % 8 == 0) {
|
||||||
m_avecReflectionsPos[3] = camPos;
|
m_avecReflectionsPos[3] = camPos;
|
||||||
m_avecReflectionsPos[3].x += 100.0f;
|
m_avecReflectionsPos[3].x += 50.0f;
|
||||||
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[3], colpoint, ent, true, false, false, true, false, true, true))
|
if (CWorld::ProcessLineOfSight(camPos, m_avecReflectionsPos[3], colpoint, ent, true, false, false, true, false, true, true))
|
||||||
m_afReflectionsDistances[3] = Distance(camPos, colpoint.point);
|
m_afReflectionsDistances[3] = Distance(camPos, colpoint.point);
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[3] = 100.0f;
|
m_afReflectionsDistances[3] = 50.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 4) % 8 == 0) {
|
} else if ((m_FrameCounter + 4) % 8 == 0) {
|
||||||
camPos.y += 1.0f;
|
|
||||||
m_avecReflectionsPos[4] = camPos;
|
m_avecReflectionsPos[4] = camPos;
|
||||||
m_avecReflectionsPos[4].z += 100.0f;
|
m_avecReflectionsPos[4].z += 50.0f;
|
||||||
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[4].z, colpoint, ent, true, false, false, false, true, false, nil))
|
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[4].z, colpoint, ent, true, false, false, false, true, false, nil))
|
||||||
m_afReflectionsDistances[4] = colpoint.point.z - camPos.z;
|
m_afReflectionsDistances[4] = colpoint.point.z - camPos.z;
|
||||||
else
|
else
|
||||||
m_afReflectionsDistances[4] = 100.0f;
|
m_afReflectionsDistances[4] = 50.0f;
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 5) % 8 == 0) {
|
|
||||||
camPos.y -= 1.0f;
|
|
||||||
m_avecReflectionsPos[5] = camPos;
|
|
||||||
m_avecReflectionsPos[5].z += 100.0f;
|
|
||||||
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[5].z, colpoint, ent, true, false, false, false, true, false, nil))
|
|
||||||
m_afReflectionsDistances[5] = colpoint.point.z - camPos.z;
|
|
||||||
else
|
|
||||||
m_afReflectionsDistances[5] = 100.0f;
|
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 6) % 8 == 0) {
|
|
||||||
camPos.x -= 1.0f;
|
|
||||||
m_avecReflectionsPos[6] = camPos;
|
|
||||||
m_avecReflectionsPos[6].z += 100.0f;
|
|
||||||
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[6].z, colpoint, ent, true, false, false, false, true, false, nil))
|
|
||||||
m_afReflectionsDistances[6] = colpoint.point.z - camPos.z;
|
|
||||||
else
|
|
||||||
m_afReflectionsDistances[6] = 100.0f;
|
|
||||||
|
|
||||||
} else if ((m_FrameCounter + 7) % 8 == 0) {
|
|
||||||
camPos.x += 1.0f;
|
|
||||||
m_avecReflectionsPos[7] = camPos;
|
|
||||||
m_avecReflectionsPos[7].z += 100.0f;
|
|
||||||
if (CWorld::ProcessVerticalLine(camPos, m_avecReflectionsPos[7].z, colpoint, ent, true, false, false, false, true, false, nil))
|
|
||||||
m_afReflectionsDistances[7] = colpoint.point.z - camPos.z;
|
|
||||||
else
|
|
||||||
m_afReflectionsDistances[7] = 100.0f;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -811,7 +730,7 @@ cAudioManager::AddReleasingSounds()
|
|||||||
if (sample.m_nReleasingVolumeModificator < 20)
|
if (sample.m_nReleasingVolumeModificator < 20)
|
||||||
++sample.m_nReleasingVolumeModificator;
|
++sample.m_nReleasingVolumeModificator;
|
||||||
}
|
}
|
||||||
sample.m_bReleasingSoundFlag = false;
|
sample.m_bReleasingSoundFlag = 0;
|
||||||
}
|
}
|
||||||
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
|
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
|
||||||
AddSampleToRequestedQueue();
|
AddSampleToRequestedQueue();
|
||||||
@@ -822,41 +741,39 @@ cAudioManager::AddReleasingSounds()
|
|||||||
void
|
void
|
||||||
cAudioManager::ProcessActiveQueues()
|
cAudioManager::ProcessActiveQueues()
|
||||||
{
|
{
|
||||||
CVector position;
|
|
||||||
uint32 freqDivided;
|
|
||||||
uint32 loopCount;
|
|
||||||
uint8 emittingVol;
|
|
||||||
uint8 vol;
|
|
||||||
uint8 offset;
|
|
||||||
float x;
|
|
||||||
bool flag;
|
bool flag;
|
||||||
bool missionState;
|
float position2;
|
||||||
|
float position1;
|
||||||
|
|
||||||
|
uint32 v28;
|
||||||
|
uint32 v29;
|
||||||
|
|
||||||
|
float x;
|
||||||
|
float usedX;
|
||||||
|
float usedY;
|
||||||
|
float usedZ;
|
||||||
|
|
||||||
|
uint8 vol;
|
||||||
|
uint8 emittingVol;
|
||||||
|
CVector position;
|
||||||
|
|
||||||
for (int32 i = 0; i < m_nActiveSamples; i++) {
|
for (int32 i = 0; i < m_nActiveSamples; i++) {
|
||||||
m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false;
|
m_asSamples[m_nActiveSampleQueue][i].m_bIsProcessed = false;
|
||||||
m_asActiveSamples[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]];
|
|
||||||
if (sample.m_nSampleIndex != NO_SAMPLE) {
|
|
||||||
for (int32 j = 0; j < m_nActiveSamples; j++) {
|
|
||||||
if (sample.m_nEntityIndex == m_asActiveSamples[j].m_nEntityIndex &&
|
|
||||||
sample.m_nCounter == m_asActiveSamples[j].m_nCounter &&
|
|
||||||
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
|
|
||||||
if (sample.m_nLoopCount) {
|
|
||||||
|
|
||||||
if (m_FrameCounter & 1) {
|
|
||||||
if (!(j & 1)) {
|
|
||||||
flag = false;
|
|
||||||
} else {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
} else if (j & 1) {
|
|
||||||
flag = false;
|
|
||||||
} else {
|
|
||||||
flag = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
for (int32 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) {
|
||||||
|
tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
||||||
|
if (sample.m_nSampleIndex != NO_SAMPLE) {
|
||||||
|
for (int32 j = 0; j < m_nActiveSamples; ++j) {
|
||||||
|
if (sample.m_nEntityIndex == m_asActiveSamples[j].m_nEntityIndex && sample.m_nCounter == m_asActiveSamples[j].m_nCounter &&
|
||||||
|
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
|
||||||
|
if (sample.m_nLoopCount) {
|
||||||
|
if (m_FrameCounter & 1) {
|
||||||
|
flag = !!(j & 1);
|
||||||
|
} else {
|
||||||
|
flag = !(j & 1);
|
||||||
|
}
|
||||||
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
|
if (flag && !SampleManager.GetChannelUsedFlag(j)) {
|
||||||
sample.m_bLoopEnded = true;
|
sample.m_bLoopEnded = true;
|
||||||
m_asActiveSamples[j].m_bLoopEnded = true;
|
m_asActiveSamples[j].m_bLoopEnded = true;
|
||||||
@@ -864,8 +781,6 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
|
m_asActiveSamples[j].m_nEntityIndex = AEHANDLE_NONE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!sample.m_nReleasingVolumeDivider)
|
|
||||||
sample.m_nReleasingVolumeDivider = 1;
|
|
||||||
}
|
}
|
||||||
sample.m_bIsProcessed = true;
|
sample.m_bIsProcessed = true;
|
||||||
m_asActiveSamples[j].m_bIsProcessed = true;
|
m_asActiveSamples[j].m_bIsProcessed = true;
|
||||||
@@ -881,39 +796,37 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
||||||
} else {
|
} else {
|
||||||
m_asActiveSamples[j].m_fDistance = sample.m_fDistance;
|
m_asActiveSamples[j].m_fDistance = sample.m_fDistance;
|
||||||
sample.m_nFrequency = ComputeDopplerEffectedFrequency(
|
position2 = sample.m_fDistance;
|
||||||
sample.m_nFrequency,
|
position1 = m_asActiveSamples[j].m_fDistance;
|
||||||
m_asActiveSamples[j].m_fDistance,
|
sample.m_nFrequency = ComputeDopplerEffectedFrequency(sample.m_nFrequency, position1, position2, sample.m_fSpeedMultiplier);
|
||||||
sample.m_fDistance,
|
|
||||||
sample.m_fSpeedMultiplier);
|
|
||||||
|
|
||||||
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
|
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
|
||||||
m_asActiveSamples[j].m_nFrequency = clamp2((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency, 6000);
|
int32 freq;
|
||||||
SampleManager.SetChannelFrequency(j, m_asActiveSamples[j].m_nFrequency);
|
if (sample.m_nFrequency <= m_asActiveSamples[j].m_nFrequency) {
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
freq = Max((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency - 6000);
|
||||||
|
#else
|
||||||
|
freq = Max((int32)sample.m_nFrequency, int32(m_asActiveSamples[j].m_nFrequency - 6000));
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
freq = Min(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency + 6000);
|
||||||
|
}
|
||||||
|
m_asActiveSamples[j].m_nFrequency = freq;
|
||||||
|
SampleManager.SetChannelFrequency(j, freq);
|
||||||
}
|
}
|
||||||
if (sample.m_nEmittingVolume != m_asActiveSamples[j].m_nEmittingVolume) {
|
|
||||||
vol = clamp2((int8)sample.m_nEmittingVolume, (int8)m_asActiveSamples[j].m_nEmittingVolume, 10);
|
|
||||||
|
|
||||||
|
if (sample.m_nEmittingVolume != m_asActiveSamples[j].m_nEmittingVolume) {
|
||||||
|
if (sample.m_nEmittingVolume <= m_asActiveSamples[j].m_nEmittingVolume) {
|
||||||
|
vol = Max(m_asActiveSamples[j].m_nEmittingVolume - 10, sample.m_nEmittingVolume);
|
||||||
|
} else {
|
||||||
|
vol = Min(m_asActiveSamples[j].m_nEmittingVolume + 10, sample.m_nEmittingVolume);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8 emittingVol;
|
||||||
if (field_4) {
|
if (field_4) {
|
||||||
emittingVol = 2 * Min(63, vol);
|
emittingVol = 2 * Min(63, vol);
|
||||||
} else {
|
} else {
|
||||||
emittingVol = vol;
|
emittingVol = vol;
|
||||||
}
|
}
|
||||||
|
|
||||||
missionState = false;
|
|
||||||
for (int32 k = 0; k < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); k++) {
|
|
||||||
if (m_sMissionAudio.m_bIsMobile[k]) {
|
|
||||||
missionState = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (missionState) {
|
|
||||||
emittingVol = (emittingVol * field_5538) / 127;
|
|
||||||
} else {
|
|
||||||
if (field_5538 < 127)
|
|
||||||
emittingVol = (emittingVol * field_5538) / 127;
|
|
||||||
}
|
|
||||||
|
|
||||||
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
||||||
m_asActiveSamples[j].m_nEmittingVolume = vol;
|
m_asActiveSamples[j].m_nEmittingVolume = vol;
|
||||||
}
|
}
|
||||||
@@ -922,11 +835,10 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
SampleManager.SetChannel3DDistances(j, sample.m_fSoundIntensity, 0.25f * sample.m_fSoundIntensity);
|
SampleManager.SetChannel3DDistances(j, sample.m_fSoundIntensity, 0.25f * sample.m_fSoundIntensity);
|
||||||
}
|
}
|
||||||
SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
|
SampleManager.SetChannelReverbFlag(j, sample.m_bReverbFlag);
|
||||||
break; //continue for i
|
break;
|
||||||
}
|
}
|
||||||
sample.m_bIsProcessed = false;
|
sample.m_bIsProcessed = false;
|
||||||
m_asActiveSamples[j].m_bIsProcessed = false;
|
m_asActiveSamples[j].m_bIsProcessed = false;
|
||||||
//continue for j
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -938,69 +850,59 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; i++) {
|
for (uint8 i = 0; i < m_SampleRequestQueuesStatus[m_nActiveSampleQueue]; ++i) {
|
||||||
tSound& sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
tSound &sample = m_asSamples[m_nActiveSampleQueue][m_abSampleQueueIndexTable[m_nActiveSampleQueue][i]];
|
||||||
if (!sample.m_bIsProcessed && !sample.m_bLoopEnded &&
|
if (!sample.m_bIsProcessed && !sample.m_bLoopEnded && m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
|
||||||
m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
|
|
||||||
if (sample.m_nCounter > 255 && sample.m_nLoopCount && sample.m_nLoopsRemaining) {
|
if (sample.m_nCounter > 255 && sample.m_nLoopCount && sample.m_nLoopsRemaining) {
|
||||||
sample.m_nLoopsRemaining--;
|
--sample.m_nLoopsRemaining;
|
||||||
sample.m_nReleasingVolumeDivider = 1;
|
sample.m_nReleasingVolumeDivider = 1;
|
||||||
} else {
|
} else {
|
||||||
for (uint8 j = 0; j < m_nActiveSamples; j++) {
|
for (uint8 j = 0; j < m_nActiveSamples; ++j) {
|
||||||
uint8 k = (j + field_6) % m_nActiveSamples;
|
if (!m_asActiveSamples[j].m_bIsProcessed) {
|
||||||
if (!m_asActiveSamples[k].m_bIsProcessed) {
|
if (sample.m_nLoopCount) {
|
||||||
if (sample.m_nLoopCount != 0) {
|
v28 = sample.m_nFrequency / m_nTimeSpent;
|
||||||
freqDivided = sample.m_nFrequency / m_nTimeSpent;
|
v29 = sample.m_nLoopCount * SampleManager.GetSampleLength(sample.m_nSampleIndex);
|
||||||
loopCount = sample.m_nLoopCount * SampleManager.GetSampleLength(sample.m_nSampleIndex);
|
if (v28 == 0)
|
||||||
if (freqDivided == 0)
|
|
||||||
continue;
|
continue;
|
||||||
sample.m_nReleasingVolumeDivider = loopCount / freqDivided + 1;
|
sample.m_nReleasingVolumeDivider = v29 / v28 + 1;
|
||||||
}
|
}
|
||||||
memcpy(&m_asActiveSamples[k], &sample, sizeof(tSound));
|
memcpy(&m_asActiveSamples[j], &sample, sizeof(tSound));
|
||||||
if (!m_asActiveSamples[k].m_bIs2D)
|
if (!m_asActiveSamples[j].m_bIs2D)
|
||||||
TranslateEntity(&m_asActiveSamples[k].m_vecPos, &position);
|
TranslateEntity(&m_asActiveSamples[j].m_vecPos, &position);
|
||||||
if (field_4) {
|
if (field_4) {
|
||||||
emittingVol = 2 * Min(63, m_asActiveSamples[k].m_nEmittingVolume);
|
emittingVol = 2 * Min(63, m_asActiveSamples[j].m_nEmittingVolume);
|
||||||
} else {
|
} else {
|
||||||
emittingVol = m_asActiveSamples[k].m_nEmittingVolume;
|
emittingVol = m_asActiveSamples[j].m_nEmittingVolume;
|
||||||
}
|
}
|
||||||
if (SampleManager.InitialiseChannel(k, m_asActiveSamples[k].m_nSampleIndex, m_asActiveSamples[k].m_nBankIndex)) {
|
if (SampleManager.InitialiseChannel(j, m_asActiveSamples[j].m_nSampleIndex, m_asActiveSamples[j].m_nBankIndex)) {
|
||||||
SampleManager.SetChannelFrequency(k, m_asActiveSamples[k].m_nFrequency);
|
SampleManager.SetChannelFrequency(j, m_asActiveSamples[j].m_nFrequency);
|
||||||
bool isMobile = false;
|
SampleManager.SetChannelEmittingVolume(j, emittingVol);
|
||||||
for (int32 l = 0; l < ARRAY_SIZE(m_sMissionAudio.m_bIsMobile); l++) {
|
SampleManager.SetChannelLoopPoints(j, m_asActiveSamples[j].m_nLoopStart, m_asActiveSamples[j].m_nLoopEnd);
|
||||||
if (m_sMissionAudio.m_bIsMobile[l]) {
|
SampleManager.SetChannelLoopCount(j, m_asActiveSamples[j].m_nLoopCount);
|
||||||
isMobile = true;
|
SampleManager.SetChannelReverbFlag(j, m_asActiveSamples[j].m_bReverbFlag);
|
||||||
break;
|
if (m_asActiveSamples[j].m_bIs2D) {
|
||||||
}
|
uint8 offset = m_asActiveSamples[j].m_nOffset;
|
||||||
}
|
|
||||||
if (!isMobile || m_asActiveSamples[k].m_bIs2D) {
|
|
||||||
if (field_5538 < 127)
|
|
||||||
emittingVol *= field_5538 / 127;
|
|
||||||
vol = emittingVol;
|
|
||||||
} else {
|
|
||||||
vol = (emittingVol * field_5538 / 127);
|
|
||||||
}
|
|
||||||
SampleManager.SetChannelEmittingVolume(k, vol);
|
|
||||||
SampleManager.SetChannelLoopPoints(k, m_asActiveSamples[k].m_nLoopStart, m_asActiveSamples[k].m_nLoopEnd);
|
|
||||||
SampleManager.SetChannelLoopCount(k, m_asActiveSamples[k].m_nLoopCount);
|
|
||||||
SampleManager.SetChannelReverbFlag(k, m_asActiveSamples[k].m_bReverbFlag);
|
|
||||||
if (m_asActiveSamples[k].m_bIs2D) {
|
|
||||||
offset = m_asActiveSamples[k].m_nOffset;
|
|
||||||
if (offset == 63) {
|
if (offset == 63) {
|
||||||
x = 0.0f;
|
x = 0.f;
|
||||||
} else if (offset >= 63) {
|
} else if (offset >= 63) {
|
||||||
x = (offset - 63) * 1000.0f / 63;
|
x = (offset - 63) * 1000.f / 63;
|
||||||
} else {
|
} else {
|
||||||
x = -(63 - offset) * 1000.0f / 63; //same like line below
|
x = -(63 - offset) * 1000.f / 63;
|
||||||
}
|
}
|
||||||
position = CVector(x, 0.0f, 0.0f);
|
usedX = x;
|
||||||
m_asActiveSamples[k].m_fSoundIntensity = 100000.0f;
|
usedY = 0.f;
|
||||||
|
usedZ = 0.f;
|
||||||
|
m_asActiveSamples[j].m_fSoundIntensity = 100000.0f;
|
||||||
|
} else {
|
||||||
|
usedX = position.x;
|
||||||
|
usedY = position.y;
|
||||||
|
usedZ = position.z;
|
||||||
}
|
}
|
||||||
SampleManager.SetChannel3DPosition(k, position.x, position.y, position.z);
|
SampleManager.SetChannel3DPosition(j, usedX, usedY, usedZ);
|
||||||
SampleManager.SetChannel3DDistances(k, m_asActiveSamples[k].m_fSoundIntensity, 0.25f * m_asActiveSamples[k].m_fSoundIntensity);
|
SampleManager.SetChannel3DDistances(j, m_asActiveSamples[j].m_fSoundIntensity, 0.25f * m_asActiveSamples[j].m_fSoundIntensity);
|
||||||
SampleManager.StartChannel(k);
|
SampleManager.StartChannel(j);
|
||||||
}
|
}
|
||||||
m_asActiveSamples[k].m_bIsProcessed = true;
|
m_asActiveSamples[j].m_bIsProcessed = true;
|
||||||
sample.m_bIsProcessed = true;
|
sample.m_bIsProcessed = true;
|
||||||
sample.m_nVolumeChange = -1;
|
sample.m_nVolumeChange = -1;
|
||||||
break;
|
break;
|
||||||
@@ -1009,7 +911,6 @@ cAudioManager::ProcessActiveQueues()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
field_6 %= m_nActiveSamples;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1024,7 +925,7 @@ cAudioManager::ClearRequestedQueue()
|
|||||||
void
|
void
|
||||||
cAudioManager::ClearActiveSamples()
|
cAudioManager::ClearActiveSamples()
|
||||||
{
|
{
|
||||||
for (uint8 i = 0; i < m_nActiveSamples; i++) {
|
for (int32 i = 0; i < m_nActiveSamples; i++) {
|
||||||
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
|
||||||
m_asActiveSamples[i].m_nCounter = 0;
|
m_asActiveSamples[i].m_nCounter = 0;
|
||||||
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
|
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
|
||||||
@@ -1083,4 +984,4 @@ cAudioManager::ComputeEmittingVolume(uint8 emittingVolume, float intensity, floa
|
|||||||
return (quatIntensity - (dist - diffIntensity)) * (float)emittingVolume / quatIntensity;
|
return (quatIntensity - (dist - diffIntensity)) * (float)emittingVolume / quatIntensity;
|
||||||
return emittingVolume;
|
return emittingVolume;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
#include "audio_enums.h"
|
#include "audio_enums.h"
|
||||||
#include "AudioCollision.h"
|
#include "AudioCollision.h"
|
||||||
#include "PoliceRadio.h"
|
#include "PoliceRadio.h"
|
||||||
#include "VehicleModelInfo.h"
|
|
||||||
#include "Vehicle.h"
|
|
||||||
|
|
||||||
class tSound
|
class tSound
|
||||||
{
|
{
|
||||||
@@ -30,7 +28,6 @@ public:
|
|||||||
uint8 m_nLoopsRemaining;
|
uint8 m_nLoopsRemaining;
|
||||||
bool m_bRequireReflection; // Used for oneshots
|
bool m_bRequireReflection; // Used for oneshots
|
||||||
uint8 m_nOffset;
|
uint8 m_nOffset;
|
||||||
uint8 field_4C;
|
|
||||||
int32 m_nReleasingVolumeDivider;
|
int32 m_nReleasingVolumeDivider;
|
||||||
bool m_bIsProcessed;
|
bool m_bIsProcessed;
|
||||||
bool m_bLoopEnded;
|
bool m_bLoopEnded;
|
||||||
@@ -38,7 +35,7 @@ public:
|
|||||||
int8 m_nVolumeChange;
|
int8 m_nVolumeChange;
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(tSound, 96);
|
VALIDATE_SIZE(tSound, 92);
|
||||||
|
|
||||||
class CPhysical;
|
class CPhysical;
|
||||||
class CAutomobile;
|
class CAutomobile;
|
||||||
@@ -60,7 +57,7 @@ VALIDATE_SIZE(tAudioEntity, 40);
|
|||||||
class tPedComment
|
class tPedComment
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
uint32 m_nSampleIndex;
|
int32 m_nSampleIndex;
|
||||||
int32 m_nEntityIndex;
|
int32 m_nEntityIndex;
|
||||||
CVector m_vecPos;
|
CVector m_vecPos;
|
||||||
float m_fDistance;
|
float m_fDistance;
|
||||||
@@ -77,10 +74,6 @@ public:
|
|||||||
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
|
||||||
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
|
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
|
||||||
uint8 m_nActiveBank;
|
uint8 m_nActiveBank;
|
||||||
#ifdef GTA_PC
|
|
||||||
bool m_bDelay;
|
|
||||||
uint32 m_nDelayTimer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
cPedComments()
|
cPedComments()
|
||||||
{
|
{
|
||||||
@@ -94,32 +87,27 @@ public:
|
|||||||
m_nCommentsInBank[i] = 0;
|
m_nCommentsInBank[i] = 0;
|
||||||
m_nActiveBank = 0;
|
m_nActiveBank = 0;
|
||||||
}
|
}
|
||||||
void Add(tPedComment *com); // done
|
void Add(tPedComment *com);
|
||||||
void Process(); // done
|
void Process();
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cPedComments, 0x490);
|
VALIDATE_SIZE(cPedComments, 1164);
|
||||||
|
|
||||||
class CEntity;
|
class CEntity;
|
||||||
|
|
||||||
#define MISSION_AUDIO_SLOTS (2)
|
|
||||||
|
|
||||||
// So instead of doing cMissionAudio [2] they've added [2] to every field of the struct...
|
|
||||||
// Only someone with a VERY EXTRAORDINARY mind could have come up with that
|
|
||||||
class cMissionAudio
|
class cMissionAudio
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CVector m_vecPos[MISSION_AUDIO_SLOTS];
|
CVector m_vecPos;
|
||||||
bool m_bPredefinedProperties[MISSION_AUDIO_SLOTS];
|
bool m_bPredefinedProperties;
|
||||||
int32 m_nSampleIndex[MISSION_AUDIO_SLOTS];
|
int32 m_nSampleIndex;
|
||||||
uint8 m_nLoadingStatus[MISSION_AUDIO_SLOTS];
|
uint8 m_nLoadingStatus;
|
||||||
uint8 m_nPlayStatus[MISSION_AUDIO_SLOTS];
|
uint8 m_nPlayStatus;
|
||||||
bool m_bIsPlaying[MISSION_AUDIO_SLOTS];
|
bool m_bIsPlaying;
|
||||||
int32 m_nMissionAudioCounter[MISSION_AUDIO_SLOTS];
|
int32 m_nMissionAudioCounter;
|
||||||
bool m_bIsPlayed[MISSION_AUDIO_SLOTS];
|
bool m_bIsPlayed;
|
||||||
bool m_bIsMobile[MISSION_AUDIO_SLOTS];
|
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(cMissionAudio, 0x38);
|
VALIDATE_SIZE(cMissionAudio, 32);
|
||||||
|
|
||||||
// name made up
|
// name made up
|
||||||
class cAudioScriptObjectManager
|
class cAudioScriptObjectManager
|
||||||
@@ -156,7 +144,6 @@ public:
|
|||||||
class cVehicleParams
|
class cVehicleParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int32 m_VehicleType;
|
|
||||||
bool m_bDistanceCalculated;
|
bool m_bDistanceCalculated;
|
||||||
float m_fDistance;
|
float m_fDistance;
|
||||||
CVehicle *m_pVehicle;
|
CVehicle *m_pVehicle;
|
||||||
@@ -166,7 +153,6 @@ public:
|
|||||||
|
|
||||||
cVehicleParams()
|
cVehicleParams()
|
||||||
{
|
{
|
||||||
m_VehicleType = -1;
|
|
||||||
m_bDistanceCalculated = false;
|
m_bDistanceCalculated = false;
|
||||||
m_fDistance = 0.0f;
|
m_fDistance = 0.0f;
|
||||||
m_pVehicle = nil;
|
m_pVehicle = nil;
|
||||||
@@ -176,17 +162,22 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cVehicleParams, 0x1C);
|
VALIDATE_SIZE(cVehicleParams, 0x18);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
REFLECTION_NORTH = 0,
|
/*
|
||||||
REFLECTION_SOUTH,
|
REFLECTION_YMAX = 0, top
|
||||||
REFLECTION_WEST,
|
REFLECTION_YMIN = 1, bottom
|
||||||
REFLECTION_EAST,
|
REFLECTION_XMIN = 2, left
|
||||||
REFLECTION_CEIL_NORTH,
|
REFLECTION_XMAX = 3, right
|
||||||
REFLECTION_CEIL_SOUTH,
|
REFLECTION_ZMAX = 4,
|
||||||
REFLECTION_CEIL_WEST,
|
*/
|
||||||
REFLECTION_CEIL_EAST,
|
|
||||||
|
REFLECTION_TOP = 0,
|
||||||
|
REFLECTION_BOTTOM,
|
||||||
|
REFLECTION_LEFT,
|
||||||
|
REFLECTION_RIGHT,
|
||||||
|
REFLECTION_UP,
|
||||||
MAX_REFLECTIONS,
|
MAX_REFLECTIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -194,12 +185,11 @@ class cAudioManager
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool m_bIsInitialised;
|
bool m_bIsInitialised;
|
||||||
uint8 m_bReverb; // unused
|
bool m_bReverb; // unused
|
||||||
bool m_bFifthFrameFlag;
|
bool m_bFifthFrameFlag;
|
||||||
uint8 m_nActiveSamples;
|
uint8 m_nActiveSamples;
|
||||||
uint8 field_4; // unused
|
uint8 field_4; // unused
|
||||||
bool m_bDynamicAcousticModelingStatus;
|
bool m_bDynamicAcousticModelingStatus;
|
||||||
int8 field_6;
|
|
||||||
float m_fSpeedOfSound;
|
float m_fSpeedOfSound;
|
||||||
bool m_bTimerJustReset;
|
bool m_bTimerJustReset;
|
||||||
int32 m_nTimer;
|
int32 m_nTimer;
|
||||||
@@ -215,14 +205,6 @@ public:
|
|||||||
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
|
CVector m_avecReflectionsPos[NUM_AUDIO_REFLECTIONS];
|
||||||
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
|
float m_afReflectionsDistances[NUM_AUDIO_REFLECTIONS];
|
||||||
cAudioScriptObjectManager m_sAudioScriptObjectManager;
|
cAudioScriptObjectManager m_sAudioScriptObjectManager;
|
||||||
|
|
||||||
// miami
|
|
||||||
uint8 m_bIsPlayerShutUp;
|
|
||||||
uint8 m_nPlayerMood;
|
|
||||||
uint32 m_nPlayerMoodTimer;
|
|
||||||
uint8 field_rest[4];
|
|
||||||
bool m_bGenericSfx;
|
|
||||||
|
|
||||||
cPedComments m_sPedComments;
|
cPedComments m_sPedComments;
|
||||||
int32 m_nFireAudioEntity;
|
int32 m_nFireAudioEntity;
|
||||||
int32 m_nWaterCannonEntity;
|
int32 m_nWaterCannonEntity;
|
||||||
@@ -232,13 +214,8 @@ public:
|
|||||||
int32 m_nCollisionEntity;
|
int32 m_nCollisionEntity;
|
||||||
cAudioCollisionManager m_sCollisionManager;
|
cAudioCollisionManager m_sCollisionManager;
|
||||||
int32 m_nProjectileEntity;
|
int32 m_nProjectileEntity;
|
||||||
#ifdef GTA_BRIDGE
|
|
||||||
int32 m_nBridgeEntity;
|
int32 m_nBridgeEntity;
|
||||||
#endif
|
|
||||||
int32 m_nEscalatorEntity;
|
|
||||||
int32 m_nExtraSoundsEntity;
|
|
||||||
cMissionAudio m_sMissionAudio;
|
cMissionAudio m_sMissionAudio;
|
||||||
uint8 field_5538; // something related to phone dialogues
|
|
||||||
int32 m_anRandomTable[5];
|
int32 m_anRandomTable[5];
|
||||||
uint8 m_nTimeSpent;
|
uint8 m_nTimeSpent;
|
||||||
uint8 m_nUserPause;
|
uint8 m_nUserPause;
|
||||||
@@ -249,303 +226,280 @@ public:
|
|||||||
~cAudioManager();
|
~cAudioManager();
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
uint32 GetFrameCounter() const { return m_FrameCounter; } // done
|
uint32 GetFrameCounter() const { return m_FrameCounter; }
|
||||||
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done
|
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
|
||||||
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
|
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
|
||||||
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
|
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() const { return m_sMissionAudio.m_nPlayStatus == 1; }
|
||||||
bool ShouldDuckMissionAudio(uint8 slot) const;
|
|
||||||
|
|
||||||
// "Should" be in alphabetic order, except "getXTalkSfx"
|
// "Should" be in alphabetic order, except "getXTalkSfx"
|
||||||
void AddDetailsToRequestedOrderList(uint8 sample); // done (inlined in vc)
|
void AddDetailsToRequestedOrderList(uint8 sample);
|
||||||
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,
|
||||||
void AddReflectionsToRequestedQueue(); // done
|
uint8 counter, bool notLooping);
|
||||||
void AddReleasingSounds(); // done
|
void AddReflectionsToRequestedQueue();
|
||||||
void AddSampleToRequestedQueue(); // done
|
void AddReleasingSounds();
|
||||||
void AgeCrimes(); // done (inlined in vc)
|
void AddSampleToRequestedQueue();
|
||||||
|
void AgeCrimes();
|
||||||
|
|
||||||
void CalculateDistance(bool &condition, float dist); // done
|
void CalculateDistance(bool &condition, float dist);
|
||||||
bool CheckForAnAudioFileOnCD() const; // done
|
bool CheckForAnAudioFileOnCD() const;
|
||||||
void ClearActiveSamples(); // done
|
void ClearActiveSamples();
|
||||||
void ClearMissionAudio(uint8 slot); // done (inlined in vc)
|
void ClearMissionAudio();
|
||||||
void ClearRequestedQueue(); // done (inlined in vc)
|
void ClearRequestedQueue();
|
||||||
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; // done
|
int32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2,
|
||||||
int32 ComputePan(float, CVector *); // done
|
float speedMultiplier) const;
|
||||||
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; // done
|
int32 ComputePan(float, CVector *);
|
||||||
int32 CreateEntity(eAudioType type, void *entity); // done
|
uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const;
|
||||||
|
int32 CreateEntity(eAudioType type, void *entity);
|
||||||
|
|
||||||
void DestroyAllGameCreatedEntities(); // done
|
void DestroyAllGameCreatedEntities();
|
||||||
void DestroyEntity(int32 id); // done (inlined in vc)
|
void DestroyEntity(int32 id);
|
||||||
void DoPoliceRadioCrackle(); // done
|
void DoPoliceRadioCrackle();
|
||||||
|
|
||||||
// functions returning talk sfx,
|
// functions returning talk sfx,
|
||||||
// order from GetPedCommentSfx
|
// order from GetPedCommentSfx
|
||||||
uint32 GetPlayerTalkSfx(CPed *ped, int16 sound);
|
uint32 GetPlayerTalkSfx(int16 sound);
|
||||||
uint32 GetCopTalkSfx(CPed *ped, int16 sound);
|
uint32 GetCopTalkSfx(int16 sound);
|
||||||
uint32 GetSwatTalkSfx(CPed *ped, int16 sound);
|
uint32 GetSwatTalkSfx(int16 sound);
|
||||||
uint32 GetFBITalkSfx(CPed *ped, int16 sound);
|
uint32 GetFBITalkSfx(int16 sound);
|
||||||
uint32 GetArmyTalkSfx(CPed *ped, int16 sound);
|
uint32 GetArmyTalkSfx(int16 sound);
|
||||||
uint32 GetMedicTalkSfx(CPed *ped, int16 sound);
|
uint32 GetMedicTalkSfx(int16 sound);
|
||||||
uint32 GetFiremanTalkSfx(CPed *ped, int16 sound);
|
uint32 GetFiremanTalkSfx(int16 sound);
|
||||||
uint32 GetDefaultTalkSfx(CPed *ped, int16 sound);
|
uint32 GetNormalMaleTalkSfx(int16 sound);
|
||||||
uint32 GetHFYSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetTaxiDriverTalkSfx(int16 sound);
|
||||||
uint32 GetHFOSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetPimpTalkSfx(int16 sound);
|
||||||
uint32 GetHMYSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetMafiaTalkSfx(int16 sound);
|
||||||
uint32 GetHMOSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetTriadTalkSfx(int16 sound);
|
||||||
uint32 GetHFYRITalkSfx(CPed *ped, int16 sound);
|
uint32 GetDiabloTalkSfx(int16 sound);
|
||||||
uint32 GetHFORITalkSfx(CPed *ped, int16 sound);
|
uint32 GetYakuzaTalkSfx(int16 sound);
|
||||||
uint32 GetHMYRITalkSfx(CPed *ped, int16 sound);
|
uint32 GetYardieTalkSfx(int16 sound);
|
||||||
uint32 GetHMORITalkSfx(CPed *ped, int16 sound);
|
uint32 GetColumbianTalkSfx(int16 sound);
|
||||||
uint32 GetHFYBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetHoodTalkSfx(int16 sound);
|
||||||
uint32 GetHFOBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackCriminalTalkSfx(int16 sound);
|
||||||
uint32 GetHMYBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteCriminalTalkSfx(int16 sound);
|
||||||
uint32 GetHMOBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetMaleNo2TalkSfx(int16 sound);
|
||||||
uint32 GetHFYBUTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackProjectMaleTalkSfx(int16 sound, int32 model);
|
||||||
uint32 GetHFYMDTalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteFatMaleTalkSfx(int16 sound);
|
||||||
uint32 GetHFYCGTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackFatMaleTalkSfx(int16 sound);
|
||||||
uint32 GetHFYPRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackCasualFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetHFOTRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteCasualFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetHMOTRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetFemaleNo3TalkSfx(int16 sound);
|
||||||
uint32 GetHMYAPTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackFatFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetHMOCATalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteFatFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetBMODKTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackFemaleProstituteTalkSfx(int16 sound);
|
||||||
uint32 GetBMYCRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteFemaleProstituteTalkSfx(int16 sound);
|
||||||
uint32 GetBFYSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackProjectFemaleOldTalkSfx(int16 sound);
|
||||||
uint32 GetBFOSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackProjectFemaleYoungTalkSfx(int16 sound);
|
||||||
uint32 GetBMYSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetChinatownMaleOldTalkSfx(int16 sound);
|
||||||
uint32 GetBMOSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetChinatownMaleYoungTalkSfx(int16 sound);
|
||||||
uint32 GetBFYRITalkSfx(CPed *ped, int16 sound);
|
uint32 GetChinatownFemaleOldTalkSfx(int16 sound);
|
||||||
uint32 GetBFORITalkSfx(CPed *ped, int16 sound);
|
uint32 GetChinatownFemaleYoungTalkSfx(int16 sound);
|
||||||
uint32 GetBMYRITalkSfx(CPed *ped, int16 sound);
|
uint32 GetLittleItalyMaleTalkSfx(int16 sound);
|
||||||
uint32 GetBFYBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetLittleItalyFemaleOldTalkSfx(int16 sound);
|
||||||
uint32 GetBMYBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetLittleItalyFemaleYoungTalkSfx(int16 sound);
|
||||||
uint32 GetBFOBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteDockerMaleTalkSfx(int16 sound);
|
||||||
uint32 GetBMOBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackDockerMaleTalkSfx(int16 sound);
|
||||||
uint32 GetBMYBUTalkSfx(CPed *ped, int16 sound);
|
uint32 GetScumMaleTalkSfx(int16 sound);
|
||||||
uint32 GetBFYPRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetScumFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetBFOTRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteWorkerMaleTalkSfx(int16 sound);
|
||||||
uint32 GetBMOTRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackWorkerMaleTalkSfx(int16 sound);
|
||||||
uint32 GetBMYPITalkSfx(CPed *ped, int16 sound);
|
uint32 GetBusinessMaleYoungTalkSfx(int16 sound, int32 model);
|
||||||
uint32 GetBMYBBTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBusinessMaleOldTalkSfx(int16 sound);
|
||||||
uint32 GetWMYCRTalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteBusinessFemaleTalkSfx(int16 sound, int32 model);
|
||||||
uint32 GetWFYSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackBusinessFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetWFOSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetSupermodelMaleTalkSfx(int16 sound);
|
||||||
uint32 GetWMYSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetSupermodelFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetWMOSTTalkSfx(CPed *ped, int16 sound);
|
uint32 GetStewardMaleTalkSfx(int16 sound);
|
||||||
uint32 GetWFYRITalkSfx(CPed *ped, int16 sound);
|
uint32 GetStewardFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetWFORITalkSfx(CPed *ped, int16 sound);
|
uint32 GetFanMaleTalkSfx(int16 sound, int32 model);
|
||||||
uint32 GetWMYRITalkSfx(CPed *ped, int16 sound);
|
uint32 GetFanFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetWMORITalkSfx(CPed *ped, int16 sound);
|
uint32 GetHospitalMaleTalkSfx(int16 sound);
|
||||||
uint32 GetWFYBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetHospitalFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetWMYBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetWhiteConstructionWorkerTalkSfx(int16 sound);
|
||||||
uint32 GetWFOBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetBlackConstructionWorkerTalkSfx(int16 sound);
|
||||||
uint32 GetWMOBETalkSfx(CPed *ped, int16 sound);
|
uint32 GetShopperFemaleTalkSfx(int16 sound, int32 model);
|
||||||
uint32 GetWMYCWTalkSfx(CPed *ped, int16 sound);
|
uint32 GetStudentMaleTalkSfx(int16 sound);
|
||||||
uint32 GetWMYGOTalkSfx(CPed *ped, int16 sound);
|
uint32 GetStudentFemaleTalkSfx(int16 sound);
|
||||||
uint32 GetWFOGOTalkSfx(CPed *ped, int16 sound);
|
uint32 GetCasualMaleOldTalkSfx(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 GetSpecialCharacterTalkSfx(int32 modelIndex, int32 sound);
|
||||||
uint32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc)
|
uint32 GetEightTalkSfx(int16 sound);
|
||||||
|
uint32 GetFrankieTalkSfx(int16 sound);
|
||||||
|
uint32 GetMistyTalkSfx(int16 sound);
|
||||||
|
uint32 GetOJGTalkSfx(int16 sound);
|
||||||
|
uint32 GetCatatalinaTalkSfx(int16 sound);
|
||||||
|
uint32 GetBomberTalkSfx(int16 sound);
|
||||||
|
uint32 GetSecurityGuardTalkSfx(int16 sound);
|
||||||
|
uint32 GetChunkyTalkSfx(int16 sound);
|
||||||
|
|
||||||
|
uint32 GetGenericMaleTalkSfx(int16 sound);
|
||||||
|
uint32 GetGenericFemaleTalkSfx(int16 sound);
|
||||||
// end of functions returning talk sfx
|
// end of functions returning talk sfx
|
||||||
|
|
||||||
void GenerateIntegerRandomNumberTable(); // done
|
void GenerateIntegerRandomNumberTable();
|
||||||
char *Get3DProviderName(uint8 id) const; // done
|
char *Get3DProviderName(uint8 id) const;
|
||||||
uint8 GetCDAudioDriveLetter() const; // done
|
uint8 GetCDAudioDriveLetter() const;
|
||||||
int8 GetCurrent3DProviderIndex() const; // done
|
int8 GetCurrent3DProviderIndex() const;
|
||||||
int8 AutoDetect3DProviders() const; // done
|
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
|
||||||
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
|
float GetCollisionOneShotRatio(int32 a, float b) const;
|
||||||
float GetCollisionOneShotRatio(int32 a, float b) const; // done
|
float GetCollisionRatio(float a, float b, float c, float d) const;
|
||||||
float GetCollisionRatio(float a, float b, float c, float d) const; // done (inlined in vc)
|
float GetDistanceSquared(const CVector &v) const;
|
||||||
float GetDistanceSquared(const CVector &v) const; // done (inlined in vc)
|
int32 GetJumboTaxiFreq() const;
|
||||||
int32 GetJumboTaxiFreq() const; // done (inlined in vc)
|
uint8 GetMissionAudioLoadingStatus() const;
|
||||||
uint8 GetMissionAudioLoadingStatus(uint8 slot) const; // done
|
int8 GetMissionScriptPoliceAudioPlayingStatus() const;
|
||||||
int8 GetMissionScriptPoliceAudioPlayingStatus() const; // done
|
uint8 GetNum3DProvidersAvailable() const;
|
||||||
uint8 GetNum3DProvidersAvailable() const; // done
|
int32 GetPedCommentSfx(CPed *ped, int32 sound);
|
||||||
uint32 GetPedCommentSfx(CPed *ped, int32 sound); // done
|
void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const;
|
||||||
void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const; // done
|
float GetVehicleDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
|
||||||
float GetVehicleDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, float gasPedalAudio, cTransmission *transmission,
|
cTransmission *transmission, float velocityChange);
|
||||||
float velocityChange); // done
|
float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
|
||||||
float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); // done
|
cTransmission *transmission, float velocityChange);
|
||||||
|
|
||||||
bool HasAirBrakes(int32 model) const; // done
|
bool HasAirBrakes(int32 model) const;
|
||||||
|
|
||||||
void Initialise(); // done
|
void Initialise();
|
||||||
void InitialisePoliceRadio(); // done
|
void InitialisePoliceRadio();
|
||||||
void InitialisePoliceRadioZones(); // done
|
void InitialisePoliceRadioZones();
|
||||||
void InterrogateAudioEntities(); // done (inlined)
|
void InterrogateAudioEntities();
|
||||||
bool IsAudioInitialised() const; // done
|
bool IsAudioInitialised() const;
|
||||||
bool IsMissionAudioSampleFinished(uint8 slot); // done
|
bool IsMissionAudioSampleFinished();
|
||||||
bool IsMP3RadioChannelAvailable() const; // done
|
bool IsMP3RadioChannelAvailable() const;
|
||||||
|
|
||||||
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
|
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const;
|
||||||
|
|
||||||
void PlayLoadedMissionAudio(uint8 slot); // done
|
void PlayLoadedMissionAudio();
|
||||||
void PlayOneShot(int32 index, uint16 sound, float vol); // done
|
void PlayOneShot(int32 index, uint16 sound, float vol);
|
||||||
void PlaySuspectLastSeen(float x, float y, float z); // done
|
void PlaySuspectLastSeen(float x, float y, float z);
|
||||||
void PlayerJustGotInCar() const; // done
|
void PlayerJustGotInCar() const;
|
||||||
void PlayerJustLeftCar() const; // done
|
void PlayerJustLeftCar() const;
|
||||||
void PostInitialiseGameSpecificSetup(); // done
|
void PostInitialiseGameSpecificSetup();
|
||||||
void PostTerminateGameSpecificShutdown(); // done
|
void PostTerminateGameSpecificShutdown();
|
||||||
void PreInitialiseGameSpecificSetup() const; // done
|
void PreInitialiseGameSpecificSetup() const;
|
||||||
void PreloadMissionAudio(uint8 slot, Const char *name); // done
|
void PreloadMissionAudio(Const char *name);
|
||||||
void PreTerminateGameSpecificShutdown(); // done
|
void PreTerminateGameSpecificShutdown();
|
||||||
/// processX - main logic of adding new sounds
|
/// processX - main logic of adding new sounds
|
||||||
void ProcessActiveQueues(); // done
|
void ProcessActiveQueues();
|
||||||
bool ProcessAirBrakes(cVehicleParams& params); // done
|
bool ProcessAirBrakes(cVehicleParams& params);
|
||||||
bool ProcessBoatEngine(cVehicleParams& params);
|
void ProcessAirportScriptObject(uint8 sound);
|
||||||
bool ProcessBoatMovingOverWater(cVehicleParams& params); //done
|
bool ProcessBoatEngine(cVehicleParams& params);
|
||||||
#ifdef GTA_BRIDGE
|
bool ProcessBoatMovingOverWater(cVehicleParams& params);
|
||||||
void ProcessBridge(); // done(bcs not exists in VC)
|
void ProcessBridge();
|
||||||
void ProcessBridgeMotor(); // done(bcs not exists in VC)
|
void ProcessBridgeMotor();
|
||||||
void ProcessBridgeOneShots(); // done(bcs not exists in VC)
|
void ProcessBridgeOneShots();
|
||||||
void ProcessBridgeWarning(); // done(bcs not exists in VC)
|
void ProcessBridgeWarning();
|
||||||
#endif
|
bool ProcessCarBombTick(cVehicleParams& params);
|
||||||
bool ProcessCarBombTick(cVehicleParams& params); // done
|
void ProcessCesna(cVehicleParams& params);
|
||||||
void ProcessCarHeli(cVehicleParams& params); // done
|
void ProcessCinemaScriptObject(uint8 sound);
|
||||||
void ProcessCesna(cVehicleParams& params); // done
|
void ProcessCrane();
|
||||||
//void ProcessCrane(); // done(bcs not exists in VC)
|
void ProcessDocksScriptObject(uint8 sound);
|
||||||
bool ProcessEngineDamage(cVehicleParams& params); // done
|
bool ProcessEngineDamage(cVehicleParams& params);
|
||||||
void ProcessEntity(int32 sound); // done
|
void ProcessEntity(int32 sound);
|
||||||
void ProcessExplosions(int32 explosion); // done
|
void ProcessExplosions(int32 explosion);
|
||||||
void ProcessFireHydrant(); // done
|
void ProcessFireHydrant();
|
||||||
void ProcessFires(int32 entity); // done
|
void ProcessFires(int32 entity);
|
||||||
void ProcessFrontEnd(); // done
|
void ProcessFrontEnd();
|
||||||
void ProcessGarages(); // done
|
void ProcessGarages();
|
||||||
void ProcessJumbo(cVehicleParams& params); // done
|
bool ProcessHelicopter(cVehicleParams& params);
|
||||||
void ProcessJumboAccel(CPlane *plane); // done
|
void ProcessHomeScriptObject(uint8 sound);
|
||||||
void ProcessJumboDecel(CPlane *plane); // done
|
void ProcessJumbo(cVehicleParams& params);
|
||||||
void ProcessJumboFlying(); // done
|
void ProcessJumboAccel(CPlane *plane);
|
||||||
void ProcessJumboLanding(CPlane *plane); // done
|
void ProcessJumboDecel(CPlane *plane);
|
||||||
void ProcessJumboTakeOff(CPlane *plane); // done
|
void ProcessJumboFlying();
|
||||||
void ProcessJumboTaxi(); // done
|
void ProcessJumboLanding(CPlane *plane);
|
||||||
void ProcessLoopingScriptObject(uint8 sound); // done
|
void ProcessJumboTakeOff(CPlane *plane);
|
||||||
void ProcessMissionAudio(); // done
|
void ProcessJumboTaxi();
|
||||||
void ProcessMissionAudioSlot(uint8 slot); // done
|
void ProcessLaunderetteScriptObject(uint8 sound);
|
||||||
void ProcessModelHeliVehicle(cVehicleParams& params); // done
|
void ProcessLoopingScriptObject(uint8 sound);
|
||||||
void ProcessModelVehicle(cVehicleParams& params); // done
|
void ProcessMissionAudio();
|
||||||
void ProcessOneShotScriptObject(uint8 sound); //
|
void ProcessModelCarEngine(cVehicleParams& params);
|
||||||
void ProcessPed(CPhysical *ped); // done
|
void ProcessOneShotScriptObject(uint8 sound);
|
||||||
void ProcessPedOneShots(cPedParams ¶ms); //
|
void ProcessPed(CPhysical *ped);
|
||||||
void ProcessPhysical(int32 id); // done
|
void ProcessPedHeadphones(cPedParams ¶ms);
|
||||||
void ProcessPlane(cVehicleParams& params); // done
|
void ProcessPedOneShots(cPedParams ¶ms);
|
||||||
void ProcessPlayerMood(); // done
|
void ProcessPhysical(int32 id);
|
||||||
void ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh); // done
|
void ProcessPlane(cVehicleParams& params);
|
||||||
void ProcessProjectiles(); // done
|
void ProcessPlayersVehicleEngine(cVehicleParams& params, CAutomobile *automobile);
|
||||||
void ProcessRainOnVehicle(cVehicleParams& params); // done
|
void ProcessPoliceCellBeatingScriptObject(uint8 sound);
|
||||||
void ProcessReverb() const; // done
|
void ProcessPornCinema(uint8 sound);
|
||||||
bool ProcessReverseGear(cVehicleParams& params); // done
|
void ProcessProjectiles();
|
||||||
void ProcessScriptObject(int32 id); // done
|
void ProcessRainOnVehicle(cVehicleParams& params);
|
||||||
void ProcessSpecial(); // done
|
void ProcessReverb() const;
|
||||||
#ifdef GTA_TRAIN
|
bool ProcessReverseGear(cVehicleParams& params);
|
||||||
bool ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC)
|
void ProcessSawMillScriptObject(uint8 sound);
|
||||||
#endif
|
void ProcessScriptObject(int32 id);
|
||||||
void ProcessVehicle(CVehicle *vehicle); // done
|
void ProcessShopScriptObject(uint8 sound);
|
||||||
bool ProcessVehicleDoors(cVehicleParams ¶ms); // done
|
void ProcessSpecial();
|
||||||
void ProcessVehicleEngine(cVehicleParams ¶ms); // done
|
bool ProcessTrainNoise(cVehicleParams& params);
|
||||||
void ProcessVehicleFlatTyre(cVehicleParams ¶ms); // done
|
void ProcessVehicle(CVehicle *vehicle);
|
||||||
bool ProcessVehicleHorn(cVehicleParams ¶ms); // done
|
bool ProcessVehicleDoors(cVehicleParams& params);
|
||||||
void ProcessVehicleOneShots(cVehicleParams ¶ms); // done
|
void ProcessVehicleEngine(cVehicleParams& params);
|
||||||
bool ProcessVehicleReverseWarning(cVehicleParams ¶ms); // done
|
void ProcessVehicleHorn(cVehicleParams& params);
|
||||||
bool ProcessVehicleRoadNoise(cVehicleParams ¶ms); // done
|
void ProcessVehicleOneShots(cVehicleParams& params);
|
||||||
bool ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); // done
|
bool ProcessVehicleReverseWarning(cVehicleParams& params);
|
||||||
bool ProcessVehicleSkidding(cVehicleParams ¶ms); // done
|
bool ProcessVehicleRoadNoise(cVehicleParams& params);
|
||||||
void ProcessWaterCannon(int32); // done
|
bool ProcessVehicleSirenOrAlarm(cVehicleParams& params);
|
||||||
void ProcessWeather(int32 id); // done
|
bool ProcessVehicleSkidding(cVehicleParams& params);
|
||||||
bool ProcessWetRoadNoise(cVehicleParams& params); // done
|
void ProcessWaterCannon(int32);
|
||||||
void ProcessEscalators(); // done
|
void ProcessWeather(int32 id);
|
||||||
void ProcessExtraSounds(); // done
|
bool ProcessWetRoadNoise(cVehicleParams& params);
|
||||||
|
void ProcessWorkShopScriptObject(uint8 sound);
|
||||||
|
|
||||||
int32 RandomDisplacement(uint32 seed) const; // done
|
int32 RandomDisplacement(uint32 seed) const;
|
||||||
void ReacquireDigitalHandle() const; // done
|
void ReacquireDigitalHandle() const;
|
||||||
void ReleaseDigitalHandle() const; // done
|
void ReleaseDigitalHandle() const;
|
||||||
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
|
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2,
|
||||||
void ReportCrime(eCrimeType crime, const CVector &pos); // done
|
float collisionPower, float intensity2);
|
||||||
void ResetAudioLogicTimers(uint32 timer); // done
|
void ReportCrime(eCrimeType crime, const CVector &pos);
|
||||||
void ResetPoliceRadio(); // done
|
void ResetAudioLogicTimers(uint32 timer);
|
||||||
void ResetTimers(uint32 time); // done
|
void ResetPoliceRadio();
|
||||||
|
void ResetTimers(uint32 time);
|
||||||
|
|
||||||
void Service(); // done
|
void Service();
|
||||||
void ServiceCollisions(); // done
|
void ServiceCollisions();
|
||||||
void ServicePoliceRadio(); // done
|
void ServicePoliceRadio();
|
||||||
void ServicePoliceRadioChannel(uint8 wantedLevel); // done
|
void ServicePoliceRadioChannel(uint8 wantedLevel);
|
||||||
void ServiceSoundEffects(); // done
|
void ServiceSoundEffects();
|
||||||
int8 SetCurrent3DProvider(uint8 which); // done
|
int8 SetCurrent3DProvider(uint8 which);
|
||||||
void SetDynamicAcousticModelingStatus(uint8 status); // done
|
void SetDynamicAcousticModelingStatus(uint8 status);
|
||||||
void SetEffectsFadeVol(uint8 volume) const; // done
|
void SetEffectsFadeVol(uint8 volume) const;
|
||||||
void SetEffectsMasterVolume(uint8 volume) const; // done
|
void SetEffectsMasterVolume(uint8 volume) const;
|
||||||
void SetMP3BoostVolume(uint8 volume) const; // done
|
void SetEntityStatus(int32 id, uint8 status);
|
||||||
void SetEntityStatus(int32 id, uint8 status); // done
|
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision);
|
||||||
uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); // done
|
void SetMissionAudioLocation(float x, float y, float z);
|
||||||
void SetMissionAudioLocation(uint8 slot, float x, float y, float z); // done
|
void SetMissionScriptPoliceAudio(int32 sfx) const;
|
||||||
void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized
|
void SetMonoMode(uint8 mono);
|
||||||
void SetMonoMode(uint8 mono); // done
|
void SetMusicFadeVol(uint8 volume) const;
|
||||||
void SetMusicFadeVol(uint8 volume) const; // done
|
void SetMusicMasterVolume(uint8 volume) const;
|
||||||
void SetMusicMasterVolume(uint8 volume) const; // done
|
void SetSpeakerConfig(int32 conf) const;
|
||||||
void SetSpeakerConfig(int32 conf) const; // done
|
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
|
||||||
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); // done
|
void SetUpOneShotCollisionSound(const cAudioCollision &col);
|
||||||
void SetUpOneShotCollisionSound(const cAudioCollision &col); // done
|
bool SetupCrimeReport();
|
||||||
bool SetupCrimeReport(); // done
|
bool SetupJumboEngineSound(uint8 vol, uint32 freq);
|
||||||
bool SetupJumboEngineSound(uint8 vol, uint32 freq); // done
|
bool SetupJumboFlySound(uint8 emittingVol);
|
||||||
bool SetupJumboFlySound(uint8 emittingVol); // done
|
bool SetupJumboRumbleSound(uint8 emittingVol);
|
||||||
bool SetupJumboRumbleSound(uint8 emittingVol); // done
|
bool SetupJumboTaxiSound(uint8 vol);
|
||||||
bool SetupJumboTaxiSound(uint8 vol); // done
|
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
|
||||||
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done
|
void SetupPedComments(cPedParams ¶ms, uint16 sound);
|
||||||
void SetupPedComments(cPedParams ¶ms, uint16 sound); // done
|
|
||||||
void SetupSuspectLastSeenReport();
|
void SetupSuspectLastSeenReport();
|
||||||
|
|
||||||
void Terminate(); // done
|
void Terminate();
|
||||||
void TranslateEntity(Const CVector *v1, CVector *v2) const; // done
|
void TranslateEntity(Const CVector *v1, CVector *v2) const;
|
||||||
|
|
||||||
void UpdateGasPedalAudio(CVehicle *veh, int vehType); // done
|
void UpdateGasPedalAudio(CAutomobile *automobile);
|
||||||
void UpdateReflections(); // done
|
void UpdateReflections();
|
||||||
bool UsesReverseWarning(int32 model) const; // done
|
bool UsesReverseWarning(int32 model) const;
|
||||||
bool UsesSiren(cVehicleParams ¶ms) const; // done
|
bool UsesSiren(int32 model) const;
|
||||||
bool UsesSirenSwitching(cVehicleParams ¶ms) const; // done
|
bool UsesSirenSwitching(int32 model) const;
|
||||||
|
|
||||||
CVehicle *FindVehicleOfPlayer(); // done
|
|
||||||
void SetPedTalkingStatus(CPed *ped, uint8 status); // done
|
|
||||||
void SetPlayersMood(uint8 mood, uint32 time); // done
|
|
||||||
|
|
||||||
float Sqrt(float v) const { return v <= 0.0f ? 0.0f : ::Sqrt(v); }
|
|
||||||
|
|
||||||
#ifdef GTA_PC
|
#ifdef GTA_PC
|
||||||
// only used in pc
|
// only used in pc
|
||||||
void AdjustSamplesVolume(); // done (inlined)
|
void AdjustSamplesVolume();
|
||||||
uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist); // done (inlined)
|
uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef AUDIO_MSS
|
#ifdef AUDIO_MSS
|
||||||
static_assert(sizeof(cAudioManager) == 0x5558, "cAudioManager: error");
|
static_assert(sizeof(cAudioManager) == 19220, "cAudioManager: error");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern cAudioManager AudioManager;
|
extern cAudioManager AudioManager;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -62,15 +62,6 @@ cDMAudio::SetMonoMode(uint8 mono)
|
|||||||
AudioManager.SetMonoMode(mono);
|
AudioManager.SetMonoMode(mono);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cDMAudio::SetMP3BoostVolume(uint8 volume)
|
|
||||||
{
|
|
||||||
uint8 vol = volume;
|
|
||||||
if (vol > MAX_VOLUME) vol = MAX_VOLUME;
|
|
||||||
|
|
||||||
AudioManager.SetMP3BoostVolume(vol);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetEffectsMasterVolume(uint8 volume)
|
cDMAudio::SetEffectsMasterVolume(uint8 volume)
|
||||||
{
|
{
|
||||||
@@ -119,11 +110,6 @@ cDMAudio::Get3DProviderName(uint8 id)
|
|||||||
return AudioManager.Get3DProviderName(id);
|
return AudioManager.Get3DProviderName(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
int8 cDMAudio::AutoDetect3DProviders(void)
|
|
||||||
{
|
|
||||||
return AudioManager.AutoDetect3DProviders();
|
|
||||||
}
|
|
||||||
|
|
||||||
int8
|
int8
|
||||||
cDMAudio::GetCurrent3DProviderIndex(void)
|
cDMAudio::GetCurrent3DProviderIndex(void)
|
||||||
{
|
{
|
||||||
@@ -238,13 +224,13 @@ cDMAudio::PlayFrontEndSound(uint16 frontend, uint32 volume)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayRadioAnnouncement(uint32 announcement)
|
cDMAudio::PlayRadioAnnouncement(uint8 announcement)
|
||||||
{
|
{
|
||||||
MusicManager.PlayAnnouncement(announcement);
|
MusicManager.PlayAnnouncement(announcement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayFrontEndTrack(uint32 track, uint8 frontendFlag)
|
cDMAudio::PlayFrontEndTrack(uint8 track, uint8 frontendFlag)
|
||||||
{
|
{
|
||||||
MusicManager.PlayFrontEndTrack(track, frontendFlag);
|
MusicManager.PlayFrontEndTrack(track, frontendFlag);
|
||||||
}
|
}
|
||||||
@@ -268,7 +254,7 @@ cDMAudio::ChangeMusicMode(uint8 mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PreloadCutSceneMusic(uint32 track)
|
cDMAudio::PreloadCutSceneMusic(uint8 track)
|
||||||
{
|
{
|
||||||
MusicManager.PreloadCutSceneMusic(track);
|
MusicManager.PreloadCutSceneMusic(track);
|
||||||
}
|
}
|
||||||
@@ -286,39 +272,39 @@ cDMAudio::StopCutSceneMusic(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PreloadMissionAudio(uint8 slot, Const char *missionAudio)
|
cDMAudio::PreloadMissionAudio(Const char *missionAudio)
|
||||||
{
|
{
|
||||||
AudioManager.PreloadMissionAudio(slot, missionAudio);
|
AudioManager.PreloadMissionAudio(missionAudio);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8
|
uint8
|
||||||
cDMAudio::GetMissionAudioLoadingStatus(uint8 slot)
|
cDMAudio::GetMissionAudioLoadingStatus(void)
|
||||||
{
|
{
|
||||||
return AudioManager.GetMissionAudioLoadingStatus(slot);
|
return AudioManager.GetMissionAudioLoadingStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetMissionAudioLocation(uint8 slot, float x, float y, float z)
|
cDMAudio::SetMissionAudioLocation(float x, float y, float z)
|
||||||
{
|
{
|
||||||
AudioManager.SetMissionAudioLocation(slot, x, y, z);
|
AudioManager.SetMissionAudioLocation(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::PlayLoadedMissionAudio(uint8 slot)
|
cDMAudio::PlayLoadedMissionAudio(void)
|
||||||
{
|
{
|
||||||
AudioManager.PlayLoadedMissionAudio(slot);
|
AudioManager.PlayLoadedMissionAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cDMAudio::IsMissionAudioSampleFinished(uint8 slot)
|
cDMAudio::IsMissionAudioSampleFinished(void)
|
||||||
{
|
{
|
||||||
return AudioManager.IsMissionAudioSampleFinished(slot);
|
return AudioManager.IsMissionAudioSampleFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::ClearMissionAudio(uint8 slot)
|
cDMAudio::ClearMissionAudio(void)
|
||||||
{
|
{
|
||||||
AudioManager.ClearMissionAudio(slot);
|
AudioManager.ClearMissionAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8
|
uint8
|
||||||
@@ -334,49 +320,7 @@ cDMAudio::SetRadioInCar(uint32 radio)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cDMAudio::SetRadioChannel(uint32 radio, int32 pos)
|
cDMAudio::SetRadioChannel(uint8 radio, int32 pos)
|
||||||
{
|
{
|
||||||
MusicManager.SetRadioChannelByScript(radio, pos);
|
MusicManager.SetRadioChannelByScript(radio, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cDMAudio::SetStartingTrackPositions(uint8 isStartGame)
|
|
||||||
{
|
|
||||||
MusicManager.SetStartingTrackPositions(isStartGame);
|
|
||||||
}
|
|
||||||
|
|
||||||
float *
|
|
||||||
cDMAudio::GetListenTimeArray()
|
|
||||||
{
|
|
||||||
return MusicManager.GetListenTimeArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32
|
|
||||||
cDMAudio::GetFavouriteRadioStation()
|
|
||||||
{
|
|
||||||
return MusicManager.GetFavouriteRadioStation();
|
|
||||||
}
|
|
||||||
|
|
||||||
int32
|
|
||||||
cDMAudio::GetRadioPosition(uint32 station)
|
|
||||||
{
|
|
||||||
return MusicManager.GetRadioPosition(station);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
cDMAudio::SetPedTalkingStatus(CPed *ped, uint8 status)
|
|
||||||
{
|
|
||||||
return AudioManager.SetPedTalkingStatus(ped, status);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
cDMAudio::SetPlayersMood(uint8 mood, uint32 time)
|
|
||||||
{
|
|
||||||
return AudioManager.SetPlayersMood(mood, time);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
cDMAudio::ShutUpPlayerTalking(uint8 state)
|
|
||||||
{
|
|
||||||
AudioManager.m_bIsPlayerShutUp = state;
|
|
||||||
}
|
|
||||||
@@ -7,9 +7,6 @@
|
|||||||
#define AEHANDLE_IS_FAILED(h) ((h)<0)
|
#define AEHANDLE_IS_FAILED(h) ((h)<0)
|
||||||
#define AEHANDLE_IS_OK(h) ((h)>=0)
|
#define AEHANDLE_IS_OK(h) ((h)>=0)
|
||||||
|
|
||||||
#define NO_AUDIO_PROVIDER -3
|
|
||||||
#define AUDIO_PROVIDER_NOT_DETERMINED -99
|
|
||||||
|
|
||||||
class cAudioScriptObject;
|
class cAudioScriptObject;
|
||||||
class CEntity;
|
class CEntity;
|
||||||
|
|
||||||
@@ -30,7 +27,6 @@ public:
|
|||||||
void DestroyAllGameCreatedEntities(void);
|
void DestroyAllGameCreatedEntities(void);
|
||||||
|
|
||||||
void SetMonoMode(uint8 mono);
|
void SetMonoMode(uint8 mono);
|
||||||
void SetMP3BoostVolume(uint8 volume);
|
|
||||||
void SetEffectsMasterVolume(uint8 volume);
|
void SetEffectsMasterVolume(uint8 volume);
|
||||||
void SetMusicMasterVolume(uint8 volume);
|
void SetMusicMasterVolume(uint8 volume);
|
||||||
void SetEffectsFadeVol(uint8 volume);
|
void SetEffectsFadeVol(uint8 volume);
|
||||||
@@ -39,8 +35,6 @@ public:
|
|||||||
uint8 GetNum3DProvidersAvailable(void);
|
uint8 GetNum3DProvidersAvailable(void);
|
||||||
char *Get3DProviderName(uint8 id);
|
char *Get3DProviderName(uint8 id);
|
||||||
|
|
||||||
int8 AutoDetect3DProviders(void);
|
|
||||||
|
|
||||||
int8 GetCurrent3DProviderIndex(void);
|
int8 GetCurrent3DProviderIndex(void);
|
||||||
int8 SetCurrent3DProvider(uint8 which);
|
int8 SetCurrent3DProvider(uint8 which);
|
||||||
|
|
||||||
@@ -69,35 +63,27 @@ public:
|
|||||||
void ReportCollision(CEntity *entityA, CEntity *entityB, uint8 surfaceTypeA, uint8 surfaceTypeB, float collisionPower, float velocity);
|
void ReportCollision(CEntity *entityA, CEntity *entityB, uint8 surfaceTypeA, uint8 surfaceTypeB, float collisionPower, float velocity);
|
||||||
|
|
||||||
void PlayFrontEndSound(uint16 frontend, uint32 volume);
|
void PlayFrontEndSound(uint16 frontend, uint32 volume);
|
||||||
void PlayRadioAnnouncement(uint32 announcement);
|
void PlayRadioAnnouncement(uint8 announcement);
|
||||||
void PlayFrontEndTrack(uint32 track, uint8 frontendFlag);
|
void PlayFrontEndTrack(uint8 track, uint8 frontendFlag);
|
||||||
void StopFrontEndTrack(void);
|
void StopFrontEndTrack(void);
|
||||||
|
|
||||||
void ResetTimers(uint32 time);
|
void ResetTimers(uint32 time);
|
||||||
|
|
||||||
void ChangeMusicMode(uint8 mode);
|
void ChangeMusicMode(uint8 mode);
|
||||||
|
|
||||||
void PreloadCutSceneMusic(uint32 track);
|
void PreloadCutSceneMusic(uint8 track);
|
||||||
void PlayPreloadedCutSceneMusic(void);
|
void PlayPreloadedCutSceneMusic(void);
|
||||||
void StopCutSceneMusic(void);
|
void StopCutSceneMusic(void);
|
||||||
|
|
||||||
void PreloadMissionAudio(uint8 slot, Const char *missionAudio);
|
void PreloadMissionAudio(Const char *missionAudio);
|
||||||
uint8 GetMissionAudioLoadingStatus(uint8 slot);
|
uint8 GetMissionAudioLoadingStatus(void);
|
||||||
void SetMissionAudioLocation(uint8 slot, float x, float y, float z);
|
void SetMissionAudioLocation(float x, float y, float z);
|
||||||
void PlayLoadedMissionAudio(uint8 slot);
|
void PlayLoadedMissionAudio(void);
|
||||||
bool IsMissionAudioSampleFinished(uint8 slot);
|
bool IsMissionAudioSampleFinished(void);
|
||||||
void ClearMissionAudio(uint8 slot);
|
void ClearMissionAudio(void);
|
||||||
|
|
||||||
uint8 GetRadioInCar(void);
|
uint8 GetRadioInCar(void);
|
||||||
void SetRadioInCar(uint32 radio);
|
void SetRadioInCar(uint32 radio);
|
||||||
void SetRadioChannel(uint32 radio, int32 pos);
|
void SetRadioChannel(uint8 radio, int32 pos);
|
||||||
|
|
||||||
void SetStartingTrackPositions(uint8 isStartGame);
|
|
||||||
float *GetListenTimeArray();
|
|
||||||
uint32 GetFavouriteRadioStation();
|
|
||||||
int32 GetRadioPosition(uint32 station);
|
|
||||||
void SetPedTalkingStatus(class CPed *ped, uint8 status);
|
|
||||||
void SetPlayersMood(uint8 mood, uint32 time);
|
|
||||||
void ShutUpPlayerTalking(uint8 state);
|
|
||||||
};
|
};
|
||||||
extern cDMAudio DMAudio;
|
extern cDMAudio DMAudio;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -11,53 +11,41 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
class CVehicle;
|
class CVehicle;
|
||||||
class CPed;
|
|
||||||
|
|
||||||
class cMusicManager
|
class cMusicManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool m_bIsInitialised;
|
bool m_bIsInitialised;
|
||||||
bool m_bDisabled;
|
bool m_bDisabled;
|
||||||
|
uint8 m_nMusicMode;
|
||||||
|
uint8 m_nNextTrack;
|
||||||
|
uint8 m_nPlayingTrack;
|
||||||
|
bool m_bFrontendTrackFinished;
|
||||||
|
bool m_bPlayInFrontend;
|
||||||
bool m_bSetNextStation;
|
bool m_bSetNextStation;
|
||||||
uint8 m_nVolumeLatency;
|
uint8 m_nAnnouncement;
|
||||||
uint8 m_nCurrentVolume;
|
bool m_bPreviousPlayerInCar;
|
||||||
uint8 m_nMaxVolume;
|
bool m_bPlayerInCar;
|
||||||
uint32 m_nAnnouncement;
|
|
||||||
bool m_bAnnouncementInProgress;
|
bool m_bAnnouncementInProgress;
|
||||||
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
|
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
|
||||||
bool m_bResetTimers;
|
bool m_bResetTimers;
|
||||||
uint32 m_nResetTime;
|
uint32 m_nResetTime;
|
||||||
|
uint32 m_nLastTrackServiceTime;
|
||||||
|
uint32 m_nTimer;
|
||||||
|
bool m_bDoTrackService;
|
||||||
|
bool m_bIgnoreTimeDelay;
|
||||||
|
bool m_bVerifyAmbienceTrackStartedToPlay;
|
||||||
bool m_bRadioSetByScript;
|
bool m_bRadioSetByScript;
|
||||||
uint8 m_nRadioStationScript;
|
uint8 m_nRadioStationScript;
|
||||||
int32 m_nRadioPosition;
|
int32 m_nRadioPosition;
|
||||||
uint32 m_nRadioInCar;
|
uint8 m_nRadioInCar;
|
||||||
uint32 m_nFrontendTrack;
|
|
||||||
uint32 m_nPlayingTrack;
|
|
||||||
uint8 m_nUpcomingMusicMode;
|
|
||||||
uint8 m_nMusicMode;
|
|
||||||
bool m_FrontendLoopFlag;
|
|
||||||
bool m_bTrackChangeStarted;
|
|
||||||
uint32 m_nNextTrack;
|
|
||||||
bool m_nNextLoopFlag;
|
|
||||||
bool m_bVerifyNextTrackStartedToPlay;
|
|
||||||
bool m_bGameplayAllowsRadio;
|
|
||||||
bool m_bRadioStreamReady;
|
|
||||||
int8 nFramesSinceCutsceneEnded;
|
|
||||||
bool m_bUserResumedGame;
|
|
||||||
bool m_bMusicModeChangeStarted;
|
|
||||||
uint8 m_nMusicModeToBeSet;
|
|
||||||
bool m_bEarlyFrontendTrack;
|
|
||||||
float aListenTimeArray[NUM_RADIOS];
|
|
||||||
float m_nLastTrackServiceTime;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cMusicManager();
|
cMusicManager();
|
||||||
bool IsInitialised() { return m_bIsInitialised; }
|
bool IsInitialised() { return m_bIsInitialised; }
|
||||||
uint8 GetMusicMode() { return m_nMusicMode; }
|
uint32 GetMusicMode() { return m_nMusicMode; }
|
||||||
uint32 GetCurrentTrack() { return m_nPlayingTrack; }
|
uint8 GetNextTrack() { return m_nNextTrack; }
|
||||||
|
|
||||||
void ResetMusicAfterReload();
|
|
||||||
void SetStartingTrackPositions(uint8 isNewGameTimer);
|
|
||||||
bool Initialise();
|
bool Initialise();
|
||||||
void Terminate();
|
void Terminate();
|
||||||
|
|
||||||
@@ -67,47 +55,35 @@ public:
|
|||||||
bool PlayerInCar();
|
bool PlayerInCar();
|
||||||
void DisplayRadioStationName();
|
void DisplayRadioStationName();
|
||||||
|
|
||||||
void PlayAnnouncement(uint32);
|
void PlayAnnouncement(uint8);
|
||||||
void PlayFrontEndTrack(uint32, uint8);
|
void PlayFrontEndTrack(uint8, uint8);
|
||||||
void PreloadCutSceneMusic(uint32);
|
void PreloadCutSceneMusic(uint8);
|
||||||
void PlayPreloadedCutSceneMusic(void);
|
void PlayPreloadedCutSceneMusic(void);
|
||||||
void StopCutSceneMusic(void);
|
void StopCutSceneMusic(void);
|
||||||
uint32 GetRadioInCar(void);
|
uint8 GetRadioInCar(void);
|
||||||
void SetRadioInCar(uint32);
|
void SetRadioInCar(uint32);
|
||||||
void SetRadioChannelByScript(uint32, int32);
|
void SetRadioChannelByScript(uint8, int32);
|
||||||
|
|
||||||
|
void ResetMusicAfterReload();
|
||||||
|
|
||||||
void ResetTimers(int32);
|
void ResetTimers(int32);
|
||||||
void Service();
|
void Service();
|
||||||
void ServiceFrontEndMode();
|
void ServiceFrontEndMode();
|
||||||
void ServiceGameMode();
|
void ServiceGameMode();
|
||||||
void ServiceAmbience();
|
void ServiceAmbience();
|
||||||
void ServiceTrack(CVehicle *veh, CPed *ped);
|
void ServiceTrack();
|
||||||
|
|
||||||
bool UsesPoliceRadio(CVehicle *veh);
|
bool UsesPoliceRadio(CVehicle *veh);
|
||||||
bool UsesTaxiRadio(CVehicle *veh);
|
uint32 GetTrackStartPos(uint8);
|
||||||
uint32 GetTrackStartPos(uint32 track);
|
|
||||||
|
|
||||||
void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
|
void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
|
||||||
bool ServiceAnnouncement();
|
bool ServiceAnnouncement();
|
||||||
|
|
||||||
uint32 GetCarTuning();
|
uint8 GetCarTuning();
|
||||||
uint32 GetNextCarTuning();
|
uint8 GetNextCarTuning();
|
||||||
bool ChangeRadioChannel();
|
bool ChangeRadioChannel();
|
||||||
void RecordRadioStats();
|
|
||||||
void SetUpCorrectAmbienceTrack();
|
|
||||||
float *GetListenTimeArray();
|
|
||||||
uint32 GetRadioPosition(uint32 station);
|
|
||||||
uint32 GetFavouriteRadioStation();
|
|
||||||
void SetMalibuClubTrackPos(uint8 pos);
|
|
||||||
void SetStripClubTrackPos(uint8 pos);
|
|
||||||
bool CheckForMusicInterruptions();
|
|
||||||
|
|
||||||
void Enable();
|
|
||||||
void Disable();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cMusicManager, 0x95C);
|
VALIDATE_SIZE(cMusicManager, 0x95C);
|
||||||
|
|
||||||
extern cMusicManager MusicManager;
|
extern cMusicManager MusicManager;
|
||||||
extern bool g_bAnnouncementReadPosAlready; // we have a symbol of this so it was declared in .h
|
|
||||||
float GetHeightScale();
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ struct tPoliceRadioZone {
|
|||||||
};
|
};
|
||||||
|
|
||||||
tPoliceRadioZone ZoneSfx[NUMAUDIOZONES];
|
tPoliceRadioZone ZoneSfx[NUMAUDIOZONES];
|
||||||
|
char SubZo2Label[8];
|
||||||
|
char SubZo3Label[8];
|
||||||
|
|
||||||
int32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
|
int32 g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
|
||||||
int8 g_nMissionAudioPlayingStatus = 2;
|
int8 g_nMissionAudioPlayingStatus = 2;
|
||||||
@@ -41,22 +43,46 @@ cAudioManager::InitialisePoliceRadioZones()
|
|||||||
strcpy(ZoneSfx[i].m_aName, name); \
|
strcpy(ZoneSfx[i].m_aName, name); \
|
||||||
ZoneSfx[i].m_nSampleIndex = sample;
|
ZoneSfx[i].m_nSampleIndex = sample;
|
||||||
|
|
||||||
SETZONESFX(0, "VICE_C", SFX_POLICE_RADIO_VICE_CITY);
|
SETZONESFX(0, "HOSPI_2", SFX_POLICE_RADIO_ROCKFORD);
|
||||||
SETZONESFX(1, "IND_ZON", SFX_POLICE_RADIO_VICE_CITY_BEACH);
|
SETZONESFX(1, "CONSTRU", SFX_POLICE_RADIO_FORT_STAUNTON);
|
||||||
SETZONESFX(2, "COM_ZON", SFX_POLICE_RADIO_VICE_CITY_MAINLAND);
|
SETZONESFX(2, "STADIUM", SFX_POLICE_RADIO_ASPATRIA);
|
||||||
SETZONESFX(3, "BEACH1", SFX_POLICE_RADIO_OCEAN_BEACH);
|
SETZONESFX(3, "YAKUSA", SFX_POLICE_RADIO_TORRINGTON);
|
||||||
SETZONESFX(4, "BEACH2", SFX_POLICE_RADIO_WASHINGTON_BEACH);
|
SETZONESFX(4, "SHOPING", SFX_POLICE_RADIO_BEDFORD_POINT);
|
||||||
SETZONESFX(5, "BEACH3", SFX_POLICE_RADIO_VICE_POINT);
|
SETZONESFX(5, "COM_EAS", SFX_POLICE_RADIO_NEWPORT);
|
||||||
SETZONESFX(6, "GOLFC", SFX_POLICE_RADIO_LEAF_LINKS);
|
SETZONESFX(6, "PARK", SFX_POLICE_RADIO_BELLEVILLE_PARK);
|
||||||
SETZONESFX(7, "STARI", SFX_POLICE_RADIO_STRAFISH_ISLAND);
|
SETZONESFX(7, "UNIVERS", SFX_POLICE_RADIO_LIBERTY_CAMPUS);
|
||||||
SETZONESFX(8, "DOCKS", SFX_POLICE_RADIO_VICE_PORT);
|
SETZONESFX(8, "BIG_DAM", SFX_POLICE_RADIO_COCHRANE_DAM);
|
||||||
SETZONESFX(9, "HAVANA", SFX_POLICE_RADIO_LITTLE_HAVANA);
|
SETZONESFX(9, "SUB_IND", SFX_POLICE_RADIO_PIKE_CREEK);
|
||||||
SETZONESFX(10, "HAITI", SFX_POLICE_RADIO_LITTLE_HAITI);
|
SETZONESFX(10, "SWANKS", SFX_POLICE_RADIO_CEDAR_GROVE);
|
||||||
SETZONESFX(11, "PORNI", SFX_POLICE_RADIO_PRAWN_ISLAND);
|
SETZONESFX(11, "PROJECT", SFX_POLICE_RADIO_WICHITA_GARDENS);
|
||||||
SETZONESFX(12, "DTOWN", SFX_POLICE_RADIO_DOWNTOWN);
|
SETZONESFX(12, "AIRPORT", SFX_POLICE_RADIO_FRANCIS_INTERNATIONAL_AIRPORT);
|
||||||
SETZONESFX(13, "A_PORT", SFX_POLICE_RADIO_ESCOBAR_INTERNATIONAL);
|
SETZONESFX(13, "PORT_W", SFX_POLICE_RADIO_CALLAHAN_POINT);
|
||||||
|
SETZONESFX(14, "PORT_S", SFX_POLICE_RADIO_ATLANTIC_QUAYS);
|
||||||
|
SETZONESFX(15, "PORT_E", SFX_POLICE_RADIO_PORTLAND_HARBOUR);
|
||||||
|
SETZONESFX(16, "PORT_I", SFX_POLICE_RADIO_TRENTON);
|
||||||
|
SETZONESFX(17, "CHINA", SFX_POLICE_RADIO_CHINATOWN);
|
||||||
|
SETZONESFX(18, "REDLIGH", SFX_POLICE_RADIO_RED_LIGHT_DISTRICT);
|
||||||
|
SETZONESFX(19, "TOWERS", SFX_POLICE_RADIO_HEPBURN_HEIGHTS);
|
||||||
|
SETZONESFX(20, "LITTLEI", SFX_POLICE_RADIO_SAINT_MARKS);
|
||||||
|
SETZONESFX(21, "HARWOOD", SFX_POLICE_RADIO_HARWOOD);
|
||||||
|
SETZONESFX(22, "EASTBAY", SFX_POLICE_RADIO_PORTLAND_BEACH);
|
||||||
|
SETZONESFX(23, "S_VIEW", SFX_POLICE_RADIO_PORTLAND_STRAIGHTS);
|
||||||
|
SETZONESFX(24, "CITYZON", SFX_POLICE_RADIO_LIBERTY_CITY);
|
||||||
|
SETZONESFX(25, "IND_ZON", SFX_POLICE_RADIO_PORTLAND);
|
||||||
|
SETZONESFX(26, "COM_ZON", SFX_POLICE_RADIO_STAUNTON_ISLAND);
|
||||||
|
SETZONESFX(27, "SUB_ZON", SFX_POLICE_RADIO_SHORESIDE_VALE);
|
||||||
|
SETZONESFX(28, "SUB_ZO2", SFX_POLICE_RADIO_SHORESIDE_VALE);
|
||||||
|
SETZONESFX(29, "SUB_ZO3", SFX_POLICE_RADIO_SHORESIDE_VALE);
|
||||||
|
SETZONESFX(30, "A", SFX_POLICE_RADIO_ROCKFORD);
|
||||||
|
SETZONESFX(31, "A", SFX_POLICE_RADIO_ROCKFORD);
|
||||||
|
SETZONESFX(32, "A", SFX_POLICE_RADIO_ROCKFORD);
|
||||||
|
SETZONESFX(33, "A", SFX_POLICE_RADIO_ROCKFORD);
|
||||||
|
SETZONESFX(34, "A", SFX_POLICE_RADIO_ROCKFORD);
|
||||||
|
|
||||||
#undef SETZONESFX
|
#undef SETZONESFX
|
||||||
|
|
||||||
|
strcpy(SubZo2Label, "SUB_ZO2");
|
||||||
|
strcpy(SubZo3Label, "SUB_ZO3");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -135,17 +161,14 @@ cAudioManager::ServicePoliceRadio()
|
|||||||
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
|
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
CPlayerPed *playerPed = FindPlayerPed();
|
wantedLevel = FindPlayerPed()->m_pWanted->GetWantedLevel();
|
||||||
if (playerPed) {
|
if(!crimeReport) {
|
||||||
wantedLevel = playerPed->m_pWanted->GetWantedLevel();
|
if(wantedLevel != 0) {
|
||||||
if (!crimeReport) {
|
if(nLastSeen != 0) {
|
||||||
if (wantedLevel != 0) {
|
--nLastSeen;
|
||||||
if (nLastSeen != 0)
|
} else {
|
||||||
--nLastSeen;
|
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
|
||||||
else {
|
SetupSuspectLastSeenReport();
|
||||||
nLastSeen = m_anRandomTable[1] % 1000 + 2000;
|
|
||||||
SetupSuspectLastSeenReport();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -163,18 +186,18 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
static int cWait = 0;
|
static int cWait = 0;
|
||||||
static bool bChannelOpen = false;
|
static bool bChannelOpen = false;
|
||||||
static uint8 bMissionAudioPhysicalPlayingStatus = 0;
|
static uint8 bMissionAudioPhysicalPlayingStatus = 0;
|
||||||
static int32 PoliceChannelFreq = 22050;
|
static int32 PoliceChannelFreq = 5500;
|
||||||
|
|
||||||
if (!m_bIsInitialised) return;
|
if (!m_bIsInitialised) return;
|
||||||
|
|
||||||
if (m_nUserPause != 0) {
|
if (m_nUserPause != 0) {
|
||||||
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
|
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
|
||||||
if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == 1 &&
|
if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == 1 &&
|
||||||
SampleManager.IsStreamPlaying(1)) {
|
SampleManager.IsStreamPlaying(1)) {
|
||||||
SampleManager.PauseStream(1, 1);
|
SampleManager.PauseStream(1, 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE &&
|
if (m_nPreviousUserPause && g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES &&
|
||||||
bMissionAudioPhysicalPlayingStatus == 1) {
|
bMissionAudioPhysicalPlayingStatus == 1) {
|
||||||
SampleManager.PauseStream(0, 1);
|
SampleManager.PauseStream(0, 1);
|
||||||
}
|
}
|
||||||
@@ -183,7 +206,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
--cWait;
|
--cWait;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (g_nMissionAudioSfx != NO_SAMPLE && !bChannelOpen) {
|
if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && !bChannelOpen) {
|
||||||
if (g_nMissionAudioPlayingStatus) {
|
if (g_nMissionAudioPlayingStatus) {
|
||||||
if (g_nMissionAudioPlayingStatus == 1 && !bMissionAudioPhysicalPlayingStatus &&
|
if (g_nMissionAudioPlayingStatus == 1 && !bMissionAudioPhysicalPlayingStatus &&
|
||||||
SampleManager.IsStreamPlaying(1)) {
|
SampleManager.IsStreamPlaying(1)) {
|
||||||
@@ -195,7 +218,7 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
} else {
|
} else {
|
||||||
bMissionAudioPhysicalPlayingStatus = 2;
|
bMissionAudioPhysicalPlayingStatus = 2;
|
||||||
g_nMissionAudioPlayingStatus = 2;
|
g_nMissionAudioPlayingStatus = 2;
|
||||||
g_nMissionAudioSfx = NO_SAMPLE;
|
g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
|
||||||
cWait = 30;
|
cWait = 30;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -210,29 +233,31 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bChannelOpen) DoPoliceRadioCrackle();
|
if (bChannelOpen) DoPoliceRadioCrackle();
|
||||||
if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != 1) &&
|
if ((g_nMissionAudioSfx == TOTAL_AUDIO_SAMPLES || g_nMissionAudioPlayingStatus != 1) &&
|
||||||
!SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) {
|
!SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) {
|
||||||
if (m_sPoliceRadioQueue.policeChannelTimer) {
|
if (m_sPoliceRadioQueue.policeChannelTimer) {
|
||||||
sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds];
|
sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds];
|
||||||
m_sPoliceRadioQueue.policeChannelTimer--;
|
m_sPoliceRadioQueue.policeChannelTimer--;
|
||||||
m_sPoliceRadioQueue.policeChannelCounterSeconds = (m_sPoliceRadioQueue.policeChannelCounterSeconds + 1) % 60;
|
m_sPoliceRadioQueue.policeChannelCounterSeconds = (m_sPoliceRadioQueue.policeChannelCounterSeconds + 1) % 60;
|
||||||
} else {
|
} else {
|
||||||
sample = NO_SAMPLE;
|
sample = TOTAL_AUDIO_SAMPLES;
|
||||||
}
|
}
|
||||||
if (wantedLevel == 0) {
|
if (wantedLevel == 0) {
|
||||||
if (gSpecialSuspectLastSeenReport) {
|
if (gSpecialSuspectLastSeenReport) {
|
||||||
gSpecialSuspectLastSeenReport = 0;
|
gSpecialSuspectLastSeenReport = 0;
|
||||||
} else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) {
|
} else if (((sample >= SFX_POLICE_RADIO_MESSAGE_NOISE_1) && (sample <= SFX_POLICE_RADIO_MESSAGE_NOISE_3)) || sample == TOTAL_AUDIO_SAMPLES) {
|
||||||
bChannelOpen = false;
|
bChannelOpen = false;
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sample == NO_SAMPLE) {
|
if (sample == TOTAL_AUDIO_SAMPLES) {
|
||||||
if (!processed) cWait = 30;
|
if (!processed) cWait = 30;
|
||||||
} else {
|
} else {
|
||||||
SampleManager.InitialiseChannel(policeChannel, sample, 0);
|
SampleManager.InitialiseChannel(policeChannel, sample, 0);
|
||||||
switch (sample) {
|
switch (sample) {
|
||||||
case SFX_POLICE_RADIO_MESSAGE_NOISE_1:
|
case SFX_POLICE_RADIO_MESSAGE_NOISE_1:
|
||||||
|
case SFX_POLICE_RADIO_MESSAGE_NOISE_2:
|
||||||
|
case SFX_POLICE_RADIO_MESSAGE_NOISE_3:
|
||||||
freq = m_anRandomTable[4] % 2000 + 10025;
|
freq = m_anRandomTable[4] % 2000 + 10025;
|
||||||
bChannelOpen = bChannelOpen == false;
|
bChannelOpen = bChannelOpen == false;
|
||||||
break;
|
break;
|
||||||
@@ -285,54 +310,49 @@ cAudioManager::SetupCrimeReport()
|
|||||||
for (int j = 0; j < NUMAUDIOZONES; j++) {
|
for (int j = 0; j < NUMAUDIOZONES; j++) {
|
||||||
if (strcmp(zone->name, ZoneSfx[j].m_aName) == 0) {
|
if (strcmp(zone->name, ZoneSfx[j].m_aName) == 0) {
|
||||||
sampleIndex = ZoneSfx[j].m_nSampleIndex;
|
sampleIndex = ZoneSfx[j].m_nSampleIndex;
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_WEVE_GOT);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_WEVE_GOT);
|
||||||
m_sPoliceRadioQueue.Add(SFX_A_10);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[1] % 2 + SFX_A_10_1);
|
||||||
switch (m_sPoliceRadioQueue.crimes[i].type) {
|
switch (m_sPoliceRadioQueue.crimes[i].type) {
|
||||||
case CRIME_PED_BURNED:
|
case CRIME_PED_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_PED; break;
|
||||||
case CRIME_HIT_PED_NASTYWEAPON:
|
case CRIME_COP_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_COP; break;
|
||||||
m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_PED;
|
|
||||||
break;
|
|
||||||
case CRIME_COP_BURNED:
|
|
||||||
case CRIME_HIT_COP_NASTYWEAPON:
|
|
||||||
m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_COP;
|
|
||||||
break;
|
|
||||||
case CRIME_VEHICLE_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break;
|
case CRIME_VEHICLE_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break;
|
||||||
case CRIME_DESTROYED_CESSNA: m_sPoliceRadioQueue.crimes[i].type = CRIME_SHOOT_HELI; break;
|
case CRIME_DESTROYED_CESSNA: m_sPoliceRadioQueue.crimes[i].type = CRIME_SHOOT_HELI; break;
|
||||||
case CRIME_EXPLOSION: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break; // huh?
|
|
||||||
default: break;
|
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_CRIME_1 - 1);
|
||||||
#else
|
|
||||||
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1);
|
|
||||||
#endif
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_IN);
|
m_sPoliceRadioQueue.Add(SFX_IN);
|
||||||
rangeX = zone->maxx - zone->minx;
|
if (sampleIndex == SFX_POLICE_RADIO_SHORESIDE_VALE &&
|
||||||
rangeY = zone->maxy - zone->miny;
|
(strcmp(zone->name, SubZo2Label) == 0 || strcmp(zone->name, SubZo3Label) == 0)) {
|
||||||
halfX = 0.5f * rangeX + zone->minx;
|
|
||||||
halfY = 0.5f * rangeY + zone->miny;
|
|
||||||
quarterX = 0.25f * rangeX;
|
|
||||||
quarterY = 0.25f * rangeY;
|
|
||||||
|
|
||||||
if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
||||||
processed = true;
|
|
||||||
} else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
|
||||||
processed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_EAST);
|
m_sPoliceRadioQueue.Add(SFX_EAST);
|
||||||
else if (m_sPoliceRadioQueue.crimes[i].position.x < halfX - quarterX)
|
} else {
|
||||||
m_sPoliceRadioQueue.Add(SFX_WEST);
|
rangeX = zone->maxx - zone->minx;
|
||||||
else if (!processed)
|
rangeY = zone->maxy - zone->miny;
|
||||||
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
halfX = 0.5f * rangeX + zone->minx;
|
||||||
|
halfY = 0.5f * rangeY + zone->miny;
|
||||||
|
quarterX = 0.25f * rangeX;
|
||||||
|
quarterY = 0.25f * rangeY;
|
||||||
|
|
||||||
m_sPoliceRadioQueue.Add(sampleIndex);
|
if (m_sPoliceRadioQueue.crimes[i].position.y > halfY + quarterY) {
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
||||||
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
processed = true;
|
||||||
|
} else if (m_sPoliceRadioQueue.crimes[i].position.y < halfY - quarterY) {
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
||||||
|
processed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_sPoliceRadioQueue.crimes[i].position.x > halfX + quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_EAST);
|
||||||
|
else if (m_sPoliceRadioQueue.crimes[i].position.x < halfX - quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_WEST);
|
||||||
|
else if (!processed)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
||||||
|
|
||||||
|
m_sPoliceRadioQueue.Add(sampleIndex);
|
||||||
|
m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
|
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -354,105 +374,161 @@ cAudioManager::SetupSuspectLastSeenReport()
|
|||||||
int32 color_post_modifier;
|
int32 color_post_modifier;
|
||||||
|
|
||||||
const int32 gCarColourTable[][3] = {
|
const int32 gCarColourTable[][3] = {
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLACK, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_WHITE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
#ifdef FIX_BUGS
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
#else
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
#endif
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
#ifdef FIX_BUGS
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
#else
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
#endif
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
#ifdef FIX_BUGS
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
#else
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
#endif
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
#ifdef FIX_BUGS
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
#else
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
#endif
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
#ifdef FIX_BUGS
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
|
||||||
{NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
#else
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
#endif
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
|
#ifdef FIX_BUGS
|
||||||
{SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_BLUE},
|
||||||
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#else
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#endif
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_GREY},
|
||||||
|
#else
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#endif
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#else
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#endif
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#else
|
||||||
|
{TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
|
||||||
|
#endif
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
|
||||||
|
{SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
|
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
|
||||||
veh = FindVehicleOfPlayer();
|
veh = FindPlayerVehicle();
|
||||||
if (veh != nil) {
|
if (veh != nil) {
|
||||||
if (60 - m_sPoliceRadioQueue.policeChannelTimer > 9) {
|
if (60 - m_sPoliceRadioQueue.policeChannelTimer > 9) {
|
||||||
color1 = veh->m_currentColour1;
|
color1 = veh->m_currentColour1;
|
||||||
@@ -463,193 +539,142 @@ cAudioManager::SetupSuspectLastSeenReport()
|
|||||||
color_pre_modifier = gCarColourTable[color1][0];
|
color_pre_modifier = gCarColourTable[color1][0];
|
||||||
color_post_modifier = gCarColourTable[color1][2];
|
color_post_modifier = gCarColourTable[color1][2];
|
||||||
switch (veh->GetModelIndex()) {
|
switch (veh->GetModelIndex()) {
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
case MI_COLUMB:
|
||||||
|
main_color = SFX_POLICE_RADIO_BLUE;
|
||||||
|
color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
||||||
|
#endif
|
||||||
case MI_LANDSTAL:
|
case MI_LANDSTAL:
|
||||||
case MI_PATRIOT:
|
case MI_BLISTA: sample = SFX_POLICE_RADIO_CRUISER; break;
|
||||||
case MI_RANCHER:
|
#ifdef FIX_BUGS
|
||||||
case MI_FBIRANCH:
|
case MI_YARDIE:
|
||||||
case MI_SANDKING:
|
color_pre_modifier = TOTAL_AUDIO_SAMPLES;
|
||||||
sample = SFX_POLICE_RADIO_OFFROAD;
|
main_color = SFX_POLICE_RADIO_RED;
|
||||||
break;
|
color_post_modifier = SFX_POLICE_RADIO_YELLOW;
|
||||||
|
sample = SFX_POLICE_RADIO_CONVERTIBLE; break;
|
||||||
|
case MI_DIABLOS:
|
||||||
|
main_color = SFX_POLICE_RADIO_BLACK;
|
||||||
|
#endif
|
||||||
case MI_IDAHO:
|
case MI_IDAHO:
|
||||||
case MI_MANANA:
|
case MI_STALLION: sample = SFX_POLICE_RADIO_CONVERTIBLE; break;
|
||||||
case MI_ESPERANT:
|
#ifdef FIX_BUGS
|
||||||
case MI_CUBAN:
|
case MI_YAKUZA:
|
||||||
case MI_STALLION:
|
color_pre_modifier = TOTAL_AUDIO_SAMPLES;
|
||||||
case MI_SABRE:
|
main_color = SFX_POLICE_RADIO_SILVER;
|
||||||
case MI_SABRETUR:
|
color_post_modifier = SFX_POLICE_RADIO_RED;
|
||||||
case MI_VIRGO:
|
#endif
|
||||||
case MI_BLISTAC:
|
|
||||||
sample = SFX_POLICE_RADIO_2_DOOR;
|
|
||||||
break;
|
|
||||||
case MI_STINGER:
|
case MI_STINGER:
|
||||||
case MI_INFERNUS:
|
case MI_INFERNUS:
|
||||||
case MI_CHEETAH:
|
case MI_CHEETAH:
|
||||||
case MI_BANSHEE:
|
case MI_BANSHEE: sample = SFX_POLICE_RADIO_SPORTS_CAR; break;
|
||||||
case MI_PHEONIX:
|
#ifdef FIX_BUGS
|
||||||
case MI_COMET:
|
case MI_MAFIA:
|
||||||
case MI_DELUXO:
|
color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
||||||
case MI_HOTRING:
|
main_color = SFX_POLICE_RADIO_GREY;
|
||||||
sample = SFX_POLICE_RADIO_SPORTS_CAR;
|
case MI_KURUMA:
|
||||||
break;
|
#endif
|
||||||
case MI_LINERUN:
|
|
||||||
sample = SFX_POLICE_RADIO_RIG;
|
|
||||||
break;
|
|
||||||
case MI_PEREN:
|
case MI_PEREN:
|
||||||
case MI_REGINA:
|
|
||||||
sample = SFX_POLICE_RADIO_STATION_WAGON;
|
|
||||||
break;
|
|
||||||
case MI_SENTINEL:
|
case MI_SENTINEL:
|
||||||
case MI_FBICAR:
|
case MI_FBICAR: sample = SFX_POLICE_RADIO_SALOON; break;
|
||||||
case MI_WASHING:
|
case MI_PATRIOT:
|
||||||
case MI_SENTXS:
|
case MI_BOBCAT: sample = SFX_POLICE_RADIO_PICKUP; break;
|
||||||
case MI_ADMIRAL:
|
case MI_FIRETRUCK: sample = SFX_POLICE_RADIO_FIRE_TRUCK; break;
|
||||||
case MI_GLENDALE:
|
#ifdef FIX_BUGS
|
||||||
case MI_OCEANIC:
|
case MI_LINERUN:
|
||||||
case MI_HERMES:
|
|
||||||
case MI_GREENWOO:
|
|
||||||
sample = SFX_POLICE_RADIO_SEDAN;
|
|
||||||
break;
|
|
||||||
case MI_RIO:
|
|
||||||
sample = SFX_POLICE_RADIO_CRUISER;
|
|
||||||
break;
|
|
||||||
case MI_FIRETRUCK:
|
|
||||||
sample = SFX_POLICE_RADIO_FIRE_TRUCK;
|
|
||||||
break;
|
|
||||||
case MI_TRASH:
|
|
||||||
sample = SFX_POLICE_RADIO_GARBAGE_TRUCK;
|
|
||||||
break;
|
|
||||||
case MI_STRETCH:
|
|
||||||
case MI_LOVEFIST:
|
|
||||||
sample = SFX_POLICE_RADIO_STRETCH;
|
|
||||||
break;
|
|
||||||
case MI_VOODOO:
|
|
||||||
sample = SFX_POLICE_RADIO_LOWRIDER;
|
|
||||||
break;
|
|
||||||
case MI_PONY:
|
|
||||||
case MI_MOONBEAM:
|
|
||||||
case MI_SECURICA:
|
|
||||||
case MI_RUMPO:
|
|
||||||
case MI_GANGBUR:
|
|
||||||
case MI_YANKEE:
|
|
||||||
case MI_TOPFUN:
|
|
||||||
case MI_BURRITO:
|
|
||||||
case MI_SPAND:
|
|
||||||
sample = SFX_POLICE_RADIO_VAN;
|
|
||||||
break;
|
|
||||||
case MI_MULE:
|
|
||||||
case MI_BARRACKS:
|
|
||||||
case MI_PACKER:
|
|
||||||
case MI_FLATBED:
|
case MI_FLATBED:
|
||||||
sample = SFX_POLICE_RADIO_TRUCK;
|
#endif
|
||||||
break;
|
case MI_TRASH:
|
||||||
case MI_AMBULAN:
|
case MI_BARRACKS: sample = SFX_POLICE_RADIO_TRUCK; break;
|
||||||
sample = SFX_POLICE_RADIO_AMBULANCE;
|
case MI_STRETCH: sample = SFX_POLICE_RADIO_LIMO; break;
|
||||||
break;
|
#ifdef FIX_BUGS
|
||||||
|
case MI_CORPSE:
|
||||||
|
#endif
|
||||||
|
case MI_MANANA:
|
||||||
|
case MI_ESPERANT: sample = SFX_POLICE_RADIO_2_DOOR; break;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
case MI_HOODS:
|
||||||
|
color_pre_modifier = TOTAL_AUDIO_SAMPLES;
|
||||||
|
main_color = SFX_POLICE_RADIO_BLUE;
|
||||||
|
color_post_modifier = SFX_POLICE_RADIO_GREEN;
|
||||||
|
case MI_BELLYUP:
|
||||||
|
case MI_YANKEE:
|
||||||
|
case MI_TOYZ:
|
||||||
|
case MI_MRWONGS:
|
||||||
|
case MI_PANLANT:
|
||||||
|
#endif
|
||||||
|
case MI_PONY:
|
||||||
|
case MI_MULE:
|
||||||
|
case MI_MOONBEAM:
|
||||||
|
case MI_ENFORCER:
|
||||||
|
case MI_SECURICA:
|
||||||
|
case MI_RUMPO: sample = SFX_POLICE_RADIO_VAN; break;
|
||||||
|
case MI_AMBULAN: sample = SFX_POLICE_RADIO_AMBULANCE; break;
|
||||||
case MI_TAXI:
|
case MI_TAXI:
|
||||||
case MI_CABBIE:
|
case MI_CABBIE:
|
||||||
case MI_ZEBRA:
|
case MI_BORGNINE: sample = SFX_POLICE_RADIO_TAXI; break;
|
||||||
case MI_KAUFMAN:
|
|
||||||
sample = SFX_POLICE_RADIO_TAXI;
|
|
||||||
break;
|
|
||||||
case MI_BOBCAT:
|
|
||||||
case MI_WALTON:
|
|
||||||
sample = SFX_POLICE_RADIO_PICKUP;
|
|
||||||
break;
|
|
||||||
case MI_MRWHOOP:
|
case MI_MRWHOOP:
|
||||||
sample = SFX_POLICE_RADIO_ICE_CREAM_VAN;
|
sample = SFX_POLICE_RADIO_ICE_CREAM_VAN;
|
||||||
break;
|
break;
|
||||||
case MI_BFINJECT:
|
case MI_BFINJECT: sample = SFX_POLICE_RADIO_BUGGY; break;
|
||||||
sample = SFX_POLICE_RADIO_BUGGY;
|
case MI_POLICE: sample = SFX_POLICE_RADIO_POLICE_CAR; break;
|
||||||
break;
|
#ifdef FIX_BUGS
|
||||||
case MI_HUNTER:
|
|
||||||
case MI_CHOPPER:
|
|
||||||
case MI_SEASPAR:
|
|
||||||
case MI_SPARROW:
|
|
||||||
case MI_MAVERICK:
|
|
||||||
case MI_VCNMAV:
|
|
||||||
case MI_POLMAV:
|
|
||||||
sample = SFX_POLICE_RADIO_HELICOPTER;
|
|
||||||
break;
|
|
||||||
case MI_POLICE:
|
|
||||||
sample = SFX_POLICE_RADIO_POLICE_CAR;
|
|
||||||
break;
|
|
||||||
case MI_ENFORCER:
|
|
||||||
sample = SFX_POLICE_RADIO_SWAT_VAN;
|
|
||||||
break;
|
|
||||||
case MI_PREDATOR:
|
|
||||||
case MI_SQUALO:
|
|
||||||
case MI_SPEEDER:
|
case MI_SPEEDER:
|
||||||
sample = SFX_POLICE_RADIO_SPEEDBOAT;
|
case MI_REEFER:
|
||||||
break;
|
case MI_GHOST:
|
||||||
|
#endif
|
||||||
|
case MI_PREDATOR: sample = SFX_POLICE_RADIO_BOAT; break;
|
||||||
case MI_BUS:
|
case MI_BUS:
|
||||||
sample = SFX_POLICE_RADIO_BUS;
|
case MI_COACH: sample = SFX_POLICE_RADIO_BUS; break;
|
||||||
break;
|
|
||||||
case MI_RHINO:
|
case MI_RHINO:
|
||||||
sample = SFX_POLICE_RADIO_TANK;
|
sample = SFX_POLICE_RADIO_TANK;
|
||||||
|
main_color = TOTAL_AUDIO_SAMPLES;
|
||||||
|
color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
||||||
break;
|
break;
|
||||||
case MI_ANGEL:
|
case MI_TRAIN:
|
||||||
case MI_PCJ600:
|
sample = SFX_POLICE_RADIO_SUBWAY_CAR;
|
||||||
case MI_FREEWAY:
|
main_color = TOTAL_AUDIO_SAMPLES;
|
||||||
case MI_SANCHEZ:
|
color_post_modifier = TOTAL_AUDIO_SAMPLES;
|
||||||
sample = SFX_POLICE_RADIO_MOTOBIKE;
|
|
||||||
break;
|
|
||||||
case MI_COACH:
|
|
||||||
sample = SFX_POLICE_RADIO_COACH;
|
|
||||||
break;
|
|
||||||
case MI_ROMERO:
|
|
||||||
sample = SFX_POLICE_RADIO_HEARSE;
|
|
||||||
break;
|
|
||||||
case MI_PIZZABOY:
|
|
||||||
case MI_FAGGIO:
|
|
||||||
sample = SFX_POLICE_RADIO_MOPED;
|
|
||||||
break;
|
|
||||||
case MI_DEADDODO:
|
|
||||||
case MI_SKIMMER:
|
|
||||||
sample = 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;
|
|
||||||
break;
|
|
||||||
case MI_CADDY:
|
|
||||||
sample = SFX_POLICE_RADIO_GOLF_CART;
|
|
||||||
break;
|
|
||||||
case MI_DINGHY:
|
|
||||||
sample = SFX_POLICE_RADIO_DINGHY;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
//debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex());
|
debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
||||||
if (m_anRandomTable[3] % 2)
|
if (m_anRandomTable[3] % 2)
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_A);
|
#ifdef FIX_BUGS
|
||||||
if (color_pre_modifier != NO_SAMPLE)
|
if (main_color == SFX_POLICE_RADIO_ORANGE && color_pre_modifier == TOTAL_AUDIO_SAMPLES)
|
||||||
|
#else
|
||||||
|
if (main_color == SFX_POLICE_RADIO_ORANGE)
|
||||||
|
#endif
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_AN);
|
||||||
|
else
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_A);
|
||||||
|
if (color_pre_modifier != TOTAL_AUDIO_SAMPLES)
|
||||||
m_sPoliceRadioQueue.Add(color_pre_modifier);
|
m_sPoliceRadioQueue.Add(color_pre_modifier);
|
||||||
if (main_color != NO_SAMPLE)
|
if (main_color != TOTAL_AUDIO_SAMPLES)
|
||||||
m_sPoliceRadioQueue.Add(main_color);
|
m_sPoliceRadioQueue.Add(main_color);
|
||||||
if (color_post_modifier != NO_SAMPLE)
|
if (color_post_modifier != TOTAL_AUDIO_SAMPLES)
|
||||||
m_sPoliceRadioQueue.Add(color_post_modifier);
|
m_sPoliceRadioQueue.Add(color_post_modifier);
|
||||||
m_sPoliceRadioQueue.Add(sample);
|
m_sPoliceRadioQueue.Add(sample);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (60 - m_sPoliceRadioQueue.policeChannelTimer > 4) {
|
} else if (60 - m_sPoliceRadioQueue.policeChannelTimer > 4) {
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_ON_FOOT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_ON_FOOT);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
|
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
|
||||||
{
|
{
|
||||||
@@ -657,14 +682,15 @@ cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
|
|||||||
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 &&
|
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 &&
|
||||||
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
|
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
|
||||||
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
||||||
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
|
if (m_sPoliceRadioQueue.crimes[i].type) {
|
||||||
if (m_sPoliceRadioQueue.crimes[i].type == type) {
|
if (m_sPoliceRadioQueue.crimes[i].type == type) {
|
||||||
m_sPoliceRadioQueue.crimes[i].position = pos;
|
m_sPoliceRadioQueue.crimes[i].position = pos;
|
||||||
m_sPoliceRadioQueue.crimes[i].timer = 0;
|
m_sPoliceRadioQueue.crimes[i].timer = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
lastCrime = i;
|
lastCrime = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastCrime < ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) {
|
if (lastCrime < ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) {
|
||||||
@@ -700,34 +726,41 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
|
|||||||
for (int i = 0; i < NUMAUDIOZONES; i++) {
|
for (int i = 0; i < NUMAUDIOZONES; i++) {
|
||||||
if (strcmp(zone->name, ZoneSfx[i].m_aName) == 0) {
|
if (strcmp(zone->name, ZoneSfx[i].m_aName) == 0) {
|
||||||
sample = ZoneSfx[i].m_nSampleIndex;
|
sample = ZoneSfx[i].m_nSampleIndex;
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
|
||||||
m_sPoliceRadioQueue.Add(SFX_IN);
|
m_sPoliceRadioQueue.Add(SFX_IN);
|
||||||
rangeX = zone->maxx - zone->minx;
|
if (sample == SFX_POLICE_RADIO_SHORESIDE_VALE &&
|
||||||
rangeY = zone->maxy - zone->miny;
|
(strcmp(zone->name, SubZo2Label) == 0 ||
|
||||||
halfX = 0.5f * rangeX + zone->minx;
|
strcmp(zone->name, SubZo3Label) == 0)) {
|
||||||
halfY = 0.5f * rangeY + zone->miny;
|
|
||||||
quarterX = 0.25f * rangeX;
|
|
||||||
quarterY = 0.25f * rangeY;
|
|
||||||
|
|
||||||
if (vec.y > halfY + quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
||||||
processed = true;
|
|
||||||
} else if (vec.y < halfY - quarterY) {
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
|
||||||
processed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vec.x > halfX + quarterX)
|
|
||||||
m_sPoliceRadioQueue.Add(SFX_EAST);
|
m_sPoliceRadioQueue.Add(SFX_EAST);
|
||||||
else if (vec.x < halfX - quarterX)
|
} else {
|
||||||
m_sPoliceRadioQueue.Add(SFX_WEST);
|
rangeX = zone->maxx - zone->minx;
|
||||||
else if (!processed)
|
rangeY = zone->maxy - zone->miny;
|
||||||
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
halfX = 0.5f * rangeX + zone->minx;
|
||||||
|
halfY = 0.5f * rangeY + zone->miny;
|
||||||
|
quarterX = 0.25f * rangeX;
|
||||||
|
quarterY = 0.25f * rangeY;
|
||||||
|
|
||||||
|
if (vec.y > halfY + quarterY) {
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_NORTH);
|
||||||
|
processed = true;
|
||||||
|
} else if (vec.y < halfY - quarterY) {
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_SOUTH);
|
||||||
|
processed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vec.x > halfX + quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_EAST);
|
||||||
|
else if (vec.x < halfX - quarterX)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_WEST);
|
||||||
|
else if (!processed)
|
||||||
|
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
|
||||||
|
}
|
||||||
m_sPoliceRadioQueue.Add(sample);
|
m_sPoliceRadioQueue.Add(sample);
|
||||||
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
|
||||||
m_sPoliceRadioQueue.Add(NO_SAMPLE);
|
m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
|
||||||
gSpecialSuspectLastSeenReport = true;
|
gSpecialSuspectLastSeenReport = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -741,7 +774,7 @@ cAudioManager::AgeCrimes()
|
|||||||
{
|
{
|
||||||
for (uint8 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
for (uint8 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
||||||
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
|
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
|
||||||
if (++m_sPoliceRadioQueue.crimes[i].timer > 1200) m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
|
if (++m_sPoliceRadioQueue.crimes[i].timer > 1500) m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,4 +43,4 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
VALIDATE_SIZE(cPoliceRadioQueue, 0x1BC);
|
VALIDATE_SIZE(cPoliceRadioQueue, 444);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
|||||||
#include "stream.h"
|
#include "stream.h"
|
||||||
#include "sampman.h"
|
#include "sampman.h"
|
||||||
|
|
||||||
#if defined _MSC_VER && !defined CMAKE_NO_AUTOLINK
|
#if defined _MSC_VER && !defined RE3_NO_AUTOLINK
|
||||||
#ifdef AUDIO_OAL_USE_SNDFILE
|
#ifdef AUDIO_OAL_USE_SNDFILE
|
||||||
#pragma comment( lib, "libsndfile-1.lib" )
|
#pragma comment( lib, "libsndfile-1.lib" )
|
||||||
#endif
|
#endif
|
||||||
@@ -469,17 +469,10 @@ public:
|
|||||||
|
|
||||||
class CMP3File : public IDecoder
|
class CMP3File : public IDecoder
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
mpg123_handle *m_pMH;
|
mpg123_handle *m_pMH;
|
||||||
bool m_bOpened;
|
bool m_bOpened;
|
||||||
uint32 m_nRate;
|
uint32 m_nRate;
|
||||||
uint32 m_nChannels;
|
uint32 m_nChannels;
|
||||||
|
|
||||||
CMP3File() :
|
|
||||||
m_pMH(nil),
|
|
||||||
m_bOpened(false),
|
|
||||||
m_nRate(0),
|
|
||||||
m_nChannels(0) {}
|
|
||||||
public:
|
public:
|
||||||
CMP3File(const char *path) :
|
CMP3File(const char *path) :
|
||||||
m_pMH(nil),
|
m_pMH(nil),
|
||||||
@@ -575,54 +568,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CADFFile : public CMP3File
|
|
||||||
{
|
|
||||||
static ssize_t r_read(void* fh, void* buf, size_t size)
|
|
||||||
{
|
|
||||||
size_t bytesRead = fread(buf, 1, size, (FILE*)fh);
|
|
||||||
uint8* _buf = (uint8*)buf;
|
|
||||||
for (size_t i = 0; i < size; i++)
|
|
||||||
_buf[i] ^= 0x22;
|
|
||||||
return bytesRead;
|
|
||||||
}
|
|
||||||
static off_t r_seek(void* fh, off_t pos, int seekType)
|
|
||||||
{
|
|
||||||
fseek((FILE*)fh, pos, seekType);
|
|
||||||
return ftell((FILE*)fh);
|
|
||||||
}
|
|
||||||
static void r_close(void* fh)
|
|
||||||
{
|
|
||||||
fclose((FILE*)fh);
|
|
||||||
}
|
|
||||||
public:
|
|
||||||
CADFFile(const char* path)
|
|
||||||
{
|
|
||||||
m_pMH = mpg123_new(nil, nil);
|
|
||||||
if (m_pMH)
|
|
||||||
{
|
|
||||||
#ifdef MP3_USE_FUZZY_SEEK
|
|
||||||
mpg123_param(m_pMH, MPG123_FLAGS, MPG123_FUZZY | MPG123_SEEKBUFFER | MPG123_GAPLESS | MPG123_QUIET, 0.0);
|
|
||||||
#endif
|
|
||||||
long rate = 0;
|
|
||||||
int channels = 0;
|
|
||||||
int encoding = 0;
|
|
||||||
|
|
||||||
FILE* f = fopen(path, "rb");
|
|
||||||
|
|
||||||
m_bOpened = mpg123_replace_reader_handle(m_pMH, r_read, r_seek, r_close) == MPG123_OK
|
|
||||||
&& mpg123_open_handle(m_pMH, f) == MPG123_OK && mpg123_getformat(m_pMH, &rate, &channels, &encoding) == MPG123_OK;
|
|
||||||
m_nRate = rate;
|
|
||||||
m_nChannels = channels;
|
|
||||||
|
|
||||||
if (IsOpened())
|
|
||||||
{
|
|
||||||
mpg123_format_none(m_pMH);
|
|
||||||
mpg123_format(m_pMH, rate, channels, encoding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#define VAG_LINE_SIZE (0x10)
|
#define VAG_LINE_SIZE (0x10)
|
||||||
#define VAG_SAMPLES_IN_LINE (28)
|
#define VAG_SAMPLES_IN_LINE (28)
|
||||||
@@ -1009,8 +954,6 @@ CStream::CStream(char *filename, ALuint *sources, ALuint (&buffers)[NUM_STREAMBU
|
|||||||
#ifdef AUDIO_OAL_USE_MPG123
|
#ifdef AUDIO_OAL_USE_MPG123
|
||||||
else if (!strcasecmp(&m_aFilename[strlen(m_aFilename) - strlen(".mp3")], ".mp3"))
|
else if (!strcasecmp(&m_aFilename[strlen(m_aFilename) - strlen(".mp3")], ".mp3"))
|
||||||
m_pSoundFile = new CMP3File(m_aFilename);
|
m_pSoundFile = new CMP3File(m_aFilename);
|
||||||
else if (!strcasecmp(&m_aFilename[strlen(m_aFilename) - strlen(".adf")], ".adf"))
|
|
||||||
m_pSoundFile = new CADFFile(m_aFilename);
|
|
||||||
#endif
|
#endif
|
||||||
else if (!strcasecmp(&m_aFilename[strlen(m_aFilename) - strlen(".vb")], ".VB"))
|
else if (!strcasecmp(&m_aFilename[strlen(m_aFilename) - strlen(".vb")], ".VB"))
|
||||||
m_pSoundFile = new CVbFile(m_aFilename, overrideSampleRate);
|
m_pSoundFile = new CVbFile(m_aFilename, overrideSampleRate);
|
||||||
@@ -1194,9 +1137,9 @@ bool CStream::FillBuffer(ALuint *alBuffer)
|
|||||||
uint32 size = m_pSoundFile->Decode(m_pBuffer);
|
uint32 size = m_pSoundFile->Decode(m_pBuffer);
|
||||||
if( size == 0 )
|
if( size == 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint32 channelSize = size / m_pSoundFile->GetChannels();
|
|
||||||
|
|
||||||
|
uint32 channelSize = size / m_pSoundFile->GetChannels();
|
||||||
|
|
||||||
alBufferData(alBuffer[0], AL_FORMAT_MONO16, m_pBuffer, channelSize, m_pSoundFile->GetSampleRate());
|
alBufferData(alBuffer[0], AL_FORMAT_MONO16, m_pBuffer, channelSize, m_pSoundFile->GetSampleRate());
|
||||||
// TODO: use just one buffer if we play mono
|
// TODO: use just one buffer if we play mono
|
||||||
if (m_pSoundFile->GetChannels() == 1)
|
if (m_pSoundFile->GetChannels() == 1)
|
||||||
@@ -1223,7 +1166,7 @@ int32 CStream::FillBuffers()
|
|||||||
void CStream::ClearBuffers()
|
void CStream::ClearBuffers()
|
||||||
{
|
{
|
||||||
if ( !HasSource() ) return;
|
if ( !HasSource() ) return;
|
||||||
|
|
||||||
ALint buffersQueued[2];
|
ALint buffersQueued[2];
|
||||||
alGetSourcei(m_pAlSources[0], AL_BUFFERS_QUEUED, &buffersQueued[0]);
|
alGetSourcei(m_pAlSources[0], AL_BUFFERS_QUEUED, &buffersQueued[0]);
|
||||||
alGetSourcei(m_pAlSources[1], AL_BUFFERS_QUEUED, &buffersQueued[1]);
|
alGetSourcei(m_pAlSources[1], AL_BUFFERS_QUEUED, &buffersQueued[1]);
|
||||||
@@ -1283,7 +1226,7 @@ void CStream::SetPlay(bool state)
|
|||||||
{
|
{
|
||||||
ALint sourceState = AL_STOPPED;
|
ALint sourceState = AL_STOPPED;
|
||||||
alGetSourcei(m_pAlSources[0], AL_SOURCE_STATE, &sourceState);
|
alGetSourcei(m_pAlSources[0], AL_SOURCE_STATE, &sourceState);
|
||||||
if (sourceState != AL_STOPPED )
|
if (sourceState != AL_STOPPED)
|
||||||
alSourceStop(m_pAlSources[0]);
|
alSourceStop(m_pAlSources[0]);
|
||||||
|
|
||||||
sourceState = AL_STOPPED;
|
sourceState = AL_STOPPED;
|
||||||
|
|||||||
1770
src/audio/sampman.h
1770
src/audio/sampman.h
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
|||||||
#include "MusicManager.h"
|
#include "MusicManager.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "crossplatform.h"
|
|
||||||
|
|
||||||
#pragma comment( lib, "mss32.lib" )
|
#pragma comment( lib, "mss32.lib" )
|
||||||
|
|
||||||
@@ -60,10 +60,14 @@ char _mp3DirectoryPath[MAX_PATH];
|
|||||||
HSTREAM mp3Stream [MAX_STREAMS];
|
HSTREAM mp3Stream [MAX_STREAMS];
|
||||||
int8 nStreamPan [MAX_STREAMS];
|
int8 nStreamPan [MAX_STREAMS];
|
||||||
int8 nStreamVolume[MAX_STREAMS];
|
int8 nStreamVolume[MAX_STREAMS];
|
||||||
uint8 nStreamLoopedFlag[MAX_STREAMS];
|
|
||||||
uint32 _CurMP3Index;
|
uint32 _CurMP3Index;
|
||||||
int32 _CurMP3Pos;
|
int32 _CurMP3Pos;
|
||||||
bool _bIsMp3Active;
|
bool _bIsMp3Active;
|
||||||
|
|
||||||
|
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
|
||||||
|
bool _bUseHDDAudio;
|
||||||
|
char _aHDDPath[MAX_PATH];
|
||||||
|
#endif
|
||||||
///////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -259,63 +263,10 @@ set_new_provider(S32 index)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 RadioHandlers[9];
|
|
||||||
|
|
||||||
U32 WINAPI vfs_open_callback(char const* Filename, U32* FileHandle)
|
|
||||||
{
|
|
||||||
*FileHandle = (U32)fopen(Filename, "rb");
|
|
||||||
|
|
||||||
// couldn't they just use stricmp once? and strlen? this is very inefficient
|
|
||||||
if ((strcmp(Filename + strlen(Filename) - 4, ".adf") == 0) || (strcmp(Filename + strlen(Filename) - 4, ".ADF") == 0)) {
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(RadioHandlers); i++) {
|
|
||||||
if (RadioHandlers[i] == NULL) {
|
|
||||||
RadioHandlers[i] = *FileHandle;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
strcpy((char*)Filename + strlen(Filename) - 4, ".mp3");
|
|
||||||
}
|
|
||||||
return *FileHandle;
|
|
||||||
}
|
|
||||||
|
|
||||||
void WINAPI vfs_close_callback(U32 FileHandle)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(RadioHandlers); i++) {
|
|
||||||
if (RadioHandlers[i] == FileHandle) {
|
|
||||||
RadioHandlers[i] = NULL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose((FILE*)FileHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
S32 WINAPI vfs_seek_callback(U32 FileHandle, S32 Offset, U32 Type)
|
|
||||||
{
|
|
||||||
fseek((FILE*)FileHandle, Offset, Type);
|
|
||||||
return ftell((FILE*)FileHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
U32 WINAPI vfs_read_callback(U32 FileHandle, void* Buffer, U32 Bytes)
|
|
||||||
{
|
|
||||||
fread(Buffer, Bytes, 1, (FILE*)FileHandle);
|
|
||||||
uint8* _Buffer = (uint8*)Buffer;
|
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(RadioHandlers); i++) {
|
|
||||||
if (FileHandle == RadioHandlers[i]) {
|
|
||||||
for (U32 k = 0; k < Bytes; k++)
|
|
||||||
_Buffer[k] ^= 0x22;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Bytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
cSampleManager::cSampleManager(void) :
|
cSampleManager::cSampleManager(void) :
|
||||||
m_nNumberOfProviders(0)
|
m_nNumberOfProviders(0)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
|
||||||
AIL_set_file_callbacks(vfs_open_callback, vfs_close_callback, vfs_seek_callback, vfs_read_callback);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cSampleManager::~cSampleManager(void)
|
cSampleManager::~cSampleManager(void)
|
||||||
@@ -402,63 +353,6 @@ cSampleManager::SetCurrent3DProvider(uint8 nProvider)
|
|||||||
return curprovider;
|
return curprovider;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
|
||||||
cSampleManager::AutoDetect3DProviders()
|
|
||||||
{
|
|
||||||
if (!AudioManager.IsAudioInitialised())
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
int eax = -1, eax2 = -1, eax3 = -1, ds3dh = -1, ds3ds = -1;
|
|
||||||
|
|
||||||
for (uint32 i = 0; i < GetNum3DProvidersAvailable(); i++)
|
|
||||||
{
|
|
||||||
char* providername = Get3DProviderName(i);
|
|
||||||
|
|
||||||
if (!strcasecmp(providername, "CREATIVE LABS EAX (TM)")) {
|
|
||||||
AudioManager.SetCurrent3DProvider(i);
|
|
||||||
if (GetCurrent3DProviderIndex() == i)
|
|
||||||
eax = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcasecmp(providername, "CREATIVE LABS EAX 2 (TM)")) {
|
|
||||||
AudioManager.SetCurrent3DProvider(i);
|
|
||||||
if (GetCurrent3DProviderIndex() == i)
|
|
||||||
eax2 = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcasecmp(providername, "CREATIVE LABS EAX 3 (TM)")) {
|
|
||||||
AudioManager.SetCurrent3DProvider(i);
|
|
||||||
if (GetCurrent3DProviderIndex() == i) {
|
|
||||||
eax3 = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcasecmp(providername, "DIRECTSOUND3D HARDWARE SUPPORT")) {
|
|
||||||
AudioManager.SetCurrent3DProvider(i);
|
|
||||||
if (GetCurrent3DProviderIndex() == i)
|
|
||||||
ds3dh = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcasecmp(providername, "DIRECTSOUND3D SOFTWARE EMULATION")) {
|
|
||||||
AudioManager.SetCurrent3DProvider(i);
|
|
||||||
if (GetCurrent3DProviderIndex() == i)
|
|
||||||
ds3ds = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (eax3 != -1)
|
|
||||||
return eax3;
|
|
||||||
if (eax2 != -1)
|
|
||||||
return eax2;
|
|
||||||
if (eax != -1)
|
|
||||||
return eax;
|
|
||||||
if (ds3dh != -1)
|
|
||||||
return ds3dh;
|
|
||||||
if (ds3ds != -1)
|
|
||||||
return ds3ds;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_ResolveLink(char const *path, char *out)
|
_ResolveLink(char const *path, char *out)
|
||||||
{
|
{
|
||||||
@@ -554,6 +448,15 @@ _FindMP3s(void)
|
|||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILE *f = fopen("MP3\\MP3Report.txt", "w");
|
||||||
|
|
||||||
|
if ( f )
|
||||||
|
{
|
||||||
|
fprintf(f, "MP3 Report File\n\n");
|
||||||
|
fprintf(f, "\"%s\"", fd.cFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( filepathlen > 4 )
|
if ( filepathlen > 4 )
|
||||||
{
|
{
|
||||||
@@ -563,6 +466,12 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
OutputDebugString("Resolving Link");
|
OutputDebugString("Resolving Link");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - shortcut to \"%s\"", filepath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( f ) fprintf(f, " - couldn't resolve shortcut");
|
||||||
}
|
}
|
||||||
|
|
||||||
bShortcut = true;
|
bShortcut = true;
|
||||||
@@ -586,6 +495,10 @@ _FindMP3s(void)
|
|||||||
if ( _pMP3List == NULL )
|
if ( _pMP3List == NULL )
|
||||||
{
|
{
|
||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
|
|
||||||
|
if ( f )
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,6 +521,9 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
_pMP3List->pLinkPath = NULL;
|
_pMP3List->pLinkPath = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - OK\n");
|
||||||
|
|
||||||
bInitFirstEntry = false;
|
bInitFirstEntry = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -616,6 +532,8 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
|
||||||
|
|
||||||
bInitFirstEntry = true;
|
bInitFirstEntry = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -631,6 +549,8 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
int32 filepathlen = strlen(filepath);
|
int32 filepathlen = strlen(filepath);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, "\"%s\"", fd.cFileName);
|
||||||
|
|
||||||
if ( filepathlen > 0 )
|
if ( filepathlen > 0 )
|
||||||
{
|
{
|
||||||
if ( filepathlen > 4 )
|
if ( filepathlen > 4 )
|
||||||
@@ -641,6 +561,12 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
OutputDebugString("Resolving Link");
|
OutputDebugString("Resolving Link");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - shortcut to \"%s\"", filepath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( f ) fprintf(f, " - couldn't resolve shortcut");
|
||||||
}
|
}
|
||||||
|
|
||||||
bShortcut = true;
|
bShortcut = true;
|
||||||
@@ -651,6 +577,8 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
if ( filepathlen > MAX_PATH )
|
if ( filepathlen > MAX_PATH )
|
||||||
{
|
{
|
||||||
|
if ( f ) fprintf(f, " - Filename and path too long - %s - IGNORED)\n", filepath);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -689,13 +617,17 @@ _FindMP3s(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pList = _pMP3List;
|
pList = _pMP3List;
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - OK\n");
|
||||||
|
|
||||||
bInitFirstEntry = false;
|
bInitFirstEntry = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(filepath, " - NOT A VALID MP3");
|
strcat(filepath, " - NOT A VALID MP3");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -708,6 +640,8 @@ _FindMP3s(void)
|
|||||||
|
|
||||||
if ( filepathlen > 0 )
|
if ( filepathlen > 0 )
|
||||||
{
|
{
|
||||||
|
if ( f ) fprintf(f, "\"%s\"", fd.cFileName);
|
||||||
|
|
||||||
if ( filepathlen > 4 )
|
if ( filepathlen > 4 )
|
||||||
{
|
{
|
||||||
if ( !strcmp(&filepath[filepathlen - 4], ".lnk") )
|
if ( !strcmp(&filepath[filepathlen - 4], ".lnk") )
|
||||||
@@ -716,6 +650,12 @@ _FindMP3s(void)
|
|||||||
{
|
{
|
||||||
OutputDebugString("Resolving Link");
|
OutputDebugString("Resolving Link");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - shortcut to \"%s\"", filepath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( f ) fprintf(f, " - couldn't resolve shortcut");
|
||||||
}
|
}
|
||||||
|
|
||||||
bShortcut = true;
|
bShortcut = true;
|
||||||
@@ -760,16 +700,26 @@ _FindMP3s(void)
|
|||||||
nNumMP3s++;
|
nNumMP3s++;
|
||||||
|
|
||||||
OutputDebugString(fd.cFileName);
|
OutputDebugString(fd.cFileName);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - OK\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strcat(filepath, " - NOT A VALID MP3");
|
strcat(filepath, " - NOT A VALID MP3");
|
||||||
OutputDebugString(filepath);
|
OutputDebugString(filepath);
|
||||||
|
|
||||||
|
if ( f ) fprintf(f, " - not an MP3 or supported MP3 type\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( f )
|
||||||
|
{
|
||||||
|
fprintf(f, "\nTOTAL SUPPORTED MP3s: %d\n", nNumMP3s);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
FindClose(hFind);
|
FindClose(hFind);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -981,37 +931,54 @@ cSampleManager::Initialise(void)
|
|||||||
|
|
||||||
AIL_set_preference(DIG_MIXER_CHANNELS, MAX_DIGITAL_MIXER_CHANNELS);
|
AIL_set_preference(DIG_MIXER_CHANNELS, MAX_DIGITAL_MIXER_CHANNELS);
|
||||||
|
|
||||||
DIG = AIL_open_digital_driver(DIGITALRATE, DIGITALBITS, DIGITALCHANNELS, 0);
|
DIG = AIL_open_digital_driver(DIGITALRATE, DIGITALBITS, DIGITALCHANNELS, 0);
|
||||||
|
if ( DIG == NULL )
|
||||||
|
{
|
||||||
|
OutputDebugString(AIL_last_error());
|
||||||
|
Terminate();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_providers();
|
||||||
|
|
||||||
|
if ( !InitialiseSampleBanks() )
|
||||||
|
{
|
||||||
|
Terminate();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
|
||||||
|
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
|
||||||
|
{
|
||||||
|
Terminate();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
TRACE("cache");
|
TRACE("cache");
|
||||||
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
|
FILE *cacheFile = fopen("audio\\sound.cache", "rb");
|
||||||
bool CreateCache = false;
|
|
||||||
if (cacheFile) {
|
if (cacheFile) {
|
||||||
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
fclose(cacheFile);
|
fclose(cacheFile);
|
||||||
}else
|
m_bInitialised = true;
|
||||||
CreateCache = true;
|
}else {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char filepath[MAX_PATH];
|
|
||||||
bool bFileNotFound;
|
|
||||||
S32 tatalms;
|
|
||||||
|
|
||||||
TRACE("cdrom");
|
TRACE("cdrom");
|
||||||
|
|
||||||
|
S32 tatalms;
|
||||||
|
char filepath[MAX_PATH];
|
||||||
|
|
||||||
{
|
{
|
||||||
m_bInitialised = false;
|
m_bInitialised = false;
|
||||||
|
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Find path of WAVs (originally in HDD)
|
|
||||||
int32 drive = 'C';
|
int32 drive = 'C';
|
||||||
|
|
||||||
#ifndef NO_CDCHECK
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
char latter[2];
|
char latter[2];
|
||||||
@@ -1032,148 +999,50 @@ cSampleManager::Initialise(void)
|
|||||||
if ( f )
|
if ( f )
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
strcpy(m_MiscomPath, m_szCDRomRootPath);
|
|
||||||
break;
|
bool bFileNotFound = false;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} while ( ++drive <= 'Z' );
|
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
#else
|
{
|
||||||
m_MiscomPath[0] = '\0';
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
#endif
|
strcat(filepath, StreamedNameTable[i]);
|
||||||
|
|
||||||
if ( DIG == NULL )
|
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
||||||
{
|
|
||||||
OutputDebugString(AIL_last_error());
|
if ( mp3Stream[0] )
|
||||||
Terminate();
|
{
|
||||||
return false;
|
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
||||||
}
|
|
||||||
|
AIL_close_stream(mp3Stream[0]);
|
||||||
add_providers();
|
mp3Stream[0] = NULL;
|
||||||
|
|
||||||
m_szCDRomRootPath[0] = '\0';
|
nStreamLength[i] = tatalms;
|
||||||
|
}
|
||||||
strcpy(m_WavFilesPath, m_szCDRomRootPath);
|
else
|
||||||
|
{
|
||||||
#ifdef AUDIO_CACHE
|
bFileNotFound = true;
|
||||||
if ( CreateCache )
|
break;
|
||||||
#endif
|
}
|
||||||
for ( int32 i = STREAMED_SOUND_MISSION_MOBR1; i < TOTAL_STREAMED_SOUNDS; i++ )
|
}
|
||||||
{
|
|
||||||
strcpy(filepath, m_szCDRomRootPath);
|
if ( !bFileNotFound )
|
||||||
strcat(filepath, StreamedNameTable[i]);
|
{
|
||||||
|
m_bInitialised = true;
|
||||||
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
|
||||||
|
|
||||||
if ( mp3Stream[0] )
|
|
||||||
{
|
|
||||||
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
|
||||||
|
|
||||||
AIL_close_stream(mp3Stream[0]);
|
|
||||||
mp3Stream[0] = NULL;
|
|
||||||
|
|
||||||
nStreamLength[i] = tatalms;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_bInitialised = false;
|
|
||||||
Terminate();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find path of MP3s (originally in CD-Rom)
|
|
||||||
// if NO_CDCHECK is NOT defined but AUDIO_CACHE is defined, we still need to find MP3s' path, but will exit after the first file
|
|
||||||
#ifndef NO_CDCHECK
|
|
||||||
int32 drive = 'C';
|
|
||||||
do
|
|
||||||
{
|
|
||||||
latter[0] = drive;
|
|
||||||
latter[1] = '\0';
|
|
||||||
|
|
||||||
strcpy(m_szCDRomRootPath, latter);
|
|
||||||
strcat(m_szCDRomRootPath, ":");
|
|
||||||
strcat(m_MP3FilesPath, m_szCDRomRootPath);
|
|
||||||
#else
|
|
||||||
m_MP3FilesPath[0] = '\0';
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
for (int32 i = 0; i < STREAMED_SOUND_MISSION_MOBR1; i++)
|
|
||||||
{
|
|
||||||
strcpy(filepath, m_MP3FilesPath);
|
|
||||||
strcat(filepath, StreamedNameTable[i]);
|
|
||||||
|
|
||||||
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
|
||||||
|
|
||||||
if (mp3Stream[0])
|
|
||||||
{
|
|
||||||
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
|
||||||
|
|
||||||
AIL_close_stream(mp3Stream[0]);
|
|
||||||
mp3Stream[0] = NULL;
|
|
||||||
|
|
||||||
bFileNotFound = false;
|
|
||||||
#ifdef AUDIO_CACHE
|
|
||||||
if (!CreateCache)
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
{
|
||||||
nStreamLength[i] = tatalms;
|
m_bInitialised = false;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
bFileNotFound = true;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_CDCHECK
|
} while ( ++drive <= 'Z' );
|
||||||
if (!bFileNotFound) // otherwise try next drive
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
while (++drive <= 'Z');
|
|
||||||
#else
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( !bFileNotFound ) {
|
|
||||||
|
|
||||||
#ifdef AUDIO_CACHE
|
|
||||||
if ( CreateCache )
|
|
||||||
#endif
|
|
||||||
for ( int32 i = STREAMED_SOUND_MISSION_COMPLETED4; i < STREAMED_SOUND_MISSION_PAGER; i++ )
|
|
||||||
{
|
|
||||||
strcpy(filepath, m_MiscomPath);
|
|
||||||
strcat(filepath, StreamedNameTable[i]);
|
|
||||||
|
|
||||||
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
|
||||||
|
|
||||||
if ( mp3Stream[0] )
|
|
||||||
{
|
|
||||||
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
|
||||||
|
|
||||||
AIL_close_stream(mp3Stream[0]);
|
|
||||||
mp3Stream[0] = NULL;
|
|
||||||
|
|
||||||
nStreamLength[i] = tatalms;
|
|
||||||
bFileNotFound = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bFileNotFound = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_bInitialised = !bFileNotFound;
|
|
||||||
|
|
||||||
if ( !m_bInitialised )
|
if ( !m_bInitialised )
|
||||||
{
|
{
|
||||||
#if !defined(GTA3_STEAM_PATCH) && !defined(NO_CDCHECK)
|
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
||||||
FrontEndMenuManager.WaitForUserCD();
|
FrontEndMenuManager.WaitForUserCD();
|
||||||
if ( FrontEndMenuManager.m_bQuitGameNoCD )
|
if ( FrontEndMenuManager.m_bQuitGameNoCD )
|
||||||
{
|
{
|
||||||
@@ -1190,30 +1059,76 @@ cSampleManager::Initialise(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef AUDIO_CACHE
|
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
|
||||||
if (CreateCache) {
|
// hddaudio
|
||||||
cacheFile = fcaseopen("audio\\sound.cache", "wb");
|
/**
|
||||||
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
Option for user to play audio files directly from hard disk.
|
||||||
fclose(cacheFile);
|
Copy the contents of the PLAY discs Audio directory into your installed Grand Theft Auto III Audio directory.
|
||||||
|
Grand Theft Auto III still requires the presence of the PLAY disc when started.
|
||||||
|
This may give better performance on some machines (though worse on others).
|
||||||
|
**/
|
||||||
|
TRACE("hddaudio 1.1 patch");
|
||||||
|
{
|
||||||
|
int32 streamLength[TOTAL_STREAMED_SOUNDS];
|
||||||
|
|
||||||
|
bool bFileNotFound = false;
|
||||||
|
char rootpath[MAX_PATH];
|
||||||
|
|
||||||
|
strcpy(_aHDDPath, m_szCDRomRootPath);
|
||||||
|
rootpath[0] = '\0';
|
||||||
|
|
||||||
|
FILE *f = fopen(StreamedNameTable[0], "rb");
|
||||||
|
|
||||||
|
if ( f )
|
||||||
|
{
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
|
{
|
||||||
|
strcpy(filepath, rootpath);
|
||||||
|
strcat(filepath, StreamedNameTable[i]);
|
||||||
|
|
||||||
|
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
|
||||||
|
|
||||||
|
if ( mp3Stream[0] )
|
||||||
|
{
|
||||||
|
AIL_stream_ms_position(mp3Stream[0], &tatalms, NULL);
|
||||||
|
|
||||||
|
AIL_close_stream(mp3Stream[0]);
|
||||||
|
mp3Stream[0] = NULL;
|
||||||
|
|
||||||
|
streamLength[i] = tatalms;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bFileNotFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
bFileNotFound = true;
|
||||||
|
|
||||||
|
if ( !bFileNotFound )
|
||||||
|
{
|
||||||
|
strcpy(m_szCDRomRootPath, rootpath);
|
||||||
|
|
||||||
|
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
||||||
|
nStreamLength[i] = streamLength[i];
|
||||||
|
|
||||||
|
_bUseHDDAudio = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_bUseHDDAudio = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef AUDIO_CACHE
|
||||||
if ( !InitialiseSampleBanks() )
|
cacheFile = fopen("audio\\sound.cache", "wb");
|
||||||
{
|
fwrite(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
|
||||||
Terminate();
|
fclose(cacheFile);
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
|
|
||||||
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
|
|
||||||
{
|
|
||||||
Terminate();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
|
|
||||||
|
|
||||||
LoadSampleBank(SFX_BANK_0);
|
|
||||||
|
|
||||||
TRACE("stream");
|
TRACE("stream");
|
||||||
{
|
{
|
||||||
@@ -1243,7 +1158,7 @@ cSampleManager::Initialise(void)
|
|||||||
|
|
||||||
while ( n < m_nNumberOfProviders )
|
while ( n < m_nNumberOfProviders )
|
||||||
{
|
{
|
||||||
if ( !strcmp(strupr(providers[n].name), "DIRECTSOUND3D SOFTWARE EMULATION") )
|
if ( !strcmp(providers[n].name, "Miles Fast 2D Positional Audio") )
|
||||||
{
|
{
|
||||||
set_new_provider(n);
|
set_new_provider(n);
|
||||||
break;
|
break;
|
||||||
@@ -1258,6 +1173,10 @@ cSampleManager::Initialise(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACE("bank");
|
||||||
|
|
||||||
|
LoadSampleBank(SFX_BANK_0);
|
||||||
|
|
||||||
// mp3
|
// mp3
|
||||||
TRACE("mp3");
|
TRACE("mp3");
|
||||||
{
|
{
|
||||||
@@ -1377,42 +1296,60 @@ cSampleManager::Terminate(void)
|
|||||||
bool
|
bool
|
||||||
cSampleManager::CheckForAnAudioFileOnCD(void)
|
cSampleManager::CheckForAnAudioFileOnCD(void)
|
||||||
{
|
{
|
||||||
#if !defined(NO_CDCHECK) // TODO: check steam, probably GTAVC_STEAM_PATCH needs to be added
|
#if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
||||||
char filepath[MAX_PATH];
|
char filepath[MAX_PATH];
|
||||||
|
|
||||||
strcpy(filepath, m_MiscomPath);
|
#if GTA_VERSION >= GTA3_PC_11
|
||||||
strcat(filepath, StreamedNameTable[STREAMED_SOUND_MISSION_COMPLETED4]);
|
if (_bUseHDDAudio)
|
||||||
|
strcpy(filepath, _aHDDPath);
|
||||||
|
else
|
||||||
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
|
#else
|
||||||
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
|
#endif // #if GTA_VERSION >= GTA3_PC_11
|
||||||
|
|
||||||
|
strcat(filepath, StreamedNameTable[AudioManager.GetRandomNumber(1) % TOTAL_STREAMED_SOUNDS]);
|
||||||
|
|
||||||
FILE *f = fopen(filepath, "rb");
|
FILE *f = fopen(filepath, "rb");
|
||||||
|
|
||||||
if ( f )
|
if ( f )
|
||||||
{
|
{
|
||||||
fclose(f);
|
fclose(f);
|
||||||
DMAudio.SetMusicMasterVolume(FrontEndMenuManager.m_PrefsMusicVolume);
|
|
||||||
DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume);
|
|
||||||
DMAudio.Service();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DMAudio.SetMusicMasterVolume(0);
|
|
||||||
DMAudio.SetEffectsMasterVolume(0);
|
|
||||||
DMAudio.Service();
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
#endif // #if !defined(NO_CDCHECK)
|
#endif // #if GTA_VERSION < GTA3_PC_STEAM && !defined(NO_CDCHECK)
|
||||||
}
|
}
|
||||||
|
|
||||||
char
|
char
|
||||||
cSampleManager::GetCDAudioDriveLetter(void)
|
cSampleManager::GetCDAudioDriveLetter(void)
|
||||||
{
|
{
|
||||||
if ( strlen(m_MiscomPath) != 0 )
|
#if GTA_VERSION >= GTA3_PC_11 || defined(NO_CDCHECK)
|
||||||
return m_MiscomPath[0];
|
if (_bUseHDDAudio)
|
||||||
|
{
|
||||||
|
if ( strlen(_aHDDPath) != 0 )
|
||||||
|
return _aHDDPath[0];
|
||||||
|
else
|
||||||
|
return '\0';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( strlen(m_szCDRomRootPath) != 0 )
|
||||||
|
return m_szCDRomRootPath[0];
|
||||||
|
else
|
||||||
|
return '\0';
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if ( strlen(m_szCDRomRootPath) != 0 )
|
||||||
|
return m_szCDRomRootPath[0];
|
||||||
else
|
else
|
||||||
return '\0';
|
return '\0';
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1464,12 +1401,6 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
|||||||
m_nMusicVolume = nVolume;
|
m_nMusicVolume = nVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cSampleManager::SetMP3BoostVolume(uint8 nVolume)
|
|
||||||
{
|
|
||||||
m_nMP3BoostVolume = nVolume;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
||||||
{
|
{
|
||||||
@@ -1580,6 +1511,14 @@ cSampleManager::LoadPedComment(uint32 nComment)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case MUSICMODE_FRONTEND:
|
||||||
|
{
|
||||||
|
if ( MusicManager.GetNextTrack() == STREAMED_SOUND_GAME_COMPLETED )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1642,45 +1581,69 @@ cSampleManager::UpdateReverb(void)
|
|||||||
|
|
||||||
if ( AudioManager.GetFrameCounter() & 15 )
|
if ( AudioManager.GetFrameCounter() & 15 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
float fRatio = 0.0f;
|
float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
|
||||||
|
float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
|
||||||
#define MIN_DIST 0.5f
|
float z = AudioManager.GetReflectionsDistance(REFLECTION_UP);
|
||||||
#define CALCULATE_RATIO(value, maxDist, maxRatio) (value > MIN_DIST && value < maxDist ? value / maxDist * maxRatio : 0)
|
|
||||||
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_NORTH), 10.0f, 1/2.f);
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_SOUTH), 10.0f, 1/2.f);
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_WEST), 10.0f, 1/2.f);
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_EAST), 10.0f, 1/2.f);
|
|
||||||
|
|
||||||
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_NORTH) + AudioManager.GetReflectionsDistance(REFLECTION_SOUTH)) / 2.f, 4.0f, 1/3.f);
|
|
||||||
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_WEST) + AudioManager.GetReflectionsDistance(REFLECTION_EAST)) / 2.f, 4.0f, 1/3.f);
|
|
||||||
|
|
||||||
#undef CALCULATE_RATIO
|
|
||||||
#undef MIN_DIST
|
|
||||||
|
|
||||||
fRatio = clamp(fRatio, 0.0f, 0.6f);
|
float normy = norm(y, 5.0f, 40.0f);
|
||||||
|
float normx = norm(x, 5.0f, 40.0f);
|
||||||
|
float normz = norm(z, 5.0f, 40.0f);
|
||||||
|
|
||||||
|
float fRatio;
|
||||||
|
|
||||||
|
if ( normy == 0.0f )
|
||||||
|
{
|
||||||
|
if ( normx == 0.0f )
|
||||||
|
{
|
||||||
|
if ( normz == 0.0f )
|
||||||
|
fRatio = 0.3f;
|
||||||
|
else
|
||||||
|
fRatio = 0.5f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fRatio = 0.3f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( normx == 0.0f )
|
||||||
|
{
|
||||||
|
if ( normz == 0.0f )
|
||||||
|
fRatio = 0.3f;
|
||||||
|
else
|
||||||
|
fRatio = 0.5f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( normz == 0.0f )
|
||||||
|
fRatio = 0.3f;
|
||||||
|
else
|
||||||
|
fRatio = (normy+normx+normz) / 3.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
|
||||||
|
|
||||||
if ( fRatio == _fPrevEaxRatioDestination )
|
if ( fRatio == _fPrevEaxRatioDestination )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( usingEAX3 )
|
if ( usingEAX3 )
|
||||||
{
|
{
|
||||||
fRatio = Min(fRatio * 1.67f, 1.0f);
|
|
||||||
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
||||||
{
|
{
|
||||||
AIL_set_3D_provider_preference(opened_provider, "EAX all parameters", &EAX3Params);
|
AIL_set_3D_provider_preference(opened_provider, "EAX all parameters", &EAX3Params);
|
||||||
_fEffectsLevel = fRatio * 0.75f;
|
_fEffectsLevel = 1.0f - fRatio * 0.5f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( _usingMilesFast2D )
|
if ( _usingMilesFast2D )
|
||||||
_fEffectsLevel = fRatio * 0.8f;
|
_fEffectsLevel = (1.0f - fRatio) * 0.4f;
|
||||||
else
|
else
|
||||||
_fEffectsLevel = fRatio * 0.22f;
|
_fEffectsLevel = (1.0f - fRatio) * 0.7f;
|
||||||
}
|
}
|
||||||
_fEffectsLevel = Min(_fEffectsLevel, 1.0f);
|
|
||||||
|
|
||||||
_fPrevEaxRatioDestination = fRatio;
|
_fPrevEaxRatioDestination = fRatio;
|
||||||
|
|
||||||
@@ -1789,11 +1752,11 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
nChannelVolume[nChannel] = vol;
|
nChannelVolume[nChannel] = vol;
|
||||||
|
|
||||||
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
||||||
if (MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE ) {
|
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
||||||
if (MusicManager.GetCurrentTrack() == STREAMED_SOUND_CUTSCENE_FINALE)
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
|
||||||
nChannelVolume[nChannel] = 0;
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
||||||
else
|
{
|
||||||
nChannelVolume[nChannel] >>= 2;
|
nChannelVolume[nChannel] >>= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( opened_samples[nChannel] )
|
if ( opened_samples[nChannel] )
|
||||||
@@ -1829,7 +1792,8 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
|
|
||||||
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
||||||
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
||||||
&& MusicManager.GetCurrentTrack() != STREAMED_SOUND_CUTSCENE_FINALE )
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
|
||||||
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
||||||
{
|
{
|
||||||
nChannelVolume[nChannel] >>= 2;
|
nChannelVolume[nChannel] >>= 2;
|
||||||
}
|
}
|
||||||
@@ -2029,7 +1993,7 @@ cSampleManager::StopChannel(uint32 nChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
||||||
{
|
{
|
||||||
if ( m_bInitialised )
|
if ( m_bInitialised )
|
||||||
{
|
{
|
||||||
@@ -2043,7 +2007,7 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
|||||||
|
|
||||||
char filepath[MAX_PATH];
|
char filepath[MAX_PATH];
|
||||||
|
|
||||||
strcpy(filepath, nFile < STREAMED_SOUND_MISSION_COMPLETED4 ? m_MP3FilesPath : (nFile < STREAMED_SOUND_MISSION_MOBR1 ? m_MiscomPath : m_WavFilesPath));
|
strcpy(filepath, m_szCDRomRootPath);
|
||||||
strcat(filepath, StreamedNameTable[nFile]);
|
strcat(filepath, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
|
mp3Stream[nStream] = AIL_open_stream(DIG, filepath, 0);
|
||||||
@@ -2080,7 +2044,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
||||||
{
|
{
|
||||||
uint32 position = nPos;
|
uint32 position = nPos;
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
@@ -2109,15 +2073,14 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
|||||||
if(mp3 == NULL) {
|
if(mp3 == NULL) {
|
||||||
_bIsMp3Active = false;
|
_bIsMp3Active = false;
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
strcpy(filename, m_MiscomPath);
|
strcpy(filename, m_szCDRomRootPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] =
|
mp3Stream[nStream] =
|
||||||
AIL_open_stream(DIG, filename, 0);
|
AIL_open_stream(DIG, filename, 0);
|
||||||
if(mp3Stream[nStream]) {
|
if(mp3Stream[nStream]) {
|
||||||
AIL_set_stream_loop_count(
|
AIL_set_stream_loop_count(
|
||||||
mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
|
mp3Stream[nStream], 1);
|
||||||
nStreamLoopedFlag[nStream] = true;
|
|
||||||
AIL_set_stream_ms_position(
|
AIL_set_stream_ms_position(
|
||||||
mp3Stream[nStream], position);
|
mp3Stream[nStream], position);
|
||||||
AIL_pause_stream(mp3Stream[nStream],
|
AIL_pause_stream(mp3Stream[nStream],
|
||||||
@@ -2159,14 +2122,15 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
|||||||
if ( e == NULL )
|
if ( e == NULL )
|
||||||
{
|
{
|
||||||
nFile = 0;
|
nFile = 0;
|
||||||
strcpy(filename, m_MiscomPath);
|
strcpy(filename, m_szCDRomRootPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
mp3Stream[nStream] =
|
mp3Stream[nStream] =
|
||||||
AIL_open_stream(DIG, filename, 0);
|
AIL_open_stream(DIG, filename, 0);
|
||||||
if(mp3Stream[nStream]) {
|
if(mp3Stream[nStream]) {
|
||||||
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
|
AIL_set_stream_loop_count(
|
||||||
nStreamLoopedFlag[nStream] = true;
|
mp3Stream[nStream], 1);
|
||||||
AIL_set_stream_ms_position(mp3Stream[nStream], position);
|
AIL_set_stream_ms_position(
|
||||||
|
mp3Stream[nStream], position);
|
||||||
AIL_pause_stream(mp3Stream[nStream], 0);
|
AIL_pause_stream(mp3Stream[nStream], 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -2204,14 +2168,13 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
|||||||
nFile = 0;
|
nFile = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(filename, m_MiscomPath);
|
strcpy(filename, m_szCDRomRootPath);
|
||||||
strcat(filename, StreamedNameTable[nFile]);
|
strcat(filename, StreamedNameTable[nFile]);
|
||||||
|
|
||||||
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
|
mp3Stream[nStream] = AIL_open_stream(DIG, filename, 0);
|
||||||
if ( mp3Stream[nStream] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
|
AIL_set_stream_loop_count(mp3Stream[nStream], 1);
|
||||||
nStreamLoopedFlag[nStream] = true;
|
|
||||||
AIL_set_stream_ms_position(mp3Stream[nStream], position);
|
AIL_set_stream_ms_position(mp3Stream[nStream], position);
|
||||||
AIL_pause_stream(mp3Stream[nStream], 0);
|
AIL_pause_stream(mp3Stream[nStream], 0);
|
||||||
return true;
|
return true;
|
||||||
@@ -2275,14 +2238,11 @@ void
|
|||||||
cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
|
cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
|
||||||
{
|
{
|
||||||
uint8 vol = nVolume;
|
uint8 vol = nVolume;
|
||||||
float boostMult = 0.0f;
|
|
||||||
|
|
||||||
if ( m_bInitialised )
|
if ( m_bInitialised )
|
||||||
{
|
{
|
||||||
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
|
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
|
||||||
|
if ( vol > MAX_VOLUME ) vol = MAX_VOLUME;
|
||||||
if ( MusicManager.GetRadioInCar() == USERTRACK && !MusicManager.CheckForMusicInterruptions() )
|
|
||||||
boostMult = m_nMP3BoostVolume / 64.f;
|
|
||||||
|
|
||||||
nStreamVolume[nStream] = vol;
|
nStreamVolume[nStream] = vol;
|
||||||
nStreamPan[nStream] = nPan;
|
nStreamPan[nStream] = nPan;
|
||||||
@@ -2290,14 +2250,9 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect
|
|||||||
if ( mp3Stream[nStream] )
|
if ( mp3Stream[nStream] )
|
||||||
{
|
{
|
||||||
if ( nEffectFlag )
|
if ( nEffectFlag )
|
||||||
{
|
AIL_set_stream_volume(mp3Stream[nStream], m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
||||||
if ( nStream == 1 || nStream == 2 )
|
|
||||||
AIL_set_stream_volume(mp3Stream[nStream], 128*vol*m_nEffectsVolume >> 14);
|
|
||||||
else
|
|
||||||
AIL_set_stream_volume(mp3Stream[nStream], m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
AIL_set_stream_volume(mp3Stream[nStream], (m_nMusicFadeVolume*vol*(uint32)(m_nMusicVolume * boostMult + m_nMusicVolume)) >> 14);
|
AIL_set_stream_volume(mp3Stream[nStream], m_nMusicFadeVolume*vol*m_nMusicVolume >> 14);
|
||||||
|
|
||||||
AIL_set_stream_pan(mp3Stream[nStream], nPan);
|
AIL_set_stream_pan(mp3Stream[nStream], nPan);
|
||||||
}
|
}
|
||||||
@@ -2375,12 +2330,4 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
|
|
||||||
{
|
|
||||||
if (m_bInitialised)
|
|
||||||
nStreamLoopedFlag[nChannel] = nLoopFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -113,11 +113,6 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
||||||
{
|
{
|
||||||
@@ -302,7 +297,7 @@ cSampleManager::StopChannel(uint32 nChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
||||||
{
|
{
|
||||||
ASSERT( nStream < MAX_STREAMS );
|
ASSERT( nStream < MAX_STREAMS );
|
||||||
}
|
}
|
||||||
@@ -320,7 +315,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
||||||
{
|
{
|
||||||
ASSERT( nStream < MAX_STREAMS );
|
ASSERT( nStream < MAX_STREAMS );
|
||||||
|
|
||||||
@@ -370,14 +365,4 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int8 cSampleManager::AutoDetect3DProviders()
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ char _mp3DirectoryPath[MAX_PATH];
|
|||||||
CStream *aStream[MAX_STREAMS];
|
CStream *aStream[MAX_STREAMS];
|
||||||
uint8 nStreamPan [MAX_STREAMS];
|
uint8 nStreamPan [MAX_STREAMS];
|
||||||
uint8 nStreamVolume[MAX_STREAMS];
|
uint8 nStreamVolume[MAX_STREAMS];
|
||||||
uint8 nStreamLoopedFlag[MAX_STREAMS];
|
|
||||||
uint32 _CurMP3Index;
|
uint32 _CurMP3Index;
|
||||||
int32 _CurMP3Pos;
|
int32 _CurMP3Pos;
|
||||||
bool _bIsMp3Active;
|
bool _bIsMp3Active;
|
||||||
@@ -322,7 +321,7 @@ set_new_provider(int index)
|
|||||||
alGenSources(MAX_STREAMS*2, ALStreamSources[0]);
|
alGenSources(MAX_STREAMS*2, ALStreamSources[0]);
|
||||||
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
for ( int32 i = 0; i < MAX_STREAMS; i++ )
|
||||||
{
|
{
|
||||||
alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
|
alGenBuffers(NUM_STREAMBUFFERS, ALStreamBuffers[i]);
|
||||||
alSourcei(ALStreamSources[i][0], AL_SOURCE_RELATIVE, AL_TRUE);
|
alSourcei(ALStreamSources[i][0], AL_SOURCE_RELATIVE, AL_TRUE);
|
||||||
alSource3f(ALStreamSources[i][0], AL_POSITION, 0.0f, 0.0f, 0.0f);
|
alSource3f(ALStreamSources[i][0], AL_POSITION, 0.0f, 0.0f, 0.0f);
|
||||||
alSourcef(ALStreamSources[i][0], AL_GAIN, 1.0f);
|
alSourcef(ALStreamSources[i][0], AL_GAIN, 1.0f);
|
||||||
@@ -392,7 +391,7 @@ set_new_provider(int index)
|
|||||||
static bool
|
static bool
|
||||||
IsThisTrackAt16KHz(uint32 track)
|
IsThisTrackAt16KHz(uint32 track)
|
||||||
{
|
{
|
||||||
return track == STREAMED_SOUND_RADIO_KCHAT || track == STREAMED_SOUND_RADIO_VCPR || track == STREAMED_SOUND_RADIO_POLICE;
|
return track == STREAMED_SOUND_RADIO_CHAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
cSampleManager::cSampleManager(void)
|
cSampleManager::cSampleManager(void)
|
||||||
@@ -457,31 +456,6 @@ int8 cSampleManager::SetCurrent3DProvider(uint8 nProvider)
|
|||||||
return curprovider;
|
return curprovider;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8
|
|
||||||
cSampleManager::AutoDetect3DProviders()
|
|
||||||
{
|
|
||||||
if (!AudioManager.IsAudioInitialised())
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (defaultProvider >= 0 && defaultProvider < m_nNumberOfProviders) {
|
|
||||||
if (set_new_provider(defaultProvider))
|
|
||||||
return defaultProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint32 i = 0; i < GetNum3DProvidersAvailable(); i++)
|
|
||||||
{
|
|
||||||
char* providername = Get3DProviderName(i);
|
|
||||||
|
|
||||||
if (!strcasecmp(providername, "OPENAL SOFT")) {
|
|
||||||
SetCurrent3DProvider(i);
|
|
||||||
if (GetCurrent3DProviderIndex() == i)
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_ResolveLink(char const *path, char *out)
|
_ResolveLink(char const *path, char *out)
|
||||||
{
|
{
|
||||||
@@ -1000,19 +974,16 @@ cSampleManager::Initialise(void)
|
|||||||
debug("Cannot load audio cache\n");
|
debug("Cannot load audio cache\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for ( int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++ )
|
for(int32 i = 0; i < TOTAL_STREAMED_SOUNDS; i++) {
|
||||||
{
|
|
||||||
aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000);
|
aStream[0] = new CStream(StreamedNameTable[i], ALStreamSources[0], ALStreamBuffers[0], IsThisTrackAt16KHz(i) ? 16000 : 32000);
|
||||||
|
|
||||||
if ( aStream[0] && aStream[0]->IsOpened() )
|
if(aStream[0] && aStream[0]->IsOpened()) {
|
||||||
{
|
|
||||||
uint32 tatalms = aStream[0]->GetLengthMS();
|
uint32 tatalms = aStream[0]->GetLengthMS();
|
||||||
delete aStream[0];
|
delete aStream[0];
|
||||||
aStream[0] = NULL;
|
aStream[0] = NULL;
|
||||||
|
|
||||||
nStreamLength[i] = tatalms;
|
nStreamLength[i] = tatalms;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
USERERROR("Can't open '%s'\n", StreamedNameTable[i]);
|
USERERROR("Can't open '%s'\n", StreamedNameTable[i]);
|
||||||
}
|
}
|
||||||
#ifdef AUDIO_CACHE
|
#ifdef AUDIO_CACHE
|
||||||
@@ -1208,12 +1179,6 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume)
|
|||||||
m_nMusicVolume = nVolume;
|
m_nMusicVolume = nVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cSampleManager::SetMP3BoostVolume(uint8 nVolume)
|
|
||||||
{
|
|
||||||
m_nMP3BoostVolume = nVolume;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
cSampleManager::SetEffectsFadeVolume(uint8 nVolume)
|
||||||
{
|
{
|
||||||
@@ -1350,6 +1315,14 @@ cSampleManager::LoadPedComment(uint32 nComment)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case MUSICMODE_FRONTEND:
|
||||||
|
{
|
||||||
|
if ( MusicManager.GetNextTrack() == STREAMED_SOUND_GAME_COMPLETED )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1358,7 +1331,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
|
|||||||
int samplesSize = m_aSamples[nComment].nSize / 2;
|
int samplesSize = m_aSamples[nComment].nSize / 2;
|
||||||
op_pcm_seek(fpSampleDataHandle, m_aSamples[nComment].nOffset / 2);
|
op_pcm_seek(fpSampleDataHandle, m_aSamples[nComment].nOffset / 2);
|
||||||
while (samplesSize > 0) {
|
while (samplesSize > 0) {
|
||||||
int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SAMPLEBANK_PED] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead),
|
int size = op_read(fpSampleDataHandle, (opus_int16 *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE * nCurrentPedSlot + samplesRead),
|
||||||
samplesSize, NULL);
|
samplesSize, NULL);
|
||||||
if (size <= 0) {
|
if (size <= 0) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1429,24 +1402,24 @@ bool cSampleManager::UpdateReverb(void)
|
|||||||
|
|
||||||
if ( AudioManager.GetFrameCounter() & 15 )
|
if ( AudioManager.GetFrameCounter() & 15 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
float fRatio = 0.0f;
|
float y = AudioManager.GetReflectionsDistance(REFLECTION_TOP) + AudioManager.GetReflectionsDistance(REFLECTION_BOTTOM);
|
||||||
|
float x = AudioManager.GetReflectionsDistance(REFLECTION_LEFT) + AudioManager.GetReflectionsDistance(REFLECTION_RIGHT);
|
||||||
#define MIN_DIST 0.5f
|
float z = AudioManager.GetReflectionsDistance(REFLECTION_UP);
|
||||||
#define CALCULATE_RATIO(value, maxDist, maxRatio) (value > MIN_DIST && value < maxDist ? value / maxDist * maxRatio : 0)
|
|
||||||
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_NORTH), 10.0f, 1/2.f);
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_SOUTH), 10.0f, 1/2.f);
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_WEST), 10.0f, 1/2.f);
|
|
||||||
fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_EAST), 10.0f, 1/2.f);
|
|
||||||
|
|
||||||
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_NORTH) + AudioManager.GetReflectionsDistance(REFLECTION_SOUTH)) / 2.f, 4.0f, 1/3.f);
|
|
||||||
fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_WEST) + AudioManager.GetReflectionsDistance(REFLECTION_EAST)) / 2.f, 4.0f, 1/3.f);
|
|
||||||
|
|
||||||
#undef CALCULATE_RATIO
|
|
||||||
#undef MIN_DIST
|
|
||||||
|
|
||||||
fRatio = clamp(fRatio, 0.0f, 0.6f);
|
float normy = norm(y, 5.0f, 40.0f);
|
||||||
|
float normx = norm(x, 5.0f, 40.0f);
|
||||||
|
float normz = norm(z, 5.0f, 40.0f);
|
||||||
|
|
||||||
|
#define ZR(v, a, b) (((v)==0)?(a):(b))
|
||||||
|
#define CALCRATIO(x,y,z,min,max,val) (ZR(y, ZR(x, ZR(z, min, max), min), ZR(x, ZR(z, min, max), ZR(z, min, val))))
|
||||||
|
|
||||||
|
float fRatio = CALCRATIO(normx, normy, normz, 0.3f, 0.5f, (normy+normx+normz)/3.0f);
|
||||||
|
|
||||||
|
#undef CALCRATIO
|
||||||
|
#undef ZE
|
||||||
|
|
||||||
|
fRatio = clamp(fRatio, usingEAX3==1 ? 0.0f : 0.30f, 1.0f);
|
||||||
|
|
||||||
if ( fRatio == _fPrevEaxRatioDestination )
|
if ( fRatio == _fPrevEaxRatioDestination )
|
||||||
return false;
|
return false;
|
||||||
@@ -1457,7 +1430,6 @@ bool cSampleManager::UpdateReverb(void)
|
|||||||
if ( usingEAX3 )
|
if ( usingEAX3 )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
fRatio = Min(fRatio * 1.67f, 1.0f);
|
|
||||||
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
if ( EAX3ListenerInterpolate(&StartEAX3, &FinishEAX3, fRatio, &EAX3Params, false) )
|
||||||
{
|
{
|
||||||
EAX_SetAll(&EAX3Params);
|
EAX_SetAll(&EAX3Params);
|
||||||
@@ -1472,17 +1444,16 @@ bool cSampleManager::UpdateReverb(void)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_fEffectsLevel = fRatio * 0.75f;
|
_fEffectsLevel = 1.0f - fRatio * 0.5f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( _usingEFX )
|
if ( _usingEFX )
|
||||||
_fEffectsLevel = fRatio * 0.8f;
|
_fEffectsLevel = (1.0f - fRatio) * 0.4f;
|
||||||
else
|
else
|
||||||
_fEffectsLevel = fRatio * 0.22f;
|
_fEffectsLevel = (1.0f - fRatio) * 0.7f;
|
||||||
}
|
}
|
||||||
_fEffectsLevel = Min(_fEffectsLevel, 1.0f);
|
|
||||||
|
|
||||||
_fPrevEaxRatioDestination = fRatio;
|
_fPrevEaxRatioDestination = fRatio;
|
||||||
|
|
||||||
@@ -1560,11 +1531,12 @@ cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
|
|
||||||
nChannelVolume[nChannel] = vol;
|
nChannelVolume[nChannel] = vol;
|
||||||
|
|
||||||
if (MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE ) {
|
// reduce channel volume when JB.MP3 or S4_BDBD.MP3 playing
|
||||||
if (MusicManager.GetCurrentTrack() == STREAMED_SOUND_CUTSCENE_FINALE)
|
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
||||||
nChannelVolume[nChannel] = 0;
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
|
||||||
else
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
||||||
nChannelVolume[nChannel] >>= 2;
|
{
|
||||||
|
nChannelVolume[nChannel] = vol / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no idea, does this one looks like a bug or it's SetChannelVolume ?
|
// no idea, does this one looks like a bug or it's SetChannelVolume ?
|
||||||
@@ -1601,14 +1573,14 @@ cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume)
|
|||||||
|
|
||||||
nChannelVolume[nChannel] = vol;
|
nChannelVolume[nChannel] = vol;
|
||||||
|
|
||||||
// increase the volume for JB.MP3 and S4_BDBD.MP3
|
// reduce the volume for JB.MP3 and S4_BDBD.MP3
|
||||||
if (MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE ) {
|
if ( MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
|
||||||
if (MusicManager.GetCurrentTrack() == STREAMED_SOUND_CUTSCENE_FINALE)
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_NEWS_INTRO
|
||||||
nChannelVolume[nChannel] = 0;
|
&& MusicManager.GetNextTrack() != STREAMED_SOUND_CUTSCENE_SAL4_BDBD )
|
||||||
else
|
{
|
||||||
nChannelVolume[nChannel] >>= 2;
|
nChannelVolume[nChannel] = vol / 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
aChannel[nChannel].SetVolume(m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
aChannel[nChannel].SetVolume(m_nEffectsFadeVolume*vol*m_nEffectsVolume >> 14);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1674,7 +1646,7 @@ cSampleManager::StopChannel(uint32 nChannel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
|
cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream)
|
||||||
{
|
{
|
||||||
char filename[MAX_PATH];
|
char filename[MAX_PATH];
|
||||||
|
|
||||||
@@ -1732,7 +1704,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream)
|
||||||
{
|
{
|
||||||
uint32 position = nPos;
|
uint32 position = nPos;
|
||||||
char filename[256];
|
char filename[256];
|
||||||
@@ -1771,8 +1743,6 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
|||||||
aStream[nStream] = stream;
|
aStream[nStream] = stream;
|
||||||
|
|
||||||
if (stream->Setup()) {
|
if (stream->Setup()) {
|
||||||
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
|
|
||||||
nStreamLoopedFlag[nStream] = true;
|
|
||||||
if (position != 0)
|
if (position != 0)
|
||||||
stream->SetPosMS(position);
|
stream->SetPosMS(position);
|
||||||
|
|
||||||
@@ -1825,8 +1795,6 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
|||||||
aStream[nStream] = stream;
|
aStream[nStream] = stream;
|
||||||
|
|
||||||
if (stream->Setup()) {
|
if (stream->Setup()) {
|
||||||
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
|
|
||||||
nStreamLoopedFlag[nStream] = true;
|
|
||||||
if (position != 0)
|
if (position != 0)
|
||||||
stream->SetPosMS(position);
|
stream->SetPosMS(position);
|
||||||
|
|
||||||
@@ -1880,8 +1848,6 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
|
|||||||
aStream[nStream] = stream;
|
aStream[nStream] = stream;
|
||||||
|
|
||||||
if ( stream->Setup() ) {
|
if ( stream->Setup() ) {
|
||||||
stream->SetLoopCount(nStreamLoopedFlag[nStream] ? 0 : 1);
|
|
||||||
nStreamLoopedFlag[nStream] = true;
|
|
||||||
if (position != 0)
|
if (position != 0)
|
||||||
stream->SetPosMS(position);
|
stream->SetPosMS(position);
|
||||||
|
|
||||||
@@ -1948,16 +1914,11 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect
|
|||||||
{
|
{
|
||||||
ASSERT( nStream < MAX_STREAMS );
|
ASSERT( nStream < MAX_STREAMS );
|
||||||
|
|
||||||
float boostMult = 0.0f;
|
|
||||||
|
|
||||||
if ( nVolume > MAX_VOLUME )
|
if ( nVolume > MAX_VOLUME )
|
||||||
nVolume = MAX_VOLUME;
|
nVolume = MAX_VOLUME;
|
||||||
|
|
||||||
if ( nPan > MAX_VOLUME )
|
if ( nPan > MAX_VOLUME )
|
||||||
nPan = MAX_VOLUME;
|
nPan = MAX_VOLUME;
|
||||||
|
|
||||||
if ( MusicManager.GetRadioInCar() == USERTRACK && !MusicManager.CheckForMusicInterruptions() )
|
|
||||||
boostMult = m_nMP3BoostVolume / 64.f;
|
|
||||||
|
|
||||||
nStreamVolume[nStream] = nVolume;
|
nStreamVolume[nStream] = nVolume;
|
||||||
nStreamPan [nStream] = nPan;
|
nStreamPan [nStream] = nPan;
|
||||||
@@ -1966,14 +1927,10 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect
|
|||||||
|
|
||||||
if ( stream )
|
if ( stream )
|
||||||
{
|
{
|
||||||
if ( nEffectFlag ) {
|
if ( nEffectFlag )
|
||||||
if ( nStream == 1 || nStream == 2 )
|
stream->SetVolume(m_nEffectsFadeVolume*nVolume*m_nEffectsVolume >> 14);
|
||||||
stream->SetVolume(128*nVolume*m_nEffectsVolume >> 14);
|
|
||||||
else
|
|
||||||
stream->SetVolume(m_nEffectsFadeVolume*nVolume*m_nEffectsVolume >> 14);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
stream->SetVolume((m_nMusicFadeVolume*nVolume*(uint32)(m_nMusicVolume * boostMult + m_nMusicVolume)) >> 14);
|
stream->SetVolume(m_nMusicFadeVolume*nVolume*m_nMusicVolume >> 14);
|
||||||
|
|
||||||
stream->SetPan(nPan);
|
stream->SetPan(nPan);
|
||||||
}
|
}
|
||||||
@@ -2070,11 +2027,4 @@ cSampleManager::InitialiseSampleBanks(void)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
cSampleManager::SetStreamedFileLoopFlag(uint8 nLoopFlag, uint8 nChannel)
|
|
||||||
{
|
|
||||||
nStreamLoopedFlag[nChannel] = nLoopFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -16,10 +16,8 @@ enum eSound
|
|||||||
SOUND_CAR_DOOR_OPEN_BACK_RIGHT,
|
SOUND_CAR_DOOR_OPEN_BACK_RIGHT,
|
||||||
SOUND_CAR_WINDSHIELD_CRACK,
|
SOUND_CAR_WINDSHIELD_CRACK,
|
||||||
SOUND_CAR_JUMP,
|
SOUND_CAR_JUMP,
|
||||||
SOUND_CAR_JUMP_2,
|
SOUND_E,
|
||||||
SOUND_CAR_TYRE_POP,
|
SOUND_F,
|
||||||
SOUND_16,
|
|
||||||
SOUND_17,
|
|
||||||
SOUND_CAR_ENGINE_START,
|
SOUND_CAR_ENGINE_START,
|
||||||
SOUND_CAR_LIGHT_BREAK,
|
SOUND_CAR_LIGHT_BREAK,
|
||||||
SOUND_CAR_HYDRAULIC_1,
|
SOUND_CAR_HYDRAULIC_1,
|
||||||
@@ -33,33 +31,29 @@ enum eSound
|
|||||||
SOUND_CAR_TANK_TURRET_ROTATE,
|
SOUND_CAR_TANK_TURRET_ROTATE,
|
||||||
SOUND_CAR_BOMB_TICK,
|
SOUND_CAR_BOMB_TICK,
|
||||||
SOUND_PLANE_ON_GROUND,
|
SOUND_PLANE_ON_GROUND,
|
||||||
SOUND_HELI_BLADE,
|
|
||||||
SOUND_32,
|
|
||||||
SOUND_STEP_START,
|
SOUND_STEP_START,
|
||||||
SOUND_STEP_END,
|
SOUND_STEP_END,
|
||||||
SOUND_FALL_LAND,
|
SOUND_FALL_LAND,
|
||||||
SOUND_FALL_COLLAPSE,
|
SOUND_FALL_COLLAPSE,
|
||||||
SOUND_FIGHT_37,
|
SOUND_FIGHT_PUNCH_33,
|
||||||
SOUND_FIGHT_38,
|
SOUND_FIGHT_KICK_34,
|
||||||
SOUND_FIGHT_39,
|
SOUND_FIGHT_HEADBUTT_35,
|
||||||
SOUND_FIGHT_40,
|
SOUND_FIGHT_PUNCH_36,
|
||||||
SOUND_FIGHT_41,
|
SOUND_FIGHT_PUNCH_37,
|
||||||
SOUND_FIGHT_42,
|
SOUND_FIGHT_CLOSE_PUNCH_38,
|
||||||
SOUND_FIGHT_43,
|
SOUND_FIGHT_PUNCH_39,
|
||||||
SOUND_FIGHT_44,
|
SOUND_FIGHT_PUNCH_OR_KICK_BELOW_40,
|
||||||
SOUND_FIGHT_45,
|
SOUND_FIGHT_PUNCH_41,
|
||||||
SOUND_FIGHT_46,
|
SOUND_FIGHT_PUNCH_FROM_BEHIND_42,
|
||||||
SOUND_FIGHT_47,
|
SOUND_FIGHT_KNEE_OR_KICK_43,
|
||||||
SOUND_FIGHT_48,
|
SOUND_FIGHT_KICK_44,
|
||||||
SOUND_49,
|
SOUND_2D,
|
||||||
SOUND_WEAPON_BAT_ATTACK,
|
SOUND_WEAPON_BAT_ATTACK,
|
||||||
SOUND_WEAPON_KNIFE_ATTACK,
|
|
||||||
SOUND_WEAPON_CHAINSAW_ATTACK,
|
|
||||||
SOUND_WEAPON_CHAINSAW_IDLE,
|
|
||||||
SOUND_WEAPON_CHAINSAW_MADECONTACT,
|
|
||||||
SOUND_WEAPON_SHOT_FIRED,
|
SOUND_WEAPON_SHOT_FIRED,
|
||||||
SOUND_WEAPON_RELOAD,
|
SOUND_WEAPON_RELOAD,
|
||||||
SOUND_WEAPON_AK47_BULLET_ECHO,
|
SOUND_WEAPON_AK47_BULLET_ECHO,
|
||||||
|
SOUND_WEAPON_UZI_BULLET_ECHO,
|
||||||
|
SOUND_WEAPON_M16_BULLET_ECHO,
|
||||||
SOUND_WEAPON_FLAMETHROWER_FIRE,
|
SOUND_WEAPON_FLAMETHROWER_FIRE,
|
||||||
SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM,
|
SOUND_WEAPON_SNIPER_SHOT_NO_ZOOM,
|
||||||
SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM,
|
SOUND_WEAPON_ROCKET_SHOT_NO_ZOOM,
|
||||||
@@ -72,8 +66,8 @@ enum eSound
|
|||||||
SOUND_GARAGE_BOMB1_SET,
|
SOUND_GARAGE_BOMB1_SET,
|
||||||
SOUND_GARAGE_BOMB2_SET,
|
SOUND_GARAGE_BOMB2_SET,
|
||||||
SOUND_GARAGE_BOMB3_SET,
|
SOUND_GARAGE_BOMB3_SET,
|
||||||
SOUND_70,
|
SOUND_40,
|
||||||
SOUND_71,
|
SOUND_41,
|
||||||
SOUND_GARAGE_VEHICLE_DECLINED,
|
SOUND_GARAGE_VEHICLE_DECLINED,
|
||||||
SOUND_GARAGE_VEHICLE_ACCEPTED,
|
SOUND_GARAGE_VEHICLE_ACCEPTED,
|
||||||
SOUND_GARAGE_DOOR_CLOSED,
|
SOUND_GARAGE_DOOR_CLOSED,
|
||||||
@@ -82,8 +76,8 @@ enum eSound
|
|||||||
SOUND_PICKUP_WEAPON_BOUGHT,
|
SOUND_PICKUP_WEAPON_BOUGHT,
|
||||||
SOUND_PICKUP_WEAPON,
|
SOUND_PICKUP_WEAPON,
|
||||||
SOUND_PICKUP_HEALTH,
|
SOUND_PICKUP_HEALTH,
|
||||||
SOUND_80,
|
SOUND_PICKUP_ERROR,
|
||||||
SOUND_81,
|
SOUND_4B,
|
||||||
SOUND_PICKUP_ADRENALINE,
|
SOUND_PICKUP_ADRENALINE,
|
||||||
SOUND_PICKUP_ARMOUR,
|
SOUND_PICKUP_ARMOUR,
|
||||||
SOUND_PICKUP_BONUS,
|
SOUND_PICKUP_BONUS,
|
||||||
@@ -93,7 +87,7 @@ enum eSound
|
|||||||
SOUND_PICKUP_PACMAN_PACKAGE,
|
SOUND_PICKUP_PACMAN_PACKAGE,
|
||||||
SOUND_PICKUP_FLOAT_PACKAGE,
|
SOUND_PICKUP_FLOAT_PACKAGE,
|
||||||
SOUND_BOMB_TIMED_ACTIVATED,
|
SOUND_BOMB_TIMED_ACTIVATED,
|
||||||
SOUND_91,
|
SOUND_55,
|
||||||
SOUND_BOMB_ONIGNITION_ACTIVATED,
|
SOUND_BOMB_ONIGNITION_ACTIVATED,
|
||||||
SOUND_BOMB_TICK,
|
SOUND_BOMB_TICK,
|
||||||
SOUND_RAMPAGE_START,
|
SOUND_RAMPAGE_START,
|
||||||
@@ -110,16 +104,12 @@ enum eSound
|
|||||||
SOUND_PED_HIT,
|
SOUND_PED_HIT,
|
||||||
SOUND_PED_LAND,
|
SOUND_PED_LAND,
|
||||||
SOUND_PED_BULLET_HIT,
|
SOUND_PED_BULLET_HIT,
|
||||||
|
SOUND_PED_BOMBER,
|
||||||
SOUND_PED_BURNING,
|
SOUND_PED_BURNING,
|
||||||
SOUND_PED_PLAYER_REACTTOCOP,
|
SOUND_PED_ARREST_FBI,
|
||||||
|
SOUND_PED_ARREST_SWAT,
|
||||||
SOUND_PED_ARREST_COP,
|
SOUND_PED_ARREST_COP,
|
||||||
SOUND_PED_MIAMIVICE_EXITING_CAR,
|
SOUND_PED_HELI_PLAYER_FOUND,
|
||||||
SOUND_PED_COP_HELIPILOTPHRASE,
|
|
||||||
SOUND_PED_PULLOUTWEAPON,
|
|
||||||
SOUND_PED_HELI_PLAYER_FOUND = 114,
|
|
||||||
SOUND_PED_VCPA_PLAYER_FOUND = 115,
|
|
||||||
SOUND_PED_ON_FIRE,
|
|
||||||
SOUND_PED_AIMING,
|
|
||||||
SOUND_PED_HANDS_UP,
|
SOUND_PED_HANDS_UP,
|
||||||
SOUND_PED_HANDS_COWER,
|
SOUND_PED_HANDS_COWER,
|
||||||
SOUND_PED_FLEE_SPRINT,
|
SOUND_PED_FLEE_SPRINT,
|
||||||
@@ -127,40 +117,30 @@ enum eSound
|
|||||||
SOUND_PED_MUGGING,
|
SOUND_PED_MUGGING,
|
||||||
SOUND_PED_CAR_JACKED,
|
SOUND_PED_CAR_JACKED,
|
||||||
SOUND_PED_ROBBED,
|
SOUND_PED_ROBBED,
|
||||||
SOUND_PED_ACCIDENTREACTION1,
|
|
||||||
SOUND_PED_UNK_126,
|
|
||||||
SOUND_PED_PLAYER_AFTERSEX,
|
|
||||||
SOUND_PED_PLAYER_BEFORESEX,
|
|
||||||
SOUND_PED_COP_UNK_129, // 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_LITTLECOPSAROUND, // also used for medics
|
|
||||||
SOUND_PED_PLAYER_FARFROMCOPS, // also used for medics
|
|
||||||
SOUND_PED_TAXI_WAIT,
|
SOUND_PED_TAXI_WAIT,
|
||||||
SOUND_PED_ATTACK,
|
SOUND_PED_ATTACK,
|
||||||
SOUND_PED_DEFEND,
|
SOUND_PED_DEFEND,
|
||||||
|
SOUND_PED_PURSUIT_ARMY,
|
||||||
|
SOUND_PED_PURSUIT_FBI,
|
||||||
|
SOUND_PED_PURSUIT_SWAT,
|
||||||
|
SOUND_PED_PURSUIT_COP,
|
||||||
SOUND_PED_HEALING,
|
SOUND_PED_HEALING,
|
||||||
|
SOUND_PED_7B,
|
||||||
SOUND_PED_LEAVE_VEHICLE,
|
SOUND_PED_LEAVE_VEHICLE,
|
||||||
SOUND_PED_EVADE,
|
SOUND_PED_EVADE,
|
||||||
SOUND_PED_FLEE_RUN,
|
SOUND_PED_FLEE_RUN,
|
||||||
SOUND_PED_CRASH_VEHICLE,
|
|
||||||
SOUND_PED_CRASH_CAR,
|
|
||||||
SOUND_PED_ANNOYED_DRIVER,
|
SOUND_PED_ANNOYED_DRIVER,
|
||||||
SOUND_PED_147,
|
|
||||||
SOUND_PED_SOLICIT,
|
SOUND_PED_SOLICIT,
|
||||||
SOUND_PED_149,
|
|
||||||
SOUND_PED_150,
|
|
||||||
SOUND_PED_EXTINGUISHING_FIRE,
|
SOUND_PED_EXTINGUISHING_FIRE,
|
||||||
SOUND_PED_WAIT_DOUBLEBACK,
|
SOUND_PED_WAIT_DOUBLEBACK,
|
||||||
SOUND_153,
|
|
||||||
SOUND_PED_CHAT_SEXY,
|
SOUND_PED_CHAT_SEXY,
|
||||||
SOUND_PED_CHAT_EVENT,
|
SOUND_PED_CHAT_EVENT,
|
||||||
SOUND_PED_PED_COLLISION,
|
|
||||||
SOUND_PED_CHAT,
|
SOUND_PED_CHAT,
|
||||||
|
SOUND_PED_BODYCAST_HIT,
|
||||||
SOUND_PED_TAXI_CALL,
|
SOUND_PED_TAXI_CALL,
|
||||||
|
SOUND_INJURED_PED_MALE_OUCH,
|
||||||
|
SOUND_INJURED_PED_FEMALE,
|
||||||
|
SOUND_INJURED_PED_MALE_PRISON,
|
||||||
SOUND_RACE_START_3,
|
SOUND_RACE_START_3,
|
||||||
SOUND_RACE_START_2,
|
SOUND_RACE_START_2,
|
||||||
SOUND_RACE_START_1,
|
SOUND_RACE_START_1,
|
||||||
@@ -171,101 +151,143 @@ enum eSound
|
|||||||
SOUND_CAR_PED_COLLISION,
|
SOUND_CAR_PED_COLLISION,
|
||||||
SOUND_CLOCK_TICK,
|
SOUND_CLOCK_TICK,
|
||||||
SOUND_PART_MISSION_COMPLETE,
|
SOUND_PART_MISSION_COMPLETE,
|
||||||
SOUND_FRONTEND_MENU_STARTING, // same sound as SOUND_HUD
|
SOUND_FRONTEND_MENU_STARTING,
|
||||||
|
SOUND_FRONTEND_MENU_NEW_PAGE,
|
||||||
// TODO(Miami): What are 170-175??
|
SOUND_FRONTEND_MENU_NAVIGATION,
|
||||||
|
SOUND_FRONTEND_MENU_SETTING_CHANGE,
|
||||||
SOUND_FRONTEND_RADIO_TURN_OFF = 176, // those 2 are same sound
|
SOUND_FRONTEND_MENU_BACK,
|
||||||
SOUND_FRONTEND_RADIO_TURN_ON,
|
SOUND_FRONTEND_STEREO,
|
||||||
SOUND_FRONTEND_HURRICANE, // yes, frontend
|
SOUND_FRONTEND_MONO,
|
||||||
SOUND_HUD,
|
|
||||||
SOUND_180,
|
|
||||||
SOUND_181,
|
|
||||||
SOUND_182,
|
|
||||||
SOUND_LIGHTNING,
|
|
||||||
SOUND_BULLETTRACE_1,
|
|
||||||
SOUND_BULLETTRACE_2,
|
|
||||||
SOUND_186, // makes same sound as 40
|
|
||||||
SOUND_187, // makes same sound as 46
|
|
||||||
SOUND_MELEE_ATTACK_START,
|
|
||||||
SOUND_SKATING,
|
|
||||||
SOUND_WEAPON_MINIGUN_ATTACK,
|
|
||||||
SOUND_WEAPON_MINIGUN_2,
|
|
||||||
SOUND_WEAPON_MINIGUN_3,
|
|
||||||
SOUND_AMMUNATION_IMRAN_ARM_BOMB,
|
|
||||||
SOUND_RADIO_CHANGE,
|
|
||||||
SOUND_FRONTEND_HIGHLIGHT_OPTION,
|
|
||||||
SOUND_FRONTEND_ENTER_OR_ADJUST,
|
|
||||||
SOUND_FRONTEND_BACK,
|
|
||||||
SOUND_FRONTEND_FAIL,
|
|
||||||
SOUND_FRONTEND_AUDIO_TEST,
|
SOUND_FRONTEND_AUDIO_TEST,
|
||||||
SOUND_INJURED_PED_MALE_OUCH,
|
SOUND_FRONTEND_FAIL,
|
||||||
SOUND_INJURED_PED_FEMALE,
|
SOUND_FRONTEND_RADIO_TURN_OFF,
|
||||||
SOUND_SHIRT_WIND_FLAP,
|
SOUND_FRONTEND_RADIO_CHANGE,
|
||||||
SOUND_SET_203,
|
SOUND_HUD,
|
||||||
SOUND_TOTAL_SOUNDS = 204,
|
SOUND_AMMUNATION_WELCOME_1,
|
||||||
SOUND_NO_SOUND = 205,
|
SOUND_AMMUNATION_WELCOME_2,
|
||||||
|
SOUND_AMMUNATION_WELCOME_3,
|
||||||
|
SOUND_LIGHTNING,
|
||||||
|
SOUND_A5,
|
||||||
|
SOUND_TOTAL_SOUNDS,
|
||||||
|
SOUND_NO_SOUND,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
enum eScriptSounds {
|
enum eScriptSounds {
|
||||||
SCRIPT_SOUND_BANK_ALARM_LOOP = 0,
|
SCRIPT_SOUND_0 = 0,
|
||||||
|
SCRIPT_SOUND_1,
|
||||||
|
SCRIPT_SOUND_2,
|
||||||
|
SCRIPT_SOUND_3,
|
||||||
|
SCRIPT_SOUND_PARTY_1_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_1_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_2_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_2_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_3_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_3_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_4_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_4_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_5_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_5_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_6_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_6_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_7_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_7_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_8_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_8_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_9_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_9_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_10_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_10_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_11_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_11_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_12_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_12_LOOP_L,
|
||||||
|
SCRIPT_SOUND_PARTY_13_LOOP_S,
|
||||||
|
SCRIPT_SOUND_PARTY_13_LOOP_L,
|
||||||
|
SCRIPT_SOUND_STRIP_CLUB_LOOP_1_S,
|
||||||
|
SCRIPT_SOUND_STRIP_CLUB_LOOP_1_L,
|
||||||
|
SCRIPT_SOUND_STRIP_CLUB_LOOP_2_S,
|
||||||
|
SCRIPT_SOUND_STRIP_CLUB_LOOP_2_L,
|
||||||
|
SCRIPT_SOUND_WORK_SHOP_LOOP_S,
|
||||||
|
SCRIPT_SOUND_WORK_SHOP_LOOP_L,
|
||||||
|
SCRIPT_SOUND_SAWMILL_LOOP_S,
|
||||||
|
SCRIPT_SOUND_SAWMILL_LOOP_L,
|
||||||
|
SCRIPT_SOUND_38,
|
||||||
|
SCRIPT_SOUND_39,
|
||||||
|
SCRIPT_SOUND_LAUNDERETTE_LOOP_S,
|
||||||
|
SCRIPT_SOUND_LAUNDERETTE_LOOP_L,
|
||||||
|
SCRIPT_SOUND_CHINATOWN_RESTAURANT_S,
|
||||||
|
SCRIPT_SOUND_CHINATOWN_RESTAURANT_L,
|
||||||
|
SCRIPT_SOUND_CIPRIANI_RESAURANT_S,
|
||||||
|
SCRIPT_SOUND_CIPRIANI_RESAURANT_L,
|
||||||
|
SCRIPT_SOUND_46_S,
|
||||||
|
SCRIPT_SOUND_47_L,
|
||||||
|
SCRIPT_SOUND_MARCO_BISTRO_S,
|
||||||
|
SCRIPT_SOUND_MARCO_BISTRO_L,
|
||||||
|
SCRIPT_SOUND_AIRPORT_LOOP_S,
|
||||||
|
SCRIPT_SOUND_AIRPORT_LOOP_L,
|
||||||
|
SCRIPT_SOUND_SHOP_LOOP_S,
|
||||||
|
SCRIPT_SOUND_SHOP_LOOP_L,
|
||||||
|
SCRIPT_SOUND_CINEMA_LOOP_S,
|
||||||
|
SCRIPT_SOUND_CINEMA_LOOP_L,
|
||||||
|
SCRIPT_SOUND_DOCKS_LOOP_S,
|
||||||
|
SCRIPT_SOUND_DOCKS_LOOP_L,
|
||||||
|
SCRIPT_SOUND_HOME_LOOP_S,
|
||||||
|
SCRIPT_SOUND_HOME_LOOP_L,
|
||||||
|
SCRIPT_SOUND_FRANKIE_PIANO,
|
||||||
|
SCRIPT_SOUND_PARTY_1_LOOP,
|
||||||
|
SCRIPT_SOUND_PORN_CINEMA_1_S,
|
||||||
|
SCRIPT_SOUND_PORN_CINEMA_1_L,
|
||||||
|
SCRIPT_SOUND_PORN_CINEMA_2_S,
|
||||||
|
SCRIPT_SOUND_PORN_CINEMA_2_L,
|
||||||
|
SCRIPT_SOUND_PORN_CINEMA_3_S,
|
||||||
|
SCRIPT_SOUND_PORN_CINEMA_3_L,
|
||||||
|
SCRIPT_SOUND_BANK_ALARM_LOOP_S,
|
||||||
|
SCRIPT_SOUND_BANK_ALARM_LOOP_L,
|
||||||
|
SCRIPT_SOUND_POLICE_BALL_LOOP_S,
|
||||||
|
SCRIPT_SOUND_POLICE_BALL_LOOP_L,
|
||||||
|
SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_S,
|
||||||
|
SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_L,
|
||||||
|
SCRIPT_SOUND_74,
|
||||||
|
SCRIPT_SOUND_75,
|
||||||
|
SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S,
|
||||||
|
SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_L,
|
||||||
|
SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S,
|
||||||
|
SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L,
|
||||||
|
SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_S,
|
||||||
|
SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_L,
|
||||||
|
SCRIPT_SOUND_EVIDENCE_PICKUP,
|
||||||
|
SCRIPT_SOUND_UNLOAD_GOLD,
|
||||||
|
SCRIPT_SOUND_RAVE_1_LOOP_S,
|
||||||
|
SCRIPT_SOUND_RAVE_1_LOOP_L,
|
||||||
|
SCRIPT_SOUND_RAVE_2_LOOP_S,
|
||||||
|
SCRIPT_SOUND_RAVE_2_LOOP_L,
|
||||||
|
SCRIPT_SOUND_RAVE_3_LOOP_S,
|
||||||
|
SCRIPT_SOUND_RAVE_3_LOOP_L,
|
||||||
|
SCRIPT_SOUND_MISTY_SEX_S,
|
||||||
|
SCRIPT_SOUND_MISTY_SEX_L,
|
||||||
|
SCRIPT_SOUND_GATE_START_CLUNK,
|
||||||
|
SCRIPT_SOUND_GATE_STOP_CLUNK,
|
||||||
SCRIPT_SOUND_PART_MISSION_COMPLETE,
|
SCRIPT_SOUND_PART_MISSION_COMPLETE,
|
||||||
SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP,
|
SCRIPT_SOUND_CHUNKY_RUN_SHOUT,
|
||||||
SCRIPT_SOUND_POLICE_CELL_DOOR_CLUNK,
|
SCRIPT_SOUND_SECURITY_GUARD_AWAY_SHOUT,
|
||||||
SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP,
|
|
||||||
SCRIPT_SOUND_GARAGE_DOOR_CLUNK,
|
|
||||||
SCRIPT_SOUND_SNORING_LOOP,
|
|
||||||
SCRIPT_SOUND_RACE_START_3,
|
SCRIPT_SOUND_RACE_START_3,
|
||||||
SCRIPT_SOUND_RACE_START_2,
|
SCRIPT_SOUND_RACE_START_2,
|
||||||
SCRIPT_SOUND_RACE_START_1,
|
SCRIPT_SOUND_RACE_START_1,
|
||||||
SCRIPT_SOUND_RACE_START_GO,
|
SCRIPT_SOUND_RACE_START_GO,
|
||||||
SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP,
|
SCRIPT_SOUND_SWAT_PED_SHOUT,
|
||||||
SCRIPT_SOUND_SHOOTING_RANGE_TARGET_HIT,
|
SCRIPT_SOUND_PRETEND_FIRE_LOOP,
|
||||||
SCRIPT_SOUND_AMMUNATION_BUY_WEAPON,
|
SCRIPT_SOUND_AMMUNATION_CHAT_1,
|
||||||
SCRIPT_SOUND_AMMUNATION_BUY_WEAPON_DENIED,
|
SCRIPT_SOUND_AMMUNATION_CHAT_2,
|
||||||
SCRIPT_SOUND_WMYCW_TICKET_SPEECH,
|
SCRIPT_SOUND_AMMUNATION_CHAT_3,
|
||||||
SCRIPT_SOUND_IMRAN_ARM_BOMB,
|
|
||||||
SCRIPT_SOUND_ANDY_SNIPER_SHOT,
|
|
||||||
SCRIPT_SOUND_WILLIE_CARD_SWIPE,
|
|
||||||
SCRIPT_SOUND_MALE_AMBULANCE_OUCH,
|
|
||||||
SCRIPT_SOUND_FEMALE_AMBULANCE_OUCH,
|
|
||||||
SCRIPT_SOUND_BUILDING_BAR_1,
|
|
||||||
SCRIPT_SOUND_BUILDING_BAR_2,
|
|
||||||
SCRIPT_SOUND_BUILDING_BAR_3,
|
|
||||||
SCRIPT_SOUND_BUILDING_BAR_4,
|
|
||||||
SCRIPT_SOUND_BUILDING_BIKER_BAR,
|
|
||||||
SCRIPT_SOUND_BUILDING_CHURCH,
|
|
||||||
SCRIPT_SOUND_BUILDING_CLUB,
|
|
||||||
SCRIPT_SOUND_BUILDING_CUBA_1,
|
|
||||||
SCRIPT_SOUND_BUILDING_CUBA_2,
|
|
||||||
SCRIPT_SOUND_BUILDING_VOODOO,
|
|
||||||
SCRIPT_SOUND_BUILDING_MUSIC_SHOP,
|
|
||||||
SCRIPT_SOUND_BUILDING_STRIPCLUB_1,
|
|
||||||
SCRIPT_SOUND_BUILDING_STRIPCLUB_2,
|
|
||||||
SCRIPT_SOUND_BUILDING_SUPERSWEEP,
|
|
||||||
SCRIPT_SOUND_SEAPLANE_LOW_FUEL,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_BAR_1,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_BAR_2,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_BAR_3,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_BAR_4,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_MALIBU_1,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_MALIBU_2,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_MALIBU_3,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_STRIP_1,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_STRIP_2,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_STRIP_3,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_CHURCH,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_FAN_1,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_FAN_2,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_INSECT_1,
|
|
||||||
SCRIPT_SOUND_NEW_BUILDING_INSECT_2,
|
|
||||||
SCRIPT_SOUND_NEW_WATERFALL,
|
|
||||||
SCRIPT_SOUND_BULLET_HIT_GROUND_1,
|
SCRIPT_SOUND_BULLET_HIT_GROUND_1,
|
||||||
SCRIPT_SOUND_BULLET_HIT_GROUND_2,
|
SCRIPT_SOUND_BULLET_HIT_GROUND_2,
|
||||||
SCRIPT_SOUND_BULLET_HIT_GROUND_3,
|
SCRIPT_SOUND_BULLET_HIT_GROUND_3,
|
||||||
SCRIPT_SOUND_BULLET_HIT_WATER, // no sound
|
SCRIPT_SOUND_BULLET_HIT_WATER, // no sound
|
||||||
|
SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1,
|
||||||
|
SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2,
|
||||||
SCRIPT_SOUND_PAYPHONE_RINGING,
|
SCRIPT_SOUND_PAYPHONE_RINGING,
|
||||||
|
SCRIPT_SOUND_113,
|
||||||
SCRIPT_SOUND_GLASS_BREAK_L,
|
SCRIPT_SOUND_GLASS_BREAK_L,
|
||||||
SCRIPT_SOUND_GLASS_BREAK_S,
|
SCRIPT_SOUND_GLASS_BREAK_S,
|
||||||
SCRIPT_SOUND_GLASS_CRACK,
|
SCRIPT_SOUND_GLASS_CRACK,
|
||||||
@@ -274,7 +296,6 @@ enum eScriptSounds {
|
|||||||
SCRIPT_SOUND_BOX_DESTROYED_2,
|
SCRIPT_SOUND_BOX_DESTROYED_2,
|
||||||
SCRIPT_SOUND_METAL_COLLISION,
|
SCRIPT_SOUND_METAL_COLLISION,
|
||||||
SCRIPT_SOUND_TIRE_COLLISION,
|
SCRIPT_SOUND_TIRE_COLLISION,
|
||||||
SCRIPT_SOUND_HIT_BALL,
|
|
||||||
SCRIPT_SOUND_GUNSHELL_DROP,
|
SCRIPT_SOUND_GUNSHELL_DROP,
|
||||||
SCRIPT_SOUND_GUNSHELL_DROP_SOFT,
|
SCRIPT_SOUND_GUNSHELL_DROP_SOFT,
|
||||||
SCRIPT_SOUND_TOTAL,
|
SCRIPT_SOUND_TOTAL,
|
||||||
|
|||||||
@@ -20,25 +20,3 @@ CBuilding::ReplaceWithNewModel(int32 id)
|
|||||||
if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
|
if(m_level == LEVEL_GENERIC || m_level == CGame::currLevel)
|
||||||
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
|
CStreaming::RequestModel(id, STREAMFLAGS_DONT_REMOVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
IsBuildingPointerValid(CBuilding* pBuilding)
|
|
||||||
{
|
|
||||||
if (!pBuilding)
|
|
||||||
return false;
|
|
||||||
if (pBuilding->GetIsATreadable()) {
|
|
||||||
int index = CPools::GetTreadablePool()->GetJustIndex_NoFreeAssert((CTreadable*)pBuilding);
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
return index >= 0 && index < CPools::GetTreadablePool()->GetSize();
|
|
||||||
#else
|
|
||||||
return index >= 0 && index <= CPools::GetTreadablePool()->GetSize();
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
int index = CPools::GetBuildingPool()->GetJustIndex_NoFreeAssert(pBuilding);
|
|
||||||
#ifdef FIX_BUGS
|
|
||||||
return index >= 0 && index < CPools::GetBuildingPool()->GetSize();
|
|
||||||
#else
|
|
||||||
return index >= 0 && index <= CPools::GetBuildingPool()->GetSize();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -17,4 +17,5 @@ public:
|
|||||||
virtual bool GetIsATreadable(void) { return false; }
|
virtual bool GetIsATreadable(void) { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
bool IsBuildingPointerValid(CBuilding*);
|
VALIDATE_SIZE(CBuilding, 0x64);
|
||||||
|
|
||||||
|
|||||||
@@ -8,5 +8,10 @@ public:
|
|||||||
static void *operator new(size_t);
|
static void *operator new(size_t);
|
||||||
static void operator delete(void*, size_t);
|
static void operator delete(void*, size_t);
|
||||||
|
|
||||||
|
int16 m_nodeIndices[2][12]; // first car, then ped
|
||||||
|
|
||||||
bool GetIsATreadable(void) { return true; }
|
bool GetIsATreadable(void) { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
VALIDATE_SIZE(CTreadable, 0x94);
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,15 @@
|
|||||||
|
|
||||||
#include "SurfaceTable.h"
|
#include "SurfaceTable.h"
|
||||||
|
|
||||||
struct CBox
|
struct CColBox
|
||||||
{
|
{
|
||||||
CVector min;
|
CVector min;
|
||||||
CVector max;
|
CVector max;
|
||||||
CVector GetSize(void) { return max - min; }
|
|
||||||
void Set(const CVector &min, const CVector &max) { this->min = min; this->max = max; }
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CColBox : public CBox
|
|
||||||
{
|
|
||||||
uint8 surface;
|
uint8 surface;
|
||||||
uint8 piece;
|
uint8 piece;
|
||||||
|
|
||||||
void Set(const CVector &min, const CVector &max, uint8 surf, uint8 piece);
|
void Set(const CVector &min, const CVector &max, uint8 surf = SURFACE_DEFAULT, uint8 piece = 0);
|
||||||
using CBox::Set;
|
CVector GetSize(void) { return max - min; }
|
||||||
|
|
||||||
CColBox& operator=(const CColBox &other);
|
CColBox& operator=(const CColBox &other);
|
||||||
};
|
};
|
||||||
@@ -1,9 +1,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ColModel.h"
|
#include "ColModel.h"
|
||||||
#include "Collision.h"
|
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "MemoryHeap.h"
|
#include "MemoryHeap.h"
|
||||||
#include "Pools.h"
|
|
||||||
|
|
||||||
CColModel::CColModel(void)
|
CColModel::CColModel(void)
|
||||||
{
|
{
|
||||||
@@ -17,27 +15,14 @@ CColModel::CColModel(void)
|
|||||||
vertices = nil;
|
vertices = nil;
|
||||||
triangles = nil;
|
triangles = nil;
|
||||||
trianglePlanes = nil;
|
trianglePlanes = nil;
|
||||||
level = LEVEL_GENERIC; // generic col slot
|
level = CGame::currLevel;
|
||||||
ownsCollisionVolumes = true;
|
ownsCollisionVolumes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CColModel::~CColModel(void)
|
CColModel::~CColModel(void)
|
||||||
{
|
{
|
||||||
RemoveCollisionVolumes();
|
RemoveCollisionVolumes();
|
||||||
}
|
RemoveTrianglePlanes();
|
||||||
|
|
||||||
void*
|
|
||||||
CColModel::operator new(size_t)
|
|
||||||
{
|
|
||||||
CColModel* node = CPools::GetColModelPool()->New();
|
|
||||||
assert(node);
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColModel::operator delete(void *p, size_t)
|
|
||||||
{
|
|
||||||
CPools::GetColModelPool()->Delete((CColModel*)p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -49,7 +34,6 @@ CColModel::RemoveCollisionVolumes(void)
|
|||||||
RwFree(boxes);
|
RwFree(boxes);
|
||||||
RwFree(vertices);
|
RwFree(vertices);
|
||||||
RwFree(triangles);
|
RwFree(triangles);
|
||||||
CCollision::RemoveTrianglePlanes(this);
|
|
||||||
}
|
}
|
||||||
numSpheres = 0;
|
numSpheres = 0;
|
||||||
numLines = 0;
|
numLines = 0;
|
||||||
|
|||||||
@@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
struct CColModel
|
struct CColModel
|
||||||
{
|
{
|
||||||
CSphere boundingSphere;
|
CColSphere boundingSphere;
|
||||||
CBox boundingBox;
|
CColBox boundingBox;
|
||||||
int16 numSpheres;
|
int16 numSpheres;
|
||||||
|
int16 numLines;
|
||||||
int16 numBoxes;
|
int16 numBoxes;
|
||||||
int16 numTriangles;
|
int16 numTriangles;
|
||||||
int8 numLines;
|
int32 level;
|
||||||
uint8 level; // colstore slot but probably still named level
|
bool ownsCollisionVolumes; // missing on PS2
|
||||||
bool ownsCollisionVolumes;
|
|
||||||
CColSphere *spheres;
|
CColSphere *spheres;
|
||||||
CColLine *lines;
|
CColLine *lines;
|
||||||
CColBox *boxes;
|
CColBox *boxes;
|
||||||
@@ -33,7 +33,5 @@ struct CColModel
|
|||||||
void SetLinkPtr(CLink<CColModel*>*);
|
void SetLinkPtr(CLink<CColModel*>*);
|
||||||
void GetTrianglePoint(CVector &v, int i) const;
|
void GetTrianglePoint(CVector &v, int i) const;
|
||||||
|
|
||||||
void *operator new(size_t);
|
|
||||||
void operator delete(void *p, size_t);
|
|
||||||
CColModel& operator=(const CColModel& other);
|
CColModel& operator=(const CColModel& other);
|
||||||
};
|
};
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ColSphere.h"
|
#include "ColSphere.h"
|
||||||
#include "General.h"
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CColSphere::Set(float radius, const CVector ¢er, uint8 surf, uint8 piece)
|
CColSphere::Set(float radius, const CVector ¢er, uint8 surf, uint8 piece)
|
||||||
@@ -9,19 +8,4 @@ CColSphere::Set(float radius, const CVector ¢er, uint8 surf, uint8 piece)
|
|||||||
this->center = center;
|
this->center = center;
|
||||||
this->surface = surf;
|
this->surface = surf;
|
||||||
this->piece = piece;
|
this->piece = piece;
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
CColSphere::IntersectRay(CVector const& from, CVector const& dir, CVector &entry, CVector &exit)
|
|
||||||
{
|
|
||||||
CVector distToCenter = from - center;
|
|
||||||
float distToTouchSqr = distToCenter.MagnitudeSqr() - sq(radius);
|
|
||||||
float root1, root2;
|
|
||||||
|
|
||||||
if (!CGeneral::SolveQuadratic(1.0f, DotProduct(distToCenter, dir) * 2.f, distToTouchSqr, root1, root2))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
entry = from + dir * root1;
|
|
||||||
exit = from + dir * root2;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
@@ -2,20 +2,12 @@
|
|||||||
|
|
||||||
#include "SurfaceTable.h"
|
#include "SurfaceTable.h"
|
||||||
|
|
||||||
struct CSphere
|
struct CColSphere
|
||||||
{
|
{
|
||||||
// NB: this has to be compatible with a CVuVector
|
// NB: this has to be compatible with a CVuVector
|
||||||
CVector center;
|
CVector center;
|
||||||
float radius;
|
float radius;
|
||||||
void Set(float radius, const CVector ¢er) { this->center = center; this->radius = radius; }
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CColSphere : public CSphere
|
|
||||||
{
|
|
||||||
uint8 surface;
|
uint8 surface;
|
||||||
uint8 piece;
|
uint8 piece;
|
||||||
|
void Set(float radius, const CVector ¢er, uint8 surf = SURFACE_DEFAULT, uint8 piece = 0);
|
||||||
void Set(float radius, const CVector ¢er, uint8 surf, uint8 piece);
|
|
||||||
bool IntersectRay(CVector const &from, CVector const &dir, CVector &entry, CVector &exit);
|
|
||||||
using CSphere::Set;
|
|
||||||
};
|
};
|
||||||
@@ -1,255 +0,0 @@
|
|||||||
#include "common.h"
|
|
||||||
|
|
||||||
#include "templates.h"
|
|
||||||
#include "General.h"
|
|
||||||
#include "ModelInfo.h"
|
|
||||||
#include "Streaming.h"
|
|
||||||
#include "FileLoader.h"
|
|
||||||
#include "Script.h"
|
|
||||||
#include "Timer.h"
|
|
||||||
#include "Camera.h"
|
|
||||||
#include "Frontend.h"
|
|
||||||
#include "Physical.h"
|
|
||||||
#include "ColStore.h"
|
|
||||||
#include "VarConsole.h"
|
|
||||||
#include "Pools.h"
|
|
||||||
|
|
||||||
CPool<ColDef,ColDef> *CColStore::ms_pColPool;
|
|
||||||
#ifndef MASTER
|
|
||||||
bool bDispColInMem;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::Initialise(void)
|
|
||||||
{
|
|
||||||
if(ms_pColPool == nil)
|
|
||||||
ms_pColPool = new CPool<ColDef,ColDef>(COLSTORESIZE, "CollisionFiles");
|
|
||||||
AddColSlot("generic"); // slot 0. not streamed
|
|
||||||
#ifndef MASTER
|
|
||||||
VarConsole.Add("Display collision in memory", &bDispColInMem, true);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::Shutdown(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for(i = 0; i < COLSTORESIZE; i++)
|
|
||||||
RemoveColSlot(i);
|
|
||||||
if(ms_pColPool)
|
|
||||||
delete ms_pColPool;
|
|
||||||
ms_pColPool = nil;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
CColStore::AddColSlot(const char *name)
|
|
||||||
{
|
|
||||||
ColDef *def = ms_pColPool->New();
|
|
||||||
assert(def);
|
|
||||||
def->isLoaded = false;
|
|
||||||
def->unused = 0;
|
|
||||||
def->bounds.left = 1000000.0f;
|
|
||||||
def->bounds.top = 1000000.0f;
|
|
||||||
def->bounds.right = -1000000.0f;
|
|
||||||
def->bounds.bottom = -1000000.0f;
|
|
||||||
def->minIndex = INT16_MAX;
|
|
||||||
def->maxIndex = INT16_MIN;
|
|
||||||
strcpy(def->name, name);
|
|
||||||
return ms_pColPool->GetJustIndex(def);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::RemoveColSlot(int slot)
|
|
||||||
{
|
|
||||||
if(GetSlot(slot)){
|
|
||||||
if(GetSlot(slot)->isLoaded)
|
|
||||||
RemoveCol(slot);
|
|
||||||
ms_pColPool->Delete(GetSlot(slot));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
CColStore::FindColSlot(const char *name)
|
|
||||||
{
|
|
||||||
ColDef *def;
|
|
||||||
int size = ms_pColPool->GetSize();
|
|
||||||
for(int i = 0; i < size; i++){
|
|
||||||
def = GetSlot(i);
|
|
||||||
if(def && !CGeneral::faststricmp(def->name, name))
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char*
|
|
||||||
CColStore::GetColName(int32 slot)
|
|
||||||
{
|
|
||||||
return GetSlot(slot)->name;
|
|
||||||
}
|
|
||||||
|
|
||||||
CRect&
|
|
||||||
CColStore::GetBoundingBox(int32 slot)
|
|
||||||
{
|
|
||||||
return GetSlot(slot)->bounds;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::IncludeModelIndex(int32 slot, int32 modelIndex)
|
|
||||||
{
|
|
||||||
ColDef *def = GetSlot(slot);
|
|
||||||
if(modelIndex < def->minIndex)
|
|
||||||
def->minIndex = modelIndex;
|
|
||||||
if(modelIndex > def->maxIndex)
|
|
||||||
def->maxIndex = modelIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
CColStore::LoadCol(int32 slot, uint8 *buffer, int32 bufsize)
|
|
||||||
{
|
|
||||||
bool success;
|
|
||||||
ColDef *def = GetSlot(slot);
|
|
||||||
if(def->minIndex > def->maxIndex)
|
|
||||||
success = CFileLoader::LoadCollisionFileFirstTime(buffer, bufsize, slot);
|
|
||||||
else
|
|
||||||
success = CFileLoader::LoadCollisionFile(buffer, bufsize, slot);
|
|
||||||
if(success)
|
|
||||||
def->isLoaded = true;
|
|
||||||
else
|
|
||||||
debug("Failed to load Collision\n");
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::RemoveCol(int32 slot)
|
|
||||||
{
|
|
||||||
int id;
|
|
||||||
GetSlot(slot)->isLoaded = false;
|
|
||||||
for(id = 0; id < MODELINFOSIZE; id++){
|
|
||||||
CBaseModelInfo *mi = CModelInfo::GetModelInfo(id);
|
|
||||||
if(mi){
|
|
||||||
CColModel *col = mi->GetColModel();
|
|
||||||
if(col && col->level == slot)
|
|
||||||
col->RemoveCollisionVolumes();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::LoadAllCollision(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for(i = 1; i < COLSTORESIZE; i++)
|
|
||||||
if(GetSlot(i))
|
|
||||||
CStreaming::RequestCol(i, 0);
|
|
||||||
|
|
||||||
CStreaming::LoadAllRequestedModels(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::RemoveAllCollision(void)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for(i = 1; i < COLSTORESIZE; i++)
|
|
||||||
if(GetSlot(i))
|
|
||||||
if(CStreaming::CanRemoveCol(i))
|
|
||||||
CStreaming::RemoveCol(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool bLoadAtSecondPosition;
|
|
||||||
static CVector2D secondPosition;
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::AddCollisionNeededAtPosn(const CVector2D &pos)
|
|
||||||
{
|
|
||||||
bLoadAtSecondPosition = true;
|
|
||||||
secondPosition = pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::LoadCollision(const CVector2D &pos)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if(CStreaming::ms_disableStreaming)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for(i = 1; i < COLSTORESIZE; i++){
|
|
||||||
if(GetSlot(i) == nil)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
bool wantThisOne = false;
|
|
||||||
|
|
||||||
if(GetBoundingBox(i).IsPointInside(pos) ||
|
|
||||||
bLoadAtSecondPosition && GetBoundingBox(i).IsPointInside(secondPosition, -119.0f) ||
|
|
||||||
strcmp(GetColName(i), "yacht") == 0){
|
|
||||||
wantThisOne = true;
|
|
||||||
}else{
|
|
||||||
for (int j = 0; j < MAX_CLEANUP; j++) {
|
|
||||||
CPhysical* pEntity = nil;
|
|
||||||
cleanup_entity_struct* pCleanup = &CTheScripts::MissionCleanUp.m_sEntities[i];
|
|
||||||
if (pCleanup->type == CLEANUP_CAR) {
|
|
||||||
pEntity = CPools::GetVehiclePool()->GetAt(pCleanup->id);
|
|
||||||
if (!pEntity || pEntity->GetStatus() == STATUS_WRECKED)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else if (pCleanup->type == CLEANUP_CHAR) {
|
|
||||||
pEntity = CPools::GetPedPool()->GetAt(pCleanup->id);
|
|
||||||
if (!pEntity || ((CPed*)pEntity)->DyingOrDead())
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (pEntity && !pEntity->bDontLoadCollision && !pEntity->bIsFrozen) {
|
|
||||||
if (GetBoundingBox(i).IsPointInside(pEntity->GetPosition(), -80.0f))
|
|
||||||
wantThisOne = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(wantThisOne)
|
|
||||||
CStreaming::RequestCol(i, STREAMFLAGS_PRIORITY);
|
|
||||||
else
|
|
||||||
CStreaming::RemoveCol(i);
|
|
||||||
}
|
|
||||||
bLoadAtSecondPosition = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::RequestCollision(const CVector2D &pos)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for(i = 1; i < COLSTORESIZE; i++)
|
|
||||||
if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -115.0f))
|
|
||||||
CStreaming::RequestCol(i, STREAMFLAGS_PRIORITY);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
CColStore::EnsureCollisionIsInMemory(const CVector2D &pos)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if(CStreaming::ms_disableStreaming)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for(i = 1; i < COLSTORESIZE; i++)
|
|
||||||
if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -110.0f) &&
|
|
||||||
!CStreaming::HasColLoaded(i)){
|
|
||||||
CStreaming::RequestCol(i, 0);
|
|
||||||
if(TheCamera.GetScreenFadeStatus() == FADE_0)
|
|
||||||
FrontEndMenuManager.MessageScreen("LOADCOL", false);
|
|
||||||
CTimer::Suspend();
|
|
||||||
CStreaming::LoadAllRequestedModels(false);
|
|
||||||
CTimer::Resume();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
CColStore::HasCollisionLoaded(const CVector2D &pos)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for(i = 1; i < COLSTORESIZE; i++)
|
|
||||||
if(GetSlot(i) && GetBoundingBox(i).IsPointInside(pos, -115.0f) &&
|
|
||||||
!GetSlot(i)->isLoaded)
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "templates.h"
|
|
||||||
|
|
||||||
struct ColDef { // made up name
|
|
||||||
int32 unused;
|
|
||||||
bool isLoaded;
|
|
||||||
CRect bounds;
|
|
||||||
char name[20];
|
|
||||||
int16 minIndex;
|
|
||||||
int16 maxIndex;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CColStore
|
|
||||||
{
|
|
||||||
static CPool<ColDef,ColDef> *ms_pColPool;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static void Initialise(void);
|
|
||||||
static void Shutdown(void);
|
|
||||||
static int AddColSlot(const char *name);
|
|
||||||
static void RemoveColSlot(int32 slot);
|
|
||||||
static int FindColSlot(const char *name);
|
|
||||||
static char *GetColName(int32 slot);
|
|
||||||
static CRect &GetBoundingBox(int32 slot);
|
|
||||||
static void IncludeModelIndex(int32 slot, int32 modelIndex);
|
|
||||||
static bool LoadCol(int32 storeID, uint8 *buffer, int32 bufsize);
|
|
||||||
static void RemoveCol(int32 slot);
|
|
||||||
static void AddCollisionNeededAtPosn(const CVector2D &pos);
|
|
||||||
static void LoadAllCollision(void);
|
|
||||||
static void RemoveAllCollision(void);
|
|
||||||
static void LoadCollision(const CVector2D &pos);
|
|
||||||
static void RequestCollision(const CVector2D &pos);
|
|
||||||
static void EnsureCollisionIsInMemory(const CVector2D &pos);
|
|
||||||
static bool HasCollisionLoaded(const CVector2D &pos);
|
|
||||||
|
|
||||||
static ColDef *GetSlot(int slot) {
|
|
||||||
assert(slot >= 0);
|
|
||||||
assert(ms_pColPool);
|
|
||||||
assert(slot < ms_pColPool->GetSize());
|
|
||||||
return ms_pColPool->GetSlot(slot);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "ColTriangle.h"
|
#include "ColTriangle.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
CColTriangle::Set(const CompressedVector *, int a, int b, int c, uint8 surf, uint8 piece)
|
||||||
|
{
|
||||||
|
this->a = a;
|
||||||
|
this->b = b;
|
||||||
|
this->c = c;
|
||||||
|
this->surface = surf;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef VU_COLLISION
|
#ifdef VU_COLLISION
|
||||||
void
|
void
|
||||||
CColTrianglePlane::Set(const CVector &va, const CVector &vb, const CVector &vc)
|
CColTrianglePlane::Set(const CVector &va, const CVector &vb, const CVector &vc)
|
||||||
|
|||||||
@@ -18,13 +18,7 @@ struct CColTriangle
|
|||||||
uint16 c;
|
uint16 c;
|
||||||
uint8 surface;
|
uint8 surface;
|
||||||
|
|
||||||
void Set(int a, int b, int c, uint8 surf)
|
void Set(const CompressedVector *v, int a, int b, int c, uint8 surf, uint8 piece);
|
||||||
{
|
|
||||||
this->a = a;
|
|
||||||
this->b = b;
|
|
||||||
this->c = c;
|
|
||||||
this->surface = surf;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CColTrianglePlane
|
struct CColTrianglePlane
|
||||||
@@ -69,9 +63,6 @@ struct CColTrianglePlane
|
|||||||
void Set(const CVector &va, const CVector &vb, const CVector &vc);
|
void Set(const CVector &va, const CVector &vb, const CVector &vc);
|
||||||
void Set(const CompressedVector *v, CColTriangle &tri) { Set(v[tri.a].Get(), v[tri.b].Get(), v[tri.c].Get()); }
|
void Set(const CompressedVector *v, CColTriangle &tri) { Set(v[tri.a].Get(), v[tri.b].Get(), v[tri.c].Get()); }
|
||||||
void GetNormal(CVector &n) const { n = normal; }
|
void GetNormal(CVector &n) const { n = normal; }
|
||||||
float GetNormalX() const { return normal.x; }
|
|
||||||
float GetNormalY() const { return normal.y; }
|
|
||||||
float GetNormalZ() const { return normal.z; }
|
|
||||||
float CalcPoint(const CVector &v) const { return DotProduct(normal, v) - dist; };
|
float CalcPoint(const CVector &v) const { return DotProduct(normal, v) - dist; };
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@@ -21,8 +21,7 @@
|
|||||||
#include "SurfaceTable.h"
|
#include "SurfaceTable.h"
|
||||||
#include "Lines.h"
|
#include "Lines.h"
|
||||||
#include "Collision.h"
|
#include "Collision.h"
|
||||||
#include "Camera.h"
|
#include "Frontend.h"
|
||||||
#include "ColStore.h"
|
|
||||||
|
|
||||||
#ifdef VU_COLLISION
|
#ifdef VU_COLLISION
|
||||||
#include "VuCollision.h"
|
#include "VuCollision.h"
|
||||||
@@ -76,22 +75,52 @@ CCollision::Init(void)
|
|||||||
{
|
{
|
||||||
ms_colModelCache.Init(NUMCOLCACHELINKS);
|
ms_colModelCache.Init(NUMCOLCACHELINKS);
|
||||||
ms_collisionInMemory = LEVEL_GENERIC;
|
ms_collisionInMemory = LEVEL_GENERIC;
|
||||||
CColStore::Initialise();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CCollision::Shutdown(void)
|
CCollision::Shutdown(void)
|
||||||
{
|
{
|
||||||
ms_colModelCache.Shutdown();
|
ms_colModelCache.Shutdown();
|
||||||
CColStore::Shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CCollision::Update(void)
|
CCollision::Update(void)
|
||||||
{
|
{
|
||||||
|
CVector playerCoors;
|
||||||
|
playerCoors = FindPlayerCoors();
|
||||||
|
eLevelName level = CTheZones::m_CurrLevel;
|
||||||
|
bool forceLevelChange = false;
|
||||||
|
|
||||||
|
if(CTimer::GetTimeInMilliseconds() < 2000 || CCutsceneMgr::IsCutsceneProcessing())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// hardcode a level if there are no zones
|
||||||
|
if(level == LEVEL_GENERIC){
|
||||||
|
if(CGame::currLevel == LEVEL_INDUSTRIAL &&
|
||||||
|
playerCoors.x < 400.0f){
|
||||||
|
level = LEVEL_COMMERCIAL;
|
||||||
|
forceLevelChange = true;
|
||||||
|
}else if(CGame::currLevel == LEVEL_SUBURBAN &&
|
||||||
|
playerCoors.x > -450.0f && playerCoors.y < -1400.0f){
|
||||||
|
level = LEVEL_COMMERCIAL;
|
||||||
|
forceLevelChange = true;
|
||||||
|
}else{
|
||||||
|
if(playerCoors.x > 800.0f){
|
||||||
|
level = LEVEL_INDUSTRIAL;
|
||||||
|
forceLevelChange = true;
|
||||||
|
}else if(playerCoors.x < -800.0f){
|
||||||
|
level = LEVEL_SUBURBAN;
|
||||||
|
forceLevelChange = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(level != LEVEL_GENERIC && level != CGame::currLevel)
|
||||||
|
CGame::currLevel = level;
|
||||||
|
if(ms_collisionInMemory != CGame::currLevel)
|
||||||
|
LoadCollisionWhenINeedIt(forceLevelChange);
|
||||||
|
CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
// unused
|
|
||||||
eLevelName
|
eLevelName
|
||||||
GetCollisionInSectorList(CPtrList &list)
|
GetCollisionInSectorList(CPtrList &list)
|
||||||
{
|
{
|
||||||
@@ -108,7 +137,6 @@ GetCollisionInSectorList(CPtrList &list)
|
|||||||
return LEVEL_GENERIC;
|
return LEVEL_GENERIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
// unused
|
|
||||||
// Get a level this sector is in based on collision models
|
// Get a level this sector is in based on collision models
|
||||||
eLevelName
|
eLevelName
|
||||||
GetCollisionInSector(CSector §)
|
GetCollisionInSector(CSector §)
|
||||||
@@ -132,13 +160,155 @@ GetCollisionInSector(CSector §)
|
|||||||
void
|
void
|
||||||
CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
CCollision::LoadCollisionWhenINeedIt(bool forceChange)
|
||||||
{
|
{
|
||||||
|
eLevelName level, l;
|
||||||
|
bool multipleLevels;
|
||||||
|
CVector playerCoors;
|
||||||
|
CVehicle *veh;
|
||||||
|
CEntryInfoNode *ei;
|
||||||
|
int sx, sy;
|
||||||
|
int xmin, xmax, ymin, ymax;
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
level = LEVEL_GENERIC;
|
||||||
|
|
||||||
|
playerCoors = FindPlayerCoors();
|
||||||
|
sx = CWorld::GetSectorIndexX(playerCoors.x);
|
||||||
|
sy = CWorld::GetSectorIndexY(playerCoors.y);
|
||||||
|
multipleLevels = false;
|
||||||
|
|
||||||
|
veh = FindPlayerVehicle();
|
||||||
|
if(veh && veh->IsTrain()){
|
||||||
|
if(((CTrain*)veh)->m_nDoorState != TRAIN_DOOR_OPEN)
|
||||||
|
return;
|
||||||
|
}else if(playerCoors.z < -4.0f && !CCullZones::DoINeedToLoadCollision())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Figure out whose level's collisions we're most likely to be interested in
|
||||||
|
if(!forceChange){
|
||||||
|
if(veh && veh->IsBoat()){
|
||||||
|
// on water we expect to be between levels
|
||||||
|
multipleLevels = true;
|
||||||
|
}else{
|
||||||
|
xmin = Max(sx - 1, 0);
|
||||||
|
xmax = Min(sx + 1, NUMSECTORS_X-1);
|
||||||
|
ymin = Max(sy - 1, 0);
|
||||||
|
ymax = Min(sy + 1, NUMSECTORS_Y-1);
|
||||||
|
|
||||||
|
for(x = xmin; x <= xmax; x++)
|
||||||
|
for(y = ymin; y <= ymax; y++){
|
||||||
|
l = GetCollisionInSector(*CWorld::GetSector(x, y));
|
||||||
|
if(l != LEVEL_GENERIC){
|
||||||
|
if(level == LEVEL_GENERIC)
|
||||||
|
level = l;
|
||||||
|
if(level != l)
|
||||||
|
multipleLevels = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(multipleLevels && veh && veh->IsBoat())
|
||||||
|
for(ei = veh->m_entryInfoList.first; ei; ei = ei->next){
|
||||||
|
level = GetCollisionInSector(*ei->sector);
|
||||||
|
if(level != LEVEL_GENERIC)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (level == CGame::currLevel || forceChange) {
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
CTimer::Suspend();
|
||||||
|
#else
|
||||||
|
CTimer::Stop();
|
||||||
|
#endif
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
|
{
|
||||||
|
DMAudio.SetEffectsFadeVol(0);
|
||||||
|
CPad::StopPadsShaking();
|
||||||
|
LoadCollisionScreen(CGame::currLevel);
|
||||||
|
DMAudio.Service();
|
||||||
|
}
|
||||||
|
|
||||||
|
CPopulation::DealWithZoneChange(ms_collisionInMemory, CGame::currLevel, false);
|
||||||
|
|
||||||
|
ISLAND_LOADING_ISNT(HIGH)
|
||||||
|
{
|
||||||
|
CStreaming::RemoveIslandsNotUsed(LEVEL_INDUSTRIAL);
|
||||||
|
CStreaming::RemoveIslandsNotUsed(LEVEL_COMMERCIAL);
|
||||||
|
CStreaming::RemoveIslandsNotUsed(LEVEL_SUBURBAN);
|
||||||
|
}
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
|
{
|
||||||
|
CStreaming::RemoveBigBuildings(LEVEL_INDUSTRIAL);
|
||||||
|
CStreaming::RemoveBigBuildings(LEVEL_COMMERCIAL);
|
||||||
|
CStreaming::RemoveBigBuildings(LEVEL_SUBURBAN);
|
||||||
|
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||||
|
CStreaming::RemoveUnusedModelsInLoadedList();
|
||||||
|
CGame::TidyUpMemory(true, true);
|
||||||
|
CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
ms_collisionInMemory = CGame::currLevel;
|
||||||
|
CReplay::EmptyReplayBuffer();
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
|
{
|
||||||
|
if (CGame::currLevel != LEVEL_GENERIC)
|
||||||
|
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
|
||||||
|
CStreaming::RemoveUnusedBigBuildings(CGame::currLevel);
|
||||||
|
CStreaming::RemoveUnusedBuildings(CGame::currLevel);
|
||||||
|
CStreaming::RequestBigBuildings(CGame::currLevel);
|
||||||
|
}
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
else if (CMenuManager::m_PrefsIslandLoading == CMenuManager::ISLAND_LOADING_MEDIUM)
|
||||||
|
CStreaming::RequestIslands(CGame::currLevel);
|
||||||
|
#endif
|
||||||
|
CStreaming::LoadAllRequestedModels(true);
|
||||||
|
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
|
{
|
||||||
|
CStreaming::HaveAllBigBuildingsLoaded(CGame::currLevel);
|
||||||
|
|
||||||
|
CGame::TidyUpMemory(true, true);
|
||||||
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
CTimer::Resume();
|
||||||
|
#else
|
||||||
|
CTimer::Update();
|
||||||
|
#endif
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
|
DMAudio.SetEffectsFadeVol(127);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
bool CCollision::bAlreadyLoaded = false;
|
||||||
|
#endif
|
||||||
void
|
void
|
||||||
CCollision::SortOutCollisionAfterLoad(void)
|
CCollision::SortOutCollisionAfterLoad(void)
|
||||||
{
|
{
|
||||||
CColStore::LoadCollision(TheCamera.GetPosition());
|
if(ms_collisionInMemory == CGame::currLevel)
|
||||||
CStreaming::LoadAllRequestedModels(false);
|
return;
|
||||||
|
ISLAND_LOADING_IS(LOW)
|
||||||
|
CModelInfo::RemoveColModelsFromOtherLevels(CGame::currLevel);
|
||||||
|
|
||||||
|
if (CGame::currLevel != LEVEL_GENERIC) {
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
if (CMenuManager::m_PrefsIslandLoading != CMenuManager::ISLAND_LOADING_LOW) {
|
||||||
|
if (bAlreadyLoaded) {
|
||||||
|
ms_collisionInMemory = CGame::currLevel;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
bAlreadyLoaded = true;
|
||||||
|
CFileLoader::LoadCollisionFromDatFile(LEVEL_INDUSTRIAL);
|
||||||
|
CFileLoader::LoadCollisionFromDatFile(LEVEL_COMMERCIAL);
|
||||||
|
CFileLoader::LoadCollisionFromDatFile(LEVEL_SUBURBAN);
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
CFileLoader::LoadCollisionFromDatFile(CGame::currLevel);
|
||||||
|
if(!CGame::playingIntro)
|
||||||
|
LoadSplash(GetLevelSplashScreen(CGame::currLevel));
|
||||||
|
}
|
||||||
|
ms_collisionInMemory = CGame::currLevel;
|
||||||
|
CGame::TidyUpMemory(true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -162,14 +332,14 @@ CCollision::LoadCollisionScreen(eLevelName level)
|
|||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CCollision::TestSphereSphere(const CSphere &s1, const CSphere &s2)
|
CCollision::TestSphereSphere(const CColSphere &s1, const CColSphere &s2)
|
||||||
{
|
{
|
||||||
float d = s1.radius + s2.radius;
|
float d = s1.radius + s2.radius;
|
||||||
return (s1.center - s2.center).MagnitudeSqr() < d*d;
|
return (s1.center - s2.center).MagnitudeSqr() < d*d;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CCollision::TestSphereBox(const CSphere &sph, const CBox &box)
|
CCollision::TestSphereBox(const CColSphere &sph, const CColBox &box)
|
||||||
{
|
{
|
||||||
if(sph.center.x + sph.radius < box.min.x) return false;
|
if(sph.center.x + sph.radius < box.min.x) return false;
|
||||||
if(sph.center.x - sph.radius > box.max.x) return false;
|
if(sph.center.x - sph.radius > box.max.x) return false;
|
||||||
@@ -181,7 +351,7 @@ CCollision::TestSphereBox(const CSphere &sph, const CBox &box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CCollision::TestLineBox(const CColLine &line, const CBox &box)
|
CCollision::TestLineBox(const CColLine &line, const CColBox &box)
|
||||||
{
|
{
|
||||||
float t, x, y, z;
|
float t, x, y, z;
|
||||||
// If either line point is in the box, we have a collision
|
// If either line point is in the box, we have a collision
|
||||||
@@ -266,7 +436,7 @@ CCollision::TestLineBox(const CColLine &line, const CBox &box)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CCollision::TestVerticalLineBox(const CColLine &line, const CBox &box)
|
CCollision::TestVerticalLineBox(const CColLine &line, const CColBox &box)
|
||||||
{
|
{
|
||||||
if(line.p0.x <= box.min.x) return false;
|
if(line.p0.x <= box.min.x) return false;
|
||||||
if(line.p0.y <= box.min.y) return false;
|
if(line.p0.y <= box.min.y) return false;
|
||||||
@@ -466,8 +636,6 @@ CCollision::TestSphereTriangle(const CColSphere &sphere,
|
|||||||
int testcase = insideAB + insideAC + insideBC;
|
int testcase = insideAB + insideAC + insideBC;
|
||||||
float dist = 0.0f;
|
float dist = 0.0f;
|
||||||
switch(testcase){
|
switch(testcase){
|
||||||
case 0:
|
|
||||||
return false; // shouldn't happen
|
|
||||||
case 1:
|
case 1:
|
||||||
// closest to a vertex
|
// closest to a vertex
|
||||||
if(insideAB) dist = (sphere.center - vc).Magnitude();
|
if(insideAB) dist = (sphere.center - vc).Magnitude();
|
||||||
@@ -496,7 +664,7 @@ CCollision::TestSphereTriangle(const CColSphere &sphere,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, bool ignoreSeeThrough, bool ignoreShootThrough)
|
CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, bool ignoreSeeThrough)
|
||||||
{
|
{
|
||||||
#ifdef VU_COLLISION
|
#ifdef VU_COLLISION
|
||||||
CMatrix matTransform;
|
CMatrix matTransform;
|
||||||
@@ -513,14 +681,12 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
|
|||||||
|
|
||||||
for(i = 0; i < model.numSpheres; i++){
|
for(i = 0; i < model.numSpheres; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue;
|
|
||||||
if(TestLineSphere(*(CColLine*)newline, model.spheres[i]))
|
if(TestLineSphere(*(CColLine*)newline, model.spheres[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < model.numBoxes; i++){
|
for(i = 0; i < model.numBoxes; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.boxes[i].surface)) continue;
|
|
||||||
if(TestLineBox(*(CColLine*)newline, model.boxes[i]))
|
if(TestLineBox(*(CColLine*)newline, model.boxes[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -530,7 +696,6 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
|
|||||||
VuTriangle vutri;
|
VuTriangle vutri;
|
||||||
for(i = 0; i < model.numTriangles; i++){
|
for(i = 0; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
|
|
||||||
|
|
||||||
CColTriangle *tri = &model.triangles[i];
|
CColTriangle *tri = &model.triangles[i];
|
||||||
model.vertices[tri->a].Unpack(vutri.v0);
|
model.vertices[tri->a].Unpack(vutri.v0);
|
||||||
@@ -548,7 +713,6 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
|
|||||||
#endif
|
#endif
|
||||||
for(; i < model.numTriangles; i++){
|
for(; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
|
|
||||||
|
|
||||||
CColTriangle *tri = &model.triangles[i];
|
CColTriangle *tri = &model.triangles[i];
|
||||||
model.vertices[tri->a].Unpack(vutri.v0);
|
model.vertices[tri->a].Unpack(vutri.v0);
|
||||||
@@ -581,14 +745,12 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
|
|||||||
|
|
||||||
for(i = 0; i < model.numSpheres; i++){
|
for(i = 0; i < model.numSpheres; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue;
|
|
||||||
if(TestLineSphere(newline, model.spheres[i]))
|
if(TestLineSphere(newline, model.spheres[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < model.numBoxes; i++){
|
for(i = 0; i < model.numBoxes; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.boxes[i].surface)) continue;
|
|
||||||
if(TestLineBox(newline, model.boxes[i]))
|
if(TestLineBox(newline, model.boxes[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -596,7 +758,6 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
|
|||||||
CalculateTrianglePlanes(&model);
|
CalculateTrianglePlanes(&model);
|
||||||
for(i = 0; i < model.numTriangles; i++){
|
for(i = 0; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
|
|
||||||
if(TestLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i]))
|
if(TestLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -605,7 +766,6 @@ CCollision::TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColMod
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: TestPillWithSpheresInColModel, but only called from overloaded CWeapon::FireMelee which isn't used
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Process
|
// Process
|
||||||
@@ -886,7 +1046,6 @@ CCollision::ProcessLineSphere(const CColLine &line, const CColSphere &sphere, CC
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// unused
|
|
||||||
bool
|
bool
|
||||||
CCollision::ProcessVerticalLineTriangle(const CColLine &line,
|
CCollision::ProcessVerticalLineTriangle(const CColLine &line,
|
||||||
const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
|
const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
|
||||||
@@ -1103,7 +1262,7 @@ CCollision::IsStoredPolyStillValidVerticalLine(const CVector &pos, float z, CCol
|
|||||||
bool
|
bool
|
||||||
CCollision::ProcessLineTriangle(const CColLine &line,
|
CCollision::ProcessLineTriangle(const CColLine &line,
|
||||||
const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
|
const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane,
|
||||||
CColPoint &point, float &mindist, CStoredCollPoly *poly)
|
CColPoint &point, float &mindist)
|
||||||
{
|
{
|
||||||
#ifdef VU_COLLISION
|
#ifdef VU_COLLISION
|
||||||
// not used in favour of optimized loops
|
// not used in favour of optimized loops
|
||||||
@@ -1207,12 +1366,6 @@ CCollision::ProcessLineTriangle(const CColLine &line,
|
|||||||
point.pieceA = 0;
|
point.pieceA = 0;
|
||||||
point.surfaceB = tri.surface;
|
point.surfaceB = tri.surface;
|
||||||
point.pieceB = 0;
|
point.pieceB = 0;
|
||||||
if(poly){
|
|
||||||
poly->verts[0] = va;
|
|
||||||
poly->verts[1] = vb;
|
|
||||||
poly->verts[2] = vc;
|
|
||||||
poly->valid = true;
|
|
||||||
}
|
|
||||||
mindist = t;
|
mindist = t;
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
@@ -1283,8 +1436,6 @@ CCollision::ProcessSphereTriangle(const CColSphere &sphere,
|
|||||||
float dist = 0.0f;
|
float dist = 0.0f;
|
||||||
CVector p;
|
CVector p;
|
||||||
switch(testcase){
|
switch(testcase){
|
||||||
case 0:
|
|
||||||
return false; // shouldn't happen
|
|
||||||
case 1:
|
case 1:
|
||||||
// closest to a vertex
|
// closest to a vertex
|
||||||
if(insideAB) p = vc;
|
if(insideAB) p = vc;
|
||||||
@@ -1331,7 +1482,7 @@ CCollision::ProcessSphereTriangle(const CColSphere &sphere,
|
|||||||
bool
|
bool
|
||||||
CCollision::ProcessLineOfSight(const CColLine &line,
|
CCollision::ProcessLineOfSight(const CColLine &line,
|
||||||
const CMatrix &matrix, CColModel &model,
|
const CMatrix &matrix, CColModel &model,
|
||||||
CColPoint &point, float &mindist, bool ignoreSeeThrough, bool ignoreShootThrough)
|
CColPoint &point, float &mindist, bool ignoreSeeThrough)
|
||||||
{
|
{
|
||||||
#ifdef VU_COLLISION
|
#ifdef VU_COLLISION
|
||||||
CMatrix matTransform;
|
CMatrix matTransform;
|
||||||
@@ -1352,7 +1503,6 @@ CCollision::ProcessLineOfSight(const CColLine &line,
|
|||||||
float coldist = 1.0f;
|
float coldist = 1.0f;
|
||||||
for(i = 0; i < model.numSpheres; i++){
|
for(i = 0; i < model.numSpheres; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue;
|
|
||||||
if(ProcessLineSphere(*(CColLine*)newline, model.spheres[i], point, coldist))
|
if(ProcessLineSphere(*(CColLine*)newline, model.spheres[i], point, coldist))
|
||||||
point.Set(0, 0, model.spheres[i].surface, model.spheres[i].piece);
|
point.Set(0, 0, model.spheres[i].surface, model.spheres[i].piece);
|
||||||
}
|
}
|
||||||
@@ -1368,7 +1518,6 @@ CCollision::ProcessLineOfSight(const CColLine &line,
|
|||||||
CColTriangle *lasttri = nil;
|
CColTriangle *lasttri = nil;
|
||||||
for(i = 0; i < model.numTriangles; i++){
|
for(i = 0; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
|
|
||||||
|
|
||||||
CColTriangle *tri = &model.triangles[i];
|
CColTriangle *tri = &model.triangles[i];
|
||||||
model.vertices[tri->a].Unpack(vutri.v0);
|
model.vertices[tri->a].Unpack(vutri.v0);
|
||||||
@@ -1388,7 +1537,6 @@ CCollision::ProcessLineOfSight(const CColLine &line,
|
|||||||
float dist;
|
float dist;
|
||||||
for(; i < model.numTriangles; i++){
|
for(; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
|
|
||||||
|
|
||||||
CColTriangle *tri = &model.triangles[i];
|
CColTriangle *tri = &model.triangles[i];
|
||||||
model.vertices[tri->a].Unpack(vutri.v0);
|
model.vertices[tri->a].Unpack(vutri.v0);
|
||||||
@@ -1438,20 +1586,17 @@ CCollision::ProcessLineOfSight(const CColLine &line,
|
|||||||
float coldist = mindist;
|
float coldist = mindist;
|
||||||
for(i = 0; i < model.numSpheres; i++){
|
for(i = 0; i < model.numSpheres; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.spheres[i].surface)) continue;
|
|
||||||
ProcessLineSphere(newline, model.spheres[i], point, coldist);
|
ProcessLineSphere(newline, model.spheres[i], point, coldist);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < model.numBoxes; i++){
|
for(i = 0; i < model.numBoxes; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.boxes[i].surface)) continue;
|
|
||||||
ProcessLineBox(newline, model.boxes[i], point, coldist);
|
ProcessLineBox(newline, model.boxes[i], point, coldist);
|
||||||
}
|
}
|
||||||
|
|
||||||
CalculateTrianglePlanes(&model);
|
CalculateTrianglePlanes(&model);
|
||||||
for(i = 0; i < model.numTriangles; i++){
|
for(i = 0; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
if(ignoreShootThrough && IsShootThrough(model.triangles[i].surface)) continue;
|
|
||||||
ProcessLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist);
|
ProcessLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1468,7 +1613,7 @@ CCollision::ProcessLineOfSight(const CColLine &line,
|
|||||||
bool
|
bool
|
||||||
CCollision::ProcessVerticalLine(const CColLine &line,
|
CCollision::ProcessVerticalLine(const CColLine &line,
|
||||||
const CMatrix &matrix, CColModel &model,
|
const CMatrix &matrix, CColModel &model,
|
||||||
CColPoint &point, float &mindist, bool ignoreSeeThrough, bool ignoreShootThrough, CStoredCollPoly *poly)
|
CColPoint &point, float &mindist, bool ignoreSeeThrough, CStoredCollPoly *poly)
|
||||||
{
|
{
|
||||||
#ifdef VU_COLLISION
|
#ifdef VU_COLLISION
|
||||||
static CStoredCollPoly TempStoredPoly;
|
static CStoredCollPoly TempStoredPoly;
|
||||||
@@ -1488,13 +1633,13 @@ CCollision::ProcessVerticalLine(const CColLine &line,
|
|||||||
|
|
||||||
float coldist = 1.0f;
|
float coldist = 1.0f;
|
||||||
for(i = 0; i < model.numSpheres; i++){
|
for(i = 0; i < model.numSpheres; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThroughVertical(model.spheres[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
||||||
if(ProcessLineSphere(*(CColLine*)newline, model.spheres[i], point, coldist))
|
if(ProcessLineSphere(*(CColLine*)newline, model.spheres[i], point, coldist))
|
||||||
point.Set(0, 0, model.spheres[i].surface, model.spheres[i].piece);
|
point.Set(0, 0, model.spheres[i].surface, model.spheres[i].piece);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < model.numBoxes; i++){
|
for(i = 0; i < model.numBoxes; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThroughVertical(model.boxes[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
||||||
if(ProcessLineBox(*(CColLine*)newline, model.boxes[i], point, coldist))
|
if(ProcessLineBox(*(CColLine*)newline, model.boxes[i], point, coldist))
|
||||||
point.Set(0, 0, model.boxes[i].surface, model.boxes[i].piece);
|
point.Set(0, 0, model.boxes[i].surface, model.boxes[i].piece);
|
||||||
}
|
}
|
||||||
@@ -1506,7 +1651,7 @@ CCollision::ProcessVerticalLine(const CColLine &line,
|
|||||||
CColTriangle *lasttri = nil;
|
CColTriangle *lasttri = nil;
|
||||||
VuTriangle vutri;
|
VuTriangle vutri;
|
||||||
for(i = 0; i < model.numTriangles; i++){
|
for(i = 0; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThroughVertical(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
|
|
||||||
CColTriangle *tri = &model.triangles[i];
|
CColTriangle *tri = &model.triangles[i];
|
||||||
model.vertices[tri->a].Unpack(vutri.v0);
|
model.vertices[tri->a].Unpack(vutri.v0);
|
||||||
@@ -1525,7 +1670,7 @@ CCollision::ProcessVerticalLine(const CColLine &line,
|
|||||||
CVuVector pnt, normal;
|
CVuVector pnt, normal;
|
||||||
float dist;
|
float dist;
|
||||||
for(; i < model.numTriangles; i++){
|
for(; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThroughVertical(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
|
|
||||||
CColTriangle *tri = &model.triangles[i];
|
CColTriangle *tri = &model.triangles[i];
|
||||||
model.vertices[tri->a].Unpack(vutri.v0);
|
model.vertices[tri->a].Unpack(vutri.v0);
|
||||||
@@ -1595,27 +1740,28 @@ CCollision::ProcessVerticalLine(const CColLine &line,
|
|||||||
// transform line to model space
|
// transform line to model space
|
||||||
// Why does the game seem to do this differently than above?
|
// Why does the game seem to do this differently than above?
|
||||||
CColLine newline(MultiplyInverse(matrix, line.p0), MultiplyInverse(matrix, line.p1));
|
CColLine newline(MultiplyInverse(matrix, line.p0), MultiplyInverse(matrix, line.p1));
|
||||||
|
newline.p1.x = newline.p0.x;
|
||||||
|
newline.p1.y = newline.p0.y;
|
||||||
|
|
||||||
if(!TestLineBox(newline, model.boundingBox))
|
if(!TestVerticalLineBox(newline, model.boundingBox))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// BUG? is IsSeeThroughVertical really the right thing? also not checking shoot through
|
|
||||||
float coldist = mindist;
|
float coldist = mindist;
|
||||||
for(i = 0; i < model.numSpheres; i++){
|
for(i = 0; i < model.numSpheres; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThroughVertical(model.spheres[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.spheres[i].surface)) continue;
|
||||||
ProcessLineSphere(newline, model.spheres[i], point, coldist);
|
ProcessLineSphere(newline, model.spheres[i], point, coldist);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < model.numBoxes; i++){
|
for(i = 0; i < model.numBoxes; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThroughVertical(model.boxes[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.boxes[i].surface)) continue;
|
||||||
ProcessLineBox(newline, model.boxes[i], point, coldist);
|
ProcessLineBox(newline, model.boxes[i], point, coldist);
|
||||||
}
|
}
|
||||||
|
|
||||||
CalculateTrianglePlanes(&model);
|
CalculateTrianglePlanes(&model);
|
||||||
TempStoredPoly.valid = false;
|
TempStoredPoly.valid = false;
|
||||||
for(i = 0; i < model.numTriangles; i++){
|
for(i = 0; i < model.numTriangles; i++){
|
||||||
if(ignoreSeeThrough && IsSeeThroughVertical(model.triangles[i].surface)) continue;
|
if(ignoreSeeThrough && IsSeeThrough(model.triangles[i].surface)) continue;
|
||||||
ProcessLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist, &TempStoredPoly);
|
ProcessVerticalLineTriangle(newline, model.vertices, model.triangles[i], model.trianglePlanes[i], point, coldist, &TempStoredPoly);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(coldist < mindist){
|
if(coldist < mindist){
|
||||||
@@ -2172,15 +2318,6 @@ CCollision::CalculateTrianglePlanes(CColModel *model)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CCollision::RemoveTrianglePlanes(CColModel *model)
|
|
||||||
{
|
|
||||||
if(model->trianglePlanes){
|
|
||||||
ms_colModelCache.Remove(model->GetLinkPtr());
|
|
||||||
model->RemoveTrianglePlanes();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CCollision::DrawColModel(const CMatrix &mat, const CColModel &colModel)
|
CCollision::DrawColModel(const CMatrix &mat, const CColModel &colModel)
|
||||||
{
|
{
|
||||||
@@ -2403,75 +2540,15 @@ CCollision::DrawColModel(const CMatrix &mat, const CColModel &colModel)
|
|||||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
GetSurfaceColor(uint8 surf, uint8 &r, uint8 &g, uint8 &b)
|
|
||||||
{
|
|
||||||
// game doesn't do this
|
|
||||||
r = 255;
|
|
||||||
g = 128;
|
|
||||||
b = 0;
|
|
||||||
|
|
||||||
switch(CSurfaceTable::GetAdhesionGroup(surf)){
|
|
||||||
case ADHESIVE_RUBBER:
|
|
||||||
r = 255;
|
|
||||||
g = 0;
|
|
||||||
b = 0;
|
|
||||||
break;
|
|
||||||
case ADHESIVE_HARD:
|
|
||||||
r = 255;
|
|
||||||
g = 255;
|
|
||||||
b = 128;
|
|
||||||
break;
|
|
||||||
case ADHESIVE_ROAD:
|
|
||||||
r = 128;
|
|
||||||
g = 128;
|
|
||||||
b = 128;
|
|
||||||
break;
|
|
||||||
case ADHESIVE_LOOSE:
|
|
||||||
r = 0;
|
|
||||||
g = 255;
|
|
||||||
b = 0;
|
|
||||||
break;
|
|
||||||
case ADHESIVE_SAND:
|
|
||||||
r = 255;
|
|
||||||
g = 128;
|
|
||||||
b = 128;
|
|
||||||
break;
|
|
||||||
case ADHESIVE_WET:
|
|
||||||
r = 0;
|
|
||||||
g = 0;
|
|
||||||
b = 255;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(surf == SURFACE_SAND || surf == SURFACE_SAND_BEACH){
|
|
||||||
r = 255;
|
|
||||||
g = 255;
|
|
||||||
b = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
float f = (surf & 0xF)/32.0f + 0.5f;
|
|
||||||
r *= f;
|
|
||||||
g *= f;
|
|
||||||
b *= f;
|
|
||||||
|
|
||||||
if(surf == SURFACE_TRANSPARENT_CLOTH || surf == SURFACE_METAL_CHAIN_FENCE ||
|
|
||||||
surf == SURFACE_TRANSPARENT_STONE || surf == SURFACE_SCAFFOLD_POLE)
|
|
||||||
if(CTimer::GetFrameCounter() & 1){
|
|
||||||
r = 0;
|
|
||||||
g = 0;
|
|
||||||
b = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel, int32 id)
|
CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel, int32 id)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int s;
|
int s;
|
||||||
|
float f;
|
||||||
CVector verts[8];
|
CVector verts[8];
|
||||||
CVector min, max;
|
CVector min, max;
|
||||||
uint8 r, g, b;
|
int r, g, b;
|
||||||
RwImVertexIndex *iptr;
|
RwImVertexIndex *iptr;
|
||||||
RwIm3DVertex *vptr;
|
RwIm3DVertex *vptr;
|
||||||
|
|
||||||
@@ -2490,8 +2567,53 @@ CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel,
|
|||||||
verts[1] = mat * verts[1];
|
verts[1] = mat * verts[1];
|
||||||
verts[2] = mat * verts[2];
|
verts[2] = mat * verts[2];
|
||||||
|
|
||||||
|
// game doesn't do this
|
||||||
|
r = 255;
|
||||||
|
g = 128;
|
||||||
|
b = 0;
|
||||||
|
|
||||||
s = colModel.triangles[i].surface;
|
s = colModel.triangles[i].surface;
|
||||||
GetSurfaceColor(s, r, g, b);
|
f = (s & 0xF)/32.0f + 0.5f;
|
||||||
|
switch(CSurfaceTable::GetAdhesionGroup(s)){
|
||||||
|
case ADHESIVE_RUBBER:
|
||||||
|
r = f * 255.0f;
|
||||||
|
g = 0;
|
||||||
|
b = 0;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_HARD:
|
||||||
|
r = f*255.0f;
|
||||||
|
g = f*255.0f;
|
||||||
|
b = f*128.0f;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_ROAD:
|
||||||
|
r = f*128.0f;
|
||||||
|
g = f*128.0f;
|
||||||
|
b = f*128.0f;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_LOOSE:
|
||||||
|
r = 0;
|
||||||
|
g = f * 255.0f;
|
||||||
|
b = 0;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_WET:
|
||||||
|
r = 0;
|
||||||
|
g = 0;
|
||||||
|
b = f * 255.0f;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// this doesn't make much sense
|
||||||
|
r *= f;
|
||||||
|
g *= f;
|
||||||
|
b *= f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(s == SURFACE_TRANSPARENT_CLOTH || s == SURFACE_METAL_CHAIN_FENCE ||
|
||||||
|
s == SURFACE_TRANSPARENT_STONE || s == SURFACE_SCAFFOLD_POLE)
|
||||||
|
if(CTimer::GetFrameCounter() & 1){
|
||||||
|
r = 0;
|
||||||
|
g = 0;
|
||||||
|
b = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(s > SURFACE_METAL_GATE){
|
if(s > SURFACE_METAL_GATE){
|
||||||
r = CGeneral::GetRandomNumber();
|
r = CGeneral::GetRandomNumber();
|
||||||
@@ -2532,7 +2654,47 @@ CCollision::DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel,
|
|||||||
verts[7] = mat * CVector(max.x, max.y, max.z);
|
verts[7] = mat * CVector(max.x, max.y, max.z);
|
||||||
|
|
||||||
s = colModel.boxes[i].surface;
|
s = colModel.boxes[i].surface;
|
||||||
GetSurfaceColor(s, r, g, b);
|
f = (s & 0xF)/32.0f + 0.5f;
|
||||||
|
switch(CSurfaceTable::GetAdhesionGroup(s)){
|
||||||
|
case ADHESIVE_RUBBER:
|
||||||
|
r = f * 255.0f;
|
||||||
|
g = 0;
|
||||||
|
b = 0;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_HARD:
|
||||||
|
r = f*255.0f;
|
||||||
|
g = f*255.0f;
|
||||||
|
b = f*128.0f;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_ROAD:
|
||||||
|
r = f*128.0f;
|
||||||
|
g = f*128.0f;
|
||||||
|
b = f*128.0f;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_LOOSE:
|
||||||
|
r = 0;
|
||||||
|
g = f * 255.0f;
|
||||||
|
b = 0;
|
||||||
|
break;
|
||||||
|
case ADHESIVE_WET:
|
||||||
|
r = 0;
|
||||||
|
g = 0;
|
||||||
|
b = f * 255.0f;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// this doesn't make much sense
|
||||||
|
r *= f;
|
||||||
|
g *= f;
|
||||||
|
b *= f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(s == SURFACE_TRANSPARENT_CLOTH || s == SURFACE_METAL_CHAIN_FENCE ||
|
||||||
|
s == SURFACE_TRANSPARENT_STONE || s == SURFACE_SCAFFOLD_POLE)
|
||||||
|
if(CTimer::GetFrameCounter() & 1){
|
||||||
|
r = 0;
|
||||||
|
g = 0;
|
||||||
|
b = 0;
|
||||||
|
}
|
||||||
|
|
||||||
RenderBuffer::StartStoring(36, 8, &iptr, &vptr);
|
RenderBuffer::StartStoring(36, 8, &iptr, &vptr);
|
||||||
RwIm3DVertexSetRGBA(&vptr[0], r, g, b, 255);
|
RwIm3DVertexSetRGBA(&vptr[0], r, g, b, 255);
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ class CCollision
|
|||||||
public:
|
public:
|
||||||
static eLevelName ms_collisionInMemory;
|
static eLevelName ms_collisionInMemory;
|
||||||
static CLinkList<CColModel*> ms_colModelCache;
|
static CLinkList<CColModel*> ms_colModelCache;
|
||||||
|
#ifdef NO_ISLAND_LOADING
|
||||||
|
static bool bAlreadyLoaded;
|
||||||
|
#endif
|
||||||
|
|
||||||
static void Init(void);
|
static void Init(void);
|
||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
@@ -39,27 +42,26 @@ public:
|
|||||||
static void DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel, int32 id);
|
static void DrawColModel_Coloured(const CMatrix &mat, const CColModel &colModel, int32 id);
|
||||||
|
|
||||||
static void CalculateTrianglePlanes(CColModel *model);
|
static void CalculateTrianglePlanes(CColModel *model);
|
||||||
static void RemoveTrianglePlanes(CColModel *model);
|
|
||||||
|
|
||||||
// all these return true if there's a collision
|
// all these return true if there's a collision
|
||||||
static bool TestSphereSphere(const CSphere &s1, const CSphere &s2);
|
static bool TestSphereSphere(const CColSphere &s1, const CColSphere &s2);
|
||||||
static bool TestSphereBox(const CSphere &sph, const CBox &box);
|
static bool TestSphereBox(const CColSphere &sph, const CColBox &box);
|
||||||
static bool TestLineBox(const CColLine &line, const CBox &box);
|
static bool TestLineBox(const CColLine &line, const CColBox &box);
|
||||||
static bool TestVerticalLineBox(const CColLine &line, const CBox &box);
|
static bool TestVerticalLineBox(const CColLine &line, const CColBox &box);
|
||||||
static bool TestLineTriangle(const CColLine &line, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
|
static bool TestLineTriangle(const CColLine &line, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
|
||||||
static bool TestLineSphere(const CColLine &line, const CColSphere &sph);
|
static bool TestLineSphere(const CColLine &line, const CColSphere &sph);
|
||||||
static bool TestSphereTriangle(const CColSphere &sphere, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
|
static bool TestSphereTriangle(const CColSphere &sphere, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane);
|
||||||
static bool TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, bool ignoreSeeThrough, bool ignoreShootThrough);
|
static bool TestLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, bool ignoreSeeThrough);
|
||||||
|
|
||||||
static bool ProcessSphereSphere(const CColSphere &s1, const CColSphere &s2, CColPoint &point, float &mindistsq);
|
static bool ProcessSphereSphere(const CColSphere &s1, const CColSphere &s2, CColPoint &point, float &mindistsq);
|
||||||
static bool ProcessSphereBox(const CColSphere &sph, const CColBox &box, CColPoint &point, float &mindistsq);
|
static bool ProcessSphereBox(const CColSphere &sph, const CColBox &box, CColPoint &point, float &mindistsq);
|
||||||
static bool ProcessLineBox(const CColLine &line, const CColBox &box, CColPoint &point, float &mindist);
|
static bool ProcessLineBox(const CColLine &line, const CColBox &box, CColPoint &point, float &mindist);
|
||||||
static bool ProcessVerticalLineTriangle(const CColLine &line, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist, CStoredCollPoly *poly);
|
static bool ProcessVerticalLineTriangle(const CColLine &line, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist, CStoredCollPoly *poly);
|
||||||
static bool ProcessLineTriangle(const CColLine &line , const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist, CStoredCollPoly *poly = nil);
|
static bool ProcessLineTriangle(const CColLine &line , const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindist);
|
||||||
static bool ProcessLineSphere(const CColLine &line, const CColSphere &sphere, CColPoint &point, float &mindist);
|
static bool ProcessLineSphere(const CColLine &line, const CColSphere &sphere, CColPoint &point, float &mindist);
|
||||||
static bool ProcessSphereTriangle(const CColSphere &sph, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindistsq);
|
static bool ProcessSphereTriangle(const CColSphere &sph, const CompressedVector *verts, const CColTriangle &tri, const CColTrianglePlane &plane, CColPoint &point, float &mindistsq);
|
||||||
static bool ProcessLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough, bool ignoreShootThrough);
|
static bool ProcessLineOfSight(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough);
|
||||||
static bool ProcessVerticalLine(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough, bool ignoreShootThrough, CStoredCollPoly *poly);
|
static bool ProcessVerticalLine(const CColLine &line, const CMatrix &matrix, CColModel &model, CColPoint &point, float &mindist, bool ignoreSeeThrough, CStoredCollPoly *poly);
|
||||||
static int32 ProcessColModels(const CMatrix &matrixA, CColModel &modelA, const CMatrix &matrixB, CColModel &modelB, CColPoint *spherepoints, CColPoint *linepoints, float *linedists);
|
static int32 ProcessColModels(const CMatrix &matrixA, CColModel &modelA, const CMatrix &matrixB, CColModel &modelB, CColPoint *spherepoints, CColPoint *linepoints, float *linedists);
|
||||||
static bool IsStoredPolyStillValidVerticalLine(const CVector &pos, float z, CColPoint &point, CStoredCollPoly *poly);
|
static bool IsStoredPolyStillValidVerticalLine(const CVector &pos, float z, CColPoint &point, CStoredCollPoly *poly);
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ CColModel CTempColModels::ms_colModelPedGroundHit;
|
|||||||
CColModel CTempColModels::ms_colModelBoot1;
|
CColModel CTempColModels::ms_colModelBoot1;
|
||||||
CColModel CTempColModels::ms_colModelDoor1;
|
CColModel CTempColModels::ms_colModelDoor1;
|
||||||
CColModel CTempColModels::ms_colModelBonnet1;
|
CColModel CTempColModels::ms_colModelBonnet1;
|
||||||
CColModel CTempColModels::ms_colModelWeapon;
|
|
||||||
|
|
||||||
|
|
||||||
CColSphere s_aPedSpheres[3];
|
CColSphere s_aPedSpheres[3];
|
||||||
@@ -294,13 +293,5 @@ CTempColModels::Initialise(void)
|
|||||||
|
|
||||||
SET_COLMODEL_SPHERES(ms_colModelBodyPart2, s_aBodyPartSpheres2);
|
SET_COLMODEL_SPHERES(ms_colModelBodyPart2, s_aBodyPartSpheres2);
|
||||||
|
|
||||||
ms_colModelWeapon.boundingSphere.radius = 0.25f;
|
|
||||||
ms_colModelWeapon.boundingBox.min.x = -0.25f;
|
|
||||||
ms_colModelWeapon.boundingBox.min.y = -0.25f;
|
|
||||||
ms_colModelWeapon.boundingBox.min.z = -0.25f;
|
|
||||||
ms_colModelWeapon.boundingBox.max.x = 0.25f;
|
|
||||||
ms_colModelWeapon.boundingBox.max.y = 0.25f;
|
|
||||||
ms_colModelWeapon.boundingBox.max.z = 0.25f;
|
|
||||||
|
|
||||||
#undef SET_COLMODEL_SPHERES
|
#undef SET_COLMODEL_SPHERES
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user