mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-22 10:22:48 +01:00
- better demo content support
This commit is contained in:
parent
3b9aab5002
commit
1e0e80d68f
@ -287,7 +287,7 @@ void ProcessLumps(char* lump_ptr, int lump_size)
|
||||
cnt++;
|
||||
}
|
||||
|
||||
gDemoLevel = false; // [A]
|
||||
gDemoLevel = 0; // [A]
|
||||
}
|
||||
else if (lump_type == LUMP_JUNCTIONS2)
|
||||
{
|
||||
@ -306,6 +306,7 @@ void ProcessLumps(char* lump_ptr, int lump_size)
|
||||
}
|
||||
|
||||
gDemoLevel = 1; // [A]
|
||||
gLoadedMotionCapture = 0;
|
||||
}
|
||||
else if (lump_type == LUMP_JUNCTIONS)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "driver2.h"
|
||||
#include "mission.h"
|
||||
|
||||
#include "system.h"
|
||||
#include "mgeneric.h"
|
||||
#include "debris.h"
|
||||
@ -2693,7 +2694,7 @@ int MRCreateCar(MS_TARGET *target)
|
||||
{
|
||||
playerid = 0xFF;
|
||||
|
||||
InitPlayer((PLAYER *)(player + 1), &car_data[curslot],
|
||||
InitPlayer(&player[1], &car_data[curslot],
|
||||
CONTROL_TYPE_LEAD_AI, target->s.car.rotation, &pos,
|
||||
target->s.car.model, target->s.car.palette, (char *)&playerid);
|
||||
|
||||
|
@ -45,9 +45,9 @@ struct PSXBUTTON
|
||||
|
||||
struct PSXSCREEN
|
||||
{
|
||||
unsigned char index;
|
||||
unsigned char numButtons;
|
||||
unsigned char userFunctionNum;
|
||||
u_char index;
|
||||
u_char numButtons;
|
||||
u_char userFunctionNum;
|
||||
PSXBUTTON buttons[8];
|
||||
};
|
||||
|
||||
@ -118,6 +118,7 @@ extern int GameNameScreen(int bSetup); // 0x001C60A0
|
||||
extern int CheatNumlayerSelect(int bSetup); // 0x001C6724
|
||||
extern int UserReplaySelectScreen(int bSetup);
|
||||
extern int TimeOfDaySelectScreen(int bSetup);
|
||||
extern int DemoScreen(int bSetup);
|
||||
|
||||
screenFunc fpUserFunctions[] = {
|
||||
CentreScreen,
|
||||
@ -142,6 +143,7 @@ screenFunc fpUserFunctions[] = {
|
||||
CheatNumlayerSelect,
|
||||
UserReplaySelectScreen,
|
||||
TimeOfDaySelectScreen,
|
||||
DemoScreen,
|
||||
};
|
||||
|
||||
char* gfxNames[4] = {
|
||||
@ -637,7 +639,7 @@ void SetupScreenSprts(PSXSCREEN *pScr)
|
||||
pNewScreen = NULL;
|
||||
pCurrScreen = pScr;
|
||||
|
||||
if (pScr->userFunctionNum == 0)
|
||||
if (pScr->userFunctionNum == 0 || pScr->userFunctionNum == 128)
|
||||
{
|
||||
if (pNewButton != NULL)
|
||||
{
|
||||
@ -1122,6 +1124,11 @@ void LoadFrontendScreens(int full)
|
||||
}
|
||||
|
||||
#ifndef PSX
|
||||
if(PsxScreens[0].userFunctionNum == 128)
|
||||
{
|
||||
PsxScreens[0].userFunctionNum = 23;
|
||||
}
|
||||
|
||||
// [A] SCREEN HACKS
|
||||
// replay theater
|
||||
// use screen 39 for it
|
||||
@ -3873,5 +3880,40 @@ int TimeOfDaySelectScreen(int bSetup)
|
||||
dir = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int DemoScreen(int bSetup)
|
||||
{
|
||||
if (bSetup)
|
||||
return 0;
|
||||
|
||||
if (feNewPad & 0x40)
|
||||
{
|
||||
FESound(2);
|
||||
GameType = GAME_PURSUIT;
|
||||
|
||||
GameLevel = 1;
|
||||
gWantNight = 0;
|
||||
gSubGameNumber = 0;
|
||||
|
||||
GameStart();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(mainScreenLoaded)
|
||||
{
|
||||
if (feNewPad & 0x20)
|
||||
{
|
||||
LoadBackgroundFile(contNames[0]);
|
||||
FESound(2);
|
||||
}
|
||||
}
|
||||
else if(bQuitToSystem)
|
||||
{
|
||||
bQuitToSystem = 0;
|
||||
LoadBackgroundFile("DATA\\GFX.RAW");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user