Skip to content

Commit e2b2ab5

Browse files
committed
Commit changes
1 parent 9cf5f16 commit e2b2ab5

12 files changed

Lines changed: 315 additions & 91 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"FileVersion": 2,
3+
"Id": "7b62800d-e7c3-5d1b-7031-a4cddc9194da",
4+
"Items": [
5+
{
6+
"Id": "c4274155-c11b-4ad9-900a-db8a1715e2be",
7+
"Command": "-pack CUT3"
8+
}
9+
]
10+
}

Driver2CutsceneTool/cutscene_tool.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,14 @@ void PackCutsceneFile(const char* foldername)
260260

261261
int numCutsceneReplays = 0;
262262
int numChaseReplays = 0;
263-
263+
bool hasChases = false;
264264
for (int i = 0; i < MAX_FILE_CUTSCENES; i++)
265265
{
266266
String folderPath = String::fromPrintf("%s/%s_%d.D2RP", foldername, foldername, i);
267267
FILE* fp = fopen(String::fromPrintf("%s/%s_%d.D2RP", foldername, foldername, i), "rb");
268268
if (fp)
269269
{
270+
if (i > 1) hasChases = true;
270271
if (i == 0)
271272
{
272273
MsgAccept("Got intro cutscene\n");
@@ -367,7 +368,7 @@ void PackCutsceneFile(const char* foldername)
367368
MsgWarning("No chase replays\n");
368369
}
369370

370-
String folderPath = String::fromPrintf("%s_N.R", foldername);
371+
String folderPath = String::fromPrintf("%s.R", foldername);
371372

372373
FILE* wp = fopen(folderPath, "wb");
373374

@@ -386,7 +387,7 @@ void PackCutsceneFile(const char* foldername)
386387
char* bufptr = buffer;
387388
offset = 2048;
388389

389-
for (int i = 0; i < MAX_FILE_CUTSCENES; i++)
390+
for (int i = 0; i < (hasChases ? MAX_FILE_CUTSCENES : 2); i++)
390391
{
391392
int replayId = i;
392393

@@ -398,7 +399,7 @@ void PackCutsceneFile(const char* foldername)
398399
{
399400
if (i == 0 || i == 1)
400401
continue;
401-
402+
402403
if (numChaseReplays > 0)
403404
{
404405
do
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"FileVersion": 2,
3+
"Id": "63d5b066-4fb9-71bc-b819-6c0fa41c5c3e",
4+
"Items": [
5+
{
6+
"Id": "71148420-6089-4632-80ad-4137c85455cc",
7+
"Command": "-make test.d2ms"
8+
}
9+
]
10+
}

Driver2MissionTool/mission.hpp

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#include <cstring>
4+
35
#include "core/dktypes.h"
46
#include "math/psx_math_types.h"
57

@@ -60,7 +62,33 @@ enum MR_COMMAND_FLAGS
6062

6163
};
6264

63-
int COMMANDS[22][2]
65+
const char* COMMANDS_STR[22]
66+
{
67+
"PlayCutscene",
68+
"CompleteAllActiveTargets",
69+
"SetVariable",
70+
"Jump",
71+
"BranchIf",
72+
"MultiCarEvent",
73+
"SetPlayerFelony",
74+
"ShowPlayerMessage",
75+
"TriggerEvent",
76+
"SetDoorsLocked",
77+
"SetStealMessage",
78+
"ShowOutOfTimeMessage",
79+
"StopThread",
80+
"StarThreadForPlayer",
81+
"StartThread2",
82+
"SetCameraEvent",
83+
"AwardPlayerCheat",
84+
"SetRaining",
85+
"SetMissionComplete",
86+
"SetTimerFlagCounter",
87+
"SetBombTimerFlag",
88+
"UnSetTimerFlagCount"
89+
};
90+
91+
const uint COMMANDS[22][2]
6492
{
6593
{CMD_PlayCutscene, 1},
6694
{CMD_CompleteAllActiveTargets, 0},

0 commit comments

Comments
 (0)