dxx-rebirth/main/kconfig.h

77 lines
2.1 KiB
C
Raw Normal View History

/* $Id: kconfig.h,v 1.1.1.1 2006/03/17 19:57:17 zicodxx Exp $ */
2006-03-20 16:43:15 +00:00
/*
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
2006-03-20 16:43:15 +00:00
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
2006-03-20 16:43:15 +00:00
/*
*
2006-03-20 16:43:15 +00:00
* Prototypes for reading controls
*
2006-03-20 16:43:15 +00:00
*/
#ifndef _KCONFIG_H
#define _KCONFIG_H
#include "config.h"
typedef struct _control_info {
fix pitch_time;
fix vertical_thrust_time;
fix heading_time;
fix sideways_thrust_time;
fix bank_time;
fix forward_thrust_time;
ubyte rear_view_down_count;
ubyte rear_view_down_state;
ubyte fire_primary_down_count;
ubyte fire_primary_state;
ubyte fire_secondary_state;
ubyte fire_secondary_down_count;
ubyte fire_flare_down_count;
ubyte drop_bomb_down_count;
ubyte automap_down_count;
ubyte automap_state;
2006-03-20 16:43:15 +00:00
ubyte cycle_primary_state;
ubyte cycle_primary_down_count;
ubyte cycle_secondary_state;
ubyte cycle_secondary_down_count;
} control_info;
#define CONTROL_USING_JOYSTICK 1
#define CONTROL_USING_MOUSE 2
Giving credits function ability to use custom creditfile (again); Made laser-offset for laser exclusive so Prox mines won't go tru doors; Preventing cycling tru cockpit modes while dead, but allowing to load a state; Implemented D2X' lighting code to D1X (faster, better, sexier - weeee); Try to hop over some errors regarding walls/doors in levels instead of using -1 indexes for arrays; Made the briefing text ptr a bit more failsafe in case the file is corrupt/non-standard; Made scores use the menu screen even in GAME OVER; Fixed bug in neighbour fields of Weapon Keys table; Added the Weapon Keys stuff to TABLE_CREATION; Fixed bug where D2X did not recall applied resolution in the resolutions menu; Simpler check to create DEMO_DIR; Seperated X/Y sensitivity for mouse and joystick; Flush controls when Automap toggles so keypress won't deactivate it again; Made FrameCount in Demos aligned to the Dropframe condition; Added KEy to ttoggle playback text off; Gracefully exit demo code if demo is corrupt; Removed that new percent counter because many old demos seem to have corrupted last frames; Closing endlevel data file if IFF error so the mission still can be freed; Fixed Cruising for keyboard which was not aligned to FPS correctly; Used mouse delta scaling in kconfig.c instead of mouse.c to not screw up when delta is requested in non-ingame situations - it actually belongs to the controls IMHO; Now support up to 8 joysticks; Changed some leftover malloc's to d_malloc and free to d_free
2008-10-16 17:27:02 +00:00
#define NUM_D1X_CONTROLS 24
2006-03-20 16:43:15 +00:00
#define MAX_D1X_CONTROLS 40
#define NUM_KEY_CONTROLS 46
#define NUM_JOYSTICK_CONTROLS 44
#define NUM_MOUSE_CONTROLS 29
#define MAX_CONTROLS 50
extern control_info Controls;
extern void controls_read_all(int automap_flag);
extern void kconfig(int n, char *title);
extern ubyte DefaultKeySettingsD1X[MAX_D1X_CONTROLS];
extern ubyte DefaultKeySettings[3][MAX_CONTROLS];
2006-03-20 16:43:15 +00:00
extern void kc_set_controls();
//set the cruise speed to zero
2006-03-20 16:43:15 +00:00
extern void reset_cruise(void);
#endif /* _KCONFIG_H */