Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 1 | /* |
| 2 | * Portions of this file are copyright Rebirth contributors and licensed as |
||
| 3 | * described in COPYING.txt. |
||
| 4 | * Portions of this file are copyright Parallax Software and licensed |
||
| 5 | * according to the Parallax license below. |
||
| 6 | * See COPYING.txt for license details. |
||
| 7 | |||
| 8 | THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX |
||
| 9 | SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO |
||
| 10 | END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A |
||
| 11 | ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS |
||
| 12 | IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS |
||
| 13 | SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE |
||
| 14 | FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE |
||
| 15 | CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS |
||
| 16 | AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. |
||
| 17 | COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. |
||
| 18 | */ |
||
| 19 | |||
| 20 | #pragma once |
||
| 21 | |||
| 22 | #ifdef __cplusplus |
||
| 23 | #include "dsx-ns.h" |
||
| 24 | |||
| 25 | // In khelp.c |
||
| 26 | int DoHelp(); |
||
| 27 | |||
| 28 | // In kcurve.c |
||
| 29 | int InitCurve(); |
||
| 30 | int GenerateCurve(); |
||
| 31 | int DecreaseR4(); |
||
| 32 | int IncreaseR4(); |
||
| 33 | int DecreaseR1(); |
||
| 34 | int IncreaseR1(); |
||
| 35 | int DeleteCurve(); |
||
| 36 | int SetCurve(); |
||
| 37 | |||
| 38 | // In kmine.c |
||
| 39 | int SaveMine(); |
||
| 40 | int LoadMine(); |
||
| 41 | int MineMenu(); |
||
| 42 | int CreateNewMine(); |
||
| 43 | int LoadOldMine(); |
||
| 44 | |||
| 45 | int SaveSituation(); |
||
| 46 | int LoadSituation(); |
||
| 47 | |||
| 48 | // In kgame.c |
||
| 49 | int SetPlayerPosition(void); |
||
| 50 | int SaveGameData(); |
||
| 51 | int LoadGameData(); |
||
| 52 | int LoadMineOnly(); |
||
| 53 | void ResetFilename(); |
||
| 54 | |||
| 55 | // In group.c |
||
| 56 | int LoadGroup(); |
||
| 57 | int SaveGroup(); |
||
| 58 | int PrevGroup(); |
||
| 59 | int NextGroup(); |
||
| 60 | int CreateGroup(); |
||
| 61 | int SubtractFromGroup(); |
||
| 62 | int DeleteGroup(); |
||
| 63 | int MarkGroupSegment(); |
||
| 64 | int MoveGroup(void); |
||
| 65 | int CopyGroup(void); |
||
| 66 | int AttachSegmentNew(); |
||
| 67 | int UngroupSegment(); |
||
| 68 | int GroupSegment(); |
||
| 69 | int Degroup(); |
||
| 70 | int RotateGroup(); |
||
| 71 | |||
| 72 | // In segment.c |
||
| 73 | int ToggleBottom(); |
||
| 74 | void make_curside_bottom_side(); |
||
| 75 | #ifdef DXX_BUILD_DESCENT_II |
||
| 76 | int select_segment_by_number(); |
||
| 77 | int select_segment_with_powerup(); |
||
| 78 | #endif |
||
| 79 | |||
| 80 | // In editor.c |
||
| 81 | int UndoCommand(); |
||
| 82 | |||
| 83 | // In kview.c |
||
| 84 | int ZoomOut(); |
||
| 85 | int ZoomIn(); |
||
| 86 | int MoveAway(); |
||
| 87 | int MoveCloser(); |
||
| 88 | int ToggleChaseMode(); |
||
| 89 | |||
| 90 | // In kbuild.c |
||
| 91 | int CreateBridge(); |
||
| 92 | int FormJoint(); |
||
| 93 | int CreateAdjacentJoint(); |
||
| 94 | int CreateAdjacentJointsSegment(); |
||
| 95 | int CreateAdjacentJointsAll(); |
||
| 96 | int CreateSloppyAdjacentJoint(); |
||
| 97 | int CreateSloppyAdjacentJointsGroup(); |
||
| 98 | |||
| 99 | // In ksegmove.c |
||
| 100 | int DecreaseHeading(); |
||
| 101 | int IncreaseHeading(); |
||
| 102 | int DecreasePitch(); |
||
| 103 | int IncreasePitch(); |
||
| 104 | int DecreaseBank(); |
||
| 105 | int IncreaseBank(); |
||
| 106 | |||
| 107 | // In ksegsel.c |
||
| 108 | int SelectCurrentSegForward(); |
||
| 109 | int SelectCurrentSegBackward(); |
||
| 110 | int SelectNextSide(); |
||
| 111 | int SelectPrevSide(); |
||
| 112 | int CopySegToMarked(); |
||
| 113 | int SelectBottom(); |
||
| 114 | int SelectFront(); |
||
| 115 | int SelectTop(); |
||
| 116 | int SelectBack(); |
||
| 117 | int SelectLeft(); |
||
| 118 | int SelectRight(); |
||
| 119 | |||
| 120 | // In ksegsize.c |
||
| 121 | #ifdef dsx |
||
| 122 | namespace dsx { |
||
| 123 | int IncreaseSegLength(); |
||
| 124 | int DecreaseSegLength(); |
||
| 125 | int DecreaseSegWidth(); |
||
| 126 | int IncreaseSegWidth(); |
||
| 127 | int IncreaseSegHeight(); |
||
| 128 | int DecreaseSegHeight(); |
||
| 129 | int ToggleSegSizeMode(); |
||
| 130 | int PerturbCurside(); |
||
| 131 | int PerturbCursideBig(); |
||
| 132 | |||
| 133 | int IncreaseSegLengthBig(); |
||
| 134 | int DecreaseSegLengthBig(); |
||
| 135 | int DecreaseSegWidthBig(); |
||
| 136 | int IncreaseSegWidthBig(); |
||
| 137 | int IncreaseSegHeightBig(); |
||
| 138 | int DecreaseSegHeightBig(); |
||
| 139 | |||
| 140 | int IncreaseSegLengthDefault(); |
||
| 141 | int DecreaseSegLengthDefault(); |
||
| 142 | int IncreaseSegWidthDefault(); |
||
| 143 | int DecreaseSegWidthDefault(); |
||
| 144 | int IncreaseSegHeightDefault(); |
||
| 145 | int DecreaseSegHeightDefault(); |
||
| 146 | } |
||
| 147 | #endif |
||
| 148 | |||
| 149 | // In ktmap.c |
||
| 150 | int AssignTexture(); |
||
| 151 | int AssignTexture2(); |
||
| 152 | int ClearTexture2(); |
||
| 153 | int PropagateTextures(); |
||
| 154 | int PropagateTexturesMove(); |
||
| 155 | int PropagateTexturesMoveUVs(); |
||
| 156 | int PropagateTexturesUVs(); |
||
| 157 | int PropagateTexturesSelected(); |
||
| 158 | |||
| 159 | //--//// In macro.c |
||
| 160 | //--//int MacroMenu(); |
||
| 161 | //--//int MacroPlayFast(); |
||
| 162 | //--//int MacroPlayNormal(); |
||
| 163 | //--//int MacroRecordAll(); |
||
| 164 | //--//int MacroRecordKeys(); |
||
| 165 | //--//int MacroSave(); |
||
| 166 | //--//int MacroLoad(); |
||
| 167 | |||
| 168 | // In editor.c |
||
| 169 | int AttachSegment(); |
||
| 170 | int DeleteSegment(); |
||
| 171 | int CallLisp(); |
||
| 172 | int ExitEditor(); |
||
| 173 | int ShowAbout(); |
||
| 174 | int ExchangeMarkandCurseg(); |
||
| 175 | #ifdef DXX_BUILD_DESCENT_II |
||
| 176 | int CopySegtoMarked(); |
||
| 177 | #endif |
||
| 178 | int med_keypad_goto_prev(); |
||
| 179 | int med_keypad_goto_next(); |
||
| 180 | int med_keypad_goto(); |
||
| 181 | int med_increase_tilings(); |
||
| 182 | int med_decrease_tilings(); |
||
| 183 | int ToggleAutosave(); |
||
| 184 | int MarkEnd(); |
||
| 185 | |||
| 186 | // Texture.c |
||
| 187 | int TexFlipX(); |
||
| 188 | int TexFlipY(); |
||
| 189 | int TexSlideUp(); |
||
| 190 | int TexSlideLeft(); |
||
| 191 | int TexSetDefault(); |
||
| 192 | #ifdef DXX_BUILD_DESCENT_II |
||
| 193 | int TexSetDefaultSelected(); |
||
| 194 | #endif |
||
| 195 | int TexSlideRight(); |
||
| 196 | int TexRotateLeft(); |
||
| 197 | int TexSlideDown(); |
||
| 198 | int TexRotateRight(); |
||
| 199 | int TexSelectActiveEdge(); |
||
| 200 | int TexRotate90Degrees(); |
||
| 201 | int TexIncreaseTiling(); |
||
| 202 | int TexDecreaseTiling(); |
||
| 203 | int TexSlideUpBig(); |
||
| 204 | int TexSlideLeftBig(); |
||
| 205 | int TexSlideRightBig(); |
||
| 206 | int TexRotateLeftBig(); |
||
| 207 | int TexSlideDownBig(); |
||
| 208 | int TexRotateRightBig(); |
||
| 209 | int TexStretchDown(); |
||
| 210 | int TexStretchUp(); |
||
| 211 | #ifdef DXX_BUILD_DESCENT_II |
||
| 212 | int TexChangeAll(); |
||
| 213 | int TexChangeAll2(); |
||
| 214 | #endif |
||
| 215 | |||
| 216 | // object.c |
||
| 217 | #ifdef dsx |
||
| 218 | namespace dsx { |
||
| 219 | int ObjectPlaceObject(); |
||
| 220 | int ObjectMakeCoop(); |
||
| 221 | int ObjectPlaceObjectTmap(); |
||
| 222 | int ObjectDelete(); |
||
| 223 | int ObjectMoveForward(); |
||
| 224 | int ObjectMoveLeft(); |
||
| 225 | int ObjectSetDefault(); |
||
| 226 | int ObjectMoveRight(); |
||
| 227 | int ObjectMoveBack(); |
||
| 228 | int ObjectMoveDown(); |
||
| 229 | int ObjectMoveUp(); |
||
| 230 | int ObjectMoveNearer(); |
||
| 231 | int ObjectMoveFurther(); |
||
| 232 | int ObjectSelectNextinSegment(); |
||
| 233 | int ObjectSelectNextType(); |
||
| 234 | |||
| 235 | template <int p, int b, int h> |
||
| 236 | int ObjectChangeRotation(); |
||
| 237 | |||
| 238 | #define ROTATION_UNIT (4096/4) |
||
| 239 | |||
| 240 | #define ObjectDecreaseBank ObjectChangeRotation<0, -ROTATION_UNIT, 0> |
||
| 241 | #define ObjectIncreaseBank ObjectChangeRotation<0, ROTATION_UNIT, 0> |
||
| 242 | #define ObjectDecreasePitch ObjectChangeRotation<-ROTATION_UNIT, 0, 0> |
||
| 243 | #define ObjectIncreasePitch ObjectChangeRotation<ROTATION_UNIT, 0, 0> |
||
| 244 | #define ObjectDecreaseHeading ObjectChangeRotation<0, 0, -ROTATION_UNIT> |
||
| 245 | #define ObjectIncreaseHeading ObjectChangeRotation<0, 0, ROTATION_UNIT> |
||
| 246 | |||
| 247 | #define ObjectDecreaseBankBig ObjectChangeRotation<0, -(ROTATION_UNIT*4), 0> |
||
| 248 | #define ObjectIncreaseBankBig ObjectChangeRotation<0, (ROTATION_UNIT*4), 0> |
||
| 249 | #define ObjectDecreasePitchBig ObjectChangeRotation<-(ROTATION_UNIT*4), 0, 0> |
||
| 250 | #define ObjectIncreasePitchBig ObjectChangeRotation<(ROTATION_UNIT*4), 0, 0> |
||
| 251 | #define ObjectDecreaseHeadingBig ObjectChangeRotation<0, 0, -(ROTATION_UNIT*4)> |
||
| 252 | #define ObjectIncreaseHeadingBig ObjectChangeRotation<0, 0, (ROTATION_UNIT*4)> |
||
| 253 | |||
| 254 | int ObjectResetObject(); |
||
| 255 | } |
||
| 256 | #endif |
||
| 257 | |||
| 258 | // elight.c |
||
| 259 | int LightSelectNextVertex(); |
||
| 260 | int LightSelectNextEdge(); |
||
| 261 | int LightCopyIntensity(); |
||
| 262 | int LightCopyIntensitySegment(); |
||
| 263 | int LightDecreaseLightVertex(); |
||
| 264 | int LightIncreaseLightVertex(); |
||
| 265 | int LightDecreaseLightSide(); |
||
| 266 | int LightIncreaseLightSide(); |
||
| 267 | int LightDecreaseLightSegment(); |
||
| 268 | int LightIncreaseLightSegment(); |
||
| 269 | int LightSetMaximum(); |
||
| 270 | int LightSetDefault(); |
||
| 271 | int LightSetDefaultAll(); |
||
| 272 | int LightAmbientLighting(); |
||
| 273 | |||
| 274 | // seguvs.c |
||
| 275 | #ifdef dsx |
||
| 276 | namespace dsx { |
||
| 277 | int fix_bogus_uvs_on_side(); |
||
| 278 | int fix_bogus_uvs_all(); |
||
| 279 | } |
||
| 280 | #endif |
||
| 281 | int set_average_light_on_curside(void); |
||
| 282 | int set_average_light_on_all(void); |
||
| 283 | int set_average_light_on_all_quick(void); |
||
| 284 | |||
| 285 | // Miscellaneous, please put in correct file if you have time |
||
| 286 | int GotoMainMenu(); |
||
| 287 | int GotoGameScreen(); |
||
| 288 | int DropIntoDebugger(); |
||
| 289 | int CreateDefaultNewSegment(); |
||
| 290 | int CreateDefaultNewSegmentandAttach(); |
||
| 291 | int ClearSelectedList(); |
||
| 292 | int ClearFoundList(); |
||
| 293 | int SetPlayerFromCurseg(); |
||
| 294 | int SetPlayerFromCursegAndRotate(); |
||
| 295 | int SetPlayerFromCursegMinusOne(); |
||
| 296 | int FindConcaveSegs(); |
||
| 297 | int do_reset_orient(); |
||
| 298 | int GameZoomOut(); |
||
| 299 | int GameZoomIn(); |
||
| 300 | |||
| 301 | // John's temp page stuff |
||
| 302 | int medtmp_set_page(); |
||
| 303 | |||
| 304 | // In objpage.c |
||
| 305 | int objpage_goto_next_object(); |
||
| 306 | |||
| 307 | // In medsel.c |
||
| 308 | extern int SortSelectedList(void); |
||
| 309 | extern int SelectNextFoundSeg(void); |
||
| 310 | extern int SelectPreviousFoundSeg(void); |
||
| 311 | |||
| 312 | // In wall.c |
||
| 313 | extern int wall_add_blastable(void); |
||
| 314 | extern int wall_add_closed_wall(void); |
||
| 315 | extern int wall_add_external_wall(void); |
||
| 316 | extern int wall_lock_door(void); |
||
| 317 | extern int wall_automate_door(void); |
||
| 318 | extern int wall_deautomate_door(void); |
||
| 319 | extern int wall_assign_door_1(void); |
||
| 320 | extern int wall_assign_door_2(void); |
||
| 321 | extern int wall_assign_door_3(void); |
||
| 322 | extern int wall_assign_door_4(void); |
||
| 323 | extern int wall_assign_door_5(void); |
||
| 324 | extern int wall_assign_door_6(void); |
||
| 325 | extern int wall_assign_door_7(void); |
||
| 326 | extern int wall_assign_door_8(void); |
||
| 327 | extern int do_wall_dialog(void); |
||
| 328 | extern int do_trigger_dialog(void); |
||
| 329 | extern int check_walls(void); |
||
| 330 | extern int delete_all_walls(void); |
||
| 331 | #ifdef DXX_BUILD_DESCENT_II |
||
| 332 | extern int delete_all_controlcen_triggers(void); |
||
| 333 | #endif |
||
| 334 | |||
| 335 | // In switch.c |
||
| 336 | //extern int trigger_add_damage(void); |
||
| 337 | //extern int trigger_add_blank(void); |
||
| 338 | //extern int trigger_add_exit(void); |
||
| 339 | //extern int trigger_add_repair(void); |
||
| 340 | //extern int trigger_control(void); |
||
| 341 | //extern int trigger_remove(void); |
||
| 342 | //extern int trigger_add_if_control_center_dead(void); |
||
| 343 | extern int bind_wall_to_control_trigger(void); |
||
| 344 | |||
| 345 | // In med.c |
||
| 346 | extern int fuelcen_create_from_curseg(); |
||
| 347 | extern int repaircen_create_from_curseg(); |
||
| 348 | extern int controlcen_create_from_curseg(); |
||
| 349 | extern int robotmaker_create_from_curseg(); |
||
| 350 | extern int fuelcen_reset_all(); |
||
| 351 | extern int RestoreGameState(); |
||
| 352 | extern int fuelcen_delete_from_curseg(); |
||
| 353 | #ifdef DXX_BUILD_DESCENT_II |
||
| 354 | extern int goal_blue_create_from_curseg(); |
||
| 355 | extern int goal_red_create_from_curseg(); |
||
| 356 | #endif |
||
| 357 | |||
| 358 | // In editor\robot.c |
||
| 359 | extern int do_robot_dialog(); |
||
| 360 | extern int do_object_dialog(); |
||
| 361 | |||
| 362 | #endif |
||
| 363 |