- 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
Lap
You got the flag!
Draw!
Well done!
You've been caught!
Out of tape

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -151,10 +151,6 @@ MS_MISSION* MissionHeader;
STREAM_SOURCE* PlayerStartInfo[8];
int numPlayersToCreate = 0;
int gStartOnFoot = 0;
//int gSinkingTimer = 100;
//int gTimeInWater = 25;
char InWater = 0;
int gBobIndex = 0;
int gWeather = 0;
int gTimeOfDay = 0;
int gShowPlayerDamage = 0;
@ -1140,7 +1136,7 @@ void RegisterChaseHit(int car1, int car2)
Mission.ChaseHitDelay = 20;
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)
{
SetPlayerMessage(0, "Draw!", 3, 2);
SetPlayerMessage(1, "Draw!", 3, 2);
SetPlayerMessage(0, G_LTXT(GTXT_Draw), 3, 2);
SetPlayerMessage(1, G_LTXT(GTXT_Draw), 3, 2);
break;
}

View File

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

View File

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

View File

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

View File

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