aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/reVC_msvc_amd64.yml14
-rw-r--r--.github/workflows/reVC_msvc_x86.yml15
-rw-r--r--README.md64
-rw-r--r--gamefiles/TEXT/french.gxtbin467752 -> 467876 bytes
-rw-r--r--gamefiles/TEXT/german.gxtbin459466 -> 459590 bytes
-rw-r--r--gamefiles/TEXT/italian.gxtbin456762 -> 456886 bytes
-rw-r--r--gamefiles/TEXT/spanish.gxtbin454498 -> 454562 bytes
-rw-r--r--premake5.lua1
-rw-r--r--src/audio/sampman_oal.cpp19
-rw-r--r--src/control/AutoPilot.cpp8
-rw-r--r--src/control/AutoPilot.h4
-rw-r--r--src/control/CarCtrl.cpp2
-rw-r--r--src/control/Script7.cpp4
-rw-r--r--src/core/common.h2
-rw-r--r--src/core/config.h6
-rw-r--r--src/render/Hud.cpp8
-rw-r--r--utils/gxt/french.txt14
-rw-r--r--utils/gxt/german.txt14
-rw-r--r--utils/gxt/italian.txt14
-rw-r--r--utils/gxt/spanish.txt6
20 files changed, 163 insertions, 32 deletions
diff --git a/.github/workflows/reVC_msvc_amd64.yml b/.github/workflows/reVC_msvc_amd64.yml
index 71e0ff1d..49a266b7 100644
--- a/.github/workflows/reVC_msvc_amd64.yml
+++ b/.github/workflows/reVC_msvc_amd64.yml
@@ -48,14 +48,22 @@ jobs:
- name: Build
run: |
msbuild -m build/reVC.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
- - name: Pack artifacts
+ # - name: Pack artifacts
+ # run: |
+ # 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
+ - name: Move binaries to gamefiles
run: |
- 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
+ mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./gamefiles/
+ mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./gamefiles/
+ - name: Move dynamic dependencies to gamefiles
+ run: |
+ mv ./vendor/mpg123/dist/Win64/libmpg123-0.dll ./gamefiles/
+ mv ./vendor/openal-soft/dist/Win64/OpenAL32.dll ./gamefiles/
- name: Upload artifact to actions
uses: actions/upload-artifact@v2
with:
name: reVC_${{matrix.buildtype}}_${{matrix.platform}}
- path: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
+ path: ./gamefiles/*
# - name: Upload artifact to Bintray
# uses: hpcsc/upload-bintray-docker-action@v1
# with:
diff --git a/.github/workflows/reVC_msvc_x86.yml b/.github/workflows/reVC_msvc_x86.yml
index f7484ec2..21b0dda9 100644
--- a/.github/workflows/reVC_msvc_x86.yml
+++ b/.github/workflows/reVC_msvc_x86.yml
@@ -48,14 +48,23 @@ jobs:
- name: Build
run: |
msbuild -m build/reVC.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
- - name: Pack artifacts
+ # - name: Pack artifacts
+ # run: |
+ # 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
+ - name: Move binaries to gamefiles
run: |
- 7z a reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
+ mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.exe ./gamefiles/
+ mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reVC.pdb ./gamefiles/
+ - if: contains(matrix.platform, 'oal')
+ name: Move dynamic dependencies to gamefiles
+ run: |
+ mv ./vendor/mpg123/dist/Win32/libmpg123-0.dll ./gamefiles/
+ mv ./vendor/openal-soft/dist/Win32/OpenAL32.dll ./gamefiles/
- name: Upload artifact to actions
uses: actions/upload-artifact@v2
with:
name: reVC_${{matrix.buildtype}}_${{matrix.platform}}
- path: reVC_${{matrix.buildtype}}_${{matrix.platform}}.zip
+ path: ./gamefiles/*
# - name: Upload artifact to Bintray
# uses: hpcsc/upload-bintray-docker-action@v1
# with:
diff --git a/README.md b/README.md
index a51bc65c..84713f99 100644
--- a/README.md
+++ b/README.md
@@ -13,27 +13,69 @@ The aim of this project is to reverse GTA Vice City for PC.
- (Optional) If you want to use optional features, copy the files in /gamefiles folder to your game root folder.
- Move reVC.exe to GTA VC directory and run it.
-## Preparing the environment for building
+## Latest standalone executables to download
-You may want to point GTA_VC_RE_DIR environment variable to GTA VC root folder if you want executable to be moved there via post-build script.
+(Put content of selected archive into gamedir)
-- For Linux, proceed: [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux)
-- For FreeBSD, proceed: [Building on FreeBSD](https://github.com/GTAmodding/re3/wiki/Building-on-FreeBSD)
-- For Windows, assuming you have Visual Studio:
- - Clone the repo using the argument `--recursive`.
- - Run one of the `premake-vsXXXX.cmd` variants on root folder.
- - Open the project via Visual Studio
+- [Windows D3D9 MSS 32bit](https://nightly.link/GTAmodding/re3/workflows/reVC_msvc_x86/miami/reVC_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 OpenGL 64bit](https://nightly.link/GTAmodding/re3/workflows/reVC_msvc_amd64/miami/reVC_Release_win-amd64-librw_gl3_glfw-oal.zip)
+- [Linux 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/miami/ubuntu-latest-gl3.zip)
+- [MacOS 64bit](https://nightly.link/GTAmodding/re3/workflows/build-cmake-conan/miami/macos-latest-gl3.zip)
+
+## 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 executable to be moved there via post-build script.
+
+<details><summary>Linux Premake</summary>
+
+For Linux using premake, proceed: [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux)
+
+</details>
+
+<details><summary>Linux Conan</summary>
+
+Obtain source code.
+```
+git clone https://github.com/GTAmodding/re3.git reVC -b miami
+cd reVC
+git submodule init
+git submodule update --recursive
+```
+Install python and conan, and then run build.
+```
+conan export vendor/librw librw/master@
+mkdir 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 build .. -if build -bf build -pf package
+```
+</details>
+
+<details><summary>FreeBSD</summary>
+
+For FreeBSD using premake, proceed: [Building on FreeBSD](https://github.com/GTAmodding/re3/wiki/Building-on-FreeBSD)
+
+</details>
+
+<details><summary>Windows</summary>
+
+Assuming you have Visual Studio:
+- Clone the repo using the argument `--recursive`.
+- Run one of the `premake-vsXXXX.cmd` variants on root folder.
+- Open the project via Visual Studio
**If you use 64-bit D3D9**: We don't ship 64-bit Dx9 SDK. You need to download it from Microsoft if you don't have it(although it should come pre-installed after some Windows version)
-There are various settings at the very bottom of [config.h](https://github.com/GTAmodding/re3/tree/miami/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
+**If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).
+</details>
-> :information_source: **If you choose OpenAL on Windows** You must read [Running OpenAL build on Windows](https://github.com/GTAmodding/re3/wiki/Running-OpenAL-build-on-Windows).
+> :information_source: There are various settings in [config.h](https://github.com/GTAmodding/re3/tree/miami/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
> :information_source: **Did you notice librw?** reVC uses completely homebrew RenderWare-replacement rendering engine; [librw](https://github.com/aap/librw/). librw comes as submodule of reVC, but you also can use LIBRW enviorenment variable to specify path to your own librw.
## Contributing
-Please read the [Coding Style](https://github.com/GTAmodding/re3/blob/master/CODING_STYLE.md) Document
+Please read the [Coding Style](https://github.com/GTAmodding/re3/blob/miami/CODING_STYLE.md) Document
### Unreversed / incomplete classes
diff --git a/gamefiles/TEXT/french.gxt b/gamefiles/TEXT/french.gxt
index cff9f3dc..bd9c658b 100644
--- a/gamefiles/TEXT/french.gxt
+++ b/gamefiles/TEXT/french.gxt
Binary files differ
diff --git a/gamefiles/TEXT/german.gxt b/gamefiles/TEXT/german.gxt
index a418a5bc..3dbcb5ba 100644
--- a/gamefiles/TEXT/german.gxt
+++ b/gamefiles/TEXT/german.gxt
Binary files differ
diff --git a/gamefiles/TEXT/italian.gxt b/gamefiles/TEXT/italian.gxt
index 95758c81..2c2bd3bc 100644
--- a/gamefiles/TEXT/italian.gxt
+++ b/gamefiles/TEXT/italian.gxt
Binary files differ
diff --git a/gamefiles/TEXT/spanish.gxt b/gamefiles/TEXT/spanish.gxt
index ccab7047..60012324 100644
--- a/gamefiles/TEXT/spanish.gxt
+++ b/gamefiles/TEXT/spanish.gxt
Binary files differ
diff --git a/premake5.lua b/premake5.lua
index f2e6a71f..f49e024c 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -204,6 +204,7 @@ project "librw"
architecture "amd64"
filter "platforms:win*"
+ defines { "_CRT_SECURE_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE" }
staticruntime "on"
buildoptions { "/Zc:sizedDealloc-" }
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 2091fb05..ae4b1cbb 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -1908,6 +1908,9 @@ cSampleManager::StopStreamedFile(uint8 nStream)
{
delete stream;
aStream[nStream] = NULL;
+
+ if ( nStream == 0 )
+ _bIsMp3Active = false;
}
}
@@ -1920,7 +1923,21 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
if ( stream )
{
- return stream->GetPosMS();
+ if ( _bIsMp3Active )
+ {
+ tMP3Entry *mp3 = _GetMP3EntryByIndex(_CurMP3Index);
+
+ if ( mp3 != NULL )
+ {
+ return stream->GetPosMS() + mp3->nTrackStreamPos;
+ }
+ else
+ return 0;
+ }
+ else
+ {
+ return stream->GetPosMS();
+ }
}
return 0;
diff --git a/src/control/AutoPilot.cpp b/src/control/AutoPilot.cpp
index c956a6f1..d3de6ac2 100644
--- a/src/control/AutoPilot.cpp
+++ b/src/control/AutoPilot.cpp
@@ -52,8 +52,8 @@ void CAutoPilot::Save(uint8*& buf)
WriteSaveBuf<int32>(buf, m_nCurrentRouteNode);
WriteSaveBuf<int32>(buf, m_nNextRouteNode);
WriteSaveBuf<int32>(buf, m_nPrevRouteNode);
- WriteSaveBuf<uint32>(buf, m_nTimeEnteredCurve);
- WriteSaveBuf<uint32>(buf, m_nTimeToSpendOnCurrentCurve);
+ WriteSaveBuf<int32>(buf, m_nTimeEnteredCurve);
+ WriteSaveBuf<int32>(buf, m_nTimeToSpendOnCurrentCurve);
WriteSaveBuf<uint32>(buf, m_nCurrentPathNodeInfo);
WriteSaveBuf<uint32>(buf, m_nNextPathNodeInfo);
WriteSaveBuf<uint32>(buf, m_nPreviousPathNodeInfo);
@@ -95,8 +95,8 @@ void CAutoPilot::Load(uint8*& buf)
m_nCurrentRouteNode = ReadSaveBuf<int32>(buf);
m_nNextRouteNode = ReadSaveBuf<int32>(buf);
m_nPrevRouteNode = ReadSaveBuf<int32>(buf);
- m_nTimeEnteredCurve = ReadSaveBuf<uint32>(buf);
- m_nTimeToSpendOnCurrentCurve = ReadSaveBuf<uint32>(buf);
+ m_nTimeEnteredCurve = ReadSaveBuf<int32>(buf);
+ m_nTimeToSpendOnCurrentCurve = ReadSaveBuf<int32>(buf);
m_nCurrentPathNodeInfo = ReadSaveBuf<uint32>(buf);
m_nNextPathNodeInfo = ReadSaveBuf<uint32>(buf);
m_nPreviousPathNodeInfo = ReadSaveBuf<uint32>(buf);
diff --git a/src/control/AutoPilot.h b/src/control/AutoPilot.h
index aa14ccdd..ec3bb8d8 100644
--- a/src/control/AutoPilot.h
+++ b/src/control/AutoPilot.h
@@ -64,8 +64,8 @@ public:
int32 m_nCurrentRouteNode;
int32 m_nNextRouteNode;
int32 m_nPrevRouteNode;
- uint32 m_nTimeEnteredCurve;
- uint32 m_nTimeToSpendOnCurrentCurve;
+ int32 m_nTimeEnteredCurve;
+ int32 m_nTimeToSpendOnCurrentCurve;
uint32 m_nCurrentPathNodeInfo;
uint32 m_nNextPathNodeInfo;
uint32 m_nPreviousPathNodeInfo;
diff --git a/src/control/CarCtrl.cpp b/src/control/CarCtrl.cpp
index c6d78882..d05d9827 100644
--- a/src/control/CarCtrl.cpp
+++ b/src/control/CarCtrl.cpp
@@ -2757,7 +2757,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane)
up.Normalise();
CVector forward(Cos(pPlane->m_fOrientation), Sin(pPlane->m_fOrientation), fForwardZ);
forward.Normalise();
- CVector right = CrossProduct(forward, up);
+ CVector right = CrossProduct(up, forward);
right.z -= 5.0f * pPlane->m_fPlaneSteer;
right.Normalise();
up = CrossProduct(forward, right);
diff --git a/src/control/Script7.cpp b/src/control/Script7.cpp
index 34a364a7..71099cc4 100644
--- a/src/control/Script7.cpp
+++ b/src/control/Script7.cpp
@@ -431,12 +431,12 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
script_assert(pPed);
if (ScriptParams[1]) {
- pPed->bIsDucking = true;
+ pPed->bCrouchWhenShooting = true;
pPed->SetDuck(ScriptParams[2], true);
}
else {
pPed->ClearDuck(true);
- pPed->bIsDucking = false;
+ pPed->bCrouchWhenShooting = false;
}
return 0;
}
diff --git a/src/core/common.h b/src/core/common.h
index 75ba8863..d39531cc 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -355,7 +355,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
#ifndef MASTER
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
#else
-#define assert(_Expression)
+#define assert(_Expression) (_Expression)
#endif
#define ASSERT assert
diff --git a/src/core/config.h b/src/core/config.h
index e75cdfb0..cc82f8d6 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -251,6 +251,12 @@ enum Config {
#define FIX_BUGS_64 // Must have fixes to be able to run 64 bit build
#endif
+#define ASCII_STRCMP // use faster ascii str comparisons
+
+#if !defined _WIN32 || defined __MWERKS__ || defined __MINGW32__ || defined VANILLA_DEFINES
+#undef ASCII_STRCMP
+#endif
+
// Just debug menu entries
#ifdef DEBUGMENU
#define RELOADABLES // some debug menu options to reload TXD files
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index ba7d52db..91503917 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -1140,18 +1140,18 @@ void CHud::Draw()
if (IntroRect.m_nTextureId >= 0) {
CRect rect (
IntroRect.m_sRect.left,
- IntroRect.m_sRect.top,
+ IntroRect.m_sRect.bottom,
IntroRect.m_sRect.right,
- IntroRect.m_sRect.bottom );
+ IntroRect.m_sRect.top );
CTheScripts::ScriptSprites[IntroRect.m_nTextureId].Draw(rect, IntroRect.m_sColor);
}
else {
CRect rect (
IntroRect.m_sRect.left,
- IntroRect.m_sRect.top,
+ IntroRect.m_sRect.bottom,
IntroRect.m_sRect.right,
- IntroRect.m_sRect.bottom );
+ IntroRect.m_sRect.top );
CSprite2d::DrawRect(rect, IntroRect.m_sColor);
}
diff --git a/utils/gxt/french.txt b/utils/gxt/french.txt
index a7d011c3..a817ff41 100644
--- a/utils/gxt/french.txt
+++ b/utils/gxt/french.txt
@@ -14557,6 +14557,20 @@ L'heure est venue pour l'ange gardien des taxis Kaufman de froisser de la tôle!
[TAX3_5:TAXIWA3]
Hé mec, j'vais te bousiller ta caisse!
+{ re3 updates }
+{ new languages }
+[FEL_JAP]
+JAPONAIS
+
+[FEL_POL]
+POLONAIS
+
+[FEL_RUS]
+RUSSE
+
+[FEA_FMN]
+RADIO ETEINTE
+
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!
AS THE LAST LABEL DOES NOT GET COMPILED \ No newline at end of file
diff --git a/utils/gxt/german.txt b/utils/gxt/german.txt
index 965db366..a2c86414 100644
--- a/utils/gxt/german.txt
+++ b/utils/gxt/german.txt
@@ -14557,6 +14557,20 @@ Wird Zeit, dass der Schutzengel von Kaufman-Taxis eine vor den Latz kriegt!
[TAX3_5:TAXIWA3]
Hey, Freundchen, dir zieh ich das Fell über die Ohren!
+{ re3 updates }
+{ new languages }
+[FEL_JAP]
+JAPANISCH
+
+[FEL_POL]
+POLNISCH
+
+[FEL_RUS]
+RUSSISCH
+
+[FEA_FMN]
+RADIO AUS
+
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!
AS THE LAST LABEL DOES NOT GET COMPILED \ No newline at end of file
diff --git a/utils/gxt/italian.txt b/utils/gxt/italian.txt
index 7b02017f..84804cb3 100644
--- a/utils/gxt/italian.txt
+++ b/utils/gxt/italian.txt
@@ -14566,6 +14566,20 @@ La compagnia dei taxi d'ora in poi genererà introiti per un massimo di ~1~$. Ri
[TAX3_5:TAXIWA3]
Ehi ragazzo, ti abbronzo il fondoschiena!
+{ re3 updates }
+{ new languages }
+[FEL_JAP]
+GIAPPONESE
+
+[FEL_POL]
+POLACCO
+
+[FEL_RUS]
+RUSSO
+
+[FEA_FMN]
+RADIO SPENTA
+
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!
AS THE LAST LABEL DOES NOT GET COMPILED \ No newline at end of file
diff --git a/utils/gxt/spanish.txt b/utils/gxt/spanish.txt
index 335c5d2c..836d062a 100644
--- a/utils/gxt/spanish.txt
+++ b/utils/gxt/spanish.txt
@@ -14366,6 +14366,12 @@ XBOX
[FEC_IVP]
INVERTIR VERTICALIDAD MANDO
+[FEM_NON]
+NADA
+
+[FEA_FMN]
+RADIO APAGADA
+
{ end of file }
[DUMMY]
THIS LABEL NEEDS TO BE HERE !!!