summaryrefslogtreecommitdiffstats
path: root/src/control/Script.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-07 19:57:00 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-07 19:57:00 +0200
commita4e6930bb629dadfcfddd7b730b1542827574c1e (patch)
treef093dd10d50da4d9de981792a192e688418b644b /src/control/Script.h
parentMerge pull request #120 from ShFil119/audio4 (diff)
downloadre3-a4e6930bb629dadfcfddd7b730b1542827574c1e.tar
re3-a4e6930bb629dadfcfddd7b730b1542827574c1e.tar.gz
re3-a4e6930bb629dadfcfddd7b730b1542827574c1e.tar.bz2
re3-a4e6930bb629dadfcfddd7b730b1542827574c1e.tar.lz
re3-a4e6930bb629dadfcfddd7b730b1542827574c1e.tar.xz
re3-a4e6930bb629dadfcfddd7b730b1542827574c1e.tar.zst
re3-a4e6930bb629dadfcfddd7b730b1542827574c1e.zip
Diffstat (limited to 'src/control/Script.h')
-rw-r--r--src/control/Script.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/control/Script.h b/src/control/Script.h
index 5759cf82..392f4b40 100644
--- a/src/control/Script.h
+++ b/src/control/Script.h
@@ -8,8 +8,8 @@
struct CScriptRectangle
{
- bool m_bIsUsed;
- bool m_bIsAntialiased;
+ int8 m_Type;
+ bool m_bBeforeFade;
int16 m_nTextureId;
CRect m_sRect;
CRGBA m_sColor;
@@ -40,6 +40,8 @@ struct CTextLine
float m_fAtX;
float m_fAtY;
wchar m_Text[SCRIPT_TEXT_MAX_LENGTH];
+
+ void Reset();
};
static_assert(sizeof(CTextLine) == 0x414, "Script.h: error");
@@ -79,6 +81,13 @@ class CRunningScript
bool m_bMissionFlag;
public:
+ void SetIP(uint32 ip) { m_nIp = ip; }
+ CRunningScript* GetNext() { return next; }
+ void UpdateTimers(float timeStep){
+ m_anLocalVariables[NUM_LOCAL_VARS] += timeStep;
+ m_anLocalVariables[NUM_LOCAL_VARS + 1] += timeStep;
+ }
+
void CollectParameters(uint32*, int16);
int32 CollectNextParameterWithoutIncreasingPC(uint32);
int32* GetPointerToScriptVariable(uint32*, int16);
@@ -86,6 +95,7 @@ public:
void Init();
void RemoveScriptFromList(CRunningScript**);
void AddScriptToList(CRunningScript**);
+ void Process();
};
enum {
@@ -264,17 +274,23 @@ public:
static uint16 &NumberOfIntroRectanglesThisFrame;
static uint16 &NumberOfIntroTextLinesThisFrame;
static bool &UseTextCommands;
+ static uint16 &CommandsExecuted;
+ static uint16 &ScriptsUpdated;
public:
- static bool IsPlayerOnAMission();
static void ScriptDebugLine3D(float x1, float y1, float z1, float x2, float y2, float z2, int col, int col2);
static void CleanUpThisVehicle(CVehicle*);
static void CleanUpThisPed(CPed*);
static void CleanUpThisObject(CObject*);
static void Init();
+ static CRunningScript* StartNewScript(uint32);
+ static void Process();
+ static CRunningScript* StartTestScript();
+ static bool IsPlayerOnAMission();
static void ReadObjectNamesFromScript();
static void UpdateObjectIndices();
static void ReadMultiScriptFileOffsetsFromScript();
+ static void DrawScriptSpheres();
static int32 Read4BytesFromScript(uint32* pIp){
int32 retval = 0;