Skip to content

Commit

Permalink
Isolate physics module
Browse files Browse the repository at this point in the history
Update physics module, minor cleanups, remove unused code.
  • Loading branch information
winterheart committed Jul 28, 2024
1 parent b876716 commit b9da6b5
Show file tree
Hide file tree
Showing 27 changed files with 252 additions and 1,205 deletions.
2 changes: 1 addition & 1 deletion Descent3/AImain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@
#include "attach.h"
#include "demofile.h"
#include "matcen.h"
#include "PHYSICS.H"
#include "physics.h"
#include "difficulty.h"
#include "osiris_dll.h"
#include "multi.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/Game2DLL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "vclip.h"
#include "osiris_dll.h"
#include "manage.h"
#include "PHYSICS.H"
#include "physics.h"
#include "collide.h"
#include "render.h"
#include "audiotaunts.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/GameLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@
#include "SmallViews.h"
#include "newui.h"
#include "Inventory.h"
#include "PHYSICS.H"
#include "physics.h"
#include "Controller.h"
#include "controls.h"
#include "gamesequence.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/LoadLevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@
#include "ambient.h"
#include "matcen.h"
#include "dedicated_server.h"
#include "PHYSICS.H"
#include "physics.h"
#include "levelgoal.h"
#include "aiambient.h"
#include "args.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/ObjInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@
#include "player.h"
#include "ship.h"
#include "pserror.h"
#include "PHYSICS.H"
#include "physics.h"
#include "weapon.h"
#include "AIMain.h"
#include "fireball.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@
#include "findintersection.h"
#include "hud.h"
#include "splinter.h"
#include "PHYSICS.H"
#include "physics.h"
#include "viseffect.h"
#include "damage.h"
#include "multi.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
#include "cfile.h"
#include "mem.h"
#include "lighting.h"
#include "PHYSICS.H"
#include "physics.h"
#include "pilot.h"
#include "hud.h"
#include "voice.h"
Expand Down
12 changes: 4 additions & 8 deletions Descent3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,12 @@
* $NoKeywords: $
*/

#ifndef __CONFIG_H__
#define __CONFIG_H__
#ifndef CONFIG_H_
#define CONFIG_H_

#include <cstdint>

// Main menu configuration functions
// ------------------------------------------------------
// ConfigForceFeedback
// Purpose:
// Configures your Force Feedback device on your computer
// ------------------------------------------------------
void ConfigForceFeedback(void);

// General option toggles
struct tGameToggles {
Expand Down
2 changes: 1 addition & 1 deletion Descent3/fireball.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@
#include "objinfo.h"
#include "gametexture.h"
#include "splinter.h"
#include "PHYSICS.H"
#include "physics.h"
#include "damage.h"
#include "gameevent.h"
#include "weapon.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@
#include "pilot.h"
#include "gameloop.h"
#include "trigger.h"
#include "PHYSICS.H"
#include "physics.h"
#include "special_face.h"
#include "voice.h"
#include "localization.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/matcen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
#include "viseffect.h"
#include "viseffect_external.h"
#include "damage.h"
#include "PHYSICS.H"
#include "physics.h"
#include "mem.h"
#include "ObjScript.h"
#ifndef NEWEDITOR
Expand Down
2 changes: 1 addition & 1 deletion Descent3/multi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,7 @@
#include "doorway.h"
#include "object_lighting.h"
#include "spew.h"
#include "PHYSICS.H"
#include "physics.h"
#include "SmallViews.h"
#include "demofile.h"
#include "debuggraph.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@
#include "slew.h"
#include "game.h"
#include "trigger.h"
#include "PHYSICS.H"
#include "physics.h"
#include "collide.h"
#include "door.h"
#include "controls.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/osiris_predefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@
#include "polymodel.h"
#include "multi.h"
#include "viseffect.h"
#include "PHYSICS.H"
#include "physics.h"
#include "levelgoal.h"
#include "BOA.h"
#include "marker.h"
Expand Down
2 changes: 1 addition & 1 deletion Descent3/robotfire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "player.h"
#include "demofile.h"
#include "SmallViews.h"
#include "PHYSICS.H"
#include "physics.h"
#include "AIMain.h"

#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion Descent3/viseffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
#include "lighting.h"
#include "mem.h"
#include "object.h"
#include "PHYSICS.H"
#include "physics.h"
#include "player.h"
#include "polymodel.h"
#include "psrand.h"
Expand Down
1 change: 1 addition & 0 deletions model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ target_link_libraries(model PRIVATE
cfile
mem
misc
physics
)
target_include_directories(model PUBLIC
$<BUILD_INTERFACE:
Expand Down
1 change: 1 addition & 0 deletions netgames/dmfc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ add_library(dmfc STATIC ${HEADERS} ${CPPS})
target_link_libraries(dmfc PUBLIC
grtext
misc
physics
)
15 changes: 10 additions & 5 deletions physics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
set(HEADERS)
set(CPPS
Collide.cpp
FindIntersection.cpp
collide.cpp
findintersection.cpp
newstyle_fi.cpp
physics.cpp)
physics.cpp
)

add_library(physics STATIC ${HEADERS} ${CPPS})
add_library(physics STATIC ${CPPS})
target_link_libraries(physics PRIVATE
ddio
mem
misc
model
sndlib
)
target_include_directories(physics PUBLIC
$<BUILD_INTERFACE:
${PROJECT_SOURCE_DIR}/physics
>
)
Loading

0 comments on commit b9da6b5

Please sign in to comment.