mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Updated briefing screen to show objectives and mission name, with a temp background.
This commit is contained in:
+2
-2
@@ -104,7 +104,7 @@ set(src_win32lib
|
||||
./redalert/win32lib/wwstd.h
|
||||
./redalert/win32lib/ww_win.h
|
||||
./redalert/win32lib/_diptabl.cpp
|
||||
"redalert/ffmpegmovie.cpp")
|
||||
"redalert/ffmpegmovie.cpp" "redalert/briefing.cpp")
|
||||
|
||||
#Red Alert files
|
||||
set(src_redalert
|
||||
@@ -730,7 +730,7 @@ if (UNIX)
|
||||
add_definitions(-D RA_AF -DCHEAT_KEYS -DIMGUI_IMPL_OPENGL_LOADER_GLEW -DSCENARIO_EDITOR -DTRUE_FALSE_DEFINED -DENGLISH -D_USRDLL -DREDALERT_EXPORTS)
|
||||
endif(UNIX)
|
||||
|
||||
add_executable(RedAlert ${src_io} ${src_win32lib} ${src_redalert} ${src_external} "redalert/light.cpp")
|
||||
add_executable(RedAlert ${src_io} ${src_win32lib} ${src_redalert} ${src_external} "redalert/light.cpp" "redalert/briefing.cpp")
|
||||
|
||||
if (MSVC)
|
||||
set_target_properties(RedAlert PROPERTIES OUTPUT_NAME "RedAlert" LINK_FLAGS "/PDB:\"RedAlert.pdb\" /SUBSYSTEM:WINDOWS" RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/../" )
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// briefing.cpp
|
||||
//
|
||||
|
||||
#include "function.h"
|
||||
#include "image.h"
|
||||
|
||||
void RenderBriefing(void) {
|
||||
Image_t* worldMapImage = Image_LoadImage("ui/briefing/generic_worldmap.png");
|
||||
bool exitBreifing = false;
|
||||
while (!exitBreifing) {
|
||||
// Check for any new SDL events.
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event)) {
|
||||
if (event.type == SDL_KEYDOWN) {
|
||||
//delete raw_image_buffer;
|
||||
exitBreifing = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UserInput.Process_Input();
|
||||
|
||||
GL_RenderImage(worldMapImage, 0, 0, ScreenWidth, ScreenHeight);
|
||||
GL_DrawText(5, 32.0f, 255.0f, 255.0f, 255.0f, 20, 0, Scen.Description);
|
||||
GL_DrawText(5, 20.0f, 255.0f, 255.0f, 255.0f, 60, 30, Scen.BriefingText);
|
||||
GL_DrawText(5, 20, 255.0f, 255.0f, 255.0f, (ScreenWidth / 2) - 100, ScreenHeight - 40, "Press any key to continue");
|
||||
Device_Present();
|
||||
}
|
||||
}
|
||||
@@ -1199,6 +1199,8 @@ struct Image_t;
|
||||
void Sys_SetOverlayImage(Image_t* image);
|
||||
int Sys_Milliseconds(void);
|
||||
|
||||
void RenderBriefing(void);
|
||||
|
||||
extern bool g_inMainMenu;
|
||||
extern KeyNumType g_globalKeyNumType;
|
||||
extern int g_globalKeyFlags;
|
||||
|
||||
@@ -151,6 +151,14 @@ void GL_DrawText(int color, int x, int y, char* text) {
|
||||
ImGui::GetBackgroundDrawList()->AddText(pos, ImGui::ColorConvertFloat4ToU32(ImVec4(r, g, b, 1)), text);
|
||||
}
|
||||
|
||||
void GL_DrawText(int color, float fontsize, float r, float g, float b, int x, int y, char* text) {
|
||||
ImVec2 pos(x, y);
|
||||
float _r = r / 255.0f;
|
||||
float _g = r / 255.0f;
|
||||
float _b = r / 255.0f;
|
||||
ImGui::GetBackgroundDrawList()->AddText(NULL, fontsize, pos, ImGui::ColorConvertFloat4ToU32(ImVec4(_r, _g, _b, 1)), text);
|
||||
}
|
||||
|
||||
void GL_DrawForegroundText(int color, int x, int y, char* text) {
|
||||
ImVec2 pos(x, y);
|
||||
if (color == 0 || color == 160) { // This is a hack!
|
||||
|
||||
@@ -22,4 +22,5 @@ void GL_ForceForegroundRender(bool force);
|
||||
void GL_DrawForegroundText(int color, int x, int y, char* text);
|
||||
void GL_SetColor(float r, float g, float b);
|
||||
void GL_SetRenderTexture(RenderTexture* renderTexture);
|
||||
void GL_EnableBlend(GLBlendType blendType);
|
||||
void GL_EnableBlend(GLBlendType blendType);
|
||||
void GL_DrawText(int color, float fontsize, float r, float g, float b, int x, int y, char* text);
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "tcpip.h"
|
||||
#include "ccdde.h"
|
||||
#include "audiomix.h"
|
||||
#include "image.h"
|
||||
|
||||
extern bool SpawnedFromWChat;
|
||||
#endif
|
||||
@@ -402,26 +403,7 @@ bool Start_Scenario(char * name, bool briefing)
|
||||
*/
|
||||
if (!Debug_SkipBriefing)
|
||||
{
|
||||
char buffer[25];
|
||||
if (Scen.BriefMovie != VQ_NONE) {
|
||||
sprintf(buffer, "%s.VQA", VQName[Scen.BriefMovie]);
|
||||
}
|
||||
if (Session.Type == GAME_NORMAL && (Scen.BriefMovie == VQ_NONE || !CCFileClass(buffer).Is_Available())) {
|
||||
/*
|
||||
** Make sure the mouse is visible before showing the restatement.
|
||||
*/
|
||||
while (Get_Mouse_State()) {
|
||||
Show_Mouse();
|
||||
}
|
||||
Restate_Mission(Scen.ScenarioName, TXT_OK, TXT_NONE);
|
||||
}
|
||||
|
||||
if (briefing) {
|
||||
Hide_Mouse();
|
||||
VisiblePage.Clear();
|
||||
Show_Mouse();
|
||||
Play_Movie(Scen.ActionMovie, Scen.TransitTheme);
|
||||
}
|
||||
RenderBriefing();
|
||||
}
|
||||
|
||||
if (Scen.TransitTheme == THEME_NONE) {
|
||||
|
||||
@@ -2,7 +2,7 @@ require("_Global")
|
||||
|
||||
function map_briefing()
|
||||
PlayMovie("SOVIET1")
|
||||
SetBriefingText("Welcome Comrade General! Here in Alaska we will be begin our glorous conquest!")
|
||||
SetBriefingText("Objective 1: Capture the allied communication center.\nObjective 2: Ensure your engineers dont die.\nObjective 3: Ensure your radar domes survive.\n")
|
||||
end
|
||||
|
||||
function map_start()
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 864 KiB |
Reference in New Issue
Block a user