| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/Main/editor/HObject.h $ |
| 21 | * $Revision: 1.1.1.1 $ |
| 22 | * $Date: 2003-08-26 03:57:38 $ |
| 23 | * $Author: kevinb $ |
| 24 | * |
| 25 | * Editor object handling functions |
| 26 | * |
| 27 | * $Log: not supported by cvs2svn $ |
| 28 | * |
| 29 | * 7 5/18/98 2:56p Matt |
| 30 | * Added code to readjust all ground object (for after the terrain has |
| 31 | * moved). |
| 32 | * |
| 33 | * 6 2/06/98 3:08p Samir |
| 34 | * Simplified object movement code. |
| 35 | * |
| 36 | * 5 9/17/97 11:55a Samir |
| 37 | * MORE SEGMENT RIPOUT |
| 38 | * |
| 39 | * 4 9/17/97 11:35a Samir |
| 40 | * BIG SEGMENT RIPOUT |
| 41 | * |
| 42 | * 3 9/03/97 8:00p Samir |
| 43 | * Implemented most of the fixes for the object moving system. |
| 44 | * |
| 45 | * 2 8/21/97 7:48p Matt |
| 46 | * Added code to move player object (like old move player to curseg) |
| 47 | * |
| 48 | * 9 6/27/97 7:20p Matt |
| 49 | * Added function to move player 0 to current segment |
| 50 | * |
| 51 | * 8 4/07/97 3:14p Samir |
| 52 | * Added Flip and SetDefault Object functions. |
| 53 | * |
| 54 | * 7 4/04/97 2:45p Matt |
| 55 | * Removed prototypes for deleted functions |
| 56 | * |
| 57 | * 6 3/27/97 11:54a Samir |
| 58 | * UpdateMineObjects returns number of objects deleted of a type. |
| 59 | * |
| 60 | * 5 3/27/97 11:48a Samir |
| 61 | * Added update objects in mine functions. |
| 62 | * |
| 63 | * 4 3/25/97 6:31p Samir |
| 64 | * Added robot placement. |
| 65 | * |
| 66 | * 3 2/19/97 3:37p Samir |
| 67 | * Added delete and rotation of objects. |
| 68 | * |
| 69 | * 2 2/17/97 6:18p Samir |
| 70 | * Add powerup, move it around WITHIN the segment. |
| 71 | * |
| 72 | * 1 2/17/97 3:23p Samir |
| 73 | * Handler for Object functions |
| 74 | * |
| 75 | * $NoKeywords: $ |
| 76 | */ |
| 77 | |
| 78 | #ifndef HOBJECT_H |
| 79 | #define HOBJECT_H |
| 80 | |
| 81 | #include "pstypes.h" |
| 82 | #include "fix.h" |
| 83 | #include "object.h" |
| 84 | |
| 85 | const float HOBJECT_SCALE_UNIT = (float)0.5; |
| 86 | const angle HOBJECT_ROTATION_UNIT = 1024; |
| 87 | |
| 88 | const int HOBJECT_MOVE_LEFT = 1, HOBJECT_MOVE_RIGHT = 2, HOBJECT_MOVE_FORWARD = 3, HOBJECT_MOVE_BACK = 4, |
| 89 | HOBJECT_MOVE_UP = 5, HOBJECT_MOVE_DOWN = 6; |
| 90 | |
| 91 | // var determining length of movement. |
| 92 | extern float Object_move_scale; |
| 93 | extern angle Object_move_rotation; |
| 94 | |
| 95 | // moves the specified object in direction specified |
| 96 | void HObjectMove(int objnum, float dx, float dy, float dz); |
| 97 | |
| 98 | // places the object into the center of the current selected segment |
| 99 | // returns 0 if fail. |
| 100 | bool HObjectPlace(int obj_type, int obj_id); |
| 101 | |
| 102 | // Adjusts an object so it's at the ground level (for when the ground has moved) |
| 103 | void ResetGroundObject(object *objp); |
| 104 | |
| 105 | // deletes the currently selected object from the mine. |
| 106 | void HObjectDelete(); |
| 107 | |
| 108 | // sets default orientation for object. |
| 109 | void HObjectSetDefault(); |
| 110 | |
| 111 | // Move the object to in front of the viewer (where a new object would be place |
| 112 | void HObjectMoveToViewer(object *objp); |
| 113 | |
| 114 | // Select objects in the mine or segment |
| 115 | int HObjectSelectNextInMine(); |
| 116 | int HObjectSelectPrevInMine(); |
| 117 | |
| 118 | // Rotation of objects |
| 119 | void HObjectIncreaseBank(); |
| 120 | void HObjectDecreaseBank(); |
| 121 | void HObjectIncreasePitch(); |
| 122 | void HObjectDecreasePitch(); |
| 123 | void HObjectIncreaseHeading(); |
| 124 | void HObjectDecreaseheading(); |
| 125 | |
| 126 | // Flipping of object |
| 127 | void HObjectFlip(); |
| 128 | |
| 129 | #endif |