Skip to content

Commit

Permalink
Merge pull request #601 from winterheart/dd_video_cleanup
Browse files Browse the repository at this point in the history
Remove dd_video module
  • Loading branch information
Lgt2x authored Sep 23, 2024
2 parents 39e128c + eb0f6a2 commit 515b8b5
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 276 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ endif()
add_subdirectory(linux)

add_subdirectory(ddio)
add_subdirectory(dd_video)
add_subdirectory(fix)
add_subdirectory(logger)
add_subdirectory(manage)
Expand Down
1 change: 0 additions & 1 deletion Descent3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ target_link_libraries(Descent3 PRIVATE
AudioEncode
bitmap
cfile
dd_video
ddebug
ddio
fix
Expand Down
2 changes: 0 additions & 2 deletions Descent3/d3movie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@
#include "bitmap.h"
#include "d3movie.h"
#include "ddio.h"
#include "ddvid.h"
#include "game.h"
#include "gamefont.h"
#include "grtext.h"
#include "log.h"
#include "mem.h"
#include "mvelib.h"
#include "pserror.h"
#include "renderer.h"

namespace {
Expand Down
12 changes: 0 additions & 12 deletions Descent3/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,6 @@
#include <cstring>

#include "game.h"
#include "ddvid.h"
#include "ddio.h"
#include "pserror.h"
#include "descent.h"
Expand Down Expand Up @@ -1024,15 +1023,6 @@ void SetScreenMode(int sm, bool force_res_change) {
rend_width = rs.screen_width;
rend_height = rs.screen_height;

// sets up the screen resolution for the system
if (!UseHardware) {
ddvid_SetVideoMode(rend_width, rend_height, BPP_16, true);
} else {
if (PreferredRenderer == RENDERER_OPENGL) {
ddvid_SetVideoMode(rend_width, rend_height, BPP_16, false);
}
}

// chose font.
SelectHUDFont(rend_width);

Expand Down Expand Up @@ -1099,8 +1089,6 @@ void SetScreenMode(int sm, bool force_res_change) {
// the editor window, the screen would belong to the editor window.
tLnxAppInfo appinfo;
Descent->get_info(&appinfo);
// LGT - Disabled: not using ddvid
// ddvid_SetVideoHandle(hGameWnd);
#endif
}

Expand Down
7 changes: 0 additions & 7 deletions Descent3/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1590,11 +1590,6 @@ void InitGraphics(bool editor) {
#else
strcpy(App_ddvid_subsystem, "GDIX");

if (!Dedicated_server) {
if (!ddvid_Init(Descent, App_ddvid_subsystem))
Error("Graphics initialization failed.\n");
}

INIT_MESSAGE("Loading fonts.");
LoadAllFonts();
#endif
Expand Down Expand Up @@ -2105,7 +2100,6 @@ void ShutdownD3() {
Init_old_screen_mode = GetScreenMode();
Init_old_ui_callback = GetUICallback();
SetScreenMode(SM_NULL);
ddvid_Close();

// shutdown IO
ddio_Close();
Expand Down Expand Up @@ -2136,7 +2130,6 @@ void RestartD3() {
}

// startup screen.
ddvid_Init(Descent, App_ddvid_subsystem);
ddio_KeyFlush();
SetScreenMode(Init_old_screen_mode);
SetUICallback(Init_old_ui_callback);
Expand Down
13 changes: 0 additions & 13 deletions dd_video/CMakeLists.txt

This file was deleted.

153 changes: 0 additions & 153 deletions dd_video/video_lnx.cpp

This file was deleted.

1 change: 0 additions & 1 deletion editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,6 @@ target_link_libraries(Descent3Editor
bitmap
cfile

dd_video
ddio
ddebug
libmve
Expand Down
20 changes: 0 additions & 20 deletions editor/gameeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@
#include "ObjScript.h"
#include "controls.h"
#include "3d.h"
#include "ddvid.h"
#include "gamefont.h"
#include "newui.h"
#include "pilot.h"
Expand Down Expand Up @@ -636,9 +635,6 @@ void GameToEditor(bool set_viewer_from_player) {
// Reset previous working directory
ddio_SetWorkingDir(Editor_dir);

// close down video system only!
ddvid_Close();

ASSERT((OBJECT_OUTSIDE(Viewer_object) != 0) == (Editor_view_mode == VM_TERRAIN));

SlewStop(Viewer_object);
Expand Down Expand Up @@ -819,10 +815,6 @@ void EditorToGame() {
Saved_editor_app->defer();
Descent->defer();

// Initialize graphics and sound this must be done after initialization of new window and
// after deferring to OS.
if (!ddvid_Init(Descent, subsystem))
Error("Graphics initialization failed.\n");
} else if (D3EditState.fullscreen_debug_state) {
CMenu *menu = theApp.main_frame->GetMenu();

Expand All @@ -840,11 +832,6 @@ void EditorToGame() {
Saved_editor_app->defer();
Descent->defer();

// Initialize graphics and sound this must be done after initialization of new window and
// after deferring to OS.
if (!ddvid_Init(Saved_editor_app, subsystem))
Error("Graphics initialization failed.\n");

// force application to think it's active.
SetActiveWindow((HWND)hGameWnd);
// Descent->activate();
Expand All @@ -859,10 +846,6 @@ void EditorToGame() {
SetWindowLong(theApp.main_frame->m_hWnd, GWL_STYLE, EditorWndStyle & ~(WS_CAPTION | WS_THICKFRAME | WS_BORDER));
SetClassLong(theApp.main_frame->m_hWnd, GCL_HBRBACKGROUND, (DWORD)GetStockObject(HOLLOW_BRUSH));

// Initialize graphics and sound this must be done after initialization of new window and
// after deferring to OS.
if (!ddvid_Init(Descent, subsystem))
Error("Graphics initialization failed.\n");
}

// Initialize IO System for child window
Expand All @@ -872,9 +855,6 @@ void EditorToGame() {
// Init force feedback
ForceInit();

// Create game screen and clear it.
ddvid_SetVideoHandle(hGameWnd);

// Initialize everything else.
InitEditGameSystems();

Expand Down
2 changes: 1 addition & 1 deletion grtext/grtext.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

#include <cstdint>

#include "ddvid.h"
#include "grdefs.h"

#define GRTEXT_BUFLEN 16384
#define GRTEXT_FORMAT_CHAR 0x2
Expand Down
1 change: 0 additions & 1 deletion legacy/renderer/renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "ddvid.h"
#include "pstypes.h"
#include "mono.h"
#include "pserror.h"
Expand Down
Loading

0 comments on commit 515b8b5

Please sign in to comment.