1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 14:00:02 +00:00

script logging

This commit is contained in:
Nikolay Korolev 2020-06-21 13:46:23 +03:00
parent 586e8a2ab4
commit f5cba0ce89
4 changed files with 1446 additions and 31 deletions

File diff suppressed because it is too large Load diff

View file

@ -350,6 +350,7 @@ private:
static bool IsPlayerStopped(CPlayerInfo*); static bool IsPlayerStopped(CPlayerInfo*);
static bool IsVehicleStopped(CVehicle*); static bool IsVehicleStopped(CVehicle*);
static void PrintListSizes();
static void ReadObjectNamesFromScript(); static void ReadObjectNamesFromScript();
static void UpdateObjectIndices(); static void UpdateObjectIndices();
static void ReadMultiScriptFileOffsetsFromScript(); static void ReadMultiScriptFileOffsetsFromScript();
@ -486,6 +487,11 @@ private:
bool CanAllowMissionReplay(); bool CanAllowMissionReplay();
#endif #endif
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
int CollectParameterForDebug(char* buf, bool& var);
void GetStoredParameterForDebug(char* buf);
#endif
float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; } float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; }
bool ThisIsAValidRandomPed(uint32 pedtype) { bool ThisIsAValidRandomPed(uint32 pedtype) {

View file

@ -1157,7 +1157,38 @@ enum {
COMMAND_CAN_CHAR_SEE_DEAD_CHAR, COMMAND_CAN_CHAR_SEE_DEAD_CHAR,
COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER, COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER,
#ifndef GTA3_1_1_PATCH #ifndef GTA3_1_1_PATCH
COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER,
#endif
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
LAST_SCRIPT_COMMAND
#endif #endif
#endif #endif
}; };
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
enum eScriptArgument
{
ARGTYPE_NONE = 0,
ARGTYPE_INT,
ARGTYPE_FLOAT,
ARGTYPE_STRING,
ARGTYPE_LABEL,
ARGTYPE_BOOL,
ARGTYPE_PED_HANDLE,
ARGTYPE_VEHICLE_HANDLE,
ARGTYPE_OBJECT_HANDLE,
ARGTYPE_ANDOR
};
struct tScriptCommandData
{
int id;
const char name[64];
eScriptArgument input[18];
eScriptArgument output[18];
bool cond;
int position;
const char name_override[8];
};
#endif

View file

@ -233,6 +233,8 @@ enum Config {
#define USE_PRECISE_MEASUREMENT_CONVERTION // makes game convert feet to meeters more precisely #define USE_PRECISE_MEASUREMENT_CONVERTION // makes game convert feet to meeters more precisely
#define MISSION_REPLAY // mobile feature #define MISSION_REPLAY // mobile feature
//#define SIMPLIER_MISSIONS // apply simplifications from mobile //#define SIMPLIER_MISSIONS // apply simplifications from mobile
#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
#define SCRIPT_LOG_FILE_LEVEL 1 // 0 == no log, 1 == overwrite every frame, 2 == full log
// Replay // Replay
//#define DONT_FIX_REPLAY_BUGS // keeps various bugs in CReplay, some of which are fairly cool! //#define DONT_FIX_REPLAY_BUGS // keeps various bugs in CReplay, some of which are fairly cool!