Commit graph

139 commits

Author SHA1 Message Date
Kp 2196008178 Move fwdobject.h -> fwd-object.h for consistency 2015-10-10 03:44:14 +00:00
Kp 743f2df80f Add fwd-window.h with forward declarations of window.h 2015-10-09 02:46:10 +00:00
Kp 7034b68357 Manage world time automatically where possible
For all cases where world time nests, use automatic management.  Some
sites disable time in one function and enable it elsewhere.  These are
untouched.
2015-10-09 02:46:09 +00:00
Kp 946048c54b Move valptridx subtypes to individual fwd headers 2015-08-22 20:43:04 +00:00
Kp d3df8b8e83 Fix LTO -Wodr for cheats 2015-07-18 03:49:47 +00:00
Kp 29aa820dc0 Only respawn when the player presses fire
Only respawn when the player presses a fire key/button (primary,
secondary, or flare).  Only clear primary, second, flare, and bomb when
respawning.  This allows dead players to use the automap or change their
camera views.

This is a necessary step to flushing only the firing inputs on respawn,
as requested by Mako88 in
<https://github.com/dxx-rebirth/dxx-rebirth/issues/104>.  Currently,
inputs are flushed again by the activation of the game window, so
respawn still flushes all inputs.

	#1  0x00005555555cee19 in game_flush_inputs () at similar/main/game.cpp:374
	#2  game_handler (event=...) at similar/main/game.cpp:1114
	#3  0x0000555555576113 in window_send_event (wind=..., event=...) at common/arch/sdl/window.cpp:208
	#4  0x000055555557627b in WINDOW_SEND_EVENT (file=0x5555556dc126 "common/arch/sdl/window.cpp", e=0x5555556dc141 "EVENT_WINDOW_ACTIVATED", line=179, event=..., w=...) at common/include/window.h:111
	#5  window_set_visible (w=..., visible=visible@entry=1) at common/arch/sdl/window.cpp:179
	#6  0x00005555555e90f5 in window_set_visible (visible=1, wind=<optimized out>) at common/include/window.h:90
	#7  DoPlayerDead () at similar/main/gameseq.cpp:1479
	#8  0x000055555563ed65 in dead_player_frame () at similar/main/object.cpp:1486
	#9  0x00005555555cf4df in GameProcessFrame () at similar/main/game.cpp:1329
	#10 game_handler (event=...) at similar/main/game.cpp:1157
2015-06-20 16:16:43 +00:00
Kp c53b734abb Compute slide segments early
Store slide flag in segment to save one byte per segment.
2015-05-17 20:37:59 +00:00
Kp 0ece005dfa Use screen_mode for screen resolution 2015-05-14 02:23:13 +00:00
Kp 27b6ad1630 Reduce game.h includes 2015-04-19 04:18:51 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 91d31b1952 Wrap object signature in subtype 2015-03-22 18:49:21 +00:00
Kp 1649fc791c Use partial_range on Flickering_lights 2014-11-23 04:36:58 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp 666dd75629 Return objptridx_t from find_escort 2014-10-25 16:40:20 +00:00
Kp 69f5e93382 Centralize game_render_frame_mono call to gr_flip 2014-10-16 02:44:43 +00:00
Kp e7e23eb92e Make unused_window_userdata_t const 2014-10-16 02:30:29 +00:00
Kp a8f853aa7a Pass d_event arg by const& 2014-10-04 22:36:13 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
Kp 4acbb40ad7 Use enum for window event result 2014-08-07 02:47:48 +00:00
Kp 41e016954a Remove unused add_flicker 2014-07-14 02:17:40 +00:00
Kp e99b496d72 Unpack game_cheats 2014-06-26 03:17:23 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 094dfbf3d4 Reduce header inclusions 2013-12-31 03:22:03 +00:00
Kp 549d7ea261 Use correct size for flickering_light mask 2013-12-31 00:11:05 +00:00
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
C++ does not require this pattern.

import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
	m = to.match(line)
	if m:
		osn = m.group(1)
		print 'struct %s\n{' % osn
		continue
	if osn:
		m = tc.match(line)
		if m:
			csn = m.group(2)
			if osn == csn:
				print '}%s;' % m.group(1)
				osn = None
				continue
			else:
				osn = None
	print line,
2013-12-28 22:48:07 +00:00
Kp 86a88bedbd Use enum for CockpitMode
This makes the debugger output nicer.
2013-12-20 03:14:16 +00:00
Kp cea46651fc Check type of window handler function 2013-12-15 18:51:26 +00:00
Kp 9de54cfa74 Switch to C++ linkage
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
	if line == cxxguard:
		guard = 1
		continue
	if guard:
		if line == 'extern "C" {\n':
			guard = 2
			continue
		if line == '}\n':
			guard = 0
			continue
		if guard == 2:
			assert(line == '#endif\n')
			guard = 0
			print cxxguard,
			continue
	print line,
2013-12-06 03:35:32 +00:00
Kp 19fef0a51d Simplify full_palette_save calls 2013-10-28 04:16:44 +00:00
Kp b4107e6526 Remove duplicate declarations 2013-10-03 03:11:52 +00:00
Kp c58c4e4d06 Move declarations to headers 2013-10-03 03:11:52 +00:00
Kp 91f6d5e72d Move game_init_render_buffers inline 2013-09-28 23:51:52 +00:00
Kp 8d13642c9f Hide GM_CAPTURE tests behind static inline 2013-08-11 20:46:52 +00:00
Kp 0c3adc48df Hide GM_HOARD tests behind static inline 2013-08-11 20:46:52 +00:00
Kp 4e6142d779 Move similar/arch/ogl/gr.c -> similar/arch/ogl/gr.cpp 2013-08-10 03:56:14 +00:00
zico 40c5f10e20 Added definition of DESIGNATED_GAME_FPS as 30 and DESIGNATED_GAME_FRAMETIME based on the former. We use those for d_tick_count intervals and to scale other parts that have never been properly aligned to FrameTime before. In that regard, Release builds will take DESIGNATED_GAME_FPS as MINIMUM_FPS for -maxfps argument 2013-08-08 22:07:29 +02:00
Kp a1ba420031 Mark various parameters and variables as const 2013-07-20 23:12:24 +00:00
Kp b87e7c2325 Merge branch 'd2x-rebirth/master' into unification/master 2013-06-02 20:14:42 +00:00
Kp b4e7d2e899 Move */main/game.h -> common/main/game.h 2013-03-03 01:03:33 +00:00
Renamed from d2x-rebirth/main/game.h (Browse further)