From 7b71873a695b13a5fc704bfc293229ee832d19e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Ro=C3=9F?= Date: Sat, 17 Aug 2024 20:37:29 +0200 Subject: [PATCH] =?UTF-8?q?=EF=BB=BF[Cleanup]=20Removed=20function=20decla?= =?UTF-8?q?rations=20that=20are=20not=20implemented.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 2dlib/gr.h | 6 -- 2dlib/lib2d.h | 9 --- Descent3/AIGoal.h | 4 -- Descent3/AIMain.h | 1 - Descent3/BOA.h | 2 - Descent3/DeathInfo.h | 3 - Descent3/DllWrappers.h | 2 - Descent3/Mission.h | 3 - Descent3/TelCom.h | 14 ---- Descent3/bsp.h | 1 - Descent3/config.h | 2 - Descent3/descent.h | 10 --- Descent3/fireball.h | 3 - Descent3/game.h | 7 -- Descent3/gametexture.h | 1 - Descent3/hud.h | 7 -- Descent3/lighting.h | 17 ----- Descent3/menu.h | 4 -- Descent3/multi.h | 6 -- Descent3/multi_client.h | 4 -- Descent3/multi_ui.h | 1 - Descent3/object.h | 3 - Descent3/objinfo.h | 4 -- Descent3/osiris_predefs.h | 1 - Descent3/pilot.h | 2 +- Descent3/terrain.h | 13 ---- Descent3/weapon.h | 7 -- bitmap/iff.h | 2 - ddebug/mono.h | 2 - ddio/sdljoy.cpp | 1 - editor/drawworld.h | 2 - grtext/grtext.h | 18 ------ lib/3d.h | 34 ---------- lib/Ddgr.h | 29 --------- lib/forcefeedback.h | 22 ------- lib/joystick.h | 5 -- lib/networking.h | 20 ------ lib/rend_opengl.h | 127 ------------------------------------- lib/vecmat.h | 3 - manage/gamefilepage.h | 5 -- module/module.cpp | 3 - music/music.h | 1 - physics/findintersection.h | 3 - scripts/osiris_vector.h | 3 - sndlib/hlsoundlib.h | 2 - sndlib/sdlsound.h | 2 - stream_audio/streamaudio.h | 4 -- ui/UIlib.h | 3 - ui/ui.h | 1 - ui/uisys.h | 3 - 50 files changed, 1 insertion(+), 431 deletions(-) diff --git a/2dlib/gr.h b/2dlib/gr.h index e7237835..76f89baf 100644 --- a/2dlib/gr.h +++ b/2dlib/gr.h @@ -424,10 +424,8 @@ class grViewport { tCharProperties char_Props; private: - void draw_text(grTextAlign align, int x, int y, char *str); void draw_text_line(int x, int y, char *str); void draw_text_line_clip(int x, int y, char *str); - int clip_line(int &l, int &t, int &r, int &b); int clip_rect(int &x1, int &y1, int &x2, int &y2); protected: @@ -487,10 +485,6 @@ public: grSurface *lock(); // lock and void unlock(); // unlock (implicitly locks surface) - friend grSurface *VP_GET_DRAWING_SURFACE(); - friend void VP_BEGIN_DRAWING(grViewport *vp); - friend void VP_END_DRAWING(); - // these functions only work on locked surfaces. void hline(ddgr_color, int x1, int x2, int y1); void line(ddgr_color color, int x1, int y1, int x2, int y2); diff --git a/2dlib/lib2d.h b/2dlib/lib2d.h index 9615fb6b..d904e2ed 100644 --- a/2dlib/lib2d.h +++ b/2dlib/lib2d.h @@ -38,15 +38,6 @@ struct mem_bitmap { #define MEMFLAG_TRANSBLT 1 -// --------------------------------------------------------------------------- -// Line Drawing Functions - -void gr_Line(gr_pen *pen, int x1, int y1, int x2, int y2); -void gr_HLine(gr_pen *pen, int x1, int x2, int y); -void gr_VLine(gr_pen *pen, int y1, int y2, int x); -void gr_Rect(gr_pen *pen, int l, int t, int r, int b); -void gr_FillRect(gr_pen *pen, int l, int t, int r, int b); - // --------------------------------------------------------------------------- // Memory surface functions diff --git a/Descent3/AIGoal.h b/Descent3/AIGoal.h index b824ed81..e39719eb 100644 --- a/Descent3/AIGoal.h +++ b/Descent3/AIGoal.h @@ -113,10 +113,6 @@ void GoalClearAll(object *obj); int GoalAddGoal(object *obj, uint32_t goal_type, void *args, int level = 0, float influence = 1.0f, int f_goal = 0, int guid = -1, char subtype = 0); -// Adds a ending condition to a goal -int GoalAddDisabler(object *obj, int goal_index, uint8_t ender_type, void *args, float percent = 1.0f, - float interval = 0.0f); - // Adds a enabler condition to a goal int GoalAddEnabler(object *obj, int goal_index, uint8_t enabler_type, void *arg_struct, float percent, float interval); diff --git a/Descent3/AIMain.h b/Descent3/AIMain.h index 819ba56a..91b1c4b2 100644 --- a/Descent3/AIMain.h +++ b/Descent3/AIMain.h @@ -183,7 +183,6 @@ void AITurnTowardsPosition(object *obj, /*velocity *new_vel,*/ vector *pos /*, b bool AIFindHidePos(object *hide_obj, object *view_obj, vector *hpos, int *hroom, float max_hide_time = 3.0f); int AIFindRoomWithFlag(object *obj, int flag); object *AIFindObjOfType(object *obj, int type, int id, bool f_ignore_init_room, int parent_handle = OBJECT_HANDLE_NONE); -float AIFindDist(vector *s_pos, int s_roomnum, vector *e_pos, int e_roomnum, int flags); bool AIStatusCircleFrame(object *obj, object *g_obj, float dist, float c_dist, int *status_reg); bool AIObjEnemy(object *obj, object *target); bool AISetTarget(object *obj, int handle); diff --git a/Descent3/BOA.h b/Descent3/BOA.h index ca4f4eff..b3a3cf48 100644 --- a/Descent3/BOA.h +++ b/Descent3/BOA.h @@ -252,8 +252,6 @@ void MakeBOAVisTable(bool from_lighting = 0); void ComputeAABB(bool f_full); bool BOA_ComputeMinDist(int start_room, int end_room, float max_check_dist, float *dist, int *num_blockages = NULL); -bool BOA_ComputePropDist(int start_room, vector *start_pos, int end_room, vector *end_pos, float *dist, - int *num_blockages); bool BOA_IsSoundAudible(int start_room, int end_room); bool BOA_IsVisible(int start_room, int end_room); bool BOA_HasPossibleBlockage(int start_room, int end_room); diff --git a/Descent3/DeathInfo.h b/Descent3/DeathInfo.h index 5a3e7b98..351e3bb8 100644 --- a/Descent3/DeathInfo.h +++ b/Descent3/DeathInfo.h @@ -52,9 +52,6 @@ #ifndef _DEATHINFO_H #define _DEATHINFO_H -// Get the death delay type -#define DEATH_DELAY(f) (f & DF_DELAY_MASK) - // Get the explosion size #define DEATH_EXPL_SIZE(f) (f & DF_EXPL_SIZE_MASK) diff --git a/Descent3/DllWrappers.h b/Descent3/DllWrappers.h index 21506973..170eb8a6 100644 --- a/Descent3/DllWrappers.h +++ b/Descent3/DllWrappers.h @@ -40,8 +40,6 @@ void D3W_TouchSound(int sound_index); void MonoPrintf(int n, char *format, ...); // checks a players inventory for an object type/id bool InvCheckItem(int playernum, int type, int id); -// adds an object to a player inventory -bool InvAdd(int playernum, object *obj, bool remove = true); // adds a type/id to a player inventory bool InvAddTypeID(int playernum, int type, int id, int aux_type = -1, int aux_id = -1, int flags = 0, const char *description = NULL); // removes a type/id from a players inventory diff --git a/Descent3/Mission.h b/Descent3/Mission.h index de8310f9..6701ea9e 100644 --- a/Descent3/Mission.h +++ b/Descent3/Mission.h @@ -307,9 +307,6 @@ bool LoadMissionLevel(int level); // initializes the mission script bool InitMissionScript(); -// Objectives -void CompletedPrimaryObjective(); - // Shows text on a background void ShowProgressScreen(const char *str, const char *str2 = NULL, bool flip = true); diff --git a/Descent3/TelCom.h b/Descent3/TelCom.h index 6840fd41..ad137eb0 100644 --- a/Descent3/TelCom.h +++ b/Descent3/TelCom.h @@ -31,9 +31,6 @@ // inits the Telcom system...needs to be called before anything else, only needs to be called once void TelComInit(void); -// handles input processing, etc -void TelComDefer(void); - // Pages in all the necessary bitmaps, textures & sounds for the TelCom so that they are in memory void TelcomPageAllIn(void); @@ -150,17 +147,6 @@ int HotSpotL(int hotspot); int HotSpotR(int hotspot); int HotSpotT(int hotspot); int HotSpotB(int hotspot); -/* -void TCStartPowerupSound(void); -void TCStopPowerupSound(void); -void TCStartPowerDownSound(void); -void TCStopPowerDownSound(void); -void TCStartRunningSound(void); -void TCStopRunningSound(void); -void TCStartStaticSound(float amp); -*/ -void TCStartBulbSound(void); -void DoCursor(void); extern hotspotmap_t hotspotmap; extern windowmap_t windowmap; diff --git a/Descent3/bsp.h b/Descent3/bsp.h index 440355a4..84232f4d 100644 --- a/Descent3/bsp.h +++ b/Descent3/bsp.h @@ -101,7 +101,6 @@ void BuildBSPTree(); // Runs a ray through the bsp tree // Returns true if a ray is occludes int BSPRayOccluded(vector *start, vector *end, bspnode *node); -int BSPReportStatus(vector *start, bspnode *node); // Walks the BSP tree and frees up any nodes/polygons that we might be using void DestroyBSPTree(bsptree *tree); diff --git a/Descent3/config.h b/Descent3/config.h index d2079aab..15be446c 100644 --- a/Descent3/config.h +++ b/Descent3/config.h @@ -173,8 +173,6 @@ struct tDetailSettings { // Call this with one of the above defines to set the detail level to a predefined set (custom level is ignored) void ConfigSetDetailLevel(int level); -// returns the current detail level that the given tDetailSettings is at -int ConfigGetDetailLevel(tDetailSettings *ds); #define DETAIL_LEVEL_LOW 0 #define DETAIL_LEVEL_MED 1 diff --git a/Descent3/descent.h b/Descent3/descent.h index 65e0fcd3..3450cf9d 100644 --- a/Descent3/descent.h +++ b/Descent3/descent.h @@ -214,16 +214,6 @@ void D3DeferHandler(bool is_active); void SetFunctionMode(function_mode mode); function_mode GetFunctionMode(); -// these functions create viewports from the game screen in a 'nice' C way -void CreateGameViewport(grViewport **vp); -void DestroyGameViewport(grViewport *vp); - -inline void CREATE_VIEWPORT(grViewport **vp) { CreateGameViewport(vp); } - -inline void DESTROY_VIEWPORT(grViewport *vp) { DestroyGameViewport(vp); } - -inline void DELAY(float secs) { Descent->delay(secs); } - #ifndef RELEASE // this is called when you hit a debug break! void D3DebugStopHandler(); diff --git a/Descent3/fireball.h b/Descent3/fireball.h index a4b2e6db..c57aef34 100644 --- a/Descent3/fireball.h +++ b/Descent3/fireball.h @@ -212,9 +212,6 @@ void DoDebrisFrame(object *obj); // Process a dying object for one frame void DoDyingFrame(object *objp); -// A quick way to see where a weapon hits. Weapons make debris. -void CreateWeaponDebris(object *obj); - // Creates a concussive blast (physics based -- no visuals) void MakeShockwave(object *explode_obj_ptr, int parent_handle); diff --git a/Descent3/game.h b/Descent3/game.h index 29c90545..3dce2bec 100644 --- a/Descent3/game.h +++ b/Descent3/game.h @@ -331,13 +331,6 @@ extern int Missile_camera_window; // contains all relevent information for gamemode pertaining to d3x system. extern gamemode Gamemode_info; -// Starts the game-engine "cutscene" -// Puts the player in AI mode, sets the view to an external camera, switches to letterbox, & puts the player on a path -// Parameters: camera - the camera for the view -// pathnum - the path the player should follow -// time - if > 0.0, how long the sequence plays before the level ends -void StartEndlevelSequence(object *camera, int pathnum, float time); - inline void ResetGamemode() { Gamemode_info.scriptname[0] = 0; Gamemode_info.requested_num_teams = 1; diff --git a/Descent3/gametexture.h b/Descent3/gametexture.h index eecc32e3..8b410181 100644 --- a/Descent3/gametexture.h +++ b/Descent3/gametexture.h @@ -313,7 +313,6 @@ extern int Num_textures; // Inits the texture system, returning 1 if successful int InitTextures(); -void ShutdownTextures(); // Set aside a texture for use int AllocTexture(void); diff --git a/Descent3/hud.h b/Descent3/hud.h index c053c141..3b94ea4b 100644 --- a/Descent3/hud.h +++ b/Descent3/hud.h @@ -358,17 +358,10 @@ bool AddBlinkingHUDMessage(const char *format, ...); // a "-playermessages" command line. bool AddFilteredHUDMessage(const char *format, ...); -// initializes other hud stuff -void SetHUDEnergyImage(const char *energy_img); -void SetHUDAfterburnImage(const char *afterburn_img); - // Renders all the messages we have in the message list. If HUD_MESSAGE_TIME has // elapsed, then punt the oldest message and move the others up one void RenderHUDMessages(); -// renders ship stats -void RenderHUDStats(tStatMask stat_mask); - // Handles all incoming keys for an inputted hud message void DoHUDInputMessageKey(int key); diff --git a/Descent3/lighting.h b/Descent3/lighting.h index 2d8081df..7d7cfb04 100644 --- a/Descent3/lighting.h +++ b/Descent3/lighting.h @@ -74,29 +74,12 @@ void ClearDynamicLightmaps(); void ApplyLightingToTerrain(vector *pos, int cellnum, float light_dist, float red_scale, float green_scale, float blue_scale, vector *light_direction = NULL, float dot_range = 0); -// Gets the viewable lightmap elements -void FindValidLightmapElements(face *fp, dynamic_face *dynamic_fp, vector *light_pos, float light_dist); -// Does a quad tree algo to find what lightmap elements are viewable from our lightsource -int SearchLightQuadTree(face *fp, vector *rvec, vector *uvec, dynamic_face *dynamic_fp, vector *light_pos, - float light_dist); - // Given a float, returns the index into the Ubyte_float_table that this number // corresponds to uint8_t Float_to_ubyte(float fnum); extern float Ubyte_to_float[]; -// Draws the shadows that happen to be falling on a particular face -void DoShadowsForFace(room *rp, int facenum); - -// Sets the num_timer_faces field in Room structure to correspond to the number of faces -// that have flickering lights -void CountFaceLights(); - -// Goes through all rooms and all faces and lights any faces that have their timer values -// set -void DoFaceLighting(); - // Sets pulse parameters for an entire room void SetRoomPulse(room *rp, uint8_t pulse_time, uint8_t pulse_offset); diff --git a/Descent3/menu.h b/Descent3/menu.h index 24e1580c..0c0d543a 100644 --- a/Descent3/menu.h +++ b/Descent3/menu.h @@ -102,10 +102,6 @@ struct menu { // this displays the main menu options and runs the menu system int MainMenu(); -// opens options menu. -// ingame = true (if calling while playing the game) -void MenuOptions(bool ingame); - // DisplayLevelWarpDlg // pass in the max level allowed to be chosen, if -1, than all levels are allowed (a.k.a level warp cheat) int DisplayLevelWarpDlg(int max_level); diff --git a/Descent3/multi.h b/Descent3/multi.h index d702d220..7b38294a 100644 --- a/Descent3/multi.h +++ b/Descent3/multi.h @@ -911,12 +911,6 @@ void MultiExtractMatrix(matrix *dest, multi_orientation *src); void MultiSendBlowupBuilding(int, int, float); -// Return index of powerup that has matching table entry -int MultiMatchPowerup(int unique_id); - -// Return index of robot that has matching table entry -int MultiMatchRobot(int unique_id); - // Builds the tables for uniquely identifying powerups and robots void MultiBuildMatchTables(); diff --git a/Descent3/multi_client.h b/Descent3/multi_client.h index bbfbe5af..897a0154 100644 --- a/Descent3/multi_client.h +++ b/Descent3/multi_client.h @@ -35,8 +35,4 @@ struct saved_move { extern saved_move SavedMoves[]; extern int Current_saved_move; -// Alloc and free saved move -extern int MultiAllocSavedMove(); -extern void MultiFreeSavedMove(int); - #endif diff --git a/Descent3/multi_ui.h b/Descent3/multi_ui.h index fcc75f7f..6acfa292 100644 --- a/Descent3/multi_ui.h +++ b/Descent3/multi_ui.h @@ -24,7 +24,6 @@ // Returns true if we're starting a multiplayer game int MainMultiplayerMenu(); int SearchMasterTrackerGameMenu(); -int LoginMasterTrackerGameMenu(); int AutoConnectPXO(); int AutoConnectLANIP(); int AutoConnectHeat(); diff --git a/Descent3/object.h b/Descent3/object.h index c4db45dc..803f6dbd 100644 --- a/Descent3/object.h +++ b/Descent3/object.h @@ -766,9 +766,6 @@ void ObjDoFrameAll(); // set viewer object to next object in array void ObjGotoNextViewer(); -// move an object for the current frame -void ObjMoveOne(object *obj); - // Sets the position of an object. This should be called whenever an object moves. // Parameters: obj - the object being moved // pos - the new position diff --git a/Descent3/objinfo.h b/Descent3/objinfo.h index 7af01532..a75deab5 100644 --- a/Descent3/objinfo.h +++ b/Descent3/objinfo.h @@ -552,10 +552,6 @@ int GetObjectImage(int handle); // Given an object, renders the representation of this object void DrawObject(object *obj); -// Moves an object from a given index into a new one (above MAX_STATIC_IDS) -// returns new index -int MoveObjectFromIndex(int index); - // Remap all the static object ids (objects that must have a specific index) into their assigned slots. void RemapStaticIDs(); diff --git a/Descent3/osiris_predefs.h b/Descent3/osiris_predefs.h index b1d16431..0df22fa2 100644 --- a/Descent3/osiris_predefs.h +++ b/Descent3/osiris_predefs.h @@ -245,7 +245,6 @@ int osipf_AISetGoalFlags(int objhandle, int goal_handle, int flags, uint8_t f_en uint8_t osipf_AITurnTowardsVectors(int objhandle, vector *fvec, vector *uvec); uint8_t osipf_AIMoveTowardsPosition(int objhandle, vector *pos, int *roomnum, float scalar, bool f_bline, bool f_bline_if_vis); -uint8_t osipf_AIMoveTowardsDir(int objhandle, vector *dir, float scalar); void osipf_AIValue(int objhandle, char op, char vtype, void *ptr); diff --git a/Descent3/pilot.h b/Descent3/pilot.h index 534f5560..85f78586 100644 --- a/Descent3/pilot.h +++ b/Descent3/pilot.h @@ -192,7 +192,7 @@ // Brings up a window where you can select a pilot to use void PilotSelect(); -// creates a new pilot (and pilot file) (if you call this you should call PilotConfig() after it) +// creates a new pilot (and pilot file) // Returns: true on success // Pilot: pointer to pilot structure to be filled in with name and filename (should then configure the rest) bool PilotCreate(pilot *Pilot, bool dontallowcancel); diff --git a/Descent3/terrain.h b/Descent3/terrain.h index 365f0dad..d2928ef5 100644 --- a/Descent3/terrain.h +++ b/Descent3/terrain.h @@ -286,7 +286,6 @@ void GenerateTerrainLight(); void BuildMinMaxTerrain(); void BuildTerrainNormals(); -int DrawTerrainTriangles(int n); int LoadPCXTerrain(char *); // Given a position, returns the terrain segment that that position is in/over @@ -297,11 +296,6 @@ int GetTerrainCellFromPos(vector *pos); // The return value is a valid room number, meaning it has the outside flag set int GetTerrainRoomFromPos(vector *pos); -// Given a position, returns the collision terrain segment that that position is in/over -int GetColTerrainSegFromPos(vector *pos); -// Given a terrain cell, returns the collision terrain segment that that position is in/over -int GetColTerrainSegFromTerrainSeg(int cell_index); - // Computes the center of the segment in x,z and also sets y touching the ground void ComputeTerrainSegmentCenter(vector *pos, int segnum); // Given an position, returns the terrain Y coord at that location @@ -322,10 +316,6 @@ void GetSpecialRotatedPoint(g3Point *dest, int x, int z, float yvalue); // Takes our light angle and fills in the appropriate values in the lightsource vector void GenerateLightSource(); -// Returns the terrain segment index of the farthest point that mine segment "mine_seg" -// touches. Based on Camera_direction -int GetFurthestMineSegment(int mine_seg); - // codes a point for visibility in the window passed to RenderTerrain() uint8_t CodeTerrainPoint(g3Point *p); @@ -335,9 +325,6 @@ void GenerateLODDeltas(); // Generates lightmaps based on the info given by the .light field of each Terrain_seg void UpdateTerrainLightmaps(); -// Makes a four sided rectangle pinched into a triangle -void MakePinchBitmap(int dest_bm, int src_bm); - // Gets the dynamic light value for this position float GetTerrainDynamicScalar(vector *pos, int seg); diff --git a/Descent3/weapon.h b/Descent3/weapon.h index 64231b89..4cdfa32d 100644 --- a/Descent3/weapon.h +++ b/Descent3/weapon.h @@ -380,10 +380,6 @@ void RemapWeapons(); // and changes the old index to the new index void RemapAllWeaponObjects(int old_index, int new_index); -// Creates a weapon -// Returns the objnum of the weapon object -int CreateWeaponObject(int weapon_num, int segnum, vector *position, int flags); - // Creates an weapon and sends it speeding on its way // returns the objnum of the weapon int CreateAndFireWeapon(vector *pos, vector *dir, object *parent, int weapon_num); @@ -419,9 +415,6 @@ bool WeaponCalcGun(vector *gun_point, vector *gun_normal, object *obj, int gun_n // Checks for relation between weapons and other objects extern bool ObjectsAreRelated(int o1, int o2); -// A quick way to see where a weapon hits. Weapons make debris. -void CreateWeaponDebris(object *obj); - // Selects a weapon void SelectWeapon(int slot); diff --git a/bitmap/iff.h b/bitmap/iff.h index 4cbe9558..afdbecf1 100644 --- a/bitmap/iff.h +++ b/bitmap/iff.h @@ -50,8 +50,6 @@ int bm_tga_alloc_file(CFILE *infile, char *name, int format = 0); // Loads a pcx file and converts it to 16 bit. Returns bitmap handle or -1 on error int bm_pcx_alloc_file(CFILE *infile); -int bm_tga_load_short_file(CFILE *infile, char *name); - // Pages in bitmap index n. Returns 1 if successful, 0 if not int bm_page_in_file(int n); diff --git a/ddebug/mono.h b/ddebug/mono.h index e45916d8..33a87433 100644 --- a/ddebug/mono.h +++ b/ddebug/mono.h @@ -76,11 +76,9 @@ #define mprintf(...) Debug_ConsolePrintf(__VA_ARGS__) // Prints a formatted string on window n at row, col. #define mprintf_at(...) Debug_ConsolePrintfAt(__VA_ARGS__) -#define DebugBlockPrint(...) #else // ifdef _DEBUG // DAJ defined in target headers #define mprintf(...) #define mprintf_at(...) -#define DebugBlockPrint(...) #endif // ifdef _DEBUG #endif diff --git a/ddio/sdljoy.cpp b/ddio/sdljoy.cpp index b027fcee..9451a3e6 100644 --- a/ddio/sdljoy.cpp +++ b/ddio/sdljoy.cpp @@ -85,7 +85,6 @@ static struct { tJoyInfo caps; } Joysticks[MAX_JOYSTICKS]; void joy_Close(); -void joy_GetState(tJoystick stick, tJoyPos *pos); static int joyGetNumDevs(void); // closes a stick // closes connection with controller. diff --git a/editor/drawworld.h b/editor/drawworld.h index 940cc887..73370cd0 100644 --- a/editor/drawworld.h +++ b/editor/drawworld.h @@ -57,8 +57,6 @@ #include "vecmat.h" void DrawWorld(grViewport *vp, vector *view_target, matrix *view_orient, float view_dist, int start_room, float rad); -void DrawWorldRoom(grViewport *vp, vector *view_target, matrix *view_orient, float view_dist, int start_room, - int depth); void DrawTerrainWorld(grViewport *vp, vector *view_target, matrix *view_orient, float view_dist); diff --git a/grtext/grtext.h b/grtext/grtext.h index 350baf26..ffc3d8a5 100644 --- a/grtext/grtext.h +++ b/grtext/grtext.h @@ -193,24 +193,6 @@ void grtext_Flush(); // renders all text but DOESN'T flush buffer void grtext_Render(); -// gets character information for the current string -// ch is a SINGLE CHARACTER -// col is the color of the current string as reported through formatting, or GR_NULL if no info -// x is the old x before call and the new potential adjusted x after the call. -// newline if it's a newline. -// line start x; -struct tGetCharInfo { - int sx; // this will not be modified. the initial x on the same line as the string - - ddgr_color col; // these values will be modified - int x, w; // x of char, and width of char. - bool newline; // reached a newline? - bool font_char; // character exists in font? - char ch; -}; - -const char *grtext_GetChar(const char *str, tGetCharInfo *ci); - ////////////////////////////////////////////////////////////////////////////// // font functions! diff --git a/lib/3d.h b/lib/3d.h index 0c1fdd5c..2d49b639 100644 --- a/lib/3d.h +++ b/lib/3d.h @@ -187,8 +187,6 @@ #include "grdefs.h" #include "float.h" -extern int g3d_interp_outline; // if on, polygon models outlined in white - extern vector Matrix_scale; // how the matrix is currently scaled // Structure for storing u,v,light values. This structure doesn't have a @@ -294,25 +292,12 @@ void g3_DoneInstance(); // Misc utility functions: -// get current field of view. Fills in angle for x & y -void g3_GetFOV(float *fov_x, float *fov_y); - -// get zoom. For a given window size, return the zoom which will achieve -// the given FOV along the given axis. -float g3_GetZoom(char axis, float fov, int16_t window_width, int16_t window_height); - -// returns the normalized, unscaled view vectors -void g3_GetViewVectors(vector *forward, vector *up, vector *right); - // returns true if a plane is facing the viewer. takes the unrotated surface // normal of the plane, and a point on it. The normal need not be normalized bool g3_CheckNormalFacing(vector *v, vector *norm); // Point definition and rotation functions: -// returns codes_and & codes_or of a list of points numbers -g3Codes g3_CheckCodes(int nv, g3Point **pointlist); - // rotates a point. returns codes. does not check if already rotated uint8_t g3_RotatePoint(g3Point *dest, vector *src); @@ -363,25 +348,6 @@ void g3_DrawBitmap(vector *pos, float width, float height, int bm, int color = - // Draws a bitmap that has been rotated about its center. Angle of rotation is passed as 'rot_angle' void g3_DrawRotatedBitmap(vector *pos, angle rot_angle, float width, float height, int bm, int color = -1); -// specifies 2d drawing routines to use instead of defaults. Passing -// NULL for either or both restores defaults -void g3_SetSpecialRender(void (*tmap_drawer)(), void (*flat_drawer)(), int (*line_drawer)()); - -// Object functions: - -// init code for bitmap models -void g3_InitPolygonModel(void *model_ptr); - -// un-initialize, i.e., convert color entries back to RGB15 -void g3_UninitPolygonModel(void *model_ptr); - -// alternate interpreter for morphing object -void g3_DrawMorphingModel(void *model_ptr, int *model_bitmaps, angvec *anim_angles, float light, vector *new_points); - -// this remaps the 15bpp colors for the models into a new palette. It should -// be called whenever the palette changes -void g3_RemapInterpColors(void); - // Draw a wireframe box aligned with the screen. Used for the editor. // Parameters: color - the color to draw the lines // pnt - the center point diff --git a/lib/Ddgr.h b/lib/Ddgr.h index 82087676..9fafe902 100644 --- a/lib/Ddgr.h +++ b/lib/Ddgr.h @@ -232,33 +232,4 @@ bool ddgr_surf_FlipVideo(ddgr_surface *sf); void ddgr_surf_Clear(ddgr_surface *dsf, ddgr_color col, int l, int t, int w, int h); bool ddgr_surf_Blt(ddgr_surface *dsf, int dx, int dy, ddgr_surface *ssf, int sx, int sy, int sw, int sh); -/* - 8-bit palette surface structures -*/ -struct ddgr_rgb { - uint8_t r, g, b; // RGB triplet - uint8_t x; // reserved... -}; - -struct ddgr_palette { - void *obj; // internal object - ddgr_rgb rgb[256]; // rgb values for palette. -}; - -// attaches a palette to an 8-bit surface only. -bool ddgr_surf_AttachPalette(ddgr_surface *surf, ddgr_palette *pal); - -// grabs a palette. -bool ddgr_surf_GetPalette(ddgr_surface *surf, ddgr_palette *pal); - -// creates and destroys palette objects. -bool ddgr_8bit_CreatePalette(ddgr_palette *pal); -bool ddgr_8bit_DestroyPalette(ddgr_palette *pal); - -// loads a palette with specified entriyes -bool ddgr_8bit_LoadPalette(ddgr_palette *pal, int start, int count); - -// returns an index into the palette -int ddgr_8bit_FindClosestColor(ddgr_palette *pal, ddgr_color col); - #endif diff --git a/lib/forcefeedback.h b/lib/forcefeedback.h index 0e98ed3a..c5fdd8c0 100644 --- a/lib/forcefeedback.h +++ b/lib/forcefeedback.h @@ -426,28 +426,6 @@ bool ddio_ffjoy_SupportAutoCenter(tDevice dev); Private Functions =========================================================================== */ -#if defined(WIN32) -// ------------------------------------------------------------------- -// ddio_ffjoy_AcquireErr -// Purpose: -// Handle success/err reporting -// ------------------------------------------------------------------- -static int ddio_ffjoy_AcquireErr(HRESULT res, int dev_num); -// ------------------------------------------------------------------- -// FFEnumCallback -// Purpose: -// Initialize all connected joysticks. -// -// Input: -// pdinst info about the current joystick being enumed. -// pvRef the direct input object that was passed in before -// starting the enum process. -// Return: -// DIENUM_CONTINUE continue calling us with any more devices -// DIENUM_STOP all done, don't call us back anymore, go away. -// ------------------------------------------------------------------- -BOOL CALLBACK FFEnumCallback(LPCDIDEVICEINSTANCE pdinst, LPVOID pvRef); -#endif // Given a filename resource, this loads the file and creates a resource // for it. It returns a handle to that resource. // If it returns NULL, then it couldn't load the project. diff --git a/lib/joystick.h b/lib/joystick.h index f3cc6b8b..14ca4520 100644 --- a/lib/joystick.h +++ b/lib/joystick.h @@ -125,11 +125,6 @@ struct tJoyInfo { #define JOY_INFO "INFO" #define JOY_POLL "POLL" -struct tJoyPacket { - char coda[4]; // used to identify packet - char buf[128]; -}; - struct tJoyPos { int x; int y; diff --git a/lib/networking.h b/lib/networking.h index a1aac7d4..3d0188cb 100644 --- a/lib/networking.h +++ b/lib/networking.h @@ -393,11 +393,6 @@ uint16_t nw_CalculateChecksum(void *vptr, int len); // Sends data on an unreliable socket int nw_Send(network_address *who_to, void *data, int len, int flags); -// nw_ReceiveFromSocket will get data out of the socket and stuff it into the packet_buffers -// nw_Receive now calls this function, then determines which of the packet buffers -// to package up and use -void nw_ReceiveFromSocket(); - // routine to "free" a packet buffer void nw_FreePacket(int id); @@ -413,24 +408,9 @@ int nw_SendReliable(uint32_t socketid, uint8_t *data, int length, bool urgent = // and this may be a source of bugs). int nw_ReceiveReliable(SOCKET socket, uint8_t *buffer, int max_len); -// Returns the current protocol in use -int nw_GetProtocolType(); - // Copies my address into the passed argument void nw_GetMyAddress(network_address *addr); -// Sends a packet to the game tracker -int nw_SendGameTrackerPacker(void *packet); - -// Checks for an incoming game tracker packet. -int nw_ReceiveGameTracker(void *packet); - -// Send a packet to the pilot tracker -int nw_SendPilotTrackerPacket(void *packet); - -// Checks for an incoming pilot tracker packet. -int nw_ReceivePilotTracker(void *packet); - int nw_PingCompare(const void *arg1, const void *arg2); // initialize the buffering system diff --git a/lib/rend_opengl.h b/lib/rend_opengl.h index a95871ca..f4c1cf07 100644 --- a/lib/rend_opengl.h +++ b/lib/rend_opengl.h @@ -29,132 +29,5 @@ int opengl_Init(oeApplication *app, renderer_preferred_state *pref_state); // Closes down opengl void opengl_Close(const bool just_resizing=false); -void opengl_Shutdown(); - -// The main drawing function...draws a flat/textured/gouraud polygon -void opengl_DrawPolygon(int, g3Point **, int, int); - -void opengl_SetFlatColor(ddgr_color color); - -// Ends a frame -void opengl_EndFrame(); - -// Flips the screen -void opengl_Flip(); - -// Does setup for a new frame -void opengl_BeginFrame(int, int, int, int, int); - -// Tells opengl what kind of texturing (linear/perspective) we want -void opengl_SetTextureType(texture_type); - -// Sets the lighting state of opengl -void opengl_SetLightingState(light_state state); - -// Sets the opengl color model (either rgb or mono) -void opengl_SetColorModel(color_model state); - -// Sets the state of bilinear filtering for our textures -void opengl_SetFiltering(int8_t state); - -// Sets the state of zbuffering to on or off -void opengl_SetZBufferState(int8_t state); - -// Sets the near/far z values for zbuffering -void opengl_SetZValues(float nearz, float farz); - -// Sets a bitmap as a lightmap to rendered on top of the next texture map -// a -1 value indicates no lighting map -void opengl_SetLightingMap(int handle); - -// Clears the display to a specified color -void opengl_ClearScreen(ddgr_color color); - -// Fills a rectangle on the display -void opengl_FillRect(ddgr_color color, int x1, int y1, int x2, int y2); - -// Sets a pixel on the display -void opengl_SetPixel(ddgr_color color, int x, int y); - -// Sets the near and far plane of fog -void opengl_SetFogBorders(float nearz, float farz); - -// Sets the fog state to on or off -void opengl_SetFogState(int8_t state); - -// Fills in projection variables -void opengl_GetProjectionParameters(int *width, int *height); -void opengl_GetProjectionScreenParameters(int &screenLX, int &screenTY, int &screenW, int &screenH); - -// Returns the aspect ratio of the physical screen -float opengl_GetAspectRatio(); - -// Sets texture wrapping type -void opengl_SetWrapType(wrap_type val); - -// Sets the constant alpha value -void opengl_SetAlphaValue(uint8_t val); - -// Sets the overall alpha scale factor (all alpha values are scaled by this value) -// usefull for motion blur effect -void opengl_SetAlphaFactor(float val); - -// Returns the current Alpha factor -float opengl_GetAlphaFactor(void); - -// Sets the type of alpha blending you want -void opengl_SetAlphaType(int8_t atype); - -// Sets whether or not to write into the zbuffer -void opengl_SetZBufferWriteMask(int state); - -// Gets the current state of the renderer -void opengl_GetRenderState(rendering_state *rstate); - -// draws a line -void opengl_DrawLine(int x1, int y1, int x2, int y2); - -// draws a line -void opengl_DrawSpecialLine(g3Point *p0, g3Point *p1); - -// Sets the color that opengl uses for fog -void opengl_SetFogColor(ddgr_color color); - -// Sets the coplanar z bias for rendered polygons -void opengl_SetCoplanarPolygonOffset(float factor); - -// Sets up a some global preferences for openGL -int opengl_SetPreferredState(renderer_preferred_state *pref_state); - -// Sets the gamma correction value -void opengl_SetGammaValue(float val); - -// Takes a screenshot of the frontbuffer and puts it into the passed bitmap handle -void opengl_Screenshot(int bm_handle); - -// Returns the pixel color at x,y -ddgr_color opengl_GetPixel(int, int); - -// Clears the zbuffer -void opengl_ClearZBuffer(); - -// Clears the texture cache -void opengl_ResetCache(); - -// Takes a bitmap and blits it to the screen using linear frame buffer stuff -// X and Y are the destination X,Y -void opengl_CopyBitmapToFramebuffer(int bm_handle, int x, int y); - -// Gets a renderer ready for a framebuffer copy, or stops a framebuffer copy -void opengl_SetFrameBufferCopyState(bool state); - -#if defined(WIN32) -// returns directdraw object -void *opengl_DirectDrawObj(); -#endif - -// returns rendering statistics for the frame -void opengl_GetStatistics(tRendererStats *stats); - #endif diff --git a/lib/vecmat.h b/lib/vecmat.h index 279830d6..2bf10346 100644 --- a/lib/vecmat.h +++ b/lib/vecmat.h @@ -187,9 +187,6 @@ extern void vm_MatrixMul(matrix *, matrix *, matrix *); // Multiply a matrix times the transpose of a matrix void vm_MatrixMulTMatrix(matrix *dest, matrix *src0, matrix *src1); -// Computes all math look up tables, must be called before any vector stuff is used -extern void vm_InitMathTables(); - // Given a vector, returns the magnitude. Uses sqrt so it's slow extern float vm_GetMagnitude(vector *); diff --git a/manage/gamefilepage.h b/manage/gamefilepage.h index 212f19fa..466c2648 100644 --- a/manage/gamefilepage.h +++ b/manage/gamefilepage.h @@ -66,9 +66,4 @@ void mng_LoadLocalGamefilePage(CFILE *); // Reads in a page off the net void mng_LoadNetGamefilePage(CFILE *, bool overlay = false); -// First searches through the gamefile index to see if the gamefile is already -// loaded. If not, searches in the table file and loads it. -// Returns index of gamefile if found, -1 if not -int mng_GetGuaranteedGamefilePage(char *name, CFILE *infile = NULL); - #endif diff --git a/module/module.cpp b/module/module.cpp index f6b3ecf6..5ab33247 100644 --- a/module/module.cpp +++ b/module/module.cpp @@ -500,9 +500,6 @@ int mod_GetLastError(void) { void dd_GetWorkingDir(char *path, int len); bool dd_SetWorkingDir(const char *path); -bool dd_FindFileStart(const char *wildcard, char *namebuf); -bool dd_FindNextFile(char *namebuf); -void dd_FindFileClose(); // retrieve the current working folder where file operation will occur. void dd_GetWorkingDir(char *path, int len) { getcwd(path, len); } diff --git a/music/music.h b/music/music.h index cfc30fe0..5bffb50d 100644 --- a/music/music.h +++ b/music/music.h @@ -199,7 +199,6 @@ public: void Send(oms_q_evt *evt); // sends an event to the stream. void Reset(OutrageMusicSeq *seq = NULL); // reset stream. void SetVolume(float vol); // volume. - int GetPlayRequestCount(); // tells how many play events send are pending processing. // event senders public: diff --git a/physics/findintersection.h b/physics/findintersection.h index 2d00d958..e53a9436 100644 --- a/physics/findintersection.h +++ b/physics/findintersection.h @@ -398,9 +398,6 @@ int fvi_QuickDistObjectList(vector *pos, int init_roomnum, float rad, int16_t *o // fills in u & v. if l is non-NULL fills it in also // extern void fvi_FindHitpointUV(float *u,float *v,float *l, vector *pnt,segment *seg,int sidenum,int facenum); -// Returns true if the object is through any walls -extern int fvi_ObjectIntersectsWall(object *objp); - extern int FVI_counter; extern int FVI_room_counter; diff --git a/scripts/osiris_vector.h b/scripts/osiris_vector.h index b6d9fd55..dba26d1e 100644 --- a/scripts/osiris_vector.h +++ b/scripts/osiris_vector.h @@ -58,9 +58,6 @@ extern void vm_MatrixMul(matrix *, matrix *, matrix *); // Multiply a matrix times the transpose of a matrix void vm_MatrixMulTMatrix(matrix *dest, matrix *src0, matrix *src1); -// Computes all math look up tables, must be called before any vector stuff is used -extern void vm_InitMathTables(); - // Given a vector, returns the magnitude. Uses sqrt so it's slow extern float vm_GetMagnitude(vector *); diff --git a/sndlib/hlsoundlib.h b/sndlib/hlsoundlib.h index 14dd9a23..6c65b8d9 100644 --- a/sndlib/hlsoundlib.h +++ b/sndlib/hlsoundlib.h @@ -285,8 +285,6 @@ public: void SetLLSoundQuantity(int n_sounds); int GetLLSoundQuantity(); - bool SetLLevelType(); // These are - // Pause and Resume the library void PauseSounds(bool f_all_sounds = false); void ResumeSounds(); diff --git a/sndlib/sdlsound.h b/sndlib/sdlsound.h index 31dcf9b8..2ec02668 100644 --- a/sndlib/sdlsound.h +++ b/sndlib/sdlsound.h @@ -28,7 +28,6 @@ class sound_buffer_info; void lnxsound_SetError(int code); void lnxsound_ErrorText(const char *fmt, ...); -inline void sb_adjust_properties_2d(sound_buffer_info *sb, float f_volume, float f_pan, uint16_t frequency); class emulated_listener { public: @@ -122,7 +121,6 @@ public: friend void lnxsound_SetError(int code); friend void lnxsound_ErrorText(const char *fmt, ...); - friend inline void sb_adjust_properties_2d(sound_buffer_info *sb, float f_volume, float f_pan, uint16_t frequency); protected: #ifdef _DEBUG diff --git a/stream_audio/streamaudio.h b/stream_audio/streamaudio.h index e0cf3718..5f18ffb2 100644 --- a/stream_audio/streamaudio.h +++ b/stream_audio/streamaudio.h @@ -271,11 +271,8 @@ private: friend int ADecodeFileRead(void *data, void *buf, uint32_t qty); void *StreamCallback(int *size); // invoked by omsStreamCB. int ReadFileData(int buf, int len); // reads in decompressed raw data. - int ReadFileDirect(char *buf, int len); // reads in decompressed raw data. void UpdateData(); // updates file buffers - void End(); // cleans up after a stop. void Reset(); // resets to start of stream. - bool OpenDigitalStream(); // opens and prepares a digital stream bool ReopenDigitalStream(uint8_t fbufidx, int nbufs); private: @@ -333,7 +330,6 @@ public: int CurrentMeasure() const { // returns current measure. return m_curmeasure; }; - int TotalMeasures() const; // total measure count int GetSoundHandle() const { // returns the sound library handle for this stream. return m_llshandle; }; diff --git a/ui/UIlib.h b/ui/UIlib.h index 1333b219..4c3881fe 100644 --- a/ui/UIlib.h +++ b/ui/UIlib.h @@ -110,9 +110,6 @@ extern float UI_aspect_y; #define UI_X(_x) ((int)(UI_aspect_x * (_x))) #define UI_Y(_y) ((int)(UI_aspect_y * (_y))) -// retrieves input for user interface -bool ui_Poll(); - // flushes out key input info currently in ui. void ui_KeyFlush(); diff --git a/ui/ui.h b/ui/ui.h index 1eb13b92..ecd6bea6 100644 --- a/ui/ui.h +++ b/ui/ui.h @@ -1117,7 +1117,6 @@ public: // gadget management void AddGadget(UIGadget *gadget); // adds a gadget to the gadget list void RemoveGadget(UIGadget *gadget); // removes a gadget from the list. - UIGadget *GetGadgetFromID(int id); // returns the gadget pointer given an id if in window void SetFocusOnGadget(UIGadget *gadget, bool key = false); UIGadget *GetFocus() { return m_GadgetCur; }; diff --git a/ui/uisys.h b/ui/uisys.h index 531fc679..c6f65401 100644 --- a/ui/uisys.h +++ b/ui/uisys.h @@ -148,7 +148,4 @@ bool ui_IsCursorVisible(); // is the cursor visible? // frees ui input cache void ui_Flush(); -// does screen shot -void ui_DoScreenshot(); - #endif