mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-23 01:57:21 +03:00
Symbian^3 port
This commit is contained in:
parent
77cdaaf97e
commit
3eb71f2cc5
106 changed files with 2098 additions and 745 deletions
|
|
@ -3813,7 +3813,9 @@ CCam::Process_Debug(const CVector&, float, float, float)
|
|||
Front.Normalise();
|
||||
Source = Source + Front*Speed;
|
||||
|
||||
Up = CVector{ 0.0f, 0.0f, 1.0f };
|
||||
Up.x = 0.0f;
|
||||
Up.y = 0.0f;
|
||||
Up.z = 1.0f;
|
||||
CVector Right = CrossProduct(Front, Up);
|
||||
Up = CrossProduct(Right, Front);
|
||||
Source = Source + Up*PanSpeedY + Right*PanSpeedX;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@
|
|||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#ifndef __SYMBIAN32__
|
||||
#include <sys/statvfs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
|
@ -38,7 +40,8 @@ re3_sem_open(void)
|
|||
{
|
||||
sem_t* sem = (sem_t*)malloc(sizeof(sem_t));
|
||||
if (sem_init(sem, 0, 1) == -1) {
|
||||
sem = SEM_FAILED;
|
||||
free(sem);
|
||||
sem = (sem_t*)SEM_FAILED;
|
||||
}
|
||||
|
||||
return sem;
|
||||
|
|
@ -135,7 +138,7 @@ CdStreamInitThread(void)
|
|||
gCdStreamSema = RE3_SEM_OPEN("/semaphore_cd_stream");
|
||||
|
||||
|
||||
if (gCdStreamSema == SEM_FAILED) {
|
||||
if (gCdStreamSema == (sem_t*)SEM_FAILED) {
|
||||
CDTRACE("failed to create stream semaphore");
|
||||
ASSERT(0);
|
||||
return;
|
||||
|
|
@ -148,7 +151,7 @@ CdStreamInitThread(void)
|
|||
{
|
||||
gpReadInfo[i].pDoneSemaphore = RE3_SEM_OPEN("/semaphore_done%d", i);
|
||||
|
||||
if (gpReadInfo[i].pDoneSemaphore == SEM_FAILED)
|
||||
if (gpReadInfo[i].pDoneSemaphore == (sem_t*)SEM_FAILED)
|
||||
{
|
||||
CDTRACE("failed to create sync semaphore");
|
||||
ASSERT(0);
|
||||
|
|
@ -158,7 +161,7 @@ CdStreamInitThread(void)
|
|||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
gpReadInfo[i].pStartSemaphore = RE3_SEM_OPEN("/semaphore_start%d", i);
|
||||
|
||||
if (gpReadInfo[i].pStartSemaphore == SEM_FAILED)
|
||||
if (gpReadInfo[i].pStartSemaphore == (sem_t*)SEM_FAILED)
|
||||
{
|
||||
CDTRACE("failed to create start semaphore");
|
||||
ASSERT(0);
|
||||
|
|
@ -198,6 +201,7 @@ CdStreamInitThread(void)
|
|||
void
|
||||
CdStreamInit(int32 numChannels)
|
||||
{
|
||||
#if !defined __SYMBIAN32__
|
||||
struct statvfs fsInfo;
|
||||
|
||||
if((statvfs("models/gta3.img", &fsInfo)) < 0)
|
||||
|
|
@ -206,6 +210,7 @@ CdStreamInit(int32 numChannels)
|
|||
ASSERT(0);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef __linux__
|
||||
_gdwCdStreamFlags = O_RDONLY | O_NOATIME;
|
||||
#else
|
||||
|
|
@ -219,8 +224,10 @@ CdStreamInit(int32 numChannels)
|
|||
debug("Using no buffered loading for streaming\n");
|
||||
}
|
||||
*/
|
||||
#if !defined __SYMBIAN32__
|
||||
void *pBuffer = (void *)RwMallocAlign(CDSTREAM_SECTOR_SIZE, (RwUInt32)fsInfo.f_bsize);
|
||||
ASSERT( pBuffer != nil );
|
||||
#endif
|
||||
|
||||
gNumImages = 0;
|
||||
|
||||
|
|
@ -234,8 +241,10 @@ CdStreamInit(int32 numChannels)
|
|||
|
||||
CdStreamInitThread();
|
||||
|
||||
#if !defined __SYMBIAN32__
|
||||
ASSERT( pBuffer != nil );
|
||||
RwFreeAlign(pBuffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32
|
||||
|
|
@ -531,6 +540,7 @@ void *CdStreamThread(void *param)
|
|||
free(gpReadInfo);
|
||||
gpReadInfo = nil;
|
||||
pthread_exit(nil);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ void CControllerConfigManager::MakeControllerActionsBlank()
|
|||
|
||||
#ifdef RW_GL3
|
||||
int MapIdToButtonId(int mapId) {
|
||||
#ifdef __SYMBIAN32__
|
||||
// TODO
|
||||
return mapId + 1;
|
||||
#else
|
||||
switch (mapId) {
|
||||
case GLFW_GAMEPAD_BUTTON_A: // Cross
|
||||
return 2;
|
||||
|
|
@ -82,6 +86,7 @@ int MapIdToButtonId(int mapId) {
|
|||
default:
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -2771,8 +2776,10 @@ void CControllerConfigManager::UpdateJoyButtonState(int32 padnumber)
|
|||
#elif defined RW_GL3
|
||||
if (m_NewState.isGamepad) {
|
||||
for (int32 i = 0; i < MAX_BUTTONS; i++) {
|
||||
#if !defined __SYMBIAN32__
|
||||
if (i == GLFW_GAMEPAD_BUTTON_GUIDE)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
m_aButtonStates[MapIdToButtonId(i)-1] = m_NewState.mappedButtons[i];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1447,9 +1447,9 @@ CFileLoader::Load2dEffect(const char *line)
|
|||
sscanf(line, "%d %f %f %f %d %d %d %d %d %d %f %f %f %f",
|
||||
&id, &x, &y, &z, &r, &g, &b, &a, &type,
|
||||
&effect->particle.particleType,
|
||||
&effect->particle.dir.x,
|
||||
&effect->particle.dir.y,
|
||||
&effect->particle.dir.z,
|
||||
&effect->particle.dirX,
|
||||
&effect->particle.dirY,
|
||||
&effect->particle.dirZ,
|
||||
&effect->particle.scale);
|
||||
break;
|
||||
|
||||
|
|
@ -1457,9 +1457,9 @@ CFileLoader::Load2dEffect(const char *line)
|
|||
sscanf(line, "%d %f %f %f %d %d %d %d %d %d %f %f %f %d",
|
||||
&id, &x, &y, &z, &r, &g, &b, &a, &type,
|
||||
&flags,
|
||||
&effect->attractor.dir.x,
|
||||
&effect->attractor.dir.y,
|
||||
&effect->attractor.dir.z,
|
||||
&effect->attractor.dirX,
|
||||
&effect->attractor.dirY,
|
||||
&effect->attractor.dirZ,
|
||||
&probability);
|
||||
effect->attractor.type = flags;
|
||||
#ifdef FIX_BUGS
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "Messages.h"
|
||||
#include "FileLoader.h"
|
||||
#include "frontendoption.h"
|
||||
#include "inifile.h"
|
||||
|
||||
// Game has colors inlined in code.
|
||||
// For easier modification we collect them here:
|
||||
|
|
@ -802,6 +803,8 @@ CMenuManager::CentreMousePointer()
|
|||
Point.y = SCREEN_HEIGHT / 2;
|
||||
ClientToScreen(PSGLOBAL(window), &Point);
|
||||
SetCursorPos(Point.x, Point.y);
|
||||
#elif defined __SYMBIAN32__
|
||||
// TODO
|
||||
#elif defined RW_GL3
|
||||
glfwSetCursorPos(PSGLOBAL(window), SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2);
|
||||
#endif
|
||||
|
|
@ -908,10 +911,10 @@ CMenuManager::CheckSliderMovement(int value)
|
|||
break;
|
||||
case MENUACTION_DRAWDIST:
|
||||
if(value > 0)
|
||||
m_PrefsLOD += ((1.8f - 0.8f) / MENUSLIDER_LOGICAL_BARS);
|
||||
m_PrefsLOD += ((1.8f - 0.4f) / MENUSLIDER_LOGICAL_BARS);
|
||||
else
|
||||
m_PrefsLOD -= ((1.8f - 0.8f) / MENUSLIDER_LOGICAL_BARS);
|
||||
m_PrefsLOD = Clamp(m_PrefsLOD, 0.8f, 1.8f);
|
||||
m_PrefsLOD -= ((1.8f - 0.4f) / MENUSLIDER_LOGICAL_BARS);
|
||||
m_PrefsLOD = Clamp(m_PrefsLOD, 0.4f, 1.8f);
|
||||
CRenderer::ms_lodDistScale = m_PrefsLOD;
|
||||
break;
|
||||
case MENUACTION_MUSICVOLUME:
|
||||
|
|
@ -1807,7 +1810,7 @@ CMenuManager::Draw()
|
|||
ProcessSlider(m_PrefsBrightness / 512.0f, HOVEROPTION_INCREASE_BRIGHTNESS, HOVEROPTION_DECREASE_BRIGHTNESS, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
|
||||
break;
|
||||
case MENUACTION_DRAWDIST:
|
||||
ProcessSlider((m_PrefsLOD - 0.8f) * 1.0f, HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
|
||||
ProcessSlider((m_PrefsLOD - 0.4f) * 1.0f, HOVEROPTION_INCREASE_DRAWDIST, HOVEROPTION_DECREASE_DRAWDIST, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
|
||||
break;
|
||||
case MENUACTION_MUSICVOLUME:
|
||||
ProcessSlider(m_PrefsMusicVolume / 128.0f, HOVEROPTION_INCREASE_MUSICVOLUME, HOVEROPTION_DECREASE_MUSICVOLUME, MENU_X_LEFT_ALIGNED(170.0f), SCREEN_WIDTH);
|
||||
|
|
@ -3752,6 +3755,7 @@ CMenuManager::LoadSettings()
|
|||
#else
|
||||
CMBlur::BlurOn = true;
|
||||
#endif
|
||||
CMBlur::BlurOn = false;
|
||||
MousePointerStateHelper.bInvertVertically = true;
|
||||
|
||||
// 50 is silly
|
||||
|
|
@ -5099,9 +5103,11 @@ CMenuManager::ProcessButtonPresses(void)
|
|||
m_PrefsFrameLimiter = true;
|
||||
m_PrefsBrightness = 256;
|
||||
m_PrefsVsyncDisp = true;
|
||||
m_PrefsLOD = 1.2f;
|
||||
m_PrefsLOD = 0.7f;
|
||||
m_PrefsVsync = true;
|
||||
CRenderer::ms_lodDistScale = 1.2f;
|
||||
CRenderer::ms_lodDistScale = 0.7f;
|
||||
CIniFile::PedNumberMultiplier = 0.6f;
|
||||
CIniFile::CarNumberMultiplier = 0.6f;
|
||||
#ifdef ASPECT_RATIO_SCALE
|
||||
m_PrefsUseWideScreen = AR_AUTO;
|
||||
#else
|
||||
|
|
@ -5139,6 +5145,8 @@ CMenuManager::ProcessButtonPresses(void)
|
|||
PSGLOBAL(joy1)->GetCapabilities(&devCaps);
|
||||
ControlsManager.InitDefaultControlConfigJoyPad(devCaps.dwButtons);
|
||||
}
|
||||
#elif defined __SYMBIAN32__
|
||||
// TODO
|
||||
#else
|
||||
if (PSGLOBAL(joy1id) != -1 && glfwJoystickPresent(PSGLOBAL(joy1id))) {
|
||||
int count;
|
||||
|
|
@ -5649,7 +5657,7 @@ void
|
|||
CMenuManager::ShutdownJustMenu()
|
||||
{
|
||||
// In case we're windowed, keep mouse centered while in game. Done in main.cpp in other conditions.
|
||||
#if defined(RW_GL3) && defined(IMPROVED_VIDEOMODE)
|
||||
#if defined(RW_GL3) && defined(IMPROVED_VIDEOMODE) && !defined(__SYMBIAN32__)
|
||||
glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR, GLFW_CURSOR_DISABLED);
|
||||
#endif
|
||||
m_bMenuActive = false;
|
||||
|
|
@ -5758,7 +5766,7 @@ CMenuManager::SwitchMenuOnAndOff()
|
|||
m_bMenuStateChanged = true;
|
||||
|
||||
// In case we're windowed, keep mouse centered while in game. Done in main.cpp in other conditions.
|
||||
#if defined(RW_GL3) && defined(IMPROVED_VIDEOMODE)
|
||||
#if defined(RW_GL3) && defined(IMPROVED_VIDEOMODE) && !defined(__SYMBIAN32__)
|
||||
glfwSetInputMode(PSGLOBAL(window), GLFW_CURSOR, m_bMenuActive && m_nPrefsWindowed ? GLFW_CURSOR_HIDDEN : GLFW_CURSOR_DISABLED);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -667,6 +667,13 @@ public:
|
|||
static int8 m_nPrefsMSAALevel;
|
||||
static int8 m_nDisplayMSAALevel;
|
||||
#endif
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
#undef LANGUAGE_FRENCH
|
||||
#undef LANGUAGE_GERMAN
|
||||
#undef LANGUAGE_ITALIAN
|
||||
#undef LANGUAGE_SPANISH
|
||||
#endif
|
||||
|
||||
enum LANGUAGE
|
||||
{
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ CGame::InitialiseRenderWare(void)
|
|||
return (false);
|
||||
}
|
||||
|
||||
RwCameraSetFarClipPlane(Scene.camera, 2000.0f); // 250.0f on PS2 but who cares
|
||||
RwCameraSetFarClipPlane(Scene.camera, 250.0f); // 250.0f on PS2 but who cares
|
||||
RwCameraSetNearClipPlane(Scene.camera, 0.9f);
|
||||
|
||||
CameraSize(Scene.camera, nil, DEFAULT_VIEWWINDOW, DEFAULT_ASPECT_RATIO);
|
||||
|
|
|
|||
|
|
@ -7,12 +7,13 @@
|
|||
#include "main.h"
|
||||
#include "Population.h"
|
||||
|
||||
float CIniFile::PedNumberMultiplier = 1.0f;
|
||||
float CIniFile::CarNumberMultiplier = 1.0f;
|
||||
float CIniFile::PedNumberMultiplier = 0.6f;
|
||||
float CIniFile::CarNumberMultiplier = 0.6f;
|
||||
|
||||
void CIniFile::LoadIniFile()
|
||||
{
|
||||
CFileMgr::SetDir("");
|
||||
#if 0
|
||||
int f = CFileMgr::OpenFile("gta3.ini", "r");
|
||||
if (f){
|
||||
CFileMgr::ReadLine(f, gString, 200);
|
||||
|
|
@ -23,6 +24,7 @@ void CIniFile::LoadIniFile()
|
|||
CarNumberMultiplier = Min(3.0f, Max(0.5f, CarNumberMultiplier));
|
||||
CFileMgr::CloseFile(f);
|
||||
}
|
||||
#endif
|
||||
CPopulation::MaxNumberOfPedsInUse = DEFAULT_MAX_NUMBER_OF_PEDS * PedNumberMultiplier;
|
||||
CCarCtrl::MaxNumberOfCarsInUse = DEFAULT_MAX_NUMBER_OF_CARS * CarNumberMultiplier;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,12 +158,14 @@ void RestoreDefDisplay(int8 action) {
|
|||
TheCamera.bFreeCam = false;
|
||||
#endif
|
||||
#ifdef PED_CAR_DENSITY_SLIDERS
|
||||
CIniFile::PedNumberMultiplier = 0.6f;
|
||||
CIniFile::CarNumberMultiplier = 0.6f;
|
||||
CIniFile::LoadIniFile();
|
||||
#endif
|
||||
#ifdef GRAPHICS_MENU_OPTIONS // otherwise Frontend will handle those
|
||||
CMenuManager::m_PrefsBrightness = 256;
|
||||
CMenuManager::m_PrefsLOD = 1.2f;
|
||||
CRenderer::ms_lodDistScale = 1.2f;
|
||||
CMenuManager::m_PrefsLOD = 0.7f;
|
||||
CRenderer::ms_lodDistScale = 0.7f;
|
||||
CMenuManager::m_PrefsShowSubtitles = true;
|
||||
FrontEndMenuManager.SaveSettings();
|
||||
#endif
|
||||
|
|
@ -395,6 +397,10 @@ void ControllerTypeAfterChange(int8 before, int8 after)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
CCustomScreenLayout graphicsSettingsLayout = {MENUSPRITE_MAINMENU, 50, 0, 20, FONT_HEADING, FESCREEN_LEFT_ALIGN, true, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE};
|
||||
#endif
|
||||
|
||||
CMenuScreenCustom aScreens[MENUPAGES] = {
|
||||
// MENUPAGE_NONE = 0
|
||||
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, nil, nil, },
|
||||
|
|
@ -891,7 +897,7 @@ CMenuScreenCustom aScreens[MENUPAGES] = {
|
|||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
// MENUPAGE_GRAPHICS_SETTINGS
|
||||
{ "FET_GFX", MENUPAGE_OPTIONS, MENUPAGE_OPTIONS,
|
||||
new CCustomScreenLayout({MENUSPRITE_MAINMENU, 50, 0, 20, FONT_HEADING, FESCREEN_LEFT_ALIGN, true, MEDIUMTEXT_X_SCALE, MEDIUMTEXT_Y_SCALE}), GraphicsGoBack,
|
||||
new CCustomScreenLayout(graphicsSettingsLayout), GraphicsGoBack,
|
||||
|
||||
#ifndef GTA_HANDHELD
|
||||
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS },
|
||||
|
|
|
|||
|
|
@ -526,11 +526,16 @@ CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
|
|||
state.WHEELUP = true;
|
||||
}
|
||||
}
|
||||
#elif defined __SYMBIAN32__
|
||||
// TODO
|
||||
state.LMB = true;
|
||||
#else
|
||||
// It seems there is no way to get number of buttons on mouse, so assign all buttons if we have mouse.
|
||||
double xpos = 1.0f, ypos;
|
||||
#ifndef __SYMBIAN32__
|
||||
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
|
||||
|
||||
#endif
|
||||
|
||||
if (xpos != 0.f) {
|
||||
state.MMB = true;
|
||||
state.RMB = true;
|
||||
|
|
@ -585,11 +590,17 @@ void CPad::UpdateMouse()
|
|||
NewMouseControllerState = PCTempMouseControllerState;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if defined __SYMBIAN32__
|
||||
if ( IsForegroundApp() /*&& PSGLOBAL(cursorIsInWindow)*/ )
|
||||
#else
|
||||
if ( IsForegroundApp() && PSGLOBAL(cursorIsInWindow) )
|
||||
#endif
|
||||
{
|
||||
double xpos = 1.0f, ypos;
|
||||
#ifndef __SYMBIAN32__
|
||||
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
|
||||
#endif
|
||||
if (xpos == 0.f)
|
||||
return;
|
||||
|
||||
|
|
@ -608,12 +619,14 @@ void CPad::UpdateMouse()
|
|||
|
||||
PCTempMouseControllerState.x = (float)(signX * (xpos - PSGLOBAL(lastMousePos.x)));
|
||||
PCTempMouseControllerState.y = (float)(signy * (ypos - PSGLOBAL(lastMousePos.y)));
|
||||
#ifndef __SYMBIAN32__
|
||||
PCTempMouseControllerState.LMB = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_LEFT);
|
||||
PCTempMouseControllerState.RMB = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_RIGHT);
|
||||
PCTempMouseControllerState.MMB = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_MIDDLE);
|
||||
PCTempMouseControllerState.MXB1 = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_4);
|
||||
PCTempMouseControllerState.MXB2 = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_5);
|
||||
|
||||
#endif
|
||||
|
||||
if (PSGLOBAL(mouseWheel) > 0)
|
||||
PCTempMouseControllerState.WHEELUP = 1;
|
||||
else if (PSGLOBAL(mouseWheel) < 0)
|
||||
|
|
|
|||
|
|
@ -412,6 +412,8 @@ FindPlayerCoors(void)
|
|||
return TheCamera.GetPosition();
|
||||
#endif
|
||||
CPlayerPed *ped = FindPlayerPed();
|
||||
if (!ped)
|
||||
return TheCamera.GetPosition();
|
||||
if(ped->InVehicle())
|
||||
return ped->m_pMyVehicle->GetPosition();
|
||||
else
|
||||
|
|
@ -659,4 +661,4 @@ CPlayerInfo::DeletePlayerSkin()
|
|||
m_pSkinTexture = nil;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ int32 islandLODcomSub;
|
|||
int32 islandLODsubInd;
|
||||
int32 islandLODsubCom;
|
||||
|
||||
#define STREAMING_MEM_SIZE (10 * 1024 * 1024)
|
||||
|
||||
bool
|
||||
CStreamingInfo::GetCdPosnAndSize(uint32 &posn, uint32 &size)
|
||||
{
|
||||
|
|
@ -219,11 +221,13 @@ CStreaming::Init2(void)
|
|||
#ifdef GTA_PC
|
||||
#define MB (1024*1024)
|
||||
|
||||
extern size_t _dwMemAvailPhys;
|
||||
ms_memoryAvailable = (_dwMemAvailPhys - 10*MB)/2;
|
||||
if(ms_memoryAvailable < 50*MB)
|
||||
ms_memoryAvailable = 50*MB;
|
||||
desiredNumVehiclesLoaded = (int32)((ms_memoryAvailable / MB - 50) / 3 + 12);
|
||||
// extern size_t _dwMemAvailPhys;
|
||||
// ms_memoryAvailable = (_dwMemAvailPhys - 10*MB)/2;
|
||||
// if(ms_memoryAvailable < 50*MB)
|
||||
// ms_memoryAvailable = 50*MB;
|
||||
// desiredNumVehiclesLoaded = (int32)((ms_memoryAvailable / MB - 50) / 3 + 12);
|
||||
ms_memoryAvailable = STREAMING_MEM_SIZE;
|
||||
desiredNumVehiclesLoaded = 12;
|
||||
if(desiredNumVehiclesLoaded > MAXVEHICLESLOADED)
|
||||
desiredNumVehiclesLoaded = MAXVEHICLESLOADED;
|
||||
debug("Memory allocated to Streaming is %zuMB", ms_memoryAvailable/MB); // original modifier was %d
|
||||
|
|
@ -2687,9 +2691,10 @@ CStreaming::MakeSpaceFor(int32 size)
|
|||
#ifdef FIX_BUGS
|
||||
#define MB (1024 * 1024)
|
||||
if(ms_memoryAvailable == 0) {
|
||||
extern size_t _dwMemAvailPhys;
|
||||
ms_memoryAvailable = (_dwMemAvailPhys - 10 * MB) / 2;
|
||||
if(ms_memoryAvailable < 50 * MB) ms_memoryAvailable = 50 * MB;
|
||||
// extern size_t _dwMemAvailPhys;
|
||||
// ms_memoryAvailable = (_dwMemAvailPhys - 10 * MB) / 2;
|
||||
// if(ms_memoryAvailable < 50 * MB) ms_memoryAvailable = 50 * MB;
|
||||
ms_memoryAvailable = STREAMING_MEM_SIZE;
|
||||
}
|
||||
#undef MB
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -278,6 +278,7 @@ void CTimer::Resume(void)
|
|||
oldPcTimer += RsTimer() - suspendPcTimer;
|
||||
}
|
||||
|
||||
#ifndef __SYMBIAN32__
|
||||
uint32 CTimer::GetCyclesPerMillisecond(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
|
@ -287,6 +288,7 @@ uint32 CTimer::GetCyclesPerMillisecond(void)
|
|||
#endif
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32 CTimer::GetCurrentTimeInCycles(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
#define CTimer CTimer2
|
||||
class CTimer2
|
||||
#else
|
||||
class CTimer
|
||||
#endif
|
||||
{
|
||||
|
||||
static uint32 m_snTimeInMilliseconds;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@
|
|||
#include "Debug.h"
|
||||
#include "Renderer.h"
|
||||
|
||||
#if defined __ARMCC_VERSION && !defined _DEBUG
|
||||
#pragma O2
|
||||
#endif
|
||||
|
||||
int32 CCullZones::NumCullZones;
|
||||
CCullZone CCullZones::aZones[NUMCULLZONES];
|
||||
int32 CCullZones::NumAttributeZones;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#pragma warning(disable: 4838) // narrowing conversion
|
||||
#pragma warning(disable: 4996) // POSIX names
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if defined __MWERKS__ || defined __SYMBIAN32__
|
||||
#define __STDC_LIMIT_MACROS // so we get UINT32_MAX etc
|
||||
#endif
|
||||
|
||||
|
|
@ -363,6 +363,10 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __SYMBIAN32__
|
||||
#undef ASSERT
|
||||
#endif
|
||||
|
||||
#ifndef MASTER
|
||||
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
|
||||
#else
|
||||
|
|
@ -370,7 +374,7 @@ __inline__ void TRACE(char *f, ...) { } // this is re3 only, and so the function
|
|||
#endif
|
||||
#define ASSERT assert
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if defined __MWERKS__ || defined __SYMBIAN32__
|
||||
#define static_assert(bool_constexpr, message)
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ enum Config {
|
|||
EXTRADIRSIZE = 128,
|
||||
CUTSCENEDIRSIZE = 512,
|
||||
|
||||
SIMPLEMODELSIZE = 5000, // 2910 on PS2
|
||||
SIMPLEMODELSIZE = 2916, // 2910 on PS2
|
||||
MLOMODELSIZE = 1,
|
||||
MLOINSTANCESIZE = 1,
|
||||
TIMEMODELSIZE = 30,
|
||||
|
|
@ -31,15 +31,15 @@ enum Config {
|
|||
XTRACOMPSMODELSIZE = 2,
|
||||
TWODFXSIZE = 2000, // 1210 on PS2
|
||||
|
||||
MAXVEHICLESLOADED = 50, // 70 on mobile
|
||||
MAXVEHICLESLOADED = 35, // 70 on mobile
|
||||
|
||||
NUMOBJECTINFO = 168, // object.dat
|
||||
|
||||
// Pool sizes
|
||||
NUMPTRNODES = 30000, // 26000 on PS2
|
||||
NUMENTRYINFOS = 5400, // 3200 on PS2
|
||||
NUMPEDS = 140, // 90 on PS2
|
||||
NUMVEHICLES = 110, // 70 on PS2
|
||||
NUMPEDS = 110, // 90 on PS2
|
||||
NUMVEHICLES = 90, // 70 on PS2
|
||||
NUMBUILDINGS = 5500, // 4915 on PS2
|
||||
NUMTREADABLES = 1214,
|
||||
NUMOBJECTS = 450,
|
||||
|
|
@ -157,7 +157,7 @@ enum Config {
|
|||
#define GTA_VERSION GTA3_PC_11
|
||||
|
||||
// Enable configuration for handheld console ports
|
||||
#if defined(__SWITCH__) || defined(PSP2)
|
||||
#if defined(__SWITCH__) || defined(PSP2) || defined(__SYMBIAN32__)
|
||||
#define GTA_HANDHELD
|
||||
#endif
|
||||
|
||||
|
|
@ -170,11 +170,11 @@ enum Config {
|
|||
# define PS2_MENU
|
||||
#elif defined GTA_PC
|
||||
# define EXTERNAL_3D_SOUND
|
||||
# define AUDIO_REFLECTIONS
|
||||
//# define AUDIO_REFLECTIONS
|
||||
# ifndef GTA_HANDHELD
|
||||
# define PC_PLAYER_CONTROLS // mouse player/cam mode
|
||||
# endif
|
||||
# define GTA_REPLAY
|
||||
//# define GTA_REPLAY
|
||||
# define GTA_SCENE_EDIT
|
||||
# define PC_MENU
|
||||
#elif defined GTA_XBOX
|
||||
|
|
@ -238,7 +238,7 @@ enum Config {
|
|||
#if defined GTA_PC && defined GTA_PS2_STUFF
|
||||
# define USE_PS2_RAND
|
||||
# define RANDOMSPLASH // use random splash as on PS2
|
||||
# define PS2_MATFX
|
||||
//# define PS2_MATFX
|
||||
#endif
|
||||
|
||||
#ifdef VU_COLLISION
|
||||
|
|
@ -263,12 +263,13 @@ enum Config {
|
|||
# define CHATTYSPLASH // print what the game is loading
|
||||
# define TIMEBARS // print debug timers
|
||||
#endif
|
||||
#define TIMEBARS
|
||||
|
||||
#define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds.
|
||||
#define MORE_LANGUAGES // Add more translations to the game
|
||||
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible, and keeps saves compatible between platforms, needs to be enabled on 64bit builds!
|
||||
//#define MORE_LANGUAGES // Add more translations to the game
|
||||
//#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible, and keeps saves compatible between platforms, needs to be enabled on 64bit builds!
|
||||
#define FIX_INCOMPATIBLE_SAVES // try to fix incompatible saves, requires COMPATIBLE_SAVES
|
||||
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
|
||||
//#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
|
||||
|
||||
#define NO_MOVIES // add option to disable intro videos
|
||||
|
||||
|
|
@ -291,28 +292,28 @@ enum Config {
|
|||
#endif
|
||||
|
||||
// Rendering/display
|
||||
//#define EXTRA_MODEL_FLAGS // from mobile to optimize rendering
|
||||
//# define HARDCODED_MODEL_FLAGS // sets the flags enabled above from hardcoded model names.
|
||||
#define EXTRA_MODEL_FLAGS // from mobile to optimize rendering
|
||||
# define HARDCODED_MODEL_FLAGS // sets the flags enabled above from hardcoded model names.
|
||||
// NB: keep this enabled unless your map IDEs have these flags baked in
|
||||
#define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios
|
||||
#define PROPER_SCALING // use original DEFAULT_SCREEN_WIDTH/DEFAULT_SCREEN_HEIGHT from PS2 instead of PC(R* changed HEIGHT here to make radar look better, but broke other hud elements aspect ratio).
|
||||
#define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch)
|
||||
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||
#define PS2_ALPHA_TEST // emulate ps2 alpha test
|
||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||
//#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||
#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
||||
#ifdef DISABLE_LOADING_SCREEN
|
||||
// enable the PC splash
|
||||
#undef RANDOMSPLASH
|
||||
#endif
|
||||
#define DISABLE_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync
|
||||
#define ANISOTROPIC_FILTERING // set all textures to max anisotropic filtering
|
||||
//#define ANISOTROPIC_FILTERING // set all textures to max anisotropic filtering
|
||||
//#define USE_TEXTURE_POOL
|
||||
#ifdef LIBRW
|
||||
#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
||||
#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
|
||||
#define SCREEN_DROPLETS // neo water droplets
|
||||
#define NEW_RENDERER // leeds-like world rendering, needs librw
|
||||
//#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
||||
//#define EXTENDED_PIPELINES // custom render pipelines (includes Neo)
|
||||
//#define SCREEN_DROPLETS // neo water droplets
|
||||
//#define NEW_RENDERER // leeds-like world rendering, needs librw
|
||||
#endif
|
||||
|
||||
#define FIX_SPRITES // fix sprites aspect ratio(moon, coronas, particle etc)
|
||||
|
|
@ -382,7 +383,7 @@ enum Config {
|
|||
#define USE_MEASUREMENTS_IN_METERS // makes game use meters instead of feet in script
|
||||
#define USE_PRECISE_MEASUREMENT_CONVERTION // makes game convert feet to meeters more precisely
|
||||
#ifdef PC_MENU
|
||||
# define MISSION_REPLAY // mobile feature
|
||||
//# define MISSION_REPLAY // mobile feature
|
||||
#endif
|
||||
//#define SIMPLIER_MISSIONS // apply simplifications from mobile
|
||||
#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
|
|
@ -427,19 +428,19 @@ enum Config {
|
|||
#define FREE_CAM // Rotating cam
|
||||
|
||||
// Audio
|
||||
#define EXTERNAL_3D_SOUND // use external engine to simulate 3d audio spatialization. OpenAL would not work without it (because it works in a 3d space
|
||||
//#define EXTERNAL_3D_SOUND // use external engine to simulate 3d audio spatialization. OpenAL would not work without it (because it works in a 3d space
|
||||
// originally and making it work in 2d only requires more resource). Will not work on PS2
|
||||
#define AUDIO_REFLECTIONS // Enable audio reflections. Disabled on mobile, didn't exist yet on PS2.
|
||||
//#define AUDIO_REFLECTIONS // Enable audio reflections. Disabled on mobile, didn't exist yet on PS2.
|
||||
#define RADIO_SCROLL_TO_PREV_STATION
|
||||
#define AUDIO_CACHE
|
||||
//#define AUDIO_CACHE
|
||||
#define PS2_AUDIO_CHANNELS // increases the maximum number of audio channels to PS2 value of 44 (PC has 28 originally)
|
||||
#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
|
||||
//#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
|
||||
#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
|
||||
#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files
|
||||
#define PAUSE_RADIO_IN_FRONTEND // pause radio when game is paused
|
||||
#define ATTACH_RELEASING_SOUNDS_TO_ENTITIES // sounds would follow ped and vehicles coordinates if not being queued otherwise
|
||||
#define USE_TIME_SCALE_FOR_AUDIO // slow down/speed up sounds according to the speed of the game
|
||||
#define MULTITHREADED_AUDIO // for streams. requires C++11 or later
|
||||
//#define MULTITHREADED_AUDIO // for streams. requires C++11 or later
|
||||
|
||||
#ifdef AUDIO_OPUS
|
||||
#define AUDIO_OAL_USE_OPUS // enable support of opus files
|
||||
|
|
@ -454,13 +455,13 @@ enum Config {
|
|||
#endif
|
||||
|
||||
// Streaming
|
||||
#if !defined(_WIN32) && !defined(__SWITCH__)
|
||||
#if !defined(_WIN32) && !defined(__SWITCH__) && !defined __SYMBIAN32__
|
||||
//#define ONE_THREAD_PER_CHANNEL // Don't use if you're not on SSD/Flash - also not utilized too much right now(see commented LoadAllRequestedModels in Streaming.cpp)
|
||||
#define FLUSHABLE_STREAMING // Make it possible to interrupt reading when processing file isn't needed anymore.
|
||||
#endif
|
||||
#define BIG_IMG // Not complete - allows to read larger img files
|
||||
|
||||
//#define SQUEEZE_PERFORMANCE
|
||||
#define SQUEEZE_PERFORMANCE
|
||||
#ifdef SQUEEZE_PERFORMANCE
|
||||
#undef PS2_ALPHA_TEST
|
||||
#undef NO_ISLAND_LOADING
|
||||
|
|
@ -481,7 +482,7 @@ enum Config {
|
|||
#define IGNORE_MOUSE_KEYBOARD // ignore mouse & keyboard input
|
||||
#endif
|
||||
|
||||
#ifdef __SWITCH__
|
||||
#if defined __SWITCH__ || defined __SYMBIAN32__
|
||||
#define USE_UNNAMED_SEM // named semaphores are unsupported on the switch
|
||||
#endif
|
||||
|
||||
|
|
@ -495,4 +496,4 @@ enum Config {
|
|||
#endif
|
||||
#if defined(AUDIO_REFLECTIONS) && GTA_VERSION < GTA3_PC_10
|
||||
#error AUDIO_REFLECTIONS cannot work with versions below GTA3_PC_10
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ float FramesPerSecond = 30.0f;
|
|||
bool gbPrintShite = false;
|
||||
bool gbModelViewer;
|
||||
#ifdef TIMEBARS
|
||||
bool gbShowTimebars;
|
||||
bool gbShowTimebars = true;
|
||||
#endif
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
bool gbDrawVersionText; // Our addition, we think it was always enabled on !MASTER builds
|
||||
|
|
@ -1401,10 +1401,10 @@ RenderScene(void)
|
|||
}
|
||||
#endif
|
||||
PUSH_RENDERGROUP("RenderScene");
|
||||
CClouds::Render();
|
||||
// CClouds::Render();
|
||||
DoRWRenderHorizon();
|
||||
CRenderer::RenderRoads();
|
||||
CCoronas::RenderReflections();
|
||||
// CCoronas::RenderReflections();
|
||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE);
|
||||
CRenderer::RenderEverythingBarRoads();
|
||||
CRenderer::RenderBoats();
|
||||
|
|
@ -1414,7 +1414,7 @@ RenderScene(void)
|
|||
#ifndef SQUEEZE_PERFORMANCE
|
||||
CRenderer::RenderVehiclesButNotBoats();
|
||||
#endif
|
||||
CWeather::RenderRainStreaks();
|
||||
// CWeather::RenderRainStreaks();
|
||||
POP_RENDERGROUP();
|
||||
}
|
||||
|
||||
|
|
@ -1446,17 +1446,17 @@ RenderEffects(void)
|
|||
CGlass::Render();
|
||||
CWaterCannons::Render();
|
||||
CSpecialFX::Render();
|
||||
CShadows::RenderStaticShadows();
|
||||
CShadows::RenderStoredShadows();
|
||||
CSkidmarks::Render();
|
||||
CAntennas::Render();
|
||||
CRubbish::Render();
|
||||
CCoronas::Render();
|
||||
CParticle::Render();
|
||||
// CShadows::RenderStaticShadows();
|
||||
// CShadows::RenderStoredShadows();
|
||||
// CSkidmarks::Render();
|
||||
// CAntennas::Render();
|
||||
// CRubbish::Render();
|
||||
// CCoronas::Render();
|
||||
// CParticle::Render();
|
||||
CPacManPickups::Render();
|
||||
CWeaponEffects::Render();
|
||||
CPointLights::RenderFogEffect();
|
||||
CMovingThings::Render();
|
||||
// CWeaponEffects::Render();
|
||||
// CPointLights::RenderFogEffect();
|
||||
// CMovingThings::Render();
|
||||
CRenderer::RenderFirstPersonVehicle();
|
||||
POP_RENDERGROUP();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1160,7 +1160,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
|||
abort();
|
||||
#else
|
||||
// TODO
|
||||
printf("\nRE3 ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
re3_debug("\nRE3 ASSERT FAILED\n\tFile: %s\n\tLine: %d\n\tFunction: %s\n\tExpression: %s\n",filename,lineno,func,expr);
|
||||
assert(false);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "common.h"
|
||||
#ifndef MASTER
|
||||
#ifdef TIMEBARS
|
||||
#include "Font.h"
|
||||
#include "Frontend.h"
|
||||
#include "Timer.h"
|
||||
|
|
@ -96,7 +96,10 @@ void tbDisplay()
|
|||
sprintf(temp, "FPS: %.2f", Diag_GetFPS());
|
||||
AsciiToUnicode(temp, wtemp);
|
||||
CFont::SetColor(CRGBA(255, 255, 255, 255));
|
||||
if (!CMenuManager::m_PrefsMarketing || !CMenuManager::m_PrefsDisableTutorials) {
|
||||
#ifndef MASTER
|
||||
if (!CMenuManager::m_PrefsMarketing || !CMenuManager::m_PrefsDisableTutorials)
|
||||
#endif
|
||||
{
|
||||
CFont::PrintString(RsGlobal.maximumWidth * (4.0f / DEFAULT_SCREEN_WIDTH), RsGlobal.maximumHeight * (4.0f / DEFAULT_SCREEN_HEIGHT), wtemp);
|
||||
|
||||
#ifndef FINAL
|
||||
|
|
@ -105,7 +108,7 @@ void tbDisplay()
|
|||
MaxTimes[i] = Max(MaxTimes[i], TimerBar.Timers[i].endTime - TimerBar.Timers[i].startTime);
|
||||
sprintf(temp, "%s: %.2f", &TimerBar.Timers[i].name[0], MaxTimes[i]);
|
||||
AsciiToUnicode(temp, wtemp);
|
||||
CFont::PrintString(RsGlobal.maximumWidth * (4.0f / DEFAULT_SCREEN_WIDTH), RsGlobal.maximumHeight * ((8.0f * (i + 2)) / DEFAULT_SCREEN_HEIGHT), wtemp);
|
||||
CFont::PrintString(RsGlobal.maximumWidth * (4.0f / DEFAULT_SCREEN_WIDTH), RsGlobal.maximumHeight * ((8.0f * (i + 2)) / 200), wtemp);
|
||||
}
|
||||
|
||||
#ifdef FRAMETIME
|
||||
|
|
@ -113,9 +116,9 @@ void tbDisplay()
|
|||
sprintf(temp, "Frame Time: %.2f", MaxFrameTime);
|
||||
AsciiToUnicode(temp, wtemp);
|
||||
|
||||
CFont::PrintString(RsGlobal.maximumWidth * (4.0f / DEFAULT_SCREEN_WIDTH), RsGlobal.maximumHeight * ((8.0f * (TimerBar.count + 4)) / DEFAULT_SCREEN_HEIGHT), wtemp);
|
||||
CFont::PrintString(RsGlobal.maximumWidth * (4.0f / DEFAULT_SCREEN_WIDTH), RsGlobal.maximumHeight * ((8.0f * (TimerBar.count + 4)) / 200), wtemp);
|
||||
#endif // FRAMETIME
|
||||
#endif // !FINAL
|
||||
}
|
||||
}
|
||||
#endif // !MASTER
|
||||
#endif // !MASTER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue