Commit graph

68 commits

Author SHA1 Message Date
Kp 2ceb0168f2 Split is_proximity_bomb_or_smart_mine* to d1x/d2x 2019-08-15 01:34:22 +00:00
Kp 65555b6eba Require only object_base for object_to_object_visibility 2019-07-27 17:48:03 +00:00
Kp 040de5b10e Rename ObjectState to LevelUniqueObjectState for consistency 2018-12-30 00:43:57 +00:00
Kp 9360a41816 Move Guided_missile into d_level_object_state 2018-10-08 03:58:48 +00:00
Kp 852ab312d5 Remove global Network_laser_track 2018-03-05 01:40:44 +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
Kp a55de34884 Pass canvas to Laser_render 2017-03-11 19:56:26 +00:00
Kp 7df99350dd Pass player to do_laser_firing_player 2017-02-08 23:34:41 +00:00
Kp 012238ba14 Fold segnum.h into fwd-segment.h 2016-12-24 18:12:17 +00:00
Kp 117e205ff0 Fold spreadfire calls to Laser_player_fire_spread 2016-12-10 17:51:09 +00:00
Kp a70d1ac646 Pass player_info &to omega_charge_frame 2016-11-19 18:09:26 +00:00
zico 407805be42 Restored proper scaling of Min_trackable_dot by adding new function get_scaled_min_trackable_dot(). This was previously a fixed defintion based on Descent 1's result of Min_trackable_dot's scaling if FrameTime < F1_0/16 which did not properly reflect the intended result of Descent 2 nor did it properly align to different FrameTime/HOMING_TURN_RATE settings. get_scaled_min_trackable_dot() will scale the result accordingly for whatever fixed or variable time setting is given and respecting each game's individual scaling. 2016-10-10 15:37:25 +02:00
Kp 8248438ffa Move Omega_charge to player_info 2016-08-28 22:41:47 +00:00
zico dad3e953e9 Retored historically accurate versions of homing tracking and lifeleft calculations for D1X and D2X based on their original source code releases instead of mixing them together. Further encabsuled NEWHOMER code to disable unused functions and variables if NEWHOMER is disabled. 2016-08-17 13:43:01 +02:00
Kp 139741ec40 Pass const object_base to Laser_render 2016-07-23 04:10:42 +00:00
Kp 6251848c5f Move Missile_gun into player_info 2016-07-06 01:54:25 +00:00
zico 64400ff284 Restored original Descent 2 HOMING_MAX_TRACKABLE_DOT for D2X build, formerly using the Descent 1 setting 2016-05-10 14:22:53 +02:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
Kp 9ceedc96a8 Propagate valptridx requirement up 2016-01-09 16:38:14 +00:00
Kp db9fb0ed42 Move more symbols into namespace dcx/dsx 2015-12-22 04:18:50 +00:00
Kp b683b4cc68 Scope weapon type 2015-12-03 03:26:49 +00:00
Kp 31d538ebe2 Use helper for robot weapon type 2015-12-03 03:26:48 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp 2196008178 Move fwdobject.h -> fwd-object.h for consistency 2015-10-10 03:44:14 +00:00
Kp 946048c54b Move valptridx subtypes to individual fwd headers 2015-08-22 20:43:04 +00:00
zico 2bfe21183e Changing homing turn times to 30 FPS base again by user request 2015-06-01 15:27:34 +02:00
zico b04282e791 Using one global yet independent timeer for homing missiles similar to d_tick instead of having one in each missile object. Also decreased HOMING_TURNING_TIME to 25 FPS base 2015-05-30 18:29:41 +02:00
Kp ed86b53395 Make Muzzle_queue_index static 2015-05-09 17:39:01 +00:00
Kp b5eae4c809 Split create_smart_children 2015-05-09 17:38:58 +00:00
Kp 08a42a68ff Pass vcobjptridx to laser_are_related 2015-05-09 17:38:58 +00:00
Kp 8d849b2b39 Wrap laser level in class
Move enum laser_level_t to weapon.h for the new class.
2015-04-26 20:15:56 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 12ad357b8d Move Wimp Menu to macro 2015-03-28 17:18:02 +00:00
Kp fbac119095 Propagate use of objptridx_t 2014-12-23 04:20:27 +00:00
Kp cf31cc4a5d Switch Laser_render to vobjptr_t 2014-11-30 22:09:23 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp ad717e59e8 Pass laser vectors as const & 2014-10-26 21:37:27 +00:00
Kp c928c09884 Skip sqrt for homing check 2014-10-10 02:41:51 +00:00
Kp b95759aecc Propagate use of objptridx 2014-08-23 23:53:56 +00:00
Kp 66cb80c343 Propagate use of objptridx 2014-08-17 20:31:18 +00:00
Kp 125d9257be Use special type names for segment/object numbers 2014-08-13 02:57:12 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp a2427f58b5 Use special type to reduce pointer/index conversions 2014-01-12 19:32:12 +00:00
Kp 9a5d0f6f09 Use symbolic values for segment/object first/none 2014-01-06 04:17:55 +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 0c30fa7cf3 Whitelist MAX flash missiles as valid laser type 2013-12-22 01:15:40 +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
Drakona 04d84ae61d Pass shot orientation with each weapon packet 2013-12-05 13:11:49 +01:00
Kp 08efe14586 Remove unused Laser_player_fire parameter harmless_flag 2013-11-28 02:12:13 +00:00
Kp 4fcf34fdbb Make create_weapon_object static 2013-10-28 04:16:45 +00:00