Commit graph

57 commits

Author SHA1 Message Date
Kp cbd2cd7c54 Move SysNoTitles to CArg 2015-12-24 04:01:27 +00:00
Kp 61fe046ba2 Reuse show_first_found_title_screen for Descent 1
This avoids an Error call if none of the titles are available.
2015-10-09 02:46:11 +00:00
Kp 29f79f0a6b Enable -notitles for Descent 2 2015-10-09 02:46:09 +00:00
Kp 6224b53581 Use operator?: for flash_cursor gr_set_fontcolor 2015-09-29 02:41:22 +00:00
Kp d9cef82f81 Allow nullptr for gr_get_string_size 2015-09-29 02:41:22 +00:00
Kp 17b1943c5e Mark various per-file structures as static 2015-08-12 03:11:46 +00:00
Kp 5573ed6bea Cache font scale X float 2015-06-13 22:42:20 +00:00
Kp 6792c1bc4b Enable -Wunused-parameter 2015-04-26 20:15:56 +00:00
Kp 6b6eaef226 Include polyobj.h from robot.h
Swap the inclusion order since all robots are polyobjects, but not all
polyobjects are robots.
2015-04-02 02:36:57 +00:00
Kp ae8b99ae7d Use RAIIdigi_sound for briefing printing_channel 2015-04-02 02:36:55 +00:00
Kp b60c603e21 Avoid redundant PHYSFSX_exists checks 2015-04-02 02:36:55 +00:00
Kp 61ee6463aa Remove unused show_title_screen return value 2015-04-02 02:36:55 +00:00
Kp b36ce28382 Remove unnecessary strcpy in titles.cpp 2015-04-02 02:36:55 +00:00
Kp 66806e1f34 Enable -Wmissing-braces
clang includes it in -Wall, so add it for gcc
2015-04-02 02:36:52 +00:00
Bradley Bell 51de6c80b5 Don't play chattering over D1 briefing music. 2015-02-08 12:26:36 -08:00
Bradley Bell 2b4aba341d Properly scale and simplify arithmetic for briefing bitmap.
Constrain by screen height, by just using rescale_y for width and height.
Then use show_fullscr to fill the destination canvas.
2015-02-07 22:48:04 -08:00
Bradley Bell 33f0731d11 Remap briefing bitmap. 2015-02-07 22:47:18 -08:00
Kp 99a4a0ed62 Capture range_for by-value temporaries as const
Modifying a by-value temporary does not affect the underlying container,
so modifying it is almost always a bug.  Require use of a by-reference
capture when modification is desired.

sed -i -e 's/range_for\s*(\s*\(const\s\+\)\?auto\s\+\([[:alpha:]_]\)/range_for (const auto \2/g'
2015-02-05 03:03:49 +00:00
Kp 31450e4843 Pass iff_read_bitmap arg by & 2015-01-25 05:32:44 +00:00
Kp 40fd988a0f Hide local classes in anonymous namespaces 2015-01-23 03:55:06 +00:00
Kp 84e3a03451 Remove unused parameters 2015-01-18 01:58:33 +00:00
Kp f7815810e8 Use RAIIPHYSFS_File to manage PHYSFS_File
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp 68d705a85a Use bool conversion to test PHYSFS_File pointer 2015-01-17 18:31:42 +00:00
Kp 28a31a223f Centralize window_close calls 2015-01-17 18:31:41 +00:00
Kp fccb6814f8 Pass gr_create_sub_canvas arg by & 2015-01-17 18:31:40 +00:00
Kp fcc4f7dba5 Use unique_ptr for briefing_screen
Add workaround for briefing use of global Briefing_screens.
2015-01-17 18:31:40 +00:00
Kp 80aa48efb4 Pass digi_*_start_sound soundobj as sound_object* 2014-12-14 05:22:59 +00:00
Kp c990701d87 Pass show_fullscr arg by & 2014-12-02 03:35:01 +00:00
Kp c89e3b7452 Pass gr_bitmapm arg as & 2014-12-02 03:35:01 +00:00
Kp 95539512d5 Pass pcx_read_bitmap arg by & 2014-12-02 03:35:01 +00:00
Kp 594c597621 Pass gr_init_bitmap_data arg by & 2014-11-30 22:09:20 +00:00
Kp 97332b848c Pass gr_free_bitmap_data arg by & 2014-11-30 22:09:20 +00:00
Kp ad35ff421e Use new/delete for title_screen 2014-11-30 22:09:19 +00:00
Kp 166f15617d Pass ogl_ubitmapm_cs arg by & 2014-11-30 22:09:18 +00:00
Kp fb1704780b Move pMovie into local data structures 2014-10-29 03:01:18 +00:00
Kp a8f853aa7a Pass d_event arg by const& 2014-10-04 22:36:13 +00:00
Kp a02f78a171 Move saving window pointer into helper 2014-09-07 19:04:07 +00:00
Kp ff31905181 Use unique_ptr for grs_subcanvas 2014-09-07 19:04:06 +00:00
Kp 94550355a8 Use make_unique instead of bare new 2014-08-24 18:28:09 +00:00
Kp 4029de77b0 Fix array underrun in redraw_messagestream 2014-08-08 02:54:50 +00:00
Kp f47aa29cd9 Use color_t for color values 2014-08-08 02:07:47 +00:00
Kp 4acbb40ad7 Use enum for window event result 2014-08-07 02:47:48 +00:00
Kp 13b233b7d7 Fix Windows build 2014-07-26 22:53:41 +00:00
Kp 6020c9c013 Use d_fname for DOS filenames 2014-07-25 02:54:31 +00:00
Kp ce1729f23a Use unique_ptr<> for briefing 2014-07-22 23:48:23 +00:00
Kp bd1c6d8c5d Reduce header includes of physfsx.h 2014-07-22 23:48:23 +00:00
Kp 5c30b2fefd Use operator= instead of memcpy 2014-07-05 19:25:41 +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