Skip to content

Commit cce18f3

Browse files
committed
Return back loading stages from previous games (SOC, CS)
1 parent 685bd0a commit cce18f3

20 files changed

+83
-104
lines changed

src/Layers/xrRender/dxApplicationRender.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ void dxApplicationRender::load_draw_internal(CApplication& owner)
233233
logo_tex_coords.rb.set(1.0f, 0.77926f);
234234

235235
draw_face(hLevelLogo, r, logo_tex_coords, Fvector2().set(1, 1));
236+
owner.pFontSystem->SetColor(color_rgba(180, 180, 180, 200));
236237
}
238+
239+
owner.pFontSystem->OutI(0.f, 0.385f, owner.ls_title); // XXX: 0.385f <- hardcoded coordinates
240+
owner.pFontSystem->OnRender();
237241
}
238242

239243
void dxApplicationRender::draw_face(ref_shader& sh, Frect& coords, Frect& tex_coords, const Fvector2& tsz)

src/Layers/xrRenderPC_R1/FStaticRender_Loader.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void CRender::level_Load(IReader* fs)
2222
IReader* chunk;
2323

2424
// Shaders
25-
// g_pGamePersistent->LoadTitle ("st_loading_shaders");
25+
g_pGamePersistent->SetLoadStageTitle("st_loading_shaders");
2626
g_pGamePersistent->LoadTitle();
2727
{
2828
chunk = fs->open_chunk(fsL_SHADERS);
@@ -62,36 +62,37 @@ void CRender::level_Load(IReader* fs)
6262
if (!GEnv.isDedicatedServer)
6363
{
6464
// VB,IB,SWI
65-
// g_pGamePersistent->LoadTitle("st_loading_geometry");
65+
g_pGamePersistent->SetLoadStageTitle("st_loading_geometry");
6666
g_pGamePersistent->LoadTitle();
6767
CStreamReader* geom = FS.rs_open("$level$", "level.geom");
6868
LoadBuffers(geom);
6969
LoadSWIs(geom);
7070
FS.r_close(geom);
7171

7272
// Visuals
73-
// g_pGamePersistent->LoadTitle("st_loading_spatial_db");
73+
g_pGamePersistent->SetLoadStageTitle("st_loading_spatial_db");
7474
g_pGamePersistent->LoadTitle();
7575
chunk = fs->open_chunk(fsL_VISUALS);
7676
LoadVisuals(chunk);
7777
chunk->close();
7878

7979
// Details
80-
// g_pGamePersistent->LoadTitle("st_loading_details");
80+
g_pGamePersistent->SetLoadStageTitle("st_loading_details");
8181
g_pGamePersistent->LoadTitle();
8282
Details->Load();
8383
}
8484

8585
// Sectors
86-
// g_pGamePersistent->LoadTitle("st_loading_sectors_portals");
86+
g_pGamePersistent->SetLoadStageTitle("st_loading_sectors_portals");
8787
g_pGamePersistent->LoadTitle();
8888
LoadSectors(fs);
8989

9090
// HOM
9191
HOM.Load();
9292

9393
// Lights
94-
// pApp->LoadTitle ("Loading lights...");
94+
g_pGamePersistent->SetLoadStageTitle("st_loading_lights");
95+
g_pGamePersistent->LoadTitle();
9596
LoadLights(fs);
9697

9798
// End

src/Layers/xrRenderPC_R2/r2_loader.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void CRender::level_Load(IReader* fs)
2424
IReader* chunk;
2525

2626
// Shaders
27-
// g_pGamePersistent->LoadTitle ("st_loading_shaders");
27+
g_pGamePersistent->SetLoadStageTitle("st_loading_shaders");
2828
g_pGamePersistent->LoadTitle();
2929
{
3030
chunk = fs->open_chunk(fsL_SHADERS);
@@ -54,7 +54,7 @@ void CRender::level_Load(IReader* fs)
5454
if (!GEnv.isDedicatedServer)
5555
{
5656
// VB,IB,SWI
57-
// g_pGamePersistent->LoadTitle("st_loading_geometry");
57+
g_pGamePersistent->SetLoadStageTitle("st_loading_geometry");
5858
g_pGamePersistent->LoadTitle();
5959
{
6060
CStreamReader* geom = FS.rs_open("$level$", "level.geom");
@@ -73,28 +73,29 @@ void CRender::level_Load(IReader* fs)
7373
}
7474

7575
// Visuals
76-
// g_pGamePersistent->LoadTitle("st_loading_spatial_db");
76+
g_pGamePersistent->SetLoadStageTitle("st_loading_spatial_db");
7777
g_pGamePersistent->LoadTitle();
7878
chunk = fs->open_chunk(fsL_VISUALS);
7979
LoadVisuals(chunk);
8080
chunk->close();
8181

8282
// Details
83-
// g_pGamePersistent->LoadTitle("st_loading_details");
83+
g_pGamePersistent->SetLoadStageTitle("st_loading_details");
8484
g_pGamePersistent->LoadTitle();
8585
Details->Load();
8686
}
8787

8888
// Sectors
89-
// g_pGamePersistent->LoadTitle("st_loading_sectors_portals");
89+
g_pGamePersistent->SetLoadStageTitle("st_loading_sectors_portals");
9090
g_pGamePersistent->LoadTitle();
9191
LoadSectors(fs);
9292

9393
// HOM
9494
HOM.Load();
9595

9696
// Lights
97-
// pApp->LoadTitle ("Loading lights...");
97+
g_pGamePersistent->SetLoadStageTitle("st_loading_lights");
98+
g_pGamePersistent->LoadTitle();
9899
LoadLights(fs);
99100

100101
// End

src/Layers/xrRenderPC_R3/r3_loader.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void CRender::level_Load(IReader* fs)
2727
IReader* chunk;
2828

2929
// Shaders
30-
// g_pGamePersistent->LoadTitle ("st_loading_shaders");
30+
g_pGamePersistent->SetLoadStageTitle("st_loading_shaders");
3131
g_pGamePersistent->LoadTitle();
3232
{
3333
chunk = fs->open_chunk(fsL_SHADERS);
@@ -57,7 +57,7 @@ void CRender::level_Load(IReader* fs)
5757
if (!GEnv.isDedicatedServer)
5858
{
5959
// VB,IB,SWI
60-
// g_pGamePersistent->LoadTitle("st_loading_geometry");
60+
g_pGamePersistent->SetLoadStageTitle("st_loading_geometry");
6161
g_pGamePersistent->LoadTitle();
6262
{
6363
CStreamReader* geom = FS.rs_open("$level$", "level.geom");
@@ -76,20 +76,20 @@ void CRender::level_Load(IReader* fs)
7676
}
7777

7878
// Visuals
79-
// g_pGamePersistent->LoadTitle("st_loading_spatial_db");
79+
g_pGamePersistent->SetLoadStageTitle("st_loading_spatial_db");
8080
g_pGamePersistent->LoadTitle();
8181
chunk = fs->open_chunk(fsL_VISUALS);
8282
LoadVisuals(chunk);
8383
chunk->close();
8484

8585
// Details
86-
// g_pGamePersistent->LoadTitle("st_loading_details");
86+
g_pGamePersistent->SetLoadStageTitle("st_loading_details");
8787
g_pGamePersistent->LoadTitle();
8888
Details->Load();
8989
}
9090

9191
// Sectors
92-
// g_pGamePersistent->LoadTitle("st_loading_sectors_portals");
92+
g_pGamePersistent->SetLoadStageTitle("st_loading_sectors_portals");
9393
g_pGamePersistent->LoadTitle();
9494
LoadSectors(fs);
9595

@@ -100,7 +100,8 @@ void CRender::level_Load(IReader* fs)
100100
HOM.Load();
101101

102102
// Lights
103-
// pApp->LoadTitle ("Loading lights...");
103+
g_pGamePersistent->SetLoadStageTitle("st_loading_lights");
104+
g_pGamePersistent->LoadTitle();
104105
LoadLights(fs);
105106

106107
// End

src/Layers/xrRenderPC_R4/r4_loader.cpp

+7-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void CRender::level_Load(IReader* fs)
2727
IReader* chunk;
2828

2929
// Shaders
30-
// g_pGamePersistent->LoadTitle ("st_loading_shaders");
30+
g_pGamePersistent->SetLoadStageTitle("st_loading_shaders");
3131
g_pGamePersistent->LoadTitle();
3232
{
3333
chunk = fs->open_chunk(fsL_SHADERS);
@@ -57,7 +57,7 @@ void CRender::level_Load(IReader* fs)
5757
if (!GEnv.isDedicatedServer)
5858
{
5959
// VB,IB,SWI
60-
// g_pGamePersistent->LoadTitle("st_loading_geometry");
60+
g_pGamePersistent->SetLoadStageTitle("st_loading_geometry");
6161
g_pGamePersistent->LoadTitle();
6262
{
6363
CStreamReader* geom = FS.rs_open("$level$", "level.geom");
@@ -76,20 +76,20 @@ void CRender::level_Load(IReader* fs)
7676
}
7777

7878
// Visuals
79-
// g_pGamePersistent->LoadTitle("st_loading_spatial_db");
79+
g_pGamePersistent->SetLoadStageTitle("st_loading_spatial_db");
8080
g_pGamePersistent->LoadTitle();
8181
chunk = fs->open_chunk(fsL_VISUALS);
8282
LoadVisuals(chunk);
8383
chunk->close();
8484

8585
// Details
86-
// g_pGamePersistent->LoadTitle("st_loading_details");
86+
g_pGamePersistent->SetLoadStageTitle("st_loading_details");
8787
g_pGamePersistent->LoadTitle();
8888
Details->Load();
8989
}
9090

9191
// Sectors
92-
// g_pGamePersistent->LoadTitle("st_loading_sectors_portals");
92+
g_pGamePersistent->SetLoadStageTitle("st_loading_sectors_portals");
9393
g_pGamePersistent->LoadTitle();
9494
LoadSectors(fs);
9595

@@ -100,7 +100,8 @@ void CRender::level_Load(IReader* fs)
100100
HOM.Load();
101101

102102
// Lights
103-
// pApp->LoadTitle ("Loading lights...");
103+
g_pGamePersistent->SetLoadStageTitle("st_loading_lights");
104+
g_pGamePersistent->LoadTitle();
104105
LoadLights(fs);
105106

106107
// End

src/utils/xrSE_Factory/xrSE_Factory.vcxproj

+6-56
Original file line numberDiff line numberDiff line change
@@ -67,68 +67,23 @@
6767
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
6868
<ImportGroup Label="ExtensionSettings">
6969
</ImportGroup>
70-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
71-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
72-
<Import Project="$(SolutionDir)Common.props" />
73-
</ImportGroup>
74-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
75-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
76-
<Import Project="$(SolutionDir)Common.props" />
77-
</ImportGroup>
78-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'" Label="PropertySheets">
79-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
80-
<Import Project="$(SolutionDir)Common.props" />
81-
</ImportGroup>
82-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'" Label="PropertySheets">
83-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
84-
<Import Project="$(SolutionDir)Common.props" />
85-
</ImportGroup>
86-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
87-
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
88-
<Import Project="$(SolutionDir)Common.props" />
89-
</ImportGroup>
90-
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
70+
<ImportGroup Label="PropertySheets">
9171
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
9272
<Import Project="$(SolutionDir)Common.props" />
9373
</ImportGroup>
9474
<PropertyGroup Label="UserMacros" />
9575
<PropertyGroup>
9676
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
9777
</PropertyGroup>
98-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
78+
<ItemDefinitionGroup>
9979
<ClCompile>
10080
<AdditionalIncludeDirectories>$(xrExternals)pugixml\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
10181
<PreprocessorDefinitions>XRSE_FACTORY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
10282
</ClCompile>
10383
</ItemDefinitionGroup>
104-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
84+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
10585
<ClCompile>
106-
<AdditionalIncludeDirectories>$(xrExternals)pugixml\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
107-
<PreprocessorDefinitions>XRSE_FACTORY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
108-
</ClCompile>
109-
</ItemDefinitionGroup>
110-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">
111-
<ClCompile>
112-
<AdditionalIncludeDirectories>$(xrExternals)pugixml\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
113-
<PreprocessorDefinitions>XRSE_FACTORY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
114-
</ClCompile>
115-
</ItemDefinitionGroup>
116-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">
117-
<ClCompile>
118-
<AdditionalIncludeDirectories>$(xrExternals)pugixml\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
119-
<PreprocessorDefinitions>XRSE_FACTORY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
120-
</ClCompile>
121-
</ItemDefinitionGroup>
122-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
123-
<ClCompile>
124-
<AdditionalIncludeDirectories>$(xrExternals)pugixml\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
125-
<PreprocessorDefinitions>XRSE_FACTORY_EXPORTS;LUABIND_NO_ERROR_CHECKING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
126-
</ClCompile>
127-
</ItemDefinitionGroup>
128-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
129-
<ClCompile>
130-
<AdditionalIncludeDirectories>$(xrExternals)pugixml\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
131-
<PreprocessorDefinitions>XRSE_FACTORY_EXPORTS;LUABIND_NO_ERROR_CHECKING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
86+
<PreprocessorDefinitions>LUABIND_NO_ERROR_CHECKING;%(PreprocessorDefinitions)</PreprocessorDefinitions>
13287
</ClCompile>
13388
</ItemDefinitionGroup>
13489
<ItemGroup>
@@ -643,12 +598,7 @@
643598
<ClCompile Include="properties_list_helper_script.cpp" />
644599
<ClCompile Include="script_properties_list_helper.cpp" />
645600
<ClCompile Include="stdafx.cpp">
646-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
647-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
648-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Mixed|Win32'">Create</PrecompiledHeader>
649-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Mixed|x64'">Create</PrecompiledHeader>
650-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
651-
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
601+
<PrecompiledHeader>Create</PrecompiledHeader>
652602
</ClCompile>
653603
<ClCompile Include="xrSE_Factory.cpp" />
654604
<ClCompile Include="xrUIXmlParser.cpp" />
@@ -657,7 +607,7 @@
657607
<ProjectReference Include="$(SolutionDir)xrCore\xrCore.vcxproj">
658608
<Project>{a0f7d1fb-59a7-4717-a7e4-96f37e91998e}</Project>
659609
</ProjectReference>
660-
<ProjectReference Include="..\..\..\Externals\luabind\src\luabind.vcxproj">
610+
<ProjectReference Include="$(xrExternals)luabind.vcxproj">
661611
<Project>{ccd4afae-aa10-42c6-a452-fdee497ccdf1}</Project>
662612
</ProjectReference>
663613
<ProjectReference Include="..\..\..\Externals\luajit\src\luajit.vcxproj">

src/xrEngine/IGame_Level.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool IGame_Level::Load(u32 dwNum)
8787
pLevel = new CInifile(temp);
8888

8989
// Open
90-
// g_pGamePersistent->LoadTitle ("st_opening_stream");
90+
g_pGamePersistent->SetLoadStageTitle("st_opening_stream");
9191
g_pGamePersistent->LoadTitle();
9292
IReader* LL_Stream = FS.r_open("$level$", "level");
9393
IReader& fs = *LL_Stream;
@@ -98,7 +98,7 @@ bool IGame_Level::Load(u32 dwNum)
9898
R_ASSERT2(XRCL_PRODUCTION_VERSION == H.XRLC_version, "Incompatible level version.");
9999

100100
// CForms
101-
// g_pGamePersistent->LoadTitle ("st_loading_cform");
101+
g_pGamePersistent->SetLoadStageTitle("st_loading_cform");
102102
g_pGamePersistent->LoadTitle();
103103
ObjectSpace.Load(build_callback);
104104
// GEnv.Sound->set_geometry_occ ( &Static );

src/xrEngine/IGame_Persistent.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void IGame_Persistent::Disconnect()
135135
void IGame_Persistent::OnGameStart()
136136
{
137137
#ifndef _EDITOR
138-
// LoadTitle("st_prefetching_objects");
138+
SetLoadStageTitle("st_prefetching_objects");
139139
LoadTitle();
140140
if (!strstr(Core.Params, "-noprefetch"))
141141
Prefetch();

src/xrEngine/IGame_Persistent.h

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class ENGINE_API IGame_Persistent :
135135
ICF u32 GameType() { return m_game_params.m_e_game_type; };
136136
virtual void DumpStatistics(class IGameFont& font, class IPerformanceAlert* alert);
137137
virtual void LoadTitle(bool /*change_tip*/ = false, shared_str /*map_name*/ = "") {}
138+
virtual void SetLoadStageTitle(pcstr /*ls_title*/) {}
138139
virtual bool CanBePaused() { return true; }
139140
};
140141

src/xrEngine/x_ray.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ void CApplication::LoadDraw()
304304
Device.End();
305305
}
306306

307+
void CApplication::SetLoadStageTitle(pcstr _ls_title)
308+
{
309+
xr_strcpy(ls_title, _ls_title);
310+
}
311+
307312
void CApplication::LoadTitleInt(LPCSTR str1, LPCSTR str2, LPCSTR str3)
308313
{
309314
xr_strcpy(ls_header, str1);

src/xrEngine/x_ray.h

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class ENGINE_API CApplication : public pureFrame, public IEventReceiver
2020
};
2121

2222
public:
23+
string256 ls_title;
2324
string2048 ls_header;
2425
string2048 ls_tip_number;
2526
string2048 ls_tip;
@@ -65,6 +66,8 @@ class ENGINE_API CApplication : public pureFrame, public IEventReceiver
6566
void LoadSwitch();
6667
void LoadDraw();
6768

69+
void SetLoadStageTitle(pcstr ls_title);
70+
6871
virtual void OnEvent(EVENT E, u64 P1, u64 P2);
6972

7073
// Other

0 commit comments

Comments
 (0)