Kp
ace2235ad8
Remove unused gr_make_cthru_table
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
6792c1bc4b
Enable -Wunused-parameter
2015-04-26 20:15:56 +00:00
Kp
cca163fc30
Split select_weapon
2015-04-26 20:15:52 +00:00
Kp
f789e29b41
Simplify check_to_use_primary
2015-04-26 20:15:52 +00:00
Kp
610f603ebf
Pass weapon_name to select_weapon
2015-04-26 20:15:52 +00:00
Kp
10b9206a9b
Split do_weapon_select
2015-04-26 20:15:51 +00:00
Kp
4d046c5336
Split auto_select_weapon
2015-04-26 20:15:51 +00:00
Kp
8e5a63700b
Use enum class for ai_mode
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
c3925353fd
Use null_sentinel_iterator for PHYSFS_list_t
2015-04-26 20:15:51 +00:00
Kp
143c536c77
Use PHYSFS_list_t for more functions
2015-04-26 20:15:50 +00:00
Kp
44adc83ca4
Use std::remove_if in file_get*list
2015-04-26 20:15:50 +00:00
Kp
f00ec13c0f
Use std::move_backward for file_getdirlist
2015-04-26 20:15:50 +00:00
Kp
fd6ac87c25
Fix trigger_none checks
2015-04-26 20:15:50 +00:00
Kp
5d0a640449
Always inline PHYSFS check functions
...
The checking is done at compile time, so force them inline to ensure
the optimizer recognizes constants.
2015-04-26 20:15:50 +00:00
Bradley Bell
a63ec5bd7c
Merge branch 'unification/master' into command-line
2015-04-25 12:27:16 -07:00
Kp
23364a5862
Remove warn_unused_result from vm_vec_normalize
...
Some callers want the side effect of normalizing the argument and do not
need the magnitude. Per report from btb, the warning broke the OS X
build.
Reported-by: btb <5e4bd5c73f (commitcomment-10899878)
>
Fixes: 5e4bd5c73f
("vm_vec_delta_ang: check for vm_vec_copy_normalize failure")
2015-04-25 16:56:25 +00:00
Bradley Bell
844aad2639
Merge branch 'unification/master' into command-line
2015-04-24 20:54:35 -07:00
Kp
6e9638531a
Mark get_previous_segment static
2015-04-22 02:44:31 +00:00
Kp
08ee591e21
Fix ODR collision between ui/file browser and main/menu browser
2015-04-22 02:44:30 +00:00
Kp
3eb8f4813e
Pass vcobjptr_t to apply_damage_to_controlcen
2015-04-22 02:44:30 +00:00
Kp
eedfaab822
Remove OGL Max_linear_depth
2015-04-22 02:44:29 +00:00
Kp
b46ecbb3e9
Add netgame parameter to duplicate powerups
2015-04-19 04:18:53 +00:00
Kp
4381b81497
Pack spawn granted items in D1
2015-04-19 04:18:53 +00:00
Kp
b32298df5a
Rewrite powerup cap code to centralize logic
2015-04-19 04:18:53 +00:00
Kp
b88c232f9f
Use powerup_type_t for *_weapon_to_powerup
2015-04-19 04:18:53 +00:00
Kp
d7066c3eb9
Remove constant arguments to pick_up_ammo
2015-04-19 04:18:53 +00:00
Kp
28b4a65547
Centralize ammo rack bonus
2015-04-19 04:18:52 +00:00
Kp
adbefd39c4
Minimize unnecessary fields passed to check_effect_blowup
2015-04-19 04:18:52 +00:00
Kp
864605dce2
Use stdint for titles.h
2015-04-19 04:18:52 +00:00
Kp
c20cfc02cb
Remove unused D1 definition of POW_FULL_MAP
2015-04-19 04:18:52 +00:00
Kp
ae8a8c98ce
Reduce player.h includes
2015-04-19 04:18:52 +00:00
Kp
83afd8d96f
Reduce piggy.h includes
2015-04-19 04:18:52 +00:00
Kp
51ab9ff9d6
Simplify DXX guard on object.h
2015-04-19 04:18:52 +00:00
Kp
808d5c1cf2
Switch joystick_text_length to integral_constant
2015-04-19 04:18:52 +00:00
Kp
cd6be09547
Reduce kconfig.h includes
2015-04-19 04:18:51 +00:00
Kp
c338862ad6
Reduce gauges.h includes
2015-04-19 04:18:51 +00:00
Kp
4149ab6e5f
Reduce gameseq.h includes
2015-04-19 04:18:51 +00:00
Kp
714fd36241
Reduce gamemine.h includes
2015-04-19 04:18:51 +00:00
Kp
27b6ad1630
Reduce game.h includes
2015-04-19 04:18:51 +00:00
Kp
75162a6fe9
Reduce controls.h includes
2015-04-19 04:18:51 +00:00
Kp
516b8b2397
Reduce collide.h includes
2015-04-19 04:18:51 +00:00
Kp
8c6ddf1abf
Reduce cntrlcen.h includes
2015-04-19 04:18:51 +00:00
Kp
726e5737bb
Reduce bm.h includes
2015-04-19 04:18:51 +00:00
Kp
8582907b91
Reduce ai.h includes
2015-04-19 04:18:51 +00:00
Kp
4e937ae239
Reduce playsave.h includes
...
Move non-common includes into defined(D1||D2)
2015-04-19 04:18:50 +00:00
Kp
9d213b5282
Wrap player_has_weapon return type
2015-04-19 04:18:50 +00:00
Kp
9595aec2fb
Use integral_constant for endian constants
2015-04-19 04:18:50 +00:00
Kp
9751022b1b
Use static_assert for player_rw size check
2015-04-19 04:18:50 +00:00
Kp
5c73a98827
Remove !__cplusplus directives
2015-04-19 04:18:50 +00:00
Kp
4240017193
Remove unused D1 definition of POW_HEADLIGHT
2015-04-19 04:18:49 +00:00
Kp
84c638ed64
Move PHYSFS_list_t to separate header
2015-04-19 04:18:49 +00:00
Kp
150e2d2686
Convert local arrays to array<>
2015-04-19 04:18:49 +00:00
Kp
3e520afc89
Reduce size of hmp_open buffer
2015-04-19 04:18:49 +00:00
Kp
32b4b8f0bb
Use enum class for level save/load
2015-04-19 04:18:49 +00:00
Kp
534fe7a160
Refactor valptr range checks
2015-04-18 01:21:54 +00:00
Kp
e99a9236cf
Avoid redundant vsegptridx calculation in object_move_one
2015-04-11 04:01:29 +00:00
derhass
e00b318bee
Fix the INTEL_*() byte swapping functions
...
This fixes a regression from 6e96ff3e00
where WORDS_BIGENDIAN somehow was confused with WORDS_NEED_ALIGNMENT,
so that setting WORDS_NEED_ALIGNMENT resulted in assuming a big endian
machine. This completely broke the RPi build, which is little endian.
Fixes: 6e96ff3e00
("Fix ambiguous use of INTEL_SHORT/INTEL_INT")
[Kp: added Fixes tag.]
2015-04-05 16:08:52 +00:00
Kp
efc5b071de
Remove object_rw::pad, pad2
...
The presence of these fields breaks network compatibility between
aligned and unaligned users. Removing these fields breaks the ability
to use aligned savegames. Per discussion in
<fdaa09d7f9
>,
this is acceptable to clean up the code.
Reported-by: derhass <http://www.dxx-rebirth.com/frm/index.php/topic,1986.msg21232.html >
Approved-by: zico <fdaa09d7f9 (commitcomment-10575014)
>
2015-04-04 23:20:12 +00:00
Kp
5e4bd5c73f
vm_vec_delta_ang: check for vm_vec_copy_normalize failure
...
derhass reports that Raspbian g++-4.8.2 rejects vecmat.cpp for
-Wmaybe-uninitialized on t0, t1. Fix it by adding code to return 0 if
vm_vec_copy_normalize leaves the temporary uninitialized.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/55 >
2015-04-03 02:46:25 +00:00
Kp
a9c81c5614
Move Weapon_is_energy to collide.cpp
2015-04-02 02:36:57 +00:00
Kp
5ae5033fed
Use enum for AIB constants
2015-04-02 02:36:57 +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
2f86499144
Remove do_cockpit_window_view unused parameters
2015-04-02 02:36:57 +00:00
Kp
b0ec49f8e5
Remove unused file+line from get_seg_masks
2015-04-02 02:36:56 +00:00
Kp
2f92078413
Move ui_add_gadget_scrollbar arrows off stack
2015-04-02 02:36:56 +00:00
Kp
36e1612ecb
Make undo_status array<const char *>
2015-04-02 02:36:56 +00:00
Kp
aa75a398d9
Move Wall_names to dumpmine.cpp
2015-04-02 02:36:56 +00:00
Kp
ae8b99ae7d
Use RAIIdigi_sound for briefing printing_channel
2015-04-02 02:36:55 +00:00
Kp
b8f9c1a1de
Expand EXCHG
2015-04-02 02:36:54 +00:00
Kp
2a1df52f71
Remove unused g3_draw_bitmap return value
2015-04-02 02:36:54 +00:00
Kp
2059c5a4ad
Remove unused must_clip_flat_face return value
2015-04-02 02:36:54 +00:00
Kp
72d349b0e0
Remove unused g3_draw_sphere return value
2015-04-02 02:36:54 +00:00
Kp
1125a751db
Remove unused g3_draw_poly return value
2015-04-02 02:36:54 +00:00
Kp
916cf69e37
Remove unused gr_uline return value
2015-04-02 02:36:54 +00:00
Kp
ca123b6cde
Remove unused gr_line return value
2015-04-02 02:36:54 +00:00
Kp
c3161d08d5
Remove unused g3_draw_line return value
2015-04-02 02:36:54 +00:00
Kp
95e3ac1e5b
Use integral_constant for UI kind
2015-04-02 02:36:54 +00:00
Kp
f88eaf43ac
Make UI_GADGET_LISTBOX char* const
2015-04-02 02:36:54 +00:00
Kp
9f04c0c3d8
Make OGL_ENABLE safe for single statement blocks
2015-04-02 02:36:54 +00:00
Kp
6a4c7ed78e
Inline away D1 secret_restore values
2015-04-02 02:36:53 +00:00
Kp
face692126
Narrow D2 previous_visibility to uint8_t
2015-04-02 02:36:53 +00:00
Kp
6757b2178b
Narrow D2 rapidfire_count to uint8_t
2015-04-02 02:36:53 +00:00
Kp
bb10d350f4
Narrow D2 consecutive_retries to uint8_t
2015-04-02 02:36:53 +00:00
Kp
a36603826a
Narrow D2 retry_count to uint8_t
2015-04-02 02:36:53 +00:00
Kp
9157e5f970
Use enum class for player_awareness_type_t
2015-04-02 02:36:53 +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
6e96ff3e00
Fix ambiguous use of INTEL_SHORT/INTEL_INT
2015-04-02 02:36:52 +00:00
Kp
92b6cd3883
Replace ui_create_dialog specialization with helper
...
Rename ui_create_dialog<void *> specialization with free function
untyped_ui_create_dialog. GCC 4.6 incorrectly considers a
specialization to be a redundant declaration, causing a
-Wredundant-decls failure with the specialization form.
Fixes: be041a9cfc
("Add type checking for ui_create_dialog")
2015-04-02 02:36:52 +00:00
Kp
598a5e42a2
Allow granting items at player spawn
2015-03-28 17:18:02 +00:00
Kp
da3cb31a0e
Refactor powerup allow code
2015-03-28 17:18:02 +00:00
Kp
b32d1c76c9
Move powerup size reset into set_powerup_id
2015-03-28 17:18:02 +00:00
Kp
12ad357b8d
Move Wimp Menu to macro
2015-03-28 17:18:02 +00:00
Kp
0b20dea0ad
Remove unused jukebox functions
2015-03-28 17:18:02 +00:00
Kp
c4bcbb0403
Add workaround for gcc 4.6 constructor brace initialization
...
Reported-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/54#issuecomment-86252358 >
2015-03-27 02:50:23 +00:00
Kp
7045b44386
Move operator*(vm_distance,vm_distance) into class scope
...
clang -Wunused-function warns about a 'static constexpr' function
defined in a header if the header is ever included in a file which does
not call the function. Move the function into class scope to silence
the warning and prevent the compiler from considering it when resolving
operator*(T1,T2).
Reported-by: btb <https://github.com/dxx-rebirth/dxx-rebirth/pull/54#issuecomment-86252750 >
2015-03-26 02:42:26 +00:00
Kp
ff83ba95b6
Remove unused ogl_extensions_init return value
2015-03-25 01:59:21 +00:00
Kp
694c522756
Use array<> for OpenGL extension version
2015-03-25 01:59:20 +00:00
Christian
97fc714970
Merge pull request #53 from derhass/unification/syncgl
...
cleaned-up syncgl patch for unification
2015-03-24 12:37:55 +01:00
Kp
0707664ae1
Use enum for kmatrix_view result
2015-03-24 02:07:42 +00:00
derhass
639b569496
Merge branch 'unification/master' into unification/syncgl_v2
...
Conflicts:
similar/arch/ogl/gr.cpp
similar/misc/args.cpp
2015-03-23 20:18:17 +01:00
derhass
bf723efd48
use C++ style reinterpret_casts to pointers from SDL_GetProcAddress to function pointer types
2015-03-23 20:06:23 +01:00
zico
8d686ab23b
implemented return value for kmatrix_view() so we can properly bail out of the game loop in AdvanceLevel()
2015-03-23 03:03:22 +01:00
Kp
d63be36fb3
Fix bogus trap on remote_owner check
...
Some call sites pass a uint8_t to objnum_remote_to_local, which is
zero-extended up to an int. The check for owner==-1 then fails, causing
the sanity check to trap to the debugger, even though the situation is
normal and harmless. Switch the type to int8_t to ensure that the value
is not sign/zero-extended.
2015-03-22 22:48:47 +00:00
derhass
6d41224638
move GL synchronization code into its own class
2015-03-22 21:19:06 +01:00
derhass
db267af6f2
add basic OpenGL extension handling
...
Currently only used for fence sync objects.
2015-03-22 20:32:14 +01:00
Kp
d04e7902ee
Make file_get*list static
2015-03-22 18:49:21 +00:00
Kp
383e7703b6
Use ntstring in file_getdirlist
2015-03-22 18:49:21 +00:00
Kp
2b44a352ca
Remove redundant sc_mode
...
sc_mode is a packed copy of sc_w/sc_h. Switch to an accessor that uses
the copy.
2015-03-22 18:49:21 +00:00
Kp
fca381727c
Add wrappers for screen width/height
2015-03-22 18:49:21 +00:00
Kp
8daa014d53
Remove unused gr_check_mode
2015-03-22 18:49:21 +00:00
Kp
f098471e54
Make sdl_video_flags static
2015-03-22 18:49:21 +00:00
Kp
91d31b1952
Wrap object signature in subtype
2015-03-22 18:49:21 +00:00
Kp
08c0c3768c
Remove unused gr_set_draw_buffer
2015-03-22 18:49:21 +00:00
Kp
ce028fc843
Move Object_type_names to dumpmine
2015-03-22 18:49:21 +00:00
Kp
7840885473
Fix clang -Wparentheses-equality warnings
2015-03-22 18:49:21 +00:00
Kp
7bf49fe551
Fix clang -Wmissing-braces warnings
2015-03-22 18:49:21 +00:00
Kp
08f6ad4bc7
Enable nested INI files
2015-03-22 18:49:21 +00:00
Kp
9ddea5f570
Reduce lifetime of Args
2015-03-22 18:49:20 +00:00
Kp
65ff319ebb
Use ntstring for LastMission
2015-03-22 18:49:20 +00:00
Kp
af7b08abac
Convert some GameCfg flags to bool
2015-03-22 18:49:20 +00:00
derhass
2cd73b6dfe
Import the syncgl patch based on 0.58.1 into unification code base
...
I also changed the command line arguments a bit, gl_syncmethod and
gl_sycnwait are used now. Furthermore, I added the ew mode AUTO. This is
a conservative mode and the default for now: if GL_ARB_sync is available,
use the FENCE_SLEEP mode, otherwise, disable it completely.
Conflicts:
include/args.h
misc/args.c
similar/arch/ogl/gr.cpp
2015-03-22 18:17:11 +01:00
Kp
3da8a85ec3
Remove constexpr on rgb_array_wrapper::operator[]
...
OS X clang (but not Linux clang) rejects constexpr
on rgb_array_wrapper::operator[].
Reported-by: btb <b414758505 (commitcomment-10330686)
>
Fixes: b414758505
("Add stub for player color remapping")
2015-03-21 21:11:12 +00:00
Matt Vandermeulen
a59daa64c6
ಠ_ಠ
2015-03-20 17:31:22 -04:00
Kp
3a37b41192
Fix startup trap with D1 shareware data
...
D1 shareware models handle textures in a way that requires starting
highest_texture_num at -1.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/issues/46 >
Fixes: 68be3baeca
("Track highest_texture_num locally")
2015-03-20 03:30:20 +00:00
Kp
69af920e09
Fix Win64 startup crash
...
Fixes: 5bafa16e7f
("Fix level load hang on >=mingw32-gcc-4.7")
2015-03-19 02:31:22 +00:00
Kp
e1ff8afc88
Use ntstring for newmenu_item saved_text
2015-03-12 02:21:21 +00:00
Kp
d1b60c2324
Pass uint_fast32_t for newmenu_* items
2015-03-12 02:21:21 +00:00
Kp
76d383261c
Return vm_distance_squared from check_vector_to_sphere_1
2015-03-12 02:21:20 +00:00
Kp
2c09f9fa90
Propagate special types for distance/magnitude
2015-03-12 02:21:19 +00:00
Kp
f7d0c853ba
Use special types for distance/magnitude
2015-03-12 02:21:19 +00:00
Kp
9f6cbbe0e0
Move Vertex_list to local scope
2015-03-11 02:19:15 +00:00
Kp
b414758505
Add stub for player color remapping
2015-03-09 03:33:07 +00:00
Kp
72a01bf56c
Add indirection for player color lookup
2015-03-09 03:33:07 +00:00
Kp
a84a05c701
Move graphics menu to macro
2015-03-07 17:20:41 +00:00
Kp
7349a90cc8
Remove unused multi_send_message_dialog
2015-03-03 04:36:16 +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
81eae187e5
Pass selection for EVENT_NEWMENU_CHANGED
2015-02-28 22:34:07 +00:00
Kp
cc508be34c
Pass selection for EVENT_NEWMENU_SELECTED
2015-02-28 22:34:07 +00:00
Kp
14530d43ea
Guard g3d_interp_outline by defined(EDITOR)
2015-02-28 22:34:07 +00:00
Kp
68be3baeca
Track highest_texture_num locally
2015-02-28 22:34:06 +00:00
Kp
77ec36b9c3
Convert g3_draw_morphing_model to class
2015-02-28 22:34:05 +00:00
Kp
c080f65e81
Convert g3_draw_polygon_model to class
2015-02-28 22:34:05 +00:00
Kp
0ec4a876c5
Convert g3_poly_get_color to class
2015-02-28 22:34:05 +00:00
Kp
07869d9dba
Add automatic demo recording
...
Various users want automatic demo recording. Add new command line options:
-auto-record-demo start recording on level entry
-record-demo-format set demo name automatically
For -record-demo-format, specify a template containing any mix of strftime
insertions, variable insertions, and literal text. As a special case, specify
"." to use the builtin template "%Y%m%d.%H%M%S-$p-$m". Most users should use
".". Supported variables:
$p name of pilot recording the demo
$m name of msn/mn2 file played
Suggested by jeffersoncarpenter in https://github.com/dxx-rebirth/dxx-rebirth/pull/33 , but implemented by vLKp.
2015-02-28 19:36:02 +00:00
Kp
335780758b
Remove unused DXX_*_INPUT argument MAX_TEXT_LEN
2015-02-28 19:36:02 +00:00
Kp
3dfac8350e
Use array<> for robot_info
2015-02-28 19:36:01 +00:00