Make gamecntl.c more similar between D1X and D2X
This commit is contained in:
parent
00d1d41439
commit
322db66f11
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20100331
|
||||
--------
|
||||
main/game.h, main/gamecntl.c, main/gamerend.c, main/kconfig.c, main/kconfig.h, main/laser.c, main/laser.h: Make gamecntl.c more similar between D1X and D2X
|
||||
|
||||
20100330
|
||||
--------
|
||||
main/titles.c: Fix black and white swapping when viewing robots in briefings using Mac data
|
||||
|
|
|
@ -200,7 +200,7 @@ extern grs_canvas VR_screen_pages[2]; // Two pages of VRAM if paging is availab
|
|||
extern grs_canvas VR_screen_sub_pages[2]; // Two sub pages of VRAM if paging is available
|
||||
|
||||
void game_init_render_buffers (int render_max_w, int render_max_h, int render_method);
|
||||
void game_do_render_frame(int flip);
|
||||
void game_render_frame_mono(int flip);
|
||||
void game_leave_menus(void);
|
||||
|
||||
#endif
|
||||
|
|
785
main/gamecntl.c
785
main/gamecntl.c
File diff suppressed because it is too large
Load diff
|
@ -378,7 +378,7 @@ extern int force_cockpit_redraw;
|
|||
void update_cockpits();
|
||||
|
||||
//render a frame for the game
|
||||
void game_do_render_frame(int flip)
|
||||
void game_render_frame_mono(int flip)
|
||||
{
|
||||
gr_set_current_canvas(&Screen_3d_window);
|
||||
|
||||
|
@ -491,7 +491,7 @@ void game_render_frame()
|
|||
{
|
||||
set_screen_mode(SCREEN_GAME);
|
||||
play_homing_warning();
|
||||
game_do_render_frame(GameArg.DbgUseDoubleBuffer);
|
||||
game_render_frame_mono(GameArg.DbgUseDoubleBuffer);
|
||||
FrameCount++;
|
||||
}
|
||||
|
||||
|
|
|
@ -1417,25 +1417,25 @@ void controls_read_all(int automap_flag)
|
|||
//Read primary cycle
|
||||
|
||||
if ( kc_d1x[20].value < 255 )
|
||||
Controls.cycle_primary_down_count += key_down_count(kc_d1x[20].value);
|
||||
Controls.cycle_primary_count += key_down_count(kc_d1x[20].value);
|
||||
if ( (use_joystick)&&(kc_d1x[21].value < 255) )
|
||||
Controls.cycle_primary_down_count += joy_get_button_down_cnt( kc_d1x[21].value );
|
||||
Controls.cycle_primary_count += joy_get_button_down_cnt( kc_d1x[21].value );
|
||||
// maybe we want to go tru the weapons with the mouse... obviously the wheel. The wheel is an axis... okay...
|
||||
// axes are scaled. so to prevent weapon cacle in the scale-rythm, we need to be sure the wheel was once 0 between cycling... god this is stupid...
|
||||
if ( (use_mouse)&&(kc_mouse[27].value < 255) && !mouse_pricycle_lock )
|
||||
Controls.cycle_primary_down_count = kc_mouse[28].value?(mouse_axis[kc_mouse[27].value]<0):(mouse_axis[kc_mouse[27].value]>0);
|
||||
Controls.cycle_primary_count = kc_mouse[28].value?(mouse_axis[kc_mouse[27].value]<0):(mouse_axis[kc_mouse[27].value]>0);
|
||||
mouse_pricycle_lock=mouse_axis[kc_mouse[27].value];
|
||||
|
||||
//Read secondary cycle
|
||||
|
||||
if ( kc_d1x[22].value < 255 )
|
||||
Controls.cycle_secondary_down_count += key_down_count(kc_d1x[22].value);
|
||||
Controls.cycle_secondary_count += key_down_count(kc_d1x[22].value);
|
||||
if ( (use_joystick)&&(kc_d1x[23].value < 255) )
|
||||
Controls.cycle_secondary_down_count += joy_get_button_down_cnt( kc_d1x[23].value );
|
||||
Controls.cycle_secondary_count += joy_get_button_down_cnt( kc_d1x[23].value );
|
||||
// maybe we want to go tru the weapons with the mouse... obviously the wheel. The wheel is an axis... okay...
|
||||
// axes are scaled. so to prevent weapon cacle in the scale-rythm, we need to be sure the wheel was once 0 between cycling... god this is stupid...
|
||||
if ( (use_mouse)&&(kc_mouse[27].value < 255) && !mouse_seccycle_lock)
|
||||
Controls.cycle_secondary_down_count = kc_mouse[28].value?(mouse_axis[kc_mouse[27].value]>0):(mouse_axis[kc_mouse[27].value]<0);
|
||||
Controls.cycle_secondary_count = kc_mouse[28].value?(mouse_axis[kc_mouse[27].value]>0):(mouse_axis[kc_mouse[27].value]<0);
|
||||
mouse_seccycle_lock=mouse_axis[kc_mouse[27].value];
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,9 @@ typedef struct _control_info {
|
|||
ubyte automap_state;
|
||||
|
||||
ubyte cycle_primary_state;
|
||||
ubyte cycle_primary_down_count;
|
||||
ubyte cycle_primary_count;
|
||||
ubyte cycle_secondary_state;
|
||||
ubyte cycle_secondary_down_count;
|
||||
ubyte cycle_secondary_count;
|
||||
} control_info;
|
||||
|
||||
#define CONTROL_USING_JOYSTICK 1
|
||||
|
|
15
main/laser.c
15
main/laser.c
|
@ -1459,7 +1459,7 @@ int Missile_gun=0;
|
|||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
//changed on 9/16/98 by adb to distinguish between drop bomb and secondary fire
|
||||
static void do_missile_firing_all(int drop_bomb)
|
||||
void do_missile_firing(int drop_bomb)
|
||||
{
|
||||
static int proximity = 0;
|
||||
|
||||
|
@ -1550,19 +1550,6 @@ static void do_missile_firing_all(int drop_bomb)
|
|||
}
|
||||
}
|
||||
|
||||
void do_missile_firing(void)
|
||||
{
|
||||
do_missile_firing_all(0);
|
||||
}
|
||||
//end changes - adb
|
||||
|
||||
//added on 9/16/98 by adb to distinguish between drop bomb and secondary fire
|
||||
void do_drop_bomb(void)
|
||||
{
|
||||
do_missile_firing_all(1);
|
||||
}
|
||||
//end additions - adb
|
||||
|
||||
#ifdef NETWORK
|
||||
void net_missile_firing(int player, int gun, int flags)
|
||||
{
|
||||
|
|
|
@ -69,13 +69,9 @@ void Flare_create(struct object *obj);
|
|||
int laser_are_related( int o1, int o2 );
|
||||
|
||||
extern int do_laser_firing_player(void);
|
||||
extern void do_missile_firing(void);
|
||||
extern void do_missile_firing(int drop_bomb);
|
||||
extern void net_missile_firing(int player, int weapon, int flags);
|
||||
|
||||
//added on 9/16/98 by adb to distinguish between drop bomb and secondary fire
|
||||
extern void do_drop_bomb(void);
|
||||
//end additions - adb
|
||||
|
||||
int Laser_create_new( vms_vector * direction, vms_vector * position, int segnum, int parent, int type, int make_sound );
|
||||
|
||||
// Fires a laser-type weapon (a Primary weapon)
|
||||
|
|
Loading…
Reference in a new issue