- Frontend - added Mini Cars cheat switch

- Frontend - added FE_MAKEVAR macro and button types
- Frontend - fix "Director's cut" displayed when game is not complete
This commit is contained in:
Ilya Shurumov 2021-05-15 19:46:21 +06:00 committed by InspirationByte
parent ed9f38c684
commit cb3486668c
11 changed files with 221 additions and 177 deletions

View File

@ -73,6 +73,7 @@ Race track
Invincibility
Immunity
Bonus Gallery
Mini Cars
Pause
Play
Auto Director

View File

@ -73,6 +73,7 @@ Piste de course
Invincibilité
Immunité
Galerie bonus
Mini voitures
Pause
Lecture
Réalisateur automatique

View File

@ -73,6 +73,7 @@ Rennstrecke
Unbesiegbarkeit
Immunität
Bonus-Galerie
Mini-autos
Pause
Abspielen
Automatischer Regisseur

View File

@ -73,6 +73,7 @@ Circuito
Invincibilità
Immunità
Galleria bonus
Mini auto
Pausa
Play
Regia automatica

View File

@ -73,6 +73,7 @@ Circuito
Invencibilidad
Inmunidad
Galería bonus
Mini coches
Pausa
Activar
Director automático

View File

@ -241,7 +241,7 @@ void ExplosionCollisionCheck(CAR_DATA *cp, EXOBJECT *pE)
if (pE->type <= LITTLE_BANG)
{
cd[0].length[1] = minBoxSize + ((pE->time / pE->speed) * littleBoxRange) / (0x1000 / pE->speed);
cd[0].length[1] = minBoxSize + ((pE->time / pE->speed) * littleBoxRange) / (4096 / pE->speed);
}
else if (pE->type == HEY_MOMMA) // biggest bang that might kill Tanner
{

View File

@ -20,12 +20,10 @@
struct REPLAY_ICON
{
short x;
short y;
short x, y;
TEXTURE_DETAILS* texture;
char* TextPtr;
short tx;
short ty;
short tx, ty;
};
TEXTURE_DETAILS delcam; // address 0xC0EE0
@ -2319,10 +2317,13 @@ void SetCameraReturnedFromCutscene(int CameraCnt)
int count;
count = 0;
next = PlaybackCamera;
next = &PlaybackCamera[0];
while (NextChange = next, count < MAX_REPLAY_CAMERAS && (NextChange = PlaybackCamera + count, CameraCnt < NextChange->FrameCnt ||
NextChange->next != 254 && (next = PlaybackCamera + NextChange->next, next->FrameCnt <= CameraCnt)))
// how the fuck I'm supposed to untangle this logic?
while (NextChange = next,
count < MAX_REPLAY_CAMERAS &&
(NextChange = &PlaybackCamera[count], CameraCnt < NextChange->FrameCnt || NextChange->next != 254 &&
(next = &PlaybackCamera[NextChange->next], next->FrameCnt <= CameraCnt)))
{
count++;
}

View File

@ -9,7 +9,7 @@
// FMV
int gSubtitles = 0;
int gSubtitles = 1;
int gNoFMV = 0;
// [D] [T]

View File

@ -2313,20 +2313,6 @@ void RenderGame2(int view)
FrAng = ratan2(160, float(scr_z) * aspectVar * 1.35f);
#if 0 // old code; now relying on emulator hacks
aspect.m[0][0] = 5500 * aspectVar;
aspect.m[0][1] = 0;
aspect.m[0][2] = 0;
aspect.m[1][0] = 0;
aspect.m[1][1] = 4710;
aspect.m[1][2] = 0;
aspect.m[2][0] = 0;
aspect.m[2][1] = 0;
aspect.m[2][2] = 4096;
#endif
extern void DoFreeCamera();
DoFreeCamera();
#else

View File

@ -25,19 +25,12 @@
struct PSXBUTTON
{
short x;
short y;
short w;
short h;
unsigned char l;
unsigned char r;
unsigned char u;
unsigned char d;
short x, y, w, h;
u_char l, r; // left, right next item id
u_char u, d; // up, down next item id
int userDrawFunctionNum;
short s_x;
short s_y;
int action;
int var;
short s_x, s_y;
int action, var;
char Name[32];
};
@ -51,6 +44,17 @@ struct PSXSCREEN
// #define USE_EMBEDDED_FRONTEND_SCREENS
enum FEButtonAction
{
BTN_NEXT_SCREEN = 1,
BTN_START_GAME = 2,
BTN_DISABLED = 3,
BTN_PREVIOUS_SCREEN = 4,
BTN_HIDDEN = 5
};
#define FE_MAKEVAR(code, value) ((code & 0xffff) << 8 | (value & 0xff))
#ifdef USE_EMBEDDED_FRONTEND_SCREENS
#include "FEscreens.inc"
#else
@ -75,10 +79,7 @@ struct FE_FONT
struct SCREEN_LIMITS
{
short minx;
short miny;
short maxx;
short maxy;
short minx, miny, maxx, maxy;
};
struct BOTCH
@ -94,29 +95,30 @@ typedef int(*screenFunc)(int bSetup);
extern ACTIVE_CHEATS AvailableCheats;
extern ACTIVE_CHEATS ActiveCheats;
extern int CentreScreen(int bSetup); // 0x001C31FC
extern int CarSelectScreen(int bSetup); // 0x001C3430
extern int CopDiffLevelScreen(int bSetup); // 0x001C6404
extern int VibroOnOffScreen(int bSetup); // 0x001C3A60
extern int MissionSelectScreen(int bSetup); // 0x001C3B1C
extern int MissionCityScreen(int bSetup); // 0x001C4338
extern int CutSceneSelectScreen(int bSetup); // 0x001C4600
extern int CutSceneCitySelectScreen(int bSetup); // 0x001C4B30
extern int SetVolumeScreen(int bSetup); // 0x001C50B0
extern int ScoreScreen(int bSetup); // 0x001C59A0
extern int SubtitlesOnOffScreen(int bSetup); // 0x001C64B0
extern int CityCutOffScreen(int bSetup); // 0x001C64FC
extern int ControllerScreen(int bSetup); // 0x001C6548
extern int MainScreen(int bSetup); // 0x001C6614
extern int CheatScreen(int bSetup); // 0x001C5B4C
extern int ImmunityOnOffScreen(int bSetup); // 0x001C6654
extern int InvincibleOnOffScreen(int bSetup); // 0x001C66A0
extern int GamePlayScreen(int bSetup); // 0x001C66EC
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);
int CentreScreen(int bSetup); // 0x001C31FC
int CarSelectScreen(int bSetup); // 0x001C3430
int CopDiffLevelScreen(int bSetup); // 0x001C6404
int VibroOnOffScreen(int bSetup); // 0x001C3A60
int MissionSelectScreen(int bSetup); // 0x001C3B1C
int MissionCityScreen(int bSetup); // 0x001C4338
int CutSceneSelectScreen(int bSetup); // 0x001C4600
int CutSceneCitySelectScreen(int bSetup); // 0x001C4B30
int SetVolumeScreen(int bSetup); // 0x001C50B0
int ScoreScreen(int bSetup); // 0x001C59A0
int SubtitlesOnOffScreen(int bSetup); // 0x001C64B0
int CityCutOffScreen(int bSetup); // 0x001C64FC
int ControllerScreen(int bSetup); // 0x001C6548
int MainScreen(int bSetup); // 0x001C6614
int CheatScreen(int bSetup); // 0x001C5B4C
int ImmunityOnOffScreen(int bSetup); // 0x001C6654
int InvincibleOnOffScreen(int bSetup); // 0x001C66A0
int GamePlayScreen(int bSetup); // 0x001C66EC
int GameNameScreen(int bSetup); // 0x001C60A0
int CheatNumlayerSelect(int bSetup); // 0x001C6724
int UserReplaySelectScreen(int bSetup);
int TimeOfDaySelectScreen(int bSetup);
int DemoScreen(int bSetup);
int MiniCarsOnOffScreen(int bSetup);
screenFunc fpUserFunctions[] = {
CentreScreen,
@ -142,6 +144,7 @@ screenFunc fpUserFunctions[] = {
UserReplaySelectScreen,
TimeOfDaySelectScreen,
DemoScreen,
MiniCarsOnOffScreen
};
char* gfxNames[4] = {
@ -571,6 +574,10 @@ void SetVariable(int var)
LoadFrontendScreens(0);
}
case 15:
{
ActiveCheats.cheat13 = value;
}
}
}
@ -745,7 +752,7 @@ void DrawScreen(PSXSCREEN *pScr)
{
GetTimeStamp(version_info);
if (iScreenSelect == SCREEN_CUTSCENE && (gFurthestMission < 39))
if (iScreenSelect == SCREEN_CUTCITY && (gFurthestMission < 39))
{
// hide the Director's Cut button
numBtnsToDraw = pScr->numButtons - 1;
@ -1096,20 +1103,26 @@ 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
PsxScreens[4].buttons[0].action = (1 << 8) | 39;
PsxScreens[4].buttons[0].var = 0;
PsxScreens[39].userFunctionNum = 21;
// for web demo content (or empty SCRS.BIN)
if(PsxScreens[0].userFunctionNum == 128)
PsxScreens[0].userFunctionNum = 23; // DemoScreen
// Time of day extended screen
PsxScreens[3].userFunctionNum = 22;
PsxScreens[3].userFunctionNum = 22; //TimeOfDaySelectScreen
// replay theater
PsxScreens[4].buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 39);
PsxScreens[4].buttons[0].var = -1;
PsxScreens[39].userFunctionNum = 21; // UserReplaySelectScreen
// make mini cars cheat screen
PsxScreens[40] = PsxScreens[31];
PsxScreens[40].userFunctionNum = 24; // MiniCarsOnOffScreen
PsxScreens[40].buttons[0].var = FE_MAKEVAR(15, 1);
PsxScreens[40].buttons[1].var = FE_MAKEVAR(15, 0);
#endif
}
#endif
@ -1331,10 +1344,10 @@ int HandleKeyPress(void)
}
if (feNewPad & 0x40)
{
{
int action = pCurrButton->action >> 8;
if (action != 3)
if (action != BTN_DISABLED)
{
FESound(2);
@ -1343,44 +1356,44 @@ int HandleKeyPress(void)
switch (action)
{
case 1:
pScreenStack[ScreenDepth] = pCurrScreen;
pButtonStack[ScreenDepth] = pCurrButton;
ScreenNames[ScreenDepth] = pCurrButton->Name;
pNewScreen = &PsxScreens[pCurrButton->action & 0xFF];
if (ScreenDepth < 10)
ScreenDepth++;
break;
case 2:
if (NumPlayers == 2 && iScreenSelect == SCREEN_CAR && (currPlayer == 2))
{
(fpUserFunctions[pCurrScreen->userFunctionNum - 1])(1);
bRedrawFrontend = 1;
}
else
{
case BTN_NEXT_SCREEN:
pScreenStack[ScreenDepth] = pCurrScreen;
pButtonStack[ScreenDepth] = pCurrButton;
ScreenNames[ScreenDepth] = pCurrButton->Name;
SetState(STATE_GAMESTART);
}
break;
case 4:
if (ScreenDepth > 0)
{
if (--ScreenDepth == 0)
NumPlayers = 1;
pNewScreen = &PsxScreens[pCurrButton->action & 0xFF];
pNewScreen = pScreenStack[ScreenDepth];
pNewButton = pButtonStack[ScreenDepth];
}
break;
if (ScreenDepth < 10)
ScreenDepth++;
break;
case BTN_START_GAME:
if (NumPlayers == 2 && iScreenSelect == SCREEN_CAR && (currPlayer == 2))
{
(fpUserFunctions[pCurrScreen->userFunctionNum - 1])(1);
bRedrawFrontend = 1;
}
else
{
pScreenStack[ScreenDepth] = pCurrScreen;
pButtonStack[ScreenDepth] = pCurrButton;
ScreenNames[ScreenDepth] = pCurrButton->Name;
SetState(STATE_GAMESTART);
}
break;
case BTN_PREVIOUS_SCREEN:
if (ScreenDepth > 0)
{
if (--ScreenDepth == 0)
NumPlayers = 1;
pNewScreen = pScreenStack[ScreenDepth];
pNewButton = pButtonStack[ScreenDepth];
}
break;
}
}
}
@ -2368,7 +2381,7 @@ int MissionSelectScreen(int bSetup)
pCurrScreen->buttons[5].u = 5;
pCurrScreen->buttons[5].d = 2;
pCurrScreen->buttons[5].action = 0;
pCurrScreen->buttons[0].action = 0x500;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_HIDDEN, 0);
}
}
else
@ -2382,13 +2395,13 @@ int MissionSelectScreen(int bSetup)
pCurrScreen->buttons[1].u = 1;
pCurrScreen->buttons[usedB].d = 1;
pCurrScreen->buttons[0].action = 0;
pCurrScreen->buttons[5].action = 0x500;
pCurrScreen->buttons[5].action = FE_MAKEVAR(BTN_HIDDEN, 0);
}
else
{
// list missions only
pCurrScreen->buttons[0].action = 0x500;
pCurrScreen->buttons[5].action = 0x500;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_HIDDEN, 0);
pCurrScreen->buttons[5].action = FE_MAKEVAR(BTN_HIDDEN, 0);
}
}
@ -2487,38 +2500,38 @@ int MissionCityScreen(int bSetup)
if (gFurthestMission == 0)
{
pCurrScreen->buttons[0].action = 0x300;
pCurrScreen->buttons[1].action = 0x300;
pCurrScreen->buttons[2].action = 0x300;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else if (gFurthestMission < 10)
{
pCurrScreen->buttons[0].action = 0x113;
pCurrScreen->buttons[1].action = 0x300;
pCurrScreen->buttons[2].action = 0x300;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else if (gFurthestMission < 21)
{
pCurrScreen->buttons[0].action = 0x113;
pCurrScreen->buttons[1].action = 0x113;
pCurrScreen->buttons[2].action = 0x300;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else if (gFurthestMission < 31)
{
pCurrScreen->buttons[0].action = 0x113;
pCurrScreen->buttons[1].action = 0x113;
pCurrScreen->buttons[2].action = 0x113;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else
{
pCurrScreen->buttons[0].action = 0x113;
pCurrScreen->buttons[1].action = 0x113;
pCurrScreen->buttons[2].action = 0x113;
pCurrScreen->buttons[3].action = 0x113;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 19);
}
LoadBackgroundFile("DATA\\CITYBACK.RAW");
@ -2733,38 +2746,38 @@ int CutSceneCitySelectScreen(int bSetup)
if (gFurthestMission == 0)
{
pCurrScreen->buttons[0].action = 0x300;
pCurrScreen->buttons[1].action = 0x300;
pCurrScreen->buttons[2].action = 0x300;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else if (gFurthestMission < 10)
{
pCurrScreen->buttons[0].action = 0x116;
pCurrScreen->buttons[1].action = 0x300;
pCurrScreen->buttons[2].action = 0x300;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else if (gFurthestMission < 21)
{
pCurrScreen->buttons[0].action = 0x116;
pCurrScreen->buttons[1].action = 0x116;
pCurrScreen->buttons[2].action = 0x300;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_DISABLED, 0);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else if (gFurthestMission < 31)
{
pCurrScreen->buttons[0].action = 0x116;
pCurrScreen->buttons[1].action = 0x116;
pCurrScreen->buttons[2].action = 0x116;
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
else
{
pCurrScreen->buttons[0].action = 0x116;
pCurrScreen->buttons[1].action = 0x116;
pCurrScreen->buttons[2].action = 0x116;
pCurrScreen->buttons[3].action = 0x116;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 22);
if (gFurthestMission == 40)
{
@ -3217,10 +3230,10 @@ int CityCutOffScreen(int bSetup)
if (bSetup)
{
if (gFurthestMission < 20)
pCurrScreen->buttons[2].action = 0x300;
pCurrScreen->buttons[2].action = FE_MAKEVAR(BTN_DISABLED, 0);
if (gFurthestMission < 29)
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
#ifndef PSX
LoadBackgroundFile("DATA\\CITYBACK.RAW");
@ -3337,11 +3350,11 @@ int MainScreen(int bSetup)
{
if (numPadsConnected == 2)
{
pCurrScreen->buttons[3].action = 0x106;
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 6);
}
else
{
pCurrScreen->buttons[3].action = 0x300;
pCurrScreen->buttons[3].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
}
@ -3355,6 +3368,7 @@ static char* cheatText[] =
G_LTXT_ID(GTXT_Circuit),
G_LTXT_ID(GTXT_Invincibility),
G_LTXT_ID(GTXT_Immunity),
G_LTXT_ID(GTXT_MiniCars), // [A]
G_LTXT_ID(GTXT_BonusGallery) // [A]
};
@ -3365,18 +3379,24 @@ int CheatScreen(int bSetup)
int numOpen;
int k;
unsigned char cheatOn[12];
int evilRuss[5];
int evilRuss[6];
int hackLookup1[5] = {
0x121,
0x121,
0x11E,
0x11F,
int hackLookup1[6] = {
FE_MAKEVAR(BTN_NEXT_SCREEN, 33),
FE_MAKEVAR(BTN_NEXT_SCREEN, 33),
FE_MAKEVAR(BTN_NEXT_SCREEN, 30),
FE_MAKEVAR(BTN_NEXT_SCREEN, 31),
FE_MAKEVAR(BTN_NEXT_SCREEN, 40),
0,
};
int hackLookup2[5] = {
0xC01, 0xC00, -1, -1, 0xE00
int hackLookup2[6] = {
FE_MAKEVAR(12, 1),
FE_MAKEVAR(12, 0),
-1,
-1,
-1,
FE_MAKEVAR(14, 0),
};
if (bSetup == 0)
@ -3385,7 +3405,7 @@ int CheatScreen(int bSetup)
}
if (gFurthestMission == 40)
numOpen = 5; // [A] now 5 elements as "Bonus gallery" is open
numOpen = 6; // [A] now 5 elements as "Bonus gallery" is open
else
numOpen = AvailableCheats.cheat1 + AvailableCheats.cheat2 + AvailableCheats.cheat3 + AvailableCheats.cheat4;
@ -3396,7 +3416,7 @@ int CheatScreen(int bSetup)
pCurrScreen->buttons[0].u = 1;
pCurrScreen->buttons[0].d = 1;
pCurrScreen->buttons[0].action = 0x400;
pCurrScreen->buttons[0].action = FE_MAKEVAR(BTN_PREVIOUS_SCREEN, 0);
sprintf(pCurrScreen->buttons[0].Name, GET_GAME_TXT(cheatText[0]));
@ -3409,21 +3429,25 @@ int CheatScreen(int bSetup)
evilRuss[1] = AvailableCheats.cheat2;
evilRuss[2] = AvailableCheats.cheat3;
evilRuss[3] = AvailableCheats.cheat4;
evilRuss[4] = 0;
evilRuss[5] = 0;
if (numOpen >= 5)
if (numOpen >= 6)
{
pCurrScreen->buttons[4] = pCurrScreen->buttons[3];
pCurrScreen->buttons[5] = pCurrScreen->buttons[3];
}
k = 0;
i = 0;
do {
for (i = 0; i < 6; i++)
{
if (evilRuss[i] || gFurthestMission == 40)
{
sprintf(pCurrScreen->buttons[i].Name, GET_GAME_TXT(cheatText[i + 1]));
cheatOn[k++] = i;
}
i++;
} while (i < 5);
}
if (numOpen == 2)
{
@ -3511,8 +3535,6 @@ int CheatScreen(int bSetup)
pCurrScreen->buttons[4].y += 40;
pCurrScreen->buttons[4].s_y += 40;
PsxScreens[40].userFunctionNum = 21;
pCurrScreen->buttons[0].u = 5;
pCurrScreen->buttons[3].d = 5;
@ -3520,6 +3542,21 @@ int CheatScreen(int bSetup)
pCurrScreen->buttons[4].u = 4;
}
// [A] adding bonus gallery
if (numOpen >= 6)
{
pCurrScreen->buttons[5].action = hackLookup1[cheatOn[5]];
pCurrScreen->buttons[5].var = hackLookup2[cheatOn[5]];
pCurrScreen->buttons[5].y += 80;
pCurrScreen->buttons[5].s_y += 80;
pCurrScreen->buttons[0].u = 6;
pCurrScreen->buttons[4].d = 6;
pCurrScreen->buttons[5].d = 1;
pCurrScreen->buttons[5].u = 5;
}
currSelIndex = 0;
return 0;
}
@ -3561,12 +3598,26 @@ int InvincibleOnOffScreen(int bSetup)
return 0;
}
int MiniCarsOnOffScreen(int bSetup)
{
if (bSetup)
{
if (ActiveCheats.cheat13 == 0)
pCurrButton = pCurrScreen->buttons + 1;
else
pCurrButton = pCurrScreen->buttons;
return 1;
}
return 0;
}
// [D] [T]
int GamePlayScreen(int bSetup)
{
if (bSetup)
{
pCurrScreen->buttons[2].action = (allowVibration == 0) ? 0x300 : 0x111;
pCurrScreen->buttons[2].action = (allowVibration == 0) ? FE_MAKEVAR(BTN_DISABLED, 0) : FE_MAKEVAR(BTN_NEXT_SCREEN, 17);
}
return 0;
@ -3604,11 +3655,11 @@ int CheatNumlayerSelect(int bSetup)
{
if (numPadsConnected == 2)
{
pCurrScreen->buttons[1].action = 0x120;
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_NEXT_SCREEN, 32);
}
else
{
pCurrScreen->buttons[1].action = 0x300;
pCurrScreen->buttons[1].action = FE_MAKEVAR(BTN_DISABLED, 0);
}
return 0;
}
@ -3724,7 +3775,7 @@ int UserReplaySelectScreen(int bSetup)
BuildButtonsVertical(1, 160, 208);
PSXBUTTON& btn = pCurrScreen->buttons[0];
btn.action = 0x400;
btn.action = FE_MAKEVAR(BTN_PREVIOUS_SCREEN, 0);
strcpy(btn.Name, G_LTXT(GTXT_NoSavedData));
}

View File

@ -89,6 +89,7 @@ enum GameStrId
GTXT_Invincibility,
GTXT_Immunity,
GTXT_BonusGallery,
GTXT_MiniCars,
// director strings
GTXT_Pause,