Kp
b57f08c798
Use partial_const_range
2016-02-12 04:02:28 +00:00
Kp
6e20d86941
Move OF_PLAYER_DROPPED into drop_powerup
...
This fixes an issue where calling drop_powerup with num > 1 only tagged
one powerup as player-dropped.
This also changes powerups dropped by the thief to be "player-dropped",
since, aside from the initial shields/energy, they came from the player
originally.
2016-02-06 22:12:55 +00:00
Kp
ec025d4e88
Pass common highest_valid to vptr factory
2016-02-06 22:12:54 +00:00
Kp
2bddeaaadf
Remove sprintf from D2 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
98f5afa9f8
Remove default argument for basic_ptr(pointer,array &)
2016-01-09 16:38:13 +00:00
Kp
e8c34be843
Use v*ptr* factories with highest_valid
2015-12-22 04:18:51 +00:00
Kp
d479819931
Use absolute_sibling to reduce global references for ptridx
2015-12-22 04:18:51 +00:00
Kp
db9fb0ed42
Move more symbols into namespace dcx/dsx
2015-12-22 04:18:50 +00:00
Kp
2b51578ba6
Use enum class for Player_dead_state (formerly Player_is_dead)
2015-12-15 04:09:35 +00:00
Kp
26e948d5f1
Uninline namespace dsx
2015-12-13 18:00:49 +00:00
Kp
8109379fdd
Use inline namespace dsx for similar/misc/
2015-12-13 18:00:48 +00:00
Kp
8a97c173a3
Remove useless gr_remap_mono_fonts
...
gr_remap_mono_fonts searches for fonts with !(font->ft_flags & FT_COLOR)
and calls gr_remap_font on any it finds.
gr_remap_font starts with:
if (!(font->ft_flags & FT_COLOR))
return;
2015-12-04 03:36:32 +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
0c75aecc45
Check most uses of object id
2015-11-27 03:56:13 +00:00
Kp
7153ec69a9
Move SndNoSound to CGameArg
2015-11-24 04:05:36 +00:00
Kp
a579f75d05
Move SndDisableSdlMixer to CGameArg
2015-11-24 04:05:36 +00:00
Kp
82d0c2ed96
Make some implicit uses of ptridx construction explicit
2015-11-19 03:23:34 +00:00
Kp
0ebe9e48b8
Remove buddy's useless Player_is_dead test
...
The headlight should be off when the player is dead.
2015-11-14 18:17:20 +00:00
Kp
6b353cb9ac
Move player powerup_flags to object.ctype.player_info
2015-11-07 21:55:59 +00:00
Kp
8a81e25ab0
Move player laser_level to object.ctype.player_info
2015-11-07 21:55:59 +00:00
Kp
b788d0b563
Move player primary_weapon_flags to object.ctype.player_info
2015-11-07 21:55:59 +00:00
Kp
6037372cdf
Move player vulcan_ammo to object.ctype.player_info
2015-11-07 21:55:59 +00:00
Kp
6fd6436f14
Move player energy to object.ctype.player_info
2015-11-07 21:55:58 +00:00
Kp
dc5dfb80e8
Use macro get_local_player_secondary_ammo for player's secondary_ammo
2015-10-30 02:52:56 +00:00
Kp
070444157e
Use type safe player flags
2015-10-30 02:52:55 +00:00
Kp
e130ea7b36
Remove unnecessary secondary_weapon_flags
2015-10-30 02:52:53 +00:00
Kp
edea687627
Remove HAVE_STRUCT_TIMEVAL
...
SConstruct defines it for all platforms. It is only false on Mac OS 9,
which is no longer supported.
2015-10-27 03:04: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
Kp
21057db809
Move DbgSafelog, DbgVerbose to CArg
2015-10-18 21:01:21 +00:00
Kp
533f1cb3bb
Qualify references to primary weapons
2015-10-18 21:01:18 +00:00
John Ackerman
a606caa2b4
Improve .ini files and help message output
2015-10-11 22:21:00 +00:00
Kp
36c52f7437
Reduce pointer->int->pointer conversions for thief
2015-10-10 03:44:14 +00:00
Kp
78de0ac119
Add fwd-event.h with forward declarations of event.h
2015-10-09 02:46:10 +00:00
Kp
edccaa91f6
Check return of pick_connected_segment before use
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
bec81b2e62
Cache get_local_player in do_escort_frame
2015-09-26 21:17:13 +00:00
Kp
5d902ad361
Shorten drop_stolen_items
2015-09-26 21:17:13 +00:00
Kp
b87db8d9e8
Factor out thief message call
2015-09-26 21:17:13 +00:00
Kp
c4a8432081
Remove WORDS_NEED_ALIGNMENT memcpy src cast to const uint8_t*
...
The cast provokes a warning on systems that require alignment, so remove
it. memcpy takes const void* input, so the cast is unnecessary.
Reported-by: MattWatt <https://github.com/dxx-rebirth/dxx-rebirth/issues/119 >
2015-09-13 21:02:19 +00:00
Kp
fd5d7b800d
Move reactor gun loop into calc_controlcen_gun_point
2015-08-26 03:15:10 +00:00
Kp
17b1943c5e
Mark various per-file structures as static
2015-08-12 03:11:46 +00:00
Kp
cfd08b5d6c
Suppress physfsx read/write macros in physfsrwops.cpp
2015-07-25 23:10:48 +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
c942d28197
Use accessor for grs_bitmap::bm_type
2015-07-25 23:10:47 +00:00
Kp
bda7fef3a0
Use get_local_player to compute reference to local player
2015-07-25 23:10:46 +00:00
Kp
f38e80c053
Use get_local_plrobj to compute reference to object of local player
2015-07-25 23:10:45 +00:00
Kp
15fb75c1c7
Fix check_header_includes build
2015-07-25 23:10:45 +00:00
Kp
0fea8ec2b8
Use valptr for escort.cpp
2015-07-12 01:04:22 +00:00
Kp
e3308be8b9
Cache font LINE_SPACING
2015-06-13 22:42:22 +00:00
Kp
ce72014e2e
Always parse WORDS_BIGENDIAN and !WORDS_BIGENDIAN
2015-06-13 22:42:21 +00:00
Kp
03921dfd83
Move d2x-rebirth/include/* -> d2x-rebirth/main/
2015-06-13 22:42:21 +00:00
Kp
215e2dca81
Remove unused libpng support
...
HAVE_LIBPNG has not been set since 2004 when
3325c0b52b
("remove old OSX bundle stuff")
commented out the autoconf check to set it.
2015-06-13 22:42:21 +00:00
Kp
3980c5d472
Use valptr for escort highest_valid
2015-06-13 22:42:16 +00:00
Kp
61019b9dab
Refactor escort code to make it work under strict checks
2015-06-13 22:42:15 +00:00
Kp
678f462c45
Fix buggy guidebot detection of retrieving a key
2015-06-13 22:42:15 +00:00
Kp
00c1429ebf
Use enum for Escort_special_goal
2015-06-13 22:42:15 +00:00
Kp
53a7798d80
Simplify fix_sincos calls
2015-06-02 03:03:31 +00:00
Kp
3ec6340cb4
Update open-coded tests for object_none
2015-05-28 03:08:40 +00:00
Kp
73300a285d
Merge "change u_int*_t to C99 standard uint*_t"
...
Requested-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/67 >
Acked-by: Matt1360 <https://github.com/dxx-rebirth/dxx-rebirth/pull/67#issuecomment-104806115 >
2015-05-23 17:36:29 +00:00
Kp
7243e76c80
Fix gcc-4.6 decoder8 build
...
Fixes: 8a28f7e1c2
("Use array<> for movie decoder")
2015-05-22 03:33:20 +00:00
Bradley Bell
bdacd2f7d7
change u_int*_t to C99 standard uint*_t
2015-05-18 17:12:53 -07:00
Kp
0ece005dfa
Use screen_mode for screen resolution
2015-05-14 02:23:13 +00:00
Kp
cf87ebe54d
Remove write-only grs_bitmap::bm_handle
2015-05-09 17:38:59 +00:00
Kp
0d564814f5
Convert Primary_weapon to primary_weapon_index_t
2015-04-26 20:15:57 +00:00
Kp
8d849b2b39
Wrap laser level in class
...
Move enum laser_level_t to weapon.h for the new class.
2015-04-26 20:15:56 +00:00
Kp
144477f92a
Open movie file before changing GUI
2015-04-26 20:15:56 +00:00
Kp
6792c1bc4b
Enable -Wunused-parameter
2015-04-26 20:15:56 +00:00
Kp
4d046c5336
Split auto_select_weapon
2015-04-26 20:15:51 +00:00
Kp
f15ec9c86a
Use enum for AIM constants
2015-04-26 20:15:51 +00:00
Kp
e883d7c872
Use enum class for AIB constants
2015-04-26 20:15:51 +00:00
Kp
f8ac14b737
Convert mvelib to vector<uint8_t>
2015-04-26 20:15:51 +00:00
Kp
c338862ad6
Reduce gauges.h includes
2015-04-19 04:18:51 +00:00
Kp
150e2d2686
Convert local arrays to array<>
2015-04-19 04:18:49 +00:00
Kp
5ae5033fed
Use enum for AIB constants
2015-04-02 02:36:57 +00:00
Kp
8a28f7e1c2
Use array<> for movie decoder
2015-04-02 02:36:56 +00:00
Kp
9157e5f970
Use enum class for player_awareness_type_t
2015-04-02 02:36:53 +00:00
Kp
fca381727c
Add wrappers for screen width/height
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
7bf49fe551
Fix clang -Wmissing-braces warnings
2015-03-22 18:49:21 +00:00
Kp
1f5190bcfd
Fix resource leak closing SDL RW ops
...
Leak introduced in b3d134a6b7
("merged
physfs branch"), but this fix only applies after the conversion to RAII.
An equivalent change from SDL_FreeRW->SDL_RWclose is needed for pre-RAII
code.
Fixes: d0de0cf963
("Use unique_ptr for SDL_RWops")
2015-02-28 22:34:07 +00:00
Kp
d6e029194b
Fix memory leak on escort menu
2015-02-28 22:34:07 +00:00
Kp
3dfac8350e
Use array<> for robot_info
2015-02-28 19:36:01 +00:00
Kp
f900d4a5ee
Remove RAIIdmem::operator pointer
...
Mac OS X defines uint_fast32_t to unsigned int, causing ambiguous
overloads between RAIIdmem::operator[](std::size_t) and
RAIIdmem::operator[](int). Adding a disambiguating overload for OS X
breaks Windows. Remove operator pointer and operator[]. Rely on the
inherited operator[] for indexing. Require users to call ->get() to
convert to a simple pointer.
First btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/34
Second btb ambiguity reported: https://github.com/dxx-rebirth/dxx-rebirth/pull/43
2015-02-17 03:52:59 +00:00
Kp
68e2168377
Use array<> for bitmap_index arrays
2015-02-14 22:48:30 +00:00
Kp
f17458d353
Explicitly delete valptridx inequality operators
2015-02-14 22:48:30 +00:00
Kp
91cc111295
Provide SndDisableSdlMixer=true if !USE_SDLMIXER
...
Accept -nosdlmixer as a no-op in !USE_SDLMIXER builds.
2015-02-08 17:43:29 +00:00
Kp
d0de0cf963
Use unique_ptr for SDL_RWops
2015-02-08 17:43:29 +00:00
Kp
abb0d86696
Only close opened movies
2015-02-08 17:43:29 +00: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
c2aa2c2e4b
Rename space to space_tab
...
Name space is too simple and causes conflicts elsewhere.
2015-01-29 04:27:35 +00:00
Kp
ff4a0ccd70
Fix RAIIdmem array usage
...
Some RAIIdmem instances managed a T[], but were declared to manage a T.
2015-01-28 03:42:53 +00:00
Kp
786b7c35a5
Use unique_ptr for mve_audio_spec
2015-01-28 03:42:53 +00:00
Kp
accd1db476
Use unique_ptr for mve_audio_buffers
2015-01-28 03:42:52 +00:00
Kp
a3edc2b4f8
Use unique_ptr for MVEFILE::cur_chunk
2015-01-28 03:42:52 +00:00
Kp
77d25fd6d2
Fix uninitialized access in exists_in_mine_2
...
Objects of type OBJ_NONE have no guaranteed values in any other field.
Check curobjp->type before examining the object.
2015-01-28 03:42:52 +00:00
Kp
0ea95e87e7
Pass array<> to create_bfs_list
2015-01-28 03:42:52 +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
40fd988a0f
Hide local classes in anonymous namespaces
2015-01-23 03:55:06 +00:00
Kp
a6884e77db
Unpack robot_info
2015-01-23 03:55:04 +00:00
Kp
84e3a03451
Remove unused parameters
2015-01-18 01:58:33 +00:00
Kp
c6664a45a6
Add newmenu_do helper for array<newmenu_item, N>
2015-01-18 01:58:32 +00:00
Kp
f8163957ef
Add helper nm_item_input
2015-01-18 01:58:31 +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
Kp
28a31a223f
Centralize window_close calls
2015-01-17 18:31:41 +00:00
Chris Taylor
aee62be433
Merge branch 'btb-xcode' into unification/master
2015-01-14 19:42:16 +08:00
Kp
61ba3d1ba2
Centralize buddy search
2015-01-12 00:26:04 +00:00
Kp
846b6b4b82
Improve buddy message suppression
2015-01-12 00:26:03 +00:00
Kp
12770802ab
Use ntstring for guidebot name
2015-01-12 00:26:02 +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
fbac119095
Propagate use of objptridx_t
2014-12-23 04:20:27 +00:00
Kp
0f30d4eb72
Use PHYSFSX_gets_line_t for Current_level_palette
2014-12-20 04:36:08 +00:00
Kp
5867b5d690
Remove useless bmread whitespace loop
...
Obsolete since 44bbb66101
.
2014-12-18 04:12:39 +00:00
Kp
da6632a917
Use array<> for Robot_joints
2014-12-18 04:12:38 +00:00
Kp
4af33f12a4
Fix gcc-4.7 -Wmissing-braces warning
2014-12-15 03:59:15 +00:00
Bradley Bell
f897688c12
delete old broken XCode project files
2014-12-06 22:43:12 -08:00
Kp
73b0a016a8
Fix loading robots-?.mvl
...
Rework movie loading to fix loading built-in robot movies. The previous
code always ignored loading the last entry in the movie array, which was
blank until 18f6919b33
. The last entry
was unused after d38a3d1362
, so it was
removed, which caused the code to skip the robots entry.
Commit d38a3d1362
broke unloading add-on
movies by removing the strcpy which saved their name. Add code to save
the name to extra_robot_movie_mission and call it when switching
missions.
Reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/17
2014-12-06 17:56:56 +00:00
Bradley Bell
3daa0f63b1
Add search SDL_mixer framework paths for headers instead of using <Framework/Header.h> notation
2014-12-03 15:14:18 -08:00
Kp
0375876a08
Pass gr_bm_ubitbltm arg by &
2014-12-02 03:35:01 +00:00
Kp
e7aae37c8d
Pass ogl_ubitblt_i arg by &
2014-12-02 03:35:01 +00:00
Kp
91a2eb8491
Include <vector> in mveplay.cpp for std::vector
...
Reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/12
Fixed by btb: f502740fdd
2014-11-30 17:01:39 +00:00
Kp
5aaf847c41
Fix various -Wnarrowing errors
2014-11-26 03:39:21 +00:00
Kp
d63be88eb0
Propagate use of vsegptridx_t
2014-11-23 04:58:45 +00:00
Kp
a17cf6f808
Avoid slicing into objnum_t local
2014-11-20 03:00:41 +00:00
Kp
2c349136cc
Avoid slicing into segnum_t local
2014-11-20 03:00:36 +00:00
Kp
ad527a7551
Use unique_ptr for MVEFILE
2014-11-01 15:04:30 +00:00
Kp
a42e7c3db1
Use unique_ptr for MVESTREAM
2014-11-01 15:00:48 +00:00
Kp
279233cf24
Use std::vector for MVE buffer
2014-11-01 15:00:04 +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
5bb9c88979
Add vm_vec_sub that returns result
2014-10-29 03:24:31 +00:00
Kp
fb1704780b
Move pMovie into local data structures
2014-10-29 03:01:18 +00:00
Kp
d8024d4d26
Use RAII to manage MVESTREAM
2014-10-29 02:59:08 +00:00
Kp
19bb554f31
Move MVESTREAM pointer up one layer
2014-10-29 02:57:52 +00:00
Kp
53aa70cecb
Use vsegptridx_t
2014-10-28 03:08:51 +00:00
Kp
b871228f92
Pass create_morph_robot vector by const &
2014-10-28 01:47:18 +00:00
Kp
8a0582766a
Pass drop_powerup vector by const &
2014-10-28 01:46:07 +00:00
Kp
d14c0ba71c
Pass do_snipe_frame vector by &
2014-10-28 01:45:53 +00:00
Kp
ad717e59e8
Pass laser vectors as const &
2014-10-26 21:37:27 +00:00
Kp
a32547af16
Pass position-related vms_vector arg by &
2014-10-22 02:46:03 +00:00