Move pserror.h to ddebug module

This commit is contained in:
Azamat H. Hackimov
2024-09-23 03:16:07 +03:00
parent c3b1225c6e
commit a59503f881
49 changed files with 62 additions and 76 deletions

View File

@@ -1,6 +1,7 @@
set(HEADERS
gr.h
lib2d.h)
lib2d.h
)
set(CPPS
font.cpp
hardsurf.cpp
@@ -15,9 +16,9 @@ set(CPPS
add_library(2dlib STATIC ${HEADERS} ${CPPS})
target_link_libraries(2dlib PRIVATE
cfile
ddebug
logger
mem
misc
)
target_include_directories(2dlib PUBLIC
$<BUILD_INTERFACE:

View File

@@ -19,6 +19,7 @@
#include "d3music.h"
#include "log.h"
#include "music.h"
#include "pserror.h"
// generic constants
#define MUSIC_IDLE_TIME 240.0f // how many seconds before background music silences.

View File

@@ -17,16 +17,15 @@
*/
// Lightmap info
#include "pstypes.h"
#include <cstdlib>
#include <cstring>
#include "lightmap_info.h"
#include "lightmap.h"
#include "mono.h"
#include "Ddgr.h"
#include "grdefs.h"
#include "pserror.h"
#include "renderer.h"
#include <stdlib.h>
#include <string.h>
#include "mem.h"
#include "dedicated_server.h"

View File

@@ -39,8 +39,7 @@
#define LIGHTMAP_INFO_H
// Lightmap info header
#include "pstypes.h"
#include "pserror.h"
#include <cstdint>
#include "vecmat.h"
#define BAD_LMI_INDEX 65535

View File

@@ -19,6 +19,7 @@
#include "list.h"
#include "log.h"
#include "mem.h"
#include "pserror.h"
// Allocates space for a new list node, returning the pointer to it
listnode *NewListNode(void) {

View File

@@ -19,9 +19,6 @@
#ifndef LIST_H
#define LIST_H
#include "pstypes.h"
#include "pserror.h"
struct listnode {
void *data;
struct listnode *next;

View File

@@ -628,10 +628,11 @@
#ifndef _OBJECT_H
#define _OBJECT_H
#include "pstypes.h"
#include "pserror.h"
#include <cstdint>
#include "object_external_struct.h"
#include "object_external.h"
#include "pserror.h"
/*
* CONSTANTS

View File

@@ -19,8 +19,8 @@
#ifndef PROCEDURALS_H
#define PROCEDURALS_H
#include "pstypes.h"
#include "pserror.h"
#include <cstdint>
#include "fix.h"
#define MAX_PROC_ELEMENTS 8000

View File

@@ -16,13 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "pstypes.h"
#include <cstdlib>
#include <cstring>
#include "special_face.h"
#include "mono.h"
#include <stdlib.h>
#include <string.h>
#include "mem.h"
#include "pserror.h"
#include "special_face.h"
int Num_of_special_faces = 0;
special_face SpecialFaces[MAX_SPECIAL_FACES];

View File

@@ -19,8 +19,8 @@
#ifndef SPECIAL_FACE_H
#define SPECIAL_FACE_H
#include "pstypes.h"
#include "pserror.h"
#include <cstdint>
#include "vecmat.h"
#define BAD_SPECIAL_FACE_INDEX -1

View File

@@ -794,16 +794,12 @@ void RenderMine(int viewer_roomnum, int flag_automap, int called_from_terrain, b
#include "terrain.h"
#include "grdefs.h"
#include "3d.h"
#include "pstypes.h"
#include "pserror.h"
#include "renderer.h"
#include "gametexture.h"
#include "descent.h"
#include "render.h"
#include "game.h"
#include "ddio.h"
#include "polymodel.h"
#include "lighting.h"
#include "vecmat.h"
#include "renderobject.h"
#include "findintersection.h"

View File

@@ -50,8 +50,7 @@
#ifndef __VISEFFECT_EXTERNAL_H_
#define __VISEFFECT_EXTERNAL_H_
#include "pstypes.h"
#include "pserror.h"
#include <cstdint>
#include "vecmat.h"
#define MAX_VIS_EFFECTS 5000

View File

@@ -17,7 +17,6 @@
*/
#include "pserror.h"
#include "pstypes.h"
#include "fireball.h"
#include "weather.h"
#include "viseffect.h"
@@ -28,10 +27,8 @@
#include "soundload.h"
#include "hlsoundlib.h"
#include "sounds.h"
#include <stdlib.h>
#include "psrand.h"
weather Weather = {0};
int ThunderA_sound_handle = -1;

View File

@@ -61,7 +61,6 @@
#include "grdefs.h"
#include "log.h"
#include "mem.h"
#include "pserror.h"
// load an 8bit pcx image
static int bm_pcx_8bit_alloc_file(CFILE *infile);

View File

@@ -10,6 +10,7 @@ set(CPPS
add_library(cfile STATIC ${HEADERS} ${CPPS})
target_link_libraries(cfile PRIVATE
ddebug
ddio
logger
mem

View File

@@ -11,8 +11,8 @@ set(CPPS
add_library(dd_grwin32 STATIC ${HEADERS} ${CPPS})
target_link_libraries(dd_grwin32 PRIVATE
2dlib
ddebug
logger
misc
)
target_compile_definitions(dd_grwin32 PRIVATE DX_APP)
target_link_libraries(dd_grwin32 PRIVATE ${DDRAW_LIBRARY})

View File

@@ -2,9 +2,11 @@ set(HEADERS
debug.h
debugbreak.h
mono.h
pserror.h
)
set(CPPS
debug.cpp
error.cpp
$<$<PLATFORM_ID:Darwin,Linux,OpenBSD>:
lnxdebug.cpp
lnxmono.cpp

View File

@@ -32,7 +32,6 @@ target_link_libraries(ddio PRIVATE
ddebug
logger
mem
misc
)
target_include_directories(ddio PUBLIC
$<BUILD_INTERFACE:

View File

@@ -41,7 +41,6 @@
*/
#include <filesystem>
#include "pstring.h"
#include "forcefeedback.h"
bool ddForce_found; // a Force Feedback device was found

View File

@@ -1,6 +1,7 @@
set(HEADERS
grtext.h
grtextlib.h)
grtextlib.h
)
set(CPPS
grfont.cpp
grtext.cpp
@@ -9,10 +10,10 @@ set(CPPS
add_library(grtext STATIC ${HEADERS} ${CPPS})
target_link_libraries(grtext PRIVATE
ddebug
ddio
logger
mem
misc
)
target_include_directories(grtext PUBLIC
$<BUILD_INTERFACE:

View File

@@ -21,7 +21,7 @@ target_include_directories(linux PUBLIC
>
)
target_link_libraries(linux PRIVATE
ddebug
ddio
misc
SDL2::SDL2
)

View File

@@ -57,7 +57,6 @@
#include "appdatabase.h"
#include "linux/lnxdatabase.h"
#include "pserror.h"
#include "log.h"
#include "pserror.h"
#include "registry.h"

View File

@@ -24,10 +24,10 @@ set(CPPS
add_library(manage STATIC ${HEADERS} ${CPPS})
target_link_libraries(manage PRIVATE
cfile
ddebug
ddio
logger
mem
misc
model
sndlib
stream_audio

View File

@@ -363,8 +363,6 @@
#include "log.h"
#include "pserror.h"
#include "polymodel.h"
#include "ddio.h"
#include "robotfire.h"
#include "weapon.h"
#include "sounds.h"
#include "mem.h"

View File

@@ -6,8 +6,8 @@ target_compile_definitions(mem PUBLIC
$<$<BOOL:${ENABLE_MEM_RTL}>:MEM_USE_RTL>
)
target_link_libraries(mem PRIVATE
ddebug
logger
misc
)
target_include_directories(mem PUBLIC
$<BUILD_INTERFACE:

View File

@@ -1,20 +1,15 @@
set(HEADERS
pserror.h
psglob.h
psrand.h
pstring.h)
pstring.h
)
set(CPPS
error.cpp
psglob.cpp
psrand.cpp
pstring.cpp
)
add_library(misc STATIC ${HEADERS} ${CPPS})
target_link_libraries(misc PRIVATE
ddebug
SDL2::SDL2
)
target_include_directories(misc PUBLIC
$<BUILD_INTERFACE:
${PROJECT_SOURCE_DIR}/misc

View File

@@ -1,5 +1,6 @@
set(HEADERS
polymodel.h)
polymodel.h
)
set(CPPS
newstyle.cpp
polymodel.cpp
@@ -8,6 +9,7 @@ set(CPPS
add_library(model STATIC ${HEADERS} ${CPPS})
target_link_libraries(model PRIVATE
cfile
ddebug
logger
mem
misc

View File

@@ -11,10 +11,10 @@ add_library(music STATIC ${HEADERS} ${CPPS})
target_link_libraries(music
AudioEncode
cfile
ddebug
ddio
logger
mem
misc
sndlib
stream_audio
)

View File

@@ -99,8 +99,8 @@
#ifndef MUSIC_H
#define MUSIC_H
#include "pstypes.h"
#include "pserror.h"
#include <cstdint>
#include "psclass.h"
#include "streamaudio.h"

View File

@@ -71,14 +71,15 @@
* $NoKeywords: $
*/
#include <cstring>
#include <cstdlib>
#include "log.h"
#include "music.h"
#include "musiclib.h"
#include "inffile.h"
#include "mem.h"
#include <string.h>
#include <stdlib.h>
#include "pserror.h"
// OMF INF FILE READ
#define OMFFILEERR_ADDSECTION INFFILE_CUSTOM // error adding section to list.

View File

@@ -63,6 +63,7 @@
#include "log.h"
#include "music.h"
#include "streamaudio.h"
#include "pserror.h"
oms_stream::oms_stream() {}

View File

@@ -12,10 +12,10 @@ endif()
add_library(networking STATIC ${HEADERS} ${CPPS})
target_link_libraries(networking PRIVATE
ddebug
ddio
logger
mem
misc
module
${PLATFORM_LIBS}
)

View File

@@ -323,11 +323,9 @@ typedef int socklen_t;
#include "networking.h"
#include "ddio.h"
#include "mem.h"
#include "module.h"
#include "game.h"
#include "args.h"
#include "byteswap.h"
#include "pstring.h"
#ifndef WIN32
bool Use_DirectPlay = false;

View File

@@ -11,6 +11,7 @@ set(CPPS
add_library(physics STATIC ${HEADERS} ${CPPS})
target_link_libraries(physics PRIVATE
ddebug
ddio
logger
mem

View File

@@ -36,6 +36,7 @@ target_link_libraries(renderer PRIVATE
glm::glm
SDL2::SDL2
bitmap
ddebug
ddio
logger
mem

View File

@@ -18,6 +18,7 @@
#include "3d.h"
#include "HardwareInternal.h"
#include "pserror.h"
#include "renderer.h"
#define round(v) ((int)(((v) + 0.5f)))

View File

@@ -16,9 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstring>
#include "3d.h"
#include "HardwareInternal.h"
#include <string.h>
#include "pserror.h"
struct InstanceContext {
matrix m_viewMatrix; // matrix

View File

@@ -19,8 +19,6 @@
#ifndef __HARDWARE_INTERNAL_H__
#define __HARDWARE_INTERNAL_H__
#include "pserror.h"
#define MAX_POINTS_IN_POLY 100
// These structs are for drawing with vertex arrays

View File

@@ -16,10 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include "3d.h"
#include "pserror.h"
#include "HardwareInternal.h"
#include "renderer.h"

View File

@@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstring>
#include "3d.h"
#include "pserror.h"
#include "HardwareInternal.h"
#include "renderer.h"
#include <string.h>
// Whether or not to use T&L transforms or the pass-thru ones
static int sUseTransformPassthru = -1;

View File

@@ -30,7 +30,6 @@
#include "descent.h"
#include "log.h"
#include "module.h"
#include "pserror.h"
#if defined(WIN32)
#define GLFUNCCALL __stdcall

View File

@@ -20,10 +20,10 @@ set(CPPS
add_library(sndlib STATIC ${HEADERS} ${CPPS})
target_link_libraries(sndlib PRIVATE
cfile
ddebug
ddio
logger
mem
misc
stream_audio
physics
SDL2::SDL2

View File

@@ -92,7 +92,6 @@
#include "ssl_lib.h"
#include "cfile.h"
#include "mem.h"
#include "pserror.h"
#include "byteswap.h"
#include "gamesequence.h"
#include "log.h"

View File

@@ -7,10 +7,10 @@ set(CPPS
add_library(stream_audio STATIC ${HEADERS} ${CPPS})
target_link_libraries(stream_audio PRIVATE
ddebug
ddio
logger
mem
misc
sndlib
)
target_link_libraries(stream_audio PUBLIC

View File

@@ -3,7 +3,8 @@ set(HEADERS
ui.h
uidraw.h
uires.h
uisys.h)
uisys.h
)
set(CPPS
UIButton.cpp
UICombo.cpp
@@ -24,11 +25,11 @@ set(CPPS
add_library(ui STATIC ${HEADERS} ${CPPS})
target_link_libraries(ui PRIVATE
ddebug
ddio
grtext
logger
mem
misc
)
target_include_directories(ui PUBLIC
$<BUILD_INTERFACE:

View File

@@ -4,6 +4,7 @@ set(CPPS
add_library(vecmat STATIC ${HEADERS} ${CPPS})
target_link_libraries(vecmat PRIVATE
ddebug
fix
misc
)

View File

@@ -12,5 +12,4 @@ target_link_libraries(win32 PRIVATE
ddebug
ddio
logger
misc
)