summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/control/Pickups.cpp30
-rw-r--r--src/core/Frontend.cpp13
-rw-r--r--src/core/Frontend.h2
-rw-r--r--src/core/Game.cpp9
-rw-r--r--src/core/Game.h1
-rw-r--r--src/core/MenuScreens.h5
-rw-r--r--src/core/config.h2
-rw-r--r--src/render/Font.cpp58
-rw-r--r--src/render/Font.h6
-rw-r--r--src/render/Hud.cpp7
-rw-r--r--src/text/Text.cpp3
11 files changed, 130 insertions, 6 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index f9605ca6..d5db4ad8 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -491,7 +491,7 @@ CPickups::GenerateNewOne(CVector pos, uint32 modelIndex, uint8 type, uint32 quan
int32 slot = 0;
if (type == PICKUP_FLOATINGPACKAGE || type == PICKUP_NAUTICAL_MINE_INACTIVE) {
- for (slot = NUMPICKUPS; slot >= 0; slot--) {
+ for (slot = NUMPICKUPS-1; slot >= 0; slot--) {
if (aPickUps[slot].m_eType == PICKUP_NONE) {
bFreeFound = true;
break;
@@ -623,6 +623,34 @@ CPickups::Update()
if (CReplay::IsPlayingBack())
return;
#endif
+#ifdef CAMERA_PICKUP
+ if ( bPickUpcamActivated ) // taken from PS2
+ {
+ float dist = (FindPlayerCoors() - StaticCamCoors).Magnitude2D();
+ float mult;
+ if ( dist < 10.0f )
+ mult = 1.0f - (dist / 10.0f );
+ else
+ mult = 0.0f;
+
+ CVector pos = StaticCamCoors;
+ pos.z += (pPlayerVehicle->GetColModel()->boundingBox.GetSize().z + 2.0f) * mult;
+
+ if ( (CTimer::GetTimeInMilliseconds() - StaticCamStartTime) > 750 )
+ {
+ TheCamera.SetCamPositionForFixedMode(pos, CVector(0.0f, 0.0f, 0.0f));
+ TheCamera.TakeControl(FindPlayerVehicle(), CCam::MODE_FIXED, JUMP_CUT, CAMCONTROL_SCRIPT);
+ }
+
+ if ( FindPlayerVehicle() != pPlayerVehicle
+ || (FindPlayerCoors() - StaticCamCoors).Magnitude() > 40.0f
+ || ((CTimer::GetTimeInMilliseconds() - StaticCamStartTime) > 60000) )
+ {
+ TheCamera.RestoreWithJumpCut();
+ bPickUpcamActivated = false;
+ }
+ }
+#endif
#define PICKUPS_FRAME_SPAN (6)
#ifdef FIX_BUGS
for (uint32 i = NUMGENERALPICKUPS * (CTimer::GetFrameCounter() % PICKUPS_FRAME_SPAN) / PICKUPS_FRAME_SPAN; i < NUMGENERALPICKUPS * (CTimer::GetFrameCounter() % PICKUPS_FRAME_SPAN + 1) / PICKUPS_FRAME_SPAN; i++) {
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index db6073a6..c7e7d26e 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -2893,6 +2893,9 @@ CMenuManager::InitialiseChangedLanguageSettings()
CGame::germanGame = false;
#ifdef MORE_LANGUAGES
switch (m_PrefsLanguage) {
+ case LANGUAGE_POLISH:
+ CFont::ReloadFonts(FONT_LANGSET_POLISH);
+ break;
case LANGUAGE_RUSSIAN:
CFont::ReloadFonts(FONT_LANGSET_RUSSIAN);
break;
@@ -2910,6 +2913,9 @@ CMenuManager::InitialiseChangedLanguageSettings()
CGame::germanGame = true;
break;
#ifdef MORE_LANGUAGES
+ case LANGUAGE_POLISH:
+ CGame::polishGame = true;
+ break;
case LANGUAGE_RUSSIAN:
CGame::russianGame = true;
break;
@@ -4254,6 +4260,12 @@ CMenuManager::ProcessButtonPresses(void)
SaveSettings();
break;
#ifdef MORE_LANGUAGES
+ case MENUACTION_LANG_PL:
+ m_PrefsLanguage = LANGUAGE_POLISH;
+ m_bFrontEnd_ReloadObrTxtGxt = true;
+ InitialiseChangedLanguageSettings();
+ SaveSettings();
+ break;
case MENUACTION_LANG_RUS:
m_PrefsLanguage = LANGUAGE_RUSSIAN;
m_bFrontEnd_ReloadObrTxtGxt = true;
@@ -5550,6 +5562,7 @@ CMenuManager::ConstructStatLine(int rowIdx)
case LANGUAGE_ITALIAN:
case LANGUAGE_SPANISH:
#ifdef MORE_LANGUAGES
+ case LANGUAGE_POLISH:
case LANGUAGE_RUSSIAN:
#endif
STAT_LINE("FESTDFM", &CStats::DistanceTravelledOnFoot, true, nil);
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index db54d2a5..c7b0c979 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -89,6 +89,7 @@ enum eLanguages
LANGUAGE_ITALIAN,
LANGUAGE_SPANISH,
#ifdef MORE_LANGUAGES
+ LANGUAGE_POLISH,
LANGUAGE_RUSSIAN,
#endif
};
@@ -365,6 +366,7 @@ enum eMenuAction
MENUACTION_UNK109,
MENUACTION_UNK110,
#ifdef MORE_LANGUAGES
+ MENUACTION_LANG_PL,
MENUACTION_LANG_RUS,
#endif
};
diff --git a/src/core/Game.cpp b/src/core/Game.cpp
index 8b2f8604..6f3eee29 100644
--- a/src/core/Game.cpp
+++ b/src/core/Game.cpp
@@ -98,6 +98,7 @@ bool CGame::noProstitutes;
bool CGame::playingIntro;
char CGame::aDatFile[32];
#ifdef MORE_LANGUAGES
+bool CGame::polishGame = false;
bool CGame::russianGame = false;
#endif
@@ -155,6 +156,14 @@ CGame::InitialiseRenderWare(void)
LightsCreate(Scene.world);
CreateDebugFont();
+
+#ifdef LIBRW
+#ifdef PS2_MATFX
+ rw::MatFX::modulateEnvMap = true;
+#else
+ rw::MatFX::modulateEnvMap = false;
+#endif
+#endif
CFont::Initialise();
CHud::Initialise();
diff --git a/src/core/Game.h b/src/core/Game.h
index acfeff0f..01f5f0e9 100644
--- a/src/core/Game.h
+++ b/src/core/Game.h
@@ -17,6 +17,7 @@ public:
static bool frenchGame;
static bool germanGame;
#ifdef MORE_LANGUAGES
+ static bool polishGame;
static bool russianGame;
#endif
static bool noProstitutes;
diff --git a/src/core/MenuScreens.h b/src/core/MenuScreens.h
index 8692d4dc..e55ec49f 100644
--- a/src/core/MenuScreens.h
+++ b/src/core/MenuScreens.h
@@ -72,9 +72,10 @@ const CMenuScreen aScreens[] = {
MENUACTION_LANG_FRE, "FEL_FRE", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_LANG_GER, "FEL_GER", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_LANG_ITA, "FEL_ITA", SAVESLOT_NONE, MENUPAGE_NONE,
- MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_NONE,
+ MENUACTION_LANG_SPA, "FEL_SPA", SAVESLOT_NONE, MENUPAGE_NONE,
#ifdef MORE_LANGUAGES
- MENUACTION_LANG_RUS, "FEL_RUS", SAVESLOT_NONE, MENUPAGE_NONE,
+ MENUACTION_LANG_PL, "FEL_POL", SAVESLOT_NONE, MENUPAGE_NONE,
+ MENUACTION_LANG_RUS, "FEL_RUS", SAVESLOT_NONE, MENUPAGE_NONE,
#endif
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
},
diff --git a/src/core/config.h b/src/core/config.h
index 4ca79cb5..b5022b9f 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -209,6 +209,7 @@ enum Config {
#define TRIANGLE_BACK_BUTTON
// #define CIRCLE_BACK_BUTTON
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
+#define BETA_SLIDING_TEXT
// Script
#define USE_DEBUG_SCRIPT_LOADER // makes game load main_freeroam.scm by default
@@ -225,6 +226,7 @@ enum Config {
// Pickups
//#define MONEY_MESSAGES
+#define CAMERA_PICKUP
// Peds
#define ANIMATE_PED_COL_MODEL
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index 14a678b8..e4bd2a11 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -12,7 +12,7 @@ CSprite2d CFont::Sprite[MAX_FONTS];
uint8 CFont::LanguageSet = FONT_LANGSET_EFIGS;
int32 CFont::Slot = -1;
-int16 CFont::Size[2][MAX_FONTS][193] = {
+int16 CFont::Size[LANGSET_MAX][MAX_FONTS][193] = {
{
#else
int16 CFont::Size[MAX_FONTS][193] = {
@@ -112,6 +112,56 @@ int16 CFont::Size[MAX_FONTS][193] = {
21, 32, 21, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 11, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19 },
+ },
+
+ {
+ {
+ 13, 12, 31, 35, 23, 35, 31, 9, 14, 15, 25, 30, 11, 17, 13, 31,
+ 23, 16, 22, 21, 24, 23, 23, 20, 23, 22, 10, 35, 26, 26, 26, 26,
+ 30, 26, 24, 23, 24, 22, 21, 24, 26, 10, 20, 26, 22, 29, 26, 25,
+ 23, 25, 24, 24, 22, 25, 24, 29, 29, 23, 25, 37, 22, 37, 35, 37,
+ 35, 21, 22, 21, 21, 22, 13, 22, 21, 10, 16, 22, 11, 32, 21, 21,
+ 23, 22, 16, 20, 14, 21, 20, 30, 25, 21, 21, 33, 33, 33, 33, 35,
+ 27, 27, 27, 27, 32, 24, 23, 23, 23, 23, 11, 11, 11, 11, 26, 26,
+ 26, 26, 26, 26, 26, 25, 26, 21, 21, 21, 21, 32, 23, 22, 22, 22,
+ 22, 11, 11, 11, 11, 22, 22, 22, 22, 22, 22, 22, 22, 26, 21, 24,
+ 12, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 18, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 20
+ },
+
+ {
+ 13, 9, 21, 35, 23, 35, 35, 11, 35, 35, 25, 35, 11, 17, 13, 33,
+ 28, 14, 22, 21, 24, 23, 23, 21, 23, 22, 10, 35, 13, 35, 13, 33,
+ 5, 25, 22, 23, 24, 21, 21, 24, 24, 9, 20, 24, 21, 27, 25, 25,
+ 22, 25, 23, 20, 23, 23, 23, 31, 23, 23, 23, 37, 33, 37, 35, 37,
+ 35, 21, 19, 19, 21, 19, 17, 21, 21, 8, 17, 18, 14, 24, 21, 21,
+ 20, 22, 19, 20, 20, 19, 20, 26, 21, 20, 21, 33, 33, 33, 33, 35,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 16
+ },
+
+ {
+ 15, 14, 16, 25, 19, 26, 22, 11, 18, 18, 27, 26, 13, 19, 9, 27,
+ 19, 18, 19, 19, 22, 19, 20, 18, 19, 20, 12, 32, 15, 32, 15, 35,
+ 15, 19, 19, 19, 19, 19, 16, 19, 20, 9, 19, 20, 14, 29, 19, 20,
+ 19, 19, 19, 19, 21, 19, 20, 32, 20, 19, 19, 33, 31, 39, 37, 39,
+ 37, 21, 21, 21, 23, 21, 19, 23, 23, 10, 19, 20, 16, 26, 23, 23,
+ 20, 20, 20, 22, 21, 22, 22, 26, 22, 22, 23, 35, 35, 35, 35, 37,
+ 19, 19, 19, 19, 29, 19, 19, 19, 19, 19, 9, 9, 9, 9, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 30, 19, 19, 19, 19,
+ 19, 10, 10, 10, 10, 19, 19, 19, 19, 19, 19, 19, 19, 19, 23, 35,
+ 12, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 11, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19
+ }
}
#endif
};
@@ -141,6 +191,9 @@ CFont::Initialise(void)
default:
CTxdStore::LoadTxd(slot, "MODELS/FONTS.TXD");
break;
+ case FONT_LANGSET_POLISH:
+ CTxdStore::LoadTxd(slot, "MODELS/FONTS_P.TXD");
+ break;
case FONT_LANGSET_RUSSIAN:
CTxdStore::LoadTxd(slot, "MODELS/FONTS_R.TXD");
break;
@@ -189,6 +242,9 @@ CFont::ReloadFonts(uint8 set)
default:
CTxdStore::LoadTxd(Slot, "MODELS/FONTS.TXD");
break;
+ case FONT_LANGSET_POLISH:
+ CTxdStore::LoadTxd(Slot, "MODELS/FONTS_P.TXD");
+ break;
case FONT_LANGSET_RUSSIAN:
CTxdStore::LoadTxd(Slot, "MODELS/FONTS_R.TXD");
break;
diff --git a/src/render/Font.h b/src/render/Font.h
index ebf5e292..01d67700 100644
--- a/src/render/Font.h
+++ b/src/render/Font.h
@@ -44,14 +44,16 @@ enum {
enum
{
FONT_LANGSET_EFIGS,
- FONT_LANGSET_RUSSIAN
+ FONT_LANGSET_RUSSIAN,
+ FONT_LANGSET_POLISH,
+ LANGSET_MAX
};
#endif
class CFont
{
#ifdef MORE_LANGUAGES
- static int16 Size[2][MAX_FONTS][193];
+ static int16 Size[LANGSET_MAX][MAX_FONTS][193];
static uint8 LanguageSet;
static int32 Slot;
#else
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp
index 01512383..f88d6b9c 100644
--- a/src/render/Hud.cpp
+++ b/src/render/Hud.cpp
@@ -1240,10 +1240,17 @@ void CHud::DrawAfterFade()
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::SetFontStyle(FONT_BANK);
+#ifdef BETA_SLIDING_TEXT
+ CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f) - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]);
+
+ CFont::SetColor(CRGBA(156, 91, 40, 255));
+ CFont::PrintString(SCREEN_WIDTH / 2 - SCREEN_SCALE_X(OddJob2XOffset), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f), m_BigMessage[5]);
+#else
CFont::PrintString(SCREEN_WIDTH / 2 + SCREEN_SCALE_X(2.0f), SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f) + SCREEN_SCALE_Y(2.0f), m_BigMessage[5]);
CFont::SetColor(CRGBA(156, 91, 40, 255));
CFont::PrintString(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(20.0f), m_BigMessage[5]);
+#endif
}
}
diff --git a/src/text/Text.cpp b/src/text/Text.cpp
index 69025df1..f481403d 100644
--- a/src/text/Text.cpp
+++ b/src/text/Text.cpp
@@ -44,6 +44,9 @@ CText::Load(void)
sprintf(filename, "SPANISH.GXT");
break;
#ifdef MORE_LANGUAGES
+ case LANGUAGE_POLISH:
+ sprintf(filename, "POLISH.GXT");
+ break;
case LANGUAGE_RUSSIAN:
sprintf(filename, "RUSSIAN.GXT");
break;