mirror of
https://github.com/halpz/re3.git
synced 2025-07-15 09:18:12 +00:00
Merge branch 'miami' of github.com:GTAmodding/re3 into miami
This commit is contained in:
@ -4539,6 +4539,9 @@ CCam::Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrient
|
||||
Rotating = false;
|
||||
}
|
||||
|
||||
if(TheCamera.m_bUseTransitionBeta)
|
||||
Beta = CGeneral::GetATanOfXY(-Cos(m_fTransitionBeta), -Sin(m_fTransitionBeta));
|
||||
|
||||
if(TheCamera.m_bUseTransitionBeta)
|
||||
Beta = CGeneral::GetATanOfXY(-Cos(m_fTransitionBeta), -Sin(m_fTransitionBeta));
|
||||
|
||||
|
@ -260,9 +260,8 @@ public:
|
||||
void Process_FollowPed_Rotation(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
void Process_FollowCar_SA(const CVector &CameraTarget, float TargetOrientation, float, float);
|
||||
};
|
||||
static_assert(sizeof(CCam) == 0x1A4, "CCam: wrong size");
|
||||
static_assert(offsetof(CCam, Alpha) == 0xA8, "CCam: error");
|
||||
static_assert(offsetof(CCam, Front) == 0x140, "CCam: error");
|
||||
|
||||
VALIDATE_SIZE(CCam, 0x1A4);
|
||||
|
||||
class CCamPathSplines
|
||||
{
|
||||
@ -637,19 +636,8 @@ uint32 unknown; // some counter having to do with music
|
||||
bool IsSphereVisible(const CVector ¢er, float radius);
|
||||
bool IsBoxVisible(RwV3d *box, const CMatrix *mat);
|
||||
};
|
||||
static_assert(offsetof(CCamera, DistanceToWater) == 0xe4, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_WideScreenOn) == 0x70, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, WorldViewerBeingUsed) == 0x75, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_uiNumberOfTrainCamNodes) == 0x84, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_uiTransitionState) == 0x89, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_uiTimeTransitionStart) == 0x94, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_BlurBlue) == 0x9C, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, Cams) == 0x1A4, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, pToGarageWeAreIn) == 0x690, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_PreviousCameraPosition) == 0x6B0, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_vecCutSceneOffset) == 0x6F8, "CCamera: error");
|
||||
static_assert(offsetof(CCamera, m_arrPathArray) == 0x7a8, "CCamera: error");
|
||||
static_assert(sizeof(CCamera) == 0xE9D8, "CCamera: wrong size");
|
||||
|
||||
VALIDATE_SIZE(CCamera, 0xE9D8);
|
||||
|
||||
extern CCamera TheCamera;
|
||||
|
||||
|
@ -22,6 +22,7 @@ struct CdReadInfo
|
||||
HANDLE hFile;
|
||||
OVERLAPPED Overlapped;
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CdReadInfo, 0x30);
|
||||
|
||||
char gCdImageNames[MAX_CDIMAGES+1][64];
|
||||
|
@ -27,7 +27,6 @@ struct Queue
|
||||
|
||||
VALIDATE_SIZE(Queue, 0x10);
|
||||
|
||||
|
||||
void CdStreamInitThread(void);
|
||||
void CdStreamInit(int32 numChannels);
|
||||
uint32 GetGTA3ImgSize(void);
|
||||
|
@ -660,7 +660,7 @@ public:
|
||||
};
|
||||
|
||||
#ifndef IMPROVED_VIDEOMODE
|
||||
static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error");
|
||||
VALIDATE_SIZE(CMenuManager, 0x564);
|
||||
#endif
|
||||
|
||||
extern CMenuManager FrontEndMenuManager;
|
||||
|
@ -221,22 +221,9 @@ bool CGame::InitialiseOnceAfterRW(void)
|
||||
if ( FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -99 || FrontEndMenuManager.m_nPrefsAudio3DProviderIndex == -2 )
|
||||
{
|
||||
CMenuManager::m_PrefsSpeakers = 0;
|
||||
|
||||
for ( int32 i = 0; i < DMAudio.GetNum3DProvidersAvailable(); i++ )
|
||||
{
|
||||
wchar buff[64];
|
||||
|
||||
char *name = DMAudio.Get3DProviderName(i);
|
||||
AsciiToUnicode(name, buff);
|
||||
char *providername = UnicodeToAscii(buff);
|
||||
strupr(providername);
|
||||
|
||||
if ( !strcmp(providername, "MILES FAST 2D POSITIONAL AUDIO") )
|
||||
{
|
||||
FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
int8 provider = DMAudio.AutoDetect3DProviders();
|
||||
if ( provider != -1 )
|
||||
FrontEndMenuManager.m_nPrefsAudio3DProviderIndex = provider;
|
||||
}
|
||||
|
||||
DMAudio.SetCurrent3DProvider(FrontEndMenuManager.m_nPrefsAudio3DProviderIndex);
|
||||
|
@ -31,4 +31,5 @@ public:
|
||||
bool IsWithinArea(float x1, float y1, float x2, float y2);
|
||||
bool IsWithinArea(float x1, float y1, float z1, float x2, float y2, float z2);
|
||||
};
|
||||
static_assert(sizeof(CPlaceable) == 0x4C, "CPlaceable: error");
|
||||
|
||||
VALIDATE_SIZE(CPlaceable, 0x4C);
|
||||
|
@ -71,7 +71,7 @@ struct sRadarTrace
|
||||
uint16 m_eBlipDisplay; // eBlipDisplay
|
||||
uint16 m_eRadarSprite; // eRadarSprite
|
||||
};
|
||||
static_assert(sizeof(sRadarTrace) == 0x30, "sRadarTrace: error");
|
||||
VALIDATE_SIZE(sRadarTrace, 0x30);
|
||||
|
||||
// Values for screen space
|
||||
#define RADAR_LEFT (40.0f)
|
||||
|
@ -55,4 +55,4 @@ public:
|
||||
static void SetMaximumWantedLevel(int32 level);
|
||||
};
|
||||
|
||||
static_assert(sizeof(CWanted) == 0x204, "CWanted: error");
|
||||
VALIDATE_SIZE(CWanted, 0x204);
|
||||
|
@ -45,7 +45,8 @@ class CSector
|
||||
public:
|
||||
CPtrList m_lists[NUMSECTORENTITYLISTS];
|
||||
};
|
||||
static_assert(sizeof(CSector) == 0x28, "CSector: error");
|
||||
|
||||
VALIDATE_SIZE(CSector, 0x28);
|
||||
|
||||
class CEntity;
|
||||
struct CColPoint;
|
||||
|
@ -213,6 +213,7 @@ void mysrand(unsigned int seed);
|
||||
void re3_debug(const char *format, ...);
|
||||
void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
|
||||
void re3_assert(const char *expr, const char *filename, unsigned int lineno, const char *func);
|
||||
void re3_usererror(const char *format, ...);
|
||||
|
||||
#define DEBUGBREAK() __debugbreak();
|
||||
|
||||
@ -220,6 +221,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
||||
#define DEV(f, ...) re3_debug("[DEV]: " f, ## __VA_ARGS__)
|
||||
#define TRACE(f, ...) re3_trace(__FILE__, __LINE__, __FUNCTION__, f, ## __VA_ARGS__)
|
||||
#define Error(f, ...) re3_debug("[ERROR]: " f, ## __VA_ARGS__)
|
||||
#define USERERROR(f, ...) re3_usererror(f, ## __VA_ARGS__)
|
||||
|
||||
#define assert(_Expression) (void)( (!!(_Expression)) || (re3_assert(#_Expression, __FILE__, __LINE__, __FUNCTION__), 0) )
|
||||
#define ASSERT assert
|
||||
@ -227,7 +229,11 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
|
||||
#define _TODO(x)
|
||||
#define _TODOCONST(x) (x)
|
||||
|
||||
#ifdef CHECK_STRUCT_SIZES
|
||||
#define VALIDATE_SIZE(struc, size) static_assert(sizeof(struc) == size, "Invalid structure size of " #struc)
|
||||
#else
|
||||
#define VALIDATE_SIZE(struc, size)
|
||||
#endif
|
||||
#define VALIDATE_OFFSET(struc, member, offset) static_assert(offsetof(struc, member) == offset, "The offset of " #member " in " #struc " is not " #offset "...")
|
||||
|
||||
#define PERCENT(x, p) ((float(x) * (float(p) / 100.0f)))
|
||||
|
@ -199,7 +199,8 @@ enum Config {
|
||||
#define USE_TXD_CDIMAGE // generate and load textures from txd.img
|
||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||
//#define USE_TEXTURE_POOL
|
||||
//#define OPENAL
|
||||
//#define AUDIO_OAL
|
||||
#define AUDIO_MSS
|
||||
|
||||
// Particle
|
||||
//#define PC_PARTICLE
|
||||
|
@ -465,6 +465,20 @@ void re3_trace(const char *filename, unsigned int lineno, const char *func, cons
|
||||
OutputDebugStringA(buff);
|
||||
}
|
||||
|
||||
void re3_usererror(const char *format, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, format);
|
||||
vsprintf_s(re3_buff, re3_buffsize, format, va);
|
||||
va_end(va);
|
||||
|
||||
::MessageBoxA(nil, re3_buff, "RE3 Error!",
|
||||
MB_OK|MB_ICONHAND|MB_SETFOREGROUND|MB_TASKMODAL);
|
||||
|
||||
raise(SIGABRT);
|
||||
_exit(3);
|
||||
}
|
||||
|
||||
#ifdef VALIDATE_SAVE_SIZE
|
||||
int32 _saveBufCount;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user