diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-09-30 14:19:55 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-09-30 14:19:55 +0200 |
commit | 4c582b19eb52904c56cf6a62ffb8655ed1e426e2 (patch) | |
tree | cde4b80f479c84fe4a164fe3daef1309785f17be /src/core | |
parent | Merge remote-tracking branch 'upstream/miami' into miami (diff) | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-4c582b19eb52904c56cf6a62ffb8655ed1e426e2.tar re3-4c582b19eb52904c56cf6a62ffb8655ed1e426e2.tar.gz re3-4c582b19eb52904c56cf6a62ffb8655ed1e426e2.tar.bz2 re3-4c582b19eb52904c56cf6a62ffb8655ed1e426e2.tar.lz re3-4c582b19eb52904c56cf6a62ffb8655ed1e426e2.tar.xz re3-4c582b19eb52904c56cf6a62ffb8655ed1e426e2.tar.zst re3-4c582b19eb52904c56cf6a62ffb8655ed1e426e2.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/CdStream.cpp | 4 | ||||
-rw-r--r-- | src/core/ControllerConfig.cpp | 3 | ||||
-rw-r--r-- | src/core/Pad.cpp | 4 | ||||
-rw-r--r-- | src/core/Pad.h | 8 | ||||
-rw-r--r-- | src/core/Radar.cpp | 12 | ||||
-rw-r--r-- | src/core/common.h | 2 | ||||
-rw-r--r-- | src/core/config.h | 5 | ||||
-rw-r--r-- | src/core/timebars.cpp | 4 | ||||
-rw-r--r-- | src/core/timebars.h | 4 |
9 files changed, 28 insertions, 18 deletions
diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp index d9978040..c11fb72a 100644 --- a/src/core/CdStream.cpp +++ b/src/core/CdStream.cpp @@ -106,12 +106,14 @@ CdStreamInit(int32 numChannels) GetDiskFreeSpace(nil, &SectorsPerCluster, &BytesPerSector, &NumberOfFreeClusters, &TotalNumberOfClusters); _gdwCdStreamFlags = 0; - + +#ifndef FIX_BUGS // this just slows down streaming if ( BytesPerSector <= CDSTREAM_SECTOR_SIZE ) { _gdwCdStreamFlags |= FILE_FLAG_NO_BUFFERING; debug("Using no buffered loading for streaming\n"); } +#endif _gbCdStreamOverlapped = TRUE; diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp index 68a29b28..bdfab34c 100644 --- a/src/core/ControllerConfig.cpp +++ b/src/core/ControllerConfig.cpp @@ -733,9 +733,6 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32 FindPlayerVehicle()->GetModelIndex() == MI_DODO #ifdef FIX_BUGS || (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli()) -#ifdef ALLCARSHELI_CHEAT - || bAllCarCheat -#endif #endif ))) { diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index a8ccbc36..36e14e55 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -526,7 +526,7 @@ void KangarooCheat() } #endif -#ifdef ALLCARSHELI_CHEAT +#ifdef RESTORE_ALLCARSHELI_CHEAT void AllCarsHeliCheat(void) { wchar* string; @@ -1438,7 +1438,7 @@ void CPad::AddToPCCheatString(char c) CPed::SwitchDebugDisplay(); #endif -#ifdef ALLCARSHELI_CHEAT +#ifdef RESTORE_ALLCARSHELI_CHEAT // "CARSAREHELI" if (!_CHEATCMP("ILEHERASRAC")) AllCarsHeliCheat(); diff --git a/src/core/Pad.h b/src/core/Pad.h index 72851317..cde2d3c5 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -286,6 +286,8 @@ public: bool GetMiddleMouseJustUp() { return !!(!NewMouseControllerState.MMB && OldMouseControllerState.MMB); } bool GetMouseWheelUpJustUp() { return !!(!NewMouseControllerState.WHEELUP && OldMouseControllerState.WHEELUP); } bool GetMouseWheelDownJustUp() { return !!(!NewMouseControllerState.WHEELDN && OldMouseControllerState.WHEELDN); } + bool GetMouseX1JustUp() { return !!(!NewMouseControllerState.MXB1 && OldMouseControllerState.MXB1); } + bool GetMouseX2JustUp() { return !!(!NewMouseControllerState.MXB2 && OldMouseControllerState.MXB2); } bool GetLeftMouse() { return NewMouseControllerState.LMB; } bool GetRightMouse() { return NewMouseControllerState.RMB; } @@ -469,8 +471,4 @@ public: }; VALIDATE_SIZE(CPad, 0xFC); -extern CPad Pads[MAX_PADS]; - -#ifdef ALLCARSHELI_CHEAT -extern bool bAllCarCheat; -#endif +extern CPad Pads[MAX_PADS];
\ No newline at end of file diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 559a8cd6..b9fc369d 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -1151,6 +1151,10 @@ int CRadar::SetCoordBlip(eBlipType type, CVector pos, int32 color, eBlipDisplay if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return -1; +#endif ms_RadarTrace[nextBlip].m_eBlipType = type; ms_RadarTrace[nextBlip].m_nColor = color; ms_RadarTrace[nextBlip].m_bDim = true; @@ -1182,6 +1186,10 @@ int CRadar::SetEntityBlip(eBlipType type, int32 handle, int32 color, eBlipDispla if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return -1; +#endif ms_RadarTrace[nextBlip].m_eBlipType = type; ms_RadarTrace[nextBlip].m_nColor = color; ms_RadarTrace[nextBlip].m_bDim = true; @@ -1526,6 +1534,10 @@ CRadar::ToggleTargetMarker(float x, float y) if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return; +#endif ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD; ms_RadarTrace[nextBlip].m_nColor = 0x333333FF; ms_RadarTrace[nextBlip].m_bDim = 1; diff --git a/src/core/common.h b/src/core/common.h index ba1d24ef..0a2a236e 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -219,6 +219,8 @@ extern int strncasecmp(const char *str1, const char *str2, size_t len); #define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) +#define clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius)) + inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) diff --git a/src/core/config.h b/src/core/config.h index 82044f75..327230d0 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -250,7 +250,7 @@ enum Config { #endif #define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m #define KANGAROO_CHEAT -#define ALLCARSHELI_CHEAT +#define RESTORE_ALLCARSHELI_CHEAT #define ALT_DODO_CHEAT #define WALLCLIMB_CHEAT #define REGISTER_START_BUTTON @@ -258,14 +258,13 @@ enum Config { // Hud, frontend and radar #define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better. -#define BETA_SLIDING_TEXT +//#define BETA_SLIDING_TEXT #define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC #define PC_MENU #ifndef PC_MENU # define PS2_MENU //# define PS2_MENU_USEALLPAGEICONS -//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc. #else # define MAP_ENHANCEMENTS // Adding waypoint etc. # define TRIANGLE_BACK_BUTTON diff --git a/src/core/timebars.cpp b/src/core/timebars.cpp index 884feffd..31949009 100644 --- a/src/core/timebars.cpp +++ b/src/core/timebars.cpp @@ -50,7 +50,7 @@ void tbInit() #endif } -void tbStartTimer(int32 unk, char *name) +void tbStartTimer(int32 unk, Const char *name) { strcpy(TimerBar.Timers[TimerBar.count].name, name); TimerBar.Timers[TimerBar.count].unk = unk; @@ -58,7 +58,7 @@ void tbStartTimer(int32 unk, char *name) TimerBar.count++; } -void tbEndTimer(char* name) +void tbEndTimer(Const char* name) { uint32 n = 1500; for (uint32 i = 0; i < TimerBar.count; i++) { diff --git a/src/core/timebars.h b/src/core/timebars.h index 6d3b853e..3871b61c 100644 --- a/src/core/timebars.h +++ b/src/core/timebars.h @@ -1,6 +1,6 @@ #pragma once void tbInit(); -void tbStartTimer(int32, char*); -void tbEndTimer(char*); +void tbStartTimer(int32, Const char*); +void tbEndTimer(Const char*); void tbDisplay();
\ No newline at end of file |