Commit graph

27 commits

Author SHA1 Message Date
Kp 6215ef8e06 Pass LevelSharedRobotInfoState to various functions that need it 2022-07-09 13:39:29 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp c93e7f44c3 Move object::last_pos to LevelUniqueObjectState
Only the console player's last position needs to be remembered across
frames.  Copy the console player's position out before processsing
object movement.  For all other objects, retain a temporary for use by
the position recovery code.
2019-12-22 05:34:08 +00:00
Kp 03cca2b3dc Track visited segments as a local
This fixes a subtle bug where a perfectly immobile player would reuse a
previous run.  In practice, players are not immobile.
2017-08-02 02:49:13 +00:00
Kp 599ac9dee0 Always qualify valptridx type/factory
Previously, valptridx used PREFIX for allow-invalid+mutable, c#PREFIX
for allow-invalid+const, v#PREFIX for require-valid+mutable, vc#PREFIX
for require-valid+const.  Convert the types, factories, and all usage
sites to specify a qualifier for all four combinations:

	im#PREFIX -> allow-invalid+mutable
	ic#PREFIX -> allow-invalid+const
	vm#PREFIX -> require-valid+mutable
	vc#PREFIX -> require-valid+const

Changes to common/include/valptridx.h and common/include/fwd-valptridx.h
are manual.  All other changes are generated by:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\(v\?\)\(\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/\1m\2/g'

for the 'm' prefix and:

	git grep -lz -e '\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\>' | xargs -0 sed -i -e 's/\<\([cm]\(obj\|seg\|clwall\|wall\|actdoor\|trg\)\(ptridx\|ptr\|idx\)\(_t\)\?\)\>/i&/g'

for the 'i' prefix.
2017-06-10 03:31:02 +00:00
Chris Taylor 4cc801f42f Remove calls to window_close(Game_wind) when game finished or over
Replace calls to window_close(Game_wind) with returning window_event_result::close to game handler. Applies to when DoEndGame() is called, DoGameOver() is called, aborting in the kmatrix screen (multiplayer game) during AdvanceLevel() and playing one demo frame causes playback to stop in GameProcessFrame(). Closing a window within its handler is problematic - it can result in an unstable state.
2017-01-08 21:08:50 +08:00
Kp ee1003f29f Move conditionally compiled code into namespace dsx 2016-08-25 04:05:32 +00:00
Kp aa95cbfccc Move set_thrust_from_velocity to dcx 2016-07-15 03:43:01 +00:00
Kp 72aa4bc8fb Pass object &to phys_apply_rot 2016-04-06 03:34:14 +00:00
Kp bad1464dcf Pass object_base &to physics_turn_towards_vector 2016-04-06 03:34:14 +00:00
Kp 6a1e1670cc Pass object_base &to phys_apply_force 2016-04-06 03:34:14 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp e99a9236cf Avoid redundant vsegptridx calculation in object_move_one 2015-04-11 04:01:29 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 66a70fd373 Prepare for global arrays to be array<> 2015-04-02 02:36:52 +00:00
Kp cf4d216c41 Pass check_and_fix_matrix vms_matrix by & 2014-11-04 01:30:49 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp c87e84217b Pass phys_apply_* vms_vector by const & 2014-10-26 21:37:34 +00:00
Kp 5b97433ce5 Make various ai functions take const vms_vector& 2014-10-02 03:02:36 +00:00
Kp 66cb80c343 Propagate use of objptridx 2014-08-17 20:31:18 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp f9c7311214 Pass objptridx_t to do_physics_sim 2014-01-11 22:47:37 +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 584fc93f34 Move similar/main/automap.c -> similar/main/automap.cpp 2013-10-05 21:35:58 +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 4ee6714372 Move */main/physics.h -> common/main/physics.h 2013-03-03 01:03:33 +00:00
Renamed from d2x-rebirth/main/physics.h (Browse further)