| 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 | * Header for slew.c |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef _SLEW_H |
| 25 | #define _SLEW_Hcxx . . $ `Descent3/slew.h:25:9`! |
| 26 | |
| 27 | #if (defined(_DEBUGcxx . . $ `<built-in>:482:9`!) || defined(EDITOR)) |
| 28 | |
| 29 | #include "object.h"cxx . . $ `<file>/Descent3/object.h`/ |
| 30 | |
| 31 | #define SLEW_MOVEcxx . . $ `Descent3/slew.h:31:9`! 1 |
| 32 | #define SLEW_KEYcxx . . $ `Descent3/slew.h:32:9`! 2 |
| 33 | #define SLEW_ROTATEcxx . . $ `Descent3/slew.h:33:9`! 4 |
| 34 | |
| 35 | void SlewResetOrientcxx . . $ SlewResetOrient(419c470199a90a97).(objectcxx . . $ object# *obj); // Resets the object's orientation |
| 36 | int SlewFramecxx . . $ SlewFrame(174cacb9d899a77a).(objectcxx . . $ object# *obj, |
| 37 | int movement_limitations = 0); // Moves the object for one frame (returns flags. 1=MOVED 2=KEY_ACTION |
| 38 | int SlewStopcxx . . $ SlewStop(2da2a862cad4c994).(objectcxx . . $ object# *obj); // Stop the object |
| 39 | void SlewControlInitcxx . . $ SlewControlInit(49f6e7a06ebc5aa8).(); // initializes controller system for slewer |
| 40 | |
| 41 | extern float Slew_key_speedcxx . . $ Slew_key_speed.; |
| 42 | // If there's an active joystick, this is the stick number. Else, this is -1 |
| 43 | extern int Joystick_activecxx . . $ Joystick_active.; |
| 44 | |
| 45 | #else |
| 46 | |
| 47 | #define SlewResetOrient(obj) |
| 48 | #define SlewFrame(obj) |
| 49 | #define SlewStop(obj) |
| 50 | #define SlewControlInit() |
| 51 | |
| 52 | #endif |
| 53 | |
| 54 | #endif |