Skip to content

Commit

Permalink
New legal screen
Browse files Browse the repository at this point in the history
  • Loading branch information
jorio committed Jan 8, 2023
1 parent e8e3961 commit 84018ca
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 52 deletions.
4 changes: 2 additions & 2 deletions CHEATS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ The backtick key is just above Tab on a US keyboard layout.

Also, you can pause the game then press `<` or `>` to adjust the camera to prepare cool screenshots.

## During Pangea splash screen
## During copyright screen

**While the Pangea logo is shown after the game starts up**, you can trigger the following debug features:
**While the copyright screen is shown after the game starts up**, you can trigger the following debug features:

- Hold down F2 and press Space to show the Save and Load screens.

Expand Down
1 change: 1 addition & 0 deletions src/Headers/miscscreens.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ void DoPaused(void);
void ShowLevelIntroScreen(void);
void DoSettingsScreen(void);
void DoAboutScreens(void);
void DoLegalScreen(void);
void DoPangeaLogo(void);
void DoWinScreen(void);
void DoLoseScreen(void);
Expand Down
121 changes: 77 additions & 44 deletions src/Screens/AboutScreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void DoAboutScreens(void)

MakeFadeEvent(true);

for (int i = 0; i < 4; i++)
for (int i = 0; i < 3; i++)
{
#if NOJOYSTICK
// Skip gamepad slide
Expand Down Expand Up @@ -158,14 +158,6 @@ static void MakeAboutScreenObjects(int slideNumber)
MakeCreditPart(-XSPREAD, y, "Musical Direction", "Mike Beckett", "Nuclear Kangaroo Music");
MakeCreditPart(XSPREAD, y, "Enhanced Update", "Iliyas Jorio", "github.com/jorio");

tmd.coord.x = 0;
tmd.coord.y = -110;
tmd.scale *= .66f;
tmd.color = kDimmedColor;
TextMesh_Create(&tmd, "Copyright 1999 Pangea Software, Inc.");
tmd.coord.y -= LH * .66f;
TextMesh_Create(&tmd, "\"Bugdom\" is a registered trademark of Pangea Software, Inc.");

break;
}

Expand Down Expand Up @@ -269,41 +261,6 @@ static void MakeAboutScreenObjects(int slideNumber)
#endif
break;
}

case 3:
{
TextMesh_Create(&tmd, "Info & Updates");

float y = tmd.coord.y - LH*4;

MakeCreditPart(0, y-LH*0, "The Makers of Bugdom:", "www.pangeasoft.net", "");
MakeCreditPart(0, y-LH*4, "Get Updates At:", "https://jorio.itch.io/bugdom", "");

char sdlVersionString[256];
SDL_version compiled;
SDL_version linked;
SDL_VERSION(&compiled);
SDL_GetVersion(&linked);
snprintf(sdlVersionString, sizeof(sdlVersionString), "C:%d.%d.%d, L:%d.%d.%d, %s",
compiled.major, compiled.minor, compiled.patch,
linked.major, linked.minor, linked.patch,
SDL_GetPlatform());

tmd.scale = 0.2f;
tmd.coord.x = -100;
tmd.coord.y = -85;
tmd.color = kDimmedColor;
tmd.align = TEXTMESH_ALIGN_LEFT;
#define MAKE_TECH_TEXT(key, caption) \
tmd.coord.y -= 10; tmd.coord.x = -80; TextMesh_Create(&tmd, key); tmd.coord.x = -30; TextMesh_Create(&tmd, caption);

MAKE_TECH_TEXT("Game ver:", PROJECT_VERSION);
MAKE_TECH_TEXT("Renderer:", (const char*)glGetString(GL_RENDERER));
MAKE_TECH_TEXT("OpenGL:", (const char*)glGetString(GL_VERSION));
MAKE_TECH_TEXT("SDL:", sdlVersionString);
#undef MAKE_TECH_TEXT
break;
}
}
}

Expand All @@ -316,3 +273,79 @@ static void AboutScreenDrawStuff(const QD3DSetupOutputType *setupInfo)
QD3D_DrawParticles(setupInfo);
}


#pragma mark -

/******************* LEGAL SPLASH SCREEN ********************/

static void MakeLegalScreenObjects(void)
{
const float LH = 13;

TextMeshDef tmd;
TextMesh_FillDef(&tmd);
tmd.align = TEXTMESH_ALIGN_CENTER;
tmd.slot = kAboutScreenObjNodeSlot;
tmd.coord.y = 66;
tmd.withShadow = false;
tmd.color = kNameColor;
tmd.scale = 0.3f;
//tmd.coord.y -= LH * 4;

TextMesh_Create(&tmd, "Bugdom " PROJECT_VERSION);

tmd.scale = 0.2f;
tmd.coord.y = LH/2;
TextMesh_Create(&tmd, "pangeasoft.net/bug");
tmd.coord.y -= LH;
TextMesh_Create(&tmd, "jorio.itch.io/bugdom");

tmd.coord.y = -66;
tmd.scale *= .66f;
tmd.color = kDimmedColor;
TextMesh_Create(&tmd, "Original game: \251 1999 Pangea Software, Inc. Modern version: \251 2023 Iliyas Jorio.");
tmd.coord.y -= LH * .66f;
TextMesh_Create(&tmd, "\223Bugdom\224 is a registered trademark of Pangea Software, Inc.");
}

void DoLegalScreen(void)
{
/*********/
/* SETUP */
/*********/

SetupUIStuff(kUIBackground_Black);

NukeObjectsInSlot(kAboutScreenObjNodeSlot); // nuke text from previous slide
MakeLegalScreenObjects();

QD3D_CalcFramesPerSecond();

MakeFadeEvent(true);
FlushMouseButtonPress();

/**************/
/* PROCESS IT */
/**************/

float timeout = 8.0f;

while (timeout > 0)
{
UpdateInput();
MoveObjects();
QD3D_MoveParticles();
QD3D_DrawScene(gGameViewInfoPtr, AboutScreenDrawStuff);
QD3D_CalcFramesPerSecond();
DoSDLMaintenance();

if (GetSkipScreenInput())
break;

timeout -= gFramesPerSecondFrac;
}

/* CLEANUP */

CleanupUIStuff();
}
13 changes: 8 additions & 5 deletions src/System/Main.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ unsigned long someLong;
TryOpenController(true);

ToolBoxInit();
SDL_ShowCursor(0);

/* INIT SOME OF MY STUFF */

Expand All @@ -836,17 +835,21 @@ unsigned long someLong;
GetDateTime ((unsigned long *)(&someLong)); // init random seed
SetMyRandomSeed(someLong);

#if !OSXPPC
WarpMouseToCenter(); // prime cursor position
#endif


/* DO INTRO */

Pomme_FlushPtrTracking(false);

DoPangeaLogo();
DoLegalScreen();

SDL_ShowCursor(0);
#if !OSXPPC
WarpMouseToCenter(); // prime cursor position
#endif

CheckDebugShortcutKeysOnBoot();
DoPangeaLogo();


/* MAIN LOOP */
Expand Down
3 changes: 2 additions & 1 deletion src/System/SDLMaintenance.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void UpdateDebugStats(void)
snprintf(
gDebugTextBuffer, sizeof(gDebugTextBuffer),
"fps: %d\ntris: %d\nmeshes: %d+%d\ntiles: %ld/%ld%s\n\nx: %d\nz: %d\n\n%s\n\n\n\n\n\n\n\n\n\n\n"
"Debug mode %d (%s)\nBugdom %s\n%s @ %dx%d",
"Debug mode %d (%s)\nBugdom %s\nOpenGL %s, %s @ %dx%d",
(int)roundf(fps),
gRenderStats.triangles,
gRenderStats.meshesPass1,
Expand All @@ -49,6 +49,7 @@ static void UpdateDebugStats(void)
gDebugMode,
debugModeName,
PROJECT_VERSION,
glGetString(GL_VERSION),
glGetString(GL_RENDERER),
gWindowWidth,
gWindowHeight
Expand Down

0 comments on commit 84018ca

Please sign in to comment.