Fixed typo in mouse delta reading cleaning not up Z-Axis; Giving automap a nicer Frameloop; Small cleanup
This commit is contained in:
parent
007e23461e
commit
c37285c217
|
@ -3,6 +3,7 @@ D1X-Rebirth Changelog
|
||||||
20090115
|
20090115
|
||||||
--------
|
--------
|
||||||
main/inferno.h, main/netdrv_udp.c, main/netdrv.c, main/game.c: Cleaning up the mess from revision 892...
|
main/inferno.h, main/netdrv_udp.c, main/netdrv.c, main/game.c: Cleaning up the mess from revision 892...
|
||||||
|
arch/sdl/mouse.c, main/automap.c, main/game.c, main/game.h, main/gameseq.c, main/kconfig.c: Fixed typo in mouse delta reading cleaning not up Z-Axis; Giving automap a nicer Frameloop; Small cleanup
|
||||||
|
|
||||||
20090114
|
20090114
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -139,7 +139,7 @@ void mouse_get_delta( int *dx, int *dy, int *dz )
|
||||||
|
|
||||||
Mouse.delta_x = 0;
|
Mouse.delta_x = 0;
|
||||||
Mouse.delta_y = 0;
|
Mouse.delta_y = 0;
|
||||||
Mouse.delta_y = 0;
|
Mouse.delta_z = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mouse_get_btns()
|
int mouse_get_btns()
|
||||||
|
|
|
@ -71,6 +71,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||||
#include "cntrlcen.h"
|
#include "cntrlcen.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "automap.h"
|
#include "automap.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#define EF_USED 1 // This edge is used
|
#define EF_USED 1 // This edge is used
|
||||||
#define EF_DEFINING 2 // A structure defining edge that should always draw.
|
#define EF_DEFINING 2 // A structure defining edge that should always draw.
|
||||||
|
@ -549,12 +550,17 @@ void do_automap( int key_code ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
t2 = timer_get_fixed_seconds();
|
t2 = timer_get_fixed_seconds();
|
||||||
while (t2 - t1 < F1_0 / 100) // ogl is fast enough that the automap can read the input too fast and you start to turn really slow. So delay a bit (and free up some cpu :)
|
while (t2 - t1 < F1_0 / (GameCfg.VSync?MAXIMUM_FPS:GameArg.SysMaxFPS)) // ogl is fast enough that the automap can read the input too fast and you start to turn really slow. So delay a bit (and free up some cpu :)
|
||||||
{
|
{
|
||||||
|
if (GameArg.SysUseNiceFPS && !GameCfg.VSync)
|
||||||
|
timer_delay(f1_0 / GameArg.SysMaxFPS - (t2 - t1));
|
||||||
t2 = timer_get_fixed_seconds();
|
t2 = timer_get_fixed_seconds();
|
||||||
}
|
}
|
||||||
if (pause_game)
|
if (pause_game)
|
||||||
|
{
|
||||||
FrameTime=t2-t1;
|
FrameTime=t2-t1;
|
||||||
|
FixedStepCalc();
|
||||||
|
}
|
||||||
t1 = t2;
|
t1 = t2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
20
main/game.c
20
main/game.c
|
@ -1574,13 +1574,11 @@ void game_disable_cheats()
|
||||||
Physics_cheat_flag = 0;
|
Physics_cheat_flag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------
|
// game_setup()
|
||||||
//this function is the game. called when game mode selected. runs until
|
// ----------------------------------------------------------------------------
|
||||||
//editor mode or exit selected
|
|
||||||
void game()
|
|
||||||
{
|
|
||||||
fix frame_rend_time=0;
|
|
||||||
|
|
||||||
|
void game_setup(void)
|
||||||
|
{
|
||||||
do_lunacy_on(); // Copy values for insane into copy buffer in ai.c
|
do_lunacy_on(); // Copy values for insane into copy buffer in ai.c
|
||||||
do_lunacy_off(); // Restore true insane mode.
|
do_lunacy_off(); // Restore true insane mode.
|
||||||
Game_aborted = 0;
|
Game_aborted = 0;
|
||||||
|
@ -1621,12 +1619,18 @@ void game()
|
||||||
|
|
||||||
fix_object_segs();
|
fix_object_segs();
|
||||||
game_flush_inputs();
|
game_flush_inputs();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------
|
||||||
|
//this function is the game. called when game mode selected. runs until
|
||||||
|
//editor mode or exit selected
|
||||||
|
void game()
|
||||||
|
{
|
||||||
|
game_setup();
|
||||||
|
|
||||||
if ( setjmp(LeaveGame)==0 ) {
|
if ( setjmp(LeaveGame)==0 ) {
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
frame_rend_time = timer_get_fixed_seconds();
|
|
||||||
|
|
||||||
// GAME LOOP!
|
// GAME LOOP!
|
||||||
Automap_flag = 0;
|
Automap_flag = 0;
|
||||||
Config_menu_flag = 0;
|
Config_menu_flag = 0;
|
||||||
|
|
|
@ -103,6 +103,7 @@ void init_game (void);
|
||||||
void game (void);
|
void game (void);
|
||||||
void close_game (void);
|
void close_game (void);
|
||||||
void calc_frame_time (void);
|
void calc_frame_time (void);
|
||||||
|
void FixedStepCalc();
|
||||||
void do_flythrough (object * obj, int first_time);
|
void do_flythrough (object * obj, int first_time);
|
||||||
|
|
||||||
extern jmp_buf LeaveGame; // Do a long jump to this when game is over.
|
extern jmp_buf LeaveGame; // Do a long jump to this when game is over.
|
||||||
|
|
|
@ -1199,6 +1199,7 @@ void StartNewLevelSub(int level_num, int page_in_textures)
|
||||||
init_morphs();
|
init_morphs();
|
||||||
init_all_matcens();
|
init_all_matcens();
|
||||||
reset_palette_add();
|
reset_palette_add();
|
||||||
|
game_flush_inputs(); // clear out the keyboard
|
||||||
|
|
||||||
if (!(Game_mode & GM_MULTI) && !Cheats_enabled)
|
if (!(Game_mode & GM_MULTI) && !Cheats_enabled)
|
||||||
set_highest_level(Current_level_num);
|
set_highest_level(Current_level_num);
|
||||||
|
|
|
@ -1385,6 +1385,7 @@ void controls_read_all()
|
||||||
} else {
|
} else {
|
||||||
mouse_axis[0] = 0;
|
mouse_axis[0] = 0;
|
||||||
mouse_axis[1] = 0;
|
mouse_axis[1] = 0;
|
||||||
|
mouse_axis[2] = 0;
|
||||||
mouse_buttons = 0;
|
mouse_buttons = 0;
|
||||||
use_mouse=0;
|
use_mouse=0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue