Kp
70c4cc87ab
Use forward-declaration header for weapon.h
2015-07-25 23:10:45 +00:00
Kp
06b453d617
Enable D1 weapon drops
2015-07-02 02:37:55 +00:00
Kp
2f00efdcc6
Fix gcc-4.6 weapon build
...
gcc-4.6 chokes on `static constexpr type value{};`, but accepts
`static constexpr auto value = type{};`
Fixes: 9d213b5282
("Wrap player_has_weapon return type")
2015-05-22 03:33:20 +00:00
Kp
0d564814f5
Convert Primary_weapon to primary_weapon_index_t
2015-04-26 20:15:57 +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
cca163fc30
Split select_weapon
2015-04-26 20:15:52 +00:00
Kp
f789e29b41
Simplify check_to_use_primary
2015-04-26 20:15:52 +00:00
Kp
610f603ebf
Pass weapon_name to select_weapon
2015-04-26 20:15:52 +00:00
Kp
10b9206a9b
Split do_weapon_select
2015-04-26 20:15:51 +00:00
Kp
4d046c5336
Split auto_select_weapon
2015-04-26 20:15:51 +00:00
Kp
b88c232f9f
Use powerup_type_t for *_weapon_to_powerup
2015-04-19 04:18:53 +00:00
Kp
d7066c3eb9
Remove constant arguments to pick_up_ammo
2015-04-19 04:18:53 +00:00
Kp
9d213b5282
Wrap player_has_weapon return type
2015-04-19 04:18:50 +00:00
Kp
a9c81c5614
Move Weapon_is_energy to collide.cpp
2015-04-02 02:36:57 +00:00
Kp
90fbebf8fd
Convert most global arrays to array<>
2015-04-02 02:36:52 +00:00
Kp
5212daa4ad
Fix seismic duration sync
2015-02-14 22:48:29 +00:00
Kp
d4117871a1
Use range_for for intro movies
2015-01-29 04:27:36 +00:00
Kp
bca8889695
Simplify Primary_ammo_max
2015-01-17 18:31:42 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
78ad2adabf
Write weapon_info carefully
2014-09-27 22:46:25 +00:00
Kp
382afad2b8
Refactor weapon_info_read_n
...
Fix potential for initializing .children to wrong value with old data
files. Currently, this cannot be hit because no caller uses the right
combination of arguments to cause it.
Rely on partial_range to report invalid custom files.
2014-09-27 21:21:58 +00:00
Kp
93bb883563
Use array<> for weapon_info fields
2014-09-27 17:15:17 +00:00
Kp
703f60ac3f
Fix -Wtype-limits warnings
2014-09-21 21:41:55 +00:00
Kp
b95759aecc
Propagate use of objptridx
2014-08-23 23:53:56 +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
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
18aea17f9e
Move */main/fireball.c -> similar/main/fireball.c
2013-12-02 00:21:31 +00:00
Kp
6e6b480082
Use enum for weapon types
2013-11-02 04:26:51 +00:00
Kp
6fc8d110f3
Only give secondaries that exist
2013-11-02 04:25:33 +00:00
Kp
58958e091b
Only give primaries that exist
2013-11-02 04:24:14 +00:00
Kp
d656bd4115
Move similar/main/game.c -> similar/main/game.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
1b4169b0d0
Move */main/powerup.c -> similar/main/powerup.c
2013-10-02 02:51:25 +00:00
Kp
9e3fb796e1
Use helper for comparing to proximity bomb index
2013-09-21 23:19:38 +00:00
Kp
6e1d9f1f0c
Add helper to test for weapons that use vulcan ammo
2013-09-20 23:12:51 +00:00
zico
a527348681
Added MULTI_FIRE_BOMB as alteration of MULTI_FIRE to keep bombs mapped in a Multiplayer match for later Host authority and to make their chaff ability work correctly. Additionally added MULTI_FIRE_TRACK to only send Network_laser_track if > -1. On the way I made laser.c a bit more similar between D1X and D2X
2013-08-09 17:21:03 +02:00
Kp
4187648621
Remove redundant/obsolete declarations
2013-07-21 21:55:00 +00:00
Kp
e41fa25905
Make weapon.h usable in common source files
2013-07-21 18:15:20 +00:00
Kp
6c9c87e27c
Move */main/weapon.h -> common/main/weapon.h
2013-07-20 16:40:08 +00:00