Skip to content

Commit

Permalink
Merge pull request #614 from winterheart/ddebug-update
Browse files Browse the repository at this point in the history
ddebug submodule update
  • Loading branch information
Lgt2x authored Oct 5, 2024
2 parents ac04ec2 + 51da6aa commit 7ca92bd
Show file tree
Hide file tree
Showing 160 changed files with 309 additions and 962 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/AIGoal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@
#include "objinfo.h"
#include "AIMain.h"
#include "room.h"
#include "pserror.h"
#include "psrand.h"
#include "BOA.h"
#include "findintersection.h"
Expand Down
2 changes: 0 additions & 2 deletions Descent3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ set(HEADERS
ctlconfigtxt.h
d3movie.h
d3music.h
d3serial.h
damage.h
damage_external.h
deathinfo_external.h
Expand Down Expand Up @@ -169,7 +168,6 @@ set(CPPS
D3ForceFeedback.cpp
d3movie.cpp
d3music.cpp
d3serial.cpp
damage.cpp
debuggraph.cpp
dedicated_server.cpp
Expand Down
2 changes: 1 addition & 1 deletion Descent3/ConfigItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@

#include "ConfigItem.h"
#include "newui.h"
#include "descent.h"
#include "log.h"
#include "gamefont.h"
#include "mem.h"
#include "pserror.h"
#include "stringtable.h"

#define UI_CHECKBOX_OFF_CHAR 28
Expand Down
6 changes: 3 additions & 3 deletions Descent3/CtlCfgElem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,18 @@
* $NoKeywords: $
*/

#include <cstring>

#include "CtlCfgElem.h"
#include "descent.h"

#include "Macros.h"
#include "ddio.h"
#include "application.h"
#include "renderer.h"
#include "stringtable.h"
#include "gamefont.h"
#include "localization.h"

#include <string.h>
#include "pserror.h"
#include "joystick.h"

// all controller binding texts
Expand Down
7 changes: 2 additions & 5 deletions Descent3/DllWrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,8 @@ void SetObjectDeadFlagDLL(object *obj, bool tell_clients_to_remove, bool tell_cl
void assertdll(int x, const char *expression, const char *file, int line) {
#ifndef RELEASE
if (!(unsigned)(x)) {
LOG_ERROR.printf("Assertion failed (%s) in %s line %d.", expression, file, line);
if (Debug_break)
DEBUG_BREAK();
else
AssertionFailed(expression, file, line);
LOG_ERROR.printf("Assertion failed (%s) in %s:%d.", expression, file, line);
SDL_assert(x);
}
#endif
}
Expand Down
1 change: 1 addition & 0 deletions Descent3/GameLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@
#include "gamefont.h"
#include "renderobject.h"
#include "buddymenu.h"
#include "pserror.h"

#ifdef EDITOR
#include "editor\d3edit.h"
Expand Down
9 changes: 1 addition & 8 deletions Descent3/NewPyroGauges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,8 @@
*/

#include "NewPyroGauges.h"
#include "gauges.h"
#include "gamefont.h"
#include "game.h"
#include "hud.h"
#include "grdefs.h"
#include "bitmap.h"
#include "player.h"
#include "polymodel.h"
#include "3d.h"
#include "pserror.h"
#include "renderer.h"
#include "gametexture.h"

Expand Down
2 changes: 1 addition & 1 deletion Descent3/PilotPicsAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
#include <cstdio>

#include "bitmap.h"
#include "player.h"
#include "pilot.h"
#include "cfile.h"
#include "log.h"
#include "ddio.h"
#include "manage.h"
#include "PilotPicsAPI.h"
#include "pserror.h"
#include "mem.h"

#define PILOTPIC_DATABASE_HOG "PPics.Hog"
Expand Down
1 change: 1 addition & 0 deletions Descent3/SLEW.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
#ifdef EDITOR
#include "editor\mainfrm.h"
#include "editor\d3edit.h"
#include "pserror.h"
#endif

#include <cstdlib>
Expand Down
50 changes: 1 addition & 49 deletions Descent3/TelCom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@
#include "hlsoundlib.h"
#include "soundload.h"
#include "textaux.h"
#include "pserror.h"
#include "psrand.h"
#include "controls.h"
#include "d3music.h"
Expand Down Expand Up @@ -3214,55 +3215,6 @@ void TelcomEndScreen(void) {

float myrand(float max) { return (max * (((float)ps_rand()) / ((float)D3_RAND_MAX))); }

/////////////////////////////////////////////////////////////////////////////
// These are the functions used for serialization, yes they are out of place,
// But that is to keep them away from other parts of the code that has
// the rest of the serialization. These probably can be moved to some other
// file....if this function returns:
// 1 : than it's a serialized exe, num will be given the serial num
// 0 : than it isn't a serialized exe
// -1 : detected a hacked exe
#define INTERNAL_SERIALNUM_TAG "XFCABBFFAX"
char GetInternalSerializationNumber(int *num) {
static char mydata[] = INTERNAL_SERIALNUM_TAG;

// first check to see if the value is the same (non-serialized EXE)
if (mydata[0] == 'X' && ((mydata[9] + 2) == 'Z')) {
int value = 0;
char c;
for (int i = 0; i < 8; i++) {
c = mydata[i + 1];
if (c >= 'A' && c <= 'F') {
value = value * 16 + (c - 'A' + 10);
} else
goto get_num;
}

if (value == 0xFCABBFFA)
return 0;
}

get_num:
// we got to get the serial num if we can
int value = 0;
char c;
for (int i = 0; i < 8; i++) {
c = mydata[i + 1];
if (c >= '0' && c <= '9') {
value = value * 16 + c - '0';
} else if (c >= 'A' && c <= 'F') {
value = value * 16 + c - 'A' + 10;
} else
return -1;
}

// now byte swap the value to get it to it's original value
value = (((value & 0xFF000000) >> 24) | ((value & 0xFF0000) >> 8) | ((value & 0xFF) << 24) | ((value & 0xFF00) << 8));

*num = value;
return 1;
}

/*
****************************************************************
* TelCom Sound Functions *
Expand Down
1 change: 1 addition & 0 deletions Descent3/TelComEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
#include "vecmat.h"
#include "textaux.h"
#include "hlsoundlib.h"
#include "pserror.h"
#include "soundload.h"

tceffect TCEffects[MAX_TCEFFECTS];
Expand Down
1 change: 1 addition & 0 deletions Descent3/TelcomEffectsRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include "hlsoundlib.h"
#include "log.h"
#include "mem.h"
#include "pserror.h"
#include "textaux.h"

int glitch_dx = 0, glitch_dy = 0;
Expand Down
1 change: 1 addition & 0 deletions Descent3/WeaponFire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@
#include "config.h"
#include "ObjScript.h"
#include "doorway.h"
#include "pserror.h"
#include "psrand.h"
#include "BOA.h"

Expand Down
7 changes: 4 additions & 3 deletions Descent3/aiterrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@
* $NoKeywords: $
*/

#include "cstdint"
#include <cstring>

#include "vecmat.h"
#include "terrain.h"
#include "pstypes.h"
#include "findintersection.h"
#include "pserror.h"
#include "aiterrain.h"
#include <string.h>

#define AI_MAX_SEGS_CHECKED 200

Expand Down
1 change: 1 addition & 0 deletions Descent3/ambient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@

#include "room.h"
#include "game.h"
#include "pserror.h"
#include "psrand.h"

#define MAX_AMBIENT_SOUND_PATTERNS 100
Expand Down
1 change: 1 addition & 0 deletions Descent3/attach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "demofile.h"
#include "polymodel.h"
#include "objinfo.h"
#include "pserror.h"

/* // Determines the necessary orientation and position of the moving object
f_use_uvec = true;
Expand Down
2 changes: 1 addition & 1 deletion Descent3/bnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@
#include "mem.h"
#include "vecmat.h"
#include "terrain.h"
#include "room.h"
#include "findintersection.h"
#include "BOA.h"
#include "pserror.h"
#include "psrand.h"

bn_list BNode_terrain_list[8];
Expand Down
1 change: 1 addition & 0 deletions Descent3/bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "mem.h"
#include "polymodel.h"
#include "object.h"
#include "pserror.h"
#include "psrand.h"

#define BSP_TREE_VERSION 10003
Expand Down
1 change: 1 addition & 0 deletions Descent3/cockpit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
#include "log.h"
#include "ship.h"
#include "player.h"
#include "pserror.h"
#include "room.h"
#include "hlsoundlib.h"
#include "sounds.h"
Expand Down
1 change: 1 addition & 0 deletions Descent3/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
#include "terrain.h"
#include "physics.h"
#include "pilot.h"
#include "pserror.h"
#include "hud.h"
#include "bitmap.h"
#include "game.h"
Expand Down
1 change: 1 addition & 0 deletions Descent3/credits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
#include "mem.h"
#include "d3music.h"
#include "hlsoundlib.h"
#include "pserror.h"
#include "psrand.h"

/*
Expand Down
1 change: 1 addition & 0 deletions Descent3/ctlconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
#include "D3ForceFeedback.h"
#include "hlsoundlib.h"
#include "ddio.h"
#include "pserror.h"

//////////////////////////////////////////////////////////////////////////////
#define IDV_KCONFIG 10
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
Loading

0 comments on commit 7ca92bd

Please sign in to comment.