mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 20:02:33 +01:00
- implement MissionCityScreen, MissionSelectScreen
- replay buffer allocation - preparations - bug fixes
This commit is contained in:
parent
140f68b791
commit
647bd655cc
@ -39,9 +39,6 @@ int testNumPingedOut = 0;
|
|||||||
int currentAngle = 0;
|
int currentAngle = 0;
|
||||||
int closeEncounter = 3;
|
int closeEncounter = 3;
|
||||||
|
|
||||||
unsigned long PingBufferPos = 0;
|
|
||||||
_PING_PACKET *PingBuffer = NULL;
|
|
||||||
|
|
||||||
// decompiled code
|
// decompiled code
|
||||||
// original method signature:
|
// original method signature:
|
||||||
// int /*$ra*/ InitCar(struct _CAR_DATA *cp /*$s0*/, int direction /*$s6*/, long (*startPos)[4] /*$s2*/, unsigned char control /*$s4*/, int model /*stack 16*/, int palette /*stack 20*/, char *extraData /*stack 24*/)
|
// int /*$ra*/ InitCar(struct _CAR_DATA *cp /*$s0*/, int direction /*$s6*/, long (*startPos)[4] /*$s2*/, unsigned char control /*$s4*/, int model /*stack 16*/, int palette /*stack 20*/, char *extraData /*stack 24*/)
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
#define CIV_AI_H
|
#define CIV_AI_H
|
||||||
|
|
||||||
extern unsigned char reservedSlots[20];
|
extern unsigned char reservedSlots[20];
|
||||||
extern unsigned long PingBufferPos;
|
|
||||||
extern _PING_PACKET *PingBuffer;
|
|
||||||
extern int frameStart;
|
extern int frameStart;
|
||||||
|
|
||||||
extern int distFurthestCivCarSq;
|
extern int distFurthestCivCarSq;
|
||||||
|
@ -9,6 +9,9 @@ extern int gChaseNumber;
|
|||||||
extern int gRandomChase;
|
extern int gRandomChase;
|
||||||
extern int gSubGameNumber;
|
extern int gSubGameNumber;
|
||||||
|
|
||||||
|
extern int gLoadedReplay;
|
||||||
|
extern int gHaveStoredData;
|
||||||
|
|
||||||
extern int gMissionLadderPos;
|
extern int gMissionLadderPos;
|
||||||
extern int gFurthestMission;
|
extern int gFurthestMission;
|
||||||
extern int gWantNight;
|
extern int gWantNight;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef MAIN_H
|
#ifndef MAIN_H
|
||||||
#define MAIN_H
|
#define MAIN_H
|
||||||
|
|
||||||
|
extern int xa_timeout;
|
||||||
extern int FrameCnt;
|
extern int FrameCnt;
|
||||||
extern int CurrentPlayerView;
|
extern int CurrentPlayerView;
|
||||||
extern int FrAng;
|
extern int FrAng;
|
||||||
|
@ -883,9 +883,9 @@ void RegisterChaseHit(int car1, int car2)
|
|||||||
{
|
{
|
||||||
if (car1 == Mission.ChaseTarget->data[6] || car2 == Mission.ChaseTarget->data[6])
|
if (car1 == Mission.ChaseTarget->data[6] || car2 == Mission.ChaseTarget->data[6])
|
||||||
{
|
{
|
||||||
(Mission.ChaseTarget)->data[0xd] = (Mission.ChaseTarget)->data[0xd] + -1;
|
Mission.ChaseTarget->data[0xd]--;
|
||||||
Mission.ChaseHitDelay = 20;
|
Mission.ChaseHitDelay = 20;
|
||||||
DamageBar.position = DamageBar.position + 1;
|
DamageBar.position++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1184,6 +1184,12 @@ int Swap2Cars(int curslot, int newslot)
|
|||||||
if (curslot == newslot)
|
if (curslot == newslot)
|
||||||
return newslot;
|
return newslot;
|
||||||
|
|
||||||
|
ctrlNodeNewId = -1;
|
||||||
|
pnodeNewId = -1;
|
||||||
|
|
||||||
|
ctrlNodeCurId = -1;
|
||||||
|
pnodeCurId = -1;
|
||||||
|
|
||||||
// hold cur slot nodes
|
// hold cur slot nodes
|
||||||
cp = &car_data[curslot];
|
cp = &car_data[curslot];
|
||||||
if (cp->controlType == 2)
|
if (cp->controlType == 2)
|
||||||
|
@ -22,10 +22,12 @@
|
|||||||
char* _overlay_buffer = NULL; // 0x1C0000
|
char* _overlay_buffer = NULL; // 0x1C0000
|
||||||
char* _frontend_buffer = NULL; // 0xFB400
|
char* _frontend_buffer = NULL; // 0xFB400
|
||||||
char* _other_buffer = NULL; // 0xF3000
|
char* _other_buffer = NULL; // 0xF3000
|
||||||
|
char* _other_buffer2 = NULL; // 0xE7000
|
||||||
OTTYPE* _OT1 = NULL; // 0xF3000
|
OTTYPE* _OT1 = NULL; // 0xF3000
|
||||||
OTTYPE* _OT2 = NULL; // 0xF7200
|
OTTYPE* _OT2 = NULL; // 0xF7200
|
||||||
char* _primTab1 = NULL; // 0xFB400
|
char* _primTab1 = NULL; // 0xFB400
|
||||||
char* _primTab2 = NULL; // 0x119400
|
char* _primTab2 = NULL; // 0x119400
|
||||||
|
char* _replay_buffer = NULL; // 0x1FABBC
|
||||||
|
|
||||||
#ifdef USE_CRT_MALLOC
|
#ifdef USE_CRT_MALLOC
|
||||||
|
|
||||||
@ -200,6 +202,9 @@ void ClearMem(char *mem, int size)
|
|||||||
// [D]
|
// [D]
|
||||||
void setMem8(unsigned char *mem, unsigned char val, int size)
|
void setMem8(unsigned char *mem, unsigned char val, int size)
|
||||||
{
|
{
|
||||||
|
#ifndef PSX
|
||||||
|
memset(mem, 0, size);
|
||||||
|
#else
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
/*
|
/*
|
||||||
int *puVar1;
|
int *puVar1;
|
||||||
@ -228,6 +233,7 @@ void setMem8(unsigned char *mem, unsigned char val, int size)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
*/
|
*/
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -258,6 +264,9 @@ void setMem8(unsigned char *mem, unsigned char val, int size)
|
|||||||
|
|
||||||
void setMem16(ushort *mem, ushort val, int size)
|
void setMem16(ushort *mem, ushort val, int size)
|
||||||
{
|
{
|
||||||
|
#ifndef PSX
|
||||||
|
memset(mem, 0, size);
|
||||||
|
#else
|
||||||
UNIMPLEMENTED();
|
UNIMPLEMENTED();
|
||||||
/*
|
/*
|
||||||
bool bVar1;
|
bool bVar1;
|
||||||
@ -288,6 +297,7 @@ void setMem16(ushort *mem, ushort val, int size)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
*/
|
*/
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@
|
|||||||
extern char* _overlay_buffer; // 0x1C0000
|
extern char* _overlay_buffer; // 0x1C0000
|
||||||
extern char* _frontend_buffer; // 0xFB400
|
extern char* _frontend_buffer; // 0xFB400
|
||||||
extern char* _other_buffer; // 0xF3000
|
extern char* _other_buffer; // 0xF3000
|
||||||
|
extern char* _other_buffer2; // 0xE7000
|
||||||
|
|
||||||
extern OTTYPE* _OT1; // 0xF3000
|
extern OTTYPE* _OT1; // 0xF3000
|
||||||
extern OTTYPE* _OT2; // 0xF7200
|
extern OTTYPE* _OT2; // 0xF7200
|
||||||
|
|
||||||
extern char* _primTab1; // 0xFB400
|
extern char* _primTab1; // 0xFB400
|
||||||
extern char* _primTab2; // 0x119400
|
extern char* _primTab2; // 0x119400
|
||||||
|
extern char* _replay_buffer; // 0x1FABBC
|
||||||
|
|
||||||
extern const char* mallocptr_start;
|
extern const char* mallocptr_start;
|
||||||
|
|
||||||
|
@ -185,6 +185,55 @@ char carNumLookup[4][10] = {
|
|||||||
{0x1, 0x2, 0x3, 0x4, 0x0, 0x8, 0x9, 0xA, 0xB, 0xC},
|
{0x1, 0x2, 0x3, 0x4, 0x0, 0x8, 0x9, 0xA, 0xB, 0xC},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int minmaxSelections[4][2] = {
|
||||||
|
|
||||||
|
{ 0, 8 },
|
||||||
|
{ 8, 17 },
|
||||||
|
{ 18, 27 },
|
||||||
|
{ 28, 37 }
|
||||||
|
};
|
||||||
|
|
||||||
|
BOTCH botch[38] = {
|
||||||
|
{ 0x1, &MissionName[0]},
|
||||||
|
{ 0x2, &MissionName[1]},
|
||||||
|
{ 0x3, &MissionName[2]},
|
||||||
|
{ 0x4, &MissionName[3]},
|
||||||
|
{ 0x5, &MissionName[4]},
|
||||||
|
{ 0x6, &MissionName[5]},
|
||||||
|
{ 0x7, &MissionName[6]},
|
||||||
|
{ 0x9, &MissionName[7]},
|
||||||
|
{ 0xa, &MissionName[8]},
|
||||||
|
{ 0xb, &MissionName[9]},
|
||||||
|
{ 0xd, &MissionName[10]},
|
||||||
|
{ 0xe, &MissionName[11]},
|
||||||
|
{ 0xf, &MissionName[12]},
|
||||||
|
{ 0x10, &MissionName[13]},
|
||||||
|
{ 0x11, &MissionName[14]},
|
||||||
|
{ 0x12, &MissionName[15]},
|
||||||
|
{ 0x13, &MissionName[16]},
|
||||||
|
{ 0x14, &MissionName[17]},
|
||||||
|
{ 0x15, &MissionName[18]},
|
||||||
|
{ 0x16, &MissionName[19]},
|
||||||
|
{ 0x17, &MissionName[20]},
|
||||||
|
{ 0x18, &MissionName[21]},
|
||||||
|
{ 0x19, &MissionName[22]},
|
||||||
|
{ 0x1a, &MissionName[23]},
|
||||||
|
{ 0x1b, &MissionName[24]},
|
||||||
|
{ 0x1c, &MissionName[25]},
|
||||||
|
{ 0x1d, &MissionName[26]},
|
||||||
|
{ 0x1e, &MissionName[27]},
|
||||||
|
{ 0x1f, &MissionName[28]},
|
||||||
|
{ 0x20, &MissionName[29]},
|
||||||
|
{ 0x21, &MissionName[30]},
|
||||||
|
{ 0x22, &MissionName[31]},
|
||||||
|
{ 0x23, &MissionName[32]},
|
||||||
|
{ 0x25, &MissionName[33]},
|
||||||
|
{ 0x26, &MissionName[34]},
|
||||||
|
{ 0x27, &MissionName[35]},
|
||||||
|
{ 0x28, &MissionName[36]},
|
||||||
|
{ 0,NULL}
|
||||||
|
};
|
||||||
|
|
||||||
char ScreenTitle[128];
|
char ScreenTitle[128];
|
||||||
char ScoreName[128];
|
char ScoreName[128];
|
||||||
|
|
||||||
@ -2616,147 +2665,160 @@ int VibroOnOffScreen(int bSetup)
|
|||||||
/* end block 4 */
|
/* end block 4 */
|
||||||
// End Line: 7792
|
// End Line: 7792
|
||||||
|
|
||||||
|
int currMission = 0;
|
||||||
|
int missionSetup = 0;
|
||||||
|
|
||||||
|
// [D]
|
||||||
int MissionSelectScreen(int bSetup)
|
int MissionSelectScreen(int bSetup)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED();
|
unsigned char bVar1;
|
||||||
return 0;
|
|
||||||
/*
|
|
||||||
|
|
||||||
byte bVar1;
|
|
||||||
bool bVar2;
|
bool bVar2;
|
||||||
bool bVar3;
|
bool bVar3;
|
||||||
uchar uVar4;
|
unsigned char uVar4;
|
||||||
PSXSCREEN *pPVar5;
|
PSXSCREEN *pPVar5;
|
||||||
int *piVar6;
|
BOTCH *pBVar6;
|
||||||
int iVar7;
|
int iVar7;
|
||||||
int iVar8;
|
int iVar8;
|
||||||
|
|
||||||
if (bSetup == 0) {
|
if (bSetup == 0)
|
||||||
if ((uRam001cc5dc & 0x40) == 0) {
|
{
|
||||||
if ((uRam001cc5dc & 0x10) == 0) {
|
if ((fePad & 0x40U) == 0)
|
||||||
if ((uRam001cc5dc & 0x1000) == 0) {
|
{
|
||||||
if ((uRam001cc5dc & 0x4000) == 0) {
|
if ((fePad & 0x10U) == 0)
|
||||||
|
{
|
||||||
|
if ((fePad & 0x1000U) == 0)
|
||||||
|
{
|
||||||
|
if ((fePad & 0x4000U) == 0)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
bVar1 = pCurrButton->d;
|
bVar1 = pCurrButton->d;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
bVar1 = pCurrButton->u;
|
bVar1 = pCurrButton->u;
|
||||||
}
|
}
|
||||||
DAT_FRNT__001c6a8c = (uint)bVar1 - 1;
|
currSelIndex = bVar1 - 1;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
DAT_FRNT__001c6a74 = 0;
|
{
|
||||||
DAT_FRNT__001c6ab0 = 0;
|
missionSetup = 0;
|
||||||
|
bMissionSelect = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (DAT_FRNT__001c6a8c == 5) {
|
{
|
||||||
iVar7 = DAT_FRNT__001cc54c + 4;
|
if (currSelIndex == 5)
|
||||||
if ((iVar7 < *(int *)(DAT_FRNT__001c6a70 * 8 + 0x1c6b9c)) && (iVar7 < gFurthestMission)) {
|
{
|
||||||
|
iVar7 = currMission + 4;
|
||||||
|
if ((iVar7 < minmaxSelections[currCity][1]) && (iVar7 < gFurthestMission))
|
||||||
|
{
|
||||||
LAB_FRNT__001c41fc:
|
LAB_FRNT__001c41fc:
|
||||||
DAT_FRNT__001cc54c = iVar7;
|
currMission = iVar7;
|
||||||
FESound(3);
|
FESound(3);
|
||||||
(*(code *)(&PTR_CentreScreen_FRNT__001c6a20)[(uint)(byte)pCurrScreen->userFunctionNum - 1]
|
fpUserFunctions[pCurrScreen->userFunctionNum-1](1);
|
||||||
)(1);
|
bRedrawFrontend = 1;
|
||||||
DAT_FRNT__001c6aa0 = 1;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (DAT_FRNT__001c6a8c == 0) {
|
{
|
||||||
if (*(int *)(&DAT_FRNT__001c6b98 + DAT_FRNT__001c6a70 * 8) < DAT_FRNT__001cc54c) {
|
if (currSelIndex == 0)
|
||||||
iVar7 = DAT_FRNT__001cc54c + -4;
|
{
|
||||||
|
if (minmaxSelections[currCity][0] < currMission)
|
||||||
|
{
|
||||||
|
iVar7 = currMission + -4;
|
||||||
goto LAB_FRNT__001c41fc;
|
goto LAB_FRNT__001c41fc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
bReturnToMain = 0;
|
bReturnToMain = 0;
|
||||||
GameType = GAME_REPLAYMISSION;
|
GameType = GAME_REPLAYMISSION;
|
||||||
feVariableSave[1] = DAT_FRNT__001c6a8c;
|
feVariableSave[1] = currSelIndex;
|
||||||
feVariableSave[0] = DAT_FRNT__001cc54c;
|
feVariableSave[0] = currMission;
|
||||||
feVariableSave[2] = DAT_FRNT__001c6a70;
|
feVariableSave[2] = currCity;
|
||||||
gCurrentMissionNumber =
|
gCurrentMissionNumber = botch[currMission + currSelIndex + -1].missNum;
|
||||||
(&DAT_FRNT__001c6bb8)[(DAT_FRNT__001cc54c + DAT_FRNT__001c6a8c + -1) * 2];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
DAT_FRNT__001c6ab0 = 1;
|
|
||||||
if (DAT_FRNT__001c6a74 == 0) {
|
bMissionSelect = 1;
|
||||||
DAT_FRNT__001cc54c = *(int *)(&DAT_FRNT__001c6b98 + DAT_FRNT__001c6a70 * 8);
|
if (missionSetup == 0)
|
||||||
DAT_FRNT__001c6a8c = 0;
|
{
|
||||||
if (GameType == GAME_REPLAYMISSION) {
|
currMission = minmaxSelections[currCity][0];
|
||||||
LoadBackgroundFile(s_DATA_CITYBACK_RAW_FRNT__001c08b4);
|
currSelIndex = 0;
|
||||||
|
|
||||||
|
if (GameType == GAME_REPLAYMISSION)
|
||||||
|
{
|
||||||
|
LoadBackgroundFile("DATA\\CITYBACK.RAW");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pPVar5 = pCurrScreen;
|
pPVar5 = pCurrScreen;
|
||||||
if (feVariableSave[0] != -1) {
|
if (feVariableSave[0] != -1) {
|
||||||
DAT_FRNT__001cc54c = feVariableSave[0];
|
currMission = feVariableSave[0];
|
||||||
DAT_FRNT__001c6a8c = feVariableSave[1];
|
currSelIndex = feVariableSave[1];
|
||||||
DAT_FRNT__001c6a70 = feVariableSave[2];
|
currCity = feVariableSave[2];
|
||||||
}
|
}
|
||||||
iVar8 = 0;
|
iVar8 = 0;
|
||||||
bVar2 = false;
|
bVar2 = false;
|
||||||
bVar3 = false;
|
bVar3 = false;
|
||||||
iVar7 = 0;
|
iVar7 = 0;
|
||||||
piVar6 = &DAT_FRNT__001c6bb8 + DAT_FRNT__001cc54c * 2;
|
pBVar6 = botch + currMission;
|
||||||
do {
|
do {
|
||||||
if (((gFurthestMission < *piVar6) ||
|
if (((gFurthestMission < pBVar6->missNum) ||
|
||||||
(*(int *)(DAT_FRNT__001c6a70 * 8 + 0x1c6b9c) < iVar7 + DAT_FRNT__001cc54c)) ||
|
(minmaxSelections[currCity][1] < iVar7 + currMission)) ||
|
||||||
(0x24 < iVar7 + DAT_FRNT__001cc54c)) {
|
(0x24 < iVar7 + currMission)) {
|
||||||
bVar2 = true;
|
bVar2 = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iVar8 = iVar8 + 1;
|
iVar8 = iVar8 + 1;
|
||||||
}
|
}
|
||||||
iVar7 = iVar7 + 1;
|
iVar7 = iVar7 + 1;
|
||||||
piVar6 = piVar6 + 2;
|
pBVar6 = pBVar6 + 1;
|
||||||
} while ((iVar7 < 4) && (!bVar2));
|
} while ((iVar7 < 4) && (!bVar2));
|
||||||
uVar4 = (uchar)iVar8;
|
uVar4 = iVar8;
|
||||||
if (iVar8 == 1) {
|
if (iVar8 == 1)
|
||||||
|
{
|
||||||
pCurrScreen->buttons[1].d = '\x02';
|
pCurrScreen->buttons[1].d = '\x02';
|
||||||
pPVar5->buttons[1].u = '\x02';
|
pPVar5->buttons[1].u = '\x02';
|
||||||
sprintf(pCurrScreen->buttons[1].Name,
|
sprintf(pCurrScreen->buttons[1].Name, MissionName[currMission]);
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)[DAT_FRNT__001cc54c]);
|
sprintf(pCurrScreen->buttons[2].Name, NullStr);
|
||||||
sprintf(pCurrScreen->buttons[2].Name, &DAT_FRNT__001c0830);
|
sprintf(pCurrScreen->buttons[3].Name, NullStr);
|
||||||
sprintf(pCurrScreen->buttons[3].Name, &DAT_FRNT__001c0830);
|
|
||||||
LAB_FRNT__001c3e3c:
|
LAB_FRNT__001c3e3c:
|
||||||
sprintf(pCurrScreen->buttons[4].Name, &DAT_FRNT__001c0830);
|
sprintf(pCurrScreen->buttons[4].Name, NullStr);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (iVar8 == 2) {
|
{
|
||||||
|
if (iVar8 == 2)
|
||||||
|
{
|
||||||
pCurrScreen->buttons[1].u = '\x03';
|
pCurrScreen->buttons[1].u = '\x03';
|
||||||
pCurrScreen->buttons[1].d = '\x03';
|
pCurrScreen->buttons[1].d = '\x03';
|
||||||
pCurrScreen->buttons[2].u = uVar4;
|
pCurrScreen->buttons[2].u = uVar4;
|
||||||
pCurrScreen->buttons[2].d = uVar4;
|
pCurrScreen->buttons[2].d = uVar4;
|
||||||
sprintf(pCurrScreen->buttons[1].Name,
|
sprintf(pCurrScreen->buttons[1].Name, MissionName[currMission]);
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)[DAT_FRNT__001cc54c]);
|
sprintf(pCurrScreen->buttons[2].Name, MissionName[currMission + 1]);
|
||||||
sprintf(pCurrScreen->buttons[2].Name,
|
sprintf(pCurrScreen->buttons[3].Name, NullStr);
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)
|
|
||||||
[DAT_FRNT__001cc54c + 1]);
|
|
||||||
sprintf(pCurrScreen->buttons[3].Name, &DAT_FRNT__001c0830);
|
|
||||||
goto LAB_FRNT__001c3e3c;
|
goto LAB_FRNT__001c3e3c;
|
||||||
}
|
}
|
||||||
if (iVar8 == 3) {
|
if (iVar8 == 3)
|
||||||
|
{
|
||||||
pCurrScreen->buttons[1].u = '\x04';
|
pCurrScreen->buttons[1].u = '\x04';
|
||||||
pCurrScreen->buttons[1].d = uVar4;
|
pCurrScreen->buttons[1].d = uVar4;
|
||||||
pCurrScreen->buttons[2].u = '\x02';
|
pCurrScreen->buttons[2].u = '\x02';
|
||||||
pCurrScreen->buttons[2].d = '\x04';
|
pCurrScreen->buttons[2].d = '\x04';
|
||||||
pCurrScreen->buttons[3].u = uVar4;
|
pCurrScreen->buttons[3].u = uVar4;
|
||||||
pCurrScreen->buttons[3].d = '\x02';
|
pCurrScreen->buttons[3].d = '\x02';
|
||||||
sprintf(pCurrScreen->buttons[1].Name,
|
sprintf(pCurrScreen->buttons[1].Name, MissionName[currMission]);
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)[DAT_FRNT__001cc54c]);
|
sprintf(pCurrScreen->buttons[2].Name, MissionName[currMission + 1]);
|
||||||
sprintf(pCurrScreen->buttons[2].Name,
|
sprintf(pCurrScreen->buttons[3].Name, MissionName[currMission + 2]);
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)
|
|
||||||
[DAT_FRNT__001cc54c + 1]);
|
|
||||||
sprintf(pCurrScreen->buttons[3].Name,
|
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)
|
|
||||||
[DAT_FRNT__001cc54c + 2]);
|
|
||||||
goto LAB_FRNT__001c3e3c;
|
goto LAB_FRNT__001c3e3c;
|
||||||
}
|
}
|
||||||
if (iVar8 == 4) {
|
if (iVar8 == 4)
|
||||||
|
{
|
||||||
pCurrScreen->buttons[1].u = '\x05';
|
pCurrScreen->buttons[1].u = '\x05';
|
||||||
pCurrScreen->buttons[1].d = '\x03';
|
pCurrScreen->buttons[1].d = '\x03';
|
||||||
pCurrScreen->buttons[2].u = '\x02';
|
pCurrScreen->buttons[2].u = '\x02';
|
||||||
@ -2765,29 +2827,27 @@ int MissionSelectScreen(int bSetup)
|
|||||||
pCurrScreen->buttons[3].d = '\x05';
|
pCurrScreen->buttons[3].d = '\x05';
|
||||||
pCurrScreen->buttons[4].u = uVar4;
|
pCurrScreen->buttons[4].u = uVar4;
|
||||||
pCurrScreen->buttons[4].d = '\x02';
|
pCurrScreen->buttons[4].d = '\x02';
|
||||||
sprintf(pCurrScreen->buttons[1].Name,
|
sprintf(pCurrScreen->buttons[1].Name, MissionName[currMission]);
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)[DAT_FRNT__001cc54c]);
|
sprintf(pCurrScreen->buttons[2].Name, MissionName[currMission + 1]);
|
||||||
sprintf(pCurrScreen->buttons[2].Name,
|
sprintf(pCurrScreen->buttons[3].Name, MissionName[currMission + 2]);
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)
|
sprintf(pCurrScreen->buttons[4].Name, MissionName[currMission + 3]);
|
||||||
[DAT_FRNT__001cc54c + 1]);
|
|
||||||
sprintf(pCurrScreen->buttons[3].Name,
|
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)
|
|
||||||
[DAT_FRNT__001cc54c + 2]);
|
|
||||||
sprintf(pCurrScreen->buttons[4].Name,
|
|
||||||
(&PTR_s_Informazioni_sorveglianza_FRNT__001c06e4_FRNT__001c68f8)
|
|
||||||
[DAT_FRNT__001cc54c + 3]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pPVar5 = pCurrScreen;
|
pPVar5 = pCurrScreen;
|
||||||
if (((iVar8 == 4) &&
|
|
||||||
((int)(&DAT_FRNT__001c6bb8)[(DAT_FRNT__001cc54c + 4) * 2] <= gFurthestMission)) &&
|
if (((iVar8 == 4) && (botch[currMission + 4].missNum <= gFurthestMission)) && (currMission + 4 != minmaxSelections[currCity][1]))
|
||||||
(DAT_FRNT__001cc54c + 4 != *(int *)(DAT_FRNT__001c6a70 * 8 + 0x1c6b9c))) {
|
{
|
||||||
bVar3 = true;
|
bVar3 = true;
|
||||||
}
|
}
|
||||||
if (bVar3) {
|
|
||||||
if (DAT_FRNT__001cc54c == *(int *)(&DAT_FRNT__001c6b98 + DAT_FRNT__001c6a70 * 8)) {
|
if (bVar3)
|
||||||
|
{
|
||||||
|
if (currMission == minmaxSelections[currCity][0])
|
||||||
|
{
|
||||||
LAB_FRNT__001c406c:
|
LAB_FRNT__001c406c:
|
||||||
if (bVar3) {
|
if (bVar3)
|
||||||
|
{
|
||||||
pCurrScreen->buttons[1].u = '\x06';
|
pCurrScreen->buttons[1].u = '\x06';
|
||||||
pCurrScreen->buttons[4].d = '\x06';
|
pCurrScreen->buttons[4].d = '\x06';
|
||||||
pCurrScreen->buttons[5].u = '\x05';
|
pCurrScreen->buttons[5].u = '\x05';
|
||||||
@ -2796,12 +2856,14 @@ int MissionSelectScreen(int bSetup)
|
|||||||
pCurrScreen->buttons[5].action = 0;
|
pCurrScreen->buttons[5].action = 0;
|
||||||
pPVar5->buttons[0].action = 0x500;
|
pPVar5->buttons[0].action = 0x500;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
pCurrScreen->buttons[0].action = 0x500;
|
pCurrScreen->buttons[0].action = 0x500;
|
||||||
pPVar5->buttons[5].action = 0x500;
|
pPVar5->buttons[5].action = 0x500;
|
||||||
}
|
}
|
||||||
|
|
||||||
pCurrButton = pPVar5->buttons + 1;
|
pCurrButton = pPVar5->buttons + 1;
|
||||||
DAT_FRNT__001c6a8c = 1;
|
currSelIndex = 1;
|
||||||
goto LAB_FRNT__001c40d8;
|
goto LAB_FRNT__001c40d8;
|
||||||
}
|
}
|
||||||
pCurrScreen->buttons[0].u = '\x06';
|
pCurrScreen->buttons[0].u = '\x06';
|
||||||
@ -2814,9 +2876,11 @@ int MissionSelectScreen(int bSetup)
|
|||||||
pCurrScreen->buttons[0].action = 0;
|
pCurrScreen->buttons[0].action = 0;
|
||||||
pPVar5->buttons[5].action = 0;
|
pPVar5->buttons[5].action = 0;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (DAT_FRNT__001cc54c == *(int *)(&DAT_FRNT__001c6b98 + DAT_FRNT__001c6a70 * 8))
|
{
|
||||||
|
if (currMission == minmaxSelections[currCity][0])
|
||||||
goto LAB_FRNT__001c406c;
|
goto LAB_FRNT__001c406c;
|
||||||
|
|
||||||
pCurrScreen->buttons[0].u = uVar4 + '\x01';
|
pCurrScreen->buttons[0].u = uVar4 + '\x01';
|
||||||
pCurrScreen->buttons[0].d = '\x02';
|
pCurrScreen->buttons[0].d = '\x02';
|
||||||
pCurrScreen->buttons[1].u = '\x01';
|
pCurrScreen->buttons[1].u = '\x01';
|
||||||
@ -2826,20 +2890,24 @@ int MissionSelectScreen(int bSetup)
|
|||||||
pPVar5->buttons[5].action = 0x500;
|
pPVar5->buttons[5].action = 0x500;
|
||||||
}
|
}
|
||||||
pCurrButton = pPVar5->buttons;
|
pCurrButton = pPVar5->buttons;
|
||||||
DAT_FRNT__001c6a8c = 0;
|
currSelIndex = 0;
|
||||||
|
|
||||||
LAB_FRNT__001c40d8:
|
LAB_FRNT__001c40d8:
|
||||||
if (DAT_FRNT__001c6a78 == -1) {
|
if (loaded[0] == -1)
|
||||||
SetupExtraPoly(s_DATA_CITY_RAW_FRNT__001c088c, DAT_FRNT__001c6a70, 0);
|
{
|
||||||
|
SetupExtraPoly("DATA\\CITY.RAW", currCity, 0);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
DAT_FRNT__001c6a90 = 1;
|
{
|
||||||
|
bDrawExtra = 1;
|
||||||
}
|
}
|
||||||
feVariableSave[0] = 0xffffffff;
|
|
||||||
feVariableSave[1] = 0xffffffff;
|
feVariableSave[0] = -1;
|
||||||
feVariableSave[2] = 0xffffffff;
|
feVariableSave[1] = -1;
|
||||||
feVariableSave[3] = 0xffffffff;
|
feVariableSave[2] = -1;
|
||||||
DAT_FRNT__001c6a74 = 1;
|
feVariableSave[3] = -1;
|
||||||
return 1;*/
|
missionSetup = 1;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2902,78 +2970,84 @@ LAB_FRNT__001c40d8:
|
|||||||
/* end block 4 */
|
/* end block 4 */
|
||||||
// End Line: 8335
|
// End Line: 8335
|
||||||
|
|
||||||
|
// [D]
|
||||||
int MissionCityScreen(int bSetup)
|
int MissionCityScreen(int bSetup)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED();
|
unsigned char bVar1;
|
||||||
return 0;
|
|
||||||
/*
|
|
||||||
|
|
||||||
byte bVar1;
|
|
||||||
DB *pDVar2;
|
DB *pDVar2;
|
||||||
PSXSCREEN *pPVar3;
|
PSXSCREEN *pPVar3;
|
||||||
int iVar4;
|
int iVar4;
|
||||||
uint *puVar5;
|
uint *puVar5;
|
||||||
undefined4 local_10;
|
RECT16 rect;
|
||||||
undefined4 local_c;
|
|
||||||
|
|
||||||
pPVar3 = pCurrScreen;
|
pPVar3 = pCurrScreen;
|
||||||
if (bSetup == 0) {
|
if (bSetup == 0)
|
||||||
if ((uRam001cc5dc & 0x10) != 0) {
|
{
|
||||||
DAT_FRNT__001c6a90 = 0;
|
if ((fePad & 0x10U) != 0)
|
||||||
|
{
|
||||||
|
bDrawExtra = 0;
|
||||||
FESound(0);
|
FESound(0);
|
||||||
DAT_FRNT__001c6aac = 1;
|
bDoneAllready = 1;
|
||||||
LoadBackgroundFile(s_DATA_GFX_RAW_FRNT__001c07f4);
|
LoadBackgroundFile("DATA\\GFX.RAW");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if ((uRam001cc5dc & 0x1000) == 0) {
|
|
||||||
if ((uRam001cc5dc & 0x4000) == 0) {
|
if ((fePad & 0x1000U) == 0)
|
||||||
DAT_FRNT__001c6a70 = (uint)pCurrButton->u & 3;
|
{
|
||||||
|
if ((fePad & 0x4000U) == 0)
|
||||||
|
{
|
||||||
|
currCity = (uint)pCurrButton->u & 3;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
bVar1 = pCurrButton->d;
|
bVar1 = pCurrButton->d;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
bVar1 = pCurrButton->u;
|
bVar1 = pCurrButton->u;
|
||||||
}
|
}
|
||||||
local_10 = DAT_FRNT__001c0884;
|
|
||||||
local_c = DAT_FRNT__001c0888;
|
rect = extraRect;
|
||||||
DAT_FRNT__001c6a70 = (uint)bVar1 - 1;
|
currCity = (uint)bVar1 - 1;
|
||||||
LoadImage(&local_10, &DAT_0013f400 + DAT_FRNT__001c6a70 * 0x8000);
|
LoadImage(&rect, (u_long *)(_frontend_buffer + currCity * 0x8000));
|
||||||
|
|
||||||
DrawSync(0);
|
DrawSync(0);
|
||||||
DisplayOnScreenText();
|
DisplayOnScreenText();
|
||||||
pDVar2 = current;
|
|
||||||
DAT_FRNT__001cc5c8 = DAT_FRNT__001cc5c8 & 0xff000000 | *(uint *)current->ot[2] & 0xffffff;
|
addPrim(current->ot + 2, &extraSprt);
|
||||||
*(uint *)current->ot[2] = *(uint *)current->ot[2] & 0xff000000 | 0x1cc5c8;
|
addPrim(current->ot + 2, &extraDummy);
|
||||||
DAT_FRNT__001cbdb8 = DAT_FRNT__001cbdb8 & 0xff000000 | *(uint *)pDVar2->ot[3] & 0xffffff;
|
|
||||||
puVar5 = (uint *)pDVar2->ot[3];
|
|
||||||
*puVar5 = *puVar5 & 0xff000000 | 0x1cbdb8;
|
|
||||||
EndFrame();
|
EndFrame();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
GameType = GAME_MISSION;
|
GameType = GAME_MISSION;
|
||||||
if (gFurthestMission == 0) {
|
if (gFurthestMission == 0)
|
||||||
|
{
|
||||||
iVar4 = 0x300;
|
iVar4 = 0x300;
|
||||||
LAB_FRNT__001c43f4:
|
LAB_FRNT__001c43f4:
|
||||||
pCurrScreen->buttons[0].action = iVar4;
|
pCurrScreen->buttons[0].action = iVar4;
|
||||||
pPVar3->buttons[1].action = iVar4;
|
pPVar3->buttons[1].action = iVar4;
|
||||||
pPVar3->buttons[2].action = iVar4;
|
pPVar3->buttons[2].action = iVar4;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
if (gFurthestMission < 10) {
|
{
|
||||||
|
if (gFurthestMission < 10)
|
||||||
|
{
|
||||||
pCurrScreen->buttons[0].action = 0x113;
|
pCurrScreen->buttons[0].action = 0x113;
|
||||||
pPVar3->buttons[1].action = 0x300;
|
pPVar3->buttons[1].action = 0x300;
|
||||||
pPVar3->buttons[2].action = 0x300;
|
pPVar3->buttons[2].action = 0x300;
|
||||||
pPVar3->buttons[3].action = 0x300;
|
pPVar3->buttons[3].action = 0x300;
|
||||||
goto LAB_FRNT__001c4404;
|
goto LAB_FRNT__001c4404;
|
||||||
}
|
}
|
||||||
if (gFurthestMission < 0x15) {
|
if (gFurthestMission < 0x15)
|
||||||
|
{
|
||||||
pCurrScreen->buttons[0].action = 0x113;
|
pCurrScreen->buttons[0].action = 0x113;
|
||||||
pPVar3->buttons[1].action = 0x113;
|
pPVar3->buttons[1].action = 0x113;
|
||||||
pPVar3->buttons[2].action = 0x300;
|
pPVar3->buttons[2].action = 0x300;
|
||||||
pPVar3->buttons[3].action = 0x300;
|
pPVar3->buttons[3].action = 0x300;
|
||||||
goto LAB_FRNT__001c4404;
|
goto LAB_FRNT__001c4404;
|
||||||
}
|
}
|
||||||
if (0x1e < gFurthestMission) {
|
if (0x1e < gFurthestMission)
|
||||||
|
{
|
||||||
iVar4 = 0x113;
|
iVar4 = 0x113;
|
||||||
goto LAB_FRNT__001c43f4;
|
goto LAB_FRNT__001c43f4;
|
||||||
}
|
}
|
||||||
@ -2982,16 +3056,21 @@ int MissionCityScreen(int bSetup)
|
|||||||
pPVar3->buttons[1].action = 0x113;
|
pPVar3->buttons[1].action = 0x113;
|
||||||
pPVar3->buttons[2].action = 0x113;
|
pPVar3->buttons[2].action = 0x113;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPVar3->buttons[3].action = iVar4;
|
pPVar3->buttons[3].action = iVar4;
|
||||||
LAB_FRNT__001c4404:
|
LAB_FRNT__001c4404:
|
||||||
LoadBackgroundFile(s_DATA_CITYBACK_RAW_FRNT__001c08b4);
|
|
||||||
if (DAT_FRNT__001c6a78 == -1) {
|
LoadBackgroundFile("DATA\\CITYBACK.RAW");
|
||||||
SetupExtraPoly(s_DATA_CITY_RAW_FRNT__001c088c, 0, 0);
|
|
||||||
|
if (loaded[0] == -1)
|
||||||
|
{
|
||||||
|
SetupExtraPoly("DATA\\CITY.RAW", 0, 0);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
DAT_FRNT__001c6a90 = 1;
|
{
|
||||||
|
bDrawExtra = 1;
|
||||||
}
|
}
|
||||||
return 0;*/
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -240,10 +240,12 @@ void GameDebugKeys(int nKey, bool down)
|
|||||||
char g_Overlay_buffer[0x50000]; // 0x1C0000
|
char g_Overlay_buffer[0x50000]; // 0x1C0000
|
||||||
char g_Frontend_buffer[0x50000]; // 0xFB400
|
char g_Frontend_buffer[0x50000]; // 0xFB400
|
||||||
char g_Other_buffer[0x50000]; // 0xF3000
|
char g_Other_buffer[0x50000]; // 0xF3000
|
||||||
|
char g_Other_buffer2[0x50000]; // 0xE7000
|
||||||
OTTYPE g_OT1[OTSIZE]; // 0xF3000
|
OTTYPE g_OT1[OTSIZE]; // 0xF3000
|
||||||
OTTYPE g_OT2[OTSIZE]; // 0xF7200
|
OTTYPE g_OT2[OTSIZE]; // 0xF7200
|
||||||
char g_PrimTab1[0x1a180]; // 0xFB400
|
char g_PrimTab1[0x1a180]; // 0xFB400
|
||||||
char g_PrimTab2[0x1a180]; // 0x119400
|
char g_PrimTab2[0x1a180]; // 0x119400
|
||||||
|
char g_Replay_buffer[0x50000]; // 0x1fabbc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
@ -252,18 +254,22 @@ int main()
|
|||||||
_overlay_buffer = (char*)malloc(0x50000); // 0x1C0000
|
_overlay_buffer = (char*)malloc(0x50000); // 0x1C0000
|
||||||
_frontend_buffer = (char*)malloc(0x50000); // 0xFB400
|
_frontend_buffer = (char*)malloc(0x50000); // 0xFB400
|
||||||
_other_buffer = (char*)malloc(0x50000); // 0xF3000
|
_other_buffer = (char*)malloc(0x50000); // 0xF3000
|
||||||
|
_other_buffer2 = (char*)malloc(0x50000); // 0xE7000
|
||||||
_OT1 = (OTTYPE*)malloc(OTSIZE * sizeof(OTTYPE)); // 0xF3000
|
_OT1 = (OTTYPE*)malloc(OTSIZE * sizeof(OTTYPE)); // 0xF3000
|
||||||
_OT2 = (OTTYPE*)malloc(OTSIZE * sizeof(OTTYPE)); // 0xF7200
|
_OT2 = (OTTYPE*)malloc(OTSIZE * sizeof(OTTYPE)); // 0xF7200
|
||||||
_primTab1 = (char*)malloc(0x1a180); // 0xFB400
|
_primTab1 = (char*)malloc(0x1a180); // 0xFB400
|
||||||
_primTab2 = (char*)malloc(0x1a180); // 0x119400
|
_primTab2 = (char*)malloc(0x1a180); // 0x119400
|
||||||
|
_replay_buffer = (char*)malloc(0x50000); // 0x1fabbc
|
||||||
#else
|
#else
|
||||||
_overlay_buffer = g_Overlay_buffer; // 0x1C0000
|
_overlay_buffer = g_Overlay_buffer; // 0x1C0000
|
||||||
_frontend_buffer = g_Frontend_buffer; // 0xFB400
|
_frontend_buffer = g_Frontend_buffer; // 0xFB400
|
||||||
_other_buffer = g_Other_buffer; // 0xF3000
|
_other_buffer = g_Other_buffer; // 0xF3000
|
||||||
|
_other_buffer2 = g_Other_buffer2; // 0xE7000
|
||||||
_OT1 = g_OT1; // 0xF3000
|
_OT1 = g_OT1; // 0xF3000
|
||||||
_OT2 = g_OT2; // 0xF7200
|
_OT2 = g_OT2; // 0xF7200
|
||||||
_primTab1 = g_PrimTab1; // 0xFB400
|
_primTab1 = g_PrimTab1; // 0xFB400
|
||||||
_primTab2 = g_PrimTab2; // 0x119400
|
_primTab2 = g_PrimTab2; // 0x119400
|
||||||
|
_replay_buffer = g_Replay_buffer; // 0x1fabbc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//g_texturelessMode = 1;
|
//g_texturelessMode = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user