Skip to content

Commit

Permalink
Properly declare ShowStaticScreen()
Browse files Browse the repository at this point in the history
  • Loading branch information
winterheart committed Oct 30, 2024
1 parent 58351d8 commit 107061f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
2 changes: 0 additions & 2 deletions Descent3/credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@ static bool Credits_LoadCredits(const char *filename) {
return true;
}

extern void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_time = 0.0f);

#define CREDIT_PIXELS_PER_SECOND 22

void Credits_Display() {
Expand Down
13 changes: 3 additions & 10 deletions Descent3/descent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@
* $NoKeywords: $
*/

#include <algorithm>
#include <cstdlib>
#include <filesystem>
#include <vector>
Expand All @@ -408,6 +407,7 @@
#include "args.h"
#include "multi_dll_mgr.h"
#include "localization.h"
#include "uisys.h"

// ---------------------------------------------------------------------------
// Variables
Expand All @@ -434,10 +434,6 @@ std::filesystem::path Descent3_temp_directory; // temp directory to put temp fil
// ---------------------------------------------------------------------------
// #define BETA

#if (defined(OEM) || defined(DEMO))
void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_time = 0.0f);
#endif

char Proxy_server[200] = "";
int16_t Proxy_port = 80;

Expand Down Expand Up @@ -597,10 +593,8 @@ void MainLoop() {
SetScreenMode(SM_NULL);
}

#if (defined(OEM) || defined(DEMO) || defined(RELEASE))
// Shows a fullscreen static bitmap
void ShowStaticScreen(char *bitmap_filename, bool timed, float delay_time) {
extern void ui_SetScreenMode(int w, int h);
void ShowStaticScreen(const char *bitmap_filename, bool timed, float delay_time) {
chunked_bitmap splash_bm;

// do splash screen on release
Expand All @@ -615,7 +609,7 @@ void ShowStaticScreen(char *bitmap_filename, bool timed, float delay_time) {

bm_FreeBitmap(bm_handle);
float start_time = timer_GetTime();
while (1) {
while (true) {
StartFrame();

rend_DrawChunkedBitmap(&splash_bm, 0, 0, 255);
Expand Down Expand Up @@ -646,7 +640,6 @@ void ShowStaticScreen(char *bitmap_filename, bool timed, float delay_time) {

ui_SetScreenMode(Max_window_w, Max_window_h);
}
#endif

// ---------------------------------------------------------------------------
// Accessor functions
Expand Down
3 changes: 3 additions & 0 deletions Descent3/descent.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ void D3DeferHandler(bool is_active);
void SetFunctionMode(function_mode mode);
function_mode GetFunctionMode();

// Shows a fullscreen static bitmap
void ShowStaticScreen(const char *bitmap_filename, bool timed = false, float delay_time = 0.0f);

#ifndef RELEASE
// this is called when you hit a debug break!
void D3DebugStopHandler();
Expand Down
3 changes: 0 additions & 3 deletions Descent3/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1722,9 +1722,6 @@ void InitMessage(const char *c, float progress) {
}

//////////////////////////////////////////////////////////////////////////////
#if (defined(OEM) || defined(DEMO) || defined(RELEASE))
void ShowStaticScreen(char *bitmap_filename, bool timed = false, float delay_time = 0.0f);
#endif

void IntroScreen() {
// #if (defined(OEM) || defined(DEMO) )
Expand Down

0 comments on commit 107061f

Please sign in to comment.