From b805b4e044bb50cef08e7bc4d312bff7bae1052e Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Tue, 7 Aug 2018 10:00:21 +0200 Subject: [PATCH] Move vid.c and dependencies into the client. The vid interface has been exclusive to the client for years, trace that in the file hierarchy. --- CMakeLists.txt | 4 ++-- Makefile | 2 +- src/client/header/client.h | 2 +- src/client/header/ref.h | 2 +- src/client/{ => vid}/header/vid.h | 2 +- src/{backends/generic => client/vid}/vid.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename src/client/{ => vid}/header/vid.h (97%) rename src/{backends/generic => client/vid}/vid.c (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f90eab4..11aa7c38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,7 +164,6 @@ endif() set(Backends-Generic-Source ${BACKENDS_SRC_DIR}/generic/misc.c - ${BACKENDS_SRC_DIR}/generic/vid.c ${BACKENDS_SRC_DIR}/sdl/refresh.c ) @@ -319,6 +318,7 @@ set(Client-Source ${CLIENT_SRC_DIR}/sound/sdl.c ${CLIENT_SRC_DIR}/sound/sound.c ${CLIENT_SRC_DIR}/sound/wave.c + ${CLIENR_SRC_DIR}/vid/vid.c ${COMMON_SRC_DIR}/argproc.c ${COMMON_SRC_DIR}/clientserver.c ${COMMON_SRC_DIR}/collision.c @@ -357,13 +357,13 @@ set(Client-Header ${CLIENT_SRC_DIR}/header/keyboard.h ${CLIENT_SRC_DIR}/header/ref.h ${CLIENT_SRC_DIR}/header/screen.h - ${CLIENT_SRC_DIR}/header/vid.h ${CLIENT_SRC_DIR}/input/header/input.h ${CLIENT_SRC_DIR}/menu/header/qmenu.h ${CLIENT_SRC_DIR}/sound/header/local.h ${CLIENT_SRC_DIR}/sound/header/qal.h ${CLIENT_SRC_DIR}/sound/header/sound.h ${CLIENT_SRC_DIR}/sound/header/vorbis.h + ${CLIENT_SRC_DIR}/vid/header/vid.h ${COMMON_SRC_DIR}/header/common.h ${COMMON_SRC_DIR}/header/crc.h ${COMMON_SRC_DIR}/header/files.h diff --git a/Makefile b/Makefile index 6822e6a9..3a3109ab 100755 --- a/Makefile +++ b/Makefile @@ -691,7 +691,6 @@ GAME_OBJS_ = \ # Used by the client CLIENT_OBJS_ := \ src/backends/generic/misc.o \ - src/backends/generic/vid.o \ src/backends/sdl/refresh.o \ src/client/cl_cin.o \ src/client/cl_console.o \ @@ -720,6 +719,7 @@ CLIENT_OBJS_ := \ src/client/sound/qal.o \ src/client/sound/sound.o \ src/client/sound/wave.o \ + src/client/vid/vid.o \ src/common/argproc.o \ src/common/clientserver.o \ src/common/collision.o \ diff --git a/src/client/header/client.h b/src/client/header/client.h index 6cc399bc..5ffb8dd7 100644 --- a/src/client/header/client.h +++ b/src/client/header/client.h @@ -48,13 +48,13 @@ #include #include "ref.h" -#include "vid.h" #include "screen.h" #include "keyboard.h" #include "console.h" #include "../sound/header/sound.h" #include "../sound/header/vorbis.h" +#include "../vid/header/vid.h" typedef struct { diff --git a/src/client/header/ref.h b/src/client/header/ref.h index 066eca9d..d3f9242f 100644 --- a/src/client/header/ref.h +++ b/src/client/header/ref.h @@ -28,7 +28,7 @@ #define CL_REF_H #include "../../common/header/common.h" -#include "vid.h" +#include "../vid/header/vid.h" #define MAX_DLIGHTS 32 #define MAX_ENTITIES 128 diff --git a/src/client/header/vid.h b/src/client/vid/header/vid.h similarity index 97% rename from src/client/header/vid.h rename to src/client/vid/header/vid.h index cd122859..4eb1bdf5 100644 --- a/src/client/header/vid.h +++ b/src/client/vid/header/vid.h @@ -27,7 +27,7 @@ #ifndef CL_VID_H #define CL_VID_H -#include "../../common/header/common.h" +#include "../../../common/header/common.h" // FIXME: Remove it, it's unused. typedef struct vrect_s { diff --git a/src/backends/generic/vid.c b/src/client/vid/vid.c similarity index 99% rename from src/backends/generic/vid.c rename to src/client/vid/vid.c index 37917a76..a89741ee 100644 --- a/src/backends/generic/vid.c +++ b/src/client/vid/vid.c @@ -67,7 +67,7 @@ compress_for_stbiw(unsigned char *data, int data_len, int *out_len, int quality) #endif #define STB_IMAGE_WRITE_IMPLEMENTATION -#include "header/stb_image_write.h" +#include "../../backends/generic/header/stb_image_write.h" /* * Writes a screenshot. This function is called with raw image data of