mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 05:30:00 +00:00
Merge branch 'master' of github.com:GTAmodding/re3
This commit is contained in:
commit
b23bda6e45
18
README.md
18
README.md
|
@ -21,14 +21,18 @@ such that we have a working game at all times.
|
||||||
|
|
||||||
## Preparing the environment for building
|
## Preparing the environment for building
|
||||||
|
|
||||||
- Clone the repo using the argument `--recursive`.
|
You may want to point GTA_III_RE_DIR environment variable to GTA3 root folder if you want executable to be moved there via post-build script.
|
||||||
- Point GTA_III_RE_DIR environment variable to GTA3 root folder.
|
|
||||||
- Run premake
|
|
||||||
- On Windows: one of the `premake-vsXXXX.cmd` variants on root folder
|
|
||||||
- On Linux: proceed to [Building on Linux](https://github.com/GTAmodding/re3/wiki/Building-on-Linux).
|
|
||||||
- There are various settings at the very bottom of [config.h](https://github.com/GTAmodding/re3/tree/master/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
|
|
||||||
- **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)
|
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
**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/master/src/core/config.h), you may want to take a look there. i.e. FIX_BUGS define fixes the bugs we've come across.
|
||||||
|
|
||||||
> :information_source: **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: **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).
|
||||||
|
|
||||||
|
|
|
@ -1260,9 +1260,9 @@ bool CGarage::IsPlayerOutsideGarage()
|
||||||
bool CGarage::IsEntityTouching3D(CEntity * pEntity)
|
bool CGarage::IsEntityTouching3D(CEntity * pEntity)
|
||||||
{
|
{
|
||||||
float radius = pEntity->GetBoundRadius();
|
float radius = pEntity->GetBoundRadius();
|
||||||
if (pEntity->GetPosition().x - radius < m_fX1 || pEntity->GetPosition().x + radius > m_fX2 ||
|
if (m_fX1 - radius > pEntity->GetPosition().x || m_fX2 + radius < pEntity->GetPosition().x ||
|
||||||
pEntity->GetPosition().y - radius < m_fY1 || pEntity->GetPosition().y + radius > m_fY2 ||
|
m_fY1 - radius > pEntity->GetPosition().y || m_fY2 + radius < pEntity->GetPosition().y ||
|
||||||
pEntity->GetPosition().z - radius < m_fZ1 || pEntity->GetPosition().z + radius > m_fZ2)
|
m_fZ1 - radius > pEntity->GetPosition().z || m_fZ2 + radius < pEntity->GetPosition().z)
|
||||||
return false;
|
return false;
|
||||||
CColModel* pColModel = pEntity->GetColModel();
|
CColModel* pColModel = pEntity->GetColModel();
|
||||||
for (int i = 0; i < pColModel->numSpheres; i++) {
|
for (int i = 0; i < pColModel->numSpheres; i++) {
|
||||||
|
@ -1271,10 +1271,10 @@ bool CGarage::IsEntityTouching3D(CEntity * pEntity)
|
||||||
if (pos.x + radius > m_fX1 && pos.x - radius < m_fX2 &&
|
if (pos.x + radius > m_fX1 && pos.x - radius < m_fX2 &&
|
||||||
pos.y + radius > m_fY1 && pos.y - radius < m_fY2 &&
|
pos.y + radius > m_fY1 && pos.y - radius < m_fY2 &&
|
||||||
pos.z + radius > m_fZ1 && pos.z - radius < m_fZ2)
|
pos.z + radius > m_fZ1 && pos.z - radius < m_fZ2)
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool CGarage::EntityHasASphereWayOutsideGarage(CEntity * pEntity, float fMargin)
|
bool CGarage::EntityHasASphereWayOutsideGarage(CEntity * pEntity, float fMargin)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
|
#include "Font.h"
|
||||||
#include "MemoryHeap.h"
|
#include "MemoryHeap.h"
|
||||||
|
|
||||||
bool CStreaming::ms_disableStreaming;
|
bool CStreaming::ms_disableStreaming;
|
||||||
|
@ -290,6 +291,11 @@ CStreaming::Shutdown(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef MASTER
|
||||||
|
uint64 timeProcessingTXD;
|
||||||
|
uint64 timeProcessingDFF;
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
CStreaming::Update(void)
|
CStreaming::Update(void)
|
||||||
{
|
{
|
||||||
|
@ -297,6 +303,11 @@ CStreaming::Update(void)
|
||||||
CStreamingInfo *si, *prev;
|
CStreamingInfo *si, *prev;
|
||||||
bool requestedSubway = false;
|
bool requestedSubway = false;
|
||||||
|
|
||||||
|
#ifndef MASTER
|
||||||
|
timeProcessingTXD = 0;
|
||||||
|
timeProcessingDFF = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
UpdateMemoryUsed();
|
UpdateMemoryUsed();
|
||||||
|
|
||||||
if(ms_channelError != -1){
|
if(ms_channelError != -1){
|
||||||
|
@ -332,6 +343,14 @@ CStreaming::Update(void)
|
||||||
|
|
||||||
LoadRequestedModels();
|
LoadRequestedModels();
|
||||||
|
|
||||||
|
#ifndef MASTER
|
||||||
|
if (CPad::GetPad(1)->GetLeftShoulder1JustDown() && CPad::GetPad(1)->GetRightShoulder1() && CPad::GetPad(1)->GetRightShoulder2())
|
||||||
|
PrintStreamingBufferState();
|
||||||
|
|
||||||
|
// TODO: PrintRequestList
|
||||||
|
//if (CPad::GetPad(1)->GetLeftShoulder2JustDown() && CPad::GetPad(1)->GetRightShoulder1() && CPad::GetPad(1)->GetRightShoulder2())
|
||||||
|
// PrintRequestList();
|
||||||
|
#endif
|
||||||
|
|
||||||
for(si = ms_endRequestedList.m_prev; si != &ms_startRequestedList; si = prev){
|
for(si = ms_endRequestedList.m_prev; si != &ms_startRequestedList; si = prev){
|
||||||
prev = si->m_prev;
|
prev = si->m_prev;
|
||||||
|
@ -2665,3 +2684,71 @@ CStreaming::UpdateForAnimViewer(void)
|
||||||
CStreaming::RetryLoadFile(CStreaming::ms_channelError);
|
CStreaming::RetryLoadFile(CStreaming::ms_channelError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
CStreaming::PrintStreamingBufferState()
|
||||||
|
{
|
||||||
|
char str[128];
|
||||||
|
wchar wstr[128];
|
||||||
|
uint32 offset, size;
|
||||||
|
|
||||||
|
CTimer::Stop();
|
||||||
|
int i = 0;
|
||||||
|
while (i < NUMSTREAMINFO) {
|
||||||
|
while (true) {
|
||||||
|
int j = 0;
|
||||||
|
DoRWStuffStartOfFrame(50, 50, 50, 0, 0, 0, 255);
|
||||||
|
CPad::UpdatePads();
|
||||||
|
CSprite2d::InitPerFrame();
|
||||||
|
CFont::InitPerFrame();
|
||||||
|
DefinedState();
|
||||||
|
|
||||||
|
CRect unusedRect(0, 0, RsGlobal.maximumWidth, RsGlobal.maximumHeight);
|
||||||
|
CRGBA unusedColor(255, 255, 255, 255);
|
||||||
|
CFont::SetFontStyle(FONT_BANK);
|
||||||
|
CFont::SetBackgroundOff();
|
||||||
|
CFont::SetWrapx(DEFAULT_SCREEN_WIDTH);
|
||||||
|
CFont::SetScale(0.5f, 0.75f);
|
||||||
|
CFont::SetCentreOff();
|
||||||
|
CFont::SetCentreSize(DEFAULT_SCREEN_WIDTH);
|
||||||
|
CFont::SetJustifyOff();
|
||||||
|
CFont::SetColor(CRGBA(200, 200, 200, 200));
|
||||||
|
CFont::SetBackGroundOnlyTextOff();
|
||||||
|
int modelIndex = i;
|
||||||
|
if (modelIndex < NUMSTREAMINFO) {
|
||||||
|
int y = 24;
|
||||||
|
for ( ; j < 34 && modelIndex < NUMSTREAMINFO; modelIndex++) {
|
||||||
|
CStreamingInfo *streamingInfo = &ms_aInfoForModel[modelIndex];
|
||||||
|
CBaseModelInfo *modelInfo = CModelInfo::GetModelInfo(modelIndex);
|
||||||
|
if (streamingInfo->m_loadState != STREAMSTATE_LOADED || !streamingInfo->GetCdPosnAndSize(offset, size))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (modelIndex >= STREAM_OFFSET_TXD)
|
||||||
|
sprintf(str, "txd %s, refs %d, size %dK, flags 0x%x", CTxdStore::GetTxdName(modelIndex - STREAM_OFFSET_TXD),
|
||||||
|
CTxdStore::GetNumRefs(modelIndex - STREAM_OFFSET_TXD), 2 * size, streamingInfo->m_flags);
|
||||||
|
else
|
||||||
|
sprintf(str, "model %d,%s, refs%d, size%dK, flags%x", modelIndex, modelInfo->GetName(), modelInfo->GetNumRefs(), 2 * size,
|
||||||
|
streamingInfo->m_flags);
|
||||||
|
AsciiToUnicode(str, wstr);
|
||||||
|
CFont::PrintString(24.0f, y, wstr);
|
||||||
|
y += 12;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CPad::GetPad(1)->GetCrossJustDown())
|
||||||
|
i = modelIndex;
|
||||||
|
|
||||||
|
if (!CPad::GetPad(1)->GetTriangleJustDown())
|
||||||
|
break;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
CFont::DrawFonts();
|
||||||
|
DoRWStuffEndOfFrame();
|
||||||
|
}
|
||||||
|
CFont::DrawFonts();
|
||||||
|
DoRWStuffEndOfFrame();
|
||||||
|
}
|
||||||
|
CTimer::Update();
|
||||||
|
}
|
|
@ -188,4 +188,6 @@ public:
|
||||||
static void MemoryCardLoad(uint8 *buffer, uint32 length);
|
static void MemoryCardLoad(uint8 *buffer, uint32 length);
|
||||||
|
|
||||||
static void UpdateForAnimViewer(void);
|
static void UpdateForAnimViewer(void);
|
||||||
|
|
||||||
|
static void PrintStreamingBufferState();
|
||||||
};
|
};
|
||||||
|
|
2
vendor/ogg
vendored
2
vendor/ogg
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 36f969bb37559345ee03796ed625a9abd42c6db9
|
Subproject commit 31bd3f2707fb7dbae539a7093ba1fc4b2b37d84e
|
2
vendor/opus
vendored
2
vendor/opus
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 034c1b61a250457649d788bbf983b3f0fb63f02e
|
Subproject commit 841d57b82a516ccc6e90d1d4aee8d4a7f0d00010
|
Loading…
Reference in a new issue