Skip to content

Commit

Permalink
Move pserror.h to ddebug module
Browse files Browse the repository at this point in the history
  • Loading branch information
winterheart committed Sep 24, 2024
1 parent c3b1225 commit a59503f
Show file tree
Hide file tree
Showing 49 changed files with 62 additions and 76 deletions.
5 changes: 3 additions & 2 deletions 2dlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(HEADERS
gr.h
lib2d.h)
lib2d.h
)
set(CPPS
font.cpp
hardsurf.cpp
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions Descent3/d3music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions Descent3/lightmap_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 1 addition & 2 deletions Descent3/lightmap_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Descent3/list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 0 additions & 3 deletions Descent3/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#ifndef LIST_H
#define LIST_H

#include "pstypes.h"
#include "pserror.h"

struct listnode {
void *data;
struct listnode *next;
Expand Down
5 changes: 3 additions & 2 deletions Descent3/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Descent3/procedurals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions Descent3/special_face.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions Descent3/special_face.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions Descent3/terrainrender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions Descent3/viseffect_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions Descent3/weather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

#include "pserror.h"
#include "pstypes.h"
#include "fireball.h"
#include "weather.h"
#include "viseffect.h"
Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion bitmap/pcx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions cfile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(CPPS

add_library(cfile STATIC ${HEADERS} ${CPPS})
target_link_libraries(cfile PRIVATE
ddebug
ddio
logger
mem
Expand Down
2 changes: 1 addition & 1 deletion dd_grwin32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
2 changes: 2 additions & 0 deletions ddebug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion ddio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ target_link_libraries(ddio PRIVATE
ddebug
logger
mem
misc
)
target_include_directories(ddio PUBLIC
$<BUILD_INTERFACE:
Expand Down
1 change: 0 additions & 1 deletion ddio/lnxforcefeedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
*/

#include <filesystem>
#include "pstring.h"
#include "forcefeedback.h"

bool ddForce_found; // a Force Feedback device was found
Expand Down
5 changes: 3 additions & 2 deletions grtext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(HEADERS
grtext.h
grtextlib.h)
grtextlib.h
)
set(CPPS
grfont.cpp
grtext.cpp
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ target_include_directories(linux PUBLIC
>
)
target_link_libraries(linux PRIVATE
ddebug
ddio
misc
SDL2::SDL2
)
1 change: 0 additions & 1 deletion linux/lnxdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@

#include "appdatabase.h"
#include "linux/lnxdatabase.h"
#include "pserror.h"
#include "log.h"
#include "pserror.h"
#include "registry.h"
Expand Down
2 changes: 1 addition & 1 deletion manage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions manage/generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion mem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 2 additions & 7 deletions misc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion model/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(HEADERS
polymodel.h)
polymodel.h
)
set(CPPS
newstyle.cpp
polymodel.cpp
Expand All @@ -8,6 +9,7 @@ set(CPPS
add_library(model STATIC ${HEADERS} ${CPPS})
target_link_libraries(model PRIVATE
cfile
ddebug
logger
mem
misc
Expand Down
2 changes: 1 addition & 1 deletion music/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ add_library(music STATIC ${HEADERS} ${CPPS})
target_link_libraries(music
AudioEncode
cfile
ddebug
ddio
logger
mem
misc
sndlib
stream_audio
)
Expand Down
4 changes: 2 additions & 2 deletions music/music.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@
#ifndef MUSIC_H
#define MUSIC_H

#include "pstypes.h"
#include "pserror.h"
#include <cstdint>

#include "psclass.h"
#include "streamaudio.h"

Expand Down
7 changes: 4 additions & 3 deletions music/omflex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions music/streamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include "log.h"
#include "music.h"
#include "streamaudio.h"
#include "pserror.h"

oms_stream::oms_stream() {}

Expand Down
Loading

0 comments on commit a59503f

Please sign in to comment.