summaryrefslogtreecommitdiffstats
path: root/src/core/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/main.cpp')
-rw-r--r--src/core/main.cpp115
1 files changed, 58 insertions, 57 deletions
diff --git a/src/core/main.cpp b/src/core/main.cpp
index e84c6eeb..d0f59f54 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -81,12 +81,22 @@
GlobalScene Scene;
-uint8 work_buff[55000];
+uint8 work_buff[102400];
char gString[256];
char gString2[512];
wchar gUString[256];
wchar gUString2[256];
+// leeds
+bool gMakeResources = true;
+bool gUseChunkFiles = false;
+bool gSecondExportPass;
+bool gUseModelResources;
+bool gUseResources;
+bool gNASTY_NASTY_MEM_SHUTDOWN_HACK; // rather unused
+bool gbPreviewCity; // don't do worldstream-style rendering but traditional method
+bool gMultiplayerSuperBrakeOnPause = true;
+
float FramesPerSecond = 30.0f;
bool gbPrintShite = false;
@@ -98,7 +108,7 @@ bool gbShowTimebars;
bool gbDrawVersionText; // Our addition, we think it was always enabled on !MASTER builds
#endif
#ifdef NO_MOVIES
-bool gbNoMovies;
+bool gbNoMovies = true;
#endif
volatile int32 frameCount;
@@ -108,7 +118,7 @@ RwRGBA gColourTop;
bool gameAlreadyInitialised;
float NumberOfChunksLoaded;
-#define TOTALNUMCHUNKS 95.0f
+#define TOTALNUMCHUNKS 52.0f
bool g_SlowMode = false;
char version_name[64];
@@ -135,7 +145,7 @@ bool gbPrintMemoryUsage;
#endif
#ifdef NEW_RENDERER
-bool gbNewRenderer;
+bool gbNewRenderer = true;
#endif
#ifdef FIX_BUGS
// need to clear stencil for mblur fx. no idea why it works in the original game
@@ -606,11 +616,11 @@ GetRandomSplashScreen(void)
static char splashName[128];
static int splashIndex[12] = {
1, 2,
- 3, 4,
- 5, 11,
- 6, 8,
- 9, 10,
- 7, 12
+ 3, 0,
+ 1, 2,
+ 3, 0,
+ 1, 2,
+ 3, 0
};
index = splashIndex[2*index2 + CGeneral::GetRandomNumberInRange(0, 2)];
@@ -624,11 +634,12 @@ GetRandomSplashScreen(void)
Const char*
GetLevelSplashScreen(int level)
{
- static Const char *splashScreens[4] = {
+ static Const char *splashScreens[5] = {
nil,
"splash1",
"splash2",
"splash3",
+ "loadsc0",
};
return splashScreens[level];
@@ -640,6 +651,7 @@ ResetLoadingScreenBar()
NumberOfChunksLoaded = 0.0f;
}
+//--LCS: not the real thing
void
LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
{
@@ -651,7 +663,7 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
#endif
#ifndef RANDOMSPLASH
- splashscreen = "LOADSC0";
+ splashscreen = "SCEELEE";
#endif
splash = LoadSplash(splashscreen);
@@ -673,24 +685,27 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
NumberOfChunksLoaded += 1;
#ifndef RANDOMSPLASH
+ // this looks nice
float hpos = SCREEN_SCALE_X(40);
float length = SCREEN_WIDTH - SCREEN_SCALE_X(80);
- float top = SCREEN_HEIGHT - SCREEN_SCALE_Y(14);
- float bottom = top + SCREEN_SCALE_Y(5);
+ float top = SCREEN_HEIGHT - SCREEN_SCALE_Y(30);
+ float bottom = top + SCREEN_SCALE_Y(8);
#else
- float hpos = SCREEN_STRETCH_X(40);
- float length = SCREEN_STRETCH_X(440);
- // this is rather weird
- float top = SCREEN_STRETCH_Y(407.4f - 7.0f/3.0f);
- float bottom = SCREEN_STRETCH_Y(407.4f + 7.0f/3.0f);
+ // should correspond to PS2 position
+ float hpos = SCREEN_STRETCH_X(44);
+ float length = SCREEN_STRETCH_X(176);
+ float top = SCREEN_STRETCH_Y(420);
+ float bottom = top + SCREEN_STRETCH_Y(8);
#endif
- CSprite2d::DrawRect(CRect(hpos-1.0f, top-1.0f, hpos+length+1.0f, bottom+1.0f), CRGBA(40, 53, 68, 255));
+ CSprite2d::DrawRect(CRect(hpos+4.0f, top+6.0f, hpos+length+4.0f, bottom+6.0f), CRGBA(0, 0, 0, 200));
- CSprite2d::DrawRect(CRect(hpos, top, hpos+length, bottom), CRGBA(155, 50, 125, 255));
+ CSprite2d::DrawRect(CRect(hpos, top, hpos+length, bottom), CRGBA(0, 0, 0, 255));
+
+ CSprite2d::DrawRect(CRect(hpos+1.0f, top+1.0f, hpos+length-1.0f, bottom-1.0f), CRGBA(99, 99, 99, 255));
length *= NumberOfChunksLoaded/TOTALNUMCHUNKS;
- CSprite2d::DrawRect(CRect(hpos, top, hpos+length, bottom), CRGBA(255, 150, 225, 255));
+ CSprite2d::DrawRect(CRect(hpos+1.0f, top+1.0f, hpos+length-1.0f, bottom-1.0f), CRGBA(126, 15, 0, 255));
// this is done by the game but is unused
CFont::SetBackgroundOff();
@@ -705,7 +720,7 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
// my attempt
static wchar tmpstr[80];
float yscale = SCREEN_SCALE_Y(0.9f);
- top -= 45*yscale;
+ top = bottom+5*yscale;
CFont::SetScale(SCREEN_SCALE_X(0.75f), yscale);
CFont::SetPropOn();
CFont::SetRightJustifyOff();
@@ -726,12 +741,13 @@ LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
}
}
+//--LCS: slightly fixed
void
LoadingIslandScreen(const char *levelName)
{
CSprite2d *splash;
- splash = LoadSplash(nil);
+ splash = LoadSplash(GetLevelSplashScreen(CGame::currLevel));
if(!DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255))
return;
@@ -1214,7 +1230,6 @@ DisplayGameDebugText()
#ifdef NEW_RENDERER
bool gbRenderRoads = true;
bool gbRenderEverythingBarRoads = true;
-bool gbRenderFadingInUnderwaterEntities = true;
bool gbRenderFadingInEntities = true;
bool gbRenderWater = true;
bool gbRenderBoats = true;
@@ -1230,10 +1245,11 @@ MattRenderScene(void)
/// CWorld::AdvanceCurrentScanCode();
// CMattRenderer::ResetRenderStates
/// CRenderer::ClearForFrame(); // before ConstructRenderList
- // CClock::CalcEnvMapTimeMultiplicator
+ CClock::CalcEnvMapTimeMultiplicator();
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
- CWaterLevel::RenderWater(); // actually CMattRenderer::RenderWater
- // CClock::ms_EnvMapTimeMultiplicator = 1.0f;
+if(gbRenderWater)
+ CRenderer::RenderWater(); // actually CMattRenderer::RenderWater
+ CClock::ms_EnvMapTimeMultiplicator = 1.0f;
// cWorldStream::ClearDynamics
/// CRenderer::ConstructRenderList(); // before PreRender
if(gbRenderWorld0)
@@ -1246,22 +1262,14 @@ if(gbRenderWorld1)
if(gbRenderRoads)
CRenderer::RenderRoads();
- CRenderer::RenderPeds();
-
- // not sure where to put these since LCS has no underwater entities
-if(gbRenderBoats)
- CRenderer::RenderBoats();
-if(gbRenderFadingInUnderwaterEntities)
- CRenderer::RenderFadingInUnderwaterEntities();
RwRenderStateSet(rwRENDERSTATECULLMODE, (void*)rwCULLMODECULLNONE);
-if(gbRenderWater)
- CRenderer::RenderTransparentWater();
if(gbRenderEverythingBarRoads)
CRenderer::RenderEverythingBarRoads();
- // seam fixer
- // moved this:
- // CRenderer::RenderFadingInEntities();
+ // TODO: seam fixer
+ // these aren't very transparent. just objects
+if(gbRenderFadingInEntities)
+ CRenderer::RenderFadingInEntities();
}
void
@@ -1274,7 +1282,8 @@ RenderScene_new(void)
MattRenderScene();
DefinedState();
// CMattRenderer::ResetRenderStates
- // moved CRenderer::RenderBoats to before transparent water
+if(gbRenderBoats)
+ CRenderer::RenderBoats();
POP_RENDERGROUP();
}
@@ -1284,13 +1293,12 @@ void
RenderEffects_new(void)
{
PUSH_RENDERGROUP("RenderEffects_new");
-/* // stupid to do this before the whole world is drawn!
- CShadows::RenderStaticShadows();
- // CRenderer::GenerateEnvironmentMap
- CShadows::RenderStoredShadows();
- CSkidmarks::Render();
- CRubbish::Render();
-*/
+ // stupid to do this before the whole world is drawn!
+// CShadows::RenderStaticShadows();
+ CRenderer::GenerateEnvironmentMap();
+// CShadows::RenderStoredShadows();
+// CSkidmarks::Render();
+// CRubbish::Render();
// these aren't really effects
DefinedState();
@@ -1308,9 +1316,6 @@ if(gbRenderWorld2)
if(gbRenderVehicles)
CRenderer::RenderVehicles();
}
- // better render these after transparent world
-if(gbRenderFadingInEntities)
- CRenderer::RenderFadingInEntities();
// actual effects here
@@ -1373,7 +1378,7 @@ void
RenderDebugShit(void)
{
PUSH_RENDERGROUP("RenderDebugShit");
- CTheScripts::RenderTheScriptDebugLines();
+ //CTheScripts::RenderTheScriptDebugLines();
#ifndef FINAL
if(gbShowCollisionLines)
CRenderer::RenderCollisionLines();
@@ -1577,12 +1582,8 @@ Idle(void *arg)
#ifdef PC_WATER
CWaterLevel::PreCalcWaterGeometry();
#endif
-#ifdef NEW_RENDERER
- if(gbNewRenderer){
- CWorld::AdvanceCurrentScanCode(); // don't think this is even necessary
- CRenderer::ClearForFrame();
- }
-#endif
+ CWorld::AdvanceCurrentScanCode();
+ CRenderer::ClearForFrame();
CRenderer::ConstructRenderList();
tbEndTimer("CnstrRenderList");