summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-06-29 15:55:19 +0200
committereray orçunus <erayorcunus@gmail.com>2019-06-29 15:55:19 +0200
commit0974447f585a457ea7d68187db28bcec5aa269e2 (patch)
tree6f7cf38dc4ea9a17b1bc6125fcc69758cf535e34 /src/main.cpp
parentMerge branch 'master' of git://github.com/GTAmodding/re3 into erorcun (diff)
parentfix (diff)
downloadre3-0974447f585a457ea7d68187db28bcec5aa269e2.tar
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.gz
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.bz2
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.lz
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.xz
re3-0974447f585a457ea7d68187db28bcec5aa269e2.tar.zst
re3-0974447f585a457ea7d68187db28bcec5aa269e2.zip
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d1ffbe6b..c8af9ae0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -91,6 +91,13 @@ void PrintGameVersion();
RwRGBA gColourTop;
void
+InitialiseGame(void)
+{
+ LoadingScreen(nil, nil, "loadsc0");
+ CGame::Initialise("DATA\\GTA3.DAT");
+}
+
+void
Idle(void *arg)
{
CTimer::Update();
@@ -591,6 +598,61 @@ ResetLoadingScreenBar(void)
NumberOfChunksLoaded = 0.0f;
}
+void
+LoadingIslandScreen(const char *levelName)
+{
+ CSprite2d *splash;
+ wchar *name;
+ char str[100];
+ wchar wstr[80];
+ CRGBA col;
+
+ splash = LoadSplash(nil);
+ name = TheText.Get(levelName);
+ if(!DoRWStuffStartOfFrame(0, 0, 0, 0, 0, 0, 255))
+ return;
+
+ CSprite2d::SetRecipNearClip();
+ CSprite2d::InitPerFrame();
+ CFont::InitPerFrame();
+ DefinedState();
+ col = CRGBA(255, 255, 255, 255);
+ splash->Draw(CRect(0.0f, 0.0f, SCREENW, SCREENH), col, col, col, col);
+ CFont::SetBackgroundOff();
+ CFont::SetScale(1.5f, 1.5f);
+ CFont::SetPropOn();
+ CFont::SetRightJustifyOn();
+ CFont::SetRightJustifyWrap(150.0f);
+ CFont::SetFontStyle(FONT_HEADING);
+ sprintf(str, "WELCOME TO");
+ AsciiToUnicode(str, wstr);
+ CFont::SetDropColor(CRGBA(0, 0, 0, 255));
+ CFont::SetDropShadowPosition(3);
+ CFont::SetColor(CRGBA(243, 237, 71, 255));
+ CFont::SetScale(SCREEN_STRETCH_X(1.2f), SCREEN_STRETCH_Y(1.2f));
+ CFont::PrintString(SCREENW - 20, SCREEN_STRETCH_FROM_BOTTOM(110.0f), TheText.Get("WELCOME"));
+ TextCopy(wstr, name);
+ TheText.UpperCase(wstr);
+ CFont::SetColor(CRGBA(243, 237, 71, 255));
+ CFont::SetScale(SCREEN_STRETCH_X(1.2f), SCREEN_STRETCH_Y(1.2f));
+ CFont::PrintString(SCREENW-20, SCREEN_STRETCH_FROM_BOTTOM(80.0f), wstr);
+ CFont::DrawFonts();
+ DoRWStuffEndOfFrame();
+}
+
+char*
+GetLevelSplashScreen(int level)
+{
+ static char *splashScreens[4] = {
+ nil,
+ "splash1",
+ "splash2",
+ "splash3",
+ };
+
+ return splashScreens[level];
+}
+
char*
GetRandomSplashScreen(void)
{