mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-05 14:45:54 +00:00
Merge branch 'master' into miami
# Conflicts: # src/control/Darkel.cpp # src/core/main.cpp
This commit is contained in:
commit
9956b27767
|
@ -32,9 +32,9 @@ int8 CDarkel::InterruptedWeapon;
|
||||||
* makes game handle sounds & messages instead of SCM (just like in GTA2)
|
* makes game handle sounds & messages instead of SCM (just like in GTA2)
|
||||||
* but it's never been used in the game. Has unused sliding text when frenzy completed etc.
|
* but it's never been used in the game. Has unused sliding text when frenzy completed etc.
|
||||||
*/
|
*/
|
||||||
int8 CDarkel::bStandardSoundAndMessages;
|
bool CDarkel::bStandardSoundAndMessages;
|
||||||
int8 CDarkel::bNeedHeadShot;
|
bool CDarkel::bNeedHeadShot;
|
||||||
int8 CDarkel::bProperKillFrenzy;
|
bool CDarkel::bProperKillFrenzy;
|
||||||
uint16 CDarkel::Status;
|
uint16 CDarkel::Status;
|
||||||
uint16 CDarkel::RegisteredKills[NUM_DEFAULT_MODELS];
|
uint16 CDarkel::RegisteredKills[NUM_DEFAULT_MODELS];
|
||||||
int32 CDarkel::ModelToKill;
|
int32 CDarkel::ModelToKill;
|
||||||
|
|
|
@ -24,9 +24,9 @@ private:
|
||||||
static int32 AmmoInterruptedWeapon;
|
static int32 AmmoInterruptedWeapon;
|
||||||
static int32 KillsNeeded;
|
static int32 KillsNeeded;
|
||||||
static int8 InterruptedWeapon;
|
static int8 InterruptedWeapon;
|
||||||
static int8 bStandardSoundAndMessages;
|
static bool bStandardSoundAndMessages;
|
||||||
static int8 bNeedHeadShot;
|
static bool bNeedHeadShot;
|
||||||
static int8 bProperKillFrenzy;
|
static bool bProperKillFrenzy;
|
||||||
static uint16 Status;
|
static uint16 Status;
|
||||||
static uint16 RegisteredKills[NUM_DEFAULT_MODELS];
|
static uint16 RegisteredKills[NUM_DEFAULT_MODELS];
|
||||||
static int32 ModelToKill;
|
static int32 ModelToKill;
|
||||||
|
|
|
@ -19,4 +19,5 @@ public:
|
||||||
static bool ReadLine(int fd, char *buf, int len);
|
static bool ReadLine(int fd, char *buf, int len);
|
||||||
static int CloseFile(int fd);
|
static int CloseFile(int fd);
|
||||||
static int GetErrorReadWrite(int fd);
|
static int GetErrorReadWrite(int fd);
|
||||||
|
static char *GetRootDirName() { return ms_rootDirName; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "rpmatfx.h"
|
#include "rpmatfx.h"
|
||||||
#include "rphanim.h"
|
#include "rphanim.h"
|
||||||
#include "rpskin.h"
|
#include "rpskin.h"
|
||||||
|
#include "rtbmp.h"
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "CdStream.h"
|
#include "CdStream.h"
|
||||||
|
@ -61,6 +62,7 @@
|
||||||
#include "MemoryCard.h"
|
#include "MemoryCard.h"
|
||||||
#include "SceneEdit.h"
|
#include "SceneEdit.h"
|
||||||
#include "debugmenu.h"
|
#include "debugmenu.h"
|
||||||
|
#include "Clock.h"
|
||||||
#include "Occlusion.h"
|
#include "Occlusion.h"
|
||||||
#include "Ropes.h"
|
#include "Ropes.h"
|
||||||
|
|
||||||
|
@ -279,6 +281,28 @@ DoFade(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
RwGrabScreen(RwCamera *camera, RwChar *filename)
|
||||||
|
{
|
||||||
|
char temp[255];
|
||||||
|
RwImage *pImage = RsGrabScreen(camera);
|
||||||
|
bool result = true;
|
||||||
|
|
||||||
|
if (pImage == nil)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
strcpy(temp, CFileMgr::GetRootDirName());
|
||||||
|
strcat(temp, filename);
|
||||||
|
|
||||||
|
if (RtBMPImageWrite(pImage, &temp[0]) == nil)
|
||||||
|
result = false;
|
||||||
|
RwImageDestroy(pImage);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TILE_WIDTH 576
|
||||||
|
#define TILE_HEIGHT 432
|
||||||
|
|
||||||
void
|
void
|
||||||
DoRWStuffEndOfFrame(void)
|
DoRWStuffEndOfFrame(void)
|
||||||
{
|
{
|
||||||
|
@ -287,6 +311,20 @@ DoRWStuffEndOfFrame(void)
|
||||||
FlushObrsPrintfs();
|
FlushObrsPrintfs();
|
||||||
RwCameraEndUpdate(Scene.camera);
|
RwCameraEndUpdate(Scene.camera);
|
||||||
RsCameraShowRaster(Scene.camera);
|
RsCameraShowRaster(Scene.camera);
|
||||||
|
#ifndef MASTER
|
||||||
|
char s[48];
|
||||||
|
if (CPad::GetPad(1)->GetLeftShockJustDown()) {
|
||||||
|
// try using both controllers for this thing... crazy bastards
|
||||||
|
if (CPad::GetPad(0)->GetRightStickY() > 0) {
|
||||||
|
sprintf(s, "screen%d%d.ras", CClock::ms_nGameClockHours, CClock::ms_nGameClockMinutes);
|
||||||
|
// TODO
|
||||||
|
//RtTileRender(Scene.camera, TILE_WIDTH * 2, TILE_HEIGHT * 2, TILE_WIDTH, TILE_HEIGHT, &NewTileRendererCB, nil, s);
|
||||||
|
} else {
|
||||||
|
sprintf(s, "screen%d%d.bmp", CClock::ms_nGameClockHours, CClock::ms_nGameClockMinutes);
|
||||||
|
RwGrabScreen(Scene.camera, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !MASTER
|
||||||
}
|
}
|
||||||
|
|
||||||
static RwBool
|
static RwBool
|
||||||
|
|
|
@ -11810,7 +11810,11 @@ CPed::ProcessControl(void)
|
||||||
CPed::Chat();
|
CPed::Chat();
|
||||||
break;
|
break;
|
||||||
case PED_AIM_GUN:
|
case PED_AIM_GUN:
|
||||||
if (m_pPointGunAt && m_pPointGunAt->IsPed() && ((CPed*)m_pPointGunAt)->CanSeeEntity(this, CAN_SEE_ENTITY_ANGLE_THRESHOLD * 2)) {
|
if (m_pPointGunAt && m_pPointGunAt->IsPed()
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
&& !GetWeapon()->IsTypeMelee()
|
||||||
|
#endif
|
||||||
|
&& ((CPed*)m_pPointGunAt)->CanSeeEntity(this, CAN_SEE_ENTITY_ANGLE_THRESHOLD * 2)) {
|
||||||
((CPed*)m_pPointGunAt)->ReactToPointGun(this);
|
((CPed*)m_pPointGunAt)->ReactToPointGun(this);
|
||||||
}
|
}
|
||||||
PointGunAt();
|
PointGunAt();
|
||||||
|
|
|
@ -185,6 +185,22 @@ psCameraShowRaster(RwCamera *camera)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*****************************************************************************
|
||||||
|
*/
|
||||||
|
RwImage *
|
||||||
|
psGrabScreen(RwCamera *pCamera)
|
||||||
|
{
|
||||||
|
#ifndef LIBRW
|
||||||
|
RwRaster *pRaster = RwCameraGetRaster(pCamera);
|
||||||
|
if (RwImage *pImage = RwImageCreate(pRaster->width, pRaster->height, 32)) {
|
||||||
|
RwImageAllocatePixels(pImage);
|
||||||
|
RwImageSetFromRaster(pImage, pRaster);
|
||||||
|
return pImage;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
|
@ -22,6 +22,7 @@ extern void psTerminate(void);
|
||||||
|
|
||||||
extern void psCameraShowRaster(RwCamera *camera);
|
extern void psCameraShowRaster(RwCamera *camera);
|
||||||
extern RwBool psCameraBeginUpdate(RwCamera *camera);
|
extern RwBool psCameraBeginUpdate(RwCamera *camera);
|
||||||
|
extern RwImage *psGrabScreen(RwCamera *camera);
|
||||||
|
|
||||||
extern void psMouseSetPos(RwV2d *pos);
|
extern void psMouseSetPos(RwV2d *pos);
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,15 @@ RsCameraBeginUpdate(RwCamera * camera)
|
||||||
return psCameraBeginUpdate(camera);
|
return psCameraBeginUpdate(camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
*****************************************************************************
|
||||||
|
*/
|
||||||
|
RwImage*
|
||||||
|
RsGrabScreen(RwCamera *camera)
|
||||||
|
{
|
||||||
|
return psGrabScreen(camera);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -274,6 +274,9 @@ RsCameraBeginUpdate(RwCamera *camera);
|
||||||
//extern void
|
//extern void
|
||||||
//RsMouseSetVisibility(RwBool visible);
|
//RsMouseSetVisibility(RwBool visible);
|
||||||
|
|
||||||
|
extern RwImage*
|
||||||
|
RsGrabScreen(RwCamera *camera);
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
RsMouseSetPos(RwV2d *pos);
|
RsMouseSetPos(RwV2d *pos);
|
||||||
|
|
||||||
|
|
|
@ -242,6 +242,23 @@ psCameraShowRaster(RwCamera *camera)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
*****************************************************************************
|
||||||
|
*/
|
||||||
|
RwImage *
|
||||||
|
psGrabScreen(RwCamera *pCamera)
|
||||||
|
{
|
||||||
|
#ifndef LIBRW
|
||||||
|
RwRaster *pRaster = RwCameraGetRaster(pCamera);
|
||||||
|
if (RwImage *pImage = RwImageCreate(pRaster->width, pRaster->height, 32)) {
|
||||||
|
RwImageAllocatePixels(pImage);
|
||||||
|
RwImageSetFromRaster(pImage, pRaster);
|
||||||
|
return pImage;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue