Commit graph

75 commits

Author SHA1 Message Date
Kp 53a1d5f9ce Pass vertex factory to compute_segment_center 2018-03-12 03:43:47 +00:00
Kp 8d80300e0a Remove obsolete D1 hostage editor code
This code was part of a feature abandoned before retail.  It cannot be
usefully used in campaigns.  Remove it to reduce code size and simplify
later changes.
2017-10-14 17:10:31 +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 c8f51c7184 Simplify redundant ehostage.cpp conditional 2017-02-08 23:34:41 +00:00
Kp 22e364e030 Pass canvas to gr_clear_canvas 2017-01-01 00:45:45 +00:00
Chris Taylor b8b19baa92 Make sure wall dialog and hostage dialog close properly
When responding to EVENT_WINDOW_CLOSE, set MainWindow to nullptr - fixing multiple issues with these dialogs including the inability to re-open them and a crash on exiting the editor.
2016-11-11 16:09:57 +08:00
Chris Taylor 9d7b7dc160 Make hostage_dialog_handler return window_event_result::close instead of closing itself
This ensures the event system will know what's going on.
2016-10-27 17:31:26 +08:00
Kp 863e545461 Fix D1 editor build
The UI_DIALOG subclass changes missed one UI_DIALOG handler.

Fixes: db665d8c33 ("Allow dcx::UI_DIALOG struct to be subclassed - step 2")
2016-10-15 00:53:14 +00:00
Kp 69eec0d71f Save some editor gadget pointers 2016-09-24 18:06:11 +00:00
Kp a3ae630829 Remove default argument for basic_ptridx(index) 2016-01-09 16:38:14 +00:00
Kp 78de0ac119 Add fwd-event.h with forward declarations of event.h 2015-10-09 02:46:10 +00:00
Kp 17b1943c5e Mark various per-file structures as static 2015-08-12 03:11:46 +00:00
Kp aac7575b8f Use valptr for ehostage.cpp 2015-07-12 01:04:18 +00:00
Kp 0bf2a6eb80 Return unique_ptr from ui_add_gadget_button 2014-12-20 04:36:10 +00:00
Kp 89b1ff8795 Return unique_ptr from ui_add_gadget_userbox 2014-12-20 04:36:09 +00:00
Kp 80a21ab7d6 Remove obsolete hostage message support
This was never included in the game.  Editor support for it is
incomplete and does not allow text entry.  Remove it.
2014-12-20 04:36:09 +00:00
Kp cf1d08c1b6 Use unique_ptr for hostage_dialog 2014-12-20 04:36:08 +00:00
Kp 6d61198130 Pass compute_segment_center vector by & 2014-10-30 03:32:51 +00:00
Kp 258d6b4a04 Pass place_object vms_vector arg by & 2014-10-26 21:36:10 +00:00
Kp a8f853aa7a Pass d_event arg by const& 2014-10-04 22:36:13 +00:00
Kp bd1c6d8c5d Reduce header includes of physfsx.h 2014-07-22 23:48:23 +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 be041a9cfc Add type checking for ui_create_dialog 2013-12-17 03:49:24 +00:00
Kp 2714679284 Mark private functions static 2013-11-02 04:23:55 +00:00
Kp 69567b1b99 Remove unused vclip_play 2013-10-29 03:24:42 +00:00
Kp 3d20ee8c92 Move d1x-rebirth/editor/ehostage.c -> d1x-rebirth/editor/ehostage.cpp 2013-10-28 04:14:19 +00:00
Kp 5b0c4b10ac Use accessor for most get/set object->id accesses 2013-10-20 22:49:09 +00:00
Kp f9899a9f20 Mark various functions static 2013-10-03 03:11:51 +00:00
Kp a881ee455e Remove fix.h 2013-08-08 03:01:48 +00:00
Kp e0d8afc8e1 Remove d1x-rebirth/editor/meddraw.c 2013-06-30 21:22:10 +00:00
Kp 306ab24486 Merge branch 'd1x-rebirth/master' into unification/master 2013-06-02 20:13:38 +00:00
Kp 616a3a6b70 Merge branch d1x-rebirth into unification/master
Conflicts:
	SConstruct
	common/main/cntrlcen.h
	common/main/fuelcen.h
	common/main/fvi.h
	common/main/gameseq.h
	common/main/gauges.h
	common/main/multibot.h
	common/main/net_udp.h
	common/main/object.h
	common/main/player.h
	common/main/vers_id.h
	d1x-rebirth/main/hostage.c
	d1x-rebirth/main/multi.c
	main/controls.c
	main/hostage.h
	main/laser.h
	main/screens.h
	similar/arch/ogl/gr.c
	similar/editor/centers.c
	similar/main/inferno.c
	similar/main/lighting.c
	similar/main/multibot.c
	similar/main/paging.c
	similar/main/physics.c
	similar/main/player.c
	similar/main/robot.c
	similar/main/wall.c
2013-04-21 04:51:35 +00:00
Kp 2679c2be10 Move */editor/texpage.c -> similar/editor/texpage.c 2013-03-03 01:03:33 +00:00
Kp a27d667716 Move */editor/medrobot.c -> similar/editor/medrobot.c 2013-03-03 01:03:33 +00:00
Kp 8263b74663 Move */editor/centers.c -> similar/editor/centers.c 2013-03-03 01:03:33 +00:00
Kp b5001feb2f Move */editor/objpage.c -> similar/editor/objpage.c 2013-03-03 01:03:33 +00:00
Kp 7224dde00a Move */editor/seguvs.c -> similar/editor/seguvs.c 2013-03-03 01:03:33 +00:00
Kp 93d6dc54bd Move */editor/segment.c -> similar/editor/segment.c 2013-03-03 01:03:33 +00:00
Kp 47b6daaa7a Move */editor/mine.c -> similar/editor/mine.c 2013-03-03 01:03:33 +00:00
Kp cd4b771b30 Move */editor/medwall.c -> similar/editor/medwall.c 2013-03-03 01:03:33 +00:00
Kp fa8217ff13 Move */editor/med.c -> similar/editor/med.c 2013-03-03 01:03:33 +00:00
Kp 631bc1e3a6 Move */editor/group.c -> similar/editor/group.c 2013-03-03 01:03:33 +00:00
Kp 75fc0d5e8a Move */editor/ksegsize.c -> similar/editor/ksegsize.c 2013-03-03 01:03:33 +00:00
Kp 931b944cba Move */editor/kgame.c -> similar/editor/kgame.c 2013-03-03 01:03:33 +00:00
Kp f39cd4dbf6 Centralize RDL/RL2 file extension text 2013-03-17 22:18:42 +00:00
Kp 1c7c90d038 Move */editor/eswitch.c -> similar/editor/eswitch.c 2013-03-03 01:03:33 +00:00
Kp 4ba0495b0a Move */editor/eobject.c -> similar/editor/eobject.c 2013-03-03 01:03:33 +00:00
Kp 0d8cf57ab0 Move */editor/eglobal.c -> similar/editor/eglobal.c 2013-03-03 01:03:33 +00:00