- added "Draw!" string to language

- fix non-translated string
- misc code changes
This commit is contained in:
Ilya Shurumov 2021-05-23 15:15:38 +06:00 committed by InspirationByte
parent d3de296221
commit 94b876a708
14 changed files with 74 additions and 112 deletions

View File

@ -12,6 +12,7 @@ Checks
Flags Flags
Lap Lap
You got the flag! You got the flag!
Draw!
Well done! Well done!
You've been caught! You've been caught!
Out of tape Out of tape

View File

@ -12,6 +12,7 @@ Contr
Drapeaux Drapeaux
Tour Tour
Vous avez le drapeau! Vous avez le drapeau!
Dessiner!
Bien joué! Bien joué!
Vous avez été attrapé! Vous avez été attrapé!
Fin de bande Fin de bande

View File

@ -12,6 +12,7 @@ Checks
Flaggen Flaggen
Runde Runde
Du hast sie! Du hast sie!
Zeichnen!
Gut Gemacht! Gut Gemacht!
Du wurdest erwischt! Du wurdest erwischt!
Kein weiterer Film mehr Kein weiterer Film mehr

View File

@ -12,6 +12,7 @@ Tappe
Bandiere Bandiere
Giro Giro
Hai preso la bandiera! Hai preso la bandiera!
Disegnare!
Ben fatto! Ben fatto!
Sei stato preso! Sei stato preso!
Nastro esaurito Nastro esaurito

View File

@ -12,6 +12,7 @@ Control
Banderas Banderas
Vuelta Vuelta
‥o has conseguido! ‥o has conseguido!
¡Dibujar!
、ien hecho! 、ien hecho!
﹗e atraparon! ﹗e atraparon!
No hay mas cinta No hay mas cinta

View File

@ -1425,9 +1425,6 @@ void DrawCar(CAR_DATA* cp, int view)
AddExhaustSmoke(cp, doSmoke > 1, WheelSpeed); AddExhaustSmoke(cp, doSmoke > 1, WheelSpeed);
//gTimeInWater = 25;
//gSinkingTimer = 100;
SetShadowPoints(cp, corners); SetShadowPoints(cp, corners);
PlaceShadowForCar(corners, 4, 10, yVal < 0 ? 0 : 2); PlaceShadowForCar(corners, 4, 10, yVal < 0 ? 0 : 2);

View File

@ -119,42 +119,42 @@ int InitCar(CAR_DATA* cp, int direction, LONGVECTOR4* startPos, unsigned char co
switch (control) switch (control)
{ {
case 1: case CONTROL_TYPE_PLAYER:
case 7: case CONTROL_TYPE_CUTSCENE:
// player car or cutscene car // player car or cutscene car
cp->ai.padid = extraData; cp->ai.padid = extraData;
player[cp->id].worldCentreCarId = cp->id; player[cp->id].worldCentreCarId = cp->id;
cp->hndType = 0; cp->hndType = 0;
break; break;
case 2: case CONTROL_TYPE_CIV_AI:
cp->hndType = 1; cp->hndType = 1;
if (extraData == NULL) if (extraData == NULL)
{ {
cp->controlFlags = 0; cp->controlFlags = 0;
cp->ap.palette = 0;
}
else
{
cp->controlFlags = ((EXTRA_CIV_DATA*)extraData)->controlFlags;
cp->ap.palette = ((EXTRA_CIV_DATA*)extraData)->palette;
}
InitCivState(cp, (EXTRA_CIV_DATA*)extraData);
break;
case CONTROL_TYPE_PURSUER_AI:
InitCopState(cp, extraData);
cp->ap.palette = 0; cp->ap.palette = 0;
} numCopCars++;
else break;
{ case CONTROL_TYPE_LEAD_AI:
cp->controlFlags = ((EXTRA_CIV_DATA*)extraData)->controlFlags; // free roamer lead car
cp->ap.palette = ((EXTRA_CIV_DATA*)extraData)->palette; InitLead(cp);
} leadCarId = cp->id;
cp->hndType = 5;
InitCivState(cp, (EXTRA_CIV_DATA*)extraData); break;
break;
case 3:
InitCopState(cp, extraData);
cp->ap.palette = 0;
numCopCars++;
break;
case 4:
// free roamer lead car
InitLead(cp);
leadCarId = cp->id;
cp->hndType = 5;
break;
} }
CreateDentableCar(cp); CreateDentableCar(cp);

View File

@ -130,27 +130,23 @@ void UpdateCarPoints(CAR_COSMETICS* carCos)
groundCollPoints = carCos->cPoints; groundCollPoints = carCos->cPoints;
wheelPoints = carCos->wheelDisp; wheelPoints = carCos->wheelDisp;
i = 0; for (i = 0; i < 12; i++)
{
do {
groundCollPoints->vx += delta.vx; groundCollPoints->vx += delta.vx;
groundCollPoints->vy -= delta.vy; groundCollPoints->vy -= delta.vy;
groundCollPoints->vz += delta.vz; groundCollPoints->vz += delta.vz;
groundCollPoints++; groundCollPoints++;
i++; }
} while (i < 12);
if (doWheels) if (doWheels)
{ {
i = 0; for (i = 0; i < 4; i++)
{
do {
wheelPoints->vx += delta.vx; wheelPoints->vx += delta.vx;
wheelPoints->vy -= delta.vy; wheelPoints->vy -= delta.vy;
wheelPoints->vz += delta.vz; wheelPoints->vz += delta.vz;
wheelPoints++; wheelPoints++;
i++; }
} while (i < 4);
} }
carCos->cog.vx += delta.vx; carCos->cog.vx += delta.vx;
@ -761,10 +757,10 @@ void SetShadowPoints(CAR_DATA* c0, VECTOR* outpoints)
gte_SetRotMatrix(&c0->hd.where); gte_SetRotMatrix(&c0->hd.where);
gte_SetTransMatrix(&c0->hd.where); gte_SetTransMatrix(&c0->hd.where);
i = 0;
car_cos = &car_cosmetics[c0->ap.model]; car_cos = &car_cosmetics[c0->ap.model];
do { for (i = 0; i < 4; i++)
{
disp = car_cos->cPoints[i]; disp = car_cos->cPoints[i];
gte_ldv0(&disp); gte_ldv0(&disp);
@ -774,9 +770,7 @@ void SetShadowPoints(CAR_DATA* c0, VECTOR* outpoints)
gte_stlvnl(&pointPos); gte_stlvnl(&pointPos);
FindSurfaceD2(&pointPos, &surfaceNormal, &outpoints[i], &surfacePtr); FindSurfaceD2(&pointPos, &surfaceNormal, &outpoints[i], &surfacePtr);
}
i++;
} while (i < 4);
} }
// [D] [T] // [D] [T]
@ -1385,15 +1379,13 @@ void InitSkidding(void)
{ {
int i; int i;
i = 2; for(i = 0; i < 2; i++)
do
{ {
player[i].wheelnoise.sound = -1; player[i].wheelnoise.sound = -1;
player[i].wheelnoise.chan = -1; player[i].wheelnoise.chan = -1;
player[i].skidding.sound = -1; player[i].skidding.sound = -1;
player[i].skidding.chan = -1; player[i].skidding.chan = -1;
i--; }
} while (i >= 0);
} }
@ -1450,12 +1442,10 @@ void jump_debris(CAR_DATA* cp)
VECTOR position; VECTOR position;
VECTOR velocity; VECTOR velocity;
count = 0;
wheel = cp->hd.wheel; wheel = cp->hd.wheel;
do for(count = 0; count < 4; count++)
{ {
if (wheel->susCompression != 0) if (wheel->susCompression != 0)
{ {
DebrisTimer = 0; DebrisTimer = 0;
@ -1464,8 +1454,7 @@ void jump_debris(CAR_DATA* cp)
} }
wheel++; wheel++;
count++; }
} while (count < 4);
if (cp->wasOnGround == 1) if (cp->wasOnGround == 1)
{ {
@ -1525,14 +1514,11 @@ void CheckCarEffects(CAR_DATA* cp, int player_id)
// [A] do hubcaps here // [A] do hubcaps here
HandlePlayerHubcaps(player_id); HandlePlayerHubcaps(player_id);
cnt = 0; for (cnt = 0; cnt < 4; cnt++)
do
{ {
if (cp->hd.wheel[cnt].susCompression != 0) if (cp->hd.wheel[cnt].susCompression != 0)
wheels_on_ground = 1; wheels_on_ground = 1;
}
cnt++;
} while (cnt < 4);
skidsound = 0; skidsound = 0;

View File

@ -681,9 +681,6 @@ void State_GameInit(void* param)
IconsLoaded = 0; IconsLoaded = 0;
} }
InWater = 0;
gBobIndex = 0;
SetupRain(); SetupRain();
InitExObjects(); InitExObjects();
@ -1161,13 +1158,11 @@ void StepSim(void)
SetSp(oldsp); SetSp(oldsp);
CameraCnt++; CameraCnt++;
gBobIndex = gBobIndex + 0x3cU & 0xfff;
i = 0;
pl = player; pl = player;
// deal with car horns // deal with car horns
while (i < NumPlayers) for (i = 0; i < NumPlayers; i++)
{ {
int playerCarId; int playerCarId;
@ -1190,10 +1185,7 @@ void StepSim(void)
{ {
int spuKeys; int spuKeys;
if (i != 0) spuKeys = SPU_KEYCH(i != 0 ? 5 : 2);
spuKeys = 0x20;
else
spuKeys = 0x4;
if (SpuGetKeyStatus(spuKeys) == 0) if (SpuGetKeyStatus(spuKeys) == 0)
{ {
@ -1207,8 +1199,6 @@ void StepSim(void)
DealWithHorn(&pl->horn.request, i); DealWithHorn(&pl->horn.request, i);
} }
i++;
pl++; pl++;
} }
@ -1216,43 +1206,35 @@ void StepSim(void)
static int stupid_logic[4]; static int stupid_logic[4];
if (gInGameCutsceneActive == 0 || gCurrentMissionNumber != 23 || gInGameCutsceneID != 0) // "Car Bomb"?
stupid_logic[0] = player[0].playerCarId; if (gInGameCutsceneActive != 0 && gCurrentMissionNumber == 23 && gInGameCutsceneID == 0)
else
stupid_logic[0] = 2; stupid_logic[0] = 2;
else
i = 0; stupid_logic[0] = player[0].playerCarId;
stupid_logic[1] = player[1].playerCarId; stupid_logic[1] = player[1].playerCarId;
stupid_logic[2] = gThePlayerCar; stupid_logic[2] = gThePlayerCar;
stupid_logic[3] = leadCarId; stupid_logic[3] = leadCarId;
while (i < 3) for (i = 0; i < 3; i++)
{ {
j = i + 1; for (j = i+1; j < 4; j++)
while (j < 4)
{ {
if (stupid_logic[i] == stupid_logic[j]) if (stupid_logic[i] == stupid_logic[j])
stupid_logic[j] = -1; stupid_logic[j] = -1;
j++;
} }
i++;
} }
car = 0; for (car = 0, i = 0; car < 4 && i < 2; car++)
i = 0; {
do {
if (stupid_logic[car] != -1 && SilenceThisCar(car) == 0) if (stupid_logic[car] != -1 && SilenceThisCar(car) == 0)
{ {
CheckCarEffects(&car_data[stupid_logic[car]], i); CheckCarEffects(&car_data[stupid_logic[car]], i);
SwirlLeaves(&car_data[stupid_logic[car]]); SwirlLeaves(&car_data[stupid_logic[car]]);
i++; i++;
} }
}
car++;
} while (car < 4 && i < 2);
// save car positions // save car positions
if (gStopPadReads == 1 && lead_car != 0) if (gStopPadReads == 1 && lead_car != 0)

View File

@ -151,10 +151,6 @@ MS_MISSION* MissionHeader;
STREAM_SOURCE* PlayerStartInfo[8]; STREAM_SOURCE* PlayerStartInfo[8];
int numPlayersToCreate = 0; int numPlayersToCreate = 0;
int gStartOnFoot = 0; int gStartOnFoot = 0;
//int gSinkingTimer = 100;
//int gTimeInWater = 25;
char InWater = 0;
int gBobIndex = 0;
int gWeather = 0; int gWeather = 0;
int gTimeOfDay = 0; int gTimeOfDay = 0;
int gShowPlayerDamage = 0; int gShowPlayerDamage = 0;
@ -1140,7 +1136,7 @@ void RegisterChaseHit(int car1, int car2)
Mission.ChaseHitDelay = 20; Mission.ChaseHitDelay = 20;
player[1 - player_id].targetCarId = gPlayerWithTheFlag; player[1 - player_id].targetCarId = gPlayerWithTheFlag;
SetPlayerMessage(player_id, "You've got the flag!",2,1); SetPlayerMessage(player_id, G_LTXT(GTXT_YouGotTheFlag),2,1);
} }
} }
} }
@ -2978,8 +2974,8 @@ void SetMissionComplete(void)
{ {
if (gPlayerScore.P2items == gPlayerScore.items) if (gPlayerScore.P2items == gPlayerScore.items)
{ {
SetPlayerMessage(0, "Draw!", 3, 2); SetPlayerMessage(0, G_LTXT(GTXT_Draw), 3, 2);
SetPlayerMessage(1, "Draw!", 3, 2); SetPlayerMessage(1, G_LTXT(GTXT_Draw), 3, 2);
break; break;
} }

View File

@ -17,10 +17,7 @@ extern MS_MISSION*MissionHeader;
extern STREAM_SOURCE* PlayerStartInfo[8]; extern STREAM_SOURCE* PlayerStartInfo[8];
extern int numPlayersToCreate; extern int numPlayersToCreate;
extern int gStartOnFoot; extern int gStartOnFoot;
//extern int gSinkingTimer;
//extern int gTimeInWater;
extern char InWater;
extern int gBobIndex;
extern int gWeather; extern int gWeather;
extern int gTimeOfDay; extern int gTimeOfDay;
extern int gShowPlayerDamage; extern int gShowPlayerDamage;

View File

@ -189,17 +189,14 @@ void MapPad(int pad, PADRAW *pData)
if (Pads[pad].active) if (Pads[pad].active)
{ {
mapped = 0; mapped = 0;
i = 0;
do { for (i = 0; i < 16; i++)
{
if (((buttons >> i) & 1) != 0) if (((buttons >> i) & 1) != 0)
{ {
mapped |= Pads[pad].mappings.button_lookup[i]; mapped |= Pads[pad].mappings.button_lookup[i];
} }
}
i++;
} while (i < 16);
Pads[pad].mapnew = mapped & ~Pads[pad].mapped; Pads[pad].mapnew = mapped & ~Pads[pad].mapped;
Pads[pad].mapped = mapped; Pads[pad].mapped = mapped;

View File

@ -3,6 +3,7 @@
char ROADS_GetRouteData(int x, int z, ROUTE_DATA *pRouteData) char ROADS_GetRouteData(int x, int z, ROUTE_DATA *pRouteData)
{ {
// Driver 2 roads don't support model numbers. Driver 1 does.
pRouteData->type = 0; pRouteData->type = 0;
return 1; return 1;
} }

View File

@ -23,6 +23,7 @@ enum GameStrId
GTXT_Flags, GTXT_Flags,
GTXT_Lap, GTXT_Lap,
GTXT_YouGotTheFlag, GTXT_YouGotTheFlag,
GTXT_Draw,
GTXT_WellDone, GTXT_WellDone,
GTXT_YouveBeenCaught, GTXT_YouveBeenCaught,