remove direct3d stuff aswell as minigl stuff

This commit is contained in:
alufolie91 committed 2023-10-03 02:38:09 +02:00
1 parent 90623359c7
commit 2ce9803257
13 files changed
+6 -417

No files matched your search

+2 -43
View File
@@ -9,11 +9,10 @@
# See the 'LICENSE' file for more details.
#
# -DLINUX -> use for the GNU/Linux specific
# -D_WINDOWS -> use for the Win32/DirectX specific
# -DHAVE_SDL -> use for the SDL interface
#
# Sets:
# Compile the DirectX/Mingw version with 'make MINGW=1'
# Compile the Mingw version with 'make MINGW=1'
# Compile the SDL/Mingw version with 'make MINGW=1 SDL=1'
# Compile the SDL/Linux version with 'make LINUX=1'
# Compile the SDL/Solaris version with 'make SOLARIS=1'
@@ -643,7 +642,7 @@ else
dll : opengl_dll
endif
ifdef MINGW
all_dll: opengl_dll minigl_dll ds3d_dll fmod_dll openal_dll
all_dll: opengl_dll ds3d_dll fmod_dll openal_dll
opengl_dll: $(BIN)/r_opengl.dll
$(BIN)/r_opengl.dll: $(OBJDIR)/ogl_win.o $(OBJDIR)/r_opengl.o
@@ -654,12 +653,6 @@ ifndef NOUPX
-$(UPX) $(UPX_OPTS) $@
endif
minigl_dll: $(BIN)/r_minigl.dll
$(BIN)/r_minigl.dll: $(OBJDIR)/r_minigl.o
-$(MKDIR) $(BIN)
@echo Linking R_MiniGL.dll...
$(CC) --shared $^ -o $@ -g -Wl,--add-stdcall-alias -lgdi32
ds3d_dll: $(BIN)/s_ds3d.dll
$(BIN)/s_ds3d.dll: $(OBJDIR)/s_ds3d.o
@echo Linking S_DS3d.dll...
@@ -774,40 +767,6 @@ $(OBJDIR)/%.o: %.s
$(OBJDIR)/SRB2.res: win32/Srb2win.rc win32/afxres.h win32/resource.h
$(WINDRES) -i $< -O rc $(WINDRESFLAGS) --include-dir=win32 -o $@ -O coff
ifdef MINGW
ifndef SDL
ifndef NOHW
$(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h \
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
$(OBJDIR)/ogl_win.o: hardware/r_opengl/ogl_win.c hardware/r_opengl/r_opengl.h \
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
$(OBJDIR)/r_minigl.o: hardware/r_minigl/r_minigl.c hardware/r_opengl/r_opengl.h \
doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_drv.h screen.h \
command.h hardware/hw_data.h hardware/hw_defs.h hardware/hw_md2.h \
hardware/hw_glob.h hardware/hw_main.h hardware/hw_clip.h \
hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \
am_map.h d_event.h d_player.h p_pspr.h m_fixed.h tables.h info.h d_think.h \
p_mobj.h doomdata.h d_ticcmd.h r_defs.h hardware/hw_dll.h
$(CC) $(CFLAGS) $(WFLAGS) -D_WINDOWS -mwindows -c $< -o $@
endif
endif
endif
ifdef SDL
ifdef MINGW
-14
View File
@@ -34,10 +34,6 @@
#include "m_menu.h"
#include "filesrch.h"
#ifdef _WINDOWS
#include "win32/win_main.h"
#endif
#ifdef HWRENDER
#include "hardware/hw_main.h"
#endif
@@ -1429,19 +1425,9 @@ void CONS_Printf(const char *fmt, ...)
// if not in display loop, force screen update
if (startup)
{
#if (defined (_WINDOWS)) || (defined (__OS2__) && !defined (HAVE_SDL))
patch_t *con_backpic = W_CachePatchName("KARTKREW", PU_CACHE);
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL);
W_UnlockCachedPatch(con_backpic);
I_LoadingScreen(txt); // Win32/OS2 only
#else
// here we display the console text
CON_Drawer();
I_FinishUpdate(); // page flip or blit buffer
#endif
}
}
-11
View File
@@ -80,10 +80,6 @@
#include "hardware/hw_main.h" // 3D View Rendering
#endif
#ifdef _WINDOWS
#include "win32/win_main.h" // I_DoStartupMouse
#endif
#ifdef HW3SOUND
#include "hardware/hw3sound.h"
#endif
@@ -632,11 +628,6 @@ void D_SRB2Loop(void)
// Pushing of + parameters is now done back in D_SRB2Main, not here.
#ifdef _WINDOWS
CONS_Printf("I_StartupMouse()...\n");
I_DoStartupMouse();
#endif
I_UpdateTime(cv_timescale.value);
oldentertics = I_GetTime();
@@ -1087,9 +1078,7 @@ void D_SRB2Main(void)
#endif
// for dedicated server
#if !defined (_WINDOWS) //already check in win_main.c
dedicated = M_CheckParm("-dedicated") != 0;
#endif
strcpy(title, "SRB2Kart");
strcpy(srb2, "SRB2Kart");
-2
View File
@@ -4994,8 +4994,6 @@ static void Command_Version_f(void)
// Base library
#if defined( HAVE_SDL)
CONS_Printf("SDL ");
#elif defined(_WINDOWS)
CONS_Printf("DD ");
#endif
// OS
-7
View File
@@ -55,13 +55,6 @@
#endif
#endif
#ifdef _WINDOWS
#define NONET
#if !defined (HWRENDER) && !defined (NOHW)
#define HWRENDER
#endif
#endif
#ifdef _WIN32
#define ASMCALL __cdecl
#else
+4 -14
View File
@@ -27,18 +27,10 @@
// __declspec(dllexport) <return->type> (WINAPI *<function-name>) (<arguments>);
#ifdef _CREATE_DLL_
#ifdef _WINDOWS
#ifdef __cplusplus
#define EXPORT extern "C" __declspec(dllexport)
#else
#define EXPORT __declspec(dllexport)
#endif
#ifdef __cplusplus
#define EXPORT extern "C"
#else
#ifdef __cplusplus
#define EXPORT extern "C"
#else
#define EXPORT
#endif
#define EXPORT
#endif
#ifdef _WIN32
#define HWRAPI(fn) WINAPI fn
@@ -64,9 +56,7 @@
void GL_DBG_Printf(const char *format, ...) /*FUNCPRINTF*/;
#define DBG_Printf GL_DBG_Printf
#ifdef _WINDOWS
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
#elif defined (__CYGWIN__)
#if defined (__CYGWIN__)
void _init() __attribute__((constructor));
void _fini() __attribute__((destructor));
#else
-33
View File
@@ -1,33 +0,0 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// Copyright (C) 1998-2000 by DooM Legacy Team.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//-----------------------------------------------------------------------------
/// \file
/// \brief MiniGL API for Doom Legacy
// tell r_opengl.cpp to compile for MiniGL Drivers
#define MINI_GL_COMPATIBILITY
// tell r_opengl.cpp to compile for ATI Rage Pro OpenGL driver
//#define ATI_RAGE_PRO_COMPATIBILITY
#define DRIVER_STRING "HWRAPI Init(): SRB2Kart MiniGL renderer"
// Include this at end
#include "../r_opengl/r_opengl.c"
#include "../r_opengl/ogl_win.c"
// That's all ;-)
// Just, be sure to do the right changes in r_opengl.cpp
-89
View File
@@ -1,89 +0,0 @@
[Project]
FileName=r_minigl.dev
Name=r_minigl
Ver=1
IsCpp=1
Type=3
Compiler=-D_M_IX86=500_@@_-Wall_@@_-D_WINDOWS_@@_-DUSE_WGL_SWAP_@@_-Os_@@_-fomit-frame-pointer_@@_
CppCompiler=
Includes=
Linker=--def ../r_mingw.def_@@_-lgdi32_@@_
Libs=
UnitCount=4
Folders=
ObjFiles=
PrivateResource=
ResourceIncludes=
MakeIncludes=
Icon=
ExeOutput=C:\srb2demo2
ObjectOutput=..\..\..\objs\Mingw\r_minigl
OverrideOutput=1
OverrideOutputName=r_minigl.dll
HostApplication=
CommandLine=
IncludeVersionInfo=0
SupportXPThemes=0
CompilerSet=0
CompilerSettings=00000000000000000111d0
UseCustomMakefile=0
CustomMakefile=
[Unit1]
FileName=..\r_opengl\ogl_win.c
Folder=
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c ogl_win.c -o ../../../objs/Mingw/r_minigl/ogl_win.o $(CFLAGS)
[Unit2]
FileName=..\r_opengl\r_opengl.c
Folder=
Compile=0
CompileCpp=0
Link=0
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c r_opengl.c -o ../../../objs/Mingw/r_minigl/r_opengl.o $(CFLAGS)
[Unit3]
FileName=..\r_opengl\r_opengl.h
Folder=
Compile=1
CompileCpp=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
[VersionInfo]
Major=0
Minor=1
Release=1
Build=1
LanguageID=1033
CharsetID=1252
CompanyName=
FileVersion=0.1
FileDescription=Developed using the Dev-C++ IDE
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=r_opengl.exe
ProductName=r_opengl
ProductVersion=0.1
AutoIncBuildNr=0
[Unit4]
FileName=r_minigl.c
CompileCpp=0
Folder=r_minigl
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=$(CC) -c r_minigl.c -o ../../../objs/Mingw/r_minigl/r_minigl.o $(CFLAGS)
-103
View File
@@ -1,103 +0,0 @@
# Microsoft Developer Studio Project File - Name="r_minigl" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=r_minigl - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "r_minigl.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "r_minigl.mak" CFG="r_minigl - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "r_minigl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "r_minigl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "r_minigl - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "..\..\..\objs\Release"
# PROP BASE Intermediate_Dir "..\..\..\objs\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "..\..\..\bin\VC\Release\r_minigl"
# PROP Intermediate_Dir "..\..\..\objs\VC\Release\r_minigl"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "R_MINIGL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /FR /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x80c /d "NDEBUG"
# ADD RSC /l 0x40c /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 user32.lib gdi32.lib /nologo /dll /pdb:"..\..\..\bin\VC\Release\r_minigl.pdb" /machine:I386 /out:"..\..\..\bin\VC\Release\r_minigl.dll"
# SUBTRACT LINK32 /pdb:none /debug
!ELSEIF "$(CFG)" == "r_minigl - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "..\..\..\objs\Debug"
# PROP BASE Intermediate_Dir "..\..\..\objs\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\..\..\bin\VC\Debug\r_minigl"
# PROP Intermediate_Dir "..\..\..\objs\VC\Debug\r_minigl"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "R_MINIGL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "__WIN32__" /D "__MSC__" /D "_MBCS" /D "_USRDLL" /D "R_MINIGL_EXPORTS" /FR /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x80c /d "_DEBUG"
# ADD RSC /l 0x40c /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ouser32.lib gdi32.lib /nologo /dll /pdb:"..\..\..\bin\VC\Debug\r_minigl.pdb" /debug /machine:I386 /out:"..\..\..\bin\VC\Debug\r_minigl.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "r_minigl - Win32 Release"
# Name "r_minigl - Win32 Debug"
# Begin Source File
SOURCE=.\r_minigl.c
# End Source File
# Begin Source File
SOURCE=..\r_opengl\r_opengl.h
# End Source File
# End Target
# End Project
-8
View File
@@ -11877,16 +11877,8 @@ static void M_VideoModeMenu(INT32 choice)
vidm_selected = 0;
nummodes = VID_NumModes();
#ifdef _WINDOWS
// clean that later: skip windowed mode 0, video modes menu only shows FULL SCREEN modes
if (nummodes <= NUMSPECIALMODES)
i = 0; // unless we have nothing
else
i = NUMSPECIALMODES;
#else
// DOS does not skip mode 0, because mode 0 is ALWAYS present
i = 0;
#endif
for (; i < nummodes && vidm_nummodes < MAXMODEDESCS; i++)
{
desc = VID_GetModeName(i);
-8
View File
@@ -65,15 +65,7 @@ static void AmigaType_OnChange(void);
#endif
#endif
#if defined (_WINDOWS) && !defined (SURROUND) //&& defined (_X86_)
#define SURROUND
#endif
#ifdef _WINDOWS
consvar_t cv_samplerate = {"samplerate", "44100", 0, CV_Unsigned, NULL, 44100, NULL, NULL, 0, 0, NULL}; //Alam: For easy hacking?
#else
consvar_t cv_samplerate = {"samplerate", "22050", 0, CV_Unsigned, NULL, 22050, NULL, NULL, 0, 0, NULL}; //Alam: For easy hacking?
#endif
// stereo reverse
consvar_t stereoreverse = {"stereoreverse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
-30
View File
@@ -49,15 +49,8 @@ ifndef GCC44
#OPTS+=-mms-bitfields
endif
ifndef SDL
OPTS+=-D_WINDOWS
endif
OPTS+=-D__USE_MINGW_ANSI_STDIO=0
ifndef SDL
LIBS+=-lmingw32 -mwindows -ldinput -ldxguid -lgdi32 -lwinmm
endif
LIBS+=-ladvapi32 -lkernel32 -lmsvcrt -luser32
ifdef MINGW64
LIBS+=-lws2_32
@@ -80,36 +73,13 @@ else
endif
# name of the exefile
ifdef SDL
EXENAME?=srb2kart.exe
else
EXENAME?=srb2kartdd.exe
endif
ifdef SDL
i_system_o+=$(OBJDIR)/SRB2.res
#i_main_o+=$(OBJDIR)/win_dbg.o
ifndef NOHW
OPTS+=-DUSE_WGL_SWAP
endif
else
D_FILES+=$(D_DIR)/fmodex.dll
CFLAGS+=-I../libs/fmodex/inc
LDFLAGS+=-L../libs/fmodex/lib
ifdef MINGW64
LIBS+=-lfmodex64_vc
else
LIBS+=-lfmodex_vc
endif
i_cdmus_o=$(OBJDIR)/win_cd.o
i_net_o=$(OBJDIR)/win_net.o
i_system_o=$(OBJDIR)/win_sys.o $(OBJDIR)/SRB2.res
i_sound_o=$(OBJDIR)/win_snd.o
i_main_o=$(OBJDIR)/win_main.o
#i_main_o+=$(OBJDIR)/win_dbg.o
OBJS=$(OBJDIR)/dx_error.o $(OBJDIR)/fabdxlib.o $(OBJDIR)/win_vid.o $(OBJDIR)/win_dll.o
endif
ZLIB_CFLAGS?=-I../libs/zlib
ifdef MINGW64
-55
View File
@@ -1,55 +0,0 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// Copyright (C) 1998-2000 by DooM Legacy Team.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//-----------------------------------------------------------------------------
/// \file
/// \brief Win32 Sharing
//#define WIN32_LEAN_AND_MEAN
#define RPC_NO_WINDOWS_H
#include <windows.h>
#include <stdio.h>
extern HINSTANCE myInstance;
extern HWND hWndMain;
// debugging CONS_Printf to file
#ifdef LOGMESSAGES
extern HANDLE logstream;
#endif
extern int appActive;
// the MIDI callback is another thread, and Midi volume is delayed here in window proc
VOID I_SetMidiChannelVolume(DWORD dwChannel, DWORD dwVolumePercent);
extern DWORD dwVolumePercent;
VOID I_GetSysMouseEvents(int mouse_state);
extern unsigned int MSHWheelMessage;
extern BOOL nodinput;
extern BOOL win9x;
//faB: midi channel Volume set is delayed by the MIDI stream callback thread, see win_snd.c
#define WM_MSTREAM_UPDATEVOLUME (WM_USER + 101)
// defined in win_sys.c
VOID I_BeginProfile(VOID); //for timing code
DWORD I_EndProfile(VOID);
VOID I_GetLastErrorMsgBox(VOID);
VOID I_LoadingScreen (LPCSTR msg);
void I_RestartSysMouse(void);
void I_DoStartupMouse(void);
BOOL I_SaveMemToFile(const void *pData, size_t iLength, const char *sFileName);