Commit graph

46 commits

Author SHA1 Message Date
Kp e6e00debba Pass only segidx to pick_connected_segment
A full object is not necessary.
2016-10-02 00:34:41 +00:00
zico 901a554e96 New powerup management code: Addeed functions and packet type to keep track of original and current level inventory as well as player and thief inventories. Calling maybe_drop_net_powerup() for all ammo based weapons except Concussion missiles. Limiting maybe_drop_net_powerup() to only spawn items missing from initial level inventory. Added function to let host respawn items that were lost for whatever reason. Expanded maybe_drop_net_powerup() and child functions to be able to drop item based on a random player. Changed back maybe_drop_secondary_weapon_egg() to its original behavior, dropping 3 of each type max. 2016-02-25 14:11:08 +01:00
Kp 6e20d86941 Move OF_PLAYER_DROPPED into drop_powerup
This fixes an issue where calling drop_powerup with num > 1 only tagged
one powerup as player-dropped.

This also changes powerups dropped by the thief to be "player-dropped",
since, aside from the initial shields/energy, they came from the player
originally.
2016-02-06 22:12:55 +00:00
Kp 8e86a3586d Use #ifdef dsx to guard dsx namespace 2016-01-09 16:38:15 +00:00
Kp 86709f547b Fix capitalization of PHYSFS_File
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
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 cfc35e819d Use inline namespace dcx for common/maths 2015-12-05 22:57:24 +00:00
Kp bb41075adb Add preprocessor guards around types that vary by game 2015-11-26 02:56:55 +00:00
Kp c0149be92a Use enum class explosion_vclip_stage for get_explosion_vclip 2015-11-15 22:30:41 +00:00
Kp ad8b4230df Move fwdsegment.h -> fwd-segment.h for consistency 2015-10-10 03:44:14 +00:00
Kp 2196008178 Move fwdobject.h -> fwd-object.h for consistency 2015-10-10 03:44:14 +00:00
Kp edccaa91f6 Check return of pick_connected_segment before use 2015-09-29 02:41:22 +00:00
Kp 946048c54b Move valptridx subtypes to individual fwd headers 2015-08-22 20:43:04 +00:00
Kp 15fb75c1c7 Fix check_header_includes build 2015-07-25 23:10:45 +00:00
Kp 13bcdcf0ca Use valptr for fireball.cpp 2015-07-12 01:04:19 +00:00
Kp 9ecb8d8601 Use fwdvalptridx instead of inline forward declarations 2015-06-13 22:42:16 +00:00
Kp b88c232f9f Use powerup_type_t for *_weapon_to_powerup 2015-04-19 04:18:53 +00:00
Kp a9a330bf3f Use array<> for expl_wall_list
Fixes: 125d9257be ("Use special type names for segment/object numbers")
2015-02-28 19:36:01 +00:00
Kp d63be88eb0 Propagate use of vsegptridx_t 2014-11-23 04:58:45 +00:00
Kp 57ed5c24fd Add developer option to test header completeness 2014-11-17 04:02:25 +00:00
Kp 53aa70cecb Use vsegptridx_t 2014-10-28 03:08:51 +00:00
Kp 8a0582766a Pass drop_powerup vector by const & 2014-10-28 01:46:07 +00:00
Kp fdfd849bd2 Pass explode_badass_weapon position by const & 2014-10-26 21:36:31 +00:00
Kp 7e955c2c7b Pass object_create_explosion_sub position by & 2014-10-26 21:36:25 +00:00
Kp b77eb5424b Move external_explosion into Objects 2014-10-25 16:40:18 +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 e2afc332ac Pass objptridx_t to explode_object 2014-01-12 00:33:28 +00:00
Kp 9d2c847b02 Pass objptridx_t to do_debris_frame 2014-01-12 00:33:19 +00:00
Kp 27c9bea1a8 Pass objptridx_t to object_create_badass_explosion 2014-01-12 00:32:46 +00:00
Kp c0ae10a0d6 Pass objptridx_t to explode_badass_weapon 2014-01-11 23:11:04 +00:00
Kp 1296662e96 Pass objptridx_t to object_create_badass_explosion 2014-01-10 04:02:53 +00:00
Kp 0d49f5b55a Use objptridx_t for object_create_badass_explosion 2014-01-10 03:23:57 +00:00
Kp ab3806af83 Use objptridx_t for object_create_explosion 2014-01-10 03:20:11 +00:00
Kp 9843406588 Remove unused return value of explode_badass_weapon 2014-01-10 03:17:55 +00:00
Kp d6fab53199 Remove unused return value of object_create_muzzle_flash 2014-01-10 03:14:14 +00:00
Kp 3ca0a6aca6 Remove unused return value of explode_badass_player 2014-01-04 18:03:10 +00:00
Kp 094dfbf3d4 Reduce header inclusions 2013-12-31 03:22:03 +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 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 8ed99faf5c Make headers freestanding 2013-10-26 03:50:28 +00:00
Kp d656bd4115 Move similar/main/game.c -> similar/main/game.cpp 2013-10-05 21:35:58 +00:00
Kp c58c4e4d06 Move declarations to headers 2013-10-03 03:11:52 +00:00
Kp 947de0c94f Move */main/fireball.h -> common/main/fireball.h 2013-03-03 01:03:33 +00:00
Renamed from d2x-rebirth/main/fireball.h (Browse further)