Merge remote-tracking branch 'origin/miami' into lcs
# Conflicts: # .github/workflows/reLCS_msvc_amd64.yml # .github/workflows/reLCS_msvc_x86.yml # README.md # gamefiles/TEXT/american.gxt # gamefiles/TEXT/french.gxt # gamefiles/TEXT/german.gxt # gamefiles/TEXT/italian.gxt # gamefiles/TEXT/spanish.gxt # premake5.lua # src/animation/AnimManager.cpp # src/animation/AnimationId.h # src/audio/MusicManager.cpp # src/audio/audio_enums.h # src/control/Script7.cpp # src/core/FileLoader.cpp # src/core/re3.cpp # src/extras/custompipes_d3d9.cpp # src/extras/custompipes_gl.cpp # src/extras/postfx.cpp # src/extras/shaders/colourfilterVC.frag # src/extras/shaders/colourfilterVC_PS.hlsl # src/extras/shaders/make_hlsl.cmd # src/extras/shaders/obj/colourfilterVC_PS.cso # src/extras/shaders/obj/colourfilterVC_PS.inc # src/extras/shaders/obj/colourfilterVC_frag.inc # src/peds/PedFight.cpp # src/render/Font.cpp # src/render/Hud.cpp # src/render/Particle.cpp # src/render/WaterCannon.cpp # src/skel/win/gtavc.ico # src/vehicles/Automobile.cpp # utils/gxt/american.txt # utils/gxt/french.txt # utils/gxt/german.txt # utils/gxt/italian.txt # utils/gxt/spanish.txt
This commit is contained in:
@@ -245,7 +245,7 @@ CAnimViewer::Update(void)
|
||||
if (modelInfo->GetModelType() == MITYPE_PED) {
|
||||
int animGroup = ((CPedModelInfo*)modelInfo)->m_animGroup;
|
||||
|
||||
if (animId > ANIM_IDLE_STANCE)
|
||||
if (animId > ANIM_STD_IDLE)
|
||||
animGroup = ASSOCGRP_STD;
|
||||
|
||||
if (reloadIFP) {
|
||||
@@ -334,14 +334,14 @@ CAnimViewer::Update(void)
|
||||
CMessages::AddMessage(gUString, 1000, 0);
|
||||
|
||||
} else if (pad->GetCircleJustDown()) {
|
||||
PlayAnimation(pTarget->GetClump(), animGroup, ANIM_IDLE_STANCE);
|
||||
PlayAnimation(pTarget->GetClump(), animGroup, ANIM_STD_IDLE);
|
||||
AsciiToUnicode("Idle animation playing", gUString);
|
||||
CMessages::AddMessage(gUString, 1000, 0);
|
||||
|
||||
} else if (pad->GetDPadUpJustDown()) {
|
||||
animId--;
|
||||
if (animId < 0) {
|
||||
animId = NUM_STD_ANIMS - 1;
|
||||
animId = ANIM_STD_NUM - 1;
|
||||
}
|
||||
PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId);
|
||||
|
||||
@@ -350,7 +350,7 @@ CAnimViewer::Update(void)
|
||||
CMessages::AddMessage(gUString, 1000, 0);
|
||||
|
||||
} else if (pad->GetDPadDownJustDown()) {
|
||||
animId = (animId == (NUM_STD_ANIMS - 1) ? 0 : animId + 1);
|
||||
animId = (animId == (ANIM_STD_NUM - 1) ? 0 : animId + 1);
|
||||
PlayAnimation(pTarget->GetClump(), animGroup, (AnimationId)animId);
|
||||
|
||||
sprintf(gString, "Current anim: %d", animId);
|
||||
|
||||
@@ -1769,7 +1769,7 @@ CCamera::CamControl(void)
|
||||
(m_bLookingAtPlayer || WhoIsInControlOfTheCamera == CAMCONTROL_OBBE) &&
|
||||
!m_WideScreenOn &&
|
||||
(WhoIsInControlOfTheCamera != CAMCONTROL_OBBE || bSwitchedToObbeCam))
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD_SOUND, 0);
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD, 0);
|
||||
}
|
||||
|
||||
// What a mess!
|
||||
|
||||
@@ -43,6 +43,6 @@ char *CdStreamGetImageName(int32 cd);
|
||||
void CdStreamRemoveImages(void);
|
||||
int32 CdStreamGetNumImages(void);
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
extern bool flushStream[MAX_CDCHANNELS];
|
||||
#endif
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#define CDDEBUG(f, ...) debug ("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__)
|
||||
#define CDTRACE(f, ...) printf("%s: " f "\n", "cdvd_stream", ## __VA_ARGS__)
|
||||
|
||||
// #define ONE_THREAD_PER_CHANNEL // Don't use if you're not on SSD/Flash. (Also you may want to benefit from this via using all channels in Streaming.cpp)
|
||||
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
bool flushStream[MAX_CDCHANNELS];
|
||||
#endif
|
||||
|
||||
struct CdReadInfo
|
||||
{
|
||||
@@ -76,7 +76,7 @@ CdStreamInitThread(void)
|
||||
gChannelRequestQ.tail = 0;
|
||||
gChannelRequestQ.size = gNumChannels + 1;
|
||||
ASSERT(gChannelRequestQ.items != nil );
|
||||
gCdStreamSema = sem_open("/semaphore_cd_stream", O_CREAT, 0644, 1);
|
||||
gCdStreamSema = sem_open("/semaphore_cd_stream", O_CREAT, 0644, 0);
|
||||
|
||||
|
||||
if (gCdStreamSema == SEM_FAILED) {
|
||||
@@ -91,7 +91,7 @@ CdStreamInitThread(void)
|
||||
for ( int32 i = 0; i < gNumChannels; i++ )
|
||||
{
|
||||
sprintf(semName,"/semaphore_done%d",i);
|
||||
gpReadInfo[i].pDoneSemaphore = sem_open(semName, O_CREAT, 0644, 1);
|
||||
gpReadInfo[i].pDoneSemaphore = sem_open(semName, O_CREAT, 0644, 0);
|
||||
|
||||
if (gpReadInfo[i].pDoneSemaphore == SEM_FAILED)
|
||||
{
|
||||
@@ -99,9 +99,10 @@ CdStreamInitThread(void)
|
||||
ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
sprintf(semName,"/semaphore_start%d",i);
|
||||
gpReadInfo[i].pStartSemaphore = sem_open(semName, O_CREAT, 0644, 1);
|
||||
gpReadInfo[i].pStartSemaphore = sem_open(semName, O_CREAT, 0644, 0);
|
||||
|
||||
if (gpReadInfo[i].pStartSemaphore == SEM_FAILED)
|
||||
{
|
||||
@@ -170,6 +171,7 @@ CdStreamInit(int32 numChannels)
|
||||
gNumImages = 0;
|
||||
|
||||
gNumChannels = numChannels;
|
||||
ASSERT( gNumChannels != 0 );
|
||||
|
||||
gpReadInfo = (CdReadInfo *)calloc(numChannels, sizeof(CdReadInfo));
|
||||
ASSERT( gpReadInfo != nil );
|
||||
@@ -245,10 +247,12 @@ CdStreamRead(int32 channel, void *buffer, uint32 offset, uint32 size)
|
||||
if ( pChannel->nSectorsToRead != 0 || pChannel->bReading ) {
|
||||
if (pChannel->hFile == hImage - 1 && pChannel->nSectorOffset == _GET_OFFSET(offset) && pChannel->nSectorsToRead >= size)
|
||||
return STREAM_SUCCESS;
|
||||
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
flushStream[channel] = 1;
|
||||
CdStreamSync(channel);
|
||||
//return STREAM_NONE;
|
||||
#else
|
||||
return STREAM_NONE;
|
||||
#endif
|
||||
}
|
||||
|
||||
pChannel->hFile = hImage - 1;
|
||||
@@ -316,34 +320,34 @@ CdStreamSync(int32 channel)
|
||||
CdReadInfo *pChannel = &gpReadInfo[channel];
|
||||
ASSERT( pChannel != nil );
|
||||
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
if (flushStream[channel]) {
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
pChannel->nSectorsToRead = 0;
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
pthread_kill(pChannel->pChannelThread, SIGUSR1);
|
||||
if (pChannel->bReading) {
|
||||
pChannel->bLocked = true;
|
||||
while (pChannel->bLocked)
|
||||
sem_wait(pChannel->pDoneSemaphore);
|
||||
}
|
||||
#else
|
||||
pChannel->nSectorsToRead = 0;
|
||||
if (pChannel->bReading) {
|
||||
pChannel->bLocked = true;
|
||||
pthread_kill(_gCdStreamThread, SIGUSR1);
|
||||
#endif
|
||||
while (pChannel->bLocked)
|
||||
sem_wait(pChannel->pDoneSemaphore);
|
||||
}
|
||||
#endif
|
||||
pChannel->bReading = false;
|
||||
flushStream[channel] = false;
|
||||
return STREAM_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( pChannel->nSectorsToRead != 0 )
|
||||
{
|
||||
pChannel->bLocked = true;
|
||||
while (pChannel->bLocked)
|
||||
while (pChannel->bLocked && pChannel->nSectorsToRead != 0){
|
||||
sem_wait(pChannel->pDoneSemaphore);
|
||||
}
|
||||
pChannel->bLocked = false;
|
||||
}
|
||||
|
||||
pChannel->bReading = false;
|
||||
@@ -395,7 +399,12 @@ void *CdStreamThread(void *param)
|
||||
#ifndef ONE_THREAD_PER_CHANNEL
|
||||
while (gCdStreamThreadStatus != 2) {
|
||||
sem_wait(gCdStreamSema);
|
||||
|
||||
int32 channel = GetFirstInQueue(&gChannelRequestQ);
|
||||
|
||||
// spurious wakeup
|
||||
if (channel == -1)
|
||||
continue;
|
||||
#else
|
||||
int channel = *((int*)param);
|
||||
while (gpReadInfo[channel].nThreadStatus != 2){
|
||||
@@ -447,7 +456,7 @@ void *CdStreamThread(void *param)
|
||||
if ( pChannel->bLocked )
|
||||
{
|
||||
pChannel->bLocked = 0;
|
||||
sem_post(pChannel->pDoneSemaphore);
|
||||
sem_post(pChannel->pDoneSemaphore);
|
||||
}
|
||||
pChannel->bReading = false;
|
||||
}
|
||||
@@ -524,7 +533,9 @@ void
|
||||
CdStreamRemoveImages(void)
|
||||
{
|
||||
for ( int32 i = 0; i < gNumChannels; i++ ) {
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
flushStream[i] = 1;
|
||||
#endif
|
||||
CdStreamSync(i);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,9 @@ void CControllerConfigManager::LoadSettings(int32 file)
|
||||
{
|
||||
bool bValid = true;
|
||||
int nVersion = 0;
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
bool skipVehicleFireWeapon = false;
|
||||
#endif
|
||||
|
||||
if (file)
|
||||
{
|
||||
@@ -148,11 +151,26 @@ void CControllerConfigManager::LoadSettings(int32 file)
|
||||
if (bValid && nVersion >= 3)
|
||||
{
|
||||
ControlsManager.MakeControllerActionsBlank();
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
skipVehicleFireWeapon = nVersion < 4;
|
||||
// Set the default settings of VEHICLE_FIREWEAPON
|
||||
if (skipVehicleFireWeapon) {
|
||||
SetControllerKeyAssociatedWithAction(VEHICLE_FIREWEAPON, rsPADINS, KEYBOARD);
|
||||
SetControllerKeyAssociatedWithAction(VEHICLE_FIREWEAPON, rsLCTRL, OPTIONAL_EXTRA);
|
||||
if (m_bMouseAssociated)
|
||||
SetMouseButtonAssociatedWithAction(VEHICLE_FIREWEAPON, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int32 i = 0; i < MAX_CONTROLLERTYPES; i++)
|
||||
{
|
||||
for (int32 j = 0; j < MAX_CONTROLLERACTIONS; j++)
|
||||
{
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
// Skip file read
|
||||
if (skipVehicleFireWeapon && j == VEHICLE_FIREWEAPON)
|
||||
continue;
|
||||
#endif
|
||||
CFileMgr::Read(file, (char *)&ControlsManager.m_aSettings[j][i], sizeof(tControllerConfigBind));
|
||||
}
|
||||
}
|
||||
@@ -326,6 +344,11 @@ uint32 CControllerConfigManager::ms_padButtonsInited = 0;
|
||||
|
||||
void CControllerConfigManager::InitDefaultControlConfigJoyPad(uint32 buttons)
|
||||
{
|
||||
#ifdef XINPUT
|
||||
// No manual bindings for you, honey.
|
||||
return;
|
||||
#endif
|
||||
|
||||
m_bFirstCapture = true;
|
||||
|
||||
uint32 btn = buttons;
|
||||
@@ -1765,6 +1788,51 @@ void CControllerConfigManager::DeleteMatching1rstPersonControls(e_ControllerActi
|
||||
|
||||
#undef CLEAR_ACTION_IF_NEEDED
|
||||
|
||||
#ifdef RADIO_SCROLL_TO_PREV_STATION
|
||||
#define CHECK_ACTION(action) \
|
||||
if (key == GetControllerKeyAssociatedWithAction(action, type))\
|
||||
return true;
|
||||
|
||||
bool CControllerConfigManager::IsAnyVehicleActionAssignedToMouseKey(int32 key)
|
||||
{
|
||||
const eControllerType type = MOUSE;
|
||||
if (!GetIsKeyBlank(key, type))
|
||||
{
|
||||
#ifdef BIND_VEHICLE_FIREWEAPON
|
||||
CHECK_ACTION(VEHICLE_FIREWEAPON);
|
||||
#endif
|
||||
CHECK_ACTION(VEHICLE_LOOKBEHIND);
|
||||
CHECK_ACTION(VEHICLE_LOOKLEFT);
|
||||
CHECK_ACTION(VEHICLE_LOOKRIGHT);
|
||||
CHECK_ACTION(VEHICLE_HORN);
|
||||
CHECK_ACTION(VEHICLE_HANDBRAKE);
|
||||
CHECK_ACTION(VEHICLE_ACCELERATE);
|
||||
CHECK_ACTION(VEHICLE_BRAKE);
|
||||
CHECK_ACTION(VEHICLE_CHANGE_RADIO_STATION);
|
||||
CHECK_ACTION(TOGGLE_SUBMISSIONS);
|
||||
CHECK_ACTION(VEHICLE_TURRETLEFT);
|
||||
CHECK_ACTION(VEHICLE_TURRETRIGHT);
|
||||
CHECK_ACTION(VEHICLE_TURRETUP);
|
||||
CHECK_ACTION(VEHICLE_TURRETDOWN);
|
||||
CHECK_ACTION(VEHICLE_ENTER_EXIT);
|
||||
CHECK_ACTION(CAMERA_CHANGE_VIEW_ALL_SITUATIONS);
|
||||
#ifndef BIND_VEHICLE_FIREWEAPON
|
||||
CHECK_ACTION(PED_FIREWEAPON);
|
||||
#endif
|
||||
CHECK_ACTION(GO_LEFT);
|
||||
CHECK_ACTION(GO_RIGHT);
|
||||
CHECK_ACTION(NETWORK_TALK);
|
||||
CHECK_ACTION(SWITCH_DEBUG_CAM_ON);
|
||||
CHECK_ACTION(TOGGLE_DPAD);
|
||||
CHECK_ACTION(TAKE_SCREEN_SHOT);
|
||||
CHECK_ACTION(SHOW_MOUSE_POINTER_TOGGLE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#undef CHECK_ACTION
|
||||
#endif
|
||||
|
||||
void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction action, int32 key, eControllerType type)
|
||||
{
|
||||
if (!GetIsKeyBlank(key, type))
|
||||
@@ -2371,7 +2439,7 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
#define VFB(b)
|
||||
#endif
|
||||
|
||||
#define CONTROLLER_BUTTONS(T, O, X, Q, L1, L2, L3, R1, R2, R3, SELECT, RSL, RSR) \
|
||||
#define CONTROLLER_BUTTONS(T, O, X, Q, L1, L2, L3, R1, R2, R3, SELECT, RSU, RSD, RSL, RSR) \
|
||||
{{ \
|
||||
O, /* PED_FIREWEAPON */ \
|
||||
R2, /* PED_CYCLE_WEAPON_RIGHT */ \
|
||||
@@ -2482,7 +2550,7 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
O, /* PED_SPRINT */ \
|
||||
R3, /* PED_LOOKBEHIND */ \
|
||||
L3, /* PED_DUCK */ \
|
||||
L1, /* PED_ANSWER_PHONE */ \
|
||||
T, /* PED_ANSWER_PHONE */ \
|
||||
VFB(O) /* VEHICLE_FIREWEAPON */ \
|
||||
X, /* VEHICLE_ACCELERATE */ \
|
||||
Q, /* VEHICLE_BRAKE */ \
|
||||
@@ -2529,10 +2597,10 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
X, /* PED_SPRINT */ \
|
||||
R3, /* PED_LOOKBEHIND */ \
|
||||
L3, /* PED_DUCK */ \
|
||||
L1, /* PED_ANSWER_PHONE */ \
|
||||
O, /* PED_ANSWER_PHONE */ \
|
||||
VFB(R1) /* VEHICLE_FIREWEAPON */ \
|
||||
nil, /* VEHICLE_ACCELERATE */ \
|
||||
nil, /* VEHICLE_BRAKE */ \
|
||||
RSU, /* VEHICLE_ACCELERATE */ \
|
||||
RSD, /* VEHICLE_BRAKE */ \
|
||||
O, /* VEHICLE_CHANGE_RADIO_STATION */ \
|
||||
L3, /* VEHICLE_HORN */ \
|
||||
Q, /* TOGGLE_SUBMISSIONS */ \
|
||||
@@ -2573,10 +2641,10 @@ int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction act
|
||||
#define RIGHT "RIGHT"
|
||||
#endif
|
||||
|
||||
const char *XboxButtons_noIcons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("Y", "B", "A", "X", "LB", "LT", "LS", "RB", "RT", "RS", "BACK", "right stick left", "right stick right");
|
||||
const char *XboxButtons_noIcons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("Y", "B", "A", "X", "LB", "LT", "LS", "RB", "RT", "RS", "BACK", "right stick up", "right stick down", "right stick left", "right stick right");
|
||||
|
||||
#ifdef BUTTON_ICONS
|
||||
const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK", "~(~", "~)~");
|
||||
const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "BACK", "~H~", "~L~", "~(~", "~)~");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2585,11 +2653,6 @@ const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O
|
||||
#define PS2_CIRCLE "|"
|
||||
#define PS2_CROSS "/"
|
||||
#define PS2_SQUARE "^"
|
||||
#elif defined(BUTTON_ICONS)
|
||||
#define PS2_TRIANGLE "~T~"
|
||||
#define PS2_CIRCLE "~O~"
|
||||
#define PS2_CROSS "~X~"
|
||||
#define PS2_SQUARE "~Q~"
|
||||
#else
|
||||
#define PS2_TRIANGLE "TRIANGLE"
|
||||
#define PS2_CIRCLE "CIRCLE"
|
||||
@@ -2598,11 +2661,11 @@ const char *XboxButtons[][MAX_CONTROLLERACTIONS] = CONTROLLER_BUTTONS("~T~", "~O
|
||||
#endif
|
||||
|
||||
const char *PlayStationButtons_noIcons[][MAX_CONTROLLERACTIONS] =
|
||||
CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "L1", "L2", "L3", "R1", "R2", "R3", "SELECT", "right stick left", "right stick right");
|
||||
CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "L1", "L2", "L3", "R1", "R2", "R3", "SELECT", "right stick up", "right stick down", "right stick left", "right stick right");
|
||||
|
||||
#ifdef BUTTON_ICONS
|
||||
const char *PlayStationButtons[][MAX_CONTROLLERACTIONS] =
|
||||
CONTROLLER_BUTTONS(PS2_TRIANGLE, PS2_CIRCLE, PS2_CROSS, PS2_SQUARE, "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "SELECT", "~(~", "~)~");
|
||||
CONTROLLER_BUTTONS("~T~", "~O~", "~X~", "~Q~", "~K~", "~M~", "~A~", "~J~", "~V~", "~C~", "SELECT", "~H~", "~L~", "~(~", "~)~");
|
||||
#endif
|
||||
|
||||
#undef PS2_TRIANGLE
|
||||
@@ -2624,11 +2687,36 @@ void CControllerConfigManager::GetWideStringOfCommandKeys(uint16 action, wchar *
|
||||
if (CPad::GetPad(0)->IsAffectedByController) {
|
||||
wchar wstr[16];
|
||||
|
||||
// TODO: INI and/or menu setting for Xbox/PS switch
|
||||
const char* (*Buttons)[MAX_CONTROLLERACTIONS];
|
||||
|
||||
#ifdef BUTTON_ICONS
|
||||
const char *(*Buttons)[MAX_CONTROLLERACTIONS] = CFont::ButtonsSlot != -1 ? XboxButtons : XboxButtons_noIcons;
|
||||
#ifdef GAMEPAD_MENU
|
||||
switch (FrontEndMenuManager.m_PrefsControllerType)
|
||||
{
|
||||
case CMenuManager::CONTROLLER_DUALSHOCK2:
|
||||
case CMenuManager::CONTROLLER_DUALSHOCK3:
|
||||
case CMenuManager::CONTROLLER_DUALSHOCK4:
|
||||
Buttons = CFont::ButtonsSlot != -1 ? PlayStationButtons : PlayStationButtons_noIcons;
|
||||
break;
|
||||
default:
|
||||
#endif
|
||||
Buttons = CFont::ButtonsSlot != -1 ? XboxButtons : XboxButtons_noIcons;
|
||||
#ifdef GAMEPAD_MENU
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
const char *(*Buttons)[MAX_CONTROLLERACTIONS] = XboxButtons_noIcons;
|
||||
switch (FrontEndMenuManager.m_PrefsControllerType)
|
||||
{
|
||||
case CMenuManager::CONTROLLER_DUALSHOCK2:
|
||||
case CMenuManager::CONTROLLER_DUALSHOCK3:
|
||||
case CMenuManager::CONTROLLER_DUALSHOCK4:
|
||||
Buttons = PlayStationButtons_noIcons;
|
||||
break;
|
||||
default:
|
||||
Buttons = XboxButtons_noIcons;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
assert(Buttons[CPad::GetPad(0)->Mode][action] != nil); // we cannot use these
|
||||
|
||||
@@ -195,6 +195,10 @@ public:
|
||||
void DeleteMatching1rstPersonControls (e_ControllerAction action, int32 key, eControllerType type);
|
||||
void DeleteMatchingActionInitiators (e_ControllerAction action, int32 key, eControllerType type);
|
||||
|
||||
#ifdef RADIO_SCROLL_TO_PREV_STATION
|
||||
bool IsAnyVehicleActionAssignedToMouseKey(int32 key);
|
||||
#endif
|
||||
|
||||
bool GetIsKeyBlank(int32 key, eControllerType type);
|
||||
e_ControllerActionType GetActionType(e_ControllerAction action);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -137,6 +137,13 @@ enum eMenuSprites
|
||||
MENUSPRITE_DOWNON,
|
||||
MENUSPRITE_UPOFF,
|
||||
MENUSPRITE_UPON,
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUSPRITE_CONTROLLER,
|
||||
MENUSPRITE_ARROWS1,
|
||||
MENUSPRITE_ARROWS2,
|
||||
MENUSPRITE_ARROWS3,
|
||||
MENUSPRITE_ARROWS4,
|
||||
#endif
|
||||
NUM_MENU_SPRITES
|
||||
};
|
||||
|
||||
@@ -192,8 +199,10 @@ enum eMenuScreen
|
||||
MENUPAGE_MOUSE_CONTROLS = 31,
|
||||
MENUPAGE_PAUSE_MENU = 32,
|
||||
MENUPAGE_NONE = 33, // Then chooses main menu or pause menu
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUPAGE_CONTROLLER_SETTINGS,
|
||||
#endif
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
MENUPAGE_DEBUG_MENU,
|
||||
MENUPAGE_CONTROLLER_PC_OLD1,
|
||||
MENUPAGE_CONTROLLER_PC_OLD2,
|
||||
@@ -206,7 +215,7 @@ enum eMenuScreen
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
MENUPAGE_GRAPHICS_SETTINGS,
|
||||
#endif
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
MENUPAGE_DETECT_JOYSTICK,
|
||||
#endif
|
||||
|
||||
@@ -275,7 +284,7 @@ enum eMenuAction
|
||||
MENUACTION_DRAWDIST,
|
||||
MENUACTION_MOUSESENS,
|
||||
MENUACTION_MP3VOLUMEBOOST,
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUACTION_CTRLVIBRATION,
|
||||
MENUACTION_CTRLCONFIG,
|
||||
#endif
|
||||
@@ -668,6 +677,18 @@ public:
|
||||
int8 m_nDisplayMSAALevel;
|
||||
#endif
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
enum
|
||||
{
|
||||
CONTROLLER_DUALSHOCK2 = 0,
|
||||
CONTROLLER_DUALSHOCK3,
|
||||
CONTROLLER_DUALSHOCK4,
|
||||
CONTROLLER_XBOX360,
|
||||
CONTROLLER_XBOXONE,
|
||||
};
|
||||
|
||||
int8 m_PrefsControllerType;
|
||||
#endif
|
||||
enum LANGUAGE
|
||||
{
|
||||
LANGUAGE_AMERICAN,
|
||||
@@ -788,6 +809,10 @@ public:
|
||||
int8 GetPreviousPageOption();
|
||||
|
||||
// uint8 GetNumberOfMenuOptions();
|
||||
#ifdef GAMEPAD_MENU
|
||||
void LoadController(int8 type);
|
||||
void PrintController(void);
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef IMPROVED_VIDEOMODE
|
||||
|
||||
@@ -384,6 +384,11 @@ bool CGame::Initialise(const char* datFile)
|
||||
CTxdStore::Create(gameTxdSlot);
|
||||
CTxdStore::AddRef(gameTxdSlot);
|
||||
|
||||
#ifdef EXTENDED_PIPELINES
|
||||
// for generic fallback
|
||||
CustomPipes::SetTxdFindCallback();
|
||||
#endif
|
||||
|
||||
LoadingScreen("Loading the Game", "Loading particles", nil);
|
||||
int particleTxdSlot = CTxdStore::AddTxdSlot("particle");
|
||||
CTxdStore::LoadTxd(particleTxdSlot, "MODELS/PARTICLE.TXD");
|
||||
@@ -443,10 +448,7 @@ bool CGame::Initialise(const char* datFile)
|
||||
|
||||
// CFileLoader::LoadLevel("DATA\\DEFAULT.DAT");
|
||||
CFileLoader::LoadLevel(datFile);
|
||||
#ifdef EXTENDED_PIPELINES
|
||||
// for generic fallback
|
||||
CustomPipes::SetTxdFindCallback();
|
||||
#endif
|
||||
|
||||
LoadingScreen("Loading the Game", "Add Particles", nil);
|
||||
CWorld::AddParticles();
|
||||
CVehicleModelInfo::LoadVehicleColours();
|
||||
@@ -594,7 +596,6 @@ bool CGame::ShutDown(void)
|
||||
gPhoneInfo.Shutdown();
|
||||
CWeapon::ShutdownWeapons();
|
||||
CPedType::Shutdown();
|
||||
CMBlur::MotionBlurClose();
|
||||
|
||||
for (int32 i = 0; i < NUMPLAYERS; i++)
|
||||
{
|
||||
@@ -620,7 +621,7 @@ bool CGame::ShutDown(void)
|
||||
CStreaming::Shutdown();
|
||||
CTxdStore::GameShutdown();
|
||||
CCollision::Shutdown();
|
||||
CWaterLevel::DestroyWavyAtomic();
|
||||
CWaterLevel::Shutdown();
|
||||
CRubbish::Shutdown();
|
||||
CClouds::Shutdown();
|
||||
CShadows::Shutdown();
|
||||
@@ -629,6 +630,7 @@ bool CGame::ShutDown(void)
|
||||
CWeaponEffects::Shutdown();
|
||||
CParticle::Shutdown();
|
||||
CPools::ShutDown();
|
||||
CHud::ReInitialise();
|
||||
CTxdStore::RemoveTxdSlot(gameTxdSlot);
|
||||
CMBlur::MotionBlurClose();
|
||||
CdStreamRemoveImages();
|
||||
|
||||
@@ -277,13 +277,6 @@ CMenuScreen aScreens[] = {
|
||||
{ "", 0, 0, },
|
||||
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
// MENUPAGE_CONTROLLER_SETTINGS
|
||||
{ "FET_CON", MENUPAGE_OPTIONS, 0,
|
||||
MENUACTION_CTRLCONFIG, "FEC_CCF", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0,
|
||||
MENUACTION_CTRLVIBRATION, "FEC_VIB", SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS, 0, 0, 0,
|
||||
MENUACTION_GOBACK, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
},
|
||||
|
||||
// MENUPAGE_DEBUG_MENU
|
||||
{ "FED_DBG", MENUPAGE_NONE, 0,
|
||||
MENUACTION_RELOADIDE, "FED_RID", SAVESLOT_NONE, MENUPAGE_NONE, 0, 0, 0,
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#include "common.h"
|
||||
#if defined DETECT_JOYSTICK_MENU && defined XINPUT
|
||||
#include <windows.h>
|
||||
#include <xinput.h>
|
||||
#if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1)
|
||||
#pragma comment( lib, "Xinput9_1_0.lib" )
|
||||
#else
|
||||
#pragma comment( lib, "Xinput.lib" )
|
||||
#endif
|
||||
#endif
|
||||
#include "platform.h"
|
||||
#include "crossplatform.h"
|
||||
#include "Renderer.h"
|
||||
@@ -69,11 +78,17 @@
|
||||
#endif
|
||||
|
||||
#ifdef INVERT_LOOK_FOR_PAD
|
||||
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_ILU", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, "Controller", "InvertPad", off_on, 2, false) }, 150, 0, MENUALIGN_LEFT,
|
||||
#define INVERT_PAD_SELECTOR MENUACTION_CFO_SELECT, "FEC_ILU", { new CCFOSelect((int8*)&CPad::bInvertLook4Pad, "Controller", "InvertPad", off_on, 2, false) }, 0, 0, MENUALIGN_LEFT,
|
||||
#else
|
||||
#define INVERT_PAD_SELECTOR
|
||||
#endif
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
#define SELECT_CONTROLLER_TYPE MENUACTION_CFO_SELECT, "FEC_TYP", { new CCFOSelect((int8*)&FrontEndMenuManager.m_PrefsControllerType, "Controller", "Type", controllerTypes, ARRAY_SIZE(controllerTypes), false, ControllerTypeAfterChange) }, 0, 0, MENUALIGN_LEFT,
|
||||
#else
|
||||
#define SELECT_CONTROLLER_TYPE
|
||||
#endif
|
||||
|
||||
const char *filterNames[] = { "FEM_NON", "FEM_SIM", "FEM_NRM", "FEM_MOB" };
|
||||
const char *off_on[] = { "FEM_OFF", "FEM_ON" };
|
||||
|
||||
@@ -277,11 +292,13 @@ void ScreenModeAfterChange(int8 before, int8 after)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
wchar selectedJoystickUnicode[128];
|
||||
int cachedButtonNum = -1;
|
||||
|
||||
wchar* DetectJoystickDraw(bool* disabled, bool userHovering) {
|
||||
|
||||
#if defined RW_GL3 && !defined LIBRW_SDL2
|
||||
int numButtons;
|
||||
int found = -1;
|
||||
const char *joyname;
|
||||
@@ -312,6 +329,37 @@ wchar* DetectJoystickDraw(bool* disabled, bool userHovering) {
|
||||
}
|
||||
}
|
||||
if (PSGLOBAL(joy1id) == -1)
|
||||
#elif defined XINPUT
|
||||
int found = -1;
|
||||
XINPUT_STATE xstate;
|
||||
memset(&xstate, 0, sizeof(XINPUT_STATE));
|
||||
if (userHovering) {
|
||||
for (int i = 0; i <= 3; i++) {
|
||||
if (XInputGetState(i, &xstate) == ERROR_SUCCESS) {
|
||||
if (xstate.Gamepad.bLeftTrigger || xstate.Gamepad.bRightTrigger) {
|
||||
found = i;
|
||||
break;
|
||||
}
|
||||
for (int j = XINPUT_GAMEPAD_DPAD_UP; j != XINPUT_GAMEPAD_Y << 1; j = (j << 1)) {
|
||||
if (xstate.Gamepad.wButtons & j) {
|
||||
found = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found != -1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found != -1 && CPad::XInputJoy1 != found) {
|
||||
// We should never leave pads -1, so we can process them when they're connected and kinda support hotplug.
|
||||
CPad::XInputJoy2 = (CPad::XInputJoy1 == -1 ? (found + 1) % 4 : CPad::XInputJoy1);
|
||||
CPad::XInputJoy1 = found;
|
||||
cachedButtonNum = 0; // fake too, because xinput bypass CControllerConfig
|
||||
}
|
||||
}
|
||||
sprintf(gSelectedJoystickName, "%d", CPad::XInputJoy1); // fake, on xinput we only store gamepad ids(thanks MS) so this is a temp variable to be used below
|
||||
if (CPad::XInputJoy1 == -1)
|
||||
#endif
|
||||
AsciiToUnicode("Not found", selectedJoystickUnicode);
|
||||
else
|
||||
AsciiToUnicode(gSelectedJoystickName, selectedJoystickUnicode);
|
||||
@@ -332,6 +380,14 @@ void DetectJoystickGoBack() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
const char* controllerTypes[] = { "FEC_DS2", "FEC_DS3", "FEC_DS4", "FEC_360", "FEC_ONE" };
|
||||
void ControllerTypeAfterChange(int8 before, int8 after)
|
||||
{
|
||||
FrontEndMenuManager.LoadController(after);
|
||||
}
|
||||
#endif
|
||||
|
||||
CMenuScreenCustom aScreens[] = {
|
||||
// MENUPAGE_STATS = 0
|
||||
{ "FEH_STA", MENUPAGE_NONE, nil, nil,
|
||||
@@ -567,11 +623,13 @@ CMenuScreenCustom aScreens[] = {
|
||||
#else
|
||||
MENUACTION_KEYBOARDCTRLS,"FEC_RED", {nil, SAVESLOT_NONE, MENUPAGE_KEYBOARD_CONTROLS}, 320, 150, MENUALIGN_CENTER,
|
||||
#endif
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef GAMEPAD_MENU
|
||||
MENUACTION_CHANGEMENU, "FET_AGS", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
MENUACTION_CHANGEMENU, "FEC_JOD", {nil, SAVESLOT_NONE, MENUPAGE_DETECT_JOYSTICK}, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
MENUACTION_CHANGEMENU, "FEC_MOU", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_CENTER,
|
||||
INVERT_PAD_SELECTOR
|
||||
MENUACTION_RESTOREDEF, "FET_DEF", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC}, 320, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 0, MENUALIGN_CENTER,
|
||||
},
|
||||
@@ -582,7 +640,7 @@ CMenuScreenCustom aScreens[] = {
|
||||
MENUACTION_LOADRADIO, "FEO_AUD", {nil, SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_CHANGEMENU, "FEO_DIS", {nil, SAVESLOT_NONE, MENUPAGE_DISPLAY_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
MENUACTION_CHANGEMENU, "FET_GRA", {nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_CHANGEMENU, "FET_GFX", {nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
#endif
|
||||
MENUACTION_CHANGEMENU, "FEO_LAN", {nil, SAVESLOT_NONE, MENUPAGE_LANGUAGE_SETTINGS}, 0, 0, MENUALIGN_CENTER,
|
||||
MENUACTION_PLAYERSETUP, "FET_PS", {nil, SAVESLOT_NONE, MENUPAGE_SKIN_SELECT}, 0, 0, MENUALIGN_CENTER,
|
||||
@@ -611,8 +669,12 @@ CMenuScreenCustom aScreens[] = {
|
||||
{ "FEC_MOU", MENUPAGE_CONTROLLER_PC, nil, nil,
|
||||
MENUACTION_MOUSESENS, "FEC_MSH", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 40, 170, MENUALIGN_LEFT,
|
||||
MENUACTION_INVVERT, "FEC_IVV", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_LEFT,
|
||||
#ifndef GAMEPAD_MENU
|
||||
INVERT_PAD_SELECTOR
|
||||
#endif
|
||||
MENUACTION_MOUSESTEER, "FET_MST", {nil, SAVESLOT_NONE, MENUPAGE_MOUSE_CONTROLS}, 0, 0, MENUALIGN_LEFT,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 260, MENUALIGN_CENTER,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 0, MENUALIGN_CENTER,
|
||||
//MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, 0}, 320, 260, MENUALIGN_CENTER, // original y
|
||||
},
|
||||
|
||||
// MENUPAGE_PAUSE_MENU = 32
|
||||
@@ -629,15 +691,17 @@ CMenuScreenCustom aScreens[] = {
|
||||
// MENUPAGE_NONE = 33
|
||||
{ "", 0, nil, nil, },
|
||||
|
||||
|
||||
#ifdef GAMEPAD_MENU
|
||||
{ "FET_AGS", MENUPAGE_CONTROLLER_PC, new CCustomScreenLayout({40, 78, 25, true, true}), nil,
|
||||
MENUACTION_CTRLCONFIG, "FEC_CCF", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS }, 40, 76, MENUALIGN_LEFT,
|
||||
MENUACTION_CTRLDISPLAY, "FEC_CDP", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
INVERT_PAD_SELECTOR
|
||||
MENUACTION_CTRLVIBRATION, "FEC_VIB", { nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
SELECT_CONTROLLER_TYPE
|
||||
MENUACTION_GOBACK, "FEDS_TB", { nil, SAVESLOT_NONE, MENUPAGE_NONE }, 0, 0, MENUALIGN_LEFT,
|
||||
},
|
||||
#endif
|
||||
#ifdef LEGACY_MENU_OPTIONS
|
||||
// MENUPAGE_CONTROLLER_SETTINGS = 4
|
||||
{ "FET_CON", MENUPAGE_OPTIONS, nil, nil,
|
||||
MENUACTION_CTRLCONFIG, "FEC_CCF", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, 0,
|
||||
MENUACTION_CTRLVIBRATION, "FEC_VIB", {nil, SAVESLOT_NONE, MENUPAGE_CONTROLLER_SETTINGS}, 0, 0, 0,
|
||||
MENUACTION_GOBACK, "FEDS_TB", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
|
||||
},
|
||||
|
||||
// MENUPAGE_DEBUG_MENU = 18
|
||||
{ "FED_DBG", MENUPAGE_NONE, nil, nil,
|
||||
MENUACTION_RELOADIDE, "FED_RID", {nil, SAVESLOT_NONE, MENUPAGE_NONE}, 0, 0, 0,
|
||||
@@ -692,7 +756,7 @@ CMenuScreenCustom aScreens[] = {
|
||||
|
||||
#ifdef GRAPHICS_MENU_OPTIONS
|
||||
// MENUPAGE_GRAPHICS_SETTINGS
|
||||
{ "FET_GRA", MENUPAGE_OPTIONS, new CCustomScreenLayout({40, 78, 25, true, true}), GraphicsGoBack,
|
||||
{ "FET_GFX", MENUPAGE_OPTIONS, new CCustomScreenLayout({40, 78, 25, true, true}), GraphicsGoBack,
|
||||
|
||||
MENUACTION_SCREENRES, "FED_RES", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
MENUACTION_WIDESCREEN, "FED_WIS", { nil, SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS }, 0, 0, MENUALIGN_LEFT,
|
||||
@@ -715,7 +779,7 @@ CMenuScreenCustom aScreens[] = {
|
||||
},
|
||||
#endif
|
||||
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
// MENUPAGE_DETECT_JOYSTICK
|
||||
{ "FEC_JOD", MENUPAGE_CONTROLLER_PC, new CCustomScreenLayout({0, 0, 0, false, false, 30}), DetectJoystickGoBack,
|
||||
MENUACTION_LABEL, "FEC_JPR", { nil, SAVESLOT_NONE, MENUPAGE_NONE }, 0, 0, 0,
|
||||
|
||||
@@ -1594,8 +1594,14 @@ void CPad::AddToPCCheatString(char c)
|
||||
}
|
||||
|
||||
#ifdef XINPUT
|
||||
int CPad::XInputJoy1 = 0;
|
||||
int CPad::XInputJoy2 = 1;
|
||||
void CPad::AffectFromXinput(uint32 pad)
|
||||
{
|
||||
pad = pad == 0 ? XInputJoy1 : XInputJoy2;
|
||||
if (pad == -1) // LoadINIControllerSettings can set it to -1
|
||||
return;
|
||||
|
||||
XINPUT_STATE xstate;
|
||||
memset(&xstate, 0, sizeof(XINPUT_STATE));
|
||||
if (XInputGetState(pad, &xstate) == ERROR_SUCCESS)
|
||||
|
||||
@@ -288,6 +288,8 @@ public:
|
||||
int16 GetSkipCutscene() { return GetCrossJustDown(); }
|
||||
|
||||
#ifdef XINPUT
|
||||
static int XInputJoy1;
|
||||
static int XInputJoy2;
|
||||
void AffectFromXinput(uint32 pad);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -879,7 +879,7 @@ int32 CRadar::GetNewUniqueBlipIndex(int32 i)
|
||||
|
||||
uint32 CRadar::GetRadarTraceColour(uint32 color, bool bright)
|
||||
{
|
||||
int32 c;
|
||||
uint32 c;
|
||||
switch (color) {
|
||||
case RADAR_TRACE_RED:
|
||||
if (bright)
|
||||
|
||||
@@ -167,7 +167,7 @@ CRopes::CreateRopeWithSwatComingDown(CVector pos)
|
||||
swat->bUsesCollision = false;
|
||||
swat->m_pRopeEntity = (CEntity*)1;
|
||||
swat->m_nRopeID = 100 + ropeId;
|
||||
CAnimManager::BlendAnimation(swat->GetClump(), ASSOCGRP_STD, ANIM_ABSEIL, 4.0f);
|
||||
CAnimManager::BlendAnimation(swat->GetClump(), ASSOCGRP_STD, ANIM_STD_ABSEIL, 4.0f);
|
||||
ropeId++;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -214,11 +214,15 @@ CStreaming::Init2(void)
|
||||
|
||||
// allocate streaming buffers
|
||||
if(ms_streamingBufferSize & 1) ms_streamingBufferSize++;
|
||||
#ifndef ONE_THREAD_PER_CHANNEL
|
||||
ms_pStreamingBuffer[0] = (int8*)RwMallocAlign(ms_streamingBufferSize*CDSTREAM_SECTOR_SIZE, CDSTREAM_SECTOR_SIZE);
|
||||
ms_streamingBufferSize /= 2;
|
||||
ms_pStreamingBuffer[1] = ms_pStreamingBuffer[0] + ms_streamingBufferSize*CDSTREAM_SECTOR_SIZE;
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
ms_pStreamingBuffer[2] = (int8*)RwMallocAlign(ms_streamingBufferSize*2*CDSTREAM_SECTOR_SIZE, CDSTREAM_SECTOR_SIZE);
|
||||
#else
|
||||
ms_pStreamingBuffer[0] = (int8*)RwMallocAlign(ms_streamingBufferSize*2*CDSTREAM_SECTOR_SIZE, CDSTREAM_SECTOR_SIZE);
|
||||
ms_streamingBufferSize /= 2;
|
||||
ms_pStreamingBuffer[1] = ms_pStreamingBuffer[0] + ms_streamingBufferSize*CDSTREAM_SECTOR_SIZE;
|
||||
ms_pStreamingBuffer[2] = ms_pStreamingBuffer[1] + ms_streamingBufferSize*CDSTREAM_SECTOR_SIZE;
|
||||
ms_pStreamingBuffer[3] = ms_pStreamingBuffer[2] + ms_streamingBufferSize*CDSTREAM_SECTOR_SIZE;
|
||||
#endif
|
||||
debug("Streaming buffer size is %d sectors", ms_streamingBufferSize);
|
||||
@@ -2344,9 +2348,10 @@ CStreaming::LoadRequestedModels(void)
|
||||
}
|
||||
|
||||
|
||||
// Let's load models first, then process it. Unfortunately processing models are still single-threaded.
|
||||
// Let's load models in 4 threads; when one of them becomes idle, process the file, and fill thread with another file. Unfortunately processing models are still single-threaded.
|
||||
// Currently only supported on POSIX streamer.
|
||||
#ifdef ONE_THREAD_PER_CHANNEL
|
||||
// WIP - some files are loaded swapped (CdStreamPosix problem?)
|
||||
#if 0 //def ONE_THREAD_PER_CHANNEL
|
||||
void
|
||||
CStreaming::LoadAllRequestedModels(bool priority)
|
||||
{
|
||||
@@ -2365,14 +2370,18 @@ CStreaming::LoadAllRequestedModels(bool priority)
|
||||
int streamIds[ARRAY_SIZE(ms_pStreamingBuffer)];
|
||||
int streamSizes[ARRAY_SIZE(ms_pStreamingBuffer)];
|
||||
int streamPoses[ARRAY_SIZE(ms_pStreamingBuffer)];
|
||||
bool first = true;
|
||||
int readOrder[4] = {-1}; // Channel IDs ordered by read time
|
||||
int readI = 0;
|
||||
int processI = 0;
|
||||
bool first = true;
|
||||
|
||||
// All those "first" checks are because of variables aren't initialized in first pass.
|
||||
|
||||
while (true) {
|
||||
// Enumerate files and start reading
|
||||
for (int i=0; i<ARRAY_SIZE(ms_pStreamingBuffer); i++) {
|
||||
|
||||
// Channel has file to load
|
||||
if (!first && streamIds[i] != -1) {
|
||||
processI = i;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2385,12 +2394,16 @@ CStreaming::LoadAllRequestedModels(bool priority)
|
||||
|
||||
if (ms_aInfoForModel[streamId].GetCdPosnAndSize(posn, size)) {
|
||||
streamIds[i] = -1;
|
||||
|
||||
// Big file, needs 2 buffer
|
||||
if (size > (uint32)ms_streamingBufferSize) {
|
||||
if (i + 1 == ARRAY_SIZE(ms_pStreamingBuffer))
|
||||
continue;
|
||||
break;
|
||||
else if (!first && streamIds[i+1] != -1)
|
||||
continue;
|
||||
|
||||
} else {
|
||||
// Buffer of current channel is part of a "big file", pass
|
||||
if (i != 0 && streamIds[i-1] != -1 && streamSizes[i-1] > (uint32)ms_streamingBufferSize)
|
||||
continue;
|
||||
}
|
||||
@@ -2400,8 +2413,18 @@ CStreaming::LoadAllRequestedModels(bool priority)
|
||||
streamIds[i] = streamId;
|
||||
streamSizes[i] = size;
|
||||
streamPoses[i] = posn;
|
||||
|
||||
if (!first)
|
||||
assert(readOrder[readI] == -1);
|
||||
|
||||
//printf("read: order %d, ch %d, id %d, size %d\n", readI, i, streamId, size);
|
||||
|
||||
CdStreamRead(i, ms_pStreamingBuffer[i], imgOffset+posn, size);
|
||||
processI = i;
|
||||
readOrder[readI] = i;
|
||||
if (first && readI+1 != ARRAY_SIZE(readOrder))
|
||||
readOrder[readI+1] = -1;
|
||||
|
||||
readI = (readI + 1) % ARRAY_SIZE(readOrder);
|
||||
} else {
|
||||
ms_aInfoForModel[streamId].RemoveFromList();
|
||||
DecrementRef(streamId);
|
||||
@@ -2409,33 +2432,40 @@ CStreaming::LoadAllRequestedModels(bool priority)
|
||||
ms_aInfoForModel[streamId].m_loadState = STREAMSTATE_LOADED;
|
||||
streamIds[i] = -1;
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
streamIds[i] = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
first = false;
|
||||
int nextChannel = readOrder[processI];
|
||||
|
||||
// Now process
|
||||
if (streamIds[processI] == -1)
|
||||
// Now start processing
|
||||
if (nextChannel == -1 || streamIds[nextChannel] == -1)
|
||||
break;
|
||||
|
||||
// Try again on error
|
||||
while (CdStreamSync(processI) != STREAM_NONE) {
|
||||
CdStreamRead(processI, ms_pStreamingBuffer[processI], imgOffset+streamPoses[processI], streamSizes[processI]);
|
||||
}
|
||||
ms_aInfoForModel[streamIds[processI]].m_loadState = STREAMSTATE_READING;
|
||||
|
||||
MakeSpaceFor(streamSizes[processI] * CDSTREAM_SECTOR_SIZE);
|
||||
ConvertBufferToObject(ms_pStreamingBuffer[processI], streamIds[processI]);
|
||||
if(ms_aInfoForModel[streamIds[processI]].m_loadState == STREAMSTATE_STARTED)
|
||||
FinishLoadingLargeFile(ms_pStreamingBuffer[processI], streamIds[processI]);
|
||||
//printf("process: order %d, ch %d, id %d\n", processI, nextChannel, streamIds[nextChannel]);
|
||||
|
||||
if(streamIds[processI] < STREAM_OFFSET_TXD){
|
||||
CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(streamIds[processI]);
|
||||
// Try again on error
|
||||
while (CdStreamSync(nextChannel) != STREAM_NONE) {
|
||||
CdStreamRead(nextChannel, ms_pStreamingBuffer[nextChannel], imgOffset+streamPoses[nextChannel], streamSizes[nextChannel]);
|
||||
}
|
||||
ms_aInfoForModel[streamIds[nextChannel]].m_loadState = STREAMSTATE_READING;
|
||||
|
||||
MakeSpaceFor(streamSizes[nextChannel] * CDSTREAM_SECTOR_SIZE);
|
||||
ConvertBufferToObject(ms_pStreamingBuffer[nextChannel], streamIds[nextChannel]);
|
||||
if(ms_aInfoForModel[streamIds[nextChannel]].m_loadState == STREAMSTATE_STARTED)
|
||||
FinishLoadingLargeFile(ms_pStreamingBuffer[nextChannel], streamIds[nextChannel]);
|
||||
|
||||
if(streamIds[nextChannel] < STREAM_OFFSET_TXD){
|
||||
CSimpleModelInfo *mi = (CSimpleModelInfo*)CModelInfo::GetModelInfo(streamIds[nextChannel]);
|
||||
if(mi->IsSimple())
|
||||
mi->m_alpha = 255;
|
||||
}
|
||||
streamIds[processI] = -1;
|
||||
streamIds[nextChannel] = -1;
|
||||
readOrder[processI] = -1;
|
||||
processI = (processI + 1) % ARRAY_SIZE(readOrder);
|
||||
}
|
||||
|
||||
ms_bLoadingBigModel = false;
|
||||
@@ -2482,7 +2512,7 @@ CStreaming::LoadAllRequestedModels(bool priority)
|
||||
status = CdStreamRead(0, ms_pStreamingBuffer[0], imgOffset+posn, size);
|
||||
while(CdStreamSync(0) || status == STREAM_NONE);
|
||||
ms_aInfoForModel[streamId].m_loadState = STREAMSTATE_READING;
|
||||
|
||||
|
||||
MakeSpaceFor(size * CDSTREAM_SECTOR_SIZE);
|
||||
ConvertBufferToObject(ms_pStreamingBuffer[0], streamId);
|
||||
if(ms_aInfoForModel[streamId].m_loadState == STREAMSTATE_STARTED)
|
||||
@@ -2539,7 +2569,7 @@ CStreaming::FlushRequestList(void)
|
||||
next = si->m_next;
|
||||
RemoveModel(si - ms_aInfoForModel);
|
||||
}
|
||||
#ifndef _WIN32
|
||||
#ifdef FLUSHABLE_STREAMING
|
||||
if(ms_channel[0].state == CHANNELSTATE_READING) {
|
||||
flushStream[0] = 1;
|
||||
}
|
||||
@@ -3295,4 +3325,4 @@ CStreaming::PrintStreamingBufferState()
|
||||
DoRWStuffEndOfFrame();
|
||||
}
|
||||
CTimer::Update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,11 @@ public:
|
||||
static int32 ms_oldSectorX;
|
||||
static int32 ms_oldSectorY;
|
||||
static int32 ms_streamingBufferSize;
|
||||
#ifndef ONE_THREAD_PER_CHANNEL
|
||||
static int8 *ms_pStreamingBuffer[2];
|
||||
#else
|
||||
static int8 *ms_pStreamingBuffer[4];
|
||||
#endif
|
||||
static size_t ms_memoryUsed;
|
||||
static CStreamingChannel ms_channel[2];
|
||||
static int32 ms_channelError;
|
||||
|
||||
@@ -367,7 +367,7 @@ CWorld::ProcessLineOfSightSectorList(CPtrList &list, const CColLine &line, CColP
|
||||
} else if(e->bUsesCollision)
|
||||
colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel();
|
||||
|
||||
if(colmodel && CCollision::ProcessLineOfSight(line, e->GetMatrix(), *colmodel, point, dist,
|
||||
if(colmodel && CCollision::ProcessLineOfSight(line, e->GetMatrix(), *colmodel, point, mindist,
|
||||
ignoreSeeThrough, ignoreShootThrough))
|
||||
entity = e;
|
||||
if(carTyres && ((CVehicle*)e)->SetUpWheelColModel(&tyreCol) && CCollision::ProcessLineOfSight(line, e->GetMatrix(), tyreCol, tyreColPoint, tyreDist, false, ignoreShootThrough)){
|
||||
@@ -466,7 +466,7 @@ CWorld::ProcessVerticalLineSectorList(CPtrList &list, const CColLine &line, CCol
|
||||
e->m_scanCode = GetCurrentScanCode();
|
||||
|
||||
colmodel = CModelInfo::GetModelInfo(e->GetModelIndex())->GetColModel();
|
||||
if(CCollision::ProcessVerticalLine(line, e->GetMatrix(), *colmodel, point, dist,
|
||||
if(CCollision::ProcessVerticalLine(line, e->GetMatrix(), *colmodel, point, mindist,
|
||||
ignoreSeeThrough, false, poly))
|
||||
entity = e;
|
||||
}
|
||||
@@ -2192,7 +2192,7 @@ CWorld::TriggerExplosionSectorList(CPtrList &list, const CVector &position, floa
|
||||
PEDPIECE_TORSO, direction);
|
||||
if(pPed->m_nPedState != PED_DIE)
|
||||
pPed->SetFall(2000,
|
||||
(AnimationId)(direction + ANIM_KO_SKID_FRONT), 0);
|
||||
(AnimationId)(direction + ANIM_STD_HIGHIMPACT_FRONT), 0);
|
||||
if(pCreator && pCreator->IsPed()) {
|
||||
eEventType eventType = EVENT_SHOOT_PED;
|
||||
if(pPed->m_nPedType == PEDTYPE_COP) eventType = EVENT_SHOOT_COP;
|
||||
|
||||
@@ -369,7 +369,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
|
||||
|
||||
|
||||
@@ -194,6 +194,10 @@ enum Config {
|
||||
|
||||
// those infamous texts
|
||||
#define DRAW_GAME_VERSION_TEXT
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
// unlike R* development builds, ours has runtime switch on debug menu & .ini, and disabled as default.
|
||||
#define USE_OUR_VERSIONING // If you disable this then game will fetch version from peds.col, as R* did while in development
|
||||
#endif
|
||||
|
||||
// Memory allocation and compression
|
||||
// #define USE_CUSTOM_ALLOCATOR // use CMemoryHeap for allocation. use with care, not finished yet
|
||||
@@ -254,6 +258,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
|
||||
@@ -296,8 +306,8 @@ enum Config {
|
||||
#if !defined(RW_GL3) && defined(_WIN32)
|
||||
#define XINPUT
|
||||
#endif
|
||||
#if !defined(_WIN32) && !defined(__SWITCH__)
|
||||
#define DONT_TRUST_RECOGNIZED_JOYSTICKS // Then we'll only rely on GLFW gamepad DB, and expect user to enter Controller->Detect joysticks if his joystick isn't on that list.
|
||||
#if defined XINPUT || (defined RW_GL3 && !defined LIBRW_SDL2 && !defined __SWITCH__)
|
||||
#define DETECT_JOYSTICK_MENU // Then we'll expect user to enter Controller->Detect joysticks if his joystick isn't detected at the start.
|
||||
#endif
|
||||
#define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m
|
||||
#define KANGAROO_CHEAT
|
||||
@@ -305,19 +315,22 @@ enum Config {
|
||||
#define BETTER_ALLCARSAREDODO_CHEAT
|
||||
#define WALLCLIMB_CHEAT
|
||||
#define REGISTER_START_BUTTON
|
||||
//#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
|
||||
#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls
|
||||
#define BUTTON_ICONS // use textures to show controller buttons
|
||||
|
||||
// Hud, frontend and radar
|
||||
#define PC_MENU
|
||||
|
||||
#define FIX_RADAR // use radar size from early version before R* broke it
|
||||
#define RADIO_OFF_TEXT // Won't work without FIX_BUGS
|
||||
|
||||
#ifndef PC_MENU
|
||||
# define PS2_MENU
|
||||
//# define PS2_MENU_USEALLPAGEICONS
|
||||
#else
|
||||
# define MAP_ENHANCEMENTS // Adding waypoint and better mouse support
|
||||
# ifdef XINPUT
|
||||
# define GAMEPAD_MENU // Add gamepad menu
|
||||
# endif
|
||||
# define TRIANGLE_BACK_BUTTON
|
||||
//# define CIRCLE_BACK_BUTTON
|
||||
#define LEGACY_MENU_OPTIONS // i.e. frame sync(vsync)
|
||||
@@ -351,6 +364,10 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
||||
#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
#define SCRIPT_LOG_FILE_LEVEL 1 // 0 == no log, 1 == overwrite every frame, 2 == full log
|
||||
|
||||
#if SCRIPT_LOG_FILE_LEVEL == 0
|
||||
#undef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
#endif
|
||||
|
||||
#ifndef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
#define USE_BASIC_SCRIPT_DEBUG_OUTPUT
|
||||
#endif
|
||||
@@ -380,6 +397,7 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
||||
#define FREE_CAM // Rotating cam
|
||||
|
||||
// Audio
|
||||
#define RADIO_SCROLL_TO_PREV_STATION // Won't work without FIX_BUGS
|
||||
#define AUDIO_CACHE // cache sound lengths to speed up the cold boot
|
||||
#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
|
||||
@@ -397,11 +415,12 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef LIBRW
|
||||
// these are not supported with librw yet
|
||||
// Streaming
|
||||
#if !defined(_WIN32) && !defined(__SWITCH__)
|
||||
//#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
|
||||
// IMG
|
||||
#define BIG_IMG // allows to read larger img files
|
||||
#define BIG_IMG // Not complete - allows to read larger img files
|
||||
|
||||
//#define SQUEEZE_PERFORMANCE
|
||||
#ifdef SQUEEZE_PERFORMANCE
|
||||
@@ -409,6 +428,8 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
||||
#undef NO_ISLAND_LOADING
|
||||
#endif
|
||||
|
||||
// -------
|
||||
|
||||
#if defined __MWERKS__ || defined VANILLA_DEFINES
|
||||
#define FINAL
|
||||
#undef CHATTYSPLASH
|
||||
@@ -463,8 +484,10 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
||||
#undef BUTTON_ICONS
|
||||
|
||||
#undef FIX_RADAR
|
||||
#undef RADIO_OFF_TEXT
|
||||
|
||||
#undef MAP_ENHANCEMENTS
|
||||
#undef GAMEPAD_MENU
|
||||
#undef MUCH_SHORTER_OUTRO_SCREEN
|
||||
#undef CUSTOM_FRONTEND_OPTIONS
|
||||
|
||||
@@ -491,4 +514,6 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
|
||||
#undef IMPROVED_CAMERA
|
||||
#undef FREE_CAM
|
||||
#undef BIG_IMG
|
||||
|
||||
#undef RADIO_SCROLL_TO_PREV_STATION
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "common.h"
|
||||
#include <time.h>
|
||||
#include "rpmatfx.h"
|
||||
#include "rphanim.h"
|
||||
#include "rpskin.h"
|
||||
#include "rtbmp.h"
|
||||
#include "rtpng.h"
|
||||
#ifdef ANISOTROPIC_FILTERING
|
||||
#include "rpanisot.h"
|
||||
#endif
|
||||
@@ -73,6 +75,9 @@
|
||||
#include "custompipes.h"
|
||||
#include "screendroplets.h"
|
||||
#include "VarConsole.h"
|
||||
#ifdef USE_OUR_VERSIONING
|
||||
#include "GitSHA1.h"
|
||||
#endif
|
||||
|
||||
GlobalScene Scene;
|
||||
|
||||
@@ -97,6 +102,9 @@ bool gbModelViewer;
|
||||
#ifdef TIMEBARS
|
||||
bool gbShowTimebars;
|
||||
#endif
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
bool gDrawVersionText; // Our addition, we think it was always enabled on !MASTER builds
|
||||
#endif
|
||||
|
||||
volatile int32 frameCount;
|
||||
|
||||
@@ -339,7 +347,11 @@ RwGrabScreen(RwCamera *camera, RwChar *filename)
|
||||
strcpy(temp, CFileMgr::GetRootDirName());
|
||||
strcat(temp, filename);
|
||||
|
||||
#ifndef LIBRW
|
||||
if (RtBMPImageWrite(pImage, &temp[0]) == nil)
|
||||
#else
|
||||
if (RtPNGImageWrite(pImage, &temp[0]) == nil)
|
||||
#endif
|
||||
result = false;
|
||||
RwImageDestroy(pImage);
|
||||
return result;
|
||||
@@ -358,6 +370,7 @@ DoRWStuffEndOfFrame(void)
|
||||
RsCameraShowRaster(Scene.camera);
|
||||
#ifndef MASTER
|
||||
char s[48];
|
||||
#ifdef THIS_IS_STUPID
|
||||
if (CPad::GetPad(1)->GetLeftShockJustDown()) {
|
||||
// try using both controllers for this thing... crazy bastards
|
||||
if (CPad::GetPad(0)->GetRightStickY() > 0) {
|
||||
@@ -369,6 +382,12 @@ DoRWStuffEndOfFrame(void)
|
||||
RwGrabScreen(Scene.camera, s);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (CPad::GetPad(1)->GetLeftShockJustDown() || CPad::GetPad(0)->GetFJustDown(11)) {
|
||||
sprintf(s, "screen_%11lld.png", time(nil));
|
||||
RwGrabScreen(Scene.camera, s);
|
||||
}
|
||||
#endif
|
||||
#endif // !MASTER
|
||||
}
|
||||
|
||||
@@ -1048,7 +1067,7 @@ DisplayGameDebugText()
|
||||
|
||||
#ifndef FINAL
|
||||
{
|
||||
SETTWEAKPATH("GameDebugText");
|
||||
SETTWEAKPATH("Debug");
|
||||
TWEAKBOOL(bDisplayPosn);
|
||||
TWEAKBOOL(bDisplayCheatStr);
|
||||
}
|
||||
@@ -1062,13 +1081,56 @@ DisplayGameDebugText()
|
||||
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
wchar ver[200];
|
||||
|
||||
|
||||
if(gDrawVersionText) // This realtime switch is our thing
|
||||
{
|
||||
|
||||
#ifdef USE_OUR_VERSIONING
|
||||
char verA[200];
|
||||
sprintf(verA,
|
||||
#if defined _WIN32
|
||||
"Win "
|
||||
#elif defined __linux__
|
||||
"Linux "
|
||||
#elif defined __APPLE__
|
||||
"Mac OS X "
|
||||
#elif defined __FreeBSD__
|
||||
"FreeBSD "
|
||||
#else
|
||||
"Posix-compliant "
|
||||
#endif
|
||||
#if defined __LP64__ || defined _WIN64
|
||||
"64-bit "
|
||||
#else
|
||||
"32-bit "
|
||||
#endif
|
||||
#if defined RW_D3D9
|
||||
"D3D9 "
|
||||
#elif defined RWLIBS
|
||||
"D3D8 "
|
||||
#elif defined RW_GL3
|
||||
"OpenGL "
|
||||
#endif
|
||||
#if defined AUDIO_OAL
|
||||
"OAL "
|
||||
#elif defined AUDIO_MSS
|
||||
"MSS "
|
||||
#endif
|
||||
#if defined _DEBUG || defined DEBUG
|
||||
"DEBUG "
|
||||
#endif
|
||||
"%.8s",
|
||||
g_GIT_SHA1);
|
||||
AsciiToUnicode(verA, ver);
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.7f));
|
||||
#else
|
||||
AsciiToUnicode(version_name, ver);
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
|
||||
#endif
|
||||
|
||||
CFont::SetPropOn();
|
||||
CFont::SetBackgroundOff();
|
||||
CFont::SetFontStyle(FONT_STANDARD);
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.5f), SCREEN_SCALE_Y(0.5f));
|
||||
CFont::SetCentreOff();
|
||||
CFont::SetRightJustifyOff();
|
||||
CFont::SetWrapx(SCREEN_WIDTH);
|
||||
@@ -1076,11 +1138,17 @@ DisplayGameDebugText()
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetColor(CRGBA(255, 108, 0, 255));
|
||||
CFont::PrintString(SCREEN_SCALE_X(10.0f), SCREEN_SCALE_Y(10.0f), ver);
|
||||
#endif
|
||||
}
|
||||
#endif // #ifdef DRAW_GAME_VERSION_TEXT
|
||||
|
||||
FrameSamples++;
|
||||
#ifdef FIX_HIGH_FPS_BUGS_ON_FRONTEND
|
||||
FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds
|
||||
FramesPerSecond = FrameSamples / FramesPerSecondCounter;
|
||||
#else
|
||||
FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f);
|
||||
FramesPerSecond = FramesPerSecondCounter / FrameSamples;
|
||||
#endif
|
||||
|
||||
if ( FrameSamples > 30 )
|
||||
{
|
||||
|
||||
182
src/core/re3.cpp
182
src/core/re3.cpp
@@ -1,6 +1,14 @@
|
||||
#include <csignal>
|
||||
#define WITHWINDOWS
|
||||
#include "common.h"
|
||||
#if defined DETECT_JOYSTICK_MENU && defined XINPUT
|
||||
#include <xinput.h>
|
||||
#if !defined(PSAPI_VERSION) || (PSAPI_VERSION > 1)
|
||||
#pragma comment( lib, "Xinput9_1_0.lib" )
|
||||
#else
|
||||
#pragma comment( lib, "Xinput.lib" )
|
||||
#endif
|
||||
#endif
|
||||
#include "Renderer.h"
|
||||
#include "Occlusion.h"
|
||||
#include "Credits.h"
|
||||
@@ -37,7 +45,7 @@
|
||||
#include "MBlur.h"
|
||||
#include "ControllerConfig.h"
|
||||
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
#include "crossplatform.h"
|
||||
#endif
|
||||
|
||||
@@ -249,8 +257,40 @@ const char *iniKeyboardButtons[] = {"ESC","F1","F2","F3","F4","F5","F6","F7","F8
|
||||
|
||||
void LoadINIControllerSettings()
|
||||
{
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
#ifdef XINPUT
|
||||
int storedJoy1 = -1;
|
||||
if (ReadIniIfExists("Controller", "JoystickName", &storedJoy1)) {
|
||||
CPad::XInputJoy1 = -1;
|
||||
CPad::XInputJoy2 = -1;
|
||||
XINPUT_STATE xstate;
|
||||
memset(&xstate, 0, sizeof(XINPUT_STATE));
|
||||
|
||||
// Firstly confirm & set joy 1
|
||||
if (XInputGetState(storedJoy1, &xstate) == ERROR_SUCCESS) {
|
||||
CPad::XInputJoy1 = storedJoy1;
|
||||
}
|
||||
|
||||
for (int i = 0; i <= 3; i++) {
|
||||
if (XInputGetState(i, &xstate) == ERROR_SUCCESS) {
|
||||
if (CPad::XInputJoy1 == -1)
|
||||
CPad::XInputJoy1 = i;
|
||||
else if (CPad::XInputJoy2 == -1 && i != CPad::XInputJoy1)
|
||||
CPad::XInputJoy2 = i;
|
||||
}
|
||||
}
|
||||
|
||||
// There is no plug event on XInput, so let's leave XInputJoy1/2 as 0/1 respectively, and hotplug will be possible.
|
||||
if (CPad::XInputJoy1 == -1) {
|
||||
CPad::XInputJoy1 = 0;
|
||||
CPad::XInputJoy2 = 1;
|
||||
} else if (CPad::XInputJoy2 == -1) {
|
||||
CPad::XInputJoy2 = (CPad::XInputJoy1 + 1) % 4;
|
||||
}
|
||||
}
|
||||
#else
|
||||
ReadIniIfExists("Controller", "JoystickName", gSelectedJoystickName, 128);
|
||||
#endif
|
||||
#endif
|
||||
// force to default GTA behaviour (never overwrite bindings on joy change/initialization) if user init'ed/set bindings before we introduced that
|
||||
if (!ReadIniIfExists("Controller", "PadButtonsInited", &ControlsManager.ms_padButtonsInited)) {
|
||||
@@ -348,8 +388,12 @@ void SaveINIControllerSettings()
|
||||
StoreIni("Bindings", iniControllerActions[i], value, 128);
|
||||
}
|
||||
|
||||
#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
|
||||
#ifdef DETECT_JOYSTICK_MENU
|
||||
#ifdef XINPUT
|
||||
StoreIni("Controller", "JoystickName", CPad::XInputJoy1);
|
||||
#else
|
||||
StoreIni("Controller", "JoystickName", gSelectedJoystickName, 128);
|
||||
#endif
|
||||
#endif
|
||||
StoreIni("Controller", "PadButtonsInited", ControlsManager.ms_padButtonsInited);
|
||||
cfg.write_file("reLCS.ini");
|
||||
@@ -373,6 +417,7 @@ bool LoadINISettings()
|
||||
ReadIniIfExists("Controller", "HorizantalMouseSens", &TheCamera.m_fMouseAccelHorzntl);
|
||||
ReadIniIfExists("Controller", "InvertMouseVertically", &MousePointerStateHelper.bInvertVertically);
|
||||
ReadIniIfExists("Controller", "DisableMouseSteering", &CVehicle::m_bDisableMouseSteering);
|
||||
ReadIniIfExists("Controller", "Vibration", &FrontEndMenuManager.m_PrefsUseVibration);
|
||||
ReadIniIfExists("Audio", "SfxVolume", &FrontEndMenuManager.m_PrefsSfxVolume);
|
||||
ReadIniIfExists("Audio", "MusicVolume", &FrontEndMenuManager.m_PrefsMusicVolume);
|
||||
ReadIniIfExists("Audio", "MP3BoostVolume", &FrontEndMenuManager.m_PrefsMP3BoostVolume);
|
||||
@@ -406,6 +451,10 @@ bool LoadINISettings()
|
||||
ReadIniIfExists("CustomPipesValues", "LightmapMult", &CustomPipes::LightmapMult);
|
||||
ReadIniIfExists("CustomPipesValues", "GlossMult", &CustomPipes::GlossMult);
|
||||
#endif
|
||||
ReadIniIfExists("Rendering", "BackfaceCulling", &gBackfaceCulling);
|
||||
#ifdef NEW_RENDERER
|
||||
ReadIniIfExists("Rendering", "NewRenderer", &gbNewRenderer);
|
||||
#endif
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
ReadIniIfExists("Draw", "ProperScaling", &CDraw::ms_bProperScaling);
|
||||
@@ -416,6 +465,10 @@ bool LoadINISettings()
|
||||
#ifdef FIX_SPRITES
|
||||
ReadIniIfExists("Draw", "FixSprites", &CDraw::ms_bFixSprites);
|
||||
#endif
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
extern bool gDrawVersionText;
|
||||
ReadIniIfExists("General", "DrawVersionText", &gDrawVersionText);
|
||||
#endif
|
||||
|
||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||
bool migrate = cfg.category_size("FrontendOptions") != 0;
|
||||
@@ -461,6 +514,7 @@ void SaveINISettings()
|
||||
StoreIni("Controller", "HorizantalMouseSens", TheCamera.m_fMouseAccelHorzntl);
|
||||
StoreIni("Controller", "InvertMouseVertically", MousePointerStateHelper.bInvertVertically);
|
||||
StoreIni("Controller", "DisableMouseSteering", CVehicle::m_bDisableMouseSteering);
|
||||
StoreIni("Controller", "Vibration", FrontEndMenuManager.m_PrefsUseVibration);
|
||||
StoreIni("Audio", "SfxVolume", FrontEndMenuManager.m_PrefsSfxVolume);
|
||||
StoreIni("Audio", "MusicVolume", FrontEndMenuManager.m_PrefsMusicVolume);
|
||||
StoreIni("Audio", "MP3BoostVolume", FrontEndMenuManager.m_PrefsMP3BoostVolume);
|
||||
@@ -495,6 +549,9 @@ void SaveINISettings()
|
||||
StoreIni("CustomPipesValues", "GlossMult", CustomPipes::GlossMult);
|
||||
#endif
|
||||
StoreIni("Rendering", "BackfaceCulling", gBackfaceCulling);
|
||||
#ifdef NEW_RENDERER
|
||||
StoreIni("Rendering", "NewRenderer", gbNewRenderer);
|
||||
#endif
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
StoreIni("Draw", "ProperScaling", CDraw::ms_bProperScaling);
|
||||
@@ -505,6 +562,10 @@ void SaveINISettings()
|
||||
#ifdef FIX_SPRITES
|
||||
StoreIni("Draw", "FixSprites", CDraw::ms_bFixSprites);
|
||||
#endif
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
extern bool gDrawVersionText;
|
||||
StoreIni("General", "DrawVersionText", gDrawVersionText);
|
||||
#endif
|
||||
#ifdef CUSTOM_FRONTEND_OPTIONS
|
||||
for (int i = 0; i < MENUPAGES; i++) {
|
||||
for (int j = 0; j < NUM_MENUROWS; j++) {
|
||||
@@ -632,18 +693,6 @@ SwitchCarCollision(void)
|
||||
FindPlayerVehicle()->bUsesCollision = !FindPlayerVehicle()->bUsesCollision;
|
||||
}
|
||||
|
||||
static int engineStatus;
|
||||
static void
|
||||
SetEngineStatus(void)
|
||||
{
|
||||
CVehicle *veh = FindPlayerVehicle();
|
||||
if(veh == nil)
|
||||
return;
|
||||
if(!veh->IsCar())
|
||||
return;
|
||||
((CAutomobile*)veh)->Damage.SetEngineStatus(engineStatus);
|
||||
}
|
||||
|
||||
static void
|
||||
ToggleComedy(void)
|
||||
{
|
||||
@@ -859,13 +908,22 @@ DebugMenuPopulate(void)
|
||||
|
||||
DebugMenuAddVarBool8("Render", "Draw hud", &CHud::m_Wants_To_Draw_Hud, nil);
|
||||
DebugMenuAddVar("Render", "Brightness", &FrontEndMenuManager.m_PrefsBrightness, nil, 16, 0, 700, nil);
|
||||
#ifdef PROPER_SCALING
|
||||
DebugMenuAddVarBool8("Render", "Proper Scaling", &CDraw::ms_bProperScaling, nil);
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
DebugMenuAddVarBool8("Render", "Fix Radar", &CDraw::ms_bFixRadar, nil);
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
DebugMenuAddVarBool8("Render", "Fix Sprites", &CDraw::ms_bFixSprites, nil);
|
||||
#endif
|
||||
DebugMenuAddVarBool8("Render", "Backface Culling", &gBackfaceCulling, nil);
|
||||
DebugMenuAddVarBool8("Render", "PS2 Alpha test Emu", &gPS2alphaTest, nil);
|
||||
DebugMenuAddVarBool8("Render", "Frame limiter", &FrontEndMenuManager.m_PrefsFrameLimiter, nil);
|
||||
DebugMenuAddVarBool8("Render", "VSynch", &FrontEndMenuManager.m_PrefsVsync, nil);
|
||||
DebugMenuAddVar("Render", "Max FPS", &RsGlobal.maxFPS, nil, 1, 1, 1000, nil);
|
||||
#ifdef NEW_RENDERER
|
||||
DebugMenuAddVarBool8("Render", "new renderer", &gbNewRenderer, nil);
|
||||
DebugMenuAddVarBool8("Render", "New Renderer", &gbNewRenderer, nil);
|
||||
extern bool gbRenderRoads;
|
||||
extern bool gbRenderEverythingBarRoads;
|
||||
extern bool gbRenderFadingInUnderwaterEntities;
|
||||
@@ -876,16 +934,16 @@ extern bool gbRenderVehicles;
|
||||
extern bool gbRenderWorld0;
|
||||
extern bool gbRenderWorld1;
|
||||
extern bool gbRenderWorld2;
|
||||
DebugMenuAddVarBool8("Render", "gbRenderRoads", &gbRenderRoads, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderEverythingBarRoads", &gbRenderEverythingBarRoads, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderFadingInUnderwaterEntities", &gbRenderFadingInUnderwaterEntities, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderFadingInEntities", &gbRenderFadingInEntities, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderWater", &gbRenderWater, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderBoats", &gbRenderBoats, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderVehicles", &gbRenderVehicles, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderWorld0", &gbRenderWorld0, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderWorld1", &gbRenderWorld1, nil);
|
||||
DebugMenuAddVarBool8("Render", "gbRenderWorld2", &gbRenderWorld2, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderRoads", &gbRenderRoads, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderEverythingBarRoads", &gbRenderEverythingBarRoads, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInUnderwaterEntities", &gbRenderFadingInUnderwaterEntities, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderFadingInEntities", &gbRenderFadingInEntities, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderWater", &gbRenderWater, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderBoats", &gbRenderBoats, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderVehicles", &gbRenderVehicles, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderWorld0", &gbRenderWorld0, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderWorld1", &gbRenderWorld1, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "gbRenderWorld2", &gbRenderWorld2, nil);
|
||||
#endif
|
||||
|
||||
#ifdef EXTENDED_COLOURFILTER
|
||||
@@ -921,28 +979,27 @@ extern bool gbRenderDebugEnvMap;
|
||||
// DebugMenuAddVarBool8("Render", "Neo Road Gloss enable", &CustomPipes::GlossEnable, nil);
|
||||
// DebugMenuAddVar("Render", "Mult", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f);
|
||||
#endif
|
||||
DebugMenuAddVarBool8("Render", "Show Ped Paths", &gbShowPedPaths, nil);
|
||||
DebugMenuAddVarBool8("Render", "Show Car Paths", &gbShowCarPaths, nil);
|
||||
DebugMenuAddVarBool8("Render", "Show Car Path Links", &gbShowCarPathsLinks, nil);
|
||||
DebugMenuAddVarBool8("Render", "Show Collision Lines", &gbShowCollisionLines, nil);
|
||||
DebugMenuAddVarBool8("Render", "Show Collision Polys", &gbShowCollisionPolys, nil);
|
||||
DebugMenuAddVarBool8("Render", "Don't render Buildings", &gbDontRenderBuildings, nil);
|
||||
DebugMenuAddVarBool8("Render", "Don't render Big Buildings", &gbDontRenderBigBuildings, nil);
|
||||
DebugMenuAddVarBool8("Render", "Don't render Peds", &gbDontRenderPeds, nil);
|
||||
DebugMenuAddVarBool8("Render", "Don't render Vehicles", &gbDontRenderVehicles, nil);
|
||||
DebugMenuAddVarBool8("Render", "Don't render Objects", &gbDontRenderObjects, nil);
|
||||
DebugMenuAddVarBool8("Render", "Don't Render Water", &gbDontRenderWater, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Show Ped Paths", &gbShowPedPaths, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Show Car Paths", &gbShowCarPaths, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Show Car Path Links", &gbShowCarPathsLinks, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Show Collision Lines", &gbShowCollisionLines, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Show Collision Polys", &gbShowCollisionPolys, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Don't render Buildings", &gbDontRenderBuildings, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Don't render Big Buildings", &gbDontRenderBigBuildings, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Don't render Peds", &gbDontRenderPeds, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Don't render Vehicles", &gbDontRenderVehicles, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Don't render Objects", &gbDontRenderObjects, nil);
|
||||
DebugMenuAddVarBool8("Debug Render", "Don't Render Water", &gbDontRenderWater, nil);
|
||||
|
||||
#ifdef PROPER_SCALING
|
||||
DebugMenuAddVarBool8("Draw", "Proper Scaling", &CDraw::ms_bProperScaling, nil);
|
||||
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
extern bool gDrawVersionText;
|
||||
DebugMenuAddVarBool8("Debug", "Version Text", &gDrawVersionText, nil);
|
||||
#endif
|
||||
#ifdef FIX_RADAR
|
||||
DebugMenuAddVarBool8("Draw", "Fix Radar", &CDraw::ms_bFixRadar, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil);
|
||||
#ifdef TIMEBARS
|
||||
DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil);
|
||||
#endif
|
||||
#ifdef FIX_SPRITES
|
||||
DebugMenuAddVarBool8("Draw", "Fix Sprites", &CDraw::ms_bFixSprites, nil);
|
||||
#endif
|
||||
|
||||
#ifndef FINAL
|
||||
DebugMenuAddVarBool8("Debug", "Print Memory Usage", &gbPrintMemoryUsage, nil);
|
||||
#ifdef USE_CUSTOM_ALLOCATOR
|
||||
@@ -954,28 +1011,23 @@ extern bool gbRenderDebugEnvMap;
|
||||
#ifdef GTA_SCENE_EDIT
|
||||
DebugMenuAddVarBool8("Debug", "Edit on", &CSceneEdit::m_bEditOn, nil);
|
||||
#endif
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
DebugMenuAddCmd("Debug", "Teleport to map waypoint", TeleportToWaypoint);
|
||||
#endif
|
||||
DebugMenuAddCmd("Debug", "Switch car collision", SwitchCarCollision);
|
||||
DebugMenuAddVar("Debug", "Engine Status", &engineStatus, nil, 1, 0, 226, nil);
|
||||
DebugMenuAddCmd("Debug", "Set Engine Status", SetEngineStatus);
|
||||
DebugMenuAddCmd("Debug", "Fix Car", FixCar);
|
||||
DebugMenuAddCmd("Debug", "Toggle Comedy Controls", ToggleComedy);
|
||||
DebugMenuAddCmd("Debug", "Place Car on Road", PlaceOnRoad);
|
||||
|
||||
DebugMenuAddVarBool8("Debug", "Script Heli On", &CHeli::ScriptHeliOn, nil);
|
||||
|
||||
DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
|
||||
DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
|
||||
//DebugMenuAddCmd("Debug", "Start Credits", CCredits::Start);
|
||||
//DebugMenuAddCmd("Debug", "Stop Credits", CCredits::Stop);
|
||||
|
||||
#ifdef RELOADABLES
|
||||
DebugMenuAddCmd("Reload", "HUD.TXD", CHud::ReloadTXD);
|
||||
// maybe put it back if we have more to reload
|
||||
// DebugMenuAddCmd("Reload", "HUD.TXD", CHud::ReloadTXD);
|
||||
#endif
|
||||
DebugMenuAddVarBool8("Debug", "Show DebugStuffInRelease", &gbDebugStuffInRelease, nil);
|
||||
#ifdef TIMEBARS
|
||||
DebugMenuAddVarBool8("Debug", "Show Timebars", &gbShowTimebars, nil);
|
||||
|
||||
#ifdef MAP_ENHANCEMENTS
|
||||
DebugMenuAddCmd("Game", "Teleport to map waypoint", TeleportToWaypoint);
|
||||
#endif
|
||||
DebugMenuAddCmd("Game", "Fix Car", FixCar);
|
||||
DebugMenuAddCmd("Game", "Place Car on Road", PlaceOnRoad);
|
||||
DebugMenuAddCmd("Game", "Switch car collision", SwitchCarCollision);
|
||||
DebugMenuAddCmd("Game", "Toggle Comedy Controls", ToggleComedy);
|
||||
|
||||
|
||||
#ifdef MISSION_SWITCHER
|
||||
DebugMenuEntry *missionEntry;
|
||||
static const char* missions[] = {
|
||||
@@ -1005,9 +1057,9 @@ extern bool gbRenderDebugEnvMap;
|
||||
"A Date with Death (Toshiko Kasen)", "Cash in Kazuki's Chips (Toshiko Kasen)"
|
||||
};
|
||||
|
||||
missionEntry = DebugMenuAddVar("Debug", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions);
|
||||
missionEntry = DebugMenuAddVar("Game", "Select mission", &nextMissionToSwitch, nil, 1, 0, ARRAY_SIZE(missions) - 1, missions);
|
||||
DebugMenuEntrySetWrap(missionEntry, true);
|
||||
DebugMenuAddCmd("Debug", "Start selected mission ", SwitchToMission);
|
||||
DebugMenuAddCmd("Game", "Start selected mission ", SwitchToMission);
|
||||
#endif
|
||||
extern bool PrintDebugCode;
|
||||
extern int16 DebugCamMode;
|
||||
|
||||
Reference in New Issue
Block a user