From 2f0f11976d09a5fad50433775acc46d688f44d73 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 8 Dec 2024 15:39:36 +0100 Subject: [PATCH] rename to "hw_gl" --- src/CMakeLists.txt | 2 +- src/Makefile | 4 ++-- src/hardware/hw_batching.h | 2 +- src/hardware/hw_cache.c | 3 ++- src/hardware/hw_draw.c | 3 ++- src/hardware/{hw_gpu.h => hw_gl.h} | 13 +++++++------ src/hardware/hw_main.c | 7 ++++--- src/hardware/hw_md2.c | 5 +++-- src/hardware/hw_portal.c | 2 +- src/hardware/hw_shaders.c | 2 +- src/hardware/r_opengl/r_opengl.h | 3 ++- src/sdl/Srb2SDL.dsp | 2 +- src/sdl/i_video.c | 10 ++++++---- src/sdl/macosx/Srb2mac.pbproj/project.pbxproj | 4 ++-- src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj | 4 ++-- src/sdl/ogl_sdl.c | 2 +- 16 files changed, 38 insertions(+), 30 deletions(-) rename src/hardware/{hw_gpu.h => hw_gl.h} (93%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 35669ce52..f31a9bd26 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -487,7 +487,7 @@ if(${SRB2_CONFIG_HWRENDER}) ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_data.h ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_defs.h ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_dll.h - ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_gpu.h + ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_gl.h ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_glob.h ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_main.h ${CMAKE_CURRENT_SOURCE_DIR}/hardware/hw_portal.h diff --git a/src/Makefile b/src/Makefile index 8a4c2488f..777c9e171 100644 --- a/src/Makefile +++ b/src/Makefile @@ -752,7 +752,7 @@ else ifdef SDL ifdef MINGW $(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_gpu.h screen.h \ + doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_gl.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_portal.h\ hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \ @@ -761,7 +761,7 @@ $(OBJDIR)/r_opengl.o: hardware/r_opengl/r_opengl.c hardware/r_opengl/r_opengl.h $(CC) $(CFLAGS) $(WFLAGS) -c $< -o $@ else $(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_gpu.h screen.h \ + doomdef.h doomtype.h g_state.h m_swap.h hardware/hw_gl.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_portal.h \ hardware/hw_md2load.h hardware/hw_md3load.h hardware/hw_model.h hardware/u_list.h \ diff --git a/src/hardware/hw_batching.h b/src/hardware/hw_batching.h index 2825b0820..7f418fc77 100644 --- a/src/hardware/hw_batching.h +++ b/src/hardware/hw_batching.h @@ -15,7 +15,7 @@ #include "hw_defs.h" #include "hw_data.h" -#include "hw_gpu.h" +#include "hw_gl.h" extern boolean currently_batching; diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index bfb1df1f1..4df24bd16 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -14,9 +14,10 @@ #include "../doomdef.h" #ifdef HWRENDER + #include "hw_main.h" #include "hw_glob.h" -#include "hw_gpu.h" +#include "hw_gl.h" #include "hw_batching.h" #include "../doomstat.h" //gamemode diff --git a/src/hardware/hw_draw.c b/src/hardware/hw_draw.c index bfb1909e5..e38300309 100644 --- a/src/hardware/hw_draw.c +++ b/src/hardware/hw_draw.c @@ -18,9 +18,10 @@ #include "../doomdef.h" #ifdef HWRENDER + #include "hw_main.h" #include "hw_glob.h" -#include "hw_gpu.h" +#include "hw_gl.h" #include "../m_misc.h" //FIL_WriteFile() #include "../r_draw.h" //viewborderlump diff --git a/src/hardware/hw_gpu.h b/src/hardware/hw_gl.h similarity index 93% rename from src/hardware/hw_gpu.h rename to src/hardware/hw_gl.h index 0d63296c6..aacb1b1fb 100644 --- a/src/hardware/hw_gpu.h +++ b/src/hardware/hw_gl.h @@ -1,16 +1,17 @@ -// SONIC ROBO BLAST 2 +// SONIC ROBO BLAST 2 Kart //----------------------------------------------------------------------------- // Copyright (C) 2020 by Jaime "Lactozilla" Passos. +// Copyright (C) 2020 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. // See the 'LICENSE' file for more details. //----------------------------------------------------------------------------- -/// \file hw_gpu.h -/// \brief GPU low-level interface API +/// \file hw_gl.h +/// \brief OpenGL low-level interface API -#ifndef __HWR_GPU_H__ -#define __HWR_GPU_H__ +#ifndef __HWR_GL_H__ +#define __HWR_GL_H__ #include "../screen.h" @@ -76,4 +77,4 @@ UINT32 GL_CreateLightTable(RGBA_t *hw_lighttable); void GL_ClearLightTables(void); void GL_SetScreenPalette(RGBA_t *palette); -#endif // __HWR_GPU_H__ +#endif // __HWR_GL_H__ diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index dec4082ad..fb9655544 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -16,12 +16,11 @@ #include "../doomstat.h" #include "../doomdef.h" -#include "../qs22j.h" - #ifdef HWRENDER + #include "hw_main.h" #include "hw_glob.h" -#include "hw_gpu.h" +#include "hw_gl.h" #include "hw_batching.h" #include "hw_md2.h" #include "hw_clip.h" @@ -57,6 +56,8 @@ #include "../w_wad.h" #include "../z_zone.h" +#include "../qs22j.h" // fast qsort + // ========================================================================== // Globals // ========================================================================== diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index b44797976..1118caf8d 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -25,7 +25,8 @@ #include "../doomstat.h" #ifdef HWRENDER -#include "hw_gpu.h" + +#include "hw_gl.h" #include "hw_md2.h" #include "../d_main.h" #include "../r_bsp.h" @@ -44,8 +45,8 @@ #include "hw_main.h" #include "../v_video.h" -#ifdef HAVE_PNG +#ifdef HAVE_PNG #ifndef _MSC_VER #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE diff --git a/src/hardware/hw_portal.c b/src/hardware/hw_portal.c index 7b5f93b97..f26e71331 100644 --- a/src/hardware/hw_portal.c +++ b/src/hardware/hw_portal.c @@ -23,7 +23,7 @@ #include "../z_zone.h" #include "hw_clip.h" -#include "hw_gpu.h" +#include "hw_gl.h" #include "hw_defs.h" #include "hw_main.h" #include "hw_portal.h" diff --git a/src/hardware/hw_shaders.c b/src/hardware/hw_shaders.c index 9d5406858..11f955592 100644 --- a/src/hardware/hw_shaders.c +++ b/src/hardware/hw_shaders.c @@ -13,7 +13,7 @@ #include "hw_main.h" #include "hw_glob.h" -#include "hw_gpu.h" +#include "hw_gl.h" #include "hw_shaders.h" #include "../z_zone.h" diff --git a/src/hardware/r_opengl/r_opengl.h b/src/hardware/r_opengl/r_opengl.h index c233d3cad..50f6a6716 100644 --- a/src/hardware/r_opengl/r_opengl.h +++ b/src/hardware/r_opengl/r_opengl.h @@ -43,8 +43,9 @@ #endif #define _CREATE_DLL_ // necessary for Unix AND Windows + #include "../../doomdef.h" -#include "../hw_gpu.h" +#include "../hw_gl.h" #include "../../z_zone.h" // ========================================================================== diff --git a/src/sdl/Srb2SDL.dsp b/src/sdl/Srb2SDL.dsp index 081236626..6f799f4fb 100644 --- a/src/sdl/Srb2SDL.dsp +++ b/src/sdl/Srb2SDL.dsp @@ -572,7 +572,7 @@ SOURCE=..\hardware\hw_draw.c # End Source File # Begin Source File -SOURCE=..\hardware\hw_gpu.h +SOURCE=..\hardware\hw_gl.h # End Source File # Begin Source File diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index ce0cbc322..d269aa698 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -74,15 +74,17 @@ #include "../i_video.h" #include "../console.h" #include "../command.h" -#include "sdlmain.h" #include "../i_system.h" #include "../hu_stuff.h" // for chat_on + +#include "sdlmain.h" + #ifdef HWRENDER #include "../hardware/hw_main.h" -#include "../hardware/hw_gpu.h" +#include "../hardware/hw_gl.h" #include "../hardware/r_opengl/r_opengl.h" //for supportFBO -// For dynamic referencing of HW rendering functions -#include "hwsym_sdl.h" + +#include "hwsym_sdl.h" // For dynamic referencing of HW rendering functions #include "ogl_sdl.h" #endif diff --git a/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj b/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj index 3d8c7a82e..a4888ec50 100644 --- a/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj +++ b/src/sdl/macosx/Srb2mac.pbproj/project.pbxproj @@ -1060,8 +1060,8 @@ 8417773A085A106C000C01D8 = { fileEncoding = 30; isa = PBXFileReference; - name = hw_gpu.h; - path = ../../hardware/hw_gpu.h; + name = hw_gl.h; + path = ../../hardware/hw_gl.h; refType = 2; }; 8417773C085A106C000C01D8 = { diff --git a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj index 8a2f00c9c..9ec22ebcc 100644 --- a/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj +++ b/src/sdl/macosx/Srb2mac.xcodeproj/project.pbxproj @@ -180,7 +180,7 @@ 1E44AE630B67CC2B00BAD059 /* hw3sound.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw3sound.c; path = ../../hardware/hw3sound.c; sourceTree = SOURCE_ROOT; }; 1E44AE640B67CC2B00BAD059 /* hw_cache.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_cache.c; path = ../../hardware/hw_cache.c; sourceTree = SOURCE_ROOT; }; 1E44AE650B67CC2B00BAD059 /* hw_dll.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_dll.h; path = ../../hardware/hw_dll.h; sourceTree = SOURCE_ROOT; }; - 1E44AE660B67CC2B00BAD059 /* hw_gpu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_gpu.h; path = ../../hardware/hw_gpu.h; sourceTree = SOURCE_ROOT; }; + 1E44AE660B67CC2B00BAD059 /* hw_gl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_gl.h; path = ../../hardware/hw_gl.h; sourceTree = SOURCE_ROOT; }; 1E44AE680B67CC2B00BAD059 /* hw_light.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_light.c; path = ../../hardware/hw_light.c; sourceTree = SOURCE_ROOT; }; 1E44AE690B67CC2B00BAD059 /* hw_light.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_light.h; path = ../../hardware/hw_light.h; sourceTree = SOURCE_ROOT; }; 1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw3sound.h; path = ../../hardware/hw3sound.h; sourceTree = SOURCE_ROOT; }; @@ -533,7 +533,7 @@ 1E44AE630B67CC2B00BAD059 /* hw3sound.c */, 1E44AE640B67CC2B00BAD059 /* hw_cache.c */, 1E44AE650B67CC2B00BAD059 /* hw_dll.h */, - 1E44AE660B67CC2B00BAD059 /* hw_gpu.h */, + 1E44AE660B67CC2B00BAD059 /* hw_gl.h */, 1E44AE680B67CC2B00BAD059 /* hw_light.c */, 1E44AE690B67CC2B00BAD059 /* hw_light.h */, 1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */, diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index f0b1374ff..dbffc5352 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -38,7 +38,7 @@ #ifdef HWRENDER #include "../hardware/r_opengl/r_opengl.h" #include "../hardware/hw_main.h" -#include "../hardware/hw_gpu.h" +#include "../hardware/hw_gl.h" #include "ogl_sdl.h" #include "../i_system.h" #include "hwsym_sdl.h"