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
Kp
398596c468
Use enum for bitmap mode
2016-05-28 17:31:26 +00:00
Kp
7c6765b8e5
Fix -Wshadow warnings in ab_load
2016-05-22 17:49:31 +00:00
Kp
2635d64e4b
Fix -Wshadow warnings in gamedata_read_tbl
2016-05-22 17:49:31 +00:00
Kp
4d54e575ab
Fix -Wshadow warnings in bm_read_sound
2016-05-22 17:49:31 +00:00
zico
7d83eb1e62
Long overdue update for README files considering officially supported Windows versions
2016-03-30 13:30:47 +02:00
Kp
27cef20eb3
Move namespace dsx handling to dsx-ns.h
2016-03-19 19:08:10 +00:00
Kp
b57f08c798
Use partial_const_range
2016-02-12 04:02:28 +00:00
Kp
a8cb599a63
Remove sprintf from D1 bmread.cpp
2016-01-09 16:38:16 +00:00
Kp
86709f547b
Fix capitalization of PHYSFS_File
...
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
2016-01-09 16:38:14 +00:00
Kp
a3ae630829
Remove default argument for basic_ptridx(index)
2016-01-09 16:38:14 +00:00
Kp
26e948d5f1
Uninline namespace dsx
2015-12-13 18:00:49 +00:00
Kp
32051298ae
Use inline namespace dcx/dsx for more symbols
2015-12-13 18:00:48 +00:00
Kp
a9b82e3f7f
Make vlighting static
2015-12-04 03:36:31 +00:00
Kp
708dc0a7e1
Use vobjptr/vcobjptr for more Objects[] access
2015-12-03 03:26:49 +00:00
Kp
b683b4cc68
Scope weapon type
2015-12-03 03:26:49 +00:00
Kp
cf9f777187
Simplify select_tmap
...
Remove unreachable nullptr case. Use case-sensitive comparison. Remove
unsupported entry i386 from documentation.
2015-10-21 02:45:44 +00:00
John Ackerman
a606caa2b4
Improve .ini files and help message output
2015-10-11 22:21:00 +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
a2816617fe
Pass reactor& to read_model_guns
2015-07-25 23:10:48 +00:00
Kp
de06f639fd
Pass grs_bitmap& to set_lighting_flag
2015-07-25 23:10:47 +00:00
Kp
fee9672377
Use valptr for hostage.cpp
2015-07-12 01:04:18 +00:00
Kp
aac7575b8f
Use valptr for ehostage.cpp
2015-07-12 01:04:18 +00:00
Kp
9125ae32cd
Make objnum unsigned
2015-06-13 22:42:15 +00:00
Kp
53a7798d80
Simplify fix_sincos calls
2015-06-02 03:03:31 +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
90fbebf8fd
Convert most global arrays to array<>
2015-04-02 02:36:52 +00:00
Kp
66a70fd373
Prepare for global arrays to be array<>
2015-04-02 02:36:52 +00:00
Kp
945914f1d6
Enable -Wuninitialized, -Wempty-body, -Wignored-qualifiers, -Wunused
2015-03-22 18:49:21 +00:00
Kp
91d31b1952
Wrap object signature in subtype
2015-03-22 18:49:21 +00:00
Kp
6e06c6893f
Remove bogus assertion
...
Stack variables are never placed at NULL.
2015-03-22 18:49:21 +00:00
Kp
3dfac8350e
Use array<> for robot_info
2015-02-28 19:36:01 +00:00
Kp
b031e449de
Make equal_space a preprocessor constant
2015-01-29 04:27:35 +00:00
Kp
c2aa2c2e4b
Rename space to space_tab
...
Name space is too simple and causes conflicts elsewhere.
2015-01-29 04:27:35 +00:00
Kp
fa73ca8a17
Pass gr_remap_bitmap_good arg by &
2015-01-25 05:32:45 +00:00
Kp
31450e4843
Pass iff_read_bitmap arg by &
2015-01-25 05:32:44 +00:00
Kp
922a7b7dc9
Pass grs_main_bitmap to iff_read_animbrush
2015-01-25 05:32:44 +00:00
Kp
547193c591
Compile out unused bm_write_all
...
Unused since e2a2cc579a
deleted caller
piggy_dump_all.
2015-01-17 18:31:43 +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
Chris Taylor
9499d263ed
Merge branch 'unification/master' of github.com:dxx-rebirth/dxx-rebirth into unification/master
2015-01-17 18:31:43 +08:00
Kp
3368390f37
Check for valid SuperX number
2015-01-15 04:30:03 +00:00
Chris Taylor
d302a40662
Merge branch 'xcode' of https://github.com/btb/dxx-rebirth into btb-xcode
2015-01-10 18:54:13 +08:00
Kp
76bec9f31f
Fix spelling of "available" in help text
2015-01-03 23:44:31 +00:00
Bradley Bell
cf3ba80824
Merge branch 'unification/master' of https://github.com/dxx-rebirth/dxx-rebirth into xcode
2015-01-02 21:11:14 -08: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
da6632a917
Use array<> for Robot_joints
2014-12-18 04:12:38 +00:00
Bradley Bell
f897688c12
delete old broken XCode project files
2014-12-06 22:43:12 -08:00
Kp
e5acd8056d
Pass gr_set_bitmap_flags arg by &
2014-11-30 22:09:21 +00:00
Kp
53ce29e789
Pass gr_init_bitmap arg by &
2014-11-30 22:09:20 +00:00
Kp
0672cdff1b
Pass gr_set_bitmap_data grs_bitmap 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
968f7ddc97
Pass gr_gpixel arg by &
2014-11-30 22:09:18 +00:00
Kp
9aa0cf0b89
Pass read_model_guns vector as array &
2014-11-01 03:08:27 +00:00
Kp
6d61198130
Pass compute_segment_center vector by &
2014-10-30 03:32:51 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
44084ff261
Pass PHYSFSX_readVector vector by &
2014-10-26 22:08:58 +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
6971dfbf4a
Use symbolic *_none constants for -1
2014-10-04 17:31:13 +00:00
Kp
184f828a91
Move iff_read_animbrush array<unique_ptr<grs_bitmap>> down
2014-10-04 15:02:03 +00:00
Kp
0b2636d535
Pass vm_vec_add2 arguments by &
2014-09-28 21:43:00 +00:00
Kp
c0023cad51
Fix memory leak writing hoard data
2014-09-27 23:14:50 +00:00
Kp
dc511d0a5c
Pass array<> to iff_read_animbrush
2014-09-27 23:06:33 +00:00
Kp
78ad2adabf
Write weapon_info carefully
2014-09-27 22:46:25 +00:00