From de4b635b19e0d410cff744568e95523f8eb4bf81 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 24 Jul 2025 23:59:15 +0500 Subject: [PATCH] engine: client: move cl_spray.c only external function declaration to client.h, move other definitions to cl_spray.c --- engine/client/cl_spray.c | 7 ++++++- engine/client/cl_spray.h | 26 -------------------------- engine/client/client.h | 5 +++++ 3 files changed, 11 insertions(+), 27 deletions(-) delete mode 100644 engine/client/cl_spray.h diff --git a/engine/client/cl_spray.c b/engine/client/cl_spray.c index 7bf1c83d..75673c69 100644 --- a/engine/client/cl_spray.c +++ b/engine/client/cl_spray.c @@ -16,7 +16,12 @@ GNU General Public License for more details. #include "common.h" #include "filesystem.h" #include "imagelib.h" -#include "cl_spray.h" + +#define SPRAY_MAX_SURFACE 12228 +#define SPRAY_PALETTE_SIZE 256 +#define SPRAY_PALETTE_BYTES ( SPRAY_PALETTE_SIZE * 3 ) +#define SPRAY_ALPHA_THRESHOLD 254 +#define SPRAY_FILENAME "tempdecal.wad" // adjusts spray dimensions static void CL_AdjustSprayDimensions( int *width, int *height ) diff --git a/engine/client/cl_spray.h b/engine/client/cl_spray.h deleted file mode 100644 index e26e2d3a..00000000 --- a/engine/client/cl_spray.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -cl_spray.h - spray conversion for GoldSrc protocol -Copyright (C) 2025 Xash3D FWGS contributors -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 3 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. -*/ - -#ifndef CL_SPRAY_H -#define CL_SPRAY_H - -// constants -#define SPRAY_MAX_SURFACE 12228 -#define SPRAY_PALETTE_SIZE 256 -#define SPRAY_PALETTE_BYTES ( SPRAY_PALETTE_SIZE * 3 ) -#define SPRAY_FILENAME "tempdecal.wad" -#define SPRAY_ALPHA_THRESHOLD 254 - -qboolean CL_ConvertImageToWAD3( const char *filename ); - -#endif // CL_SPRAY_H diff --git a/engine/client/client.h b/engine/client/client.h index 951d8f44..ae3d1148 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -1050,6 +1050,11 @@ lightstyle_t *CL_GetLightStyle( int number ); int R_FatPVS( const vec3_t org, float radius, byte *visbuffer, qboolean merge, qboolean fullvis ); const ref_overview_t *GL_GetOverviewParms( void ); +// +// cl_spray.c +// +qboolean CL_ConvertImageToWAD3( const char *filename ); + // // cl_efrag.c //