Commit graph

615 commits

Author SHA1 Message Date
Kp 12b57e84e6 Switch most in-tree http:// links to https://
For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it.  These domains were converted:

* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
2018-09-02 00:57:29 +00:00
Kp 19699037ce Move d2x-rebirth/main/bmread.cpp -> similar/main/bmread.cpp 2018-07-18 04:39:28 +00:00
Kp 9b028f26f2 Make eclip_num unsigned 2018-03-31 21:53:01 +00:00
Kp a3871cfefd Tighten eclip::dest_bm_num handling
Instead of testing for -1, test for any out-of-range value.
2018-03-31 21:53:01 +00:00
Kp 53a1d5f9ce Pass vertex factory to compute_segment_center 2018-03-12 03:43:47 +00:00
Kp 3276590084 Merge branch 'psyke83/rpi' into master
psyke83 reports that Debian distributions for Raspberry Pi now require a
different name for some video libraries.  Merge psyke83's SCons
enhancements to add support for the new names while retaining support
for the old names.
2017-10-26 02:02:50 +00:00
Conn O'Griofa 166b1ecd4d RPI: update vendor library names & add Mesa VC4 build support
Vendor library has new names to avoid conflicts with Mesa. Update
raspberrypi argument to use new libraries and support Mesa VC4 driver.

* raspberrypi=1 will build against the (newly named) vendor libraries
* raspberrypi=mesa will target building against the VC4 driver.

Both will select GLES by default, but you can target GL for the VC4 driver
via "raspberrypi=mesa opengles=0"
2017-10-22 02:50:13 +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 22b22a4a70 Use enumerate for verifying Effects 2017-10-14 17:10:31 +00:00
Kp 88832e3679 Use constexpr integral_constant for various magic numbers 2017-10-14 17:10:30 +00:00
Kp 4ea9ef5b0c Use reference for robot_info 2017-08-26 19:47:51 +00:00
Kp 7b12619c3a Unify resource file compilation 2017-08-02 02:49:12 +00:00
Kp 73d92bb509 Make wclip::num_frames uint16_t 2017-06-17 23:05:16 +00:00
Kp 4e578df4c6 Validate range for d1 bmread ab_load 2017-06-10 03:31:04 +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 34b603ad71 Expand bomb spin variance
Let D1 proximity bombs spin.  Let D2 smart mines and pre-placed mines
spin.
2017-03-11 19:56:26 +00:00
Kp c8f51c7184 Simplify redundant ehostage.cpp conditional 2017-02-08 23:34:41 +00:00
Kp 764d20d4e1 Make grs_bitmap::bm_flags private 2017-01-15 00:03:13 +00:00
Kp 22e364e030 Pass canvas to gr_clear_canvas 2017-01-01 00:45:45 +00:00
Kp d085175cbd Scrub invalid primary textures at level load
Past releases, when rendering an invalid primary texture, would
Int3() and then reset the texture to zero.  Commit d767f7c changed the
logic to return without resetting the texture, since the reset seemed to
be unnecessary.  Unfortunately, it is necessary.  Some levels, including
those shipped with the retail game data, specify bogus primary textures
on some surfaces.  After d767f7c, rendering a surface with an invalid
primary texture causes the surface to be invisible, even if it has a
valid secondary texture.

Remove the return statement added in d767f7c.  Extend
validate_segment_side to validate the primary texture on the tested
side.  When an invalid texture is found, reset it and log a diagnostic.
For built-in levels, log at level CON_VERBOSE since players cannot
readily fix the level.  For external levels, log at level CON_URGENT so
that level authors know to fix their level before releasing it.

Fixes: d767f7cd5e ("Pass vcsegptridx to render_face")
2016-12-22 05:21:16 +00:00
Kp b3809266a3 Use enumerate in more loops 2016-12-11 01:56:44 +00:00
Kp dc881ec12d Merge pull #266 into master 2016-11-19 18:09:26 +00:00
Kp 223a9dfd56 Pass grs_bitmap &to piggy_register_bitmap 2016-11-19 17:24:53 +00:00
Kp bb135e546e Set Descent 1 paged out bitmaps to nullptr
Descent 2 sets nullptr in the bitmap data field.  Do the same in Descent
1 for consistency.
2016-11-19 17:24:52 +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 143ed30fee Merging in unification/master, resolving conflict in similar/main/kmatrix.cpp 2016-11-06 14:20:18 +08:00
Kp b362d67d84 Fold bm_load_sub call to gr_remap_bitmap_good 2016-10-28 03:39:40 +00: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
zico 63ca86698e Added communication for tracker written by A Future Pilot 2016-10-10 18:19:56 +02:00
Kp 69eec0d71f Save some editor gadget pointers 2016-09-24 18:06:11 +00:00
Kp 6a3ded191f Move EDITOR to dxxsconf.h; rename to DXX_USE_EDITOR
Rename symbol EDITOR to DXX_USE_EDITOR to show that it is a DXX
symbol, not one inherited from a library.  Move it to dxxsconf.h to
shorten the command line.

This is a mostly automated transform, but the changes to SConstruct were
manual.

git grep -wl EDITOR -- '*.h' '*.cpp' | xargs sed -i -e 's/^\s*#ifdef \(EDITOR\)\>/#if DXX_USE_\1/' -e 's/\s*#\(el\)\?if \(.*\)defined(\(EDITOR\))/#\1if \2DXX_USE_\3/' -e 's/^\s*#ifndef \(EDITOR\)\>/#if !DXX_USE_\1/'
2016-09-11 18:49:16 +00:00
zico 8907a2bee4 Updated INSTALL.txt, README.txt, RELEASE-NOTES.txt, d1x.ini, d2x.ini for upcoming release. Updated Debian build to not include obsolete patch (it may still be broken, needs to be verified). Fixed small parsing typo in inferno.cpp help output. 2016-08-30 13:15:55 +02:00
zico 6c6a32ba92 Added patch by user 'beware' to remove dark edges around textures and added command-line/INI option to disable this patch if desired (nostalgia). Fixed misleading indentation in ogl.cpp along the way. 2016-08-29 17:07:30 +02:00
Kp b87651216c Switch ab_load to use inttypes format macros
Most 64-bit systems use `unsigned long` for `uint_fast32_t`.  Some
32-bit systems use `unsigned int` for `uint_fast32_t`.  To handle this,
ab_load used casts to `unsigned long` and a format string of `%lu`.
Switch to inttypes format macro so that the format string is correct
without requiring a cast to handle systems where `uint_fast32_t` is not
`unsigned long`.
2016-08-19 03:41:41 +00:00
Kp 20ae1e2b4a Remove useless casts in d1 custom.cpp 2016-08-06 19:55:24 +00:00
Kp 96f78e1032 Use constexpr for MAX_BITMAP_FILES 2016-07-14 01:59:05 +00:00
Kp 59750d3c29 Rewrite declarations of ubyte * to standard uint8_t * 2016-07-14 01:59:02 +00:00
Kp 0b6af7fcbe Propagate MAX_OBJ_BITMAPS 2016-07-10 04:11:35 +00:00
Kp b6970e2a98 Simplify skipping unwanted hxm shorts 2016-07-10 04:11:35 +00:00
Kp 3779bc25a0 Define Robot_names only if EDITOR 2016-07-09 17:58:34 +00:00
Kp fee76e6ced Define Powerup_names only if EDITOR 2016-07-09 17:58:34 +00:00
Kp a4967ffceb Move various robot data into namespaces 2016-06-25 23:21:36 +00:00
Kp 231223895d Rewrite simple pointer casts from C style to reinterpret_cast<>
This pass only targets commonly used standard types.

s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\*\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-06-05 01:04:26 +00:00
Kp ebebda5f17 Fix piggy casts when sizeof(size_t) is not sizeof(void*) 2016-06-05 01:04:26 +00:00
Kp 7fdce88558 Add parentheses around target of simple casts
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of simple C casts.

This pass does not attempt to process expressions that involve
any subexpression that can nest arbitrarily, such as parentheses or
brackets.  It also works only on commonly used standard types.

	(int) a->b;	// changed
	(int) a[b];	// not changed

s/\((\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\s*\**\s*)\s*\)\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/\1(\5\6\7)\8/g
2016-06-05 01:04:25 +00:00
Kp b31446340c Rewrite cast of (ubyte*) to standard type uint8_t
s/(\s*ubyte\s*\*\s*)/(uint8_t *)/g
2016-06-05 01:04:25 +00:00
Kp 0d189f3656 Fold gr_remap_bitmap_good call in D1 ab_load 2016-05-28 17:31:27 +00:00
Kp 82a8f6ebb0 Pass bm_mode to gr_init_bitmap 2016-05-28 17:31:27 +00:00
Kp dcc56e6b39 Propagate bm_mode::linear into iff_read_bitmap 2016-05-28 17:31:27 +00:00