summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-03-28 17:12:22 +0100
committerGitHub <noreply@github.com>2020-03-28 17:12:22 +0100
commitc056871e0766c587e45797405f6432715beba810 (patch)
tree8b0d0c7f364decebaaeacc8a328491404213964a /src/core
parentMerge pull request #362 from Fire-Head/master (diff)
parentCCopPed done and #include cleanup (diff)
downloadre3-c056871e0766c587e45797405f6432715beba810.tar
re3-c056871e0766c587e45797405f6432715beba810.tar.gz
re3-c056871e0766c587e45797405f6432715beba810.tar.bz2
re3-c056871e0766c587e45797405f6432715beba810.tar.lz
re3-c056871e0766c587e45797405f6432715beba810.tar.xz
re3-c056871e0766c587e45797405f6432715beba810.tar.zst
re3-c056871e0766c587e45797405f6432715beba810.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/AnimViewer.cpp5
-rw-r--r--src/core/CutsceneMgr.cpp2
-rw-r--r--src/core/EventList.cpp2
-rw-r--r--src/core/Frontend.cpp21
-rw-r--r--src/core/Game.cpp2
-rw-r--r--src/core/Pad.cpp3
-rw-r--r--src/core/PlayerInfo.cpp3
-rw-r--r--src/core/Streaming.cpp1
8 files changed, 26 insertions, 13 deletions
diff --git a/src/core/AnimViewer.cpp b/src/core/AnimViewer.cpp
index a2d7b94a..20a0098d 100644
--- a/src/core/AnimViewer.cpp
+++ b/src/core/AnimViewer.cpp
@@ -33,6 +33,7 @@
#include "Clock.h"
#include "Timecycle.h"
#include "RpAnimBlend.h"
+#include "AnimBlendAssociation.h"
#include "Shadows.h"
#include "Radar.h"
#include "Hud.h"
@@ -207,6 +208,7 @@ PlayAnimation(RpClump *clump, AssocGroupId animGroup, AnimationId anim)
animAssoc->SetRun();
}
+extern void (*DebugMenuProcess)(void);
void
CAnimViewer::Update(void)
{
@@ -246,6 +248,9 @@ CAnimViewer::Update(void)
}
CPad::UpdatePads();
CPad* pad = CPad::GetPad(0);
+
+ DebugMenuProcess();
+
CStreaming::UpdateForAnimViewer();
CStreaming::RequestModel(modelId, 0);
if (CStreaming::HasModelLoaded(modelId)) {
diff --git a/src/core/CutsceneMgr.cpp b/src/core/CutsceneMgr.cpp
index c13aa3a8..a3ff2fd0 100644
--- a/src/core/CutsceneMgr.cpp
+++ b/src/core/CutsceneMgr.cpp
@@ -9,12 +9,14 @@
#include "FileMgr.h"
#include "main.h"
#include "AnimManager.h"
+#include "AnimBlendAssociation.h"
#include "AnimBlendAssocGroup.h"
#include "AnimBlendClumpData.h"
#include "Pad.h"
#include "DMAudio.h"
#include "World.h"
#include "PlayerPed.h"
+#include "Wanted.h"
#include "CutsceneHead.h"
#include "RpAnimBlend.h"
#include "ModelIndices.h"
diff --git a/src/core/EventList.cpp b/src/core/EventList.cpp
index 4364359a..d72e32c4 100644
--- a/src/core/EventList.cpp
+++ b/src/core/EventList.cpp
@@ -212,7 +212,7 @@ CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCar
#ifdef VC_PED_PORTS
if (crime == CRIME_HIT_PED && ((CPed*)crimeId)->IsPointerValid() &&
- FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->m_ped_flagE2) {
+ FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->bBeingChasedByPolice) {
if(!((CPed*)crimeId)->DyingOrDead()) {
sprintf(gString, "$50 Good Citizen Bonus!");
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index aff8a3ec..0bade6c7 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -94,7 +94,6 @@ int32 *&pControlEdit = *(int32**)0x628D08;
bool &DisplayComboButtonErrMsg = *(bool*)0x628D14;
int32 &MouseButtonJustClicked = *(int32*)0x628D0C;
int32 &JoyButtonJustClicked = *(int32*)0x628D10;
-uint32 &nTimeForSomething = *(uint32*)0x628D54;
bool &holdingScrollBar = *(bool*)0x628D59;
//int32 *pControlTemp = 0;
@@ -2202,15 +2201,15 @@ CMenuManager::ProcessButtonPresses(void)
field_535 = false;
}
- static int nTimeForSomething = 0;
+ static uint32 lastTimeClickedScrollButton = 0;
- if (CTimer::GetTimeInMillisecondsPauseMode() - nTimeForSomething >= 200) {
+ if (CTimer::GetTimeInMillisecondsPauseMode() - lastTimeClickedScrollButton >= 200) {
m_bPressedPgUpOnList = false;
m_bPressedPgDnOnList = false;
m_bPressedUpOnList = false;
m_bPressedDownOnList = false;
m_bPressedScrollButton = false;
- nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
+ lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
}
if (CPad::GetPad(0)->GetTabJustDown()) {
@@ -2249,7 +2248,7 @@ CMenuManager::ProcessButtonPresses(void)
m_nCurrExLayer = 19;
if (!m_bPressedUpOnList) {
m_bPressedUpOnList = true;
- nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
+ lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
ScrollUpListByOne();
}
@@ -2271,7 +2270,7 @@ CMenuManager::ProcessButtonPresses(void)
m_nCurrExLayer = 19;
if (!m_bPressedDownOnList) {
m_bPressedDownOnList = true;
- nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
+ lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
ScrollDownListByOne();
}
@@ -2286,7 +2285,7 @@ CMenuManager::ProcessButtonPresses(void)
m_nCurrExLayer = 19;
if (!m_bPressedPgUpOnList) {
m_bPressedPgUpOnList = true;
- nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
+ lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
PageUpList(false);
@@ -2298,7 +2297,7 @@ CMenuManager::ProcessButtonPresses(void)
m_nCurrExLayer = 19;
if (!m_bPressedPgDnOnList) {
m_bPressedPgDnOnList = true;
- nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
+ lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
m_bShowMouse = false;
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
PageDownList(false);
@@ -2384,7 +2383,7 @@ CMenuManager::ProcessButtonPresses(void)
case HOVEROPTION_CLICKED_SCROLL_UP:
if (!m_bPressedScrollButton) {
m_bPressedScrollButton = true;
- nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
+ lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
ScrollUpListByOne();
}
break;
@@ -2392,7 +2391,7 @@ CMenuManager::ProcessButtonPresses(void)
case HOVEROPTION_CLICKED_SCROLL_DOWN:
if (!m_bPressedScrollButton) {
m_bPressedScrollButton = true;
- nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
+ lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
ScrollDownListByOne();
}
break;
@@ -3593,7 +3592,7 @@ void CMenuManager::SwitchMenuOnAndOff()
PcSaveHelper.PopulateSlotInfo();
m_nCurrOption = 0;
}
-/* // PS2 leftover?
+/* // PS2 leftover
if (m_nCurrScreen != MENUPAGE_SOUND_SETTINGS && gMusicPlaying)
{
DMAudio.StopFrontEndTrack();
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index e89d62a0..fce0c67f 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -41,6 +41,8 @@
#include "Record.h"
#include "Renderer.h"
#include "Replay.h"
+#include "References.h"
+#include "Radar.h"
#include "Restart.h"
#include "RoadBlocks.h"
#include "PedRoutes.h"
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 87f45b9f..6bbe00f2 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -574,8 +574,9 @@ void CPad::AffectFromXinput(uint32 pad)
PCTempJoyState.RightShoulder2 = xstate.Gamepad.bRightTrigger;
PCTempJoyState.Select = (xstate.Gamepad.wButtons & XINPUT_GAMEPAD_BACK) ? 255 : 0;
+#ifdef REGISTER_START_BUTTON
PCTempJoyState.Start = (xstate.Gamepad.wButtons & XINPUT_GAMEPAD_START) ? 255 : 0;
-
+#endif
float lx = (float)xstate.Gamepad.sThumbLX / (float)0x7FFF;
float ly = (float)xstate.Gamepad.sThumbLY / (float)0x7FFF;
float rx = (float)xstate.Gamepad.sThumbRX / (float)0x7FFF;
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index e0c0259e..ead32ee7 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -2,7 +2,9 @@
#include "patcher.h"
#include "main.h"
#include "PlayerPed.h"
+#include "Wanted.h"
#include "PlayerInfo.h"
+#include "Fire.h"
#include "Frontend.h"
#include "PlayerSkin.h"
#include "Darkel.h"
@@ -12,6 +14,7 @@
#include "Remote.h"
#include "World.h"
#include "Replay.h"
+#include "Camera.h"
#include "Pad.h"
#include "ProjectileInfo.h"
#include "Explosion.h"
diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp
index 6106f3df..3dcb767a 100644
--- a/src/core/Streaming.cpp
+++ b/src/core/Streaming.cpp
@@ -10,6 +10,7 @@
#include "TxdStore.h"
#include "ModelIndices.h"
#include "Pools.h"
+#include "Wanted.h"
#include "Directory.h"
#include "RwHelper.h"
#include "World.h"