Descent3/editor/EPath.h

82 lines
2.6 KiB
C
Raw Permalink Normal View History

/*
2024-06-15 18:12:48 +00:00
* Descent 3
* Copyright (C) 2024 Parallax Software
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
--- HISTORICAL COMMENTS FOLLOW ---
* $Logfile: /DescentIII/Main/editor/EPath.h $
* $Revision: 1.1.1.1 $
* $Date: 2003-08-26 03:57:38 $
* $Author: kevinb $
*
* Header for epaths.cpp
*
* $Log: not supported by cvs2svn $
2024-06-15 18:12:48 +00:00
*
* 3 2/03/99 6:57p Chris
* Added the "Move node to current object" function
2024-06-15 18:12:48 +00:00
*
* 2 2/10/98 10:48a Matt
* Moved editor code from gamepath.cpp to epath.cpp
2024-06-15 18:12:48 +00:00
*
* 1 2/10/98 10:13a Matt
2024-06-15 18:12:48 +00:00
*
*/
#include "vecmat.h"
#include "gamepath.h"
2024-05-24 03:07:26 +00:00
extern uint8_t Show_paths;
// Allocs a gamepath that a robot will follow. Returns an index into the GamePaths
2024-06-15 18:12:48 +00:00
// array
int AllocGamePath(void);
2024-06-15 18:12:48 +00:00
// Given a path number, and a node number in that path, adds another node after the
// specified node
// Returns the index number of the new node
// If nodenum is -1, this node couldn't be added
// Flags are passed via the flags field
2024-06-15 18:12:48 +00:00
int InsertNodeIntoPath(int pathnum, int nodenum, int flags);
void FreeGamePath(int n);
// Given a pathnum and a node index, deletes that node and moves all the following nodes down
// by one
2024-06-15 18:12:48 +00:00
void DeleteNodeFromPath(int pathnum, int nodenum);
// Given a path number and a node, it moves the node by the change in position (if the new position is valid)
int MovePathNode(int pathnum, int nodenum, vector *delta_pos);
// Given a path number and a node, it moves the node to the position (if the new position is valid)
int MovePathNodeToPos(int pathnum, int nodenum, vector *pos);
// Gets next path from n that has actually been alloced
2024-06-15 18:12:48 +00:00
int GetNextPath(int n);
// Gets previous path from n that has actually been alloced
2024-06-15 18:12:48 +00:00
int GetPrevPath(int n);
// returns the index of the first path (from 0) alloced
// returns -1 if there are no paths
2024-06-15 18:12:48 +00:00
int GetFirstPath();
// draws a vector number
2024-06-15 18:12:48 +00:00
void DrawNumber(int num, vector pos, float size);
class grViewport;
// draws all the paths
2024-06-15 18:12:48 +00:00
void DrawAllPaths(grViewport *vp, vector *viewer_eye, matrix *viewer_orient, float zoom);