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
67ad7811bd
Remove unused physics_info::brakes
2013-12-28 22:47:46 +00:00
Kp
3563bfb85a
Enable Descent II divide-by-zero check in Descent too
2013-12-28 22:45:27 +00:00
Kp
fbd35de5f0
Remove bogus fvi assertion
2013-12-28 22:40:11 +00:00
Kp
dfbe78c214
Remove useless 'unused' field in grs_bitmap
...
Saves a realignment to pointer boundary.
2013-12-28 22:38:02 +00:00
Kp
2d274dba8b
Tighten SWAPINT
2013-12-28 22:37:00 +00:00
Kp
cc9f7f669d
Tighten definition of SWAPSHORT
2013-12-28 22:36:59 +00:00
Kp
8a83c93c8c
Move ai_local_read_n_swap loop into caller
2013-12-28 22:21:00 +00:00
Kp
94ce68f556
Color code weapon gauges
2013-12-28 22:21:00 +00:00
Kp
6e722eb789
Remove more unnecessary sprintf calls in do_escort_menu
2013-12-28 22:10:25 +00:00
Kp
ba63c18d9b
Remove unnecessary sprintf in do_escort_menu
2013-12-28 22:10:24 +00:00
Kp
16f1044930
Switch init_ai_objects to range_for to eliminate a variable
2013-12-28 22:10:24 +00:00
Kp
38b2dbe639
Move object* -> objnum conversion into init_ai_object
2013-12-28 22:10:24 +00:00
Kp
7acd98949f
Remove reliance on layout of control_center_triggers
2013-12-28 22:10:24 +00:00
Kp
79fe1d899c
Simplify control_center_triggers_read_n
2013-12-28 22:04:47 +00:00
Kp
1694eed536
Match PHYSFSX_readSXE?? return types to the internal type
2013-12-28 22:03:50 +00:00
Kp
0aba1b9d76
Use correct SWAP for wall segnum
2013-12-28 22:02:54 +00:00
Kp
75ce83098d
Write log message when local player escapes the mine
...
For consistency with messages that other players have escaped, also log
the local player escaping.
2013-12-28 18:17:09 +00:00
Kp
facb6a3598
Add console prints of PhysFS search path changes
2013-12-28 18:16:19 +00:00
Kp
aa16a01fec
Mark control_center_triggers_write input as const
2013-12-25 23:51:28 +00:00
Kp
bdf55f907b
Use assignment instead of memcpy
2013-12-25 23:50:26 +00:00
Kp
8c63ad4d09
Use dedicated type for Objects[] array
2013-12-25 23:49:04 +00:00
Kp
f9fca1c9bd
Fix editor crash introduced by bad use of globals
2013-12-25 23:48:39 +00:00
Kp
46f97e9f41
Reduce sprintf usage in kmatrix
2013-12-25 04:41:42 +00:00
Kp
93ce29f88d
Simplify test for exit tunnel with wrong final child
2013-12-25 04:39:54 +00:00
Kp
25e95936d5
When pursuing player, avoid segment_none instead of segment 1
...
Avoiding segment 1 makes no sense, and appears to be a bug.
2013-12-25 04:39:16 +00:00
Kp
f9269b0fb4
Show failed hostname when DNS lookup fails
2013-12-25 03:22:06 +00:00
Kp
f6ea0815cd
Remove unread player structure from savefile
2013-12-25 03:22:06 +00:00
Kp
7fb4c6307f
Add debug option -no-grab to prevent window grabbing
2013-12-22 20:56:55 +00:00
Kp
456c2d0bb0
Scrub control codes from stdout/file, but not HUD/console
2013-12-22 20:56:55 +00:00
Kp
6cb6faf5ce
Switch fvi to use a local visited_segment_bitarray_t
2013-12-22 20:56:55 +00:00
Kp
4460b16d0e
Simplify visited check in sphere_intersects_wall
...
Non-segments can never be visited, so check for existence first.
2013-12-22 20:56:55 +00:00
Kp
a7bd19a7ca
Convert fvi to use countarray for segment list
...
Also fixes a bug where seglist could receive wrong elements when
fvi_sub recursive call returns a type other than HIT_NONE. Bug caused
by badly named variables:
int ii;
for (ii=0;i < temp_n_segs && *n_segs < MAX_FVI_SEGS-1;)
seglist[(*n_segs)++] = temp_seglist[ii++];
The wrong counter is used for first part of the conditional, so
uninitialized elements of temp_seglist could be read back if i
(==n_segs_visited) is smaller than temp_n_segs or elements could be
skipped if i is greater than temp_n_segs.
2013-12-22 20:56:53 +00:00
Kp
038bbad26a
Rearrange headers to build under all test modes
2013-12-22 20:56:35 +00:00
Kp
58e740c0bd
Remove unused declaration of Center_names
2013-12-22 20:56:35 +00:00
Kp
c28d0c984c
Combine nearby d1/d2 guard in powerup.h
2013-12-22 20:56:35 +00:00
Kp
fe7c9fa444
Use countarray for HUD_messages
2013-12-22 20:56:33 +00:00
Kp
7894647bc9
Let PHYSFSX_puts receive optional string length
2013-12-22 20:13:22 +00:00
Kp
dce285fdb1
Pass computed message length from err_printf to con_puts
2013-12-22 20:13:05 +00:00
Kp
314950d0b2
Pass computed message length from Error to con_puts
2013-12-22 20:12:56 +00:00
Kp
84a0dcba27
Rename con_puts length template
2013-12-22 20:12:41 +00:00
Kp
7ea8507470
Move warning_printf newline handling into the function
2013-12-22 20:03:27 +00:00
Kp
80344777b0
Move err_printf newline handling into the function
2013-12-22 20:03:05 +00:00
Kp
44f1814b45
Store boss gate/teleport segments in countarray objects
2013-12-22 20:02:42 +00:00
Kp
e9693b5130
Clear SDL_Event before each poll
2013-12-22 20:02:42 +00:00
Kp
00a9fd7ac2
Split extra-view loop into helper function
2013-12-22 20:02:36 +00:00
Kp
6de986d39c
Print file offset on read error
2013-12-22 20:02:26 +00:00
Kp
88ec115c38
Show cloak/invulnerability time remaining on HUD
2013-12-22 20:02:23 +00:00
Kp
403d412000
Remove BEFORE/AFTER arguments to for_each_multiplayer_command
2013-12-22 20:02:22 +00:00
Kp
958100d676
Use visited_segment_bitarray_t for blast_nearby_glass
2013-12-22 05:33:18 +00:00